/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the cloudformation-2010-05-15.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.CloudFormation.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.
///
///
public partial class StackResourceDrift
{
private string _actualProperties;
private string _expectedProperties;
private string _logicalResourceId;
private ModuleInfo _moduleInfo;
private string _physicalResourceId;
private List _physicalResourceIdContext = new List();
private List _propertyDifferences = new List();
private string _resourceType;
private string _stackId;
private StackResourceDriftStatus _stackResourceDriftStatus;
private DateTime? _timestamp;
///
/// Gets and sets the property 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.
///
///
public string ActualProperties
{
get { return this._actualProperties; }
set { this._actualProperties = value; }
}
// Check to see if ActualProperties property is set
internal bool IsSetActualProperties()
{
return this._actualProperties != null;
}
///
/// Gets and sets the property 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.
///
///
public string ExpectedProperties
{
get { return this._expectedProperties; }
set { this._expectedProperties = value; }
}
// Check to see if ExpectedProperties property is set
internal bool IsSetExpectedProperties()
{
return this._expectedProperties != null;
}
///
/// Gets and sets the property LogicalResourceId.
///
/// The logical name of the resource specified in the template.
///
///
[AWSProperty(Required=true)]
public string LogicalResourceId
{
get { return this._logicalResourceId; }
set { this._logicalResourceId = value; }
}
// Check to see if LogicalResourceId property is set
internal bool IsSetLogicalResourceId()
{
return this._logicalResourceId != null;
}
///
/// Gets and sets the property 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.
///
///
public ModuleInfo ModuleInfo
{
get { return this._moduleInfo; }
set { this._moduleInfo = value; }
}
// Check to see if ModuleInfo property is set
internal bool IsSetModuleInfo()
{
return this._moduleInfo != null;
}
///
/// Gets and sets the property PhysicalResourceId.
///
/// The name or unique identifier that corresponds to a physical instance ID of a resource
/// supported by CloudFormation.
///
///
public string PhysicalResourceId
{
get { return this._physicalResourceId; }
set { this._physicalResourceId = value; }
}
// Check to see if PhysicalResourceId property is set
internal bool IsSetPhysicalResourceId()
{
return this._physicalResourceId != null;
}
///
/// Gets and sets the property 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.
///
///
[AWSProperty(Max=5)]
public List PhysicalResourceIdContext
{
get { return this._physicalResourceIdContext; }
set { this._physicalResourceIdContext = value; }
}
// Check to see if PhysicalResourceIdContext property is set
internal bool IsSetPhysicalResourceIdContext()
{
return this._physicalResourceIdContext != null && this._physicalResourceIdContext.Count > 0;
}
///
/// Gets and sets the property 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
.
///
///
public List PropertyDifferences
{
get { return this._propertyDifferences; }
set { this._propertyDifferences = value; }
}
// Check to see if PropertyDifferences property is set
internal bool IsSetPropertyDifferences()
{
return this._propertyDifferences != null && this._propertyDifferences.Count > 0;
}
///
/// Gets and sets the property ResourceType.
///
/// The type of the resource.
///
///
[AWSProperty(Required=true, Min=1, Max=256)]
public string ResourceType
{
get { return this._resourceType; }
set { this._resourceType = value; }
}
// Check to see if ResourceType property is set
internal bool IsSetResourceType()
{
return this._resourceType != null;
}
///
/// Gets and sets the property StackId.
///
/// The ID of the stack.
///
///
[AWSProperty(Required=true)]
public string StackId
{
get { return this._stackId; }
set { this._stackId = value; }
}
// Check to see if StackId property is set
internal bool IsSetStackId()
{
return this._stackId != null;
}
///
/// Gets and sets the property 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.
///
///
///
[AWSProperty(Required=true)]
public StackResourceDriftStatus StackResourceDriftStatus
{
get { return this._stackResourceDriftStatus; }
set { this._stackResourceDriftStatus = value; }
}
// Check to see if StackResourceDriftStatus property is set
internal bool IsSetStackResourceDriftStatus()
{
return this._stackResourceDriftStatus != null;
}
///
/// Gets and sets the property Timestamp.
///
/// Time at which CloudFormation performed drift detection on the stack resource.
///
///
[AWSProperty(Required=true)]
public DateTime Timestamp
{
get { return this._timestamp.GetValueOrDefault(); }
set { this._timestamp = value; }
}
// Check to see if Timestamp property is set
internal bool IsSetTimestamp()
{
return this._timestamp.HasValue;
}
}
}