@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class Service extends Object implements Serializable, Cloneable, StructuredPojo
Details on a service within a cluster
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 cluster that hosts the service.
|
Date |
getCreatedAt()
The Unix timestamp for 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.
|
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 Elastic Load Balancing 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. |
List<PlacementConstraint> |
getPlacementConstraints()
The placement constraints for the tasks in the service.
|
List<PlacementStrategy> |
getPlacementStrategy()
The placement strategy that determines how tasks for the service are placed.
|
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 an Elastic Load Balancing 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()
The name of your service.
|
String |
getStatus()
The status of the service.
|
String |
getTaskDefinition()
The task definition to use for tasks in the service.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setClusterArn(String clusterArn)
The Amazon Resource Name (ARN) of the cluster that hosts the service.
|
void |
setCreatedAt(Date createdAt)
The Unix timestamp for 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(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 Elastic Load Balancing 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 |
setPlacementConstraints(Collection<PlacementConstraint> placementConstraints)
The placement constraints for the tasks in the service.
|
void |
setPlacementStrategy(Collection<PlacementStrategy> placementStrategy)
The placement strategy that determines how tasks for the service are placed.
|
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 an Elastic Load Balancing 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)
The name of 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 cluster that hosts the service.
|
Service |
withCreatedAt(Date createdAt)
The Unix timestamp for 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(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 Elastic Load Balancing 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 Elastic Load Balancing 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 |
withPlacementConstraints(Collection<PlacementConstraint> placementConstraints)
The placement constraints for the tasks in the service.
|
Service |
withPlacementConstraints(PlacementConstraint... placementConstraints)
The placement constraints for the tasks in the service.
|
Service |
withPlacementStrategy(Collection<PlacementStrategy> placementStrategy)
The placement strategy that determines how tasks for the service are placed.
|
Service |
withPlacementStrategy(PlacementStrategy... placementStrategy)
The placement strategy that determines how tasks for the service are placed.
|
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 an Elastic Load Balancing 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)
The name of 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 void setServiceArn(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 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(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(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 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(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(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 String getClusterArn()
The Amazon Resource Name (ARN) of the cluster that hosts the service.
public Service withClusterArn(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 List<LoadBalancer> getLoadBalancers()
A list of Elastic Load Balancing 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(Collection<LoadBalancer> loadBalancers)
A list of Elastic Load Balancing 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 Elastic Load Balancing 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 Elastic Load Balancing 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 Elastic Load Balancing 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)
A list of Elastic Load Balancing 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 Elastic Load Balancing 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(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 String getStatus()
The status of the service. The valid values are ACTIVE
, DRAINING
, or
INACTIVE
.
ACTIVE
, DRAINING
, or
INACTIVE
.public Service withStatus(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(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 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(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(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 Integer getRunningCount()
The number of tasks in the cluster that are in the RUNNING
state.
RUNNING
state.public Service withRunningCount(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(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 Integer getPendingCount()
The number of tasks in the cluster that are in the PENDING
state.
PENDING
state.public Service withPendingCount(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(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 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(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 List<Deployment> getDeployments()
The current state of deployments for the service.
public void setDeployments(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(Collection<Deployment> deployments)
The current state of deployments for the service.
deployments
- The current state of deployments for the service.public 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 an Elastic Load Balancing 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 an Elastic Load Balancing load balancer.public 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 an Elastic Load Balancing load balancer.
public 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 an Elastic Load Balancing 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 an Elastic Load Balancing load balancer.public List<ServiceEvent> getEvents()
The event stream for your service. A maximum of 100 of the latest events are displayed.
public void setEvents(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(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(Date createdAt)
The Unix timestamp for when the service was created.
createdAt
- The Unix timestamp for when the service was created.public Date getCreatedAt()
The Unix timestamp for when the service was created.
public Service withCreatedAt(Date createdAt)
The Unix timestamp for when the service was created.
createdAt
- The Unix timestamp for when the service was created.public List<PlacementConstraint> getPlacementConstraints()
The placement constraints for the tasks in the service.
public void setPlacementConstraints(Collection<PlacementConstraint> placementConstraints)
The placement constraints for the tasks in the service.
placementConstraints
- The placement constraints for the tasks in the service.public Service withPlacementConstraints(PlacementConstraint... placementConstraints)
The placement constraints for the tasks in the service.
NOTE: This method appends the values to the existing list (if any). Use
setPlacementConstraints(java.util.Collection)
or withPlacementConstraints(java.util.Collection)
if you want to override the existing values.
placementConstraints
- The placement constraints for the tasks in the service.public Service withPlacementConstraints(Collection<PlacementConstraint> placementConstraints)
The placement constraints for the tasks in the service.
placementConstraints
- The placement constraints for the tasks in the service.public List<PlacementStrategy> getPlacementStrategy()
The placement strategy that determines how tasks for the service are placed.
public void setPlacementStrategy(Collection<PlacementStrategy> placementStrategy)
The placement strategy that determines how tasks for the service are placed.
placementStrategy
- The placement strategy that determines how tasks for the service are placed.public Service withPlacementStrategy(PlacementStrategy... placementStrategy)
The placement strategy that determines how tasks for the service are placed.
NOTE: This method appends the values to the existing list (if any). Use
setPlacementStrategy(java.util.Collection)
or withPlacementStrategy(java.util.Collection)
if
you want to override the existing values.
placementStrategy
- The placement strategy that determines how tasks for the service are placed.public Service withPlacementStrategy(Collection<PlacementStrategy> placementStrategy)
The placement strategy that determines how tasks for the service are placed.
placementStrategy
- The placement strategy that determines how tasks for the service are placed.public String toString()
toString
in class Object
Object.toString()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.