Class CfnWaitCondition
- All Implemented Interfaces:
IInspectable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
For Amazon EC2 and Auto Scaling resources, we recommend that you use a
CreationPolicy
attribute instead of wait conditions.
Add a CreationPolicy attribute to those resources, and use the cfn-signal helper script to signal when an instance creation process has completed successfully.
You can use a wait condition for situations like the following:
- To coordinate stack resource creation with configuration actions that are external to the stack creation.
- To track the status of a configuration process.
For these situations, we recommend that you associate a CreationPolicy attribute with the wait condition so that you don't have to use a wait condition handle. For more information and an example, see Creating wait conditions in a template . If you use a CreationPolicy with a wait condition, don't specify any of the wait condition's properties.
If you use the VPC endpoints feature, resources in the VPC that respond to wait conditions must have access to CloudFormation , specific Amazon Simple Storage Service ( Amazon S3 ) buckets. Resources must send wait condition responses to a presigned Amazon S3 URL. If they can't send responses to Amazon S3 , CloudFormation won't receive a response and the stack operation fails. For more information, see Setting up VPC endpoints for AWS CloudFormation .
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.*; CfnWaitCondition cfnWaitCondition = CfnWaitCondition.Builder.create(this, "MyCfnWaitCondition") .count(123) .handle("handle") .timeout("timeout") .build();
- See Also:
-
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.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionprotected
CfnWaitCondition
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnWaitCondition
(software.amazon.jsii.JsiiObjectRef objRef) CfnWaitCondition
(software.constructs.Construct scope, String id) CfnWaitCondition
(software.constructs.Construct scope, String id, CfnWaitConditionProps props) -
Method Summary
Modifier and TypeMethodDescriptiongetCount()
The number of success signals that CloudFormation must receive before it continues the stack creation process.A reference to the wait condition handle used to signal this wait condition.The length of time (in seconds) to wait for the number of signals that theCount
property specifies.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
The number of success signals that CloudFormation must receive before it continues the stack creation process.void
A reference to the wait condition handle used to signal this wait condition.void
setTimeout
(String value) The length of time (in seconds) to wait for the number of signals that theCount
property specifies.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.constructs.Construct
getNode, isConstruct
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.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnWaitCondition
protected CfnWaitCondition(software.amazon.jsii.JsiiObjectRef objRef) -
CfnWaitCondition
protected CfnWaitCondition(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnWaitCondition
@Stability(Stable) public CfnWaitCondition(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable CfnWaitConditionProps props) - Parameters:
scope
- Scope in which this resource is defined. This parameter is required.id
- Construct identifier for this resource (unique in its scope). This parameter is required.props
- Resource properties.
-
CfnWaitCondition
@Stability(Stable) public CfnWaitCondition(@NotNull software.constructs.Construct scope, @NotNull String id) - Parameters:
scope
- Scope in which this resource is defined. This parameter is required.id
- Construct identifier for this resource (unique in its scope). This parameter is required.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrData
-
getAttrId
-
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getCount
The number of success signals that CloudFormation must receive before it continues the stack creation process. -
setCount
The number of success signals that CloudFormation must receive before it continues the stack creation process. -
getHandle
A reference to the wait condition handle used to signal this wait condition. -
setHandle
A reference to the wait condition handle used to signal this wait condition. -
getTimeout
The length of time (in seconds) to wait for the number of signals that theCount
property specifies. -
setTimeout
The length of time (in seconds) to wait for the number of signals that theCount
property specifies.
-