Class: AWSCDK::IAM::ResourceWithPolicies

Inherits:
Jsii::Object
  • Object
show all
Defined in:
iam/resource_with_policies.rb

Overview

Utility class for discovering and managing resource policy traits.

This class provides methods to retrieve IResourceWithPolicyV2 instances from constructs, enabling resource-based policy management during IAM grant operations.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeResourceWithPolicies

Returns a new instance of ResourceWithPolicies.



11
12
13
# File 'iam/resource_with_policies.rb', line 11

def initialize
  Jsii::Object.instance_method(:initialize).bind(self).call
end

Class Method Details

.jsii_overridable_methodsObject



15
16
17
18
# File 'iam/resource_with_policies.rb', line 15

def self.jsii_overridable_methods
  {
  }
end

.of(resource) ⇒ AWSCDK::IAM::IResourceWithPolicyV2?

Retrieve the IResourceWithPolicyV2 associated with a construct, if available.



24
25
26
27
# File 'iam/resource_with_policies.rb', line 24

def self.of(resource)
  Jsii::Type.check_type(resource, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLklFbnZpcm9ubWVudEF3YXJlIn0=")), "resource")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_iam.ResourceWithPolicies", "of", [resource])
end

.register(scope, cfn_type, factory) ⇒ void

This method returns an undefined value.

Register a factory for a specific CloudFormation resource type and scope.

Parameters:



35
36
37
38
39
40
# File 'iam/resource_with_policies.rb', line 35

def self.register(scope, cfn_type, factory)
  Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLklDb25zdHJ1Y3QifQ==")), "scope")
  Jsii::Type.check_type(cfn_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "cfnType")
  Jsii::Type.check_type(factory, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSZXNvdXJjZVBvbGljeUZhY3RvcnkifQ==")), "factory")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_iam.ResourceWithPolicies", "register", [scope, cfn_type, factory])
end