[][src]Enum cfn_resource_provider::CfnResponse

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,
    },
}

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

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.

Fields of Success

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.

Failed

Indicates that the modification of the custom resource failed.

A reason for this failure will be provided.

Fields of Failed

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.

Trait Implementations

impl Clone for CfnResponse[src]

impl Debug for CfnResponse[src]

impl PartialEq<CfnResponse> for CfnResponse[src]

impl Serialize for CfnResponse[src]

impl StructuralPartialEq for CfnResponse[src]

Auto Trait Implementations

impl RefUnwindSafe for CfnResponse

impl Send for CfnResponse

impl Sync for CfnResponse

impl Unpin for CfnResponse

impl UnwindSafe for CfnResponse

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err