public class Service
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
Details on a service within a cluster
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
clusterArn
The Amazon Resource Name (ARN) of the cluster that hosts the service.
|
private java.util.Date |
createdAt
The Unix time in seconds and milliseconds when the service was created.
|
private DeploymentConfiguration |
deploymentConfiguration
Optional deployment parameters that control how many tasks run during the
deployment and the ordering of stopping and starting tasks.
|
private SdkInternalList<Deployment> |
deployments
The current state of deployments for the service.
|
private java.lang.Integer |
desiredCount
The desired number of instantiations of the task definition to keep
running on the service.
|
private SdkInternalList<ServiceEvent> |
events
The event stream for your service.
|
private SdkInternalList<LoadBalancer> |
loadBalancers
A list of load balancer objects, containing the load balancer name, the
container name (as it appears in a container definition), and the
container port to access from the load balancer.
|
private java.lang.Integer |
pendingCount
The number of tasks in the cluster that are in the
PENDING
state. |
private java.lang.String |
roleArn
The Amazon Resource Name (ARN) of the IAM role associated with the
service that allows the Amazon ECS container agent to register container
instances with a load balancer.
|
private java.lang.Integer |
runningCount
The number of tasks in the cluster that are in the
RUNNING
state. |
private java.lang.String |
serviceArn
The Amazon Resource Name (ARN) that identifies the service.
|
private java.lang.String |
serviceName
The name of your service.
|
private java.lang.String |
status
The status of the service.
|
private java.lang.String |
taskDefinition
The task definition to use for tasks in the service.
|
Constructor and Description |
---|
Service() |
Modifier and Type | Method and Description |
---|---|
Service |
clone() |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getClusterArn()
The Amazon Resource Name (ARN) of the cluster that hosts the service.
|
java.util.Date |
getCreatedAt()
The Unix time in seconds and milliseconds when the service was created.
|
DeploymentConfiguration |
getDeploymentConfiguration()
Optional deployment parameters that control how many tasks run during the
deployment and the ordering of stopping and starting tasks.
|
java.util.List<Deployment> |
getDeployments()
The current state of deployments for the service.
|
java.lang.Integer |
getDesiredCount()
The desired number of instantiations of the task definition to keep
running on the service.
|
java.util.List<ServiceEvent> |
getEvents()
The event stream for your service.
|
java.util.List<LoadBalancer> |
getLoadBalancers()
A list of load balancer objects, containing the load balancer name, the
container name (as it appears in a container definition), and the
container port to access from the load balancer.
|
java.lang.Integer |
getPendingCount()
The number of tasks in the cluster that are in the
PENDING
state. |
java.lang.String |
getRoleArn()
The Amazon Resource Name (ARN) of the IAM role associated with the
service that allows the Amazon ECS container agent to register container
instances with a load balancer.
|
java.lang.Integer |
getRunningCount()
The number of tasks in the cluster that are in the
RUNNING
state. |
java.lang.String |
getServiceArn()
The Amazon Resource Name (ARN) that identifies the service.
|
java.lang.String |
getServiceName()
The name of your service.
|
java.lang.String |
getStatus()
The status of the service.
|
java.lang.String |
getTaskDefinition()
The task definition to use for tasks in the service.
|
int |
hashCode() |
void |
setClusterArn(java.lang.String clusterArn)
The Amazon Resource Name (ARN) of the cluster that hosts the service.
|
void |
setCreatedAt(java.util.Date createdAt)
The Unix time in seconds and milliseconds when the service was created.
|
void |
setDeploymentConfiguration(DeploymentConfiguration deploymentConfiguration)
Optional deployment parameters that control how many tasks run during the
deployment and the ordering of stopping and starting tasks.
|
void |
setDeployments(java.util.Collection<Deployment> deployments)
The current state of deployments for the service.
|
void |
setDesiredCount(java.lang.Integer desiredCount)
The desired number of instantiations of the task definition to keep
running on the service.
|
void |
setEvents(java.util.Collection<ServiceEvent> events)
The event stream for your service.
|
void |
setLoadBalancers(java.util.Collection<LoadBalancer> loadBalancers)
A list of load balancer objects, containing the load balancer name, the
container name (as it appears in a container definition), and the
container port to access from the load balancer.
|
void |
setPendingCount(java.lang.Integer pendingCount)
The number of tasks in the cluster that are in the
PENDING
state. |
void |
setRoleArn(java.lang.String roleArn)
The Amazon Resource Name (ARN) of the IAM role associated with the
service that allows the Amazon ECS container agent to register container
instances with a load balancer.
|
void |
setRunningCount(java.lang.Integer runningCount)
The number of tasks in the cluster that are in the
RUNNING
state. |
void |
setServiceArn(java.lang.String serviceArn)
The Amazon Resource Name (ARN) that identifies the service.
|
void |
setServiceName(java.lang.String serviceName)
The name of your service.
|
void |
setStatus(java.lang.String status)
The status of the service.
|
void |
setTaskDefinition(java.lang.String taskDefinition)
The task definition to use for tasks in the service.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
Service |
withClusterArn(java.lang.String clusterArn)
The Amazon Resource Name (ARN) of the cluster that hosts the service.
|
Service |
withCreatedAt(java.util.Date createdAt)
The Unix time in seconds and milliseconds when the service was created.
|
Service |
withDeploymentConfiguration(DeploymentConfiguration deploymentConfiguration)
Optional deployment parameters that control how many tasks run during the
deployment and the ordering of stopping and starting tasks.
|
Service |
withDeployments(java.util.Collection<Deployment> deployments)
The current state of deployments for the service.
|
Service |
withDeployments(Deployment... deployments)
The current state of deployments for the service.
|
Service |
withDesiredCount(java.lang.Integer desiredCount)
The desired number of instantiations of the task definition to keep
running on the service.
|
Service |
withEvents(java.util.Collection<ServiceEvent> events)
The event stream for your service.
|
Service |
withEvents(ServiceEvent... events)
The event stream for your service.
|
Service |
withLoadBalancers(java.util.Collection<LoadBalancer> loadBalancers)
A list of load balancer objects, containing the load balancer name, the
container name (as it appears in a container definition), and the
container port to access from the load balancer.
|
Service |
withLoadBalancers(LoadBalancer... loadBalancers)
A list of load balancer objects, containing the load balancer name, the
container name (as it appears in a container definition), and the
container port to access from the load balancer.
|
Service |
withPendingCount(java.lang.Integer pendingCount)
The number of tasks in the cluster that are in the
PENDING
state. |
Service |
withRoleArn(java.lang.String roleArn)
The Amazon Resource Name (ARN) of the IAM role associated with the
service that allows the Amazon ECS container agent to register container
instances with a load balancer.
|
Service |
withRunningCount(java.lang.Integer runningCount)
The number of tasks in the cluster that are in the
RUNNING
state. |
Service |
withServiceArn(java.lang.String serviceArn)
The Amazon Resource Name (ARN) that identifies the service.
|
Service |
withServiceName(java.lang.String serviceName)
The name of your service.
|
Service |
withStatus(java.lang.String status)
The status of the service.
|
Service |
withTaskDefinition(java.lang.String taskDefinition)
The task definition to use for tasks in the service.
|
private java.lang.String serviceArn
The Amazon Resource Name (ARN) that identifies the service. The ARN
contains the arn:aws:ecs
namespace, followed by the region
of the service, the AWS account ID of the service owner, the
service
namespace, and then the service name. For example,
arn:aws:ecs:region:012345678910:service/my-service
.
private java.lang.String serviceName
The name of your service. Up to 255 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed. Service names must be unique within a cluster, but you can have similarly named services in multiple clusters within a region or across multiple regions.
private java.lang.String clusterArn
The Amazon Resource Name (ARN) of the cluster that hosts the service.
private SdkInternalList<LoadBalancer> loadBalancers
A list of load balancer objects, containing the load balancer name, the container name (as it appears in a container definition), and the container port to access from the load balancer.
private java.lang.String status
The status of the service. The valid values are ACTIVE
,
DRAINING
, or INACTIVE
.
private java.lang.Integer desiredCount
The desired number of instantiations of the task definition to keep running on the service. This value is specified when the service is created with CreateService, and it can be modified with UpdateService.
private java.lang.Integer runningCount
The number of tasks in the cluster that are in the RUNNING
state.
private java.lang.Integer pendingCount
The number of tasks in the cluster that are in the PENDING
state.
private java.lang.String taskDefinition
The task definition to use for tasks in the service. This value is specified when the service is created with CreateService, and it can be modified with UpdateService.
private DeploymentConfiguration deploymentConfiguration
Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.
private SdkInternalList<Deployment> deployments
The current state of deployments for the service.
private java.lang.String roleArn
The Amazon Resource Name (ARN) of the IAM role associated with the service that allows the Amazon ECS container agent to register container instances with a load balancer.
private SdkInternalList<ServiceEvent> events
The event stream for your service. A maximum of 100 of the latest events are displayed.
private java.util.Date createdAt
The Unix time in seconds and milliseconds when the service was created.
public void setServiceArn(java.lang.String serviceArn)
The Amazon Resource Name (ARN) that identifies the service. The ARN
contains the arn:aws:ecs
namespace, followed by the region
of the service, the AWS account ID of the service owner, the
service
namespace, and then the service name. For example,
arn:aws:ecs:region:012345678910:service/my-service
.
serviceArn
- The Amazon Resource Name (ARN) that identifies the service. The
ARN contains the arn:aws:ecs
namespace, followed by
the region of the service, the AWS account ID of the service
owner, the service
namespace, and then the service
name. For example,
arn:aws:ecs:region:012345678910:service/my-service
.public java.lang.String getServiceArn()
The Amazon Resource Name (ARN) that identifies the service. The ARN
contains the arn:aws:ecs
namespace, followed by the region
of the service, the AWS account ID of the service owner, the
service
namespace, and then the service name. For example,
arn:aws:ecs:region:012345678910:service/my-service
.
arn:aws:ecs
namespace, followed by
the region of the service, the AWS account ID of the service
owner, the service
namespace, and then the service
name. For example,
arn:aws:ecs:region:012345678910:service/my-service
.public Service withServiceArn(java.lang.String serviceArn)
The Amazon Resource Name (ARN) that identifies the service. The ARN
contains the arn:aws:ecs
namespace, followed by the region
of the service, the AWS account ID of the service owner, the
service
namespace, and then the service name. For example,
arn:aws:ecs:region:012345678910:service/my-service
.
serviceArn
- The Amazon Resource Name (ARN) that identifies the service. The
ARN contains the arn:aws:ecs
namespace, followed by
the region of the service, the AWS account ID of the service
owner, the service
namespace, and then the service
name. For example,
arn:aws:ecs:region:012345678910:service/my-service
.public void setServiceName(java.lang.String serviceName)
The name of your service. Up to 255 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed. Service names must be unique within a cluster, but you can have similarly named services in multiple clusters within a region or across multiple regions.
serviceName
- The name of your service. Up to 255 letters (uppercase and
lowercase), numbers, hyphens, and underscores are allowed. Service
names must be unique within a cluster, but you can have similarly
named services in multiple clusters within a region or across
multiple regions.public java.lang.String getServiceName()
The name of your service. Up to 255 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed. Service names must be unique within a cluster, but you can have similarly named services in multiple clusters within a region or across multiple regions.
public Service withServiceName(java.lang.String serviceName)
The name of your service. Up to 255 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed. Service names must be unique within a cluster, but you can have similarly named services in multiple clusters within a region or across multiple regions.
serviceName
- The name of your service. Up to 255 letters (uppercase and
lowercase), numbers, hyphens, and underscores are allowed. Service
names must be unique within a cluster, but you can have similarly
named services in multiple clusters within a region or across
multiple regions.public void setClusterArn(java.lang.String clusterArn)
The Amazon Resource Name (ARN) of the cluster that hosts the service.
clusterArn
- The Amazon Resource Name (ARN) of the cluster that hosts the
service.public java.lang.String getClusterArn()
The Amazon Resource Name (ARN) of the cluster that hosts the service.
public Service withClusterArn(java.lang.String clusterArn)
The Amazon Resource Name (ARN) of the cluster that hosts the service.
clusterArn
- The Amazon Resource Name (ARN) of the cluster that hosts the
service.public java.util.List<LoadBalancer> getLoadBalancers()
A list of load balancer objects, containing the load balancer name, the container name (as it appears in a container definition), and the container port to access from the load balancer.
public void setLoadBalancers(java.util.Collection<LoadBalancer> loadBalancers)
A list of load balancer objects, containing the load balancer name, the container name (as it appears in a container definition), and the container port to access from the load balancer.
loadBalancers
- A list of load balancer objects, containing the load balancer
name, the container name (as it appears in a container
definition), and the container port to access from the load
balancer.public Service withLoadBalancers(LoadBalancer... loadBalancers)
A list of load balancer objects, containing the load balancer name, the container name (as it appears in a container definition), and the container port to access from the load balancer.
NOTE: This method appends the values to the existing list (if
any). Use setLoadBalancers(java.util.Collection)
or
withLoadBalancers(java.util.Collection)
if you want to override
the existing values.
loadBalancers
- A list of load balancer objects, containing the load balancer
name, the container name (as it appears in a container
definition), and the container port to access from the load
balancer.public Service withLoadBalancers(java.util.Collection<LoadBalancer> loadBalancers)
A list of load balancer objects, containing the load balancer name, the container name (as it appears in a container definition), and the container port to access from the load balancer.
loadBalancers
- A list of load balancer objects, containing the load balancer
name, the container name (as it appears in a container
definition), and the container port to access from the load
balancer.public void setStatus(java.lang.String status)
The status of the service. The valid values are ACTIVE
,
DRAINING
, or INACTIVE
.
status
- The status of the service. The valid values are
ACTIVE
, DRAINING
, or
INACTIVE
.public java.lang.String getStatus()
The status of the service. The valid values are ACTIVE
,
DRAINING
, or INACTIVE
.
ACTIVE
, DRAINING
, or
INACTIVE
.public Service withStatus(java.lang.String status)
The status of the service. The valid values are ACTIVE
,
DRAINING
, or INACTIVE
.
status
- The status of the service. The valid values are
ACTIVE
, DRAINING
, or
INACTIVE
.public void setDesiredCount(java.lang.Integer desiredCount)
The desired number of instantiations of the task definition to keep running on the service. This value is specified when the service is created with CreateService, and it can be modified with UpdateService.
desiredCount
- The desired number of instantiations of the task definition to
keep running on the service. This value is specified when the
service is created with CreateService, and it can be
modified with UpdateService.public java.lang.Integer getDesiredCount()
The desired number of instantiations of the task definition to keep running on the service. This value is specified when the service is created with CreateService, and it can be modified with UpdateService.
public Service withDesiredCount(java.lang.Integer desiredCount)
The desired number of instantiations of the task definition to keep running on the service. This value is specified when the service is created with CreateService, and it can be modified with UpdateService.
desiredCount
- The desired number of instantiations of the task definition to
keep running on the service. This value is specified when the
service is created with CreateService, and it can be
modified with UpdateService.public void setRunningCount(java.lang.Integer runningCount)
The number of tasks in the cluster that are in the RUNNING
state.
runningCount
- The number of tasks in the cluster that are in the
RUNNING
state.public java.lang.Integer getRunningCount()
The number of tasks in the cluster that are in the RUNNING
state.
RUNNING
state.public Service withRunningCount(java.lang.Integer runningCount)
The number of tasks in the cluster that are in the RUNNING
state.
runningCount
- The number of tasks in the cluster that are in the
RUNNING
state.public void setPendingCount(java.lang.Integer pendingCount)
The number of tasks in the cluster that are in the PENDING
state.
pendingCount
- The number of tasks in the cluster that are in the
PENDING
state.public java.lang.Integer getPendingCount()
The number of tasks in the cluster that are in the PENDING
state.
PENDING
state.public Service withPendingCount(java.lang.Integer pendingCount)
The number of tasks in the cluster that are in the PENDING
state.
pendingCount
- The number of tasks in the cluster that are in the
PENDING
state.public void setTaskDefinition(java.lang.String taskDefinition)
The task definition to use for tasks in the service. This value is specified when the service is created with CreateService, and it can be modified with UpdateService.
taskDefinition
- The task definition to use for tasks in the service. This value is
specified when the service is created with CreateService,
and it can be modified with UpdateService.public java.lang.String getTaskDefinition()
The task definition to use for tasks in the service. This value is specified when the service is created with CreateService, and it can be modified with UpdateService.
public Service withTaskDefinition(java.lang.String taskDefinition)
The task definition to use for tasks in the service. This value is specified when the service is created with CreateService, and it can be modified with UpdateService.
taskDefinition
- The task definition to use for tasks in the service. This value is
specified when the service is created with CreateService,
and it can be modified with UpdateService.public void setDeploymentConfiguration(DeploymentConfiguration deploymentConfiguration)
Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.
deploymentConfiguration
- Optional deployment parameters that control how many tasks run
during the deployment and the ordering of stopping and starting
tasks.public DeploymentConfiguration getDeploymentConfiguration()
Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.
public Service withDeploymentConfiguration(DeploymentConfiguration deploymentConfiguration)
Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.
deploymentConfiguration
- Optional deployment parameters that control how many tasks run
during the deployment and the ordering of stopping and starting
tasks.public java.util.List<Deployment> getDeployments()
The current state of deployments for the service.
public void setDeployments(java.util.Collection<Deployment> deployments)
The current state of deployments for the service.
deployments
- The current state of deployments for the service.public Service withDeployments(Deployment... deployments)
The current state of deployments for the service.
NOTE: This method appends the values to the existing list (if
any). Use setDeployments(java.util.Collection)
or
withDeployments(java.util.Collection)
if you want to override
the existing values.
deployments
- The current state of deployments for the service.public Service withDeployments(java.util.Collection<Deployment> deployments)
The current state of deployments for the service.
deployments
- The current state of deployments for the service.public void setRoleArn(java.lang.String roleArn)
The Amazon Resource Name (ARN) of the IAM role associated with the service that allows the Amazon ECS container agent to register container instances with a load balancer.
roleArn
- The Amazon Resource Name (ARN) of the IAM role associated with the
service that allows the Amazon ECS container agent to register
container instances with a load balancer.public java.lang.String getRoleArn()
The Amazon Resource Name (ARN) of the IAM role associated with the service that allows the Amazon ECS container agent to register container instances with a load balancer.
public Service withRoleArn(java.lang.String roleArn)
The Amazon Resource Name (ARN) of the IAM role associated with the service that allows the Amazon ECS container agent to register container instances with a load balancer.
roleArn
- The Amazon Resource Name (ARN) of the IAM role associated with the
service that allows the Amazon ECS container agent to register
container instances with a load balancer.public java.util.List<ServiceEvent> getEvents()
The event stream for your service. A maximum of 100 of the latest events are displayed.
public void setEvents(java.util.Collection<ServiceEvent> events)
The event stream for your service. A maximum of 100 of the latest events are displayed.
events
- The event stream for your service. A maximum of 100 of the latest
events are displayed.public Service withEvents(ServiceEvent... events)
The event stream for your service. A maximum of 100 of the latest events are displayed.
NOTE: This method appends the values to the existing list (if
any). Use setEvents(java.util.Collection)
or
withEvents(java.util.Collection)
if you want to override the
existing values.
events
- The event stream for your service. A maximum of 100 of the latest
events are displayed.public Service withEvents(java.util.Collection<ServiceEvent> events)
The event stream for your service. A maximum of 100 of the latest events are displayed.
events
- The event stream for your service. A maximum of 100 of the latest
events are displayed.public void setCreatedAt(java.util.Date createdAt)
The Unix time in seconds and milliseconds when the service was created.
createdAt
- The Unix time in seconds and milliseconds when the service was
created.public java.util.Date getCreatedAt()
The Unix time in seconds and milliseconds when the service was created.
public Service withCreatedAt(java.util.Date createdAt)
The Unix time in seconds and milliseconds when the service was created.
createdAt
- The Unix time in seconds and milliseconds when the service was
created.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 Service clone()
clone
in class java.lang.Object