class ZAWS::AWSCLI::Data::IAM::Policy
Public Class Methods
new(shellout,iam)
click to toggle source
# File lib/zaws/external/awscli/data/iam/policy.rb, line 7 def initialize(shellout,iam) @shellout=shellout @iam=iam @policy_hash=nil end
Public Instance Methods
defaultVersion()
click to toggle source
# File lib/zaws/external/awscli/data/iam/policy.rb, line 31 def defaultVersion() if @policy_hash and @policy_hash["Policy"] and @policy_hash["Policy"]["DefaultVersionId"] return @policy_hash["Policy"]["DefaultVersionId"] end return nil end
load(command,data,verbose)
click to toggle source
# File lib/zaws/external/awscli/data/iam/policy.rb, line 17 def load(command,data,verbose) @policy_raw_data = data verbose.puts(@policy_raw_data) if verbose @policy_hash=nil begin @policy_hash =JSON.parse(data) rescue JSON::ParserError => e end end
validJSON()
click to toggle source
# File lib/zaws/external/awscli/data/iam/policy.rb, line 13 def validJSON return (@policy_hash.nil?) end
view()
click to toggle source
# File lib/zaws/external/awscli/data/iam/policy.rb, line 27 def view() return @policy_raw_data end