Class ContainerInstance
- All Implemented Interfaces:
Serializable
,Cloneable
An EC2 instance that is running the Amazon ECS agent and has been registered with a cluster.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
This parameter returnstrue
if the agent is actually connected to Amazon ECS.The status of the most recent agent update.The attributes set for the container instance by the Amazon ECS container agent at instance registration.The Amazon Resource Name (ARN) of the container instance.The EC2 instance ID of the container instance.The number of tasks on the container instance that are in thePENDING
status.The registered resources on the container instance that are in use by current tasks.The remaining resources of the container instance that are available for new tasks.The number of tasks on the container instance that are in theRUNNING
status.The status of the container instance.The version information for the Amazon ECS container agent and Docker daemon running on the container instance.int
hashCode()
This parameter returnstrue
if the agent is actually connected to Amazon ECS.void
setAgentConnected
(Boolean agentConnected) This parameter returnstrue
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 thePENDING
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 theRUNNING
status.void
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.toString()
Returns a string representation of this object; useful for testing and debugging.withAgentConnected
(Boolean agentConnected) This parameter returnstrue
if the agent is actually connected to Amazon ECS.withAgentUpdateStatus
(AgentUpdateStatus agentUpdateStatus) The status of the most recent agent update.withAgentUpdateStatus
(String agentUpdateStatus) The status of the most recent agent update.withAttributes
(Attribute... attributes) The attributes set for the container instance by the Amazon ECS container agent at instance registration.withAttributes
(Collection<Attribute> attributes) The attributes set for the container instance by the Amazon ECS container agent at instance registration.withContainerInstanceArn
(String containerInstanceArn) The Amazon Resource Name (ARN) of the container instance.withEc2InstanceId
(String ec2InstanceId) The EC2 instance ID of the container instance.withPendingTasksCount
(Integer pendingTasksCount) The number of tasks on the container instance that are in thePENDING
status.withRegisteredResources
(Resource... registeredResources) The registered resources on the container instance that are in use by current tasks.withRegisteredResources
(Collection<Resource> registeredResources) The registered resources on the container instance that are in use by current tasks.withRemainingResources
(Resource... remainingResources) The remaining resources of the container instance that are available for new tasks.withRemainingResources
(Collection<Resource> remainingResources) The remaining resources of the container instance that are available for new tasks.withRunningTasksCount
(Integer runningTasksCount) The number of tasks on the container instance that are in theRUNNING
status.withStatus
(String status) The status of the container instance.withVersionInfo
(VersionInfo versionInfo) The version information for the Amazon ECS container agent and Docker daemon running on the container instance.
-
Constructor Details
-
ContainerInstance
public ContainerInstance()
-
-
Method Details
-
setContainerInstanceArn
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, thecontainer-instance
namespace, and then the container instance ID. For example,arn:aws:ecs:region:aws_account_id:container-instance/container_instance_ID
.- Parameters:
containerInstanceArn
- The Amazon Resource Name (ARN) of the container instance. The ARN contains thearn:aws:ecs
namespace, followed by the region of the container instance, the AWS account ID of the container instance owner, thecontainer-instance
namespace, and then the container instance ID. For example,arn:aws:ecs:region:aws_account_id:container-instance/container_instance_ID
.
-
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, thecontainer-instance
namespace, and then the container instance ID. For example,arn:aws:ecs:region:aws_account_id:container-instance/container_instance_ID
.- Returns:
- 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, thecontainer-instance
namespace, and then the container instance ID. For example,arn:aws:ecs:region:aws_account_id:container-instance/container_instance_ID
.
-
withContainerInstanceArn
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, thecontainer-instance
namespace, and then the container instance ID. For example,arn:aws:ecs:region:aws_account_id:container-instance/container_instance_ID
.- Parameters:
containerInstanceArn
- The Amazon Resource Name (ARN) of the container instance. The ARN contains thearn:aws:ecs
namespace, followed by the region of the container instance, the AWS account ID of the container instance owner, thecontainer-instance
namespace, and then the container instance ID. For example,arn:aws:ecs:region:aws_account_id:container-instance/container_instance_ID
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setEc2InstanceId
The EC2 instance ID of the container instance.
- Parameters:
ec2InstanceId
- The EC2 instance ID of the container instance.
-
getEc2InstanceId
The EC2 instance ID of the container instance.
- Returns:
- The EC2 instance ID of the container instance.
-
withEc2InstanceId
The EC2 instance ID of the container instance.
- Parameters:
ec2InstanceId
- The EC2 instance ID of the container instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setVersionInfo
The version information for the Amazon ECS container agent and Docker daemon running on the container instance.
- Parameters:
versionInfo
- The version information for the Amazon ECS container agent and Docker daemon running on the container instance.
-
getVersionInfo
The version information for the Amazon ECS container agent and Docker daemon running on the container instance.
- Returns:
- The version information for the Amazon ECS container agent and Docker daemon running on the container instance.
-
withVersionInfo
The version information for the Amazon ECS container agent and Docker daemon running on the container instance.
- Parameters:
versionInfo
- The version information for the Amazon ECS container agent and Docker daemon running on the container instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getRemainingResources
The remaining resources of the container instance that are available for new tasks.
- Returns:
- The remaining resources of the container instance that are available for new tasks.
-
setRemainingResources
The remaining resources of the container instance that are available for new tasks.
- Parameters:
remainingResources
- The remaining resources of the container instance that are available for new tasks.
-
withRemainingResources
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)
orwithRemainingResources(java.util.Collection)
if you want to override the existing values.- Parameters:
remainingResources
- The remaining resources of the container instance that are available for new tasks.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withRemainingResources
The remaining resources of the container instance that are available for new tasks.
- Parameters:
remainingResources
- The remaining resources of the container instance that are available for new tasks.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getRegisteredResources
The registered resources on the container instance that are in use by current tasks.
- Returns:
- The registered resources on the container instance that are in use by current tasks.
-
setRegisteredResources
The registered resources on the container instance that are in use by current tasks.
- Parameters:
registeredResources
- The registered resources on the container instance that are in use by current tasks.
-
withRegisteredResources
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)
orwithRegisteredResources(java.util.Collection)
if you want to override the existing values.- Parameters:
registeredResources
- The registered resources on the container instance that are in use by current tasks.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withRegisteredResources
The registered resources on the container instance that are in use by current tasks.
- Parameters:
registeredResources
- The registered resources on the container instance that are in use by current tasks.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setStatus
The status of the container instance. The valid values are
ACTIVE
orINACTIVE
.ACTIVE
indicates that the container instance can accept tasks.- Parameters:
status
- The status of the container instance. The valid values areACTIVE
orINACTIVE
.ACTIVE
indicates that the container instance can accept tasks.
-
getStatus
The status of the container instance. The valid values are
ACTIVE
orINACTIVE
.ACTIVE
indicates that the container instance can accept tasks.- Returns:
- The status of the container instance. The valid values are
ACTIVE
orINACTIVE
.ACTIVE
indicates that the container instance can accept tasks.
-
withStatus
The status of the container instance. The valid values are
ACTIVE
orINACTIVE
.ACTIVE
indicates that the container instance can accept tasks.- Parameters:
status
- The status of the container instance. The valid values areACTIVE
orINACTIVE
.ACTIVE
indicates that the container instance can accept tasks.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setAgentConnected
This parameter returns
true
if the agent is actually connected to Amazon ECS. Registered instances with an agent that may be unhealthy or stopped returnfalse
, and instances without a connected agent cannot accept placement requests.- Parameters:
agentConnected
- This parameter returnstrue
if the agent is actually connected to Amazon ECS. Registered instances with an agent that may be unhealthy or stopped returnfalse
, and instances without a connected agent cannot accept placement requests.
-
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 returnfalse
, and instances without a connected agent cannot accept placement requests.- Returns:
- This parameter returns
true
if the agent is actually connected to Amazon ECS. Registered instances with an agent that may be unhealthy or stopped returnfalse
, and instances without a connected agent cannot accept placement requests.
-
withAgentConnected
This parameter returns
true
if the agent is actually connected to Amazon ECS. Registered instances with an agent that may be unhealthy or stopped returnfalse
, and instances without a connected agent cannot accept placement requests.- Parameters:
agentConnected
- This parameter returnstrue
if the agent is actually connected to Amazon ECS. Registered instances with an agent that may be unhealthy or stopped returnfalse
, and instances without a connected agent cannot accept placement requests.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
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 returnfalse
, and instances without a connected agent cannot accept placement requests.- Returns:
- This parameter returns
true
if the agent is actually connected to Amazon ECS. Registered instances with an agent that may be unhealthy or stopped returnfalse
, and instances without a connected agent cannot accept placement requests.
-
setRunningTasksCount
The number of tasks on the container instance that are in the
RUNNING
status.- Parameters:
runningTasksCount
- The number of tasks on the container instance that are in theRUNNING
status.
-
getRunningTasksCount
The number of tasks on the container instance that are in the
RUNNING
status.- Returns:
- The number of tasks on the container instance that are in the
RUNNING
status.
-
withRunningTasksCount
The number of tasks on the container instance that are in the
RUNNING
status.- Parameters:
runningTasksCount
- The number of tasks on the container instance that are in theRUNNING
status.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setPendingTasksCount
The number of tasks on the container instance that are in the
PENDING
status.- Parameters:
pendingTasksCount
- The number of tasks on the container instance that are in thePENDING
status.
-
getPendingTasksCount
The number of tasks on the container instance that are in the
PENDING
status.- Returns:
- The number of tasks on the container instance that are in the
PENDING
status.
-
withPendingTasksCount
The number of tasks on the container instance that are in the
PENDING
status.- Parameters:
pendingTasksCount
- The number of tasks on the container instance that are in thePENDING
status.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setAgentUpdateStatus
The status of the most recent agent update. If an update has never been requested, this value is
NULL
.- Parameters:
agentUpdateStatus
- The status of the most recent agent update. If an update has never been requested, this value isNULL
.- See Also:
-
getAgentUpdateStatus
The status of the most recent agent update. If an update has never been requested, this value is
NULL
.- Returns:
- The status of the most recent agent update. If an update has
never been requested, this value is
NULL
. - See Also:
-
withAgentUpdateStatus
The status of the most recent agent update. If an update has never been requested, this value is
NULL
.- Parameters:
agentUpdateStatus
- The status of the most recent agent update. If an update has never been requested, this value isNULL
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
setAgentUpdateStatus
The status of the most recent agent update. If an update has never been requested, this value is
NULL
.- Parameters:
agentUpdateStatus
- The status of the most recent agent update. If an update has never been requested, this value isNULL
.- See Also:
-
withAgentUpdateStatus
The status of the most recent agent update. If an update has never been requested, this value is
NULL
.- Parameters:
agentUpdateStatus
- The status of the most recent agent update. If an update has never been requested, this value isNULL
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
getAttributes
The attributes set for the container instance by the Amazon ECS container agent at instance registration.
- Returns:
- The attributes set for the container instance by the Amazon ECS container agent at instance registration.
-
setAttributes
The attributes set for the container instance by the Amazon ECS container agent at instance registration.
- Parameters:
attributes
- The attributes set for the container instance by the Amazon ECS container agent at instance registration.
-
withAttributes
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)
orwithAttributes(java.util.Collection)
if you want to override the existing values.- Parameters:
attributes
- The attributes set for the container instance by the Amazon ECS container agent at instance registration.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withAttributes
The attributes set for the container instance by the Amazon ECS container agent at instance registration.
- Parameters:
attributes
- The attributes set for the container instance by the Amazon ECS container agent at instance registration.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
Returns a string representation of this object; useful for testing and debugging. -
equals
-
hashCode
public int hashCode() -
clone
-