Skip to content
v2.275.0

CDK CloudFormation Property Mixins ​

Version 2.275.0

Separate package

@aws-cdk/cfn-property-mixins is not part of aws-cdk-lib — install it separately:

sh
npm install @aws-cdk/cfn-property-mixins
pip install aws-cdk.cfn-property-mixins

cdk-constructs: Stable


Auto-generated, type-safe CDK Mixins for every CloudFormation resource property. These allow you to apply L1 properties to any construct (L1, L2, or custom) using the Mixins mechanism from aws-cdk-lib.

Usage ​

For every CloudFormation resource, this package provides a CfnXxxPropsMixin class. Apply it using .with() or Mixins.of():

ts
new s3.Bucket(scope, "MyBucket")
  .with(new CfnBucketPropsMixin({
    versioningConfiguration: { status: "Enabled" },
    publicAccessBlockConfiguration: {
      blockPublicAcls: true,
      blockPublicPolicy: true,
    },
  }));
python
s3.Bucket(scope, "MyBucket").with(CfnBucketPropsMixin(
    versioning_configuration=CfnBucketPropsMixin.VersioningConfigurationProperty(status="Enabled"),
    public_access_block_configuration=CfnBucketPropsMixin.PublicAccessBlockConfigurationProperty(
        block_public_acls=True,
        block_public_policy=True
    )
))
java
new Bucket(scope, "MyBucket").with(CfnBucketPropsMixin.Builder.create()
        .versioningConfiguration(VersioningConfigurationProperty.builder().status("Enabled").build())
        .publicAccessBlockConfiguration(PublicAccessBlockConfigurationProperty.builder()
                .blockPublicAcls(true)
                .blockPublicPolicy(true)
                .build())
        .build());
csharp
new Bucket(scope, "MyBucket").With(new CfnBucketPropsMixin(new CfnBucketMixinProps {
    VersioningConfiguration = new VersioningConfigurationProperty { Status = "Enabled" },
    PublicAccessBlockConfiguration = new PublicAccessBlockConfigurationProperty {
        BlockPublicAcls = true,
        BlockPublicPolicy = true
    }
}));
go
s3.NewBucket(scope, jsii.String("MyBucket")).With(awscdkcfnpropertymixins.NewCfnBucketPropsMixin(&CfnBucketMixinProps{
	VersioningConfiguration: &VersioningConfigurationProperty{
		Status: jsii.String("Enabled"),
	},
	PublicAccessBlockConfiguration: &PublicAccessBlockConfigurationProperty{
		BlockPublicAcls: jsii.Boolean(true),
		BlockPublicPolicy: jsii.Boolean(true),
	},
}))

Cross-Service References ​

Deeply nested properties support cross-service references:

ts
const myKey = new kms.Key(scope, "MyKey");

new s3.Bucket(scope, "EncryptedBucket")
  .with(new CfnBucketPropsMixin({
    bucketEncryption: {
      serverSideEncryptionConfiguration: [{
        serverSideEncryptionByDefault: {
          sseAlgorithm: "aws:kms",
          kmsMasterKeyId: myKey,
        },
      }],
    },
  }));
python
my_key = kms.Key(scope, "MyKey")

s3.Bucket(scope, "EncryptedBucket").with(CfnBucketPropsMixin(
    bucket_encryption=CfnBucketPropsMixin.BucketEncryptionProperty(
        server_side_encryption_configuration=[CfnBucketPropsMixin.ServerSideEncryptionRuleProperty(
            server_side_encryption_by_default=CfnBucketPropsMixin.ServerSideEncryptionByDefaultProperty(
                sse_algorithm="aws:kms",
                kms_master_key_id=my_key
            )
        )]
    )
))
java
Key myKey = new Key(scope, "MyKey");

