This topic describes response fields of custom resources.
Response header for a custom resource provider
The response header must contain the following fields:
- Content-type: Set the value to
"application/json"
. - Date: the request time in GMT format. Example:
"Tue, 26 Nov 2019 08:46:44 GMT"
.
Response fields for a custom resource provider
A custom resource provider includes the following properties when it sends the JSON file to the presigned URL (ResponseURL or InnerResponseURL).
The total size of the response body cannot exceed 4,096 bytes.
- Status
- The status value sent by the custom resource provider in response to a request generated by ROS.
- The value must be either SUCCESS or FAILED.
- Required: yes.
- Type: string.
- Reason
- The reason for a failure response.
- Valid only when the Status field is set to FAILED.
- Required only when the Status field is set to FAILED. Otherwise, it is optional.
- Type: string.
- PhysicalResourceId
- An identifier unique to the custom resource provider. The value can be up to 255 bytes in size. The value cannot be an empty string and must be identical for all responses for the same resource.
- Valid only when the Status field is set to SUCCESS. This response value must be passed when you create a stack that contains a custom resource. This response value must be copied from the request when you update or delete a stack that contains a custom resource.
- Required only when the Status field is set to SUCCESS. Otherwise, it is optional.
- Type: string.
- StackId
- The ID that identifies the stack that contains the custom resource. This response value must be copied from the request.
- Required: yes.
- Type: string.
- RequestId
- The unique ID of the request. This response value must be copied from the request.
- Required: yes.
- Type: string.
- LogicalResourceId
- The name (logical ID) selected by the template developer for the custom resource in the ROS template. This response value must be copied from the request.
- Required: yes.
- Type: string.
- Data
- Optional. The custom resource provider-defined name-value pairs to send with the response. You can use Fn::GetAtt to access the values provided here by name in the template.
- Required: no.
- Type: JSON object.