DefaultPolicyFactories Class
Default factories for resources with policies.
Example
ts
// 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();
python
# 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
default_policy_factories = iam.DefaultPolicyFactories()
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.iam.*;
DefaultPolicyFactories defaultPolicyFactories = new DefaultPolicyFactories();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.IAM;
var defaultPolicyFactories = new DefaultPolicyFactories();
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
defaultPolicyFactories := awscdk.Aws_iam.NewDefaultPolicyFactories()
Initializer
ts
new DefaultPolicyFactories()
python
DefaultPolicyFactories()
java
new DefaultPolicyFactories()
csharp
new DefaultPolicyFactories()
go
NewDefaultPolicyFactories()
Methods
get(type: string): IResourcePolicyFactory@staticmethod def get(type: str) -> IResourcePolicyFactorypublic static IResourcePolicyFactory get(String type)public static IResourcePolicyFactory Get(string type)func Get(Type *string) IResourcePolicyFactorystatic#Get the default factory for a given CloudFormation resource type.
1 parameter
Parameters
typetypetypetypeType— the CloudFormation resource type (e.g., 'AWS::DynamoDB::Table').
has(type: string): boolean@staticmethod def has(type: str) -> boolpublic static Boolean has(String type)public static bool Has(string type)func Has(Type *string) *boolstatic#Check if a default factory is registered for a given CloudFormation resource type.
1 parameter
Parameters
typetypetypetypeType— the CloudFormation resource type (e.g., 'AWS::DynamoDB::Table').
set(type: string, factory: IResourcePolicyFactory): void@staticmethod def set(type: str, factory: IResourcePolicyFactory) -> Nonepublic static void set(String type, IResourcePolicyFactory factory)public static void Set(string type, IResourcePolicyFactory factory)func Set(Type *string, Factory IResourcePolicyFactory)static#Register a default factory for a given CloudFormation resource type.
2 parameters
Parameters
typetypetypetypeType— the CloudFormation resource type (e.g., 'AWS::DynamoDB::Table').factoryfactoryfactoryfactoryFactory— the factory to register for this resource type.