new Bucket(scope, "EncryptedBucket").with(CfnBucketPropsMixin.Builder.create()
        .bucketEncryption(BucketEncryptionProperty.builder()
                .serverSideEncryptionConfiguration(List.of(ServerSideEncryptionRuleProperty.builder()
                        .serverSideEncryptionByDefault(ServerSideEncryptionByDefaultProperty.builder()
                                .sseAlgorithm("aws:kms")
                                .kmsMasterKeyId(myKey)
                                .build())
                        .build()))
                .build())
        .build());
csharp
var myKey = new Key(scope, "MyKey");

new Bucket(scope, "EncryptedBucket").With(new CfnBucketPropsMixin(new CfnBucketMixinProps {
    BucketEncryption = new BucketEncryptionProperty {
        ServerSideEncryptionConfiguration = new [] { new ServerSideEncryptionRuleProperty {
            ServerSideEncryptionByDefault = new ServerSideEncryptionByDefaultProperty {
                SseAlgorithm = "aws:kms",
                KmsMasterKeyId = myKey
            }
        } }
    }
}));
go
myKey := kms.NewKey(scope, jsii.String("MyKey"))

s3.NewBucket(scope, jsii.String("EncryptedBucket")).With(awscdkcfnpropertymixins.NewCfnBucketPropsMixin(&CfnBucketMixinProps{
	BucketEncryption: &BucketEncryptionProperty{
		ServerSideEncryptionConfiguration: []interface{}{
			&ServerSideEncryptionRuleProperty{
				ServerSideEncryptionByDefault: &ServerSideEncryptionByDefaultProperty{
					SseAlgorithm: jsii.String("aws:kms"),
					KmsMasterKeyId: myKey,
				},
			},
		},
	},
}))

Merge Strategies ​

When a mixin is applied, its properties are merged onto the target resource using a merge strategy. The strategy controls what happens when both the mixin and the existing resource define the same property.

There are two built-in strategies:

PropertyMergeStrategy.combine() (default) ​

Deep merges nested objects from the mixin into the target. When both the existing and new value for a property are plain objects, their keys are merged recursively — existing keys are preserved and new keys are added. Primitives, arrays, and mismatched types are replaced by the mixin value.

This is useful when you want to add configuration without losing what's already set:

ts
const combineBucket = new s3.CfnBucket(scope, "CombineBucket");
combineBucket.publicAccessBlockConfiguration = { blockPublicAcls: true };

// Adds blockPublicPolicy while preserving the existing blockPublicAcls
combineBucket.with(new CfnBucketPropsMixin({
  publicAccessBlockConfiguration: { blockPublicPolicy: true },
}));
// Result: { blockPublicAcls: true, blockPublicPolicy: true }
python
combine_bucket = s3.CfnBucket(scope, "CombineBucket")
combine_bucket.public_access_block_configuration = s3.CfnBucket.PublicAccessBlockConfigurationProperty(block_public_acls=True)

# Adds blockPublicPolicy while preserving the existing blockPublicAcls
combine_bucket.with(CfnBucketPropsMixin(
    public_access_block_configuration=CfnBucketPropsMixin.PublicAccessBlockConfigurationProperty(block_public_policy=True)
))
java
CfnBucket combineBucket = new CfnBucket(scope, "CombineBucket");
combineBucket.getPublicAccessBlockConfiguration() = PublicAccessBlockConfigurationProperty.builder().blockPublicAcls(true).build();

// Adds blockPublicPolicy while preserving the existing blockPublicAcls
combineBucket.with(CfnBucketPropsMixin.Builder.create()
        .publicAccessBlockConfiguration(PublicAccessBlockConfigurationProperty.builder().blockPublicPolicy(true).build())
        .build());
csharp
var combineBucket = new CfnBucket(scope, "CombineBucket");
combineBucket.PublicAccessBlockConfiguration = new PublicAccessBlockConfigurationProperty { BlockPublicAcls = true };

