Interface IResourcePolicyFactory
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Subinterfaces:
IResourcePolicyFactory.Jsii$Default
- All Known Implementing Classes:
IResourcePolicyFactory.Jsii$Proxy
@Generated(value="jsii-pacmak/1.126.0 (build 206d44b)",
date="2026-02-23T18:58:20.362Z")
@Stability(Stable)
public interface IResourcePolicyFactory
extends software.amazon.jsii.JsiiSerializable
Factory interface for creating IResourceWithPolicyV2 instances from constructs.
Implementations of this interface are registered in the DefaultPolicyFactories registry and enable automatic resource policy support for CloudFormation resources. When a grant operation is performed, the factory converts L1 constructs into resources that support resource-based policies.
Factories are typically registered during static initialization and associated with specific CloudFormation resource types (e.g., 'AWS::DynamoDB::Table'). The CDK's grant system uses these factories to determine whether a resource supports resource policies and to create the appropriate wrapper when needed.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceInternal default implementation forIResourcePolicyFactory.static final classA proxy class which represents a concrete javascript instance of this type. -
Method Summary
Modifier and TypeMethodDescriptionforResource(CfnResource resource) Create an IResourceWithPolicyV2 from a construct.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
forResource
Create an IResourceWithPolicyV2 from a construct.- Parameters:
resource- the construct to be wrapped as an IResourceWithPolicyV2. This parameter is required.
-