Class ServiceState.Builder

  • Enclosing class:
    ServiceState

    public static final class ServiceState.Builder
    extends java.lang.Object
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • alarms

        public ServiceState.Builder alarms​(@Nullable
                                           com.pulumi.core.Output<ServiceAlarmsArgs> alarms)
        Parameters:
        alarms - Information about the CloudWatch alarms. See below.
        Returns:
        builder
      • capacityProviderStrategies

        public ServiceState.Builder capacityProviderStrategies​(@Nullable
                                                               com.pulumi.core.Output<java.util.List<ServiceCapacityProviderStrategyArgs>> capacityProviderStrategies)
        Parameters:
        capacityProviderStrategies - Capacity provider strategies to use for the service. Can be one or more. These can be updated without destroying and recreating the service only if `force_new_deployment = true` and not changing from 0 `capacity_provider_strategy` blocks to greater than 0, or vice versa. See below. Conflicts with `launch_type`.
        Returns:
        builder
      • capacityProviderStrategies

        public ServiceState.Builder capacityProviderStrategies​(java.util.List<ServiceCapacityProviderStrategyArgs> capacityProviderStrategies)
        Parameters:
        capacityProviderStrategies - Capacity provider strategies to use for the service. Can be one or more. These can be updated without destroying and recreating the service only if `force_new_deployment = true` and not changing from 0 `capacity_provider_strategy` blocks to greater than 0, or vice versa. See below. Conflicts with `launch_type`.
        Returns:
        builder
      • capacityProviderStrategies

        public ServiceState.Builder capacityProviderStrategies​(ServiceCapacityProviderStrategyArgs... capacityProviderStrategies)
        Parameters:
        capacityProviderStrategies - Capacity provider strategies to use for the service. Can be one or more. These can be updated without destroying and recreating the service only if `force_new_deployment = true` and not changing from 0 `capacity_provider_strategy` blocks to greater than 0, or vice versa. See below. Conflicts with `launch_type`.
        Returns:
        builder
      • cluster

        public ServiceState.Builder cluster​(@Nullable
                                            com.pulumi.core.Output<java.lang.String> cluster)
        Parameters:
        cluster - ARN of an ECS cluster.
        Returns:
        builder
      • cluster

        public ServiceState.Builder cluster​(java.lang.String cluster)
        Parameters:
        cluster - ARN of an ECS cluster.
        Returns:
        builder
      • deploymentCircuitBreaker

        public ServiceState.Builder deploymentCircuitBreaker​(@Nullable
                                                             com.pulumi.core.Output<ServiceDeploymentCircuitBreakerArgs> deploymentCircuitBreaker)
        Parameters:
        deploymentCircuitBreaker - Configuration block for deployment circuit breaker. See below.
        Returns:
        builder
      • deploymentController

        public ServiceState.Builder deploymentController​(@Nullable
                                                         com.pulumi.core.Output<ServiceDeploymentControllerArgs> deploymentController)
        Parameters:
        deploymentController - Configuration block for deployment controller configuration. See below.
        Returns:
        builder
      • deploymentController

        public ServiceState.Builder deploymentController​(ServiceDeploymentControllerArgs deploymentController)
        Parameters:
        deploymentController - Configuration block for deployment controller configuration. See below.
        Returns:
        builder
      • deploymentMaximumPercent

        public ServiceState.Builder deploymentMaximumPercent​(@Nullable
                                                             com.pulumi.core.Output<java.lang.Integer> deploymentMaximumPercent)
        Parameters:
        deploymentMaximumPercent - Upper limit (as a percentage of the service's desiredCount) of the number of running tasks that can be running in a service during a deployment. Not valid when using the `DAEMON` scheduling strategy.
        Returns:
        builder
      • deploymentMaximumPercent

        public ServiceState.Builder deploymentMaximumPercent​(java.lang.Integer deploymentMaximumPercent)
        Parameters:
        deploymentMaximumPercent - Upper limit (as a percentage of the service's desiredCount) of the number of running tasks that can be running in a service during a deployment. Not valid when using the `DAEMON` scheduling strategy.
        Returns:
        builder
      • deploymentMinimumHealthyPercent

        public ServiceState.Builder deploymentMinimumHealthyPercent​(@Nullable
                                                                    com.pulumi.core.Output<java.lang.Integer> deploymentMinimumHealthyPercent)
        Parameters:
        deploymentMinimumHealthyPercent - Lower limit (as a percentage of the service's desiredCount) of the number of running tasks that must remain running and healthy in a service during a deployment.
        Returns:
        builder
      • deploymentMinimumHealthyPercent

        public ServiceState.Builder deploymentMinimumHealthyPercent​(java.lang.Integer deploymentMinimumHealthyPercent)
        Parameters:
        deploymentMinimumHealthyPercent - Lower limit (as a percentage of the service's desiredCount) of the number of running tasks that must remain running and healthy in a service during a deployment.
        Returns:
        builder
      • desiredCount

        public ServiceState.Builder desiredCount​(@Nullable
                                                 com.pulumi.core.Output<java.lang.Integer> desiredCount)
        Parameters:
        desiredCount - Number of instances of the task definition to place and keep running. Defaults to 0. Do not specify if using the `DAEMON` scheduling strategy.
        Returns:
        builder
      • desiredCount

        public ServiceState.Builder desiredCount​(java.lang.Integer desiredCount)
        Parameters:
        desiredCount - Number of instances of the task definition to place and keep running. Defaults to 0. Do not specify if using the `DAEMON` scheduling strategy.
        Returns:
        builder
      • enableEcsManagedTags

        public ServiceState.Builder enableEcsManagedTags​(@Nullable
                                                         com.pulumi.core.Output<java.lang.Boolean> enableEcsManagedTags)
        Parameters:
        enableEcsManagedTags - Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
        Returns:
        builder
      • enableEcsManagedTags

        public ServiceState.Builder enableEcsManagedTags​(java.lang.Boolean enableEcsManagedTags)
        Parameters:
        enableEcsManagedTags - Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
        Returns:
        builder
      • enableExecuteCommand

        public ServiceState.Builder enableExecuteCommand​(@Nullable
                                                         com.pulumi.core.Output<java.lang.Boolean> enableExecuteCommand)
        Parameters:
        enableExecuteCommand - Specifies whether to enable Amazon ECS Exec for the tasks within the service.
        Returns:
        builder
      • enableExecuteCommand

        public ServiceState.Builder enableExecuteCommand​(java.lang.Boolean enableExecuteCommand)
        Parameters:
        enableExecuteCommand - Specifies whether to enable Amazon ECS Exec for the tasks within the service.
        Returns:
        builder
      • forceNewDeployment

        public ServiceState.Builder forceNewDeployment​(@Nullable
                                                       com.pulumi.core.Output<java.lang.Boolean> forceNewDeployment)
        Parameters:
        forceNewDeployment - Enable to force a new task deployment of the service. This can be used to update tasks to use a newer Docker image with same image/tag combination (e.g., `myimage:latest`), roll Fargate tasks onto a newer platform version, or immediately deploy `ordered_placement_strategy` and `placement_constraints` updates.
        Returns:
        builder
      • forceNewDeployment

        public ServiceState.Builder forceNewDeployment​(java.lang.Boolean forceNewDeployment)
        Parameters:
        forceNewDeployment - Enable to force a new task deployment of the service. This can be used to update tasks to use a newer Docker image with same image/tag combination (e.g., `myimage:latest`), roll Fargate tasks onto a newer platform version, or immediately deploy `ordered_placement_strategy` and `placement_constraints` updates.
        Returns:
        builder
      • healthCheckGracePeriodSeconds

        public ServiceState.Builder healthCheckGracePeriodSeconds​(@Nullable
                                                                  com.pulumi.core.Output<java.lang.Integer> healthCheckGracePeriodSeconds)
        Parameters:
        healthCheckGracePeriodSeconds - Seconds to ignore failing load balancer health checks on newly instantiated tasks to prevent premature shutdown, up to 2147483647. Only valid for services configured to use load balancers.
        Returns:
        builder
      • healthCheckGracePeriodSeconds

        public ServiceState.Builder healthCheckGracePeriodSeconds​(java.lang.Integer healthCheckGracePeriodSeconds)
        Parameters:
        healthCheckGracePeriodSeconds - Seconds to ignore failing load balancer health checks on newly instantiated tasks to prevent premature shutdown, up to 2147483647. Only valid for services configured to use load balancers.
        Returns:
        builder
      • iamRole

        public ServiceState.Builder iamRole​(@Nullable
                                            com.pulumi.core.Output<java.lang.String> iamRole)
        Parameters:
        iamRole - ARN of the IAM role that allows Amazon ECS to make calls to your load balancer on your behalf. This parameter is required if you are using a load balancer with your service, but only if your task definition does not use the `awsvpc` network mode. If using `awsvpc` network mode, do not specify this role. If your account has already created the Amazon ECS service-linked role, that role is used by default for your service unless you specify a role here.
        Returns:
        builder
      • iamRole

        public ServiceState.Builder iamRole​(java.lang.String iamRole)
        Parameters:
        iamRole - ARN of the IAM role that allows Amazon ECS to make calls to your load balancer on your behalf. This parameter is required if you are using a load balancer with your service, but only if your task definition does not use the `awsvpc` network mode. If using `awsvpc` network mode, do not specify this role. If your account has already created the Amazon ECS service-linked role, that role is used by default for your service unless you specify a role here.
        Returns:
        builder
      • launchType

        public ServiceState.Builder launchType​(@Nullable
                                               com.pulumi.core.Output<java.lang.String> launchType)
        Parameters:
        launchType - Launch type on which to run your service. The valid values are `EC2`, `FARGATE`, and `EXTERNAL`. Defaults to `EC2`. Conflicts with `capacity_provider_strategy`.
        Returns:
        builder
      • launchType

        public ServiceState.Builder launchType​(java.lang.String launchType)
        Parameters:
        launchType - Launch type on which to run your service. The valid values are `EC2`, `FARGATE`, and `EXTERNAL`. Defaults to `EC2`. Conflicts with `capacity_provider_strategy`.
        Returns:
        builder
      • loadBalancers

        public ServiceState.Builder loadBalancers​(@Nullable
                                                  com.pulumi.core.Output<java.util.List<ServiceLoadBalancerArgs>> loadBalancers)
        Parameters:
        loadBalancers - Configuration block for load balancers. See below.
        Returns:
        builder
      • name

        public ServiceState.Builder name​(@Nullable
                                         com.pulumi.core.Output<java.lang.String> name)
        Parameters:
        name - Name of the service (up to 255 letters, numbers, hyphens, and underscores) The following arguments are optional:
        Returns:
        builder
      • name

        public ServiceState.Builder name​(java.lang.String name)
        Parameters:
        name - Name of the service (up to 255 letters, numbers, hyphens, and underscores) The following arguments are optional:
        Returns:
        builder
      • networkConfiguration

        public ServiceState.Builder networkConfiguration​(@Nullable
                                                         com.pulumi.core.Output<ServiceNetworkConfigurationArgs> networkConfiguration)
        Parameters:
        networkConfiguration - Network configuration for the service. This parameter is required for task definitions that use the `awsvpc` network mode to receive their own Elastic Network Interface, and it is not supported for other network modes. See below.
        Returns:
        builder
      • networkConfiguration

        public ServiceState.Builder networkConfiguration​(ServiceNetworkConfigurationArgs networkConfiguration)
        Parameters:
        networkConfiguration - Network configuration for the service. This parameter is required for task definitions that use the `awsvpc` network mode to receive their own Elastic Network Interface, and it is not supported for other network modes. See below.
        Returns:
        builder
      • orderedPlacementStrategies

        public ServiceState.Builder orderedPlacementStrategies​(@Nullable
                                                               com.pulumi.core.Output<java.util.List<ServiceOrderedPlacementStrategyArgs>> orderedPlacementStrategies)
        Parameters:
        orderedPlacementStrategies - Service level strategy rules that are taken into consideration during task placement. List from top to bottom in order of precedence. Updates to this configuration will take effect next task deployment unless `force_new_deployment` is enabled. The maximum number of `ordered_placement_strategy` blocks is `5`. See below.
        Returns:
        builder
      • orderedPlacementStrategies

        public ServiceState.Builder orderedPlacementStrategies​(java.util.List<ServiceOrderedPlacementStrategyArgs> orderedPlacementStrategies)
        Parameters:
        orderedPlacementStrategies - Service level strategy rules that are taken into consideration during task placement. List from top to bottom in order of precedence. Updates to this configuration will take effect next task deployment unless `force_new_deployment` is enabled. The maximum number of `ordered_placement_strategy` blocks is `5`. See below.
        Returns:
        builder
      • orderedPlacementStrategies

        public ServiceState.Builder orderedPlacementStrategies​(ServiceOrderedPlacementStrategyArgs... orderedPlacementStrategies)
        Parameters:
        orderedPlacementStrategies - Service level strategy rules that are taken into consideration during task placement. List from top to bottom in order of precedence. Updates to this configuration will take effect next task deployment unless `force_new_deployment` is enabled. The maximum number of `ordered_placement_strategy` blocks is `5`. See below.
        Returns:
        builder
      • placementConstraints

        public ServiceState.Builder placementConstraints​(@Nullable
                                                         com.pulumi.core.Output<java.util.List<ServicePlacementConstraintArgs>> placementConstraints)
        Parameters:
        placementConstraints - Rules that are taken into consideration during task placement. Updates to this configuration will take effect next task deployment unless `force_new_deployment` is enabled. Maximum number of `placement_constraints` is `10`. See below.
        Returns:
        builder
      • placementConstraints

        public ServiceState.Builder placementConstraints​(java.util.List<ServicePlacementConstraintArgs> placementConstraints)
        Parameters:
        placementConstraints - Rules that are taken into consideration during task placement. Updates to this configuration will take effect next task deployment unless `force_new_deployment` is enabled. Maximum number of `placement_constraints` is `10`. See below.
        Returns:
        builder
      • placementConstraints

        public ServiceState.Builder placementConstraints​(ServicePlacementConstraintArgs... placementConstraints)
        Parameters:
        placementConstraints - Rules that are taken into consideration during task placement. Updates to this configuration will take effect next task deployment unless `force_new_deployment` is enabled. Maximum number of `placement_constraints` is `10`. See below.
        Returns:
        builder
      • platformVersion

        public ServiceState.Builder platformVersion​(@Nullable
                                                    com.pulumi.core.Output<java.lang.String> platformVersion)
        Parameters:
        platformVersion - Platform version on which to run your service. Only applicable for `launch_type` set to `FARGATE`. Defaults to `LATEST`. More information about Fargate platform versions can be found in the [AWS ECS User Guide](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html).
        Returns:
        builder
      • platformVersion

        public ServiceState.Builder platformVersion​(java.lang.String platformVersion)
        Parameters:
        platformVersion - Platform version on which to run your service. Only applicable for `launch_type` set to `FARGATE`. Defaults to `LATEST`. More information about Fargate platform versions can be found in the [AWS ECS User Guide](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html).
        Returns:
        builder
      • propagateTags

        public ServiceState.Builder propagateTags​(@Nullable
                                                  com.pulumi.core.Output<java.lang.String> propagateTags)
        Parameters:
        propagateTags - Specifies whether to propagate the tags from the task definition or the service to the tasks. The valid values are `SERVICE` and `TASK_DEFINITION`.
        Returns:
        builder
      • propagateTags

        public ServiceState.Builder propagateTags​(java.lang.String propagateTags)
        Parameters:
        propagateTags - Specifies whether to propagate the tags from the task definition or the service to the tasks. The valid values are `SERVICE` and `TASK_DEFINITION`.
        Returns:
        builder
      • schedulingStrategy

        public ServiceState.Builder schedulingStrategy​(@Nullable
                                                       com.pulumi.core.Output<java.lang.String> schedulingStrategy)
        Parameters:
        schedulingStrategy - Scheduling strategy to use for the service. The valid values are `REPLICA` and `DAEMON`. Defaults to `REPLICA`. Note that [*Tasks using the Fargate launch type or the `CODE_DEPLOY` or `EXTERNAL` deployment controller types don't support the `DAEMON` scheduling strategy*](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_CreateService.html).
        Returns:
        builder
      • schedulingStrategy

        public ServiceState.Builder schedulingStrategy​(java.lang.String schedulingStrategy)
        Parameters:
        schedulingStrategy - Scheduling strategy to use for the service. The valid values are `REPLICA` and `DAEMON`. Defaults to `REPLICA`. Note that [*Tasks using the Fargate launch type or the `CODE_DEPLOY` or `EXTERNAL` deployment controller types don't support the `DAEMON` scheduling strategy*](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_CreateService.html).
        Returns:
        builder
      • serviceConnectConfiguration

        public ServiceState.Builder serviceConnectConfiguration​(@Nullable
                                                                com.pulumi.core.Output<ServiceServiceConnectConfigurationArgs> serviceConnectConfiguration)
        Parameters:
        serviceConnectConfiguration - The ECS Service Connect configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace. See below.
        Returns:
        builder
      • serviceConnectConfiguration

        public ServiceState.Builder serviceConnectConfiguration​(ServiceServiceConnectConfigurationArgs serviceConnectConfiguration)
        Parameters:
        serviceConnectConfiguration - The ECS Service Connect configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace. See below.
        Returns:
        builder
      • serviceRegistries

        public ServiceState.Builder serviceRegistries​(@Nullable
                                                      com.pulumi.core.Output<ServiceServiceRegistriesArgs> serviceRegistries)
        Parameters:
        serviceRegistries - Service discovery registries for the service. The maximum number of `service_registries` blocks is `1`. See below.
        Returns:
        builder
      • serviceRegistries

        public ServiceState.Builder serviceRegistries​(ServiceServiceRegistriesArgs serviceRegistries)
        Parameters:
        serviceRegistries - Service discovery registries for the service. The maximum number of `service_registries` blocks is `1`. See below.
        Returns:
        builder
      • tags

        public ServiceState.Builder tags​(@Nullable
                                         com.pulumi.core.Output<java.util.Map<java.lang.String,​java.lang.String>> tags)
        Parameters:
        tags - Key-value map of resource tags. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
        Returns:
        builder
      • tags

        public ServiceState.Builder tags​(java.util.Map<java.lang.String,​java.lang.String> tags)
        Parameters:
        tags - Key-value map of resource tags. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
        Returns:
        builder
      • tagsAll

        @Deprecated
        public ServiceState.Builder tagsAll​(@Nullable
                                            com.pulumi.core.Output<java.util.Map<java.lang.String,​java.lang.String>> tagsAll)
        Deprecated.
        Please use `tags` instead.
        Parameters:
        tagsAll - A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
        Returns:
        builder
      • tagsAll

        @Deprecated
        public ServiceState.Builder tagsAll​(java.util.Map<java.lang.String,​java.lang.String> tagsAll)
        Deprecated.
        Please use `tags` instead.
        Parameters:
        tagsAll - A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
        Returns:
        builder
      • taskDefinition

        public ServiceState.Builder taskDefinition​(@Nullable
                                                   com.pulumi.core.Output<java.lang.String> taskDefinition)
        Parameters:
        taskDefinition - Family and revision (`family:revision`) or full ARN of the task definition that you want to run in your service. Required unless using the `EXTERNAL` deployment controller. If a revision is not specified, the latest `ACTIVE` revision is used.
        Returns:
        builder
      • taskDefinition

        public ServiceState.Builder taskDefinition​(java.lang.String taskDefinition)
        Parameters:
        taskDefinition - Family and revision (`family:revision`) or full ARN of the task definition that you want to run in your service. Required unless using the `EXTERNAL` deployment controller. If a revision is not specified, the latest `ACTIVE` revision is used.
        Returns:
        builder
      • triggers

        public ServiceState.Builder triggers​(@Nullable
                                             com.pulumi.core.Output<java.util.Map<java.lang.String,​java.lang.String>> triggers)
        Parameters:
        triggers - Map of arbitrary keys and values that, when changed, will trigger an in-place update (redeployment). Useful with `plantimestamp()`. See example above.
        Returns:
        builder
      • triggers

        public ServiceState.Builder triggers​(java.util.Map<java.lang.String,​java.lang.String> triggers)
        Parameters:
        triggers - Map of arbitrary keys and values that, when changed, will trigger an in-place update (redeployment). Useful with `plantimestamp()`. See example above.
        Returns:
        builder
      • waitForSteadyState

        public ServiceState.Builder waitForSteadyState​(@Nullable
                                                       com.pulumi.core.Output<java.lang.Boolean> waitForSteadyState)
        Parameters:
        waitForSteadyState - If `true`, this provider will wait for the service to reach a steady state (like [`aws ecs wait services-stable`](https://docs.aws.amazon.com/cli/latest/reference/ecs/wait/services-stable.html)) before continuing. Default `false`.
        Returns:
        builder
      • waitForSteadyState

        public ServiceState.Builder waitForSteadyState​(java.lang.Boolean waitForSteadyState)
        Parameters:
        waitForSteadyState - If `true`, this provider will wait for the service to reach a steady state (like [`aws ecs wait services-stable`](https://docs.aws.amazon.com/cli/latest/reference/ecs/wait/services-stable.html)) before continuing. Default `false`.
        Returns:
        builder