class Cumulus::IAM::StatementConfig
Public: Represents a policy config file.
Attributes
action[R]
effect[R]
resource[R]
Public Class Methods
new(json)
click to toggle source
Public: Constructor.
json - the Hash containing the JSON configuration for this StatementConfig
# File lib/iam/models/StatementConfig.rb, line 13 def initialize(json) @effect = json["Effect"] @action = json["Action"] @resource = json["Resource"] @condition = json["Condition"] end
Public Instance Methods
as_hash()
click to toggle source
Public: Create a Hash that contains the data in this StatementConfig
which can be turned into JSON that matches the format for AWS IAMS.
Returns the Hash representing this StatementConfig
.
# File lib/iam/models/StatementConfig.rb, line 24 def as_hash { "Effect" => @effect, "Action" => @action, "Resource" => @resource, "Condition" => @condition }.reject { |k, v| v.nil? } end