// Adds blockPublicPolicy while preserving the existing blockPublicAcls
combineBucket.With(new CfnBucketPropsMixin(new CfnBucketMixinProps {
    PublicAccessBlockConfiguration = new PublicAccessBlockConfigurationProperty { BlockPublicPolicy = true }
}));
go
combineBucket := s3.NewCfnBucket(scope, jsii.String("CombineBucket"))
combineBucket.publicAccessBlockConfiguration = &PublicAccessBlockConfigurationProperty{
	BlockPublicAcls: jsii.Boolean(true),
}

// Adds blockPublicPolicy while preserving the existing blockPublicAcls
combineBucket.With(awscdkcfnpropertymixins.NewCfnBucketPropsMixin(&CfnBucketMixinProps{
	PublicAccessBlockConfiguration: &PublicAccessBlockConfigurationProperty{
		BlockPublicPolicy: jsii.Boolean(true),
	},
}))

PropertyMergeStrategy.override() ​

Replaces existing property values with the mixin values. Each property is copied as-is without inspecting nested objects. Any previous value on the target is discarded.

This is useful when you want to fully replace a configuration:

ts
const overrideBucket = new s3.CfnBucket(scope, "OverrideBucket");
overrideBucket.publicAccessBlockConfiguration = { blockPublicAcls: true };

// Replaces the entire publicAccessBlockConfiguration
overrideBucket.with(new CfnBucketPropsMixin(
  { publicAccessBlockConfiguration: { blockPublicPolicy: true } },
  { strategy: PropertyMergeStrategy.override() },
));
// Result: { blockPublicPolicy: true } — blockPublicAcls is gone
python
from aws_cdk.cfn_property_mixins.aws_s3 import CfnBucketMixinProps
override_bucket = s3.CfnBucket(scope, "OverrideBucket")
override_bucket.public_access_block_configuration = s3.CfnBucket.PublicAccessBlockConfigurationProperty(block_public_acls=True)

# Replaces the entire publicAccessBlockConfiguration
override_bucket.with(CfnBucketPropsMixin(CfnBucketMixinProps(public_access_block_configuration=CfnBucketPropsMixin.PublicAccessBlockConfigurationProperty(block_public_policy=True)), strategy=PropertyMergeStrategy.override()))
java
CfnBucket overrideBucket = new CfnBucket(scope, "OverrideBucket");
overrideBucket.getPublicAccessBlockConfiguration() = PublicAccessBlockConfigurationProperty.builder().blockPublicAcls(true).build();

// Replaces the entire publicAccessBlockConfiguration
overrideBucket.with(CfnBucketPropsMixin.Builder.create(CfnBucketMixinProps.builder().publicAccessBlockConfiguration(PublicAccessBlockConfigurationProperty.builder().blockPublicPolicy(true).build()).build()).strategy(PropertyMergeStrategy.override()).build());
csharp
var overrideBucket = new CfnBucket(scope, "OverrideBucket");
overrideBucket.PublicAccessBlockConfiguration = new PublicAccessBlockConfigurationProperty { BlockPublicAcls = true };

// Replaces the entire publicAccessBlockConfiguration
overrideBucket.With(new CfnBucketPropsMixin(new CfnBucketMixinProps { PublicAccessBlockConfiguration = new PublicAccessBlockConfigurationProperty { BlockPublicPolicy = true } }, new CfnPropertyMixinOptions { Strategy = PropertyMergeStrategy.Override() }));
go
overrideBucket := s3.NewCfnBucket(scope, jsii.String("OverrideBucket"))
overrideBucket.publicAccessBlockConfiguration = &PublicAccessBlockConfigurationProperty{
	BlockPublicAcls: jsii.Boolean(true),
}

// Replaces the entire publicAccessBlockConfiguration
overrideBucket.With(awscdkcfnpropertymixins.NewCfnBucketPropsMixin(&CfnBucketMixinProps{
	PublicAccessBlockConfiguration: &PublicAccessBlockConfigurationProperty{
		BlockPublicPolicy: jsii.Boolean(true),
	},
}, &CfnPropertyMixinOptions{
	Strategy: awscdk.PropertyMergeStrategy_Override(),
}))

