public class ContainerInstance
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
An EC2 instance that is running the Amazon ECS agent and has been registered with a cluster.
Modifier and Type | Field and Description |
---|---|
private java.lang.Boolean |
agentConnected
This parameter returns
true if the agent is actually
connected to Amazon ECS. |
private java.lang.String |
agentUpdateStatus
The status of the most recent agent update.
|
private SdkInternalList<Attribute> |
attributes
The attributes set for the container instance by the Amazon ECS container
agent at instance registration.
|
private java.lang.String |
containerInstanceArn
The Amazon Resource Name (ARN) of the container instance.
|
private java.lang.String |
ec2InstanceId
The EC2 instance ID of the container instance.
|
private java.lang.Integer |
pendingTasksCount
The number of tasks on the container instance that are in the
PENDING status. |
private SdkInternalList<Resource> |
registeredResources
The registered resources on the container instance that are in use by
current tasks.
|
private SdkInternalList<Resource> |
remainingResources
The remaining resources of the container instance that are available for
new tasks.
|
private java.lang.Integer |
runningTasksCount
The number of tasks on the container instance that are in the
RUNNING status. |
private java.lang.String |
status
The status of the container instance.
|
private VersionInfo |
versionInfo
The version information for the Amazon ECS container agent and Docker
daemon running on the container instance.
|
Constructor and Description |
---|
ContainerInstance() |
Modifier and Type | Method and Description |
---|---|
ContainerInstance |
clone() |
boolean |
equals(java.lang.Object obj) |
java.lang.Boolean |
getAgentConnected()
This parameter returns
true if the agent is actually
connected to Amazon ECS. |
java.lang.String |
getAgentUpdateStatus()
The status of the most recent agent update.
|
java.util.List<Attribute> |
getAttributes()
The attributes set for the container instance by the Amazon ECS container
agent at instance registration.
|
java.lang.String |
getContainerInstanceArn()
The Amazon Resource Name (ARN) of the container instance.
|
java.lang.String |
getEc2InstanceId()
The EC2 instance ID of the container instance.
|
java.lang.Integer |
getPendingTasksCount()
The number of tasks on the container instance that are in the
PENDING status. |
java.util.List<Resource> |
getRegisteredResources()
The registered resources on the container instance that are in use by
current tasks.
|
java.util.List<Resource> |
getRemainingResources()
The remaining resources of the container instance that are available for
new tasks.
|
java.lang.Integer |
getRunningTasksCount()
The number of tasks on the container instance that are in the
RUNNING status. |
java.lang.String |
getStatus()
The status of the container instance.
|
VersionInfo |
getVersionInfo()
The version information for the Amazon ECS container agent and Docker
daemon running on the container instance.
|
int |
hashCode() |
java.lang.Boolean |
isAgentConnected()
This parameter returns
true if the agent is actually
connected to Amazon ECS. |
void |
setAgentConnected(java.lang.Boolean agentConnected)
This parameter returns
true if the agent is actually
connected to Amazon ECS. |
void |
setAgentUpdateStatus(AgentUpdateStatus agentUpdateStatus)
The status of the most recent agent update.
|
void |
setAgentUpdateStatus(java.lang.String agentUpdateStatus)
The status of the most recent agent update.
|
void |
setAttributes(java.util.Collection<Attribute> attributes)
The attributes set for the container instance by the Amazon ECS container
agent at instance registration.
|
void |
setContainerInstanceArn(java.lang.String containerInstanceArn)
The Amazon Resource Name (ARN) of the container instance.
|
void |
setEc2InstanceId(java.lang.String ec2InstanceId)
The EC2 instance ID of the container instance.
|
void |
setPendingTasksCount(java.lang.Integer pendingTasksCount)
The number of tasks on the container instance that are in the
PENDING status. |
void |
setRegisteredResources(java.util.Collection<Resource> registeredResources)
The registered resources on the container instance that are in use by
current tasks.
|
void |
setRemainingResources(java.util.Collection<Resource> remainingResources)
The remaining resources of the container instance that are available for
new tasks.
|
void |
setRunningTasksCount(java.lang.Integer runningTasksCount)
The number of tasks on the container instance that are in the
RUNNING status. |
void |
setStatus(java.lang.String status)
The status of the container instance.
|
void |
setVersionInfo(VersionInfo versionInfo)
The version information for the Amazon ECS container agent and Docker
daemon running on the container instance.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
ContainerInstance |
withAgentConnected(java.lang.Boolean agentConnected)
This parameter returns
true if the agent is actually
connected to Amazon ECS. |
ContainerInstance |
withAgentUpdateStatus(AgentUpdateStatus agentUpdateStatus)
The status of the most recent agent update.
|
ContainerInstance |
withAgentUpdateStatus(java.lang.String agentUpdateStatus)
The status of the most recent agent update.
|
ContainerInstance |
withAttributes(Attribute... attributes)
The attributes set for the container instance by the Amazon ECS container
agent at instance registration.
|
ContainerInstance |
withAttributes(java.util.Collection<Attribute> attributes)
The attributes set for the container instance by the Amazon ECS container
agent at instance registration.
|
ContainerInstance |
withContainerInstanceArn(java.lang.String containerInstanceArn)
The Amazon Resource Name (ARN) of the container instance.
|
ContainerInstance |
withEc2InstanceId(java.lang.String ec2InstanceId)
The EC2 instance ID of the container instance.
|
ContainerInstance |
withPendingTasksCount(java.lang.Integer pendingTasksCount)
The number of tasks on the container instance that are in the
PENDING status. |
ContainerInstance |
withRegisteredResources(java.util.Collection<Resource> registeredResources)
The registered resources on the container instance that are in use by
current tasks.
|
ContainerInstance |
withRegisteredResources(Resource... registeredResources)
The registered resources on the container instance that are in use by
current tasks.
|
ContainerInstance |
withRemainingResources(java.util.Collection<Resource> remainingResources)
The remaining resources of the container instance that are available for
new tasks.
|
ContainerInstance |
withRemainingResources(Resource... remainingResources)
The remaining resources of the container instance that are available for
new tasks.
|
ContainerInstance |
withRunningTasksCount(java.lang.Integer runningTasksCount)
The number of tasks on the container instance that are in the
RUNNING status. |
ContainerInstance |
withStatus(java.lang.String status)
The status of the container instance.
|
ContainerInstance |
withVersionInfo(VersionInfo versionInfo)
The version information for the Amazon ECS container agent and Docker
daemon running on the container instance.
|
private java.lang.String containerInstanceArn
The Amazon Resource Name (ARN) of the container instance. The ARN
contains the arn:aws:ecs
namespace, followed by the region
of the container instance, the AWS account ID of the container instance
owner, the container-instance
namespace, and then the
container instance ID. For example,
arn:aws:ecs:region:aws_account_id:container-instance/container_instance_ID
.
private java.lang.String ec2InstanceId
The EC2 instance ID of the container instance.
private VersionInfo versionInfo
The version information for the Amazon ECS container agent and Docker daemon running on the container instance.
private SdkInternalList<Resource> remainingResources
The remaining resources of the container instance that are available for new tasks.
private SdkInternalList<Resource> registeredResources
The registered resources on the container instance that are in use by current tasks.
private java.lang.String status
The status of the container instance. The valid values are
ACTIVE
or INACTIVE
. ACTIVE
indicates that the container instance can accept tasks.
private java.lang.Boolean agentConnected
This parameter returns true
if the agent is actually
connected to Amazon ECS. Registered instances with an agent that may be
unhealthy or stopped return false
, and instances without a
connected agent cannot accept placement requests.
private java.lang.Integer runningTasksCount
The number of tasks on the container instance that are in the
RUNNING
status.
private java.lang.Integer pendingTasksCount
The number of tasks on the container instance that are in the
PENDING
status.
private java.lang.String agentUpdateStatus
The status of the most recent agent update. If an update has never been
requested, this value is NULL
.
private SdkInternalList<Attribute> attributes
The attributes set for the container instance by the Amazon ECS container agent at instance registration.
public void setContainerInstanceArn(java.lang.String containerInstanceArn)
The Amazon Resource Name (ARN) of the container instance. The ARN
contains the arn:aws:ecs
namespace, followed by the region
of the container instance, the AWS account ID of the container instance
owner, the container-instance
namespace, and then the
container instance ID. For example,
arn:aws:ecs:region:aws_account_id:container-instance/container_instance_ID
.
containerInstanceArn
- The Amazon Resource Name (ARN) of the container instance. The ARN
contains the arn:aws:ecs
namespace, followed by the
region of the container instance, the AWS account ID of the
container instance owner, the container-instance
namespace, and then the container instance ID. For example,
arn:aws:ecs:region:aws_account_id:container-instance/container_instance_ID
.public java.lang.String getContainerInstanceArn()
The Amazon Resource Name (ARN) of the container instance. The ARN
contains the arn:aws:ecs
namespace, followed by the region
of the container instance, the AWS account ID of the container instance
owner, the container-instance
namespace, and then the
container instance ID. For example,
arn:aws:ecs:region:aws_account_id:container-instance/container_instance_ID
.
arn:aws:ecs
namespace, followed by the
region of the container instance, the AWS account ID of the
container instance owner, the container-instance
namespace, and then the container instance ID. For example,
arn:aws:ecs:region:aws_account_id:container-instance/container_instance_ID
.public ContainerInstance withContainerInstanceArn(java.lang.String containerInstanceArn)
The Amazon Resource Name (ARN) of the container instance. The ARN
contains the arn:aws:ecs
namespace, followed by the region
of the container instance, the AWS account ID of the container instance
owner, the container-instance
namespace, and then the
container instance ID. For example,
arn:aws:ecs:region:aws_account_id:container-instance/container_instance_ID
.
containerInstanceArn
- The Amazon Resource Name (ARN) of the container instance. The ARN
contains the arn:aws:ecs
namespace, followed by the
region of the container instance, the AWS account ID of the
container instance owner, the container-instance
namespace, and then the container instance ID. For example,
arn:aws:ecs:region:aws_account_id:container-instance/container_instance_ID
.public void setEc2InstanceId(java.lang.String ec2InstanceId)
The EC2 instance ID of the container instance.
ec2InstanceId
- The EC2 instance ID of the container instance.public java.lang.String getEc2InstanceId()
The EC2 instance ID of the container instance.
public ContainerInstance withEc2InstanceId(java.lang.String ec2InstanceId)
The EC2 instance ID of the container instance.
ec2InstanceId
- The EC2 instance ID of the container instance.public void setVersionInfo(VersionInfo versionInfo)
The version information for the Amazon ECS container agent and Docker daemon running on the container instance.
versionInfo
- The version information for the Amazon ECS container agent and
Docker daemon running on the container instance.public VersionInfo getVersionInfo()
The version information for the Amazon ECS container agent and Docker daemon running on the container instance.
public ContainerInstance withVersionInfo(VersionInfo versionInfo)
The version information for the Amazon ECS container agent and Docker daemon running on the container instance.
versionInfo
- The version information for the Amazon ECS container agent and
Docker daemon running on the container instance.public java.util.List<Resource> getRemainingResources()
The remaining resources of the container instance that are available for new tasks.
public void setRemainingResources(java.util.Collection<Resource> remainingResources)
The remaining resources of the container instance that are available for new tasks.
remainingResources
- The remaining resources of the container instance that are
available for new tasks.public ContainerInstance withRemainingResources(Resource... remainingResources)
The remaining resources of the container instance that are available for new tasks.
NOTE: This method appends the values to the existing list (if
any). Use setRemainingResources(java.util.Collection)
or
withRemainingResources(java.util.Collection)
if you want to
override the existing values.
remainingResources
- The remaining resources of the container instance that are
available for new tasks.public ContainerInstance withRemainingResources(java.util.Collection<Resource> remainingResources)
The remaining resources of the container instance that are available for new tasks.
remainingResources
- The remaining resources of the container instance that are
available for new tasks.public java.util.List<Resource> getRegisteredResources()
The registered resources on the container instance that are in use by current tasks.
public void setRegisteredResources(java.util.Collection<Resource> registeredResources)
The registered resources on the container instance that are in use by current tasks.
registeredResources
- The registered resources on the container instance that are in use
by current tasks.public ContainerInstance withRegisteredResources(Resource... registeredResources)
The registered resources on the container instance that are in use by current tasks.
NOTE: This method appends the values to the existing list (if
any). Use setRegisteredResources(java.util.Collection)
or
withRegisteredResources(java.util.Collection)
if you want to
override the existing values.
registeredResources
- The registered resources on the container instance that are in use
by current tasks.public ContainerInstance withRegisteredResources(java.util.Collection<Resource> registeredResources)
The registered resources on the container instance that are in use by current tasks.
registeredResources
- The registered resources on the container instance that are in use
by current tasks.public void setStatus(java.lang.String status)
The status of the container instance. The valid values are
ACTIVE
or INACTIVE
. ACTIVE
indicates that the container instance can accept tasks.
status
- The status of the container instance. The valid values are
ACTIVE
or INACTIVE
. ACTIVE
indicates that the container instance can accept tasks.public java.lang.String getStatus()
The status of the container instance. The valid values are
ACTIVE
or INACTIVE
. ACTIVE
indicates that the container instance can accept tasks.
ACTIVE
or INACTIVE
. ACTIVE
indicates that the container instance can accept tasks.public ContainerInstance withStatus(java.lang.String status)
The status of the container instance. The valid values are
ACTIVE
or INACTIVE
. ACTIVE
indicates that the container instance can accept tasks.
status
- The status of the container instance. The valid values are
ACTIVE
or INACTIVE
. ACTIVE
indicates that the container instance can accept tasks.public void setAgentConnected(java.lang.Boolean agentConnected)
This parameter returns true
if the agent is actually
connected to Amazon ECS. Registered instances with an agent that may be
unhealthy or stopped return false
, and instances without a
connected agent cannot accept placement requests.
agentConnected
- This parameter returns true
if the agent is actually
connected to Amazon ECS. Registered instances with an agent that
may be unhealthy or stopped return false
, and
instances without a connected agent cannot accept placement
requests.public java.lang.Boolean getAgentConnected()
This parameter returns true
if the agent is actually
connected to Amazon ECS. Registered instances with an agent that may be
unhealthy or stopped return false
, and instances without a
connected agent cannot accept placement requests.
true
if the agent is actually
connected to Amazon ECS. Registered instances with an agent that
may be unhealthy or stopped return false
, and
instances without a connected agent cannot accept placement
requests.public ContainerInstance withAgentConnected(java.lang.Boolean agentConnected)
This parameter returns true
if the agent is actually
connected to Amazon ECS. Registered instances with an agent that may be
unhealthy or stopped return false
, and instances without a
connected agent cannot accept placement requests.
agentConnected
- This parameter returns true
if the agent is actually
connected to Amazon ECS. Registered instances with an agent that
may be unhealthy or stopped return false
, and
instances without a connected agent cannot accept placement
requests.public java.lang.Boolean isAgentConnected()
This parameter returns true
if the agent is actually
connected to Amazon ECS. Registered instances with an agent that may be
unhealthy or stopped return false
, and instances without a
connected agent cannot accept placement requests.
true
if the agent is actually
connected to Amazon ECS. Registered instances with an agent that
may be unhealthy or stopped return false
, and
instances without a connected agent cannot accept placement
requests.public void setRunningTasksCount(java.lang.Integer runningTasksCount)
The number of tasks on the container instance that are in the
RUNNING
status.
runningTasksCount
- The number of tasks on the container instance that are in the
RUNNING
status.public java.lang.Integer getRunningTasksCount()
The number of tasks on the container instance that are in the
RUNNING
status.
RUNNING
status.public ContainerInstance withRunningTasksCount(java.lang.Integer runningTasksCount)
The number of tasks on the container instance that are in the
RUNNING
status.
runningTasksCount
- The number of tasks on the container instance that are in the
RUNNING
status.public void setPendingTasksCount(java.lang.Integer pendingTasksCount)
The number of tasks on the container instance that are in the
PENDING
status.
pendingTasksCount
- The number of tasks on the container instance that are in the
PENDING
status.public java.lang.Integer getPendingTasksCount()
The number of tasks on the container instance that are in the
PENDING
status.
PENDING
status.public ContainerInstance withPendingTasksCount(java.lang.Integer pendingTasksCount)
The number of tasks on the container instance that are in the
PENDING
status.
pendingTasksCount
- The number of tasks on the container instance that are in the
PENDING
status.public void setAgentUpdateStatus(java.lang.String agentUpdateStatus)
The status of the most recent agent update. If an update has never been
requested, this value is NULL
.
agentUpdateStatus
- The status of the most recent agent update. If an update has never
been requested, this value is NULL
.AgentUpdateStatus
public java.lang.String getAgentUpdateStatus()
The status of the most recent agent update. If an update has never been
requested, this value is NULL
.
NULL
.AgentUpdateStatus
public ContainerInstance withAgentUpdateStatus(java.lang.String agentUpdateStatus)
The status of the most recent agent update. If an update has never been
requested, this value is NULL
.
agentUpdateStatus
- The status of the most recent agent update. If an update has never
been requested, this value is NULL
.AgentUpdateStatus
public void setAgentUpdateStatus(AgentUpdateStatus agentUpdateStatus)
The status of the most recent agent update. If an update has never been
requested, this value is NULL
.
agentUpdateStatus
- The status of the most recent agent update. If an update has never
been requested, this value is NULL
.AgentUpdateStatus
public ContainerInstance withAgentUpdateStatus(AgentUpdateStatus agentUpdateStatus)
The status of the most recent agent update. If an update has never been
requested, this value is NULL
.
agentUpdateStatus
- The status of the most recent agent update. If an update has never
been requested, this value is NULL
.AgentUpdateStatus
public java.util.List<Attribute> getAttributes()
The attributes set for the container instance by the Amazon ECS container agent at instance registration.
public void setAttributes(java.util.Collection<Attribute> attributes)
The attributes set for the container instance by the Amazon ECS container agent at instance registration.
attributes
- The attributes set for the container instance by the Amazon ECS
container agent at instance registration.public ContainerInstance withAttributes(Attribute... attributes)
The attributes set for the container instance by the Amazon ECS container agent at instance registration.
NOTE: This method appends the values to the existing list (if
any). Use setAttributes(java.util.Collection)
or
withAttributes(java.util.Collection)
if you want to override the
existing values.
attributes
- The attributes set for the container instance by the Amazon ECS
container agent at instance registration.public ContainerInstance withAttributes(java.util.Collection<Attribute> attributes)
The attributes set for the container instance by the Amazon ECS container agent at instance registration.
attributes
- The attributes set for the container instance by the Amazon ECS
container agent at instance registration.public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public ContainerInstance clone()
clone
in class java.lang.Object