1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #pragma once 7 #include <aws/cloudformation/CloudFormation_EXPORTS.h> 8 #include <aws/core/utils/memory/stl/AWSStreamFwd.h> 9 #include <aws/core/utils/memory/stl/AWSString.h> 10 #include <aws/core/utils/DateTime.h> 11 #include <aws/cloudformation/model/ResourceStatus.h> 12 #include <aws/cloudformation/model/StackResourceDriftInformationSummary.h> 13 #include <aws/cloudformation/model/ModuleInfo.h> 14 #include <utility> 15 16 namespace Aws 17 { 18 namespace Utils 19 { 20 namespace Xml 21 { 22 class XmlNode; 23 } // namespace Xml 24 } // namespace Utils 25 namespace CloudFormation 26 { 27 namespace Model 28 { 29 30 /** 31 * <p>Contains high-level information about the specified stack 32 * resource.</p><p><h3>See Also:</h3> <a 33 * href="http://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/StackResourceSummary">AWS 34 * API Reference</a></p> 35 */ 36 class AWS_CLOUDFORMATION_API StackResourceSummary 37 { 38 public: 39 StackResourceSummary(); 40 StackResourceSummary(const Aws::Utils::Xml::XmlNode& xmlNode); 41 StackResourceSummary& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); 42 43 void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; 44 void OutputToStream(Aws::OStream& oStream, const char* location) const; 45 46 47 /** 48 * <p>The logical name of the resource specified in the template.</p> 49 */ GetLogicalResourceId()50 inline const Aws::String& GetLogicalResourceId() const{ return m_logicalResourceId; } 51 52 /** 53 * <p>The logical name of the resource specified in the template.</p> 54 */ LogicalResourceIdHasBeenSet()55 inline bool LogicalResourceIdHasBeenSet() const { return m_logicalResourceIdHasBeenSet; } 56 57 /** 58 * <p>The logical name of the resource specified in the template.</p> 59 */ SetLogicalResourceId(const Aws::String & value)60 inline void SetLogicalResourceId(const Aws::String& value) { m_logicalResourceIdHasBeenSet = true; m_logicalResourceId = value; } 61 62 /** 63 * <p>The logical name of the resource specified in the template.</p> 64 */ SetLogicalResourceId(Aws::String && value)65 inline void SetLogicalResourceId(Aws::String&& value) { m_logicalResourceIdHasBeenSet = true; m_logicalResourceId = std::move(value); } 66 67 /** 68 * <p>The logical name of the resource specified in the template.</p> 69 */ SetLogicalResourceId(const char * value)70 inline void SetLogicalResourceId(const char* value) { m_logicalResourceIdHasBeenSet = true; m_logicalResourceId.assign(value); } 71 72 /** 73 * <p>The logical name of the resource specified in the template.</p> 74 */ WithLogicalResourceId(const Aws::String & value)75 inline StackResourceSummary& WithLogicalResourceId(const Aws::String& value) { SetLogicalResourceId(value); return *this;} 76 77 /** 78 * <p>The logical name of the resource specified in the template.</p> 79 */ WithLogicalResourceId(Aws::String && value)80 inline StackResourceSummary& WithLogicalResourceId(Aws::String&& value) { SetLogicalResourceId(std::move(value)); return *this;} 81 82 /** 83 * <p>The logical name of the resource specified in the template.</p> 84 */ WithLogicalResourceId(const char * value)85 inline StackResourceSummary& WithLogicalResourceId(const char* value) { SetLogicalResourceId(value); return *this;} 86 87 88 /** 89 * <p>The name or unique identifier that corresponds to a physical instance ID of 90 * the resource.</p> 91 */ GetPhysicalResourceId()92 inline const Aws::String& GetPhysicalResourceId() const{ return m_physicalResourceId; } 93 94 /** 95 * <p>The name or unique identifier that corresponds to a physical instance ID of 96 * the resource.</p> 97 */ PhysicalResourceIdHasBeenSet()98 inline bool PhysicalResourceIdHasBeenSet() const { return m_physicalResourceIdHasBeenSet; } 99 100 /** 101 * <p>The name or unique identifier that corresponds to a physical instance ID of 102 * the resource.</p> 103 */ SetPhysicalResourceId(const Aws::String & value)104 inline void SetPhysicalResourceId(const Aws::String& value) { m_physicalResourceIdHasBeenSet = true; m_physicalResourceId = value; } 105 106 /** 107 * <p>The name or unique identifier that corresponds to a physical instance ID of 108 * the resource.</p> 109 */ SetPhysicalResourceId(Aws::String && value)110 inline void SetPhysicalResourceId(Aws::String&& value) { m_physicalResourceIdHasBeenSet = true; m_physicalResourceId = std::move(value); } 111 112 /** 113 * <p>The name or unique identifier that corresponds to a physical instance ID of 114 * the resource.</p> 115 */ SetPhysicalResourceId(const char * value)116 inline void SetPhysicalResourceId(const char* value) { m_physicalResourceIdHasBeenSet = true; m_physicalResourceId.assign(value); } 117 118 /** 119 * <p>The name or unique identifier that corresponds to a physical instance ID of 120 * the resource.</p> 121 */ WithPhysicalResourceId(const Aws::String & value)122 inline StackResourceSummary& WithPhysicalResourceId(const Aws::String& value) { SetPhysicalResourceId(value); return *this;} 123 124 /** 125 * <p>The name or unique identifier that corresponds to a physical instance ID of 126 * the resource.</p> 127 */ WithPhysicalResourceId(Aws::String && value)128 inline StackResourceSummary& WithPhysicalResourceId(Aws::String&& value) { SetPhysicalResourceId(std::move(value)); return *this;} 129 130 /** 131 * <p>The name or unique identifier that corresponds to a physical instance ID of 132 * the resource.</p> 133 */ WithPhysicalResourceId(const char * value)134 inline StackResourceSummary& WithPhysicalResourceId(const char* value) { SetPhysicalResourceId(value); return *this;} 135 136 137 /** 138 * <p>Type of resource. (For more information, go to <a 139 * href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html">Amazon 140 * Web Services Resource Types Reference</a> in the CloudFormation User Guide.)</p> 141 */ GetResourceType()142 inline const Aws::String& GetResourceType() const{ return m_resourceType; } 143 144 /** 145 * <p>Type of resource. (For more information, go to <a 146 * href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html">Amazon 147 * Web Services Resource Types Reference</a> in the CloudFormation User Guide.)</p> 148 */ ResourceTypeHasBeenSet()149 inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; } 150 151 /** 152 * <p>Type of resource. (For more information, go to <a 153 * href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html">Amazon 154 * Web Services Resource Types Reference</a> in the CloudFormation User Guide.)</p> 155 */ SetResourceType(const Aws::String & value)156 inline void SetResourceType(const Aws::String& value) { m_resourceTypeHasBeenSet = true; m_resourceType = value; } 157 158 /** 159 * <p>Type of resource. (For more information, go to <a 160 * href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html">Amazon 161 * Web Services Resource Types Reference</a> in the CloudFormation User Guide.)</p> 162 */ SetResourceType(Aws::String && value)163 inline void SetResourceType(Aws::String&& value) { m_resourceTypeHasBeenSet = true; m_resourceType = std::move(value); } 164 165 /** 166 * <p>Type of resource. (For more information, go to <a 167 * href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html">Amazon 168 * Web Services Resource Types Reference</a> in the CloudFormation User Guide.)</p> 169 */ SetResourceType(const char * value)170 inline void SetResourceType(const char* value) { m_resourceTypeHasBeenSet = true; m_resourceType.assign(value); } 171 172 /** 173 * <p>Type of resource. (For more information, go to <a 174 * href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html">Amazon 175 * Web Services Resource Types Reference</a> in the CloudFormation User Guide.)</p> 176 */ WithResourceType(const Aws::String & value)177 inline StackResourceSummary& WithResourceType(const Aws::String& value) { SetResourceType(value); return *this;} 178 179 /** 180 * <p>Type of resource. (For more information, go to <a 181 * href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html">Amazon 182 * Web Services Resource Types Reference</a> in the CloudFormation User Guide.)</p> 183 */ WithResourceType(Aws::String && value)184 inline StackResourceSummary& WithResourceType(Aws::String&& value) { SetResourceType(std::move(value)); return *this;} 185 186 /** 187 * <p>Type of resource. (For more information, go to <a 188 * href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html">Amazon 189 * Web Services Resource Types Reference</a> in the CloudFormation User Guide.)</p> 190 */ WithResourceType(const char * value)191 inline StackResourceSummary& WithResourceType(const char* value) { SetResourceType(value); return *this;} 192 193 194 /** 195 * <p>Time the status was updated.</p> 196 */ GetLastUpdatedTimestamp()197 inline const Aws::Utils::DateTime& GetLastUpdatedTimestamp() const{ return m_lastUpdatedTimestamp; } 198 199 /** 200 * <p>Time the status was updated.</p> 201 */ LastUpdatedTimestampHasBeenSet()202 inline bool LastUpdatedTimestampHasBeenSet() const { return m_lastUpdatedTimestampHasBeenSet; } 203 204 /** 205 * <p>Time the status was updated.</p> 206 */ SetLastUpdatedTimestamp(const Aws::Utils::DateTime & value)207 inline void SetLastUpdatedTimestamp(const Aws::Utils::DateTime& value) { m_lastUpdatedTimestampHasBeenSet = true; m_lastUpdatedTimestamp = value; } 208 209 /** 210 * <p>Time the status was updated.</p> 211 */ SetLastUpdatedTimestamp(Aws::Utils::DateTime && value)212 inline void SetLastUpdatedTimestamp(Aws::Utils::DateTime&& value) { m_lastUpdatedTimestampHasBeenSet = true; m_lastUpdatedTimestamp = std::move(value); } 213 214 /** 215 * <p>Time the status was updated.</p> 216 */ WithLastUpdatedTimestamp(const Aws::Utils::DateTime & value)217 inline StackResourceSummary& WithLastUpdatedTimestamp(const Aws::Utils::DateTime& value) { SetLastUpdatedTimestamp(value); return *this;} 218 219 /** 220 * <p>Time the status was updated.</p> 221 */ WithLastUpdatedTimestamp(Aws::Utils::DateTime && value)222 inline StackResourceSummary& WithLastUpdatedTimestamp(Aws::Utils::DateTime&& value) { SetLastUpdatedTimestamp(std::move(value)); return *this;} 223 224 225 /** 226 * <p>Current status of the resource.</p> 227 */ GetResourceStatus()228 inline const ResourceStatus& GetResourceStatus() const{ return m_resourceStatus; } 229 230 /** 231 * <p>Current status of the resource.</p> 232 */ ResourceStatusHasBeenSet()233 inline bool ResourceStatusHasBeenSet() const { return m_resourceStatusHasBeenSet; } 234 235 /** 236 * <p>Current status of the resource.</p> 237 */ SetResourceStatus(const ResourceStatus & value)238 inline void SetResourceStatus(const ResourceStatus& value) { m_resourceStatusHasBeenSet = true; m_resourceStatus = value; } 239 240 /** 241 * <p>Current status of the resource.</p> 242 */ SetResourceStatus(ResourceStatus && value)243 inline void SetResourceStatus(ResourceStatus&& value) { m_resourceStatusHasBeenSet = true; m_resourceStatus = std::move(value); } 244 245 /** 246 * <p>Current status of the resource.</p> 247 */ WithResourceStatus(const ResourceStatus & value)248 inline StackResourceSummary& WithResourceStatus(const ResourceStatus& value) { SetResourceStatus(value); return *this;} 249 250 /** 251 * <p>Current status of the resource.</p> 252 */ WithResourceStatus(ResourceStatus && value)253 inline StackResourceSummary& WithResourceStatus(ResourceStatus&& value) { SetResourceStatus(std::move(value)); return *this;} 254 255 256 /** 257 * <p>Success/failure message associated with the resource.</p> 258 */ GetResourceStatusReason()259 inline const Aws::String& GetResourceStatusReason() const{ return m_resourceStatusReason; } 260 261 /** 262 * <p>Success/failure message associated with the resource.</p> 263 */ ResourceStatusReasonHasBeenSet()264 inline bool ResourceStatusReasonHasBeenSet() const { return m_resourceStatusReasonHasBeenSet; } 265 266 /** 267 * <p>Success/failure message associated with the resource.</p> 268 */ SetResourceStatusReason(const Aws::String & value)269 inline void SetResourceStatusReason(const Aws::String& value) { m_resourceStatusReasonHasBeenSet = true; m_resourceStatusReason = value; } 270 271 /** 272 * <p>Success/failure message associated with the resource.</p> 273 */ SetResourceStatusReason(Aws::String && value)274 inline void SetResourceStatusReason(Aws::String&& value) { m_resourceStatusReasonHasBeenSet = true; m_resourceStatusReason = std::move(value); } 275 276 /** 277 * <p>Success/failure message associated with the resource.</p> 278 */ SetResourceStatusReason(const char * value)279 inline void SetResourceStatusReason(const char* value) { m_resourceStatusReasonHasBeenSet = true; m_resourceStatusReason.assign(value); } 280 281 /** 282 * <p>Success/failure message associated with the resource.</p> 283 */ WithResourceStatusReason(const Aws::String & value)284 inline StackResourceSummary& WithResourceStatusReason(const Aws::String& value) { SetResourceStatusReason(value); return *this;} 285 286 /** 287 * <p>Success/failure message associated with the resource.</p> 288 */ WithResourceStatusReason(Aws::String && value)289 inline StackResourceSummary& WithResourceStatusReason(Aws::String&& value) { SetResourceStatusReason(std::move(value)); return *this;} 290 291 /** 292 * <p>Success/failure message associated with the resource.</p> 293 */ WithResourceStatusReason(const char * value)294 inline StackResourceSummary& WithResourceStatusReason(const char* value) { SetResourceStatusReason(value); return *this;} 295 296 297 /** 298 * <p>Information about whether the resource's actual configuration differs, or has 299 * <i>drifted</i>, from its expected configuration, as defined in the stack 300 * template and any values specified as template parameters. For more information, 301 * see <a 302 * href="http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html">Detecting 303 * Unregulated Configuration Changes to Stacks and Resources</a>.</p> 304 */ GetDriftInformation()305 inline const StackResourceDriftInformationSummary& GetDriftInformation() const{ return m_driftInformation; } 306 307 /** 308 * <p>Information about whether the resource's actual configuration differs, or has 309 * <i>drifted</i>, from its expected configuration, as defined in the stack 310 * template and any values specified as template parameters. For more information, 311 * see <a 312 * href="http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html">Detecting 313 * Unregulated Configuration Changes to Stacks and Resources</a>.</p> 314 */ DriftInformationHasBeenSet()315 inline bool DriftInformationHasBeenSet() const { return m_driftInformationHasBeenSet; } 316 317 /** 318 * <p>Information about whether the resource's actual configuration differs, or has 319 * <i>drifted</i>, from its expected configuration, as defined in the stack 320 * template and any values specified as template parameters. For more information, 321 * see <a 322 * href="http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html">Detecting 323 * Unregulated Configuration Changes to Stacks and Resources</a>.</p> 324 */ SetDriftInformation(const StackResourceDriftInformationSummary & value)325 inline void SetDriftInformation(const StackResourceDriftInformationSummary& value) { m_driftInformationHasBeenSet = true; m_driftInformation = value; } 326 327 /** 328 * <p>Information about whether the resource's actual configuration differs, or has 329 * <i>drifted</i>, from its expected configuration, as defined in the stack 330 * template and any values specified as template parameters. For more information, 331 * see <a 332 * href="http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html">Detecting 333 * Unregulated Configuration Changes to Stacks and Resources</a>.</p> 334 */ SetDriftInformation(StackResourceDriftInformationSummary && value)335 inline void SetDriftInformation(StackResourceDriftInformationSummary&& value) { m_driftInformationHasBeenSet = true; m_driftInformation = std::move(value); } 336 337 /** 338 * <p>Information about whether the resource's actual configuration differs, or has 339 * <i>drifted</i>, from its expected configuration, as defined in the stack 340 * template and any values specified as template parameters. For more information, 341 * see <a 342 * href="http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html">Detecting 343 * Unregulated Configuration Changes to Stacks and Resources</a>.</p> 344 */ WithDriftInformation(const StackResourceDriftInformationSummary & value)345 inline StackResourceSummary& WithDriftInformation(const StackResourceDriftInformationSummary& value) { SetDriftInformation(value); return *this;} 346 347 /** 348 * <p>Information about whether the resource's actual configuration differs, or has 349 * <i>drifted</i>, from its expected configuration, as defined in the stack 350 * template and any values specified as template parameters. For more information, 351 * see <a 352 * href="http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html">Detecting 353 * Unregulated Configuration Changes to Stacks and Resources</a>.</p> 354 */ WithDriftInformation(StackResourceDriftInformationSummary && value)355 inline StackResourceSummary& WithDriftInformation(StackResourceDriftInformationSummary&& value) { SetDriftInformation(std::move(value)); return *this;} 356 357 358 /** 359 * <p>Contains information about the module from which the resource was created, if 360 * the resource was created from a module included in the stack template.</p> 361 */ GetModuleInfo()362 inline const ModuleInfo& GetModuleInfo() const{ return m_moduleInfo; } 363 364 /** 365 * <p>Contains information about the module from which the resource was created, if 366 * the resource was created from a module included in the stack template.</p> 367 */ ModuleInfoHasBeenSet()368 inline bool ModuleInfoHasBeenSet() const { return m_moduleInfoHasBeenSet; } 369 370 /** 371 * <p>Contains information about the module from which the resource was created, if 372 * the resource was created from a module included in the stack template.</p> 373 */ SetModuleInfo(const ModuleInfo & value)374 inline void SetModuleInfo(const ModuleInfo& value) { m_moduleInfoHasBeenSet = true; m_moduleInfo = value; } 375 376 /** 377 * <p>Contains information about the module from which the resource was created, if 378 * the resource was created from a module included in the stack template.</p> 379 */ SetModuleInfo(ModuleInfo && value)380 inline void SetModuleInfo(ModuleInfo&& value) { m_moduleInfoHasBeenSet = true; m_moduleInfo = std::move(value); } 381 382 /** 383 * <p>Contains information about the module from which the resource was created, if 384 * the resource was created from a module included in the stack template.</p> 385 */ WithModuleInfo(const ModuleInfo & value)386 inline StackResourceSummary& WithModuleInfo(const ModuleInfo& value) { SetModuleInfo(value); return *this;} 387 388 /** 389 * <p>Contains information about the module from which the resource was created, if 390 * the resource was created from a module included in the stack template.</p> 391 */ WithModuleInfo(ModuleInfo && value)392 inline StackResourceSummary& WithModuleInfo(ModuleInfo&& value) { SetModuleInfo(std::move(value)); return *this;} 393 394 private: 395 396 Aws::String m_logicalResourceId; 397 bool m_logicalResourceIdHasBeenSet; 398 399 Aws::String m_physicalResourceId; 400 bool m_physicalResourceIdHasBeenSet; 401 402 Aws::String m_resourceType; 403 bool m_resourceTypeHasBeenSet; 404 405 Aws::Utils::DateTime m_lastUpdatedTimestamp; 406 bool m_lastUpdatedTimestampHasBeenSet; 407 408 ResourceStatus m_resourceStatus; 409 bool m_resourceStatusHasBeenSet; 410 411 Aws::String m_resourceStatusReason; 412 bool m_resourceStatusReasonHasBeenSet; 413 414 StackResourceDriftInformationSummary m_driftInformation; 415 bool m_driftInformationHasBeenSet; 416 417 ModuleInfo m_moduleInfo; 418 bool m_moduleInfoHasBeenSet; 419 }; 420 421 } // namespace Model 422 } // namespace CloudFormation 423 } // namespace Aws 424