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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>The StackResource data type.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct StackResource {
/// <p>The name associated with the stack.</p>
pub stack_name: ::std::option::Option<::std::string::String>,
/// <p>Unique identifier of the stack.</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>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 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>User defined description associated with the resource.</p>
pub description: ::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::StackResourceDriftInformation>,
/// <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 StackResource {
/// <p>The name associated with the stack.</p>
pub fn stack_name(&self) -> ::std::option::Option<&str> {
self.stack_name.as_deref()
}
/// <p>Unique identifier of the stack.</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>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 timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.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>User defined description associated with the resource.</p>
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.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::StackResourceDriftInformation> {
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 StackResource {
/// Creates a new builder-style object to manufacture [`StackResource`](crate::types::StackResource).
pub fn builder() -> crate::types::builders::StackResourceBuilder {
crate::types::builders::StackResourceBuilder::default()
}
}
/// A builder for [`StackResource`](crate::types::StackResource).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct StackResourceBuilder {
pub(crate) stack_name: ::std::option::Option<::std::string::String>,
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) resource_type: ::std::option::Option<::std::string::String>,
pub(crate) 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) description: ::std::option::Option<::std::string::String>,
pub(crate) drift_information: ::std::option::Option<crate::types::StackResourceDriftInformation>,
pub(crate) module_info: ::std::option::Option<crate::types::ModuleInfo>,
}
impl StackResourceBuilder {
/// <p>The name associated with the stack.</p>
pub fn stack_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.stack_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name associated with the stack.</p>
pub fn set_stack_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.stack_name = input;
self
}
/// <p>The name associated with the stack.</p>
pub fn get_stack_name(&self) -> &::std::option::Option<::std::string::String> {
&self.stack_name
}
/// <p>Unique identifier of the stack.</p>
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>Unique identifier of the stack.</p>
pub fn set_stack_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.stack_id = input;
self
}
/// <p>Unique identifier of the stack.</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
}
/// <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 timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.timestamp = ::std::option::Option::Some(input);
self
}
/// <p>Time the status was updated.</p>
pub fn set_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.timestamp = input;
self
}
/// <p>Time the status was updated.</p>
pub fn get_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.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>User defined description associated with the resource.</p>
pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.description = ::std::option::Option::Some(input.into());
self
}
/// <p>User defined description associated with the resource.</p>
pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.description = input;
self
}
/// <p>User defined description associated with the resource.</p>
pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
&self.description
}
/// <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::StackResourceDriftInformation) -> 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::StackResourceDriftInformation>) -> 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::StackResourceDriftInformation> {
&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 [`StackResource`](crate::types::StackResource).
pub fn build(self) -> crate::types::StackResource {
crate::types::StackResource {
stack_name: self.stack_name,
stack_id: self.stack_id,
logical_resource_id: self.logical_resource_id,
physical_resource_id: self.physical_resource_id,
resource_type: self.resource_type,
timestamp: self.timestamp,
resource_status: self.resource_status,
resource_status_reason: self.resource_status_reason,
description: self.description,
drift_information: self.drift_information,
module_info: self.module_info,
}
}
}