CfnResourceSignal Struct
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.
Example
ts
declare const resource: CfnResource;
resource.cfnOptions.creationPolicy = {
resourceSignal: {
count: 3,
timeout: 'PR15M',
}
};
python
from aws_cdk import CfnCreationPolicy, CfnResourceSignal
# resource: CfnResource
resource.cfn_options.creation_policy = CfnCreationPolicy(
resource_signal=CfnResourceSignal(
count=3,
timeout="PR15M"
)
)
java
CfnResource resource;
resource.getCfnOptions().getCreationPolicy() = CfnCreationPolicy.builder()
.resourceSignal(CfnResourceSignal.builder()
.count(3)
.timeout("PR15M")
.build())
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
CfnResource resource;
resource.CfnOptions.CreationPolicy = new CfnCreationPolicy {
ResourceSignal = new CfnResourceSignal {
Count = 3,
Timeout = "PR15M"
}
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
var resource CfnResource
resource.CfnOptions.CreationPolicy = &CfnCreationPolicy{
ResourceSignal: &CfnResourceSignal{
Count: jsii.Number(3),
Timeout: jsii.String("PR15M"),
},
}
Properties
countoptionalnumbercountoptionalint | floatcountoptionalNumberCountoptionaldoubleCountoptional*float64#The number of success signals AWS CloudFormation must receive before it sets the resource status as CREATE_COMPLETE.
If the resource receives a failure signal or doesn't receive the specified number of signals before the timeout period expires, the resource creation fails and AWS CloudFormation rolls the stack back.
timeoutoptionalstringtimeoutoptionalstrtimeoutoptionalStringTimeoutoptionalstringTimeoutoptional*string#The length of time that AWS CloudFormation waits for the number of signals that was specified in the Count property.
The timeout period starts after AWS CloudFormation starts creating the resource, and the timeout expires no sooner than the time you specify but can occur shortly thereafter. The maximum time that you can specify is 12 hours.