Package software.amazon.awscdk
Class CfnCondition
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnCondition
- All Implemented Interfaces:
ICfnConditionExpression
,IResolvable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)",
date="2024-10-04T00:39:26.519Z")
@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 classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.ICfnConditionExpression
ICfnConditionExpression.Jsii$Default, ICfnConditionExpression.Jsii$Proxy
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IResolvable
IResolvable.Jsii$Default, IResolvable.Jsii$Proxy
-
Constructor Summary
ModifierConstructorDescriptionprotected
CfnCondition
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnCondition
(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.void
The condition statement.Methods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.constructs.Construct
getNode, isConstruct, toString
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.awscdk.IResolvable
getCreationStack, getTypeHint, toString
Methods 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:
resolve
in interfaceIResolvable
- Parameters:
_context
- This parameter is required.
-
getExpression
The condition statement. -
setExpression
The condition statement.
-