Class ContainerInstance
- java.lang.Object
-
- com.amazonaws.services.ecs.model.ContainerInstance
-
- All Implemented Interfaces:
Serializable,Cloneable
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.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ContainerInstance()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ContainerInstanceclone()booleanequals(Object obj)BooleangetAgentConnected()This parameter returnstrueif the agent is actually connected to Amazon ECS.StringgetAgentUpdateStatus()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.StringgetContainerInstanceArn()The Amazon Resource Name (ARN) of the container instance.StringgetEc2InstanceId()The EC2 instance ID of the container instance.IntegergetPendingTasksCount()The number of tasks on the container instance that are in thePENDINGstatus.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.IntegergetRunningTasksCount()The number of tasks on the container instance that are in theRUNNINGstatus.StringgetStatus()The status of the container instance.VersionInfogetVersionInfo()The version information for the Amazon ECS container agent and Docker daemon running on the container instance.inthashCode()BooleanisAgentConnected()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.voidsetStatus(String status)The 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.StringtoString()Returns a string representation of this object; useful for testing and debugging.ContainerInstancewithAgentConnected(Boolean agentConnected)This parameter returnstrueif the agent is actually connected to Amazon ECS.ContainerInstancewithAgentUpdateStatus(AgentUpdateStatus agentUpdateStatus)The status of the most recent agent update.ContainerInstancewithAgentUpdateStatus(String agentUpdateStatus)The status of the most recent agent update.ContainerInstancewithAttributes(Attribute... attributes)The attributes set for the container instance by the Amazon ECS container agent at instance registration.ContainerInstancewithAttributes(Collection<Attribute> attributes)The attributes set for the container instance by the Amazon ECS container agent at instance registration.ContainerInstancewithContainerInstanceArn(String containerInstanceArn)The Amazon Resource Name (ARN) of the container instance.ContainerInstancewithEc2InstanceId(String ec2InstanceId)The EC2 instance ID of the container instance.ContainerInstancewithPendingTasksCount(Integer pendingTasksCount)The number of tasks on the container instance that are in thePENDINGstatus.ContainerInstancewithRegisteredResources(Resource... registeredResources)The registered resources on the container instance that are in use by current tasks.ContainerInstancewithRegisteredResources(Collection<Resource> registeredResources)The registered resources on the container instance that are in use by current tasks.ContainerInstancewithRemainingResources(Resource... remainingResources)The remaining resources of the container instance that are available for new tasks.ContainerInstancewithRemainingResources(Collection<Resource> remainingResources)The remaining resources of the container instance that are available for new tasks.ContainerInstancewithRunningTasksCount(Integer runningTasksCount)The number of tasks on the container instance that are in theRUNNINGstatus.ContainerInstancewithStatus(String status)The status of the container instance.ContainerInstancewithVersionInfo(VersionInfo versionInfo)The version information for the Amazon ECS container agent and Docker daemon running on the container instance.
-
-
-
Method Detail
-
setContainerInstanceArn
public void setContainerInstanceArn(String containerInstanceArn)
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
public String 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
public ContainerInstance withContainerInstanceArn(String containerInstanceArn)
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
public void setEc2InstanceId(String ec2InstanceId)
The EC2 instance ID of the container instance.
- Parameters:
ec2InstanceId- The EC2 instance ID of the container instance.
-
getEc2InstanceId
public String getEc2InstanceId()
The EC2 instance ID of the container instance.
- Returns:
- The EC2 instance ID of the container instance.
-
withEc2InstanceId
public ContainerInstance withEc2InstanceId(String ec2InstanceId)
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
public void setVersionInfo(VersionInfo versionInfo)
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
public VersionInfo 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
public ContainerInstance withVersionInfo(VersionInfo versionInfo)
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
public List<Resource> 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
public void setRemainingResources(Collection<Resource> remainingResources)
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
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)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
public ContainerInstance withRemainingResources(Collection<Resource> remainingResources)
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
public List<Resource> 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
public void setRegisteredResources(Collection<Resource> registeredResources)
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
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)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
public ContainerInstance withRegisteredResources(Collection<Resource> registeredResources)
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
public void setStatus(String status)
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
public String 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
public ContainerInstance withStatus(String status)
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
public void setAgentConnected(Boolean agentConnected)
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
public Boolean 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
public ContainerInstance withAgentConnected(Boolean agentConnected)
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
public Boolean 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
public void setRunningTasksCount(Integer runningTasksCount)
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
public Integer 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
public ContainerInstance withRunningTasksCount(Integer runningTasksCount)
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
public void setPendingTasksCount(Integer pendingTasksCount)
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
public Integer 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
public ContainerInstance withPendingTasksCount(Integer pendingTasksCount)
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
public void setAgentUpdateStatus(String agentUpdateStatus)
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:
AgentUpdateStatus
-
getAgentUpdateStatus
public String 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:
AgentUpdateStatus
-
withAgentUpdateStatus
public ContainerInstance withAgentUpdateStatus(String agentUpdateStatus)
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:
AgentUpdateStatus
-
setAgentUpdateStatus
public void setAgentUpdateStatus(AgentUpdateStatus agentUpdateStatus)
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:
AgentUpdateStatus
-
withAgentUpdateStatus
public ContainerInstance withAgentUpdateStatus(AgentUpdateStatus agentUpdateStatus)
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:
AgentUpdateStatus
-
getAttributes
public List<Attribute> 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
public void setAttributes(Collection<Attribute> attributes)
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
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)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
public ContainerInstance withAttributes(Collection<Attribute> attributes)
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
public String toString()
Returns a string representation of this object; useful for testing and debugging.- Overrides:
toStringin classObject- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
clone
public ContainerInstance clone()
-
-