Class CfnWaitCondition
For Amazon EC2 and Auto Scaling resources, we recommend that you use a
CreationPolicy
attribute instead of wait conditions.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.CloudFormation
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnWaitCondition : CfnResource, IInspectable
Syntax (vb)
Public Class CfnWaitCondition
Inherits CfnResource
Implements IInspectable
Remarks
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
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.CloudFormation;
var cfnWaitCondition = new CfnWaitCondition(this, "MyCfnWaitCondition", new CfnWaitConditionProps {
Count = 123,
Handle = "handle",
Timeout = "timeout"
});
Synopsis
Constructors
CfnWaitCondition(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnWaitCondition(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
CfnWaitCondition(Construct, String, ICfnWaitConditionProps) |
Properties
AttrData | |
AttrId | |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
Count | The number of success signals that CloudFormation must receive before it continues the stack creation process. |
Handle | A reference to the wait condition handle used to signal this wait condition. |
Timeout | The length of time (in seconds) to wait for the number of signals that the |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnWaitCondition(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnWaitCondition(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnWaitCondition(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnWaitCondition(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
CfnWaitCondition(Construct, String, ICfnWaitConditionProps)
public CfnWaitCondition(Construct scope, string id, ICfnWaitConditionProps props = null)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnWaitConditionProps
Resource properties.
Properties
AttrData
public virtual IResolvable AttrData { get; }
Property Value
Remarks
CloudformationAttribute: Data
AttrId
public virtual string AttrId { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Id
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
Count
The number of success signals that CloudFormation must receive before it continues the stack creation process.
public virtual Nullable<double> Count { get; set; }
Property Value
System.Nullable<System.Double>
Handle
A reference to the wait condition handle used to signal this wait condition.
public virtual string Handle { get; set; }
Property Value
System.String
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
System.String
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 System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>