1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Contains information about whether the stack's actual configuration differs, or has <i>drifted</i>, from its expected configuration, as defined in the stack template and any values specified as template parameters. A stack is considered to have drifted if one or more of its resources have drifted.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct StackDriftInformation {
/// <p>Status of the stack's actual configuration compared to its expected template configuration.</p>
/// <ul>
/// <li>
/// <p><code>DRIFTED</code>: The stack differs from its expected template configuration. A stack is considered to have drifted if one or more of its resources have drifted.</p></li>
/// <li>
/// <p><code>NOT_CHECKED</code>: CloudFormation hasn't checked if the stack differs from its expected template configuration.</p></li>
/// <li>
/// <p><code>IN_SYNC</code>: The stack's actual configuration matches its expected template configuration.</p></li>
/// <li>
/// <p><code>UNKNOWN</code>: This value is reserved for future use.</p></li>
/// </ul>
pub stack_drift_status: ::std::option::Option<crate::types::StackDriftStatus>,
/// <p>Most recent time when a drift detection operation was initiated on the stack, or any of its individual resources that support drift detection.</p>
pub last_check_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl StackDriftInformation {
/// <p>Status of the stack's actual configuration compared to its expected template configuration.</p>
/// <ul>
/// <li>
/// <p><code>DRIFTED</code>: The stack differs from its expected template configuration. A stack is considered to have drifted if one or more of its resources have drifted.</p></li>
/// <li>
/// <p><code>NOT_CHECKED</code>: CloudFormation hasn't checked if the stack differs from its expected template configuration.</p></li>
/// <li>
/// <p><code>IN_SYNC</code>: The stack's actual configuration matches its expected template configuration.</p></li>
/// <li>
/// <p><code>UNKNOWN</code>: This value is reserved for future use.</p></li>
/// </ul>
pub fn stack_drift_status(&self) -> ::std::option::Option<&crate::types::StackDriftStatus> {
self.stack_drift_status.as_ref()
}
/// <p>Most recent time when a drift detection operation was initiated on the stack, or any of its individual resources that support drift detection.</p>
pub fn last_check_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.last_check_timestamp.as_ref()
}
}
impl StackDriftInformation {
/// Creates a new builder-style object to manufacture [`StackDriftInformation`](crate::types::StackDriftInformation).
pub fn builder() -> crate::types::builders::StackDriftInformationBuilder {
crate::types::builders::StackDriftInformationBuilder::default()
}
}
/// A builder for [`StackDriftInformation`](crate::types::StackDriftInformation).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct StackDriftInformationBuilder {
pub(crate) stack_drift_status: ::std::option::Option<crate::types::StackDriftStatus>,
pub(crate) last_check_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl StackDriftInformationBuilder {
/// <p>Status of the stack's actual configuration compared to its expected template configuration.</p>
/// <ul>
/// <li>
/// <p><code>DRIFTED</code>: The stack differs from its expected template configuration. A stack is considered to have drifted if one or more of its resources have drifted.</p></li>
/// <li>
/// <p><code>NOT_CHECKED</code>: CloudFormation hasn't checked if the stack differs from its expected template configuration.</p></li>
/// <li>
/// <p><code>IN_SYNC</code>: The stack's actual configuration matches its expected template configuration.</p></li>
/// <li>
/// <p><code>UNKNOWN</code>: This value is reserved for future use.</p></li>
/// </ul>
/// This field is required.
pub fn stack_drift_status(mut self, input: crate::types::StackDriftStatus) -> Self {
self.stack_drift_status = ::std::option::Option::Some(input);
self
}
/// <p>Status of the stack's actual configuration compared to its expected template configuration.</p>
/// <ul>
/// <li>
/// <p><code>DRIFTED</code>: The stack differs from its expected template configuration. A stack is considered to have drifted if one or more of its resources have drifted.</p></li>
/// <li>
/// <p><code>NOT_CHECKED</code>: CloudFormation hasn't checked if the stack differs from its expected template configuration.</p></li>
/// <li>
/// <p><code>IN_SYNC</code>: The stack's actual configuration matches its expected template configuration.</p></li>
/// <li>
/// <p><code>UNKNOWN</code>: This value is reserved for future use.</p></li>
/// </ul>
pub fn set_stack_drift_status(mut self, input: ::std::option::Option<crate::types::StackDriftStatus>) -> Self {
self.stack_drift_status = input;
self
}
/// <p>Status of the stack's actual configuration compared to its expected template configuration.</p>
/// <ul>
/// <li>
/// <p><code>DRIFTED</code>: The stack differs from its expected template configuration. A stack is considered to have drifted if one or more of its resources have drifted.</p></li>
/// <li>
/// <p><code>NOT_CHECKED</code>: CloudFormation hasn't checked if the stack differs from its expected template configuration.</p></li>
/// <li>
/// <p><code>IN_SYNC</code>: The stack's actual configuration matches its expected template configuration.</p></li>
/// <li>
/// <p><code>UNKNOWN</code>: This value is reserved for future use.</p></li>
/// </ul>
pub fn get_stack_drift_status(&self) -> &::std::option::Option<crate::types::StackDriftStatus> {
&self.stack_drift_status
}
/// <p>Most recent time when a drift detection operation was initiated on the stack, or any of its individual resources that support drift detection.</p>
pub fn last_check_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.last_check_timestamp = ::std::option::Option::Some(input);
self
}
/// <p>Most recent time when a drift detection operation was initiated on the stack, or any of its individual resources that support drift detection.</p>
pub fn set_last_check_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.last_check_timestamp = input;
self
}
/// <p>Most recent time when a drift detection operation was initiated on the stack, or any of its individual resources that support drift detection.</p>
pub fn get_last_check_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.last_check_timestamp
}
/// Consumes the builder and constructs a [`StackDriftInformation`](crate::types::StackDriftInformation).
pub fn build(self) -> crate::types::StackDriftInformation {
crate::types::StackDriftInformation {
stack_drift_status: self.stack_drift_status,
last_check_timestamp: self.last_check_timestamp,
}
}
}