/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Xml { class XmlNode; } // namespace Xml } // namespace Utils namespace CloudFormation { namespace Model { /** *

Contains the drift information for a resource that has been checked for * drift. This includes actual and expected property values for resources in which * CloudFormation has detected drift. Only resource properties explicitly defined * in the stack template are checked for drift. For more information, see Detecting * Unregulated Configuration Changes to Stacks and Resources.

Resources * that don't currently support drift detection can't be checked. For a list of * resources that support drift detection, see Resources * that Support Drift Detection.

Use DetectStackResourceDrift to * detect drift on individual resources, or DetectStackDrift to detect drift * on all resources in a given stack that support drift detection.

See * Also:

AWS * API Reference

*/ class StackResourceDrift { public: AWS_CLOUDFORMATION_API StackResourceDrift(); AWS_CLOUDFORMATION_API StackResourceDrift(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_CLOUDFORMATION_API StackResourceDrift& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_CLOUDFORMATION_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; AWS_CLOUDFORMATION_API void OutputToStream(Aws::OStream& oStream, const char* location) const; /** *

The ID of the stack.

*/ inline const Aws::String& GetStackId() const{ return m_stackId; } /** *

The ID of the stack.

*/ inline bool StackIdHasBeenSet() const { return m_stackIdHasBeenSet; } /** *

The ID of the stack.

*/ inline void SetStackId(const Aws::String& value) { m_stackIdHasBeenSet = true; m_stackId = value; } /** *

The ID of the stack.

*/ inline void SetStackId(Aws::String&& value) { m_stackIdHasBeenSet = true; m_stackId = std::move(value); } /** *

The ID of the stack.

*/ inline void SetStackId(const char* value) { m_stackIdHasBeenSet = true; m_stackId.assign(value); } /** *

The ID of the stack.

*/ inline StackResourceDrift& WithStackId(const Aws::String& value) { SetStackId(value); return *this;} /** *

The ID of the stack.

*/ inline StackResourceDrift& WithStackId(Aws::String&& value) { SetStackId(std::move(value)); return *this;} /** *

The ID of the stack.

*/ inline StackResourceDrift& WithStackId(const char* value) { SetStackId(value); return *this;} /** *

The logical name of the resource specified in the template.

*/ inline const Aws::String& GetLogicalResourceId() const{ return m_logicalResourceId; } /** *

The logical name of the resource specified in the template.

*/ inline bool LogicalResourceIdHasBeenSet() const { return m_logicalResourceIdHasBeenSet; } /** *

The logical name of the resource specified in the template.

*/ inline void SetLogicalResourceId(const Aws::String& value) { m_logicalResourceIdHasBeenSet = true; m_logicalResourceId = value; } /** *

The logical name of the resource specified in the template.

*/ inline void SetLogicalResourceId(Aws::String&& value) { m_logicalResourceIdHasBeenSet = true; m_logicalResourceId = std::move(value); } /** *

The logical name of the resource specified in the template.

*/ inline void SetLogicalResourceId(const char* value) { m_logicalResourceIdHasBeenSet = true; m_logicalResourceId.assign(value); } /** *

The logical name of the resource specified in the template.

*/ inline StackResourceDrift& WithLogicalResourceId(const Aws::String& value) { SetLogicalResourceId(value); return *this;} /** *

The logical name of the resource specified in the template.

*/ inline StackResourceDrift& WithLogicalResourceId(Aws::String&& value) { SetLogicalResourceId(std::move(value)); return *this;} /** *

The logical name of the resource specified in the template.

*/ inline StackResourceDrift& WithLogicalResourceId(const char* value) { SetLogicalResourceId(value); return *this;} /** *

The name or unique identifier that corresponds to a physical instance ID of a * resource supported by CloudFormation.

*/ inline const Aws::String& GetPhysicalResourceId() const{ return m_physicalResourceId; } /** *

The name or unique identifier that corresponds to a physical instance ID of a * resource supported by CloudFormation.

*/ inline bool PhysicalResourceIdHasBeenSet() const { return m_physicalResourceIdHasBeenSet; } /** *

The name or unique identifier that corresponds to a physical instance ID of a * resource supported by CloudFormation.

*/ inline void SetPhysicalResourceId(const Aws::String& value) { m_physicalResourceIdHasBeenSet = true; m_physicalResourceId = value; } /** *

The name or unique identifier that corresponds to a physical instance ID of a * resource supported by CloudFormation.

*/ inline void SetPhysicalResourceId(Aws::String&& value) { m_physicalResourceIdHasBeenSet = true; m_physicalResourceId = std::move(value); } /** *

The name or unique identifier that corresponds to a physical instance ID of a * resource supported by CloudFormation.

*/ inline void SetPhysicalResourceId(const char* value) { m_physicalResourceIdHasBeenSet = true; m_physicalResourceId.assign(value); } /** *

The name or unique identifier that corresponds to a physical instance ID of a * resource supported by CloudFormation.

*/ inline StackResourceDrift& WithPhysicalResourceId(const Aws::String& value) { SetPhysicalResourceId(value); return *this;} /** *

The name or unique identifier that corresponds to a physical instance ID of a * resource supported by CloudFormation.

*/ inline StackResourceDrift& WithPhysicalResourceId(Aws::String&& value) { SetPhysicalResourceId(std::move(value)); return *this;} /** *

The name or unique identifier that corresponds to a physical instance ID of a * resource supported by CloudFormation.

*/ inline StackResourceDrift& WithPhysicalResourceId(const char* value) { SetPhysicalResourceId(value); return *this;} /** *

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.

*/ inline const Aws::Vector& GetPhysicalResourceIdContext() const{ return m_physicalResourceIdContext; } /** *

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.

*/ inline bool PhysicalResourceIdContextHasBeenSet() const { return m_physicalResourceIdContextHasBeenSet; } /** *

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.

*/ inline void SetPhysicalResourceIdContext(const Aws::Vector& value) { m_physicalResourceIdContextHasBeenSet = true; m_physicalResourceIdContext = value; } /** *

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.

*/ inline void SetPhysicalResourceIdContext(Aws::Vector&& value) { m_physicalResourceIdContextHasBeenSet = true; m_physicalResourceIdContext = std::move(value); } /** *

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.

*/ inline StackResourceDrift& WithPhysicalResourceIdContext(const Aws::Vector& value) { SetPhysicalResourceIdContext(value); return *this;} /** *

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.

*/ inline StackResourceDrift& WithPhysicalResourceIdContext(Aws::Vector&& value) { SetPhysicalResourceIdContext(std::move(value)); return *this;} /** *

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.

*/ inline StackResourceDrift& AddPhysicalResourceIdContext(const PhysicalResourceIdContextKeyValuePair& value) { m_physicalResourceIdContextHasBeenSet = true; m_physicalResourceIdContext.push_back(value); return *this; } /** *

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.

*/ inline StackResourceDrift& AddPhysicalResourceIdContext(PhysicalResourceIdContextKeyValuePair&& value) { m_physicalResourceIdContextHasBeenSet = true; m_physicalResourceIdContext.push_back(std::move(value)); return *this; } /** *

The type of the resource.

*/ inline const Aws::String& GetResourceType() const{ return m_resourceType; } /** *

The type of the resource.

*/ inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; } /** *

The type of the resource.

*/ inline void SetResourceType(const Aws::String& value) { m_resourceTypeHasBeenSet = true; m_resourceType = value; } /** *

The type of the resource.

*/ inline void SetResourceType(Aws::String&& value) { m_resourceTypeHasBeenSet = true; m_resourceType = std::move(value); } /** *

The type of the resource.

*/ inline void SetResourceType(const char* value) { m_resourceTypeHasBeenSet = true; m_resourceType.assign(value); } /** *

The type of the resource.

*/ inline StackResourceDrift& WithResourceType(const Aws::String& value) { SetResourceType(value); return *this;} /** *

The type of the resource.

*/ inline StackResourceDrift& WithResourceType(Aws::String&& value) { SetResourceType(std::move(value)); return *this;} /** *

The type of the resource.

*/ inline StackResourceDrift& WithResourceType(const char* value) { SetResourceType(value); return *this;} /** *

A JSON structure containing the expected property values of the stack * resource, as defined in the stack template and any values specified as template * parameters.

For resources whose StackResourceDriftStatus is * DELETED, this structure will not be present.

*/ inline const Aws::String& GetExpectedProperties() const{ return m_expectedProperties; } /** *

A JSON structure containing the expected property values of the stack * resource, as defined in the stack template and any values specified as template * parameters.

For resources whose StackResourceDriftStatus is * DELETED, this structure will not be present.

*/ inline bool ExpectedPropertiesHasBeenSet() const { return m_expectedPropertiesHasBeenSet; } /** *

A JSON structure containing the expected property values of the stack * resource, as defined in the stack template and any values specified as template * parameters.

For resources whose StackResourceDriftStatus is * DELETED, this structure will not be present.

*/ inline void SetExpectedProperties(const Aws::String& value) { m_expectedPropertiesHasBeenSet = true; m_expectedProperties = value; } /** *

A JSON structure containing the expected property values of the stack * resource, as defined in the stack template and any values specified as template * parameters.

For resources whose StackResourceDriftStatus is * DELETED, this structure will not be present.

*/ inline void SetExpectedProperties(Aws::String&& value) { m_expectedPropertiesHasBeenSet = true; m_expectedProperties = std::move(value); } /** *

A JSON structure containing the expected property values of the stack * resource, as defined in the stack template and any values specified as template * parameters.

For resources whose StackResourceDriftStatus is * DELETED, this structure will not be present.

*/ inline void SetExpectedProperties(const char* value) { m_expectedPropertiesHasBeenSet = true; m_expectedProperties.assign(value); } /** *

A JSON structure containing the expected property values of the stack * resource, as defined in the stack template and any values specified as template * parameters.

For resources whose StackResourceDriftStatus is * DELETED, this structure will not be present.

*/ inline StackResourceDrift& WithExpectedProperties(const Aws::String& value) { SetExpectedProperties(value); return *this;} /** *

A JSON structure containing the expected property values of the stack * resource, as defined in the stack template and any values specified as template * parameters.

For resources whose StackResourceDriftStatus is * DELETED, this structure will not be present.

*/ inline StackResourceDrift& WithExpectedProperties(Aws::String&& value) { SetExpectedProperties(std::move(value)); return *this;} /** *

A JSON structure containing the expected property values of the stack * resource, as defined in the stack template and any values specified as template * parameters.

For resources whose StackResourceDriftStatus is * DELETED, this structure will not be present.

*/ inline StackResourceDrift& WithExpectedProperties(const char* value) { SetExpectedProperties(value); return *this;} /** *

A JSON structure containing the actual property values of the stack * resource.

For resources whose StackResourceDriftStatus is * DELETED, this structure will not be present.

*/ inline const Aws::String& GetActualProperties() const{ return m_actualProperties; } /** *

A JSON structure containing the actual property values of the stack * resource.

For resources whose StackResourceDriftStatus is * DELETED, this structure will not be present.

*/ inline bool ActualPropertiesHasBeenSet() const { return m_actualPropertiesHasBeenSet; } /** *

A JSON structure containing the actual property values of the stack * resource.

For resources whose StackResourceDriftStatus is * DELETED, this structure will not be present.

*/ inline void SetActualProperties(const Aws::String& value) { m_actualPropertiesHasBeenSet = true; m_actualProperties = value; } /** *

A JSON structure containing the actual property values of the stack * resource.

For resources whose StackResourceDriftStatus is * DELETED, this structure will not be present.

*/ inline void SetActualProperties(Aws::String&& value) { m_actualPropertiesHasBeenSet = true; m_actualProperties = std::move(value); } /** *

A JSON structure containing the actual property values of the stack * resource.

For resources whose StackResourceDriftStatus is * DELETED, this structure will not be present.

*/ inline void SetActualProperties(const char* value) { m_actualPropertiesHasBeenSet = true; m_actualProperties.assign(value); } /** *

A JSON structure containing the actual property values of the stack * resource.

For resources whose StackResourceDriftStatus is * DELETED, this structure will not be present.

*/ inline StackResourceDrift& WithActualProperties(const Aws::String& value) { SetActualProperties(value); return *this;} /** *

A JSON structure containing the actual property values of the stack * resource.

For resources whose StackResourceDriftStatus is * DELETED, this structure will not be present.

*/ inline StackResourceDrift& WithActualProperties(Aws::String&& value) { SetActualProperties(std::move(value)); return *this;} /** *

A JSON structure containing the actual property values of the stack * resource.

For resources whose StackResourceDriftStatus is * DELETED, this structure will not be present.

*/ inline StackResourceDrift& WithActualProperties(const char* value) { SetActualProperties(value); return *this;} /** *

A collection of the resource properties whose actual values differ from their * expected values. These will be present only for resources whose * StackResourceDriftStatus is MODIFIED.

*/ inline const Aws::Vector& GetPropertyDifferences() const{ return m_propertyDifferences; } /** *

A collection of the resource properties whose actual values differ from their * expected values. These will be present only for resources whose * StackResourceDriftStatus is MODIFIED.

*/ inline bool PropertyDifferencesHasBeenSet() const { return m_propertyDifferencesHasBeenSet; } /** *

A collection of the resource properties whose actual values differ from their * expected values. These will be present only for resources whose * StackResourceDriftStatus is MODIFIED.

*/ inline void SetPropertyDifferences(const Aws::Vector& value) { m_propertyDifferencesHasBeenSet = true; m_propertyDifferences = value; } /** *

A collection of the resource properties whose actual values differ from their * expected values. These will be present only for resources whose * StackResourceDriftStatus is MODIFIED.

*/ inline void SetPropertyDifferences(Aws::Vector&& value) { m_propertyDifferencesHasBeenSet = true; m_propertyDifferences = std::move(value); } /** *

A collection of the resource properties whose actual values differ from their * expected values. These will be present only for resources whose * StackResourceDriftStatus is MODIFIED.

*/ inline StackResourceDrift& WithPropertyDifferences(const Aws::Vector& value) { SetPropertyDifferences(value); return *this;} /** *

A collection of the resource properties whose actual values differ from their * expected values. These will be present only for resources whose * StackResourceDriftStatus is MODIFIED.

*/ inline StackResourceDrift& WithPropertyDifferences(Aws::Vector&& value) { SetPropertyDifferences(std::move(value)); return *this;} /** *

A collection of the resource properties whose actual values differ from their * expected values. These will be present only for resources whose * StackResourceDriftStatus is MODIFIED.

*/ inline StackResourceDrift& AddPropertyDifferences(const PropertyDifference& value) { m_propertyDifferencesHasBeenSet = true; m_propertyDifferences.push_back(value); return *this; } /** *

A collection of the resource properties whose actual values differ from their * expected values. These will be present only for resources whose * StackResourceDriftStatus is MODIFIED.

*/ inline StackResourceDrift& AddPropertyDifferences(PropertyDifference&& value) { m_propertyDifferencesHasBeenSet = true; m_propertyDifferences.push_back(std::move(value)); return *this; } /** *

Status of the resource's actual configuration compared to its expected * configuration.

  • DELETED: The resource differs from * its expected template configuration because the resource has been deleted.

    *
  • MODIFIED: One or more resource properties differ * from their expected values (as defined in the stack template and any values * specified as template parameters).

  • IN_SYNC: The * resource's actual configuration matches its expected template configuration.

    *
  • NOT_CHECKED: CloudFormation does not currently * return this value.

*/ inline const StackResourceDriftStatus& GetStackResourceDriftStatus() const{ return m_stackResourceDriftStatus; } /** *

Status of the resource's actual configuration compared to its expected * configuration.

  • DELETED: The resource differs from * its expected template configuration because the resource has been deleted.

    *
  • MODIFIED: One or more resource properties differ * from their expected values (as defined in the stack template and any values * specified as template parameters).

  • IN_SYNC: The * resource's actual configuration matches its expected template configuration.

    *
  • NOT_CHECKED: CloudFormation does not currently * return this value.

*/ inline bool StackResourceDriftStatusHasBeenSet() const { return m_stackResourceDriftStatusHasBeenSet; } /** *

Status of the resource's actual configuration compared to its expected * configuration.

  • DELETED: The resource differs from * its expected template configuration because the resource has been deleted.

    *
  • MODIFIED: One or more resource properties differ * from their expected values (as defined in the stack template and any values * specified as template parameters).

  • IN_SYNC: The * resource's actual configuration matches its expected template configuration.

    *
  • NOT_CHECKED: CloudFormation does not currently * return this value.

*/ inline void SetStackResourceDriftStatus(const StackResourceDriftStatus& value) { m_stackResourceDriftStatusHasBeenSet = true; m_stackResourceDriftStatus = value; } /** *

Status of the resource's actual configuration compared to its expected * configuration.

  • DELETED: The resource differs from * its expected template configuration because the resource has been deleted.

    *
  • MODIFIED: One or more resource properties differ * from their expected values (as defined in the stack template and any values * specified as template parameters).

  • IN_SYNC: The * resource's actual configuration matches its expected template configuration.

    *
  • NOT_CHECKED: CloudFormation does not currently * return this value.

*/ inline void SetStackResourceDriftStatus(StackResourceDriftStatus&& value) { m_stackResourceDriftStatusHasBeenSet = true; m_stackResourceDriftStatus = std::move(value); } /** *

Status of the resource's actual configuration compared to its expected * configuration.

  • DELETED: The resource differs from * its expected template configuration because the resource has been deleted.

    *
  • MODIFIED: One or more resource properties differ * from their expected values (as defined in the stack template and any values * specified as template parameters).

  • IN_SYNC: The * resource's actual configuration matches its expected template configuration.

    *
  • NOT_CHECKED: CloudFormation does not currently * return this value.

*/ inline StackResourceDrift& WithStackResourceDriftStatus(const StackResourceDriftStatus& value) { SetStackResourceDriftStatus(value); return *this;} /** *

Status of the resource's actual configuration compared to its expected * configuration.

  • DELETED: The resource differs from * its expected template configuration because the resource has been deleted.

    *
  • MODIFIED: One or more resource properties differ * from their expected values (as defined in the stack template and any values * specified as template parameters).

  • IN_SYNC: The * resource's actual configuration matches its expected template configuration.

    *
  • NOT_CHECKED: CloudFormation does not currently * return this value.

*/ inline StackResourceDrift& WithStackResourceDriftStatus(StackResourceDriftStatus&& value) { SetStackResourceDriftStatus(std::move(value)); return *this;} /** *

Time at which CloudFormation performed drift detection on the stack * resource.

*/ inline const Aws::Utils::DateTime& GetTimestamp() const{ return m_timestamp; } /** *

Time at which CloudFormation performed drift detection on the stack * resource.

*/ inline bool TimestampHasBeenSet() const { return m_timestampHasBeenSet; } /** *

Time at which CloudFormation performed drift detection on the stack * resource.

*/ inline void SetTimestamp(const Aws::Utils::DateTime& value) { m_timestampHasBeenSet = true; m_timestamp = value; } /** *

Time at which CloudFormation performed drift detection on the stack * resource.

*/ inline void SetTimestamp(Aws::Utils::DateTime&& value) { m_timestampHasBeenSet = true; m_timestamp = std::move(value); } /** *

Time at which CloudFormation performed drift detection on the stack * resource.

*/ inline StackResourceDrift& WithTimestamp(const Aws::Utils::DateTime& value) { SetTimestamp(value); return *this;} /** *

Time at which CloudFormation performed drift detection on the stack * resource.

*/ inline StackResourceDrift& WithTimestamp(Aws::Utils::DateTime&& value) { SetTimestamp(std::move(value)); return *this;} /** *

Contains information about the module from which the resource was created, if * the resource was created from a module included in the stack template.

*/ inline const ModuleInfo& GetModuleInfo() const{ return m_moduleInfo; } /** *

Contains information about the module from which the resource was created, if * the resource was created from a module included in the stack template.

*/ inline bool ModuleInfoHasBeenSet() const { return m_moduleInfoHasBeenSet; } /** *

Contains information about the module from which the resource was created, if * the resource was created from a module included in the stack template.

*/ inline void SetModuleInfo(const ModuleInfo& value) { m_moduleInfoHasBeenSet = true; m_moduleInfo = value; } /** *

Contains information about the module from which the resource was created, if * the resource was created from a module included in the stack template.

*/ inline void SetModuleInfo(ModuleInfo&& value) { m_moduleInfoHasBeenSet = true; m_moduleInfo = std::move(value); } /** *

Contains information about the module from which the resource was created, if * the resource was created from a module included in the stack template.

*/ inline StackResourceDrift& WithModuleInfo(const ModuleInfo& value) { SetModuleInfo(value); return *this;} /** *

Contains information about the module from which the resource was created, if * the resource was created from a module included in the stack template.

*/ inline StackResourceDrift& WithModuleInfo(ModuleInfo&& value) { SetModuleInfo(std::move(value)); return *this;} private: Aws::String m_stackId; bool m_stackIdHasBeenSet = false; Aws::String m_logicalResourceId; bool m_logicalResourceIdHasBeenSet = false; Aws::String m_physicalResourceId; bool m_physicalResourceIdHasBeenSet = false; Aws::Vector m_physicalResourceIdContext; bool m_physicalResourceIdContextHasBeenSet = false; Aws::String m_resourceType; bool m_resourceTypeHasBeenSet = false; Aws::String m_expectedProperties; bool m_expectedPropertiesHasBeenSet = false; Aws::String m_actualProperties; bool m_actualPropertiesHasBeenSet = false; Aws::Vector m_propertyDifferences; bool m_propertyDifferencesHasBeenSet = false; StackResourceDriftStatus m_stackResourceDriftStatus; bool m_stackResourceDriftStatusHasBeenSet = false; Aws::Utils::DateTime m_timestamp; bool m_timestampHasBeenSet = false; ModuleInfo m_moduleInfo; bool m_moduleInfoHasBeenSet = false; }; } // namespace Model } // namespace CloudFormation } // namespace Aws