Custom Strategies ​

You can implement IMergeStrategy to define your own merge behavior. The apply method receives the target object, source object, and an allowlist of property keys:

ts
class ArrayAppendStrategy implements IMergeStrategy {
  public apply(target: any, source: any, allowedKeys: string[]) {
    for (const key of allowedKeys) {
      if (key in source) {
        if (Array.isArray(target[key])) {
          // append to target
          target[key] = target[key].concat(source[key]);
        } else {
          // override
          target[key] = source[key];
        }
      }
    }
  }
}
python
@jsii.implements(IMergeStrategy)
class ArrayAppendStrategy:
    def apply(self, target, source, allowed_keys):
        for key in allowed_keys:
            if key in source:
                if Array.is_array(target[key]):
                    # append to target
                    target[key] = target[key].concat(source[key])
                else:
                    # override
                    target[key] = source[key]
java
public class ArrayAppendStrategy implements IMergeStrategy {
    public void apply(Object target, Object source, String[] allowedKeys) {
        for (Object key : allowedKeys) {
            if (key in source) {
                if (Array.isArray(target[key])) {
                    // append to target
                    target[key] = target[key].concat(source[key]);
                } else {
                    // override
                    target[key] = source[key];
                }
            }
        }
    }
}
csharp
class ArrayAppendStrategy : IMergeStrategy
{
    public void Apply(object target, object source, string[] allowedKeys)
    {
        for (var key in allowedKeys)
        {
            if (key in source)
            {
                if (Array.IsArray(target[key]))
                {
                    // append to target
                    target[key] = target[key].Concat(source[key]);
                }
                else
                {
                    // override
                    target[key] = source[key];
                }
            }
        }
    }
}
go
type arrayAppendStrategy struct {
}

func (this *arrayAppendStrategy) apply(target interface{}, source interface{}, allowedKeys []*string) {
	for _, key := range *allowedKeys {
		if key in *source {
			if array.isArray(*target[key]) {
				// append to target
				*target[key] = *target[key].concat(*source[key])
			} else {
				// override
				*target[key] = *source[key]
			}
		}
	}
}

Deferred Values (Boxes) ​

Property mixins support Box-backed values. Most L2 constructs in aws-cdk-lib use Boxes internally to defer property computation until synthesis time. When a mixin encounters a Box on the target, the merge is automatically deferred — the merge strategy runs once the Box resolves, ensuring it operates on final values.

This means mixins work correctly with L2 constructs that use Boxes for properties like replicas, rules, or tags, without any special handling from the user:

ts
// TableV2 uses a Box internally for replicas.
// The mixin defers the merge and appends the new replica at synthesis time.
const table = new dynamodb.TableV2(scope, 'Table', {
  partitionKey: { name: 'pk', type: dynamodb.AttributeType.STRING },
  // L2 prop: pointInTimeRecovery is a boolean
  replicas: [{ region: 'us-east-1', pointInTimeRecovery: true }],
});

// Mixins always use L1 (CloudFormation) property names and shapes,
// regardless of what the L2 API looks like.
table.with(new CfnGlobalTablePropsMixin({
  replicas: [{
    region: 'eu-west-1',
    // L1 prop: pointInTimeRecoverySpecification is an object
    pointInTimeRecoverySpecification: { pointInTimeRecoveryEnabled: true },
  }],
}, { strategy: PropertyMergeStrategy.combine({ arrays: ArrayMergeStrategy.append() }) }));

