public static interface Service.Builder extends CopyableBuilder<Service.Builder,Service>
Modifier and Type | Method and Description |
---|---|
Service.Builder |
clusterArn(String clusterArn)
The Amazon Resource Name (ARN) of the cluster that hosts the service.
|
Service.Builder |
createdAt(Instant createdAt)
The Unix timestamp for when the service was created.
|
default Service.Builder |
deploymentConfiguration(Consumer<DeploymentConfiguration.Builder> deploymentConfiguration)
Optional deployment parameters that control how many tasks run during the deployment and the ordering of
stopping and starting tasks.
|
Service.Builder |
deploymentConfiguration(DeploymentConfiguration deploymentConfiguration)
Optional deployment parameters that control how many tasks run during the deployment and the ordering of
stopping and starting tasks.
|
Service.Builder |
deployments(Collection<Deployment> deployments)
The current state of deployments for the service.
|
Service.Builder |
deployments(Consumer<Deployment.Builder>... deployments)
The current state of deployments for the service.
|
Service.Builder |
deployments(Deployment... deployments)
The current state of deployments for the service.
|
Service.Builder |
desiredCount(Integer desiredCount)
The desired number of instantiations of the task definition to keep running on the service.
|
Service.Builder |
events(Collection<ServiceEvent> events)
The event stream for your service.
|
Service.Builder |
events(Consumer<ServiceEvent.Builder>... events)
The event stream for your service.
|
Service.Builder |
events(ServiceEvent... events)
The event stream for your service.
|
Service.Builder |
loadBalancers(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.Builder |
loadBalancers(Consumer<LoadBalancer.Builder>... 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.Builder |
loadBalancers(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.
|
default Service.Builder |
networkConfiguration(Consumer<NetworkConfiguration.Builder> networkConfiguration)
The VPC subnet and security group configuration for tasks that receive their own Elastic Network Interface by
using the
awsvpc networking mode. |
Service.Builder |
networkConfiguration(NetworkConfiguration networkConfiguration)
The VPC subnet and security group configuration for tasks that receive their own Elastic Network Interface by
using the
awsvpc networking mode. |
Service.Builder |
pendingCount(Integer pendingCount)
The number of tasks in the cluster that are in the
PENDING state. |
Service.Builder |
placementConstraints(Collection<PlacementConstraint> placementConstraints)
The placement constraints for the tasks in the service.
|
Service.Builder |
placementConstraints(Consumer<PlacementConstraint.Builder>... placementConstraints)
The placement constraints for the tasks in the service.
|
Service.Builder |
placementConstraints(PlacementConstraint... placementConstraints)
The placement constraints for the tasks in the service.
|
Service.Builder |
placementStrategy(Collection<PlacementStrategy> placementStrategy)
The placement strategy that determines how tasks for the service are placed.
|
Service.Builder |
placementStrategy(Consumer<PlacementStrategy.Builder>... placementStrategy)
The placement strategy that determines how tasks for the service are placed.
|
Service.Builder |
placementStrategy(PlacementStrategy... placementStrategy)
The placement strategy that determines how tasks for the service are placed.
|
Service.Builder |
roleArn(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.Builder |
runningCount(Integer runningCount)
The number of tasks in the cluster that are in the
RUNNING state. |
Service.Builder |
serviceArn(String serviceArn)
The Amazon Resource Name (ARN) that identifies the service.
|
Service.Builder |
serviceName(String serviceName)
The name of your service.
|
Service.Builder |
status(String status)
The status of the service.
|
Service.Builder |
taskDefinition(String taskDefinition)
The task definition to use for tasks in the service.
|
copy
applyMutation, build
Service.Builder serviceArn(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
.Service.Builder serviceName(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.Service.Builder clusterArn(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.Service.Builder loadBalancers(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.Service.Builder loadBalancers(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.Service.Builder loadBalancers(Consumer<LoadBalancer.Builder>... 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.
This is a convenience that creates an instance of theList.Builder
avoiding the need to
create one manually via List#builder()
.
When the Consumer
completes, List.Builder#build()
is called immediately and its
result is passed to #loadBalancers(List)
.loadBalancers
- a consumer that will call methods on List.Builder
#loadBalancers(List)
Service.Builder status(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
.Service.Builder desiredCount(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.Service.Builder runningCount(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.Service.Builder pendingCount(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.Service.Builder taskDefinition(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.Service.Builder deploymentConfiguration(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.default Service.Builder deploymentConfiguration(Consumer<DeploymentConfiguration.Builder> deploymentConfiguration)
Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.
This is a convenience that creates an instance of theDeploymentConfiguration.Builder
avoiding the
need to create one manually via DeploymentConfiguration.builder()
.
When the Consumer
completes, SdkBuilder.build()
is called immediately
and its result is passed to deploymentConfiguration(DeploymentConfiguration)
.deploymentConfiguration
- a consumer that will call methods on DeploymentConfiguration.Builder
deploymentConfiguration(DeploymentConfiguration)
Service.Builder deployments(Collection<Deployment> deployments)
The current state of deployments for the service.
deployments
- The current state of deployments for the service.Service.Builder deployments(Deployment... deployments)
The current state of deployments for the service.
deployments
- The current state of deployments for the service.Service.Builder deployments(Consumer<Deployment.Builder>... deployments)
The current state of deployments for the service.
This is a convenience that creates an instance of theList.Builder
avoiding the need to
create one manually via List#builder()
.
When the Consumer
completes, List.Builder#build()
is called immediately and its
result is passed to #deployments(List)
.deployments
- a consumer that will call methods on List.Builder
#deployments(List)
Service.Builder roleArn(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.Service.Builder events(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.Service.Builder events(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.Service.Builder events(Consumer<ServiceEvent.Builder>... events)
The event stream for your service. A maximum of 100 of the latest events are displayed.
This is a convenience that creates an instance of theList.Builder
avoiding the need to
create one manually via List#builder()
.
When the Consumer
completes, List.Builder#build()
is called immediately and its
result is passed to #events(List)
.events
- a consumer that will call methods on List.Builder
#events(List)
Service.Builder createdAt(Instant createdAt)
The Unix timestamp for when the service was created.
createdAt
- The Unix timestamp for when the service was created.Service.Builder placementConstraints(Collection<PlacementConstraint> placementConstraints)
The placement constraints for the tasks in the service.
placementConstraints
- The placement constraints for the tasks in the service.Service.Builder placementConstraints(PlacementConstraint... placementConstraints)
The placement constraints for the tasks in the service.
placementConstraints
- The placement constraints for the tasks in the service.Service.Builder placementConstraints(Consumer<PlacementConstraint.Builder>... placementConstraints)
The placement constraints for the tasks in the service.
This is a convenience that creates an instance of theList.Builder
avoiding the
need to create one manually via List#builder()
.
When the Consumer
completes, List.Builder#build()
is called immediately
and its result is passed to #placementConstraints(List)
.placementConstraints
- a consumer that will call methods on List.Builder
#placementConstraints(List)
Service.Builder placementStrategy(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.Service.Builder placementStrategy(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.Service.Builder placementStrategy(Consumer<PlacementStrategy.Builder>... placementStrategy)
The placement strategy that determines how tasks for the service are placed.
This is a convenience that creates an instance of theList.Builder
avoiding the
need to create one manually via List#builder()
.
When the Consumer
completes, List.Builder#build()
is called immediately
and its result is passed to #placementStrategy(List)
.placementStrategy
- a consumer that will call methods on List.Builder
#placementStrategy(List)
Service.Builder networkConfiguration(NetworkConfiguration networkConfiguration)
The VPC subnet and security group configuration for tasks that receive their own Elastic Network Interface by
using the awsvpc
networking mode.
networkConfiguration
- The VPC subnet and security group configuration for tasks that receive their own Elastic Network
Interface by using the awsvpc
networking mode.default Service.Builder networkConfiguration(Consumer<NetworkConfiguration.Builder> networkConfiguration)
The VPC subnet and security group configuration for tasks that receive their own Elastic Network Interface by
using the awsvpc
networking mode.
NetworkConfiguration.Builder
avoiding the need
to create one manually via NetworkConfiguration.builder()
.
When the Consumer
completes, SdkBuilder.build()
is called immediately and
its result is passed to networkConfiguration(NetworkConfiguration)
.networkConfiguration
- a consumer that will call methods on NetworkConfiguration.Builder
networkConfiguration(NetworkConfiguration)
Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.