Class: CferExt::AWS::IAM::PolicyGenerator
- Inherits:
-
Cfer::Block
- Object
- ActiveSupport::HashWithIndifferentAccess
- Cfer::Block
- CferExt::AWS::IAM::PolicyGenerator
- Defined in:
- lib/cferext/aws/iam/policy_generator.rb
Instance Method Summary collapse
- #allow(&block) ⇒ Object
- #deny(&block) ⇒ Object
-
#initialize ⇒ PolicyGenerator
constructor
A new instance of PolicyGenerator.
- #statement(**options, &block) ⇒ Object
Methods inherited from Cfer::Block
#build_from_block, #build_from_file, #build_from_string, #include_file, #post_block, #pre_block
Constructor Details
#initialize ⇒ PolicyGenerator
Returns a new instance of PolicyGenerator.
7 8 9 10 |
# File 'lib/cferext/aws/iam/policy_generator.rb', line 7 def initialize self[:Version] = '2012-10-17' self[:Statement] = [] end |
Instance Method Details
#allow(&block) ⇒ Object
19 20 21 |
# File 'lib/cferext/aws/iam/policy_generator.rb', line 19 def allow(&block) statement Effect: :Allow, &block end |
#deny(&block) ⇒ Object
23 24 25 |
# File 'lib/cferext/aws/iam/policy_generator.rb', line 23 def deny(&block) statement Effect: :Deny, &block end |