// Result (synthesized CloudFormation):
// Replicas:
//   - Region: us-east-1
//     PointInTimeRecoverySpecification:
//       PointInTimeRecoveryEnabled: true
//   - Region: us-west-2        <-- primary region, added by L2
//   - Region: eu-west-1        <-- added by mixin
//     PointInTimeRecoverySpecification:
//       PointInTimeRecoveryEnabled: true
python
from aws_cdk.cfn_property_mixins.aws_dynamodb import CfnGlobalTableMixinProps
# TableV2 uses a Box internally for replicas.
# The mixin defers the merge and appends the new replica at synthesis time.
table = dynamodb.TableV2(scope, "Table",
    partition_key=dynamodb.Attribute(name="pk", type=dynamodb.AttributeType.STRING),
    # L2 prop: pointInTimeRecovery is a boolean
    replicas=[dynamodb.ReplicaTableProps(region="us-east-1", point_in_time_recovery=True)]
)

# Mixins always use L1 (CloudFormation) property names and shapes,
# regardless of what the L2 API looks like.
table.with(CfnGlobalTablePropsMixin(CfnGlobalTableMixinProps(
    replicas=[CfnGlobalTablePropsMixin.ReplicaSpecificationProperty(
        region="eu-west-1",
        # L1 prop: pointInTimeRecoverySpecification is an object
        point_in_time_recovery_specification=CfnGlobalTablePropsMixin.PointInTimeRecoverySpecificationProperty(point_in_time_recovery_enabled=True)
    )]
), strategy=PropertyMergeStrategy.combine(arrays=ArrayMergeStrategy.append())))
java
// TableV2 uses a Box internally for replicas.
// The mixin defers the merge and appends the new replica at synthesis time.
TableV2 table = TableV2.Builder.create(scope, "Table")
        .partitionKey(Attribute.builder().name("pk").type(AttributeType.STRING).build())
        // L2 prop: pointInTimeRecovery is a boolean
        .replicas(List.of(ReplicaTableProps.builder().region("us-east-1").pointInTimeRecovery(true).build()))
        .build();

// Mixins always use L1 (CloudFormation) property names and shapes,
// regardless of what the L2 API looks like.
table.with(CfnGlobalTablePropsMixin.Builder.create(CfnGlobalTableMixinProps.builder()
        .replicas(List.of(ReplicaSpecificationProperty.builder()
                .region("eu-west-1")
                // L1 prop: pointInTimeRecoverySpecification is an object
                .pointInTimeRecoverySpecification(PointInTimeRecoverySpecificationProperty.builder().pointInTimeRecoveryEnabled(true).build())
                .build()))
        .build()).strategy(PropertyMergeStrategy.combine(CombineStrategyOptions.builder().arrays(ArrayMergeStrategy.append()).build())).build());
csharp
// TableV2 uses a Box internally for replicas.
// The mixin defers the merge and appends the new replica at synthesis time.
var table = new TableV2(scope, "Table", new TablePropsV2 {
    PartitionKey = new Attribute { Name = "pk", Type = AttributeType.STRING },
    // L2 prop: pointInTimeRecovery is a boolean
    Replicas = new [] { new ReplicaTableProps { Region = "us-east-1", PointInTimeRecovery = true } }
});

// Mixins always use L1 (CloudFormation) property names and shapes,
// regardless of what the L2 API looks like.
table.With(new CfnGlobalTablePropsMixin(new CfnGlobalTableMixinProps {
    Replicas = new [] { new ReplicaSpecificationProperty {
        Region = "eu-west-1",
        // L1 prop: pointInTimeRecoverySpecification is an object
        PointInTimeRecoverySpecification = new PointInTimeRecoverySpecificationProperty { PointInTimeRecoveryEnabled = true }
    } }
}, new CfnPropertyMixinOptions { Strategy = PropertyMergeStrategy.Combine(new CombineStrategyOptions { Arrays = ArrayMergeStrategy.Append() }) }));
go
// TableV2 uses a Box internally for replicas.
// The mixin defers the merge and appends the new replica at synthesis time.
table := dynamodb.NewTableV2(scope, jsii.String("Table"), &TablePropsV2{
	PartitionKey: &Attribute{
		Name: jsii.String("pk"),
		Type: dynamodb.AttributeType_STRING,
	},
	// L2 prop: pointInTimeRecovery is a boolean
	Replicas: []ReplicaTableProps{
		&ReplicaTableProps{
			Region: jsii.String("us-east-1"),
			PointInTimeRecovery: jsii.Boolean(true),
		},
	},
})

