@Generated(value="jsii-pacmak/1.58.0 (build f8ba112)",
date="2022-05-20T22:19:52.915Z")
public interface CfnCreationPolicy
To signal a resource, you can use the cfn-signal helper script or SignalResource API. AWS CloudFormation publishes valid signals to the stack events so that you track the number of signals sent.
The creation policy is invoked only when AWS CloudFormation creates the associated resource. Currently, the only AWS CloudFormation resources that support creation policies are AWS::AutoScaling::AutoScalingGroup, AWS::EC2::Instance, and AWS::CloudFormation::WaitCondition.
Use the CreationPolicy attribute when you want to wait on resource configuration actions before stack creation proceeds. For example, if you install and configure software applications on an EC2 instance, you might want those applications to be running before proceeding. In such cases, you can add a CreationPolicy attribute to the instance, and then send a success signal to the instance after the applications are installed and configured. For a detailed example, see Deploying Applications on Amazon EC2 with 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.core.*; CfnCreationPolicy cfnCreationPolicy = CfnCreationPolicy.builder() .autoScalingCreationPolicy(CfnResourceAutoScalingCreationPolicy.builder() .minSuccessfulInstancesPercent(123) .build()) .resourceSignal(CfnResourceSignal.builder() .count(123) .timeout("timeout") .build()) .build();
Modifier and Type | Interface and Description |
---|---|
static class |
CfnCreationPolicy.Builder
A builder for
CfnCreationPolicy |
static class |
CfnCreationPolicy.Jsii$Proxy
An implementation for
CfnCreationPolicy |
Modifier and Type | Method and Description |
---|---|
static CfnCreationPolicy.Builder |
builder() |
default CfnResourceAutoScalingCreationPolicy |
getAutoScalingCreationPolicy()
For an Auto Scaling group replacement update, specifies how many instances must signal success for the update to succeed.
|
default CfnResourceSignal |
getResourceSignal()
When AWS CloudFormation creates the associated resource, configures the number of required success signals and the length of time that AWS CloudFormation waits for those signals.
|
default CfnResourceAutoScalingCreationPolicy getAutoScalingCreationPolicy()
default CfnResourceSignal getResourceSignal()
static CfnCreationPolicy.Builder builder()
CfnCreationPolicy.Builder
of CfnCreationPolicy