@Generated(value="software.amazon.awssdk:codegen") public final class Service extends Object implements StructuredPojo, ToCopyableBuilder<Service.Builder,Service>
Details on a service within a cluster
Modifier and Type | Class and Description |
---|---|
static interface |
Service.Builder |
Modifier and Type | Method and Description |
---|---|
static Service.Builder |
builder() |
String |
clusterArn()
The Amazon Resource Name (ARN) of the cluster that hosts the service.
|
Instant |
createdAt()
The Unix timestamp for when the service was created.
|
DeploymentConfiguration |
deploymentConfiguration()
Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping
and starting tasks.
|
List<Deployment> |
deployments()
The current state of deployments for the service.
|
Integer |
desiredCount()
The desired number of instantiations of the task definition to keep running on the service.
|
boolean |
equals(Object obj) |
List<ServiceEvent> |
events()
The event stream for your service.
|
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
int |
hashCode() |
List<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 |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
NetworkConfiguration |
networkConfiguration()
The VPC subnet and security group configuration for tasks that receive their own Elastic Network Interface by
using the
awsvpc networking mode. |
Integer |
pendingCount()
The number of tasks in the cluster that are in the
PENDING state. |
List<PlacementConstraint> |
placementConstraints()
The placement constraints for the tasks in the service.
|
List<PlacementStrategy> |
placementStrategy()
The placement strategy that determines how tasks for the service are placed.
|
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.
|
Integer |
runningCount()
The number of tasks in the cluster that are in the
RUNNING state. |
static Class<? extends Service.Builder> |
serializableBuilderClass() |
String |
serviceArn()
The Amazon Resource Name (ARN) that identifies the service.
|
String |
serviceName()
The name of your service.
|
String |
status()
The status of the service.
|
String |
taskDefinition()
The task definition to use for tasks in the service.
|
Service.Builder |
toBuilder()
Take this object and create a builder that contains all of the current property values of this object.
|
String |
toString() |
copy
public 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
.
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 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 clusterArn()
The Amazon Resource Name (ARN) of the cluster that hosts the service.
public List<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.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
public String status()
The status of the service. The valid values are ACTIVE
, DRAINING
, or
INACTIVE
.
ACTIVE
, DRAINING
, or
INACTIVE
.public 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.
public Integer runningCount()
The number of tasks in the cluster that are in the RUNNING
state.
RUNNING
state.public Integer pendingCount()
The number of tasks in the cluster that are in the PENDING
state.
PENDING
state.public 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.
public DeploymentConfiguration deploymentConfiguration()
Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.
public List<Deployment> deployments()
The current state of deployments for the service.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
public 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.
public List<ServiceEvent> events()
The event stream for your service. A maximum of 100 of the latest events are displayed.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
public Instant createdAt()
The Unix timestamp for when the service was created.
public List<PlacementConstraint> placementConstraints()
The placement constraints for the tasks in the service.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
public List<PlacementStrategy> placementStrategy()
The placement strategy that determines how tasks for the service are placed.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
public NetworkConfiguration networkConfiguration()
The VPC subnet and security group configuration for tasks that receive their own Elastic Network Interface by
using the awsvpc
networking mode.
awsvpc
networking mode.public Service.Builder toBuilder()
ToCopyableBuilder
toBuilder
in interface ToCopyableBuilder<Service.Builder,Service>
public static Service.Builder builder()
public static Class<? extends Service.Builder> serializableBuilderClass()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.