aws-cdk-lib.CfnConditionProps

interface CfnConditionProps

LanguageType name
.NETAmazon.CDK.CfnConditionProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2#CfnConditionProps
Javasoftware.amazon.awscdk.CfnConditionProps
Pythonaws_cdk.CfnConditionProps
TypeScript (source)aws-cdk-lib » CfnConditionProps

Example

const rawBucket = new s3.CfnBucket(this, 'Bucket', { /* ... */ });
// -or-
const rawBucketAlt = myBucket.node.defaultChild as s3.CfnBucket;

// then
rawBucket.cfnOptions.condition = new CfnCondition(this, 'EnableBucket', { /* ... */ });
rawBucket.cfnOptions.metadata = {
  metadataKey: 'MetadataValue',
};

Properties

NameTypeDescription
expression?ICfnConditionExpressionThe expression that the condition will evaluate.

expression?

Type: ICfnConditionExpression (optional, default: None.)

The expression that the condition will evaluate.