public class Service extends Object implements Serializable, Cloneable
| Constructor and Description |
|---|
Service() |
| Modifier and Type | Method and Description |
|---|---|
Service |
clone() |
boolean |
equals(Object obj) |
String |
getClusterArn()
The Amazon Resource Name (ARN) of the of the cluster that hosts the
service.
|
List<Deployment> |
getDeployments()
The current state of deployments for the service.
|
Integer |
getDesiredCount()
The desired number of instantiations of the task definition to keep
running on the service.
|
List<ServiceEvent> |
getEvents()
The event stream for your service.
|
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.
|
Integer |
getPendingCount()
The number of tasks in the cluster that are in the
PENDING state. |
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.
|
Integer |
getRunningCount()
The number of tasks in the cluster that are in the
RUNNING state. |
String |
getServiceArn()
The Amazon Resource Name (ARN) that identifies the service.
|
String |
getServiceName()
A user-generated string that you can use to identify your service.
|
String |
getStatus()
The status of the service.
|
String |
getTaskDefinition()
The task definition to use for tasks in the service.
|
int |
hashCode() |
void |
setClusterArn(String clusterArn)
The Amazon Resource Name (ARN) of the of the cluster that hosts the
service.
|
void |
setDeployments(Collection<Deployment> deployments)
The current state of deployments for the service.
|
void |
setDesiredCount(Integer desiredCount)
The desired number of instantiations of the task definition to keep
running on the service.
|
void |
setEvents(Collection<ServiceEvent> events)
The event stream for your service.
|
void |
setLoadBalancers(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(Integer pendingCount)
The number of tasks in the cluster that are in the
PENDING state. |
void |
setRoleArn(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(Integer runningCount)
The number of tasks in the cluster that are in the
RUNNING state. |
void |
setServiceArn(String serviceArn)
The Amazon Resource Name (ARN) that identifies the service.
|
void |
setServiceName(String serviceName)
A user-generated string that you can use to identify your service.
|
void |
setStatus(String status)
The status of the service.
|
void |
setTaskDefinition(String taskDefinition)
The task definition to use for tasks in the service.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
Service |
withClusterArn(String clusterArn)
The Amazon Resource Name (ARN) of the of the cluster that hosts the
service.
|
Service |
withDeployments(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(Integer desiredCount)
The desired number of instantiations of the task definition to keep
running on the service.
|
Service |
withEvents(Collection<ServiceEvent> events)
The event stream for your service.
|
Service |
withEvents(ServiceEvent... events)
The event stream for your service.
|
Service |
withLoadBalancers(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(Integer pendingCount)
The number of tasks in the cluster that are in the
PENDING state. |
Service |
withRoleArn(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(Integer runningCount)
The number of tasks in the cluster that are in the
RUNNING state. |
Service |
withServiceArn(String serviceArn)
The Amazon Resource Name (ARN) that identifies the service.
|
Service |
withServiceName(String serviceName)
A user-generated string that you can use to identify your service.
|
Service |
withStatus(String status)
The status of the service.
|
Service |
withTaskDefinition(String taskDefinition)
The task definition to use for tasks in the service.
|
public String getServiceArn()
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 void setServiceArn(String serviceArn)
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 Service withServiceArn(String serviceArn)
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.
Returns a reference to this object so that method calls can be chained together.
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 String getServiceName()
public void setServiceName(String serviceName)
serviceName - A user-generated string that you can use to identify your service.public Service withServiceName(String serviceName)
Returns a reference to this object so that method calls can be chained together.
serviceName - A user-generated string that you can use to identify your service.public String getClusterArn()
public void setClusterArn(String clusterArn)
clusterArn - The Amazon Resource Name (ARN) of the of the cluster that hosts the
service.public Service withClusterArn(String clusterArn)
Returns a reference to this object so that method calls can be chained together.
clusterArn - The Amazon Resource Name (ARN) of the of the cluster that hosts the
service.public List<LoadBalancer> getLoadBalancers()
public void setLoadBalancers(Collection<LoadBalancer> loadBalancers)
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)
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.
Returns a reference to this object so that method calls can be chained together.
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(Collection<LoadBalancer> loadBalancers)
Returns a reference to this object so that method calls can be chained together.
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 String getStatus()
ACTIVE,
DRAINING, or INACTIVE.ACTIVE,
DRAINING, or INACTIVE.public void setStatus(String status)
ACTIVE,
DRAINING, or INACTIVE.status - The status of the service. The valid values are ACTIVE,
DRAINING, or INACTIVE.public Service withStatus(String status)
ACTIVE,
DRAINING, or INACTIVE.
Returns a reference to this object so that method calls can be chained together.
status - The status of the service. The valid values are ACTIVE,
DRAINING, or INACTIVE.public Integer getDesiredCount()
public void setDesiredCount(Integer desiredCount)
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 Service withDesiredCount(Integer desiredCount)
Returns a reference to this object so that method calls can be chained together.
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 Integer getRunningCount()
RUNNING state.RUNNING state.public void setRunningCount(Integer runningCount)
RUNNING state.runningCount - The number of tasks in the cluster that are in the
RUNNING state.public Service withRunningCount(Integer runningCount)
RUNNING state.
Returns a reference to this object so that method calls can be chained together.
runningCount - The number of tasks in the cluster that are in the
RUNNING state.public Integer getPendingCount()
PENDING state.PENDING state.public void setPendingCount(Integer pendingCount)
PENDING state.pendingCount - The number of tasks in the cluster that are in the
PENDING state.public Service withPendingCount(Integer pendingCount)
PENDING state.
Returns a reference to this object so that method calls can be chained together.
pendingCount - The number of tasks in the cluster that are in the
PENDING state.public String getTaskDefinition()
public void setTaskDefinition(String taskDefinition)
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 Service withTaskDefinition(String taskDefinition)
Returns a reference to this object so that method calls can be chained together.
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 List<Deployment> getDeployments()
public void setDeployments(Collection<Deployment> deployments)
deployments - The current state of deployments for the service.public Service withDeployments(Deployment... deployments)
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.
Returns a reference to this object so that method calls can be chained together.
deployments - The current state of deployments for the service.public Service withDeployments(Collection<Deployment> deployments)
Returns a reference to this object so that method calls can be chained together.
deployments - The current state of deployments for the service.public String getRoleArn()
public void setRoleArn(String roleArn)
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 Service withRoleArn(String roleArn)
Returns a reference to this object so that method calls can be chained together.
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 List<ServiceEvent> getEvents()
public void setEvents(Collection<ServiceEvent> events)
events - The event stream for your service. A maximum of 100 of the latest
events are displayed.public Service withEvents(ServiceEvent... events)
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.
Returns a reference to this object so that method calls can be chained together.
events - The event stream for your service. A maximum of 100 of the latest
events are displayed.public Service withEvents(Collection<ServiceEvent> events)
Returns a reference to this object so that method calls can be chained together.
events - The event stream for your service. A maximum of 100 of the latest
events are displayed.public String toString()
toString in class ObjectObject.toString()Copyright © 2015. All rights reserved.