Module: AWSCDK::IAM::IResourceWithPolicyV2
- Includes:
- AWSCDK::Interfaces::IEnvironmentAware
- Included in:
- IResourceWithPolicy
- Defined in:
- iam/i_resource_with_policy_v2.rb
Overview
A resource with a resource policy that can be added to.
Class Method Summary collapse
Instance Method Summary collapse
-
#add_to_resource_policy(statement) ⇒ AWSCDK::IAM::AddToResourcePolicyResult
Add a statement to the resource's resource policy.
-
#env ⇒ AWSCDK::Interfaces::ResourceEnvironment
The environment this resource belongs to.
Class Method Details
.jsii_overridable_methods ⇒ Object
32 33 34 35 36 37 |
# File 'iam/i_resource_with_policy_v2.rb', line 32 def self.jsii_overridable_methods { :env => { kind: :property, name: "env", is_optional: false }, :add_to_resource_policy => { kind: :method, name: "addToResourcePolicy", is_optional: false }, } end |
Instance Method Details
#add_to_resource_policy(statement) ⇒ AWSCDK::IAM::AddToResourcePolicyResult
Add a statement to the resource's resource policy.
27 28 29 30 |
# File 'iam/i_resource_with_policy_v2.rb', line 27 def add_to_resource_policy(statement) Jsii::Type.check_type(statement, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLlBvbGljeVN0YXRlbWVudCJ9")), "statement") jsii_call_method("addToResourcePolicy", [statement]) end |
#env ⇒ AWSCDK::Interfaces::ResourceEnvironment
The environment this resource belongs to.
For resources that are created and managed in a Stack (those created by
creating new class instances like new Role(), new Bucket(), etc.), this
is always the same as the environment of the stack they belong to.
For referenced resources (those obtained from referencing methods like
Role.fromRoleArn(), Bucket.fromBucketName(), etc.), they might be
different than the stack they were imported into.
19 20 21 |
# File 'iam/i_resource_with_policy_v2.rb', line 19 def env() jsii_get_property("env") end |