All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.aws.ecs.kotlin.ServiceArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 6.57.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.ecs.kotlin

import com.pulumi.aws.ecs.ServiceArgs.builder
import com.pulumi.aws.ecs.kotlin.inputs.ServiceAlarmsArgs
import com.pulumi.aws.ecs.kotlin.inputs.ServiceAlarmsArgsBuilder
import com.pulumi.aws.ecs.kotlin.inputs.ServiceCapacityProviderStrategyArgs
import com.pulumi.aws.ecs.kotlin.inputs.ServiceCapacityProviderStrategyArgsBuilder
import com.pulumi.aws.ecs.kotlin.inputs.ServiceDeploymentCircuitBreakerArgs
import com.pulumi.aws.ecs.kotlin.inputs.ServiceDeploymentCircuitBreakerArgsBuilder
import com.pulumi.aws.ecs.kotlin.inputs.ServiceDeploymentControllerArgs
import com.pulumi.aws.ecs.kotlin.inputs.ServiceDeploymentControllerArgsBuilder
import com.pulumi.aws.ecs.kotlin.inputs.ServiceLoadBalancerArgs
import com.pulumi.aws.ecs.kotlin.inputs.ServiceLoadBalancerArgsBuilder
import com.pulumi.aws.ecs.kotlin.inputs.ServiceNetworkConfigurationArgs
import com.pulumi.aws.ecs.kotlin.inputs.ServiceNetworkConfigurationArgsBuilder
import com.pulumi.aws.ecs.kotlin.inputs.ServiceOrderedPlacementStrategyArgs
import com.pulumi.aws.ecs.kotlin.inputs.ServiceOrderedPlacementStrategyArgsBuilder
import com.pulumi.aws.ecs.kotlin.inputs.ServicePlacementConstraintArgs
import com.pulumi.aws.ecs.kotlin.inputs.ServicePlacementConstraintArgsBuilder
import com.pulumi.aws.ecs.kotlin.inputs.ServiceServiceConnectConfigurationArgs
import com.pulumi.aws.ecs.kotlin.inputs.ServiceServiceConnectConfigurationArgsBuilder
import com.pulumi.aws.ecs.kotlin.inputs.ServiceServiceRegistriesArgs
import com.pulumi.aws.ecs.kotlin.inputs.ServiceServiceRegistriesArgsBuilder
import com.pulumi.aws.ecs.kotlin.inputs.ServiceVolumeConfigurationArgs
import com.pulumi.aws.ecs.kotlin.inputs.ServiceVolumeConfigurationArgsBuilder
import com.pulumi.aws.ecs.kotlin.inputs.ServiceVpcLatticeConfigurationArgs
import com.pulumi.aws.ecs.kotlin.inputs.ServiceVpcLatticeConfigurationArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * > **Note:** To prevent a race condition during service deletion, make sure to set `depends_on` to the related `aws.iam.RolePolicy`; otherwise, the policy may be destroyed too soon and the ECS service will then get stuck in the `DRAINING` state.
 * Provides an ECS service - effectively a task that is expected to run until an error occurs or a user terminates it (typically a webserver or a database).
 * See [ECS Services section in AWS developer guide](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_services.html).
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const mongo = new aws.ecs.Service("mongo", {
 *     name: "mongodb",
 *     cluster: fooAwsEcsCluster.id,
 *     taskDefinition: mongoAwsEcsTaskDefinition.arn,
 *     desiredCount: 3,
 *     iamRole: fooAwsIamRole.arn,
 *     orderedPlacementStrategies: [{
 *         type: "binpack",
 *         field: "cpu",
 *     }],
 *     loadBalancers: [{
 *         targetGroupArn: fooAwsLbTargetGroup.arn,
 *         containerName: "mongo",
 *         containerPort: 8080,
 *     }],
 *     placementConstraints: [{
 *         type: "memberOf",
 *         expression: "attribute:ecs.availability-zone in [us-west-2a, us-west-2b]",
 *     }],
 * }, {
 *     dependsOn: [foo],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * mongo = aws.ecs.Service("mongo",
 *     name="mongodb",
 *     cluster=foo_aws_ecs_cluster["id"],
 *     task_definition=mongo_aws_ecs_task_definition["arn"],
 *     desired_count=3,
 *     iam_role=foo_aws_iam_role["arn"],
 *     ordered_placement_strategies=[{
 *         "type": "binpack",
 *         "field": "cpu",
 *     }],
 *     load_balancers=[{
 *         "target_group_arn": foo_aws_lb_target_group["arn"],
 *         "container_name": "mongo",
 *         "container_port": 8080,
 *     }],
 *     placement_constraints=[{
 *         "type": "memberOf",
 *         "expression": "attribute:ecs.availability-zone in [us-west-2a, us-west-2b]",
 *     }],
 *     opts = pulumi.ResourceOptions(depends_on=[foo]))
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var mongo = new Aws.Ecs.Service("mongo", new()
 *     {
 *         Name = "mongodb",
 *         Cluster = fooAwsEcsCluster.Id,
 *         TaskDefinition = mongoAwsEcsTaskDefinition.Arn,
 *         DesiredCount = 3,
 *         IamRole = fooAwsIamRole.Arn,
 *         OrderedPlacementStrategies = new[]
 *         {
 *             new Aws.Ecs.Inputs.ServiceOrderedPlacementStrategyArgs
 *             {
 *                 Type = "binpack",
 *                 Field = "cpu",
 *             },
 *         },
 *         LoadBalancers = new[]
 *         {
 *             new Aws.Ecs.Inputs.ServiceLoadBalancerArgs
 *             {
 *                 TargetGroupArn = fooAwsLbTargetGroup.Arn,
 *                 ContainerName = "mongo",
 *                 ContainerPort = 8080,
 *             },
 *         },
 *         PlacementConstraints = new[]
 *         {
 *             new Aws.Ecs.Inputs.ServicePlacementConstraintArgs
 *             {
 *                 Type = "memberOf",
 *                 Expression = "attribute:ecs.availability-zone in [us-west-2a, us-west-2b]",
 *             },
 *         },
 *     }, new CustomResourceOptions
 *     {
 *         DependsOn =
 *         {
 *             foo,
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecs"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := ecs.NewService(ctx, "mongo", &ecs.ServiceArgs{
 * 			Name:           pulumi.String("mongodb"),
 * 			Cluster:        pulumi.Any(fooAwsEcsCluster.Id),
 * 			TaskDefinition: pulumi.Any(mongoAwsEcsTaskDefinition.Arn),
 * 			DesiredCount:   pulumi.Int(3),
 * 			IamRole:        pulumi.Any(fooAwsIamRole.Arn),
 * 			OrderedPlacementStrategies: ecs.ServiceOrderedPlacementStrategyArray{
 * 				&ecs.ServiceOrderedPlacementStrategyArgs{
 * 					Type:  pulumi.String("binpack"),
 * 					Field: pulumi.String("cpu"),
 * 				},
 * 			},
 * 			LoadBalancers: ecs.ServiceLoadBalancerArray{
 * 				&ecs.ServiceLoadBalancerArgs{
 * 					TargetGroupArn: pulumi.Any(fooAwsLbTargetGroup.Arn),
 * 					ContainerName:  pulumi.String("mongo"),
 * 					ContainerPort:  pulumi.Int(8080),
 * 				},
 * 			},
 * 			PlacementConstraints: ecs.ServicePlacementConstraintArray{
 * 				&ecs.ServicePlacementConstraintArgs{
 * 					Type:       pulumi.String("memberOf"),
 * 					Expression: pulumi.String("attribute:ecs.availability-zone in [us-west-2a, us-west-2b]"),
 * 				},
 * 			},
 * 		}, pulumi.DependsOn([]pulumi.Resource{
 * 			foo,
 * 		}))
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.aws.ecs.Service;
 * import com.pulumi.aws.ecs.ServiceArgs;
 * import com.pulumi.aws.ecs.inputs.ServiceOrderedPlacementStrategyArgs;
 * import com.pulumi.aws.ecs.inputs.ServiceLoadBalancerArgs;
 * import com.pulumi.aws.ecs.inputs.ServicePlacementConstraintArgs;
 * import com.pulumi.resources.CustomResourceOptions;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var mongo = new Service("mongo", ServiceArgs.builder()
 *             .name("mongodb")
 *             .cluster(fooAwsEcsCluster.id())
 *             .taskDefinition(mongoAwsEcsTaskDefinition.arn())
 *             .desiredCount(3)
 *             .iamRole(fooAwsIamRole.arn())
 *             .orderedPlacementStrategies(ServiceOrderedPlacementStrategyArgs.builder()
 *                 .type("binpack")
 *                 .field("cpu")
 *                 .build())
 *             .loadBalancers(ServiceLoadBalancerArgs.builder()
 *                 .targetGroupArn(fooAwsLbTargetGroup.arn())
 *                 .containerName("mongo")
 *                 .containerPort(8080)
 *                 .build())
 *             .placementConstraints(ServicePlacementConstraintArgs.builder()
 *                 .type("memberOf")
 *                 .expression("attribute:ecs.availability-zone in [us-west-2a, us-west-2b]")
 *                 .build())
 *             .build(), CustomResourceOptions.builder()
 *                 .dependsOn(foo)
 *                 .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   mongo:
 *     type: aws:ecs:Service
 *     properties:
 *       name: mongodb
 *       cluster: ${fooAwsEcsCluster.id}
 *       taskDefinition: ${mongoAwsEcsTaskDefinition.arn}
 *       desiredCount: 3
 *       iamRole: ${fooAwsIamRole.arn}
 *       orderedPlacementStrategies:
 *         - type: binpack
 *           field: cpu
 *       loadBalancers:
 *         - targetGroupArn: ${fooAwsLbTargetGroup.arn}
 *           containerName: mongo
 *           containerPort: 8080
 *       placementConstraints:
 *         - type: memberOf
 *           expression: attribute:ecs.availability-zone in [us-west-2a, us-west-2b]
 *     options:
 *       dependson:
 *         - ${foo}
 * ```
 * 
 * ### Ignoring Changes to Desired Count
 * You can use [`ignoreChanges`](https://www.pulumi.com/docs/intro/concepts/programming-model/#ignorechanges) to create an ECS service with an initial count of running instances, then ignore any changes to that count caused externally (e.g. Application Autoscaling).
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const example = new aws.ecs.Service("example", {desiredCount: 2});
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * example = aws.ecs.Service("example", desired_count=2)
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Aws.Ecs.Service("example", new()
 *     {
 *         DesiredCount = 2,
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecs"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := ecs.NewService(ctx, "example", &ecs.ServiceArgs{
 * 			DesiredCount: pulumi.Int(2),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.aws.ecs.Service;
 * import com.pulumi.aws.ecs.ServiceArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var example = new Service("example", ServiceArgs.builder()
 *             .desiredCount(2)
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: aws:ecs:Service
 *     properties:
 *       desiredCount: 2 # Optional: Allow external changes without this provider plan difference
 * ```
 * 
 * ### Daemon Scheduling Strategy
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const bar = new aws.ecs.Service("bar", {
 *     name: "bar",
 *     cluster: foo.id,
 *     taskDefinition: barAwsEcsTaskDefinition.arn,
 *     schedulingStrategy: "DAEMON",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * bar = aws.ecs.Service("bar",
 *     name="bar",
 *     cluster=foo["id"],
 *     task_definition=bar_aws_ecs_task_definition["arn"],
 *     scheduling_strategy="DAEMON")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var bar = new Aws.Ecs.Service("bar", new()
 *     {
 *         Name = "bar",
 *         Cluster = foo.Id,
 *         TaskDefinition = barAwsEcsTaskDefinition.Arn,
 *         SchedulingStrategy = "DAEMON",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecs"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := ecs.NewService(ctx, "bar", &ecs.ServiceArgs{
 * 			Name:               pulumi.String("bar"),
 * 			Cluster:            pulumi.Any(foo.Id),
 * 			TaskDefinition:     pulumi.Any(barAwsEcsTaskDefinition.Arn),
 * 			SchedulingStrategy: pulumi.String("DAEMON"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.aws.ecs.Service;
 * import com.pulumi.aws.ecs.ServiceArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var bar = new Service("bar", ServiceArgs.builder()
 *             .name("bar")
 *             .cluster(foo.id())
 *             .taskDefinition(barAwsEcsTaskDefinition.arn())
 *             .schedulingStrategy("DAEMON")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   bar:
 *     type: aws:ecs:Service
 *     properties:
 *       name: bar
 *       cluster: ${foo.id}
 *       taskDefinition: ${barAwsEcsTaskDefinition.arn}
 *       schedulingStrategy: DAEMON
 * ```
 * 
 * ### CloudWatch Deployment Alarms
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const example = new aws.ecs.Service("example", {
 *     name: "example",
 *     cluster: exampleAwsEcsCluster.id,
 *     alarms: {
 *         enable: true,
 *         rollback: true,
 *         alarmNames: [exampleAwsCloudwatchMetricAlarm.alarmName],
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * example = aws.ecs.Service("example",
 *     name="example",
 *     cluster=example_aws_ecs_cluster["id"],
 *     alarms={
 *         "enable": True,
 *         "rollback": True,
 *         "alarm_names": [example_aws_cloudwatch_metric_alarm["alarmName"]],
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Aws.Ecs.Service("example", new()
 *     {
 *         Name = "example",
 *         Cluster = exampleAwsEcsCluster.Id,
 *         Alarms = new Aws.Ecs.Inputs.ServiceAlarmsArgs
 *         {
 *             Enable = true,
 *             Rollback = true,
 *             AlarmNames = new[]
 *             {
 *                 exampleAwsCloudwatchMetricAlarm.AlarmName,
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecs"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := ecs.NewService(ctx, "example", &ecs.ServiceArgs{
 * 			Name:    pulumi.String("example"),
 * 			Cluster: pulumi.Any(exampleAwsEcsCluster.Id),
 * 			Alarms: &ecs.ServiceAlarmsArgs{
 * 				Enable:   pulumi.Bool(true),
 * 				Rollback: pulumi.Bool(true),
 * 				AlarmNames: pulumi.StringArray{
 * 					exampleAwsCloudwatchMetricAlarm.AlarmName,
 * 				},
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.aws.ecs.Service;
 * import com.pulumi.aws.ecs.ServiceArgs;
 * import com.pulumi.aws.ecs.inputs.ServiceAlarmsArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var example = new Service("example", ServiceArgs.builder()
 *             .name("example")
 *             .cluster(exampleAwsEcsCluster.id())
 *             .alarms(ServiceAlarmsArgs.builder()
 *                 .enable(true)
 *                 .rollback(true)
 *                 .alarmNames(exampleAwsCloudwatchMetricAlarm.alarmName())
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: aws:ecs:Service
 *     properties:
 *       name: example
 *       cluster: ${exampleAwsEcsCluster.id}
 *       alarms:
 *         enable: true
 *         rollback: true
 *         alarmNames:
 *           - ${exampleAwsCloudwatchMetricAlarm.alarmName}
 * ```
 * 
 * ### External Deployment Controller
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const example = new aws.ecs.Service("example", {
 *     name: "example",
 *     cluster: exampleAwsEcsCluster.id,
 *     deploymentController: {
 *         type: "EXTERNAL",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * example = aws.ecs.Service("example",
 *     name="example",
 *     cluster=example_aws_ecs_cluster["id"],
 *     deployment_controller={
 *         "type": "EXTERNAL",
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Aws.Ecs.Service("example", new()
 *     {
 *         Name = "example",
 *         Cluster = exampleAwsEcsCluster.Id,
 *         DeploymentController = new Aws.Ecs.Inputs.ServiceDeploymentControllerArgs
 *         {
 *             Type = "EXTERNAL",
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecs"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := ecs.NewService(ctx, "example", &ecs.ServiceArgs{
 * 			Name:    pulumi.String("example"),
 * 			Cluster: pulumi.Any(exampleAwsEcsCluster.Id),
 * 			DeploymentController: &ecs.ServiceDeploymentControllerArgs{
 * 				Type: pulumi.String("EXTERNAL"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.aws.ecs.Service;
 * import com.pulumi.aws.ecs.ServiceArgs;
 * import com.pulumi.aws.ecs.inputs.ServiceDeploymentControllerArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var example = new Service("example", ServiceArgs.builder()
 *             .name("example")
 *             .cluster(exampleAwsEcsCluster.id())
 *             .deploymentController(ServiceDeploymentControllerArgs.builder()
 *                 .type("EXTERNAL")
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: aws:ecs:Service
 *     properties:
 *       name: example
 *       cluster: ${exampleAwsEcsCluster.id}
 *       deploymentController:
 *         type: EXTERNAL
 * ```
 * 
 * ### Redeploy Service On Every Apply
 * The key used with `triggers` is arbitrary.
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const example = new aws.ecs.Service("example", {
 *     forceNewDeployment: true,
 *     triggers: {
 *         redeployment: "plantimestamp()",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * example = aws.ecs.Service("example",
 *     force_new_deployment=True,
 *     triggers={
 *         "redeployment": "plantimestamp()",
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Aws.Ecs.Service("example", new()
 *     {
 *         ForceNewDeployment = true,
 *         Triggers =
 *         {
 *             { "redeployment", "plantimestamp()" },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecs"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := ecs.NewService(ctx, "example", &ecs.ServiceArgs{
 * 			ForceNewDeployment: pulumi.Bool(true),
 * 			Triggers: pulumi.StringMap{
 * 				"redeployment": pulumi.String("plantimestamp()"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.aws.ecs.Service;
 * import com.pulumi.aws.ecs.ServiceArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var example = new Service("example", ServiceArgs.builder()
 *             .forceNewDeployment(true)
 *             .triggers(Map.of("redeployment", "plantimestamp()"))
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: aws:ecs:Service
 *     properties:
 *       forceNewDeployment: true
 *       triggers:
 *         redeployment: plantimestamp()
 * ```
 * 
 * ## Import
 * Using `pulumi import`, import ECS services using the `name` together with ecs cluster `name`. For example:
 * ```sh
 * $ pulumi import aws:ecs/service:Service imported cluster-name/service-name
 * ```
 * @property alarms Information about the CloudWatch alarms. See below.
 * @property availabilityZoneRebalancing ECS automatically redistributes tasks within a service across Availability Zones (AZs) to mitigate the risk of impaired application availability due to underlying infrastructure failures and task lifecycle activities. The valid values are `ENABLED` and `DISABLED`. Defaults to `DISABLED`.
 * @property 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`.
 * @property cluster ARN of an ECS cluster.
 * @property deploymentCircuitBreaker Configuration block for deployment circuit breaker. See below.
 * @property deploymentController Configuration block for deployment controller configuration. See below.
 * @property 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.
 * @property 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.
 * @property 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.
 * @property enableEcsManagedTags Whether to enable Amazon ECS managed tags for the tasks within the service.
 * @property enableExecuteCommand Whether to enable Amazon ECS Exec for the tasks within the service.
 * @property forceDelete Enable to delete a service even if it wasn't scaled down to zero tasks. It's only necessary to use this if the service uses the `REPLICA` scheduling strategy.
 * @property 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.
 * When using the forceNewDeployment property you also need to configure the triggers property.
 * @property 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.
 * @property 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.
 * @property 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`.
 * @property loadBalancers Configuration block for load balancers. See below.
 * @property name Name of the service (up to 255 letters, numbers, hyphens, and underscores)
 * The following arguments are optional:
 * @property 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.
 * @property 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.
 * @property 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.
 * @property 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).
 * @property propagateTags Whether to propagate the tags from the task definition or the service to the tasks. The valid values are `SERVICE` and `TASK_DEFINITION`.
 * @property 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).
 * @property serviceConnectConfiguration 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.
 * @property serviceRegistries Service discovery registries for the service. The maximum number of `service_registries` blocks is `1`. See below.
 * @property 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.
 * @property 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.
 * @property triggers Map of arbitrary keys and values that, when changed, will trigger an in-place update (redeployment). Useful with `"plantimestamp()"`. When using the triggers property you also need to set the forceNewDeployment property to True.
 * @property volumeConfiguration Configuration for a volume specified in the task definition as a volume that is configured at launch time. Currently, the only supported volume type is an Amazon EBS volume. See below.
 * @property vpcLatticeConfigurations The VPC Lattice configuration for your service that allows Lattice to connect, secure, and monitor your service across multiple accounts and VPCs. See below.
 * @property 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`.
 */
public data class ServiceArgs(
    public val alarms: Output? = null,
    public val availabilityZoneRebalancing: Output? = null,
    public val capacityProviderStrategies: Output>? = null,
    public val cluster: Output? = null,
    public val deploymentCircuitBreaker: Output? = null,
    public val deploymentController: Output? = null,
    public val deploymentMaximumPercent: Output? = null,
    public val deploymentMinimumHealthyPercent: Output? = null,
    public val desiredCount: Output? = null,
    public val enableEcsManagedTags: Output? = null,
    public val enableExecuteCommand: Output? = null,
    public val forceDelete: Output? = null,
    public val forceNewDeployment: Output? = null,
    public val healthCheckGracePeriodSeconds: Output? = null,
    public val iamRole: Output? = null,
    public val launchType: Output? = null,
    public val loadBalancers: Output>? = null,
    public val name: Output? = null,
    public val networkConfiguration: Output? = null,
    public val orderedPlacementStrategies: Output>? = null,
    public val placementConstraints: Output>? = null,
    public val platformVersion: Output? = null,
    public val propagateTags: Output? = null,
    public val schedulingStrategy: Output? = null,
    public val serviceConnectConfiguration: Output? = null,
    public val serviceRegistries: Output? = null,
    public val tags: Output>? = null,
    public val taskDefinition: Output? = null,
    public val triggers: Output>? = null,
    public val volumeConfiguration: Output? = null,
    public val vpcLatticeConfigurations: Output>? = null,
    public val waitForSteadyState: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.ecs.ServiceArgs = com.pulumi.aws.ecs.ServiceArgs.builder()
        .alarms(alarms?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
        .availabilityZoneRebalancing(availabilityZoneRebalancing?.applyValue({ args0 -> args0 }))
        .capacityProviderStrategies(
            capacityProviderStrategies?.applyValue({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> args0.toJava() })
                })
            }),
        )
        .cluster(cluster?.applyValue({ args0 -> args0 }))
        .deploymentCircuitBreaker(
            deploymentCircuitBreaker?.applyValue({ args0 ->
                args0.let({ args0 ->
                    args0.toJava()
                })
            }),
        )
        .deploymentController(
            deploymentController?.applyValue({ args0 ->
                args0.let({ args0 ->
                    args0.toJava()
                })
            }),
        )
        .deploymentMaximumPercent(deploymentMaximumPercent?.applyValue({ args0 -> args0 }))
        .deploymentMinimumHealthyPercent(deploymentMinimumHealthyPercent?.applyValue({ args0 -> args0 }))
        .desiredCount(desiredCount?.applyValue({ args0 -> args0 }))
        .enableEcsManagedTags(enableEcsManagedTags?.applyValue({ args0 -> args0 }))
        .enableExecuteCommand(enableExecuteCommand?.applyValue({ args0 -> args0 }))
        .forceDelete(forceDelete?.applyValue({ args0 -> args0 }))
        .forceNewDeployment(forceNewDeployment?.applyValue({ args0 -> args0 }))
        .healthCheckGracePeriodSeconds(healthCheckGracePeriodSeconds?.applyValue({ args0 -> args0 }))
        .iamRole(iamRole?.applyValue({ args0 -> args0 }))
        .launchType(launchType?.applyValue({ args0 -> args0 }))
        .loadBalancers(
            loadBalancers?.applyValue({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                })
            }),
        )
        .name(name?.applyValue({ args0 -> args0 }))
        .networkConfiguration(
            networkConfiguration?.applyValue({ args0 ->
                args0.let({ args0 ->
                    args0.toJava()
                })
            }),
        )
        .orderedPlacementStrategies(
            orderedPlacementStrategies?.applyValue({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> args0.toJava() })
                })
            }),
        )
        .placementConstraints(
            placementConstraints?.applyValue({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> args0.toJava() })
                })
            }),
        )
        .platformVersion(platformVersion?.applyValue({ args0 -> args0 }))
        .propagateTags(propagateTags?.applyValue({ args0 -> args0 }))
        .schedulingStrategy(schedulingStrategy?.applyValue({ args0 -> args0 }))
        .serviceConnectConfiguration(
            serviceConnectConfiguration?.applyValue({ args0 ->
                args0.let({ args0 ->
                    args0.toJava()
                })
            }),
        )
        .serviceRegistries(serviceRegistries?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
        .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
        .taskDefinition(taskDefinition?.applyValue({ args0 -> args0 }))
        .triggers(
            triggers?.applyValue({ args0 ->
                args0.map({ args0 ->
                    args0.key.to(args0.value)
                }).toMap()
            }),
        )
        .volumeConfiguration(
            volumeConfiguration?.applyValue({ args0 ->
                args0.let({ args0 ->
                    args0.toJava()
                })
            }),
        )
        .vpcLatticeConfigurations(
            vpcLatticeConfigurations?.applyValue({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> args0.toJava() })
                })
            }),
        )
        .waitForSteadyState(waitForSteadyState?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ServiceArgs].
 */
@PulumiTagMarker
public class ServiceArgsBuilder internal constructor() {
    private var alarms: Output? = null

    private var availabilityZoneRebalancing: Output? = null

    private var capacityProviderStrategies: Output>? = null

    private var cluster: Output? = null

    private var deploymentCircuitBreaker: Output? = null

    private var deploymentController: Output? = null

    private var deploymentMaximumPercent: Output? = null

    private var deploymentMinimumHealthyPercent: Output? = null

    private var desiredCount: Output? = null

    private var enableEcsManagedTags: Output? = null

    private var enableExecuteCommand: Output? = null

    private var forceDelete: Output? = null

    private var forceNewDeployment: Output? = null

    private var healthCheckGracePeriodSeconds: Output? = null

    private var iamRole: Output? = null

    private var launchType: Output? = null

    private var loadBalancers: Output>? = null

    private var name: Output? = null

    private var networkConfiguration: Output? = null

    private var orderedPlacementStrategies: Output>? = null

    private var placementConstraints: Output>? = null

    private var platformVersion: Output? = null

    private var propagateTags: Output? = null

    private var schedulingStrategy: Output? = null

    private var serviceConnectConfiguration: Output? = null

    private var serviceRegistries: Output? = null

    private var tags: Output>? = null

    private var taskDefinition: Output? = null

    private var triggers: Output>? = null

    private var volumeConfiguration: Output? = null

    private var vpcLatticeConfigurations: Output>? = null

    private var waitForSteadyState: Output? = null

    /**
     * @param value Information about the CloudWatch alarms. See below.
     */
    @JvmName("eahgsoqqsqvpinmc")
    public suspend fun alarms(`value`: Output) {
        this.alarms = value
    }

    /**
     * @param value ECS automatically redistributes tasks within a service across Availability Zones (AZs) to mitigate the risk of impaired application availability due to underlying infrastructure failures and task lifecycle activities. The valid values are `ENABLED` and `DISABLED`. Defaults to `DISABLED`.
     */
    @JvmName("pafylrprcxhrgjxu")
    public suspend fun availabilityZoneRebalancing(`value`: Output) {
        this.availabilityZoneRebalancing = value
    }

    /**
     * @param value 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`.
     */
    @JvmName("ipkjivvmfuxjwuiv")
    public suspend fun capacityProviderStrategies(`value`: Output>) {
        this.capacityProviderStrategies = value
    }

    @JvmName("lpvughbsmlxblrwf")
    public suspend fun capacityProviderStrategies(vararg values: Output) {
        this.capacityProviderStrategies = Output.all(values.asList())
    }

    /**
     * @param values 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`.
     */
    @JvmName("osgjtkxtulhsxqbr")
    public suspend fun capacityProviderStrategies(values: List>) {
        this.capacityProviderStrategies = Output.all(values)
    }

    /**
     * @param value ARN of an ECS cluster.
     */
    @JvmName("ipkqlsrgxoforttc")
    public suspend fun cluster(`value`: Output) {
        this.cluster = value
    }

    /**
     * @param value Configuration block for deployment circuit breaker. See below.
     */
    @JvmName("udctbspvhrhjeqwx")
    public suspend fun deploymentCircuitBreaker(`value`: Output) {
        this.deploymentCircuitBreaker = value
    }

    /**
     * @param value Configuration block for deployment controller configuration. See below.
     */
    @JvmName("jiotbqvxstjggmtd")
    public suspend fun deploymentController(`value`: Output) {
        this.deploymentController = value
    }

    /**
     * @param value 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.
     */
    @JvmName("jgrmmxgkxkbqtjuv")
    public suspend fun deploymentMaximumPercent(`value`: Output) {
        this.deploymentMaximumPercent = value
    }

    /**
     * @param value 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.
     */
    @JvmName("vlxqxnsalrvrhavn")
    public suspend fun deploymentMinimumHealthyPercent(`value`: Output) {
        this.deploymentMinimumHealthyPercent = value
    }

    /**
     * @param value Number of instances of the task definition to place and keep running. Defaults to 0. Do not specify if using the `DAEMON` scheduling strategy.
     */
    @JvmName("uanprahbdarwqirx")
    public suspend fun desiredCount(`value`: Output) {
        this.desiredCount = value
    }

    /**
     * @param value Whether to enable Amazon ECS managed tags for the tasks within the service.
     */
    @JvmName("kqfslpymctqkbpmu")
    public suspend fun enableEcsManagedTags(`value`: Output) {
        this.enableEcsManagedTags = value
    }

    /**
     * @param value Whether to enable Amazon ECS Exec for the tasks within the service.
     */
    @JvmName("xaxemclhlopmibqj")
    public suspend fun enableExecuteCommand(`value`: Output) {
        this.enableExecuteCommand = value
    }

    /**
     * @param value Enable to delete a service even if it wasn't scaled down to zero tasks. It's only necessary to use this if the service uses the `REPLICA` scheduling strategy.
     */
    @JvmName("wtobvammeaythwlx")
    public suspend fun forceDelete(`value`: Output) {
        this.forceDelete = value
    }

    /**
     * @param value 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.
     * When using the forceNewDeployment property you also need to configure the triggers property.
     */
    @JvmName("wdefrudvlyqhkvdj")
    public suspend fun forceNewDeployment(`value`: Output) {
        this.forceNewDeployment = value
    }

    /**
     * @param value 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.
     */
    @JvmName("wovreehowytenwvh")
    public suspend fun healthCheckGracePeriodSeconds(`value`: Output) {
        this.healthCheckGracePeriodSeconds = value
    }

    /**
     * @param value 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.
     */
    @JvmName("utbwbfufxcwktuxy")
    public suspend fun iamRole(`value`: Output) {
        this.iamRole = value
    }

    /**
     * @param value Launch type on which to run your service. The valid values are `EC2`, `FARGATE`, and `EXTERNAL`. Defaults to `EC2`. Conflicts with `capacity_provider_strategy`.
     */
    @JvmName("vvheoomgmgqxomjs")
    public suspend fun launchType(`value`: Output) {
        this.launchType = value
    }

    /**
     * @param value Configuration block for load balancers. See below.
     */
    @JvmName("rkwasgybealehkth")
    public suspend fun loadBalancers(`value`: Output>) {
        this.loadBalancers = value
    }

    @JvmName("adimnqyowbkxaufn")
    public suspend fun loadBalancers(vararg values: Output) {
        this.loadBalancers = Output.all(values.asList())
    }

    /**
     * @param values Configuration block for load balancers. See below.
     */
    @JvmName("auyxpkrsreirygld")
    public suspend fun loadBalancers(values: List>) {
        this.loadBalancers = Output.all(values)
    }

    /**
     * @param value Name of the service (up to 255 letters, numbers, hyphens, and underscores)
     * The following arguments are optional:
     */
    @JvmName("npexsvpwrurwepdo")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value 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.
     */
    @JvmName("dsbkwjrlnuvrfhbd")
    public suspend fun networkConfiguration(`value`: Output) {
        this.networkConfiguration = value
    }

    /**
     * @param value 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.
     */
    @JvmName("dfttbkicpxcfxhfq")
    public suspend fun orderedPlacementStrategies(`value`: Output>) {
        this.orderedPlacementStrategies = value
    }

    @JvmName("yurewhpuhyryjfdm")
    public suspend fun orderedPlacementStrategies(vararg values: Output) {
        this.orderedPlacementStrategies = Output.all(values.asList())
    }

    /**
     * @param values 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.
     */
    @JvmName("dcvbxvwmcngdcqja")
    public suspend fun orderedPlacementStrategies(values: List>) {
        this.orderedPlacementStrategies = Output.all(values)
    }

    /**
     * @param value 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.
     */
    @JvmName("jnldbcsrfrqykwhr")
    public suspend fun placementConstraints(`value`: Output>) {
        this.placementConstraints = value
    }

    @JvmName("msaqgbsfqamcjvmg")
    public suspend fun placementConstraints(vararg values: Output) {
        this.placementConstraints = Output.all(values.asList())
    }

    /**
     * @param values 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.
     */
    @JvmName("jjakyouclahuxlhn")
    public suspend fun placementConstraints(values: List>) {
        this.placementConstraints = Output.all(values)
    }

    /**
     * @param value 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).
     */
    @JvmName("rpwlhkguhivvfgxr")
    public suspend fun platformVersion(`value`: Output) {
        this.platformVersion = value
    }

    /**
     * @param value Whether to propagate the tags from the task definition or the service to the tasks. The valid values are `SERVICE` and `TASK_DEFINITION`.
     */
    @JvmName("akiqkfxrvjbtcjch")
    public suspend fun propagateTags(`value`: Output) {
        this.propagateTags = value
    }

    /**
     * @param value 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).
     */
    @JvmName("wvwaaghyrpddkwry")
    public suspend fun schedulingStrategy(`value`: Output) {
        this.schedulingStrategy = value
    }

    /**
     * @param value 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.
     */
    @JvmName("hkyddbkcqtuadkfr")
    public suspend fun serviceConnectConfiguration(`value`: Output) {
        this.serviceConnectConfiguration = value
    }

    /**
     * @param value Service discovery registries for the service. The maximum number of `service_registries` blocks is `1`. See below.
     */
    @JvmName("jpxvhseaaegsmshp")
    public suspend fun serviceRegistries(`value`: Output) {
        this.serviceRegistries = value
    }

    /**
     * @param value 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.
     */
    @JvmName("bwgaymtipjwfphlx")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value 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.
     */
    @JvmName("tnwlqllkmometugj")
    public suspend fun taskDefinition(`value`: Output) {
        this.taskDefinition = value
    }

    /**
     * @param value Map of arbitrary keys and values that, when changed, will trigger an in-place update (redeployment). Useful with `"plantimestamp()"`. When using the triggers property you also need to set the forceNewDeployment property to True.
     */
    @JvmName("somjhdpysduqighw")
    public suspend fun triggers(`value`: Output>) {
        this.triggers = value
    }

    /**
     * @param value Configuration for a volume specified in the task definition as a volume that is configured at launch time. Currently, the only supported volume type is an Amazon EBS volume. See below.
     */
    @JvmName("ituexmlvqcpcsgws")
    public suspend fun volumeConfiguration(`value`: Output) {
        this.volumeConfiguration = value
    }

    /**
     * @param value The VPC Lattice configuration for your service that allows Lattice to connect, secure, and monitor your service across multiple accounts and VPCs. See below.
     */
    @JvmName("vrcdmsaskhmjdtjt")
    public suspend fun vpcLatticeConfigurations(`value`: Output>) {
        this.vpcLatticeConfigurations = value
    }

    @JvmName("hntqawicijfmogno")
    public suspend fun vpcLatticeConfigurations(vararg values: Output) {
        this.vpcLatticeConfigurations = Output.all(values.asList())
    }

    /**
     * @param values The VPC Lattice configuration for your service that allows Lattice to connect, secure, and monitor your service across multiple accounts and VPCs. See below.
     */
    @JvmName("dxlucfuveowmgcie")
    public suspend fun vpcLatticeConfigurations(values: List>) {
        this.vpcLatticeConfigurations = Output.all(values)
    }

    /**
     * @param value 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`.
     */
    @JvmName("puencobeyakdjscl")
    public suspend fun waitForSteadyState(`value`: Output) {
        this.waitForSteadyState = value
    }

    /**
     * @param value Information about the CloudWatch alarms. See below.
     */
    @JvmName("iaemshfdktnbnqrq")
    public suspend fun alarms(`value`: ServiceAlarmsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.alarms = mapped
    }

    /**
     * @param argument Information about the CloudWatch alarms. See below.
     */
    @JvmName("xrumwoaahvvcaowt")
    public suspend fun alarms(argument: suspend ServiceAlarmsArgsBuilder.() -> Unit) {
        val toBeMapped = ServiceAlarmsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.alarms = mapped
    }

    /**
     * @param value ECS automatically redistributes tasks within a service across Availability Zones (AZs) to mitigate the risk of impaired application availability due to underlying infrastructure failures and task lifecycle activities. The valid values are `ENABLED` and `DISABLED`. Defaults to `DISABLED`.
     */
    @JvmName("qgmtxhbamriaqpfb")
    public suspend fun availabilityZoneRebalancing(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.availabilityZoneRebalancing = mapped
    }

    /**
     * @param value 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`.
     */
    @JvmName("lblvbqsxadalwubp")
    public suspend fun capacityProviderStrategies(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.capacityProviderStrategies = mapped
    }

    /**
     * @param argument 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`.
     */
    @JvmName("uobgnwmqiicsewtc")
    public suspend fun capacityProviderStrategies(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ServiceCapacityProviderStrategyArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.capacityProviderStrategies = mapped
    }

    /**
     * @param argument 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`.
     */
    @JvmName("hwdunfjvsotymerq")
    public suspend fun capacityProviderStrategies(vararg argument: suspend ServiceCapacityProviderStrategyArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ServiceCapacityProviderStrategyArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.capacityProviderStrategies = mapped
    }

    /**
     * @param argument 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`.
     */
    @JvmName("tqrjalohvinecibw")
    public suspend fun capacityProviderStrategies(argument: suspend ServiceCapacityProviderStrategyArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            ServiceCapacityProviderStrategyArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.capacityProviderStrategies = mapped
    }

    /**
     * @param values 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`.
     */
    @JvmName("raympomlxpmdaiup")
    public suspend fun capacityProviderStrategies(vararg values: ServiceCapacityProviderStrategyArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.capacityProviderStrategies = mapped
    }

    /**
     * @param value ARN of an ECS cluster.
     */
    @JvmName("himwsafcywpwgcps")
    public suspend fun cluster(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.cluster = mapped
    }

    /**
     * @param value Configuration block for deployment circuit breaker. See below.
     */
    @JvmName("imevrumghnosnknn")
    public suspend fun deploymentCircuitBreaker(`value`: ServiceDeploymentCircuitBreakerArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deploymentCircuitBreaker = mapped
    }

    /**
     * @param argument Configuration block for deployment circuit breaker. See below.
     */
    @JvmName("woxtblntxaindplh")
    public suspend fun deploymentCircuitBreaker(argument: suspend ServiceDeploymentCircuitBreakerArgsBuilder.() -> Unit) {
        val toBeMapped = ServiceDeploymentCircuitBreakerArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.deploymentCircuitBreaker = mapped
    }

    /**
     * @param value Configuration block for deployment controller configuration. See below.
     */
    @JvmName("yykowjakwuuhaeqy")
    public suspend fun deploymentController(`value`: ServiceDeploymentControllerArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deploymentController = mapped
    }

    /**
     * @param argument Configuration block for deployment controller configuration. See below.
     */
    @JvmName("khfhxsvhsfggevyq")
    public suspend fun deploymentController(argument: suspend ServiceDeploymentControllerArgsBuilder.() -> Unit) {
        val toBeMapped = ServiceDeploymentControllerArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.deploymentController = mapped
    }

    /**
     * @param value 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.
     */
    @JvmName("jonteyqcsjpwiroq")
    public suspend fun deploymentMaximumPercent(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deploymentMaximumPercent = mapped
    }

    /**
     * @param value 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.
     */
    @JvmName("lbyxlfwmewqidoqb")
    public suspend fun deploymentMinimumHealthyPercent(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deploymentMinimumHealthyPercent = mapped
    }

    /**
     * @param value Number of instances of the task definition to place and keep running. Defaults to 0. Do not specify if using the `DAEMON` scheduling strategy.
     */
    @JvmName("gukhkorjwocdyytx")
    public suspend fun desiredCount(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.desiredCount = mapped
    }

    /**
     * @param value Whether to enable Amazon ECS managed tags for the tasks within the service.
     */
    @JvmName("xluexkejjkalschr")
    public suspend fun enableEcsManagedTags(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enableEcsManagedTags = mapped
    }

    /**
     * @param value Whether to enable Amazon ECS Exec for the tasks within the service.
     */
    @JvmName("ayeyjyooxswkxaqk")
    public suspend fun enableExecuteCommand(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enableExecuteCommand = mapped
    }

    /**
     * @param value Enable to delete a service even if it wasn't scaled down to zero tasks. It's only necessary to use this if the service uses the `REPLICA` scheduling strategy.
     */
    @JvmName("wourhlpqhcbegbfv")
    public suspend fun forceDelete(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.forceDelete = mapped
    }

    /**
     * @param value 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.
     * When using the forceNewDeployment property you also need to configure the triggers property.
     */
    @JvmName("ehssyustntuhcymq")
    public suspend fun forceNewDeployment(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.forceNewDeployment = mapped
    }

    /**
     * @param value 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.
     */
    @JvmName("givjoohtcdqogcpp")
    public suspend fun healthCheckGracePeriodSeconds(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.healthCheckGracePeriodSeconds = mapped
    }

    /**
     * @param value 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.
     */
    @JvmName("hqeqhsajjighskfe")
    public suspend fun iamRole(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.iamRole = mapped
    }

    /**
     * @param value Launch type on which to run your service. The valid values are `EC2`, `FARGATE`, and `EXTERNAL`. Defaults to `EC2`. Conflicts with `capacity_provider_strategy`.
     */
    @JvmName("hmsexicdtwoudilk")
    public suspend fun launchType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.launchType = mapped
    }

    /**
     * @param value Configuration block for load balancers. See below.
     */
    @JvmName("fufbybenjrillcth")
    public suspend fun loadBalancers(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.loadBalancers = mapped
    }

    /**
     * @param argument Configuration block for load balancers. See below.
     */
    @JvmName("dlqrfpwmlqqeymxh")
    public suspend fun loadBalancers(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ServiceLoadBalancerArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.loadBalancers = mapped
    }

    /**
     * @param argument Configuration block for load balancers. See below.
     */
    @JvmName("xrqkgoqahsgnqkky")
    public suspend fun loadBalancers(vararg argument: suspend ServiceLoadBalancerArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ServiceLoadBalancerArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.loadBalancers = mapped
    }

    /**
     * @param argument Configuration block for load balancers. See below.
     */
    @JvmName("opbsnjtjnjyaqfnt")
    public suspend fun loadBalancers(argument: suspend ServiceLoadBalancerArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(ServiceLoadBalancerArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.loadBalancers = mapped
    }

    /**
     * @param values Configuration block for load balancers. See below.
     */
    @JvmName("jfalagjlhuljxamm")
    public suspend fun loadBalancers(vararg values: ServiceLoadBalancerArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.loadBalancers = mapped
    }

    /**
     * @param value Name of the service (up to 255 letters, numbers, hyphens, and underscores)
     * The following arguments are optional:
     */
    @JvmName("scgcdcwlcsgiemvn")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value 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.
     */
    @JvmName("dbdwdifmrfixgbkc")
    public suspend fun networkConfiguration(`value`: ServiceNetworkConfigurationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.networkConfiguration = mapped
    }

    /**
     * @param argument 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.
     */
    @JvmName("arwutuudppbrylkd")
    public suspend fun networkConfiguration(argument: suspend ServiceNetworkConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = ServiceNetworkConfigurationArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.networkConfiguration = mapped
    }

    /**
     * @param value 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.
     */
    @JvmName("qvuxoepoanjiobfq")
    public suspend fun orderedPlacementStrategies(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.orderedPlacementStrategies = mapped
    }

    /**
     * @param argument 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.
     */
    @JvmName("vktnssrhcllkwsjy")
    public suspend fun orderedPlacementStrategies(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ServiceOrderedPlacementStrategyArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.orderedPlacementStrategies = mapped
    }

    /**
     * @param argument 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.
     */
    @JvmName("nlockmunncgwyndj")
    public suspend fun orderedPlacementStrategies(vararg argument: suspend ServiceOrderedPlacementStrategyArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ServiceOrderedPlacementStrategyArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.orderedPlacementStrategies = mapped
    }

    /**
     * @param argument 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.
     */
    @JvmName("oxwuugjbaowtfxxs")
    public suspend fun orderedPlacementStrategies(argument: suspend ServiceOrderedPlacementStrategyArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            ServiceOrderedPlacementStrategyArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.orderedPlacementStrategies = mapped
    }

    /**
     * @param values 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.
     */
    @JvmName("hcvypgwipsucsgxg")
    public suspend fun orderedPlacementStrategies(vararg values: ServiceOrderedPlacementStrategyArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.orderedPlacementStrategies = mapped
    }

    /**
     * @param value 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.
     */
    @JvmName("msaaiefnlfrvudsw")
    public suspend fun placementConstraints(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.placementConstraints = mapped
    }

    /**
     * @param argument 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.
     */
    @JvmName("hlnuctcondgosqut")
    public suspend fun placementConstraints(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ServicePlacementConstraintArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.placementConstraints = mapped
    }

    /**
     * @param argument 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.
     */
    @JvmName("xqrnthtdhcivxibu")
    public suspend fun placementConstraints(vararg argument: suspend ServicePlacementConstraintArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ServicePlacementConstraintArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.placementConstraints = mapped
    }

    /**
     * @param argument 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.
     */
    @JvmName("dmmdxjwmefexghsp")
    public suspend fun placementConstraints(argument: suspend ServicePlacementConstraintArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            ServicePlacementConstraintArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.placementConstraints = mapped
    }

    /**
     * @param values 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.
     */
    @JvmName("aieatmgnintqdftk")
    public suspend fun placementConstraints(vararg values: ServicePlacementConstraintArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.placementConstraints = mapped
    }

    /**
     * @param value 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).
     */
    @JvmName("gwbhilxtsqyhvdjn")
    public suspend fun platformVersion(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.platformVersion = mapped
    }

    /**
     * @param value Whether to propagate the tags from the task definition or the service to the tasks. The valid values are `SERVICE` and `TASK_DEFINITION`.
     */
    @JvmName("cwgalfxpuwsybayv")
    public suspend fun propagateTags(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.propagateTags = mapped
    }

    /**
     * @param value 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).
     */
    @JvmName("qjbcontvibucemje")
    public suspend fun schedulingStrategy(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.schedulingStrategy = mapped
    }

    /**
     * @param value 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.
     */
    @JvmName("xlxchwkbynlkblmi")
    public suspend fun serviceConnectConfiguration(`value`: ServiceServiceConnectConfigurationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.serviceConnectConfiguration = mapped
    }

    /**
     * @param argument 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.
     */
    @JvmName("dtqxdmwtavfpwbve")
    public suspend fun serviceConnectConfiguration(argument: suspend ServiceServiceConnectConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = ServiceServiceConnectConfigurationArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.serviceConnectConfiguration = mapped
    }

    /**
     * @param value Service discovery registries for the service. The maximum number of `service_registries` blocks is `1`. See below.
     */
    @JvmName("wdsjuginenrmjesy")
    public suspend fun serviceRegistries(`value`: ServiceServiceRegistriesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.serviceRegistries = mapped
    }

    /**
     * @param argument Service discovery registries for the service. The maximum number of `service_registries` blocks is `1`. See below.
     */
    @JvmName("nobrrdxebavdfigs")
    public suspend fun serviceRegistries(argument: suspend ServiceServiceRegistriesArgsBuilder.() -> Unit) {
        val toBeMapped = ServiceServiceRegistriesArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.serviceRegistries = mapped
    }

    /**
     * @param value 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.
     */
    @JvmName("lgqnpcktmropttsa")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values 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.
     */
    @JvmName("ymgvnxqfvdrqhymr")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value 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.
     */
    @JvmName("xiewmkictsgmvlkh")
    public suspend fun taskDefinition(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.taskDefinition = mapped
    }

    /**
     * @param value Map of arbitrary keys and values that, when changed, will trigger an in-place update (redeployment). Useful with `"plantimestamp()"`. When using the triggers property you also need to set the forceNewDeployment property to True.
     */
    @JvmName("fwsjvmhbofgbapby")
    public suspend fun triggers(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.triggers = mapped
    }

    /**
     * @param values Map of arbitrary keys and values that, when changed, will trigger an in-place update (redeployment). Useful with `"plantimestamp()"`. When using the triggers property you also need to set the forceNewDeployment property to True.
     */
    @JvmName("obqqpeptnpibctia")
    public fun triggers(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.triggers = mapped
    }

    /**
     * @param value Configuration for a volume specified in the task definition as a volume that is configured at launch time. Currently, the only supported volume type is an Amazon EBS volume. See below.
     */
    @JvmName("yflnrgladdsefrpa")
    public suspend fun volumeConfiguration(`value`: ServiceVolumeConfigurationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.volumeConfiguration = mapped
    }

    /**
     * @param argument Configuration for a volume specified in the task definition as a volume that is configured at launch time. Currently, the only supported volume type is an Amazon EBS volume. See below.
     */
    @JvmName("rsbnetcvlyctupch")
    public suspend fun volumeConfiguration(argument: suspend ServiceVolumeConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = ServiceVolumeConfigurationArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.volumeConfiguration = mapped
    }

    /**
     * @param value The VPC Lattice configuration for your service that allows Lattice to connect, secure, and monitor your service across multiple accounts and VPCs. See below.
     */
    @JvmName("esiopmpppewwiftj")
    public suspend fun vpcLatticeConfigurations(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.vpcLatticeConfigurations = mapped
    }

    /**
     * @param argument The VPC Lattice configuration for your service that allows Lattice to connect, secure, and monitor your service across multiple accounts and VPCs. See below.
     */
    @JvmName("mooxbeskveqqapwf")
    public suspend fun vpcLatticeConfigurations(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ServiceVpcLatticeConfigurationArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.vpcLatticeConfigurations = mapped
    }

    /**
     * @param argument The VPC Lattice configuration for your service that allows Lattice to connect, secure, and monitor your service across multiple accounts and VPCs. See below.
     */
    @JvmName("lrtxhdqnyxbtvavn")
    public suspend fun vpcLatticeConfigurations(vararg argument: suspend ServiceVpcLatticeConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ServiceVpcLatticeConfigurationArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.vpcLatticeConfigurations = mapped
    }

    /**
     * @param argument The VPC Lattice configuration for your service that allows Lattice to connect, secure, and monitor your service across multiple accounts and VPCs. See below.
     */
    @JvmName("iywumwtdjmdtsqcc")
    public suspend fun vpcLatticeConfigurations(argument: suspend ServiceVpcLatticeConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            ServiceVpcLatticeConfigurationArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.vpcLatticeConfigurations = mapped
    }

    /**
     * @param values The VPC Lattice configuration for your service that allows Lattice to connect, secure, and monitor your service across multiple accounts and VPCs. See below.
     */
    @JvmName("miwtlssqhohryrot")
    public suspend fun vpcLatticeConfigurations(vararg values: ServiceVpcLatticeConfigurationArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.vpcLatticeConfigurations = mapped
    }

    /**
     * @param value 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`.
     */
    @JvmName("flwwbjnrjislyube")
    public suspend fun waitForSteadyState(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.waitForSteadyState = mapped
    }

    internal fun build(): ServiceArgs = ServiceArgs(
        alarms = alarms,
        availabilityZoneRebalancing = availabilityZoneRebalancing,
        capacityProviderStrategies = capacityProviderStrategies,
        cluster = cluster,
        deploymentCircuitBreaker = deploymentCircuitBreaker,
        deploymentController = deploymentController,
        deploymentMaximumPercent = deploymentMaximumPercent,
        deploymentMinimumHealthyPercent = deploymentMinimumHealthyPercent,
        desiredCount = desiredCount,
        enableEcsManagedTags = enableEcsManagedTags,
        enableExecuteCommand = enableExecuteCommand,
        forceDelete = forceDelete,
        forceNewDeployment = forceNewDeployment,
        healthCheckGracePeriodSeconds = healthCheckGracePeriodSeconds,
        iamRole = iamRole,
        launchType = launchType,
        loadBalancers = loadBalancers,
        name = name,
        networkConfiguration = networkConfiguration,
        orderedPlacementStrategies = orderedPlacementStrategies,
        placementConstraints = placementConstraints,
        platformVersion = platformVersion,
        propagateTags = propagateTags,
        schedulingStrategy = schedulingStrategy,
        serviceConnectConfiguration = serviceConnectConfiguration,
        serviceRegistries = serviceRegistries,
        tags = tags,
        taskDefinition = taskDefinition,
        triggers = triggers,
        volumeConfiguration = volumeConfiguration,
        vpcLatticeConfigurations = vpcLatticeConfigurations,
        waitForSteadyState = waitForSteadyState,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy