| « PreviousNext » | |
![]() ![]() ![]() | Did this page help you? Yes | No | Tell us about it... |
Custom resource provider requests with RequestType set to "Delete" are sent
when the template developer deletes a stack that contains a custom resource.
Delete requests contain the following fields:
Will be "Delete".
A unique ID for the request.
The response URL identifies a pre-signed Amazon S3 bucket that receives responses from the custom resource provider to AWS CloudFormation.
The template developer-chosen name (logical ID) of the custom resource in the AWS CloudFormation template.
The Amazon Resource Name (ARN) that identifies the stack containing the custom resource.
A required custom resource provider-defined physical ID that is unique for that provider.
This field contains the contents of the Properties object sent by the template developer. Its contents are defined by the custom resource provider.
{
"RequestType" : "Delete",
"RequestId" : "unique id for this delete request",
"ResponseURL" : "pre-signed-url-for-delete-response",
"StackId" : "arn:aws:cloudformation:us-east-1:namespace:stack/stack-name/guid",
"LogicalResourceId" : "name of resource in template",
"PhysicalResourceId" : "custom resource provider-defined physical id",
"ResourceProperties" : {
"key1" : "string",
"key2" : [ "list" ],
"key3" : { "key4" : "map" }
}
} When the delete request is successful, a response must be sent to the S3 bucket with the following fields:
Must be "SUCCESS".
The template developer-chosen name (logical ID) of the custom resource in the AWS CloudFormation template. This response value should be copied verbatim from the request.
A unique ID for the request. This response value should be copied verbatim from the request.
The Amazon Resource Name (ARN) that identifies the stack containing the custom resource. This response value should be copied verbatim from the request.
This value should be an identifier unique to the custom resource vendor, and can be up to 1Kb in size.
{
"Status" : "SUCCESS",
"LogicalResourceId" : "name of resource in template (copied from request)",
"RequestId" : "unique id for this delete request (copied from request)",
"StackId" : "arn:aws:cloudformation:us-east-1:namespace:stack/stack-name/guid (copied from request)",
"PhysicalResourceId" : "custom resource provider-defined physical id"
} When the delete request fails, a response must be sent to the S3 bucket with the following fields:
Must be "FAILED".
The reason for the failure.
The LogicalResourceId value copied from the delete request.
The RequestId value copied from the delete request.
The StackId value copied from the delete request.
A required custom resource provider-defined physical ID that is unique for that provider.
{
"Status" : "FAILED",
"Reason" : "Required failure reason string",
"LogicalResourceId" : "name of resource in template (copied from request)",
"RequestId" : "unique id for this delete request (copied from request)",
"StackId" : "arn:aws:cloudformation:us-east-1:namespace:stack/stack-name/guid (copied from request)",
"PhysicalResourceId" : "custom resource provider-defined physical id"
}