// Mixins always use L1 (CloudFormation) property names and shapes,
// regardless of what the L2 API looks like.
table.With(awscdkcfnpropertymixins.NewCfnGlobalTablePropsMixin(&CfnGlobalTableMixinProps{
	Replicas: []interface{}{
		&ReplicaSpecificationProperty{
			Region: jsii.String("eu-west-1"),
			// L1 prop: pointInTimeRecoverySpecification is an object
			PointInTimeRecoverySpecification: &PointInTimeRecoverySpecificationProperty{
				PointInTimeRecoveryEnabled: jsii.Boolean(true),
			},
		},
	},
}, &CfnPropertyMixinOptions{
	Strategy: awscdk.PropertyMergeStrategy_Combine(&CombineStrategyOptions{
		Arrays: awscdk.ArrayMergeStrategy_Append(),
	}),
}))

Most L2 constructs in aws-cdk-lib use Boxes or Lazys internally to defer property computation until synthesis time. Property mixins detect these automatically and defer the merge until the value resolves, so the merge strategy always operates on final values — no special handling is needed from the user. The only case where merging cannot be deferred is a raw Token that is not backed by a Box. This is very rare in the AWS Construct Library, but may occur in third-party packages. If you encounter a construct where merging doesn't work as expected, please open an issue so we can investigate.

CloudFormation Property Mixins for Every Service ​

This package provides auto-generated property mixins for every CloudFormation resource across all AWS services. Each service has its own submodule that mirrors the aws-cdk-lib module structure. Import the mixin for the resource you want to configure from the corresponding service submodule:

ts
import { CfnBucketPropsMixin } from '@aws-cdk/cfn-property-mixins/aws-s3';
import { CfnFunctionPropsMixin } from '@aws-cdk/cfn-property-mixins/aws-lambda';
import { CfnTablePropsMixin } from '@aws-cdk/cfn-property-mixins/aws-dynamodb';
import { CfnLogGroupPropsMixin } from '@aws-cdk/cfn-property-mixins/aws-logs';
import { CfnDistributionPropsMixin } from '@aws-cdk/cfn-property-mixins/aws-cloudfront';
import { CfnDBInstancePropsMixin } from '@aws-cdk/cfn-property-mixins/aws-rds';
python
from aws_cdk.cfn_property_mixins.aws_s3 import CfnBucketPropsMixin
from aws_cdk.cfn_property_mixins.aws_lambda import CfnFunctionPropsMixin
from aws_cdk.cfn_property_mixins.aws_dynamodb import CfnTablePropsMixin
from aws_cdk.cfn_property_mixins.aws_logs import CfnLogGroupPropsMixin
from aws_cdk.cfn_property_mixins.aws_cloudfront import CfnDistributionPropsMixin
from aws_cdk.cfn_property_mixins.aws_rds import CfnDBInstancePropsMixin
java
import software.amazon.awscdk.cfnpropertymixins.services.s3.CfnBucketPropsMixin;
import software.amazon.awscdk.cfnpropertymixins.services.lambda.CfnFunctionPropsMixin;
import software.amazon.awscdk.cfnpropertymixins.services.dynamodb.CfnTablePropsMixin;
import software.amazon.awscdk.cfnpropertymixins.services.logs.CfnLogGroupPropsMixin;
import software.amazon.awscdk.cfnpropertymixins.services.cloudfront.CfnDistributionPropsMixin;
import software.amazon.awscdk.cfnpropertymixins.services.rds.CfnDBInstancePropsMixin;
csharp
using Amazon.CDK.CfnPropertyMixins.AWS.S3;
using Amazon.CDK.CfnPropertyMixins.AWS.Lambda;
using Amazon.CDK.CfnPropertyMixins.AWS.DynamoDB;
using Amazon.CDK.CfnPropertyMixins.AWS.Logs;
using Amazon.CDK.CfnPropertyMixins.AWS.CloudFront;
using Amazon.CDK.CfnPropertyMixins.AWS.RDS;
go
import "github.com/aws/aws-cdk-go/awscdkcfnpropertymixins"
import "github.com/aws/aws-cdk-go/awscdkcfnpropertymixins"
import "github.com/aws/aws-cdk-go/awscdkcfnpropertymixins"
import "github.com/aws/aws-cdk-go/awscdkcfnpropertymixins"
import "github.com/aws/aws-cdk-go/awscdkcfnpropertymixins"
import "github.com/aws/aws-cdk-go/awscdkcfnpropertymixins"

