Class CfnWaitCondition

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-07-12T19:33:56.297Z") @Stability(Stable) public class CfnWaitCondition extends CfnResource implements IInspectable

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:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String 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

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      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 class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrData

      @Stability(Stable) @NotNull public IResolvable getAttrData()
    • getAttrId

      @Stability(Stable) @NotNull public String getAttrId()
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getCount

      @Stability(Stable) @Nullable public Number getCount()
      The number of success signals that CloudFormation must receive before it continues the stack creation process.
    • setCount

      @Stability(Stable) public void setCount(@Nullable Number value)
      The number of success signals that CloudFormation must receive before it continues the stack creation process.
    • getHandle

      @Stability(Stable) @Nullable public String getHandle()
      A reference to the wait condition handle used to signal this wait condition.
    • setHandle

      @Stability(Stable) public void setHandle(@Nullable String value)
      A reference to the wait condition handle used to signal this wait condition.
    • getTimeout

      @Stability(Stable) @Nullable public String getTimeout()
      The length of time (in seconds) to wait for the number of signals that the Count property specifies.
    • setTimeout

      @Stability(Stable) public void setTimeout(@Nullable String value)
      The length of time (in seconds) to wait for the number of signals that the Count property specifies.