Enum cloudformatious::ApplyError [−][src]
pub enum ApplyError { CloudFormationApi(Box<dyn Error>), CreateChangeSetFailed { id: String, status: ChangeSetStatus, status_reason: String, }, Failure { stack_id: String, stack_status: StackStatus, stack_status_reason: String, resource_events: Vec<(ResourceStatus, StackEventDetails)>, }, Warning { output: ApplyOutput, resource_events: Vec<(ResourceStatus, StackEventDetails)>, }, }
Errors emitted by an apply
operation.
Variants
A CloudFormation API error occurred.
This is likely to be due to invalid input parameters or missing CloudFormation permissions. The inner error should have a descriptive message.
Note: the inner error will always be some variant of RusotoError
, but since they are
generic over the type of service errors we either need a variant per API used, or Box
. If
you do need to programmatically match a particular API error you can use Box::downcast
.
The change set failed to create.
Change sets are created asynchronously and may settle in a FAILED
state. Trying to execute
a FAILED
change set will fail (who would have guessed). This error includes details of the
failing change set to help diagnose errors.
Show fields
Fields of CreateChangeSetFailed
id: String
The id of the failed change set.
status: ChangeSetStatus
The status of the failed change set.
status_reason: String
The reason the change set failed to create.
The apply operation failed.
This error tries to capture enough information to quickly identify the root-cause of the operation’s failure (such as not having permission to create or update a particular resource in the stack).
Show fields
Fields of Failure
stack_id: String
The ID of the stack.
stack_status: StackStatus
The failed status in which the stack settled.
stack_status_reason: String
The first reason the stack moved into a failing state.
Note that this is not the reason associated with the current stack_status
, but rather
the reason for the first negative status the stack entered (which is usually more
descriptive).
resource_events: Vec<(ResourceStatus, StackEventDetails)>
Resource events with negative statuses that may have precipitated the failure of the operation.
Note: this is represented as a Vec
or tuples to avoid having to worry about
matching StackEvent
variants (when it would be a logical error for them to be
anything other than the Resource
variant).
The apply operation succeeded with warnings.
It is possible for resource errors to occur even when the overall operation succeeds, such
as failing to delete a resource during clean-up after a successful update. Rather than
letting this pass silently, or relying on carefully interrogating StackEvent
s, the
operation returns an error.
Note that the error includes the ApplyOutput
, since the stack did settle into a
successful status. If you don’t care about non-critical resource errors you can use this to
simply map this variant away:
let result = Err(ApplyError::Warning { output, resource_events }); result.or_else(|error| { if let ApplyError::Warning { output, .. } = error { Ok(output) } else { Err(error) } })?;
Show fields
Fields of Warning
output: ApplyOutput
The operation output.
resource_events: Vec<(ResourceStatus, StackEventDetails)>
Resource events with negative statuses that did not affect the overall operation.
Note: this is represented as a Vec
or tuples to avoid having to worry about
matching StackEvent
variants (when it would be a logical error for them to be
anything other than the Resource
variant).
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for ApplyError
impl !RefUnwindSafe for ApplyError
impl !Send for ApplyError
impl !Send for ApplyError
impl !Sync for ApplyError
impl !Sync for ApplyError
impl Unpin for ApplyError
impl Unpin for ApplyError
impl !UnwindSafe for ApplyError
impl !UnwindSafe for ApplyError
Blanket Implementations
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
Should always be Self