Interface Service.Builder
- All Superinterfaces:
Buildable
,CopyableBuilder<Service.Builder,
,Service> SdkBuilder<Service.Builder,
,Service> SdkPojo
- Enclosing class:
Service
-
Method Summary
Modifier and TypeMethodDescriptioncapacityProviderStrategy
(Collection<CapacityProviderStrategyItem> capacityProviderStrategy) The capacity provider strategy the service uses.capacityProviderStrategy
(Consumer<CapacityProviderStrategyItem.Builder>... capacityProviderStrategy) The capacity provider strategy the service uses.capacityProviderStrategy
(CapacityProviderStrategyItem... capacityProviderStrategy) The capacity provider strategy the service uses.clusterArn
(String clusterArn) The Amazon Resource Name (ARN) of the cluster that hosts the service.The Unix timestamp for the time when the service was created.The principal that created the service.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.deploymentConfiguration
(DeploymentConfiguration deploymentConfiguration) Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.default Service.Builder
deploymentController
(Consumer<DeploymentController.Builder> deploymentController) The deployment controller type the service is using.deploymentController
(DeploymentController deploymentController) The deployment controller type the service is using.deployments
(Collection<Deployment> deployments) The current state of deployments for the service.deployments
(Consumer<Deployment.Builder>... deployments) The current state of deployments for the service.deployments
(Deployment... deployments) The current state of deployments for the service.desiredCount
(Integer desiredCount) The desired number of instantiations of the task definition to keep running on the service.enableECSManagedTags
(Boolean enableECSManagedTags) Determines whether to use Amazon ECS managed tags for the tasks in the service.enableExecuteCommand
(Boolean enableExecuteCommand) Determines whether the execute command functionality is turned on for the service.events
(Collection<ServiceEvent> events) The event stream for your service.events
(Consumer<ServiceEvent.Builder>... events) The event stream for your service.events
(ServiceEvent... events) The event stream for your service.healthCheckGracePeriodSeconds
(Integer healthCheckGracePeriodSeconds) The period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing target health checks after a task has first started.launchType
(String launchType) The launch type the service is using.launchType
(LaunchType launchType) The launch type the service is using.loadBalancers
(Collection<LoadBalancer> loadBalancers) A list of Elastic Load Balancing load balancer objects.loadBalancers
(Consumer<LoadBalancer.Builder>... loadBalancers) A list of Elastic Load Balancing load balancer objects.loadBalancers
(LoadBalancer... loadBalancers) A list of Elastic Load Balancing load balancer objects.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 theawsvpc
networking mode.networkConfiguration
(NetworkConfiguration networkConfiguration) The VPC subnet and security group configuration for tasks that receive their own elastic network interface by using theawsvpc
networking mode.pendingCount
(Integer pendingCount) The number of tasks in the cluster that are in thePENDING
state.placementConstraints
(Collection<PlacementConstraint> placementConstraints) The placement constraints for the tasks in the service.placementConstraints
(Consumer<PlacementConstraint.Builder>... placementConstraints) The placement constraints for the tasks in the service.placementConstraints
(PlacementConstraint... placementConstraints) The placement constraints for the tasks in the service.placementStrategy
(Collection<PlacementStrategy> placementStrategy) The placement strategy that determines how tasks for the service are placed.placementStrategy
(Consumer<PlacementStrategy.Builder>... placementStrategy) The placement strategy that determines how tasks for the service are placed.placementStrategy
(PlacementStrategy... placementStrategy) The placement strategy that determines how tasks for the service are placed.platformFamily
(String platformFamily) The operating system that your tasks in the service run on.platformVersion
(String platformVersion) The platform version to run your service on.propagateTags
(String propagateTags) Determines whether to propagate the tags from the task definition or the service to the task.propagateTags
(PropagateTags propagateTags) Determines whether to propagate the tags from the task definition or the service to the task.The ARN of the IAM role that's associated with the service.runningCount
(Integer runningCount) The number of tasks in the cluster that are in theRUNNING
state.schedulingStrategy
(String schedulingStrategy) The scheduling strategy to use for the service.schedulingStrategy
(SchedulingStrategy schedulingStrategy) The scheduling strategy to use for the service.serviceArn
(String serviceArn) The ARN that identifies the service.serviceName
(String serviceName) The name of your service.serviceRegistries
(Collection<ServiceRegistry> serviceRegistries) The details for the service discovery registries to assign to this service.serviceRegistries
(Consumer<ServiceRegistry.Builder>... serviceRegistries) The details for the service discovery registries to assign to this service.serviceRegistries
(ServiceRegistry... serviceRegistries) The details for the service discovery registries to assign to this service.The status of the service.tags
(Collection<Tag> tags) The metadata that you apply to the service to help you categorize and organize them.tags
(Consumer<Tag.Builder>... tags) The metadata that you apply to the service to help you categorize and organize them.The metadata that you apply to the service to help you categorize and organize them.taskDefinition
(String taskDefinition) The task definition to use for tasks in the service.taskSets
(Collection<TaskSet> taskSets) Information about a set of Amazon ECS tasks in either an CodeDeploy or anEXTERNAL
deployment.taskSets
(Consumer<TaskSet.Builder>... taskSets) Information about a set of Amazon ECS tasks in either an CodeDeploy or anEXTERNAL
deployment.Information about a set of Amazon ECS tasks in either an CodeDeploy or anEXTERNAL
deployment.Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFields
-
Method Details
-
serviceArn
The ARN that identifies the service. For more information about the ARN format, see Amazon Resource Name (ARN) in the Amazon ECS Developer Guide.
- Parameters:
serviceArn
- The ARN that identifies the service. For more information about the ARN format, see Amazon Resource Name (ARN) in the Amazon ECS Developer Guide.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
serviceName
The name of your service. Up to 255 letters (uppercase and lowercase), numbers, underscores, and hyphens are allowed. Service names must be unique within a cluster. However, you can have similarly named services in multiple clusters within a Region or across multiple Regions.
- Parameters:
serviceName
- The name of your service. Up to 255 letters (uppercase and lowercase), numbers, underscores, and hyphens are allowed. Service names must be unique within a cluster. However, you can have similarly named services in multiple clusters within a Region or across multiple Regions.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
clusterArn
The Amazon Resource Name (ARN) of the cluster that hosts the service.
- Parameters:
clusterArn
- The Amazon Resource Name (ARN) of the cluster that hosts the service.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
loadBalancers
A list of Elastic Load Balancing load balancer objects. It contains the load balancer name, the container name, and the container port to access from the load balancer. The container name is as it appears in a container definition.
- Parameters:
loadBalancers
- A list of Elastic Load Balancing load balancer objects. It contains the load balancer name, the container name, and the container port to access from the load balancer. The container name is as it appears in a container definition.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
loadBalancers
A list of Elastic Load Balancing load balancer objects. It contains the load balancer name, the container name, and the container port to access from the load balancer. The container name is as it appears in a container definition.
- Parameters:
loadBalancers
- A list of Elastic Load Balancing load balancer objects. It contains the load balancer name, the container name, and the container port to access from the load balancer. The container name is as it appears in a container definition.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
loadBalancers
A list of Elastic Load Balancing load balancer objects. It contains the load balancer name, the container name, and the container port to access from the load balancer. The container name is as it appears in a container definition.
This is a convenience method that creates an instance of theLoadBalancer.Builder
avoiding the need to create one manually viaLoadBalancer.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toloadBalancers(List<LoadBalancer>)
.- Parameters:
loadBalancers
- a consumer that will call methods onLoadBalancer.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
serviceRegistries
The details for the service discovery registries to assign to this service. For more information, see Service Discovery.
- Parameters:
serviceRegistries
- The details for the service discovery registries to assign to this service. For more information, see Service Discovery.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
serviceRegistries
The details for the service discovery registries to assign to this service. For more information, see Service Discovery.
- Parameters:
serviceRegistries
- The details for the service discovery registries to assign to this service. For more information, see Service Discovery.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
serviceRegistries
The details for the service discovery registries to assign to this service. For more information, see Service Discovery.
This is a convenience method that creates an instance of theServiceRegistry.Builder
avoiding the need to create one manually viaServiceRegistry.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toserviceRegistries(List<ServiceRegistry>)
.- Parameters:
serviceRegistries
- a consumer that will call methods onServiceRegistry.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
status
The status of the service. The valid values are
ACTIVE
,DRAINING
, orINACTIVE
.- Parameters:
status
- The status of the service. The valid values areACTIVE
,DRAINING
, orINACTIVE
.- Returns:
- 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.
- Parameters:
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.- Returns:
- 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.- Parameters:
runningCount
- The number of tasks in the cluster that are in theRUNNING
state.- Returns:
- 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.- Parameters:
pendingCount
- The number of tasks in the cluster that are in thePENDING
state.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
launchType
The launch type the service is using. When using the DescribeServices API, this field is omitted if the service was created using a capacity provider strategy.
- Parameters:
launchType
- The launch type the service is using. When using the DescribeServices API, this field is omitted if the service was created using a capacity provider strategy.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
launchType
The launch type the service is using. When using the DescribeServices API, this field is omitted if the service was created using a capacity provider strategy.
- Parameters:
launchType
- The launch type the service is using. When using the DescribeServices API, this field is omitted if the service was created using a capacity provider strategy.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
capacityProviderStrategy
Service.Builder capacityProviderStrategy(Collection<CapacityProviderStrategyItem> capacityProviderStrategy) The capacity provider strategy the service uses. When using the DescribeServices API, this field is omitted if the service was created using a launch type.
- Parameters:
capacityProviderStrategy
- The capacity provider strategy the service uses. When using the DescribeServices API, this field is omitted if the service was created using a launch type.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
capacityProviderStrategy
The capacity provider strategy the service uses. When using the DescribeServices API, this field is omitted if the service was created using a launch type.
- Parameters:
capacityProviderStrategy
- The capacity provider strategy the service uses. When using the DescribeServices API, this field is omitted if the service was created using a launch type.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
capacityProviderStrategy
Service.Builder capacityProviderStrategy(Consumer<CapacityProviderStrategyItem.Builder>... capacityProviderStrategy) The capacity provider strategy the service uses. When using the DescribeServices API, this field is omitted if the service was created using a launch type.
This is a convenience method that creates an instance of theCapacityProviderStrategyItem.Builder
avoiding the need to create one manually viaCapacityProviderStrategyItem.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tocapacityProviderStrategy(List<CapacityProviderStrategyItem>)
.- Parameters:
capacityProviderStrategy
- a consumer that will call methods onCapacityProviderStrategyItem.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
platformVersion
The platform version to run your service on. A platform version is only specified for tasks that are hosted on Fargate. If one isn't specified, the
LATEST
platform version is used. For more information, see Fargate Platform Versions in the Amazon Elastic Container Service Developer Guide.- Parameters:
platformVersion
- The platform version to run your service on. A platform version is only specified for tasks that are hosted on Fargate. If one isn't specified, theLATEST
platform version is used. For more information, see Fargate Platform Versions in the Amazon Elastic Container Service Developer Guide.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
platformFamily
The operating system that your tasks in the service run on. A platform family is specified only for tasks using the Fargate launch type.
All tasks that run as part of this service must use the same
platformFamily
value as the service (for example,LINUX
).- Parameters:
platformFamily
- The operating system that your tasks in the service run on. A platform family is specified only for tasks using the Fargate launch type.All tasks that run as part of this service must use the same
platformFamily
value as the service (for example,LINUX
).- Returns:
- 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.
- Parameters:
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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
deploymentConfiguration
Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.
- Parameters:
deploymentConfiguration
- Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
deploymentConfiguration
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 method that creates an instance of theDeploymentConfiguration.Builder
avoiding the need to create one manually viaDeploymentConfiguration.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed todeploymentConfiguration(DeploymentConfiguration)
.- Parameters:
deploymentConfiguration
- a consumer that will call methods onDeploymentConfiguration.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
taskSets
Information about a set of Amazon ECS tasks in either an CodeDeploy or an
EXTERNAL
deployment. An Amazon ECS task set includes details such as the desired number of tasks, how many tasks are running, and whether the task set serves production traffic.- Parameters:
taskSets
- Information about a set of Amazon ECS tasks in either an CodeDeploy or anEXTERNAL
deployment. An Amazon ECS task set includes details such as the desired number of tasks, how many tasks are running, and whether the task set serves production traffic.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
taskSets
Information about a set of Amazon ECS tasks in either an CodeDeploy or an
EXTERNAL
deployment. An Amazon ECS task set includes details such as the desired number of tasks, how many tasks are running, and whether the task set serves production traffic.- Parameters:
taskSets
- Information about a set of Amazon ECS tasks in either an CodeDeploy or anEXTERNAL
deployment. An Amazon ECS task set includes details such as the desired number of tasks, how many tasks are running, and whether the task set serves production traffic.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
taskSets
Information about a set of Amazon ECS tasks in either an CodeDeploy or an
This is a convenience method that creates an instance of theEXTERNAL
deployment. An Amazon ECS task set includes details such as the desired number of tasks, how many tasks are running, and whether the task set serves production traffic.TaskSet.Builder
avoiding the need to create one manually viaTaskSet.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed totaskSets(List<TaskSet>)
.- Parameters:
taskSets
- a consumer that will call methods onTaskSet.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
deployments
The current state of deployments for the service.
- Parameters:
deployments
- The current state of deployments for the service.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
deployments
The current state of deployments for the service.
- Parameters:
deployments
- The current state of deployments for the service.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
deployments
The current state of deployments for the service.
This is a convenience method that creates an instance of theDeployment.Builder
avoiding the need to create one manually viaDeployment.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed todeployments(List<Deployment>)
.- Parameters:
deployments
- a consumer that will call methods onDeployment.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
roleArn
The ARN of the IAM role that's associated with the service. It allows the Amazon ECS container agent to register container instances with an Elastic Load Balancing load balancer.
- Parameters:
roleArn
- The ARN of the IAM role that's associated with the service. It allows the Amazon ECS container agent to register container instances with an Elastic Load Balancing load balancer.- Returns:
- 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.
- Parameters:
events
- The event stream for your service. A maximum of 100 of the latest events are displayed.- Returns:
- 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.
- Parameters:
events
- The event stream for your service. A maximum of 100 of the latest events are displayed.- Returns:
- 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.
This is a convenience method that creates an instance of theServiceEvent.Builder
avoiding the need to create one manually viaServiceEvent.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toevents(List<ServiceEvent>)
.- Parameters:
events
- a consumer that will call methods onServiceEvent.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
createdAt
The Unix timestamp for the time when the service was created.
- Parameters:
createdAt
- The Unix timestamp for the time when the service was created.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
placementConstraints
The placement constraints for the tasks in the service.
- Parameters:
placementConstraints
- The placement constraints for the tasks in the service.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
placementConstraints
The placement constraints for the tasks in the service.
- Parameters:
placementConstraints
- The placement constraints for the tasks in the service.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
placementConstraints
The placement constraints for the tasks in the service.
This is a convenience method that creates an instance of thePlacementConstraint.Builder
avoiding the need to create one manually viaPlacementConstraint.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toplacementConstraints(List<PlacementConstraint>)
.- Parameters:
placementConstraints
- a consumer that will call methods onPlacementConstraint.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
placementStrategy
The placement strategy that determines how tasks for the service are placed.
- Parameters:
placementStrategy
- The placement strategy that determines how tasks for the service are placed.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
placementStrategy
The placement strategy that determines how tasks for the service are placed.
- Parameters:
placementStrategy
- The placement strategy that determines how tasks for the service are placed.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
placementStrategy
The placement strategy that determines how tasks for the service are placed.
This is a convenience method that creates an instance of thePlacementStrategy.Builder
avoiding the need to create one manually viaPlacementStrategy.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toplacementStrategy(List<PlacementStrategy>)
.- Parameters:
placementStrategy
- a consumer that will call methods onPlacementStrategy.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
networkConfiguration
The VPC subnet and security group configuration for tasks that receive their own elastic network interface by using the
awsvpc
networking mode.- Parameters:
networkConfiguration
- The VPC subnet and security group configuration for tasks that receive their own elastic network interface by using theawsvpc
networking mode.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
networkConfiguration
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
This is a convenience method that creates an instance of theawsvpc
networking mode.NetworkConfiguration.Builder
avoiding the need to create one manually viaNetworkConfiguration.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tonetworkConfiguration(NetworkConfiguration)
.- Parameters:
networkConfiguration
- a consumer that will call methods onNetworkConfiguration.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
healthCheckGracePeriodSeconds
The period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing target health checks after a task has first started.
- Parameters:
healthCheckGracePeriodSeconds
- The period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing target health checks after a task has first started.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
schedulingStrategy
The scheduling strategy to use for the service. For more information, see Services.
There are two service scheduler strategies available.
-
REPLICA
-The replica scheduling strategy places and maintains the desired number of tasks across your cluster. By default, the service scheduler spreads tasks across Availability Zones. You can use task placement strategies and constraints to customize task placement decisions. -
DAEMON
-The daemon scheduling strategy deploys exactly one task on each active container instance. This task meets all of the task placement constraints that you specify in your cluster. The service scheduler also evaluates the task placement constraints for running tasks. It stop tasks that don't meet the placement constraints.Fargate tasks don't support the
DAEMON
scheduling strategy.
- Parameters:
schedulingStrategy
- The scheduling strategy to use for the service. For more information, see Services.There are two service scheduler strategies available.
-
REPLICA
-The replica scheduling strategy places and maintains the desired number of tasks across your cluster. By default, the service scheduler spreads tasks across Availability Zones. You can use task placement strategies and constraints to customize task placement decisions. -
DAEMON
-The daemon scheduling strategy deploys exactly one task on each active container instance. This task meets all of the task placement constraints that you specify in your cluster. The service scheduler also evaluates the task placement constraints for running tasks. It stop tasks that don't meet the placement constraints.Fargate tasks don't support the
DAEMON
scheduling strategy.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
-
schedulingStrategy
The scheduling strategy to use for the service. For more information, see Services.
There are two service scheduler strategies available.
-
REPLICA
-The replica scheduling strategy places and maintains the desired number of tasks across your cluster. By default, the service scheduler spreads tasks across Availability Zones. You can use task placement strategies and constraints to customize task placement decisions. -
DAEMON
-The daemon scheduling strategy deploys exactly one task on each active container instance. This task meets all of the task placement constraints that you specify in your cluster. The service scheduler also evaluates the task placement constraints for running tasks. It stop tasks that don't meet the placement constraints.Fargate tasks don't support the
DAEMON
scheduling strategy.
- Parameters:
schedulingStrategy
- The scheduling strategy to use for the service. For more information, see Services.There are two service scheduler strategies available.
-
REPLICA
-The replica scheduling strategy places and maintains the desired number of tasks across your cluster. By default, the service scheduler spreads tasks across Availability Zones. You can use task placement strategies and constraints to customize task placement decisions. -
DAEMON
-The daemon scheduling strategy deploys exactly one task on each active container instance. This task meets all of the task placement constraints that you specify in your cluster. The service scheduler also evaluates the task placement constraints for running tasks. It stop tasks that don't meet the placement constraints.Fargate tasks don't support the
DAEMON
scheduling strategy.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
-
deploymentController
The deployment controller type the service is using.
- Parameters:
deploymentController
- The deployment controller type the service is using.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
deploymentController
default Service.Builder deploymentController(Consumer<DeploymentController.Builder> deploymentController) The deployment controller type the service is using.
This is a convenience method that creates an instance of theDeploymentController.Builder
avoiding the need to create one manually viaDeploymentController.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed todeploymentController(DeploymentController)
.- Parameters:
deploymentController
- a consumer that will call methods onDeploymentController.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
tags
The metadata that you apply to the service to help you categorize and organize them. Each tag consists of a key and an optional value. You define bot the key and value.
The following basic restrictions apply to tags:
-
Maximum number of tags per resource - 50
-
For each resource, each tag key must be unique, and each tag key can have only one value.
-
Maximum key length - 128 Unicode characters in UTF-8
-
Maximum value length - 256 Unicode characters in UTF-8
-
If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
-
Tag keys and values are case-sensitive.
-
Do not use
aws:
,AWS:
, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.
- Parameters:
tags
- The metadata that you apply to the service to help you categorize and organize them. Each tag consists of a key and an optional value. You define bot the key and value.The following basic restrictions apply to tags:
-
Maximum number of tags per resource - 50
-
For each resource, each tag key must be unique, and each tag key can have only one value.
-
Maximum key length - 128 Unicode characters in UTF-8
-
Maximum value length - 256 Unicode characters in UTF-8
-
If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
-
Tag keys and values are case-sensitive.
-
Do not use
aws:
,AWS:
, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-
tags
The metadata that you apply to the service to help you categorize and organize them. Each tag consists of a key and an optional value. You define bot the key and value.
The following basic restrictions apply to tags:
-
Maximum number of tags per resource - 50
-
For each resource, each tag key must be unique, and each tag key can have only one value.
-
Maximum key length - 128 Unicode characters in UTF-8
-
Maximum value length - 256 Unicode characters in UTF-8
-
If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
-
Tag keys and values are case-sensitive.
-
Do not use
aws:
,AWS:
, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.
- Parameters:
tags
- The metadata that you apply to the service to help you categorize and organize them. Each tag consists of a key and an optional value. You define bot the key and value.The following basic restrictions apply to tags:
-
Maximum number of tags per resource - 50
-
For each resource, each tag key must be unique, and each tag key can have only one value.
-
Maximum key length - 128 Unicode characters in UTF-8
-
Maximum value length - 256 Unicode characters in UTF-8
-
If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
-
Tag keys and values are case-sensitive.
-
Do not use
aws:
,AWS:
, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-
tags
The metadata that you apply to the service to help you categorize and organize them. Each tag consists of a key and an optional value. You define bot the key and value.
The following basic restrictions apply to tags:
-
Maximum number of tags per resource - 50
-
For each resource, each tag key must be unique, and each tag key can have only one value.
-
Maximum key length - 128 Unicode characters in UTF-8
-
Maximum value length - 256 Unicode characters in UTF-8
-
If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
-
Tag keys and values are case-sensitive.
-
Do not use
aws:
,AWS:
, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.
Tag.Builder
avoiding the need to create one manually viaTag.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed totags(List<Tag>)
.- Parameters:
tags
- a consumer that will call methods onTag.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
-
createdBy
The principal that created the service.
- Parameters:
createdBy
- The principal that created the service.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
enableECSManagedTags
Determines whether to use Amazon ECS managed tags for the tasks in the service. For more information, see Tagging Your Amazon ECS Resources in the Amazon Elastic Container Service Developer Guide.
- Parameters:
enableECSManagedTags
- Determines whether to use Amazon ECS managed tags for the tasks in the service. For more information, see Tagging Your Amazon ECS Resources in the Amazon Elastic Container Service Developer Guide.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
propagateTags
Determines whether to propagate the tags from the task definition or the service to the task. If no value is specified, the tags aren't propagated.
- Parameters:
propagateTags
- Determines whether to propagate the tags from the task definition or the service to the task. If no value is specified, the tags aren't propagated.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
propagateTags
Determines whether to propagate the tags from the task definition or the service to the task. If no value is specified, the tags aren't propagated.
- Parameters:
propagateTags
- Determines whether to propagate the tags from the task definition or the service to the task. If no value is specified, the tags aren't propagated.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
enableExecuteCommand
Determines whether the execute command functionality is turned on for the service. If
true
, the execute command functionality is turned on for all containers in tasks as part of the service.- Parameters:
enableExecuteCommand
- Determines whether the execute command functionality is turned on for the service. Iftrue
, the execute command functionality is turned on for all containers in tasks as part of the service.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-