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 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>The structure containing summary information about resource drifts for a stack instance.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct StackInstanceResourceDriftsSummary {
/// <p>The ID of the stack instance.</p>
pub stack_id: ::std::option::Option<::std::string::String>,
/// <p>The logical name of the resource specified in the template.</p>
pub logical_resource_id: ::std::option::Option<::std::string::String>,
/// <p>The name or unique identifier that corresponds to a physical instance ID of a resource supported by CloudFormation.</p>
pub physical_resource_id: ::std::option::Option<::std::string::String>,
/// <p>Context information that enables CloudFormation to uniquely identify a resource. CloudFormation uses context key-value pairs in cases where a resource's logical and physical IDs aren't enough to uniquely identify that resource. Each context key-value pair specifies a unique resource that contains the targeted resource.</p>
pub physical_resource_id_context: ::std::option::Option<::std::vec::Vec<crate::types::PhysicalResourceIdContextKeyValuePair>>,
/// <p>Type of resource. For more information, go to <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html">Amazon Web Services Resource Types Reference</a> in the <i>CloudFormation User Guide</i>.</p>
pub resource_type: ::std::option::Option<::std::string::String>,
/// <p>Status of the actual configuration of the resource compared to its expected configuration. These will be present only for resources whose <code>StackInstanceResourceDriftStatus</code> is <code>MODIFIED</code>.</p>
pub property_differences: ::std::option::Option<::std::vec::Vec<crate::types::PropertyDifference>>,
/// <p>The drift status of the resource in a stack instance.</p>
/// <ul>
/// <li>
/// <p><code>DELETED</code>: The resource differs from its expected template configuration in that the resource has been deleted.</p></li>
/// <li>
/// <p><code>MODIFIED</code>: One or more resource properties differ from their expected template values.</p></li>
/// <li>
/// <p><code>IN_SYNC</code>: The resource's actual configuration matches its expected template configuration.</p></li>
/// <li>
/// <p><code>NOT_CHECKED</code>: CloudFormation doesn't currently return this value.</p></li>
/// </ul>
pub stack_resource_drift_status: ::std::option::Option<crate::types::StackResourceDriftStatus>,
/// <p>Time at which the stack instance drift detection operation was initiated.</p>
pub timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl StackInstanceResourceDriftsSummary {
/// <p>The ID of the stack instance.</p>
pub fn stack_id(&self) -> ::std::option::Option<&str> {
self.stack_id.as_deref()
}
/// <p>The logical name of the resource specified in the template.</p>
pub fn logical_resource_id(&self) -> ::std::option::Option<&str> {
self.logical_resource_id.as_deref()
}
/// <p>The name or unique identifier that corresponds to a physical instance ID of a resource supported by CloudFormation.</p>
pub fn physical_resource_id(&self) -> ::std::option::Option<&str> {
self.physical_resource_id.as_deref()
}
/// <p>Context information that enables CloudFormation to uniquely identify a resource. CloudFormation uses context key-value pairs in cases where a resource's logical and physical IDs aren't enough to uniquely identify that resource. Each context key-value pair specifies a unique resource that contains the targeted resource.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.physical_resource_id_context.is_none()`.
pub fn physical_resource_id_context(&self) -> &[crate::types::PhysicalResourceIdContextKeyValuePair] {
self.physical_resource_id_context.as_deref().unwrap_or_default()
}
/// <p>Type of resource. For more information, go to <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html">Amazon Web Services Resource Types Reference</a> in the <i>CloudFormation User Guide</i>.</p>
pub fn resource_type(&self) -> ::std::option::Option<&str> {
self.resource_type.as_deref()
}
/// <p>Status of the actual configuration of the resource compared to its expected configuration. These will be present only for resources whose <code>StackInstanceResourceDriftStatus</code> is <code>MODIFIED</code>.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.property_differences.is_none()`.
pub fn property_differences(&self) -> &[crate::types::PropertyDifference] {
self.property_differences.as_deref().unwrap_or_default()
}
/// <p>The drift status of the resource in a stack instance.</p>
/// <ul>
/// <li>
/// <p><code>DELETED</code>: The resource differs from its expected template configuration in that the resource has been deleted.</p></li>
/// <li>
/// <p><code>MODIFIED</code>: One or more resource properties differ from their expected template values.</p></li>
/// <li>
/// <p><code>IN_SYNC</code>: The resource's actual configuration matches its expected template configuration.</p></li>
/// <li>
/// <p><code>NOT_CHECKED</code>: CloudFormation doesn't currently return this value.</p></li>
/// </ul>
pub fn stack_resource_drift_status(&self) -> ::std::option::Option<&crate::types::StackResourceDriftStatus> {
self.stack_resource_drift_status.as_ref()
}
/// <p>Time at which the stack instance drift detection operation was initiated.</p>
pub fn timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.timestamp.as_ref()
}
}
impl StackInstanceResourceDriftsSummary {
/// Creates a new builder-style object to manufacture [`StackInstanceResourceDriftsSummary`](crate::types::StackInstanceResourceDriftsSummary).
pub fn builder() -> crate::types::builders::StackInstanceResourceDriftsSummaryBuilder {
crate::types::builders::StackInstanceResourceDriftsSummaryBuilder::default()
}
}
/// A builder for [`StackInstanceResourceDriftsSummary`](crate::types::StackInstanceResourceDriftsSummary).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct StackInstanceResourceDriftsSummaryBuilder {
pub(crate) stack_id: ::std::option::Option<::std::string::String>,
pub(crate) logical_resource_id: ::std::option::Option<::std::string::String>,
pub(crate) physical_resource_id: ::std::option::Option<::std::string::String>,
pub(crate) physical_resource_id_context: ::std::option::Option<::std::vec::Vec<crate::types::PhysicalResourceIdContextKeyValuePair>>,
pub(crate) resource_type: ::std::option::Option<::std::string::String>,
pub(crate) property_differences: ::std::option::Option<::std::vec::Vec<crate::types::PropertyDifference>>,
pub(crate) stack_resource_drift_status: ::std::option::Option<crate::types::StackResourceDriftStatus>,
pub(crate) timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl StackInstanceResourceDriftsSummaryBuilder {
/// <p>The ID of the stack instance.</p>
/// This field is required.
pub fn stack_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.stack_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The ID of the stack instance.</p>
pub fn set_stack_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.stack_id = input;
self
}
/// <p>The ID of the stack instance.</p>
pub fn get_stack_id(&self) -> &::std::option::Option<::std::string::String> {
&self.stack_id
}
/// <p>The logical name of the resource specified in the template.</p>
/// This field is required.
pub fn logical_resource_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.logical_resource_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The logical name of the resource specified in the template.</p>
pub fn set_logical_resource_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.logical_resource_id = input;
self
}
/// <p>The logical name of the resource specified in the template.</p>
pub fn get_logical_resource_id(&self) -> &::std::option::Option<::std::string::String> {
&self.logical_resource_id
}
/// <p>The name or unique identifier that corresponds to a physical instance ID of a resource supported by CloudFormation.</p>
pub fn physical_resource_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.physical_resource_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The name or unique identifier that corresponds to a physical instance ID of a resource supported by CloudFormation.</p>
pub fn set_physical_resource_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.physical_resource_id = input;
self
}
/// <p>The name or unique identifier that corresponds to a physical instance ID of a resource supported by CloudFormation.</p>
pub fn get_physical_resource_id(&self) -> &::std::option::Option<::std::string::String> {
&self.physical_resource_id
}
/// Appends an item to `physical_resource_id_context`.
///
/// To override the contents of this collection use [`set_physical_resource_id_context`](Self::set_physical_resource_id_context).
///
/// <p>Context information that enables CloudFormation to uniquely identify a resource. CloudFormation uses context key-value pairs in cases where a resource's logical and physical IDs aren't enough to uniquely identify that resource. Each context key-value pair specifies a unique resource that contains the targeted resource.</p>
pub fn physical_resource_id_context(mut self, input: crate::types::PhysicalResourceIdContextKeyValuePair) -> Self {
let mut v = self.physical_resource_id_context.unwrap_or_default();
v.push(input);
self.physical_resource_id_context = ::std::option::Option::Some(v);
self
}
/// <p>Context information that enables CloudFormation to uniquely identify a resource. CloudFormation uses context key-value pairs in cases where a resource's logical and physical IDs aren't enough to uniquely identify that resource. Each context key-value pair specifies a unique resource that contains the targeted resource.</p>
pub fn set_physical_resource_id_context(
mut self,
input: ::std::option::Option<::std::vec::Vec<crate::types::PhysicalResourceIdContextKeyValuePair>>,
) -> Self {
self.physical_resource_id_context = input;
self
}
/// <p>Context information that enables CloudFormation to uniquely identify a resource. CloudFormation uses context key-value pairs in cases where a resource's logical and physical IDs aren't enough to uniquely identify that resource. Each context key-value pair specifies a unique resource that contains the targeted resource.</p>
pub fn get_physical_resource_id_context(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PhysicalResourceIdContextKeyValuePair>> {
&self.physical_resource_id_context
}
/// <p>Type of resource. For more information, go to <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html">Amazon Web Services Resource Types Reference</a> in the <i>CloudFormation User Guide</i>.</p>
/// This field is required.
pub fn resource_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.resource_type = ::std::option::Option::Some(input.into());
self
}
/// <p>Type of resource. For more information, go to <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html">Amazon Web Services Resource Types Reference</a> in the <i>CloudFormation User Guide</i>.</p>
pub fn set_resource_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.resource_type = input;
self
}
/// <p>Type of resource. For more information, go to <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html">Amazon Web Services Resource Types Reference</a> in the <i>CloudFormation User Guide</i>.</p>
pub fn get_resource_type(&self) -> &::std::option::Option<::std::string::String> {
&self.resource_type
}
/// Appends an item to `property_differences`.
///
/// To override the contents of this collection use [`set_property_differences`](Self::set_property_differences).
///
/// <p>Status of the actual configuration of the resource compared to its expected configuration. These will be present only for resources whose <code>StackInstanceResourceDriftStatus</code> is <code>MODIFIED</code>.</p>
pub fn property_differences(mut self, input: crate::types::PropertyDifference) -> Self {
let mut v = self.property_differences.unwrap_or_default();
v.push(input);
self.property_differences = ::std::option::Option::Some(v);
self
}
/// <p>Status of the actual configuration of the resource compared to its expected configuration. These will be present only for resources whose <code>StackInstanceResourceDriftStatus</code> is <code>MODIFIED</code>.</p>
pub fn set_property_differences(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PropertyDifference>>) -> Self {
self.property_differences = input;
self
}
/// <p>Status of the actual configuration of the resource compared to its expected configuration. These will be present only for resources whose <code>StackInstanceResourceDriftStatus</code> is <code>MODIFIED</code>.</p>
pub fn get_property_differences(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PropertyDifference>> {
&self.property_differences
}
/// <p>The drift status of the resource in a stack instance.</p>
/// <ul>
/// <li>
/// <p><code>DELETED</code>: The resource differs from its expected template configuration in that the resource has been deleted.</p></li>
/// <li>
/// <p><code>MODIFIED</code>: One or more resource properties differ from their expected template values.</p></li>
/// <li>
/// <p><code>IN_SYNC</code>: The resource's actual configuration matches its expected template configuration.</p></li>
/// <li>
/// <p><code>NOT_CHECKED</code>: CloudFormation doesn't currently return this value.</p></li>
/// </ul>
/// This field is required.
pub fn stack_resource_drift_status(mut self, input: crate::types::StackResourceDriftStatus) -> Self {
self.stack_resource_drift_status = ::std::option::Option::Some(input);
self
}
/// <p>The drift status of the resource in a stack instance.</p>
/// <ul>
/// <li>
/// <p><code>DELETED</code>: The resource differs from its expected template configuration in that the resource has been deleted.</p></li>
/// <li>
/// <p><code>MODIFIED</code>: One or more resource properties differ from their expected template values.</p></li>
/// <li>
/// <p><code>IN_SYNC</code>: The resource's actual configuration matches its expected template configuration.</p></li>
/// <li>
/// <p><code>NOT_CHECKED</code>: CloudFormation doesn't currently return this value.</p></li>
/// </ul>
pub fn set_stack_resource_drift_status(mut self, input: ::std::option::Option<crate::types::StackResourceDriftStatus>) -> Self {
self.stack_resource_drift_status = input;
self
}
/// <p>The drift status of the resource in a stack instance.</p>
/// <ul>
/// <li>
/// <p><code>DELETED</code>: The resource differs from its expected template configuration in that the resource has been deleted.</p></li>
/// <li>
/// <p><code>MODIFIED</code>: One or more resource properties differ from their expected template values.</p></li>
/// <li>
/// <p><code>IN_SYNC</code>: The resource's actual configuration matches its expected template configuration.</p></li>
/// <li>
/// <p><code>NOT_CHECKED</code>: CloudFormation doesn't currently return this value.</p></li>
/// </ul>
pub fn get_stack_resource_drift_status(&self) -> &::std::option::Option<crate::types::StackResourceDriftStatus> {
&self.stack_resource_drift_status
}
/// <p>Time at which the stack instance drift detection operation was initiated.</p>
/// This field is required.
pub fn timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.timestamp = ::std::option::Option::Some(input);
self
}
/// <p>Time at which the stack instance drift detection operation was initiated.</p>
pub fn set_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.timestamp = input;
self
}
/// <p>Time at which the stack instance drift detection operation was initiated.</p>
pub fn get_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.timestamp
}
/// Consumes the builder and constructs a [`StackInstanceResourceDriftsSummary`](crate::types::StackInstanceResourceDriftsSummary).
pub fn build(self) -> crate::types::StackInstanceResourceDriftsSummary {
crate::types::StackInstanceResourceDriftsSummary {
stack_id: self.stack_id,
logical_resource_id: self.logical_resource_id,
physical_resource_id: self.physical_resource_id,
physical_resource_id_context: self.physical_resource_id_context,
resource_type: self.resource_type,
property_differences: self.property_differences,
stack_resource_drift_status: self.stack_resource_drift_status,
timestamp: self.timestamp,
}
}
}