The naming convention follows a consistent pattern: for a CloudFormation resource AWS::S3::Bucket, the mixin class is CfnBucketPropsMixin and lives in the aws-s3 submodule. The mixin props interface is named CfnBucketMixinProps and all properties are optional, so you only need to specify the ones you want to set.

Property mixins work with any construct that has the target resource as its default child. This means you can apply them to L1 constructs, L2 constructs, and custom constructs alike:

ts
// L1 construct
new s3.CfnBucket(scope, "L1Bucket")
  .with(new CfnBucketPropsMixin({ versioningConfiguration: { status: "Enabled" } }));

// L2 construct — the mixin finds the CfnBucket default child
new s3.Bucket(scope, "L2Bucket")
  .with(new CfnBucketPropsMixin({ versioningConfiguration: { status: "Enabled" } }));
python
# L1 construct
s3.CfnBucket(scope, "L1Bucket").with(CfnBucketPropsMixin(versioning_configuration=CfnBucketPropsMixin.VersioningConfigurationProperty(status="Enabled")))

# L2 construct — the mixin finds the CfnBucket default child
s3.Bucket(scope, "L2Bucket").with(CfnBucketPropsMixin(versioning_configuration=CfnBucketPropsMixin.VersioningConfigurationProperty(status="Enabled")))
java
// L1 construct
// L1 construct
new CfnBucket(scope, "L1Bucket").with(CfnBucketPropsMixin.Builder.create().versioningConfiguration(VersioningConfigurationProperty.builder().status("Enabled").build()).build());

// L2 construct — the mixin finds the CfnBucket default child
// L2 construct — the mixin finds the CfnBucket default child
new Bucket(scope, "L2Bucket").with(CfnBucketPropsMixin.Builder.create().versioningConfiguration(VersioningConfigurationProperty.builder().status("Enabled").build()).build());
csharp
// L1 construct
// L1 construct
new CfnBucket(scope, "L1Bucket").With(new CfnBucketPropsMixin(new CfnBucketMixinProps { VersioningConfiguration = new VersioningConfigurationProperty { Status = "Enabled" } }));

// L2 construct — the mixin finds the CfnBucket default child
// L2 construct — the mixin finds the CfnBucket default child
new Bucket(scope, "L2Bucket").With(new CfnBucketPropsMixin(new CfnBucketMixinProps { VersioningConfiguration = new VersioningConfigurationProperty { Status = "Enabled" } }));
go
// L1 construct
// L1 construct
s3.NewCfnBucket(scope, jsii.String("L1Bucket")).With(awscdkcfnpropertymixins.NewCfnBucketPropsMixin(&CfnBucketMixinProps{
	VersioningConfiguration: &VersioningConfigurationProperty{
		Status: jsii.String("Enabled"),
	},
}))

// L2 construct — the mixin finds the CfnBucket default child
// L2 construct — the mixin finds the CfnBucket default child
s3.NewBucket(scope, jsii.String("L2Bucket")).With(awscdkcfnpropertymixins.NewCfnBucketPropsMixin(&CfnBucketMixinProps{
	VersioningConfiguration: &VersioningConfigurationProperty{
		Status: jsii.String("Enabled"),
	},
}))

Types ​

NameKindSummary