public class ContainerInstance extends Object implements Serializable, Cloneable
An EC2 instance that is running the Amazon ECS agent and has been registered with a cluster.
Constructor and Description |
---|
ContainerInstance() |
Modifier and Type | Method and Description |
---|---|
ContainerInstance |
clone() |
boolean |
equals(Object obj) |
Boolean |
getAgentConnected()
This parameter returns
true if the agent is actually
connected to Amazon ECS. |
String |
getAgentUpdateStatus()
The status of the most recent agent update.
|
List<Attribute> |
getAttributes()
The attributes set for the container instance by the Amazon ECS
container agent at instance registration.
|
String |
getContainerInstanceArn()
The Amazon Resource Name (ARN) of the container instance.
|
String |
getEc2InstanceId()
The EC2 instance ID of the container instance.
|
Integer |
getPendingTasksCount()
The number of tasks on the container instance that are in the
PENDING status. |
List<Resource> |
getRegisteredResources()
The registered resources on the container instance that are in use by
current tasks.
|
List<Resource> |
getRemainingResources()
The remaining resources of the container instance that are available
for new tasks.
|
Integer |
getRunningTasksCount()
The number of tasks on the container instance that are in the
RUNNING status. |
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() |
Boolean |
isAgentConnected()
This parameter returns
true if the agent is actually
connected to Amazon ECS. |
void |
setAgentConnected(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(String agentUpdateStatus)
The status of the most recent agent update.
|
void |
setAttributes(Collection<Attribute> attributes)
The attributes set for the container instance by the Amazon ECS
container agent at instance registration.
|
void |
setContainerInstanceArn(String containerInstanceArn)
The Amazon Resource Name (ARN) of the container instance.
|
void |
setEc2InstanceId(String ec2InstanceId)
The EC2 instance ID of the container instance.
|
void |
setPendingTasksCount(Integer pendingTasksCount)
The number of tasks on the container instance that are in the
PENDING status. |
void |
setRegisteredResources(Collection<Resource> registeredResources)
The registered resources on the container instance that are in use by
current tasks.
|
void |
setRemainingResources(Collection<Resource> remainingResources)
The remaining resources of the container instance that are available
for new tasks.
|
void |
setRunningTasksCount(Integer runningTasksCount)
The number of tasks on the container instance that are in the
RUNNING status. |
void |
setStatus(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.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
ContainerInstance |
withAgentConnected(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(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(Collection<Attribute> attributes)
The attributes set for the container instance by the Amazon ECS
container agent at instance registration.
|
ContainerInstance |
withContainerInstanceArn(String containerInstanceArn)
The Amazon Resource Name (ARN) of the container instance.
|
ContainerInstance |
withEc2InstanceId(String ec2InstanceId)
The EC2 instance ID of the container instance.
|
ContainerInstance |
withPendingTasksCount(Integer pendingTasksCount)
The number of tasks on the container instance that are in the
PENDING status. |
ContainerInstance |
withRegisteredResources(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(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(Integer runningTasksCount)
The number of tasks on the container instance that are in the
RUNNING status. |
ContainerInstance |
withStatus(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.
|
public String getContainerInstanceArn()
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 void setContainerInstanceArn(String containerInstanceArn)
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 ContainerInstance withContainerInstanceArn(String containerInstanceArn)
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.
Returns a reference to this object so that method calls can be chained together.
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 String getEc2InstanceId()
public void setEc2InstanceId(String ec2InstanceId)
ec2InstanceId
- The EC2 instance ID of the container instance.public ContainerInstance withEc2InstanceId(String ec2InstanceId)
Returns a reference to this object so that method calls can be chained together.
ec2InstanceId
- The EC2 instance ID of the container instance.public VersionInfo getVersionInfo()
public void setVersionInfo(VersionInfo versionInfo)
versionInfo
- The version information for the Amazon ECS container agent and Docker
daemon running on the container instance.public ContainerInstance withVersionInfo(VersionInfo versionInfo)
Returns a reference to this object so that method calls can be chained together.
versionInfo
- The version information for the Amazon ECS container agent and Docker
daemon running on the container instance.public List<Resource> getRemainingResources()
public void setRemainingResources(Collection<Resource> remainingResources)
remainingResources
- The remaining resources of the container instance that are available
for new tasks.public ContainerInstance withRemainingResources(Resource... remainingResources)
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.
Returns a reference to this object so that method calls can be chained together.
remainingResources
- The remaining resources of the container instance that are available
for new tasks.public ContainerInstance withRemainingResources(Collection<Resource> remainingResources)
Returns a reference to this object so that method calls can be chained together.
remainingResources
- The remaining resources of the container instance that are available
for new tasks.public List<Resource> getRegisteredResources()
public void setRegisteredResources(Collection<Resource> registeredResources)
registeredResources
- The registered resources on the container instance that are in use by
current tasks.public ContainerInstance withRegisteredResources(Resource... registeredResources)
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.
Returns a reference to this object so that method calls can be chained together.
registeredResources
- The registered resources on the container instance that are in use by
current tasks.public ContainerInstance withRegisteredResources(Collection<Resource> registeredResources)
Returns a reference to this object so that method calls can be chained together.
registeredResources
- The registered resources on the container instance that are in use by
current tasks.public String getStatus()
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 void setStatus(String status)
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 ContainerInstance withStatus(String status)
ACTIVE
or INACTIVE
. ACTIVE
indicates that the container instance can accept tasks.
Returns a reference to this object so that method calls can be chained together.
status
- The status of the container instance. The valid values are
ACTIVE
or INACTIVE
. ACTIVE
indicates that the container instance can accept tasks.public Boolean isAgentConnected()
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 setAgentConnected(Boolean agentConnected)
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 ContainerInstance withAgentConnected(Boolean agentConnected)
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.
Returns a reference to this object so that method calls can be chained together.
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 Boolean getAgentConnected()
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 Integer getRunningTasksCount()
RUNNING
status.RUNNING
status.public void setRunningTasksCount(Integer runningTasksCount)
RUNNING
status.runningTasksCount
- The number of tasks on the container instance that are in the
RUNNING
status.public ContainerInstance withRunningTasksCount(Integer runningTasksCount)
RUNNING
status.
Returns a reference to this object so that method calls can be chained together.
runningTasksCount
- The number of tasks on the container instance that are in the
RUNNING
status.public Integer getPendingTasksCount()
PENDING
status.PENDING
status.public void setPendingTasksCount(Integer pendingTasksCount)
PENDING
status.pendingTasksCount
- The number of tasks on the container instance that are in the
PENDING
status.public ContainerInstance withPendingTasksCount(Integer pendingTasksCount)
PENDING
status.
Returns a reference to this object so that method calls can be chained together.
pendingTasksCount
- The number of tasks on the container instance that are in the
PENDING
status.public String getAgentUpdateStatus()
NULL
.
Constraints:
Allowed Values: PENDING, STAGING, STAGED, UPDATING, UPDATED, FAILED
NULL
.AgentUpdateStatus
public void setAgentUpdateStatus(String agentUpdateStatus)
NULL
.
Constraints:
Allowed Values: PENDING, STAGING, STAGED, UPDATING, UPDATED, FAILED
agentUpdateStatus
- The status of the most recent agent update. If an update has never
been requested, this value is NULL
.AgentUpdateStatus
public ContainerInstance withAgentUpdateStatus(String agentUpdateStatus)
NULL
.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: PENDING, STAGING, STAGED, UPDATING, UPDATED, FAILED
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)
NULL
.
Constraints:
Allowed Values: PENDING, STAGING, STAGED, UPDATING, UPDATED, FAILED
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)
NULL
.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: PENDING, STAGING, STAGED, UPDATING, UPDATED, FAILED
agentUpdateStatus
- The status of the most recent agent update. If an update has never
been requested, this value is NULL
.AgentUpdateStatus
public List<Attribute> getAttributes()
public void setAttributes(Collection<Attribute> attributes)
attributes
- The attributes set for the container instance by the Amazon ECS
container agent at instance registration.public ContainerInstance withAttributes(Attribute... attributes)
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.
Returns a reference to this object so that method calls can be chained together.
attributes
- The attributes set for the container instance by the Amazon ECS
container agent at instance registration.public ContainerInstance withAttributes(Collection<Attribute> attributes)
Returns a reference to this object so that method calls can be chained together.
attributes
- The attributes set for the container instance by the Amazon ECS
container agent at instance registration.public String toString()
toString
in class Object
Object.toString()
public ContainerInstance clone()
Copyright © 2015. All rights reserved.