ResourceWithPolicies

class aws_cdk.aws_iam.ResourceWithPolicies

Bases: object

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.

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_iam as iam

resource_with_policies = iam.ResourceWithPolicies()

Static Methods

classmethod of(resource)

Retrieve the IResourceWithPolicyV2 associated with a construct, if available.

Parameters:

resource (IEnvironmentAware)

Return type:

Optional[IResourceWithPolicyV2]

classmethod register(scope, cfn_type, factory)

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

Parameters:
Return type:

None