Skip to main content

CustomResourceEvent

Enum CustomResourceEvent 

Source
pub enum CustomResourceEvent<T> {
    Create(CloudformationPayload<T>),
    Update(CloudformationPayload<T>),
    Delete(CloudformationPayload<T>),
}
Expand description

Defines an event payload that is sent to a lambda function by AWS Cloud Formation. This payload is defined by AWS as the following:

{
  "RequestType" : "Delete",
  "RequestId" : "unique id for this delete request",
  "ResponseURL" : "pre-signed-url-for-delete-response",
  "ResourceType" : "Custom::MyCustomResourceType",
  "LogicalResourceId" : "name of resource in template",
  "StackId" : "arn:aws:cloudformation:us-east-2:namespace:stack/stack-name/guid",
  "PhysicalResourceId" : "custom resource provider-defined physical id",
  "ResourceProperties" : {
     "key1" : "string",
     "key2" : [ "list" ],
     "key3" : { "key4" : "map" }
  }
}

The entire payload is the same for each custom resource except for the ResourceProperties section, so that is available as a generic type for which we are able to create the schema for the resource properties on your own.

Variants§

§

Create(CloudformationPayload<T>)

Defines a cloudformation payload that happens on a create of the resource.

§

Update(CloudformationPayload<T>)

Defines a cloudforamtion payload that happens on ab update to the resource.

§

Delete(CloudformationPayload<T>)

Defines a cloudforamtion payload that happens on the deletion the resource.

Trait Implementations§

Source§

impl<T: Debug> Debug for CustomResourceEvent<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de, T> Deserialize<'de> for CustomResourceEvent<T>
where T: Deserialize<'de>,

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<T: PartialEq> PartialEq for CustomResourceEvent<T>

Source§

fn eq(&self, other: &CustomResourceEvent<T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T> StructuralPartialEq for CustomResourceEvent<T>

Auto Trait Implementations§

§

impl<T> Freeze for CustomResourceEvent<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for CustomResourceEvent<T>
where T: RefUnwindSafe,

§

impl<T> Send for CustomResourceEvent<T>
where T: Send,

§

impl<T> Sync for CustomResourceEvent<T>
where T: Sync,

§

impl<T> Unpin for CustomResourceEvent<T>
where T: Unpin,

§

impl<T> UnsafeUnpin for CustomResourceEvent<T>
where T: UnsafeUnpin,

§

impl<T> UnwindSafe for CustomResourceEvent<T>
where T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

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

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,