pub enum CfnResponse {
    Success {
        request_id: String,
        logical_resource_id: String,
        stack_id: String,
        physical_resource_id: String,
        no_echo: Option<bool>,
        data: Option<Value>,
    },
    Failed {
        reason: String,
        request_id: String,
        logical_resource_id: String,
        stack_id: String,
        physical_resource_id: String,
    },
}
Expand description

This enum represents the response expected by AWS CloudFormation to a custom resource modification request (see CfnRequest). It is serializable into the required JSON form, such that it can be sent to the pre-signed S3 response-URL provided by AWS CloudFormation without further modification.

This type should always be constructed from a CfnRequest using CfnRequest::into_response such that the response-fields are pre-filled with the expected values.

License attribution

The documentation for the fields of the CfnResponse enum-variants has been taken unmodified from the AWS CloudFormation Custom Resource Reference, which is licensed under CC BY-SA 4.0.

Variants§

§

Success

Fields

§request_id: String

A unique ID for the request. This response value should be copied verbatim from the request.

§logical_resource_id: String

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.

§stack_id: String

The Amazon Resource Name (ARN) that identifies the stack that contains the custom resource. This response value should be copied verbatim from the request.

§physical_resource_id: String

This value should be an identifier unique to the custom resource vendor, and can be up to 1 Kb in size. The value must be a non-empty string and must be identical for all responses for the same resource.

§no_echo: Option<bool>

Optional. Indicates whether to mask the output of the custom resource when retrieved by using the Fn::GetAtt function. If set to true, all returned values are masked with asterisks (*****). The default value is false.

§data: Option<Value>

Optional. The custom resource provider-defined name-value pairs to send with the response. You can access the values provided here by name in the template with Fn::GetAtt.

Indicates that the modification of the custom resource finished successfully.

This can return data which the AWS CloudFormation template can interact with through the use of Fn::GetAtt.

§

Failed

Fields

§reason: String

Describes the reason for a failure response.

§request_id: String

A unique ID for the request. This response value should be copied verbatim from the request.

§logical_resource_id: String

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.

§stack_id: String

The Amazon Resource Name (ARN) that identifies the stack that contains the custom resource. This response value should be copied verbatim from the request.

§physical_resource_id: String

This value should be an identifier unique to the custom resource vendor, and can be up to 1 Kb in size. The value must be a non-empty string and must be identical for all responses for the same resource.

Indicates that the modification of the custom resource failed.

A reason for this failure will be provided.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.