class DefaultPolicyFactories
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.IAM.DefaultPolicyFactories |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsiam#DefaultPolicyFactories |
Java | software.amazon.awscdk.services.iam.DefaultPolicyFactories |
Python | aws_cdk.aws_iam.DefaultPolicyFactories |
TypeScript (source) | aws-cdk-lib » aws_iam » DefaultPolicyFactories |
Default factories for resources with policies.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_iam as iam } from 'aws-cdk-lib';
const defaultPolicyFactories = new iam.DefaultPolicyFactories();
Initializer
new DefaultPolicyFactories()
Methods
| Name | Description |
|---|---|
| static get(type) | Get the default factory for a given CloudFormation resource type. |
| static has(type) | Check if a default factory is registered for a given CloudFormation resource type. |
| static set(type, factory) | Register a default factory for a given CloudFormation resource type. |
static get(type)
public static get(type: string): IResourcePolicyFactory
Parameters
- type
string— the CloudFormation resource type (e.g., 'AWS::DynamoDB::Table').
Returns
Get the default factory for a given CloudFormation resource type.
static has(type)
public static has(type: string): boolean
Parameters
- type
string— the CloudFormation resource type (e.g., 'AWS::DynamoDB::Table').
Returns
boolean
Check if a default factory is registered for a given CloudFormation resource type.
static set(type, factory)
public static set(type: string, factory: IResourcePolicyFactory): void
Parameters
- type
string— the CloudFormation resource type (e.g., 'AWS::DynamoDB::Table'). - factory
IResource— the factory to register for this resource type.Policy Factory
Register a default factory for a given CloudFormation resource type.

.NET
Go
Java
Python
TypeScript (