Class CfnWaitCondition
A CloudFormation AWS::CloudFormation::WaitCondition
.
public class CfnWaitCondition : CfnResource, IConstruct, IConstruct, IDependable, IInspectable
- Inheritance
-
CfnWaitCondition
- Implements
-
IConstruct
- Inherited Members
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
var cfnWaitCondition = new CfnWaitCondition(this, "MyCfnWaitCondition", new CfnWaitConditionProps {
Count = 123,
Handle = "handle",
Timeout = "timeout"
});
Remarks
For Amazon EC2 and Auto Scaling resources, we recommend that you use a <code>CreationPolicy</code> 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:
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 <a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-endpoints.html">VPC endpoints</a> 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 <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-vpce-bucketnames.html">Setting up VPC endpoints for AWS CloudFormation</a> .
CloudformationResource: AWS::CloudFormation::WaitCondition
Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-waitcondition.html
ExampleMetadata: fixture=_generated
Constructors
CfnWaitCondition(Construct, string, ICfnWaitConditionProps?)
Create a new AWS::CloudFormation::WaitCondition
.
public CfnWaitCondition(Construct scope, string id, ICfnWaitConditionProps? props = null)
Parameters
scope
Construct- scope in which this resource is defined.
id
string- scoped id of the resource.
props
ICfnWaitConditionProps- resource properties.
Properties
AttrData
A JSON object that contains the UniqueId
and Data
values from the wait condition signal(s) for the specified wait condition.
public virtual IResolvable AttrData { get; }
Property Value
Remarks
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." }
CloudformationAttribute: Data
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
Count
The number of success signals that CloudFormation must receive before it continues the stack creation process.
public virtual double? Count { get; set; }
Property Value
Remarks
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.
Handle
A reference to the wait condition handle used to signal this wait condition.
public virtual string? Handle { get; set; }
Property Value
Remarks
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.
Timeout
The length of time (in seconds) to wait for the number of signals that the Count
property specifies.
public virtual string? Timeout { get; set; }
Property Value
Remarks
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.
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
inspector
TreeInspector- tree inspector to collect and process attributes.
RenderProperties(IDictionary<string, object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
props
IDictionary<string, object>