interface CombineStrategyOptions
| Language | Type name |
|---|---|
.NET | Amazon.CDK.CombineStrategyOptions |
Go | github.com/aws/aws-cdk-go/awscdk/v2#CombineStrategyOptions |
Java | software.amazon.awscdk.CombineStrategyOptions |
Python | aws_cdk.CombineStrategyOptions |
TypeScript (source) | aws-cdk-lib » CombineStrategyOptions |
Options for the combine strategy.
Example
// 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
Properties
| Name | Type | Description |
|---|---|---|
| arrays? | IArray | Strategy for merging arrays. |
arrays?
Type:
IArray
(optional, default: ArrayMergeStrategy.replace())
Strategy for merging arrays.

.NET
Go
Java
Python
TypeScript (