/*
* 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 ecs-2014-11-13.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.ECS.Model
{
///
/// An Amazon EC2 or External instance that's running the Amazon ECS agent and has been
/// registered with a cluster.
///
public partial class ContainerInstance
{
private bool? _agentConnected;
private AgentUpdateStatus _agentUpdateStatus;
private List _attachments = new List();
private List _attributes = new List();
private string _capacityProviderName;
private string _containerInstanceArn;
private string _ec2InstanceId;
private ContainerInstanceHealthStatus _healthStatus;
private int? _pendingTasksCount;
private DateTime? _registeredAt;
private List _registeredResources = new List();
private List _remainingResources = new List();
private int? _runningTasksCount;
private string _status;
private string _statusReason;
private List _tags = new List();
private long? _version;
private VersionInfo _versionInfo;
///
/// Gets and sets the property AgentConnected.
///
/// This parameter returns true
if the agent is connected to Amazon ECS.
/// An instance with an agent that may be unhealthy or stopped return false
.
/// Only instances connected to an agent can accept task placement requests.
///
///
public bool AgentConnected
{
get { return this._agentConnected.GetValueOrDefault(); }
set { this._agentConnected = value; }
}
// Check to see if AgentConnected property is set
internal bool IsSetAgentConnected()
{
return this._agentConnected.HasValue;
}
///
/// Gets and sets the property AgentUpdateStatus.
///
/// The status of the most recent agent update. If an update wasn't ever requested, this
/// value is NULL
.
///
///
public AgentUpdateStatus AgentUpdateStatus
{
get { return this._agentUpdateStatus; }
set { this._agentUpdateStatus = value; }
}
// Check to see if AgentUpdateStatus property is set
internal bool IsSetAgentUpdateStatus()
{
return this._agentUpdateStatus != null;
}
///
/// Gets and sets the property Attachments.
///
/// The resources attached to a container instance, such as an elastic network interface.
///
///
public List Attachments
{
get { return this._attachments; }
set { this._attachments = value; }
}
// Check to see if Attachments property is set
internal bool IsSetAttachments()
{
return this._attachments != null && this._attachments.Count > 0;
}
///
/// Gets and sets the property Attributes.
///
/// The attributes set for the container instance, either by the Amazon ECS container
/// agent at instance registration or manually with the PutAttributes operation.
///
///
public List Attributes
{
get { return this._attributes; }
set { this._attributes = value; }
}
// Check to see if Attributes property is set
internal bool IsSetAttributes()
{
return this._attributes != null && this._attributes.Count > 0;
}
///
/// Gets and sets the property CapacityProviderName.
///
/// The capacity provider that's associated with the container instance.
///
///
public string CapacityProviderName
{
get { return this._capacityProviderName; }
set { this._capacityProviderName = value; }
}
// Check to see if CapacityProviderName property is set
internal bool IsSetCapacityProviderName()
{
return this._capacityProviderName != null;
}
///
/// Gets and sets the property ContainerInstanceArn.
///
/// The Amazon Resource Name (ARN) of the container instance. For more information about
/// the ARN format, see Amazon
/// Resource Name (ARN) in the Amazon ECS Developer Guide.
///
///
public string ContainerInstanceArn
{
get { return this._containerInstanceArn; }
set { this._containerInstanceArn = value; }
}
// Check to see if ContainerInstanceArn property is set
internal bool IsSetContainerInstanceArn()
{
return this._containerInstanceArn != null;
}
///
/// Gets and sets the property Ec2InstanceId.
///
/// The ID of the container instance. For Amazon EC2 instances, this value is the Amazon
/// EC2 instance ID. For external instances, this value is the Amazon Web Services Systems
/// Manager managed instance ID.
///
///
public string Ec2InstanceId
{
get { return this._ec2InstanceId; }
set { this._ec2InstanceId = value; }
}
// Check to see if Ec2InstanceId property is set
internal bool IsSetEc2InstanceId()
{
return this._ec2InstanceId != null;
}
///
/// Gets and sets the property HealthStatus.
///
/// An object representing the health status of the container instance.
///
///
public ContainerInstanceHealthStatus HealthStatus
{
get { return this._healthStatus; }
set { this._healthStatus = value; }
}
// Check to see if HealthStatus property is set
internal bool IsSetHealthStatus()
{
return this._healthStatus != null;
}
///
/// Gets and sets the property PendingTasksCount.
///
/// The number of tasks on the container instance that are in the PENDING
/// status.
///
///
public int PendingTasksCount
{
get { return this._pendingTasksCount.GetValueOrDefault(); }
set { this._pendingTasksCount = value; }
}
// Check to see if PendingTasksCount property is set
internal bool IsSetPendingTasksCount()
{
return this._pendingTasksCount.HasValue;
}
///
/// Gets and sets the property RegisteredAt.
///
/// The Unix timestamp for the time when the container instance was registered.
///
///
public DateTime RegisteredAt
{
get { return this._registeredAt.GetValueOrDefault(); }
set { this._registeredAt = value; }
}
// Check to see if RegisteredAt property is set
internal bool IsSetRegisteredAt()
{
return this._registeredAt.HasValue;
}
///
/// Gets and sets the property RegisteredResources.
///
/// For CPU and memory resource types, this parameter describes the amount of each resource
/// that was available on the container instance when the container agent registered it
/// with Amazon ECS. This value represents the total amount of CPU and memory that can
/// be allocated on this container instance to tasks. For port resource types, this parameter
/// describes the ports that were reserved by the Amazon ECS container agent when it registered
/// the container instance with Amazon ECS.
///
///
public List RegisteredResources
{
get { return this._registeredResources; }
set { this._registeredResources = value; }
}
// Check to see if RegisteredResources property is set
internal bool IsSetRegisteredResources()
{
return this._registeredResources != null && this._registeredResources.Count > 0;
}
///
/// Gets and sets the property RemainingResources.
///
/// For CPU and memory resource types, this parameter describes the remaining CPU and
/// memory that wasn't already allocated to tasks and is therefore available for new tasks.
/// For port resource types, this parameter describes the ports that were reserved by
/// the Amazon ECS container agent (at instance registration time) and any task containers
/// that have reserved port mappings on the host (with the host
or bridge
/// network mode). Any port that's not specified here is available for new tasks.
///
///
public List RemainingResources
{
get { return this._remainingResources; }
set { this._remainingResources = value; }
}
// Check to see if RemainingResources property is set
internal bool IsSetRemainingResources()
{
return this._remainingResources != null && this._remainingResources.Count > 0;
}
///
/// Gets and sets the property RunningTasksCount.
///
/// The number of tasks on the container instance that are in the RUNNING
/// status.
///
///
public int RunningTasksCount
{
get { return this._runningTasksCount.GetValueOrDefault(); }
set { this._runningTasksCount = value; }
}
// Check to see if RunningTasksCount property is set
internal bool IsSetRunningTasksCount()
{
return this._runningTasksCount.HasValue;
}
///
/// Gets and sets the property Status.
///
/// The status of the container instance. The valid values are REGISTERING
,
/// REGISTRATION_FAILED
, ACTIVE
, INACTIVE
, DEREGISTERING
,
/// or DRAINING
.
///
///
///
/// If your account has opted in to the awsvpcTrunking
account setting, then
/// any newly registered container instance will transition to a REGISTERING
/// status while the trunk elastic network interface is provisioned for the instance.
/// If the registration fails, the instance will transition to a REGISTRATION_FAILED
/// status. You can describe the container instance and see the reason for failure in
/// the statusReason
parameter. Once the container instance is terminated,
/// the instance transitions to a DEREGISTERING
status while the trunk elastic
/// network interface is deprovisioned. The instance then transitions to an INACTIVE
/// status.
///
///
///
/// The ACTIVE
status indicates that the container instance can accept tasks.
/// The DRAINING
indicates that new tasks aren't placed on the container
/// instance and any service tasks running on the container instance are removed if possible.
/// For more information, see Container
/// instance draining in the Amazon Elastic Container Service Developer Guide.
///
///
public string Status
{
get { return this._status; }
set { this._status = value; }
}
// Check to see if Status property is set
internal bool IsSetStatus()
{
return this._status != null;
}
///
/// Gets and sets the property StatusReason.
///
/// The reason that the container instance reached its current status.
///
///
public string StatusReason
{
get { return this._statusReason; }
set { this._statusReason = value; }
}
// Check to see if StatusReason property is set
internal bool IsSetStatusReason()
{
return this._statusReason != null;
}
///
/// Gets and sets the property Tags.
///
/// The metadata that you apply to the container instance to help you categorize and organize
/// them. Each tag consists of a key and an optional value. You define both.
///
///
///
/// The following basic restrictions apply to tags:
///
/// -
///
/// Maximum number of tags per resource - 50
///
///
-
///
/// For each resource, each tag key must be unique, and each tag key can have only one
/// value.
///
///
-
///
/// Maximum key length - 128 Unicode characters in UTF-8
///
///
-
///
/// Maximum value length - 256 Unicode characters in UTF-8
///
///
-
///
/// If your tagging schema is used across multiple services and resources, remember that
/// other services may have restrictions on allowed characters. Generally allowed characters
/// are: letters, numbers, and spaces representable in UTF-8, and the following characters:
/// + - = . _ : / @.
///
///
-
///
/// Tag keys and values are case-sensitive.
///
///
-
///
/// Do not use
aws:
, AWS:
, or any upper or lowercase combination
/// of such as a prefix for either keys or values as it is reserved for Amazon Web Services
/// use. You cannot edit or delete tag keys or values with this prefix. Tags with this
/// prefix do not count against your tags per resource limit.
///
///
///
[AWSProperty(Min=0, Max=50)]
public List Tags
{
get { return this._tags; }
set { this._tags = value; }
}
// Check to see if Tags property is set
internal bool IsSetTags()
{
return this._tags != null && this._tags.Count > 0;
}
///
/// Gets and sets the property Version.
///
/// The version counter for the container instance. Every time a container instance experiences
/// a change that triggers a CloudWatch event, the version counter is incremented. If
/// you're replicating your Amazon ECS container instance state with CloudWatch Events,
/// you can compare the version of a container instance reported by the Amazon ECS APIs
/// with the version reported in CloudWatch Events for the container instance (inside
/// the detail
object) to verify that the version in your event stream is
/// current.
///
///
public long Version
{
get { return this._version.GetValueOrDefault(); }
set { this._version = value; }
}
// Check to see if Version property is set
internal bool IsSetVersion()
{
return this._version.HasValue;
}
///
/// Gets and sets the property VersionInfo.
///
/// The version information for the Amazon ECS container agent and Docker daemon running
/// on the container instance.
///
///
public VersionInfo VersionInfo
{
get { return this._versionInfo; }
set { this._versionInfo = value; }
}
// Check to see if VersionInfo property is set
internal bool IsSetVersionInfo()
{
return this._versionInfo != null;
}
}
}