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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Contains high-level information about the specified stack resource.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct StackResourceSummary {
/// <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 the resource.</p>
pub physical_resource_id: ::std::option::Option<::std::string::String>,
/// <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>Time the status was updated.</p>
pub last_updated_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>Current status of the resource.</p>
pub resource_status: ::std::option::Option<crate::types::ResourceStatus>,
/// <p>Success/failure message associated with the resource.</p>
pub resource_status_reason: ::std::option::Option<::std::string::String>,
/// <p>Information about whether the resource'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. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html">Detecting Unregulated Configuration Changes to Stacks and Resources</a>.</p>
pub drift_information: ::std::option::Option<crate::types::StackResourceDriftInformationSummary>,
/// <p>Contains information about the module from which the resource was created, if the resource was created from a module included in the stack template.</p>
pub module_info: ::std::option::Option<crate::types::ModuleInfo>,
}
impl StackResourceSummary {
/// <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 the resource.</p>
pub fn physical_resource_id(&self) -> ::std::option::Option<&str> {
self.physical_resource_id.as_deref()
}
/// <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>Time the status was updated.</p>
pub fn last_updated_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.last_updated_timestamp.as_ref()
}
/// <p>Current status of the resource.</p>
pub fn resource_status(&self) -> ::std::option::Option<&crate::types::ResourceStatus> {
self.resource_status.as_ref()
}
/// <p>Success/failure message associated with the resource.</p>
pub fn resource_status_reason(&self) -> ::std::option::Option<&str> {
self.resource_status_reason.as_deref()
}
/// <p>Information about whether the resource'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. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html">Detecting Unregulated Configuration Changes to Stacks and Resources</a>.</p>
pub fn drift_information(&self) -> ::std::option::Option<&crate::types::StackResourceDriftInformationSummary> {
self.drift_information.as_ref()
}
/// <p>Contains information about the module from which the resource was created, if the resource was created from a module included in the stack template.</p>
pub fn module_info(&self) -> ::std::option::Option<&crate::types::ModuleInfo> {
self.module_info.as_ref()
}
}
impl StackResourceSummary {
/// Creates a new builder-style object to manufacture [`StackResourceSummary`](crate::types::StackResourceSummary).
pub fn builder() -> crate::types::builders::StackResourceSummaryBuilder {
crate::types::builders::StackResourceSummaryBuilder::default()
}
}
/// A builder for [`StackResourceSummary`](crate::types::StackResourceSummary).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct StackResourceSummaryBuilder {
pub(crate) logical_resource_id: ::std::option::Option<::std::string::String>,
pub(crate) physical_resource_id: ::std::option::Option<::std::string::String>,
pub(crate) resource_type: ::std::option::Option<::std::string::String>,
pub(crate) last_updated_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) resource_status: ::std::option::Option<crate::types::ResourceStatus>,
pub(crate) resource_status_reason: ::std::option::Option<::std::string::String>,
pub(crate) drift_information: ::std::option::Option<crate::types::StackResourceDriftInformationSummary>,
pub(crate) module_info: ::std::option::Option<crate::types::ModuleInfo>,
}
impl StackResourceSummaryBuilder {
/// <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 the resource.</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 the resource.</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 the resource.</p>
pub fn get_physical_resource_id(&self) -> &::std::option::Option<::std::string::String> {
&self.physical_resource_id
}
/// <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
}
/// <p>Time the status was updated.</p>
/// This field is required.
pub fn last_updated_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.last_updated_timestamp = ::std::option::Option::Some(input);
self
}
/// <p>Time the status was updated.</p>
pub fn set_last_updated_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.last_updated_timestamp = input;
self
}
/// <p>Time the status was updated.</p>
pub fn get_last_updated_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.last_updated_timestamp
}
/// <p>Current status of the resource.</p>
/// This field is required.
pub fn resource_status(mut self, input: crate::types::ResourceStatus) -> Self {
self.resource_status = ::std::option::Option::Some(input);
self
}
/// <p>Current status of the resource.</p>
pub fn set_resource_status(mut self, input: ::std::option::Option<crate::types::ResourceStatus>) -> Self {
self.resource_status = input;
self
}
/// <p>Current status of the resource.</p>
pub fn get_resource_status(&self) -> &::std::option::Option<crate::types::ResourceStatus> {
&self.resource_status
}
/// <p>Success/failure message associated with the resource.</p>
pub fn resource_status_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.resource_status_reason = ::std::option::Option::Some(input.into());
self
}
/// <p>Success/failure message associated with the resource.</p>
pub fn set_resource_status_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.resource_status_reason = input;
self
}
/// <p>Success/failure message associated with the resource.</p>
pub fn get_resource_status_reason(&self) -> &::std::option::Option<::std::string::String> {
&self.resource_status_reason
}
/// <p>Information about whether the resource'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. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html">Detecting Unregulated Configuration Changes to Stacks and Resources</a>.</p>
pub fn drift_information(mut self, input: crate::types::StackResourceDriftInformationSummary) -> Self {
self.drift_information = ::std::option::Option::Some(input);
self
}
/// <p>Information about whether the resource'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. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html">Detecting Unregulated Configuration Changes to Stacks and Resources</a>.</p>
pub fn set_drift_information(mut self, input: ::std::option::Option<crate::types::StackResourceDriftInformationSummary>) -> Self {
self.drift_information = input;
self
}
/// <p>Information about whether the resource'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. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html">Detecting Unregulated Configuration Changes to Stacks and Resources</a>.</p>
pub fn get_drift_information(&self) -> &::std::option::Option<crate::types::StackResourceDriftInformationSummary> {
&self.drift_information
}
/// <p>Contains information about the module from which the resource was created, if the resource was created from a module included in the stack template.</p>
pub fn module_info(mut self, input: crate::types::ModuleInfo) -> Self {
self.module_info = ::std::option::Option::Some(input);
self
}
/// <p>Contains information about the module from which the resource was created, if the resource was created from a module included in the stack template.</p>
pub fn set_module_info(mut self, input: ::std::option::Option<crate::types::ModuleInfo>) -> Self {
self.module_info = input;
self
}
/// <p>Contains information about the module from which the resource was created, if the resource was created from a module included in the stack template.</p>
pub fn get_module_info(&self) -> &::std::option::Option<crate::types::ModuleInfo> {
&self.module_info
}
/// Consumes the builder and constructs a [`StackResourceSummary`](crate::types::StackResourceSummary).
pub fn build(self) -> crate::types::StackResourceSummary {
crate::types::StackResourceSummary {
logical_resource_id: self.logical_resource_id,
physical_resource_id: self.physical_resource_id,
resource_type: self.resource_type,
last_updated_timestamp: self.last_updated_timestamp,
resource_status: self.resource_status,
resource_status_reason: self.resource_status_reason,
drift_information: self.drift_information,
module_info: self.module_info,
}
}
}