@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:37.031Z") @Stability(value=Stable) public class CfnWaitCondition extends CfnResource implements IInspectable
For Amazon EC2 and Auto Scaling resources, we recommend that you use a
CreationPolicyattribute 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:
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.services.cloudformation.*;
CfnWaitCondition cfnWaitCondition = CfnWaitCondition.Builder.create(this, "MyCfnWaitCondition")
.count(123)
.handle("handle")
.timeout("timeout")
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
CfnWaitCondition.Builder
A fluent builder for
CfnWaitCondition. |
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnWaitCondition(software.constructs.Construct scope,
String id)
Create a new `AWS::CloudFormation::WaitCondition`.
|
|
CfnWaitCondition(software.constructs.Construct scope,
String id,
CfnWaitConditionProps props)
Create a new `AWS::CloudFormation::WaitCondition`.
|
protected |
CfnWaitCondition(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnWaitCondition(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
IResolvable |
getAttrData()
A JSON object that contains the `UniqueId` and `Data` values from the wait condition signal(s) for the specified wait condition.
|
protected Map<String,Object> |
getCfnProperties() |
Number |
getCount()
The number of success signals that CloudFormation must receive before it continues the stack creation process.
|
String |
getHandle()
A reference to the wait condition handle used to signal this wait condition.
|
String |
getTimeout()
The length of time (in seconds) to wait for the number of signals that the `Count` property specifies.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setCount(Number value)
The number of success signals that CloudFormation must receive before it continues the stack creation process.
|
void |
setHandle(String value)
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 the `Count` property specifies.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnWaitCondition(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnWaitCondition(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnWaitCondition(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@Nullable
CfnWaitConditionProps props)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.props - - resource properties.@Stability(value=Stable)
public CfnWaitCondition(@NotNull
software.constructs.Construct scope,
@NotNull
String id)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull public IResolvable getAttrData()
For more information about wait condition signals, see Wait condition signal JSON format .
Example return value for a wait condition with 2 signals:
{ "Signal1" : "Step 1 complete." , "Signal2" : "Step 2 complete." }
@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @Nullable public Number getCount()
When the wait condition receives the requisite number of success signals, CloudFormation resumes the creation of the stack. If the wait condition doesn't receive the specified number of success signals before the Timeout period expires, CloudFormation assumes that the wait condition has failed and rolls the stack back.
Updates aren't supported.
@Stability(value=Stable)
public void setCount(@Nullable
Number value)
When the wait condition receives the requisite number of success signals, CloudFormation resumes the creation of the stack. If the wait condition doesn't receive the specified number of success signals before the Timeout period expires, CloudFormation assumes that the wait condition has failed and rolls the stack back.
Updates aren't supported.
@Stability(value=Stable) @Nullable public String getHandle()
Use the Ref intrinsic function to specify an AWS::CloudFormation::WaitConditionHandle resource.
Anytime you add a WaitCondition resource during a stack update, you must associate the wait condition with a new WaitConditionHandle resource. Don't reuse an old wait condition handle that has already been defined in the template. If you reuse a wait condition handle, the wait condition might evaluate old signals from a previous create or update stack command.
Updates aren't supported.
@Stability(value=Stable)
public void setHandle(@Nullable
String value)
Use the Ref intrinsic function to specify an AWS::CloudFormation::WaitConditionHandle resource.
Anytime you add a WaitCondition resource during a stack update, you must associate the wait condition with a new WaitConditionHandle resource. Don't reuse an old wait condition handle that has already been defined in the template. If you reuse a wait condition handle, the wait condition might evaluate old signals from a previous create or update stack command.
Updates aren't supported.
@Stability(value=Stable) @Nullable public String getTimeout()
Timeout is a minimum-bound property, meaning the timeout occurs no sooner than the time you specify, but can occur shortly thereafter. The maximum time that can be specified for this property is 12 hours (43200 seconds).
Updates aren't supported.
@Stability(value=Stable)
public void setTimeout(@Nullable
String value)
Timeout is a minimum-bound property, meaning the timeout occurs no sooner than the time you specify, but can occur shortly thereafter. The maximum time that can be specified for this property is 12 hours (43200 seconds).
Updates aren't supported.
Copyright © 2022. All rights reserved.