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()booleanThis parameter returnstrueif 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 thePENDINGstatus.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 theRUNNINGstatus.The status of the container instance.The version information for the Amazon ECS container agent and Docker daemon running on the container instance.inthashCode()This parameter returnstrueif the agent is actually connected to Amazon ECS.voidsetAgentConnected(Boolean agentConnected) This parameter returnstrueif the agent is actually connected to Amazon ECS.voidsetAgentUpdateStatus(AgentUpdateStatus agentUpdateStatus) The status of the most recent agent update.voidsetAgentUpdateStatus(String agentUpdateStatus) The status of the most recent agent update.voidsetAttributes(Collection<Attribute> attributes) The attributes set for the container instance by the Amazon ECS container agent at instance registration.voidsetContainerInstanceArn(String containerInstanceArn) The Amazon Resource Name (ARN) of the container instance.voidsetEc2InstanceId(String ec2InstanceId) The EC2 instance ID of the container instance.voidsetPendingTasksCount(Integer pendingTasksCount) The number of tasks on the container instance that are in thePENDINGstatus.voidsetRegisteredResources(Collection<Resource> registeredResources) The registered resources on the container instance that are in use by current tasks.voidsetRemainingResources(Collection<Resource> remainingResources) The remaining resources of the container instance that are available for new tasks.voidsetRunningTasksCount(Integer runningTasksCount) The number of tasks on the container instance that are in theRUNNINGstatus.voidThe status of the container instance.voidsetVersionInfo(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 returnstrueif 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 thePENDINGstatus.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 theRUNNINGstatus.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:ecsnamespace, followed by the region of the container instance, the AWS account ID of the container instance owner, thecontainer-instancenamespace, 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:ecsnamespace, followed by the region of the container instance, the AWS account ID of the container instance owner, thecontainer-instancenamespace, 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:ecsnamespace, followed by the region of the container instance, the AWS account ID of the container instance owner, thecontainer-instancenamespace, 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:ecsnamespace, followed by the region of the container instance, the AWS account ID of the container instance owner, thecontainer-instancenamespace, 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:ecsnamespace, followed by the region of the container instance, the AWS account ID of the container instance owner, thecontainer-instancenamespace, 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:ecsnamespace, followed by the region of the container instance, the AWS account ID of the container instance owner, thecontainer-instancenamespace, 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
-
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
-
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
ACTIVEorINACTIVE.ACTIVEindicates that the container instance can accept tasks.- Parameters:
status- The status of the container instance. The valid values areACTIVEorINACTIVE.ACTIVEindicates that the container instance can accept tasks.
-
getStatus
The status of the container instance. The valid values are
ACTIVEorINACTIVE.ACTIVEindicates that the container instance can accept tasks.- Returns:
- The status of the container instance. The valid values are
ACTIVEorINACTIVE.ACTIVEindicates that the container instance can accept tasks.
-
withStatus
The status of the container instance. The valid values are
ACTIVEorINACTIVE.ACTIVEindicates that the container instance can accept tasks.- Parameters:
status- The status of the container instance. The valid values areACTIVEorINACTIVE.ACTIVEindicates 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
trueif 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 returnstrueif 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
trueif 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
trueif 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
trueif 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 returnstrueif 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
trueif 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
trueif 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
RUNNINGstatus.- Parameters:
runningTasksCount- The number of tasks on the container instance that are in theRUNNINGstatus.
-
getRunningTasksCount
The number of tasks on the container instance that are in the
RUNNINGstatus.- Returns:
- The number of tasks on the container instance that are in the
RUNNINGstatus.
-
withRunningTasksCount
The number of tasks on the container instance that are in the
RUNNINGstatus.- Parameters:
runningTasksCount- The number of tasks on the container instance that are in theRUNNINGstatus.- 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
PENDINGstatus.- Parameters:
pendingTasksCount- The number of tasks on the container instance that are in thePENDINGstatus.
-
getPendingTasksCount
The number of tasks on the container instance that are in the
PENDINGstatus.- Returns:
- The number of tasks on the container instance that are in the
PENDINGstatus.
-
withPendingTasksCount
The number of tasks on the container instance that are in the
PENDINGstatus.- Parameters:
pendingTasksCount- The number of tasks on the container instance that are in thePENDINGstatus.- 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
-
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
-
equals
-
hashCode
-
clone
-