Package software.amazon.awscdk.core
Class CfnCondition
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.core.Construct
software.amazon.awscdk.core.CfnElement
software.amazon.awscdk.core.CfnCondition
- All Implemented Interfaces:
ICfnConditionExpression,IConstruct,IDependable,IResolvable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:29:54.832Z")
@Stability(Stable)
public class CfnCondition
extends CfnElement
implements ICfnConditionExpression, IResolvable
Represents a CloudFormation condition, for resources which must be conditionally created and the determination must be made at deploy time.
Example:
CfnBucket rawBucket = CfnBucket.Builder.create(this, "Bucket").build();
// -or-
CfnBucket rawBucketAlt = (CfnBucket)myBucket.getNode().getDefaultChild();
// then
rawBucket.getCfnOptions().getCondition() = CfnCondition.Builder.create(this, "EnableBucket").build();
rawBucket.getCfnOptions().getMetadata() = Map.of(
"metadataKey", "MetadataValue");
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.core.ICfnConditionExpression
ICfnConditionExpression.Jsii$Default, ICfnConditionExpression.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.core.IResolvable
IResolvable.Jsii$Default, IResolvable.Jsii$Proxy -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnCondition(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnCondition(software.amazon.jsii.JsiiObjectRef objRef) CfnCondition(software.constructs.Construct scope, String id) Build a new condition.CfnCondition(software.constructs.Construct scope, String id, CfnConditionProps props) Build a new condition. -
Method Summary
Modifier and TypeMethodDescriptionThe condition statement.resolve(IResolveContext _context) Synthesizes the condition.voidThe condition statement.Methods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods inherited from class software.constructs.Construct
toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.awscdk.core.IResolvable
getCreationStack, toStringMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
CfnCondition
protected CfnCondition(software.amazon.jsii.JsiiObjectRef objRef) -
CfnCondition
protected CfnCondition(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnCondition
@Stability(Stable) public CfnCondition(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable CfnConditionProps props) Build a new condition.The condition must be constructed with a condition token, that the condition is based on.
- Parameters:
scope- This parameter is required.id- This parameter is required.props-
-
CfnCondition
@Stability(Stable) public CfnCondition(@NotNull software.constructs.Construct scope, @NotNull String id) Build a new condition.The condition must be constructed with a condition token, that the condition is based on.
- Parameters:
scope- This parameter is required.id- This parameter is required.
-
-
Method Details
-
resolve
Synthesizes the condition.- Specified by:
resolvein interfaceIResolvable- Parameters:
_context- This parameter is required.
-
getExpression
The condition statement. -
setExpression
The condition statement.
-