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

com.pulumi.aws.ecs.kotlin.TaskDefinitionArgs.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.TaskDefinitionArgs.builder
import com.pulumi.aws.ecs.kotlin.inputs.TaskDefinitionEphemeralStorageArgs
import com.pulumi.aws.ecs.kotlin.inputs.TaskDefinitionEphemeralStorageArgsBuilder
import com.pulumi.aws.ecs.kotlin.inputs.TaskDefinitionInferenceAcceleratorArgs
import com.pulumi.aws.ecs.kotlin.inputs.TaskDefinitionInferenceAcceleratorArgsBuilder
import com.pulumi.aws.ecs.kotlin.inputs.TaskDefinitionPlacementConstraintArgs
import com.pulumi.aws.ecs.kotlin.inputs.TaskDefinitionPlacementConstraintArgsBuilder
import com.pulumi.aws.ecs.kotlin.inputs.TaskDefinitionProxyConfigurationArgs
import com.pulumi.aws.ecs.kotlin.inputs.TaskDefinitionProxyConfigurationArgsBuilder
import com.pulumi.aws.ecs.kotlin.inputs.TaskDefinitionRuntimePlatformArgs
import com.pulumi.aws.ecs.kotlin.inputs.TaskDefinitionRuntimePlatformArgsBuilder
import com.pulumi.aws.ecs.kotlin.inputs.TaskDefinitionVolumeArgs
import com.pulumi.aws.ecs.kotlin.inputs.TaskDefinitionVolumeArgsBuilder
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.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Manages a revision of an ECS task definition to be used in `aws.ecs.Service`.
 * ## Example Usage
 * ### Basic Example
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const service = new aws.ecs.TaskDefinition("service", {
 *     family: "service",
 *     containerDefinitions: JSON.stringify([
 *         {
 *             name: "first",
 *             image: "service-first",
 *             cpu: 10,
 *             memory: 512,
 *             essential: true,
 *             portMappings: [{
 *                 containerPort: 80,
 *                 hostPort: 80,
 *             }],
 *         },
 *         {
 *             name: "second",
 *             image: "service-second",
 *             cpu: 10,
 *             memory: 256,
 *             essential: true,
 *             portMappings: [{
 *                 containerPort: 443,
 *                 hostPort: 443,
 *             }],
 *         },
 *     ]),
 *     volumes: [{
 *         name: "service-storage",
 *         hostPath: "/ecs/service-storage",
 *     }],
 *     placementConstraints: [{
 *         type: "memberOf",
 *         expression: "attribute:ecs.availability-zone in [us-west-2a, us-west-2b]",
 *     }],
 * });
 * ```
 * ```python
 * import pulumi
 * import json
 * import pulumi_aws as aws
 * service = aws.ecs.TaskDefinition("service",
 *     family="service",
 *     container_definitions=json.dumps([
 *         {
 *             "name": "first",
 *             "image": "service-first",
 *             "cpu": 10,
 *             "memory": 512,
 *             "essential": True,
 *             "portMappings": [{
 *                 "containerPort": 80,
 *                 "hostPort": 80,
 *             }],
 *         },
 *         {
 *             "name": "second",
 *             "image": "service-second",
 *             "cpu": 10,
 *             "memory": 256,
 *             "essential": True,
 *             "portMappings": [{
 *                 "containerPort": 443,
 *                 "hostPort": 443,
 *             }],
 *         },
 *     ]),
 *     volumes=[{
 *         "name": "service-storage",
 *         "host_path": "/ecs/service-storage",
 *     }],
 *     placement_constraints=[{
 *         "type": "memberOf",
 *         "expression": "attribute:ecs.availability-zone in [us-west-2a, us-west-2b]",
 *     }])
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using System.Text.Json;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var service = new Aws.Ecs.TaskDefinition("service", new()
 *     {
 *         Family = "service",
 *         ContainerDefinitions = JsonSerializer.Serialize(new[]
 *         {
 *             new Dictionary
 *             {
 *                 ["name"] = "first",
 *                 ["image"] = "service-first",
 *                 ["cpu"] = 10,
 *                 ["memory"] = 512,
 *                 ["essential"] = true,
 *                 ["portMappings"] = new[]
 *                 {
 *                     new Dictionary
 *                     {
 *                         ["containerPort"] = 80,
 *                         ["hostPort"] = 80,
 *                     },
 *                 },
 *             },
 *             new Dictionary
 *             {
 *                 ["name"] = "second",
 *                 ["image"] = "service-second",
 *                 ["cpu"] = 10,
 *                 ["memory"] = 256,
 *                 ["essential"] = true,
 *                 ["portMappings"] = new[]
 *                 {
 *                     new Dictionary
 *                     {
 *                         ["containerPort"] = 443,
 *                         ["hostPort"] = 443,
 *                     },
 *                 },
 *             },
 *         }),
 *         Volumes = new[]
 *         {
 *             new Aws.Ecs.Inputs.TaskDefinitionVolumeArgs
 *             {
 *                 Name = "service-storage",
 *                 HostPath = "/ecs/service-storage",
 *             },
 *         },
 *         PlacementConstraints = new[]
 *         {
 *             new Aws.Ecs.Inputs.TaskDefinitionPlacementConstraintArgs
 *             {
 *                 Type = "memberOf",
 *                 Expression = "attribute:ecs.availability-zone in [us-west-2a, us-west-2b]",
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"encoding/json"
 * 	"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 {
 * 		tmpJSON0, err := json.Marshal([]interface{}{
 * 			map[string]interface{}{
 * 				"name":      "first",
 * 				"image":     "service-first",
 * 				"cpu":       10,
 * 				"memory":    512,
 * 				"essential": true,
 * 				"portMappings": []map[string]interface{}{
 * 					map[string]interface{}{
 * 						"containerPort": 80,
 * 						"hostPort":      80,
 * 					},
 * 				},
 * 			},
 * 			map[string]interface{}{
 * 				"name":      "second",
 * 				"image":     "service-second",
 * 				"cpu":       10,
 * 				"memory":    256,
 * 				"essential": true,
 * 				"portMappings": []map[string]interface{}{
 * 					map[string]interface{}{
 * 						"containerPort": 443,
 * 						"hostPort":      443,
 * 					},
 * 				},
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		json0 := string(tmpJSON0)
 * 		_, err = ecs.NewTaskDefinition(ctx, "service", &ecs.TaskDefinitionArgs{
 * 			Family:               pulumi.String("service"),
 * 			ContainerDefinitions: pulumi.String(json0),
 * 			Volumes: ecs.TaskDefinitionVolumeArray{
 * 				&ecs.TaskDefinitionVolumeArgs{
 * 					Name:     pulumi.String("service-storage"),
 * 					HostPath: pulumi.String("/ecs/service-storage"),
 * 				},
 * 			},
 * 			PlacementConstraints: ecs.TaskDefinitionPlacementConstraintArray{
 * 				&ecs.TaskDefinitionPlacementConstraintArgs{
 * 					Type:       pulumi.String("memberOf"),
 * 					Expression: pulumi.String("attribute:ecs.availability-zone in [us-west-2a, us-west-2b]"),
 * 				},
 * 			},
 * 		})
 * 		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.TaskDefinition;
 * import com.pulumi.aws.ecs.TaskDefinitionArgs;
 * import com.pulumi.aws.ecs.inputs.TaskDefinitionVolumeArgs;
 * import com.pulumi.aws.ecs.inputs.TaskDefinitionPlacementConstraintArgs;
 * import static com.pulumi.codegen.internal.Serialization.*;
 * 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 service = new TaskDefinition("service", TaskDefinitionArgs.builder()
 *             .family("service")
 *             .containerDefinitions(serializeJson(
 *                 jsonArray(
 *                     jsonObject(
 *                         jsonProperty("name", "first"),
 *                         jsonProperty("image", "service-first"),
 *                         jsonProperty("cpu", 10),
 *                         jsonProperty("memory", 512),
 *                         jsonProperty("essential", true),
 *                         jsonProperty("portMappings", jsonArray(jsonObject(
 *                             jsonProperty("containerPort", 80),
 *                             jsonProperty("hostPort", 80)
 *                         )))
 *                     ),
 *                     jsonObject(
 *                         jsonProperty("name", "second"),
 *                         jsonProperty("image", "service-second"),
 *                         jsonProperty("cpu", 10),
 *                         jsonProperty("memory", 256),
 *                         jsonProperty("essential", true),
 *                         jsonProperty("portMappings", jsonArray(jsonObject(
 *                             jsonProperty("containerPort", 443),
 *                             jsonProperty("hostPort", 443)
 *                         )))
 *                     )
 *                 )))
 *             .volumes(TaskDefinitionVolumeArgs.builder()
 *                 .name("service-storage")
 *                 .hostPath("/ecs/service-storage")
 *                 .build())
 *             .placementConstraints(TaskDefinitionPlacementConstraintArgs.builder()
 *                 .type("memberOf")
 *                 .expression("attribute:ecs.availability-zone in [us-west-2a, us-west-2b]")
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   service:
 *     type: aws:ecs:TaskDefinition
 *     properties:
 *       family: service
 *       containerDefinitions:
 *         fn::toJSON:
 *           - name: first
 *             image: service-first
 *             cpu: 10
 *             memory: 512
 *             essential: true
 *             portMappings:
 *               - containerPort: 80
 *                 hostPort: 80
 *           - name: second
 *             image: service-second
 *             cpu: 10
 *             memory: 256
 *             essential: true
 *             portMappings:
 *               - containerPort: 443
 *                 hostPort: 443
 *       volumes:
 *         - name: service-storage
 *           hostPath: /ecs/service-storage
 *       placementConstraints:
 *         - type: memberOf
 *           expression: attribute:ecs.availability-zone in [us-west-2a, us-west-2b]
 * ```
 * 
 * ### With AppMesh Proxy
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * import * as std from "@pulumi/std";
 * const service = new aws.ecs.TaskDefinition("service", {
 *     family: "service",
 *     containerDefinitions: std.file({
 *         input: "task-definitions/service.json",
 *     }).then(invoke => invoke.result),
 *     proxyConfiguration: {
 *         type: "APPMESH",
 *         containerName: "applicationContainerName",
 *         properties: {
 *             AppPorts: "8080",
 *             EgressIgnoredIPs: "169.254.170.2,169.254.169.254",
 *             IgnoredUID: "1337",
 *             ProxyEgressPort: "15001",
 *             ProxyIngressPort: "15000",
 *         },
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * import pulumi_std as std
 * service = aws.ecs.TaskDefinition("service",
 *     family="service",
 *     container_definitions=std.file(input="task-definitions/service.json").result,
 *     proxy_configuration={
 *         "type": "APPMESH",
 *         "container_name": "applicationContainerName",
 *         "properties": {
 *             "AppPorts": "8080",
 *             "EgressIgnoredIPs": "169.254.170.2,169.254.169.254",
 *             "IgnoredUID": "1337",
 *             "ProxyEgressPort": "15001",
 *             "ProxyIngressPort": "15000",
 *         },
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * using Std = Pulumi.Std;
 * return await Deployment.RunAsync(() =>
 * {
 *     var service = new Aws.Ecs.TaskDefinition("service", new()
 *     {
 *         Family = "service",
 *         ContainerDefinitions = Std.File.Invoke(new()
 *         {
 *             Input = "task-definitions/service.json",
 *         }).Apply(invoke => invoke.Result),
 *         ProxyConfiguration = new Aws.Ecs.Inputs.TaskDefinitionProxyConfigurationArgs
 *         {
 *             Type = "APPMESH",
 *             ContainerName = "applicationContainerName",
 *             Properties =
 *             {
 *                 { "AppPorts", "8080" },
 *                 { "EgressIgnoredIPs", "169.254.170.2,169.254.169.254" },
 *                 { "IgnoredUID", "1337" },
 *                 { "ProxyEgressPort", "15001" },
 *                 { "ProxyIngressPort", "15000" },
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecs"
 * 	"github.com/pulumi/pulumi-std/sdk/go/std"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		invokeFile, err := std.File(ctx, &std.FileArgs{
 * 			Input: "task-definitions/service.json",
 * 		}, nil)
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = ecs.NewTaskDefinition(ctx, "service", &ecs.TaskDefinitionArgs{
 * 			Family:               pulumi.String("service"),
 * 			ContainerDefinitions: pulumi.String(invokeFile.Result),
 * 			ProxyConfiguration: &ecs.TaskDefinitionProxyConfigurationArgs{
 * 				Type:          pulumi.String("APPMESH"),
 * 				ContainerName: pulumi.String("applicationContainerName"),
 * 				Properties: pulumi.StringMap{
 * 					"AppPorts":         pulumi.String("8080"),
 * 					"EgressIgnoredIPs": pulumi.String("169.254.170.2,169.254.169.254"),
 * 					"IgnoredUID":       pulumi.String("1337"),
 * 					"ProxyEgressPort":  pulumi.String("15001"),
 * 					"ProxyIngressPort": pulumi.String("15000"),
 * 				},
 * 			},
 * 		})
 * 		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.TaskDefinition;
 * import com.pulumi.aws.ecs.TaskDefinitionArgs;
 * import com.pulumi.aws.ecs.inputs.TaskDefinitionProxyConfigurationArgs;
 * 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 service = new TaskDefinition("service", TaskDefinitionArgs.builder()
 *             .family("service")
 *             .containerDefinitions(StdFunctions.file(FileArgs.builder()
 *                 .input("task-definitions/service.json")
 *                 .build()).result())
 *             .proxyConfiguration(TaskDefinitionProxyConfigurationArgs.builder()
 *                 .type("APPMESH")
 *                 .containerName("applicationContainerName")
 *                 .properties(Map.ofEntries(
 *                     Map.entry("AppPorts", "8080"),
 *                     Map.entry("EgressIgnoredIPs", "169.254.170.2,169.254.169.254"),
 *                     Map.entry("IgnoredUID", "1337"),
 *                     Map.entry("ProxyEgressPort", 15001),
 *                     Map.entry("ProxyIngressPort", 15000)
 *                 ))
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   service:
 *     type: aws:ecs:TaskDefinition
 *     properties:
 *       family: service
 *       containerDefinitions:
 *         fn::invoke:
 *           Function: std:file
 *           Arguments:
 *             input: task-definitions/service.json
 *           Return: result
 *       proxyConfiguration:
 *         type: APPMESH
 *         containerName: applicationContainerName
 *         properties:
 *           AppPorts: '8080'
 *           EgressIgnoredIPs: 169.254.170.2,169.254.169.254
 *           IgnoredUID: '1337'
 *           ProxyEgressPort: 15001
 *           ProxyIngressPort: 15000
 * ```
 * 
 * ### Example Using `docker_volume_configuration`
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * import * as std from "@pulumi/std";
 * const service = new aws.ecs.TaskDefinition("service", {
 *     family: "service",
 *     containerDefinitions: std.file({
 *         input: "task-definitions/service.json",
 *     }).then(invoke => invoke.result),
 *     volumes: [{
 *         name: "service-storage",
 *         dockerVolumeConfiguration: {
 *             scope: "shared",
 *             autoprovision: true,
 *             driver: "local",
 *             driverOpts: {
 *                 type: "nfs",
 *                 device: `${fs.dnsName}:/`,
 *                 o: `addr=${fs.dnsName},rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport`,
 *             },
 *         },
 *     }],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * import pulumi_std as std
 * service = aws.ecs.TaskDefinition("service",
 *     family="service",
 *     container_definitions=std.file(input="task-definitions/service.json").result,
 *     volumes=[{
 *         "name": "service-storage",
 *         "docker_volume_configuration": {
 *             "scope": "shared",
 *             "autoprovision": True,
 *             "driver": "local",
 *             "driver_opts": {
 *                 "type": "nfs",
 *                 "device": f"{fs['dnsName']}:/",
 *                 "o": f"addr={fs['dnsName']},rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport",
 *             },
 *         },
 *     }])
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * using Std = Pulumi.Std;
 * return await Deployment.RunAsync(() =>
 * {
 *     var service = new Aws.Ecs.TaskDefinition("service", new()
 *     {
 *         Family = "service",
 *         ContainerDefinitions = Std.File.Invoke(new()
 *         {
 *             Input = "task-definitions/service.json",
 *         }).Apply(invoke => invoke.Result),
 *         Volumes = new[]
 *         {
 *             new Aws.Ecs.Inputs.TaskDefinitionVolumeArgs
 *             {
 *                 Name = "service-storage",
 *                 DockerVolumeConfiguration = new Aws.Ecs.Inputs.TaskDefinitionVolumeDockerVolumeConfigurationArgs
 *                 {
 *                     Scope = "shared",
 *                     Autoprovision = true,
 *                     Driver = "local",
 *                     DriverOpts =
 *                     {
 *                         { "type", "nfs" },
 *                         { "device", $"{fs.DnsName}:/" },
 *                         { "o", $"addr={fs.DnsName},rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport" },
 *                     },
 *                 },
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"fmt"
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecs"
 * 	"github.com/pulumi/pulumi-std/sdk/go/std"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		invokeFile, err := std.File(ctx, &std.FileArgs{
 * 			Input: "task-definitions/service.json",
 * 		}, nil)
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = ecs.NewTaskDefinition(ctx, "service", &ecs.TaskDefinitionArgs{
 * 			Family:               pulumi.String("service"),
 * 			ContainerDefinitions: pulumi.String(invokeFile.Result),
 * 			Volumes: ecs.TaskDefinitionVolumeArray{
 * 				&ecs.TaskDefinitionVolumeArgs{
 * 					Name: pulumi.String("service-storage"),
 * 					DockerVolumeConfiguration: &ecs.TaskDefinitionVolumeDockerVolumeConfigurationArgs{
 * 						Scope:         pulumi.String("shared"),
 * 						Autoprovision: pulumi.Bool(true),
 * 						Driver:        pulumi.String("local"),
 * 						DriverOpts: pulumi.StringMap{
 * 							"type":   pulumi.String("nfs"),
 * 							"device": pulumi.Sprintf("%v:/", fs.DnsName),
 * 							"o":      pulumi.Sprintf("addr=%v,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport", fs.DnsName),
 * 						},
 * 					},
 * 				},
 * 			},
 * 		})
 * 		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.TaskDefinition;
 * import com.pulumi.aws.ecs.TaskDefinitionArgs;
 * import com.pulumi.aws.ecs.inputs.TaskDefinitionVolumeArgs;
 * import com.pulumi.aws.ecs.inputs.TaskDefinitionVolumeDockerVolumeConfigurationArgs;
 * 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 service = new TaskDefinition("service", TaskDefinitionArgs.builder()
 *             .family("service")
 *             .containerDefinitions(StdFunctions.file(FileArgs.builder()
 *                 .input("task-definitions/service.json")
 *                 .build()).result())
 *             .volumes(TaskDefinitionVolumeArgs.builder()
 *                 .name("service-storage")
 *                 .dockerVolumeConfiguration(TaskDefinitionVolumeDockerVolumeConfigurationArgs.builder()
 *                     .scope("shared")
 *                     .autoprovision(true)
 *                     .driver("local")
 *                     .driverOpts(Map.ofEntries(
 *                         Map.entry("type", "nfs"),
 *                         Map.entry("device", String.format("%s:/", fs.dnsName())),
 *                         Map.entry("o", String.format("addr=%s,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport", fs.dnsName()))
 *                     ))
 *                     .build())
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   service:
 *     type: aws:ecs:TaskDefinition
 *     properties:
 *       family: service
 *       containerDefinitions:
 *         fn::invoke:
 *           Function: std:file
 *           Arguments:
 *             input: task-definitions/service.json
 *           Return: result
 *       volumes:
 *         - name: service-storage
 *           dockerVolumeConfiguration:
 *             scope: shared
 *             autoprovision: true
 *             driver: local
 *             driverOpts:
 *               type: nfs
 *               device: ${fs.dnsName}:/
 *               o: addr=${fs.dnsName},rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport
 * ```
 * 
 * ### Example Using `efs_volume_configuration`
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * import * as std from "@pulumi/std";
 * const service = new aws.ecs.TaskDefinition("service", {
 *     family: "service",
 *     containerDefinitions: std.file({
 *         input: "task-definitions/service.json",
 *     }).then(invoke => invoke.result),
 *     volumes: [{
 *         name: "service-storage",
 *         efsVolumeConfiguration: {
 *             fileSystemId: fs.id,
 *             rootDirectory: "/opt/data",
 *             transitEncryption: "ENABLED",
 *             transitEncryptionPort: 2999,
 *             authorizationConfig: {
 *                 accessPointId: test.id,
 *                 iam: "ENABLED",
 *             },
 *         },
 *     }],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * import pulumi_std as std
 * service = aws.ecs.TaskDefinition("service",
 *     family="service",
 *     container_definitions=std.file(input="task-definitions/service.json").result,
 *     volumes=[{
 *         "name": "service-storage",
 *         "efs_volume_configuration": {
 *             "file_system_id": fs["id"],
 *             "root_directory": "/opt/data",
 *             "transit_encryption": "ENABLED",
 *             "transit_encryption_port": 2999,
 *             "authorization_config": {
 *                 "access_point_id": test["id"],
 *                 "iam": "ENABLED",
 *             },
 *         },
 *     }])
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * using Std = Pulumi.Std;
 * return await Deployment.RunAsync(() =>
 * {
 *     var service = new Aws.Ecs.TaskDefinition("service", new()
 *     {
 *         Family = "service",
 *         ContainerDefinitions = Std.File.Invoke(new()
 *         {
 *             Input = "task-definitions/service.json",
 *         }).Apply(invoke => invoke.Result),
 *         Volumes = new[]
 *         {
 *             new Aws.Ecs.Inputs.TaskDefinitionVolumeArgs
 *             {
 *                 Name = "service-storage",
 *                 EfsVolumeConfiguration = new Aws.Ecs.Inputs.TaskDefinitionVolumeEfsVolumeConfigurationArgs
 *                 {
 *                     FileSystemId = fs.Id,
 *                     RootDirectory = "/opt/data",
 *                     TransitEncryption = "ENABLED",
 *                     TransitEncryptionPort = 2999,
 *                     AuthorizationConfig = new Aws.Ecs.Inputs.TaskDefinitionVolumeEfsVolumeConfigurationAuthorizationConfigArgs
 *                     {
 *                         AccessPointId = test.Id,
 *                         Iam = "ENABLED",
 *                     },
 *                 },
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecs"
 * 	"github.com/pulumi/pulumi-std/sdk/go/std"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		invokeFile, err := std.File(ctx, &std.FileArgs{
 * 			Input: "task-definitions/service.json",
 * 		}, nil)
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = ecs.NewTaskDefinition(ctx, "service", &ecs.TaskDefinitionArgs{
 * 			Family:               pulumi.String("service"),
 * 			ContainerDefinitions: pulumi.String(invokeFile.Result),
 * 			Volumes: ecs.TaskDefinitionVolumeArray{
 * 				&ecs.TaskDefinitionVolumeArgs{
 * 					Name: pulumi.String("service-storage"),
 * 					EfsVolumeConfiguration: &ecs.TaskDefinitionVolumeEfsVolumeConfigurationArgs{
 * 						FileSystemId:          pulumi.Any(fs.Id),
 * 						RootDirectory:         pulumi.String("/opt/data"),
 * 						TransitEncryption:     pulumi.String("ENABLED"),
 * 						TransitEncryptionPort: pulumi.Int(2999),
 * 						AuthorizationConfig: &ecs.TaskDefinitionVolumeEfsVolumeConfigurationAuthorizationConfigArgs{
 * 							AccessPointId: pulumi.Any(test.Id),
 * 							Iam:           pulumi.String("ENABLED"),
 * 						},
 * 					},
 * 				},
 * 			},
 * 		})
 * 		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.TaskDefinition;
 * import com.pulumi.aws.ecs.TaskDefinitionArgs;
 * import com.pulumi.aws.ecs.inputs.TaskDefinitionVolumeArgs;
 * import com.pulumi.aws.ecs.inputs.TaskDefinitionVolumeEfsVolumeConfigurationArgs;
 * import com.pulumi.aws.ecs.inputs.TaskDefinitionVolumeEfsVolumeConfigurationAuthorizationConfigArgs;
 * 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 service = new TaskDefinition("service", TaskDefinitionArgs.builder()
 *             .family("service")
 *             .containerDefinitions(StdFunctions.file(FileArgs.builder()
 *                 .input("task-definitions/service.json")
 *                 .build()).result())
 *             .volumes(TaskDefinitionVolumeArgs.builder()
 *                 .name("service-storage")
 *                 .efsVolumeConfiguration(TaskDefinitionVolumeEfsVolumeConfigurationArgs.builder()
 *                     .fileSystemId(fs.id())
 *                     .rootDirectory("/opt/data")
 *                     .transitEncryption("ENABLED")
 *                     .transitEncryptionPort(2999)
 *                     .authorizationConfig(TaskDefinitionVolumeEfsVolumeConfigurationAuthorizationConfigArgs.builder()
 *                         .accessPointId(test.id())
 *                         .iam("ENABLED")
 *                         .build())
 *                     .build())
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   service:
 *     type: aws:ecs:TaskDefinition
 *     properties:
 *       family: service
 *       containerDefinitions:
 *         fn::invoke:
 *           Function: std:file
 *           Arguments:
 *             input: task-definitions/service.json
 *           Return: result
 *       volumes:
 *         - name: service-storage
 *           efsVolumeConfiguration:
 *             fileSystemId: ${fs.id}
 *             rootDirectory: /opt/data
 *             transitEncryption: ENABLED
 *             transitEncryptionPort: 2999
 *             authorizationConfig:
 *               accessPointId: ${test.id}
 *               iam: ENABLED
 * ```
 * 
 * ### Example Using `fsx_windows_file_server_volume_configuration`
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * import * as std from "@pulumi/std";
 * const test = new aws.secretsmanager.SecretVersion("test", {
 *     secretId: testAwsSecretsmanagerSecret.id,
 *     secretString: JSON.stringify({
 *         username: "admin",
 *         password: testAwsDirectoryServiceDirectory.password,
 *     }),
 * });
 * const service = new aws.ecs.TaskDefinition("service", {
 *     family: "service",
 *     containerDefinitions: std.file({
 *         input: "task-definitions/service.json",
 *     }).then(invoke => invoke.result),
 *     volumes: [{
 *         name: "service-storage",
 *         fsxWindowsFileServerVolumeConfiguration: {
 *             fileSystemId: testAwsFsxWindowsFileSystem.id,
 *             rootDirectory: "\\data",
 *             authorizationConfig: {
 *                 credentialsParameter: test.arn,
 *                 domain: testAwsDirectoryServiceDirectory.name,
 *             },
 *         },
 *     }],
 * });
 * ```
 * ```python
 * import pulumi
 * import json
 * import pulumi_aws as aws
 * import pulumi_std as std
 * test = aws.secretsmanager.SecretVersion("test",
 *     secret_id=test_aws_secretsmanager_secret["id"],
 *     secret_string=json.dumps({
 *         "username": "admin",
 *         "password": test_aws_directory_service_directory["password"],
 *     }))
 * service = aws.ecs.TaskDefinition("service",
 *     family="service",
 *     container_definitions=std.file(input="task-definitions/service.json").result,
 *     volumes=[{
 *         "name": "service-storage",
 *         "fsx_windows_file_server_volume_configuration": {
 *             "file_system_id": test_aws_fsx_windows_file_system["id"],
 *             "root_directory": "\\data",
 *             "authorization_config": {
 *                 "credentials_parameter": test.arn,
 *                 "domain": test_aws_directory_service_directory["name"],
 *             },
 *         },
 *     }])
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using System.Text.Json;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * using Std = Pulumi.Std;
 * return await Deployment.RunAsync(() =>
 * {
 *     var test = new Aws.SecretsManager.SecretVersion("test", new()
 *     {
 *         SecretId = testAwsSecretsmanagerSecret.Id,
 *         SecretString = JsonSerializer.Serialize(new Dictionary
 *         {
 *             ["username"] = "admin",
 *             ["password"] = testAwsDirectoryServiceDirectory.Password,
 *         }),
 *     });
 *     var service = new Aws.Ecs.TaskDefinition("service", new()
 *     {
 *         Family = "service",
 *         ContainerDefinitions = Std.File.Invoke(new()
 *         {
 *             Input = "task-definitions/service.json",
 *         }).Apply(invoke => invoke.Result),
 *         Volumes = new[]
 *         {
 *             new Aws.Ecs.Inputs.TaskDefinitionVolumeArgs
 *             {
 *                 Name = "service-storage",
 *                 FsxWindowsFileServerVolumeConfiguration = new Aws.Ecs.Inputs.TaskDefinitionVolumeFsxWindowsFileServerVolumeConfigurationArgs
 *                 {
 *                     FileSystemId = testAwsFsxWindowsFileSystem.Id,
 *                     RootDirectory = "\\data",
 *                     AuthorizationConfig = new Aws.Ecs.Inputs.TaskDefinitionVolumeFsxWindowsFileServerVolumeConfigurationAuthorizationConfigArgs
 *                     {
 *                         CredentialsParameter = test.Arn,
 *                         Domain = testAwsDirectoryServiceDirectory.Name,
 *                     },
 *                 },
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"encoding/json"
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecs"
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/secretsmanager"
 * 	"github.com/pulumi/pulumi-std/sdk/go/std"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		tmpJSON0, err := json.Marshal(map[string]interface{}{
 * 			"username": "admin",
 * 			"password": testAwsDirectoryServiceDirectory.Password,
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		json0 := string(tmpJSON0)
 * 		test, err := secretsmanager.NewSecretVersion(ctx, "test", &secretsmanager.SecretVersionArgs{
 * 			SecretId:     pulumi.Any(testAwsSecretsmanagerSecret.Id),
 * 			SecretString: pulumi.String(json0),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		invokeFile, err := std.File(ctx, &std.FileArgs{
 * 			Input: "task-definitions/service.json",
 * 		}, nil)
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = ecs.NewTaskDefinition(ctx, "service", &ecs.TaskDefinitionArgs{
 * 			Family:               pulumi.String("service"),
 * 			ContainerDefinitions: pulumi.String(invokeFile.Result),
 * 			Volumes: ecs.TaskDefinitionVolumeArray{
 * 				&ecs.TaskDefinitionVolumeArgs{
 * 					Name: pulumi.String("service-storage"),
 * 					FsxWindowsFileServerVolumeConfiguration: &ecs.TaskDefinitionVolumeFsxWindowsFileServerVolumeConfigurationArgs{
 * 						FileSystemId:  pulumi.Any(testAwsFsxWindowsFileSystem.Id),
 * 						RootDirectory: pulumi.String("\\data"),
 * 						AuthorizationConfig: &ecs.TaskDefinitionVolumeFsxWindowsFileServerVolumeConfigurationAuthorizationConfigArgs{
 * 							CredentialsParameter: test.Arn,
 * 							Domain:               pulumi.Any(testAwsDirectoryServiceDirectory.Name),
 * 						},
 * 					},
 * 				},
 * 			},
 * 		})
 * 		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.secretsmanager.SecretVersion;
 * import com.pulumi.aws.secretsmanager.SecretVersionArgs;
 * import com.pulumi.aws.ecs.TaskDefinition;
 * import com.pulumi.aws.ecs.TaskDefinitionArgs;
 * import com.pulumi.aws.ecs.inputs.TaskDefinitionVolumeArgs;
 * import com.pulumi.aws.ecs.inputs.TaskDefinitionVolumeFsxWindowsFileServerVolumeConfigurationArgs;
 * import com.pulumi.aws.ecs.inputs.TaskDefinitionVolumeFsxWindowsFileServerVolumeConfigurationAuthorizationConfigArgs;
 * import static com.pulumi.codegen.internal.Serialization.*;
 * 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 test = new SecretVersion("test", SecretVersionArgs.builder()
 *             .secretId(testAwsSecretsmanagerSecret.id())
 *             .secretString(serializeJson(
 *                 jsonObject(
 *                     jsonProperty("username", "admin"),
 *                     jsonProperty("password", testAwsDirectoryServiceDirectory.password())
 *                 )))
 *             .build());
 *         var service = new TaskDefinition("service", TaskDefinitionArgs.builder()
 *             .family("service")
 *             .containerDefinitions(StdFunctions.file(FileArgs.builder()
 *                 .input("task-definitions/service.json")
 *                 .build()).result())
 *             .volumes(TaskDefinitionVolumeArgs.builder()
 *                 .name("service-storage")
 *                 .fsxWindowsFileServerVolumeConfiguration(TaskDefinitionVolumeFsxWindowsFileServerVolumeConfigurationArgs.builder()
 *                     .fileSystemId(testAwsFsxWindowsFileSystem.id())
 *                     .rootDirectory("\\data")
 *                     .authorizationConfig(TaskDefinitionVolumeFsxWindowsFileServerVolumeConfigurationAuthorizationConfigArgs.builder()
 *                         .credentialsParameter(test.arn())
 *                         .domain(testAwsDirectoryServiceDirectory.name())
 *                         .build())
 *                     .build())
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   service:
 *     type: aws:ecs:TaskDefinition
 *     properties:
 *       family: service
 *       containerDefinitions:
 *         fn::invoke:
 *           Function: std:file
 *           Arguments:
 *             input: task-definitions/service.json
 *           Return: result
 *       volumes:
 *         - name: service-storage
 *           fsxWindowsFileServerVolumeConfiguration:
 *             fileSystemId: ${testAwsFsxWindowsFileSystem.id}
 *             rootDirectory: \data
 *             authorizationConfig:
 *               credentialsParameter: ${test.arn}
 *               domain: ${testAwsDirectoryServiceDirectory.name}
 *   test:
 *     type: aws:secretsmanager:SecretVersion
 *     properties:
 *       secretId: ${testAwsSecretsmanagerSecret.id}
 *       secretString:
 *         fn::toJSON:
 *           username: admin
 *           password: ${testAwsDirectoryServiceDirectory.password}
 * ```
 * 
 * ### Example Using `container_definitions` and `inference_accelerator`
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const test = new aws.ecs.TaskDefinition("test", {
 *     family: "test",
 *     containerDefinitions: `[
 *   {
 *     "cpu": 10,
 *     "command": ["sleep", "10"],
 *     "entryPoint": ["/"],
 *     "environment": [
 *       {"name": "VARNAME", "value": "VARVAL"}
 *     ],
 *     "essential": true,
 *     "image": "jenkins",
 *     "memory": 128,
 *     "name": "jenkins",
 *     "portMappings": [
 *       {
 *         "containerPort": 80,
 *         "hostPort": 8080
 *       }
 *     ],
 *         "resourceRequirements":[
 *             {
 *                 "type":"InferenceAccelerator",
 *                 "value":"device_1"
 *             }
 *         ]
 *   }
 * ]
 * `,
 *     inferenceAccelerators: [{
 *         deviceName: "device_1",
 *         deviceType: "eia1.medium",
 *     }],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * test = aws.ecs.TaskDefinition("test",
 *     family="test",
 *     container_definitions="""[
 *   {
 *     "cpu": 10,
 *     "command": ["sleep", "10"],
 *     "entryPoint": ["/"],
 *     "environment": [
 *       {"name": "VARNAME", "value": "VARVAL"}
 *     ],
 *     "essential": true,
 *     "image": "jenkins",
 *     "memory": 128,
 *     "name": "jenkins",
 *     "portMappings": [
 *       {
 *         "containerPort": 80,
 *         "hostPort": 8080
 *       }
 *     ],
 *         "resourceRequirements":[
 *             {
 *                 "type":"InferenceAccelerator",
 *                 "value":"device_1"
 *             }
 *         ]
 *   }
 * ]
 * """,
 *     inference_accelerators=[{
 *         "device_name": "device_1",
 *         "device_type": "eia1.medium",
 *     }])
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var test = new Aws.Ecs.TaskDefinition("test", new()
 *     {
 *         Family = "test",
 *         ContainerDefinitions = @"[
 *   {
 *     ""cpu"": 10,
 *     ""command"": [""sleep"", ""10""],
 *     ""entryPoint"": [""/""],
 *     ""environment"": [
 *       {""name"": ""VARNAME"", ""value"": ""VARVAL""}
 *     ],
 *     ""essential"": true,
 *     ""image"": ""jenkins"",
 *     ""memory"": 128,
 *     ""name"": ""jenkins"",
 *     ""portMappings"": [
 *       {
 *         ""containerPort"": 80,
 *         ""hostPort"": 8080
 *       }
 *     ],
 *         ""resourceRequirements"":[
 *             {
 *                 ""type"":""InferenceAccelerator"",
 *                 ""value"":""device_1""
 *             }
 *         ]
 *   }
 * ]
 * ",
 *         InferenceAccelerators = new[]
 *         {
 *             new Aws.Ecs.Inputs.TaskDefinitionInferenceAcceleratorArgs
 *             {
 *                 DeviceName = "device_1",
 *                 DeviceType = "eia1.medium",
 *             },
 *         },
 *     });
 * });
 * ```
 * ```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.NewTaskDefinition(ctx, "test", &ecs.TaskDefinitionArgs{
 * 			Family: pulumi.String("test"),
 * 			ContainerDefinitions: pulumi.String(`[
 *   {
 *     "cpu": 10,
 *     "command": ["sleep", "10"],
 *     "entryPoint": ["/"],
 *     "environment": [
 *       {"name": "VARNAME", "value": "VARVAL"}
 *     ],
 *     "essential": true,
 *     "image": "jenkins",
 *     "memory": 128,
 *     "name": "jenkins",
 *     "portMappings": [
 *       {
 *         "containerPort": 80,
 *         "hostPort": 8080
 *       }
 *     ],
 *         "resourceRequirements":[
 *             {
 *                 "type":"InferenceAccelerator",
 *                 "value":"device_1"
 *             }
 *         ]
 *   }
 * ]
 * `),
 * 			InferenceAccelerators: ecs.TaskDefinitionInferenceAcceleratorArray{
 * 				&ecs.TaskDefinitionInferenceAcceleratorArgs{
 * 					DeviceName: pulumi.String("device_1"),
 * 					DeviceType: pulumi.String("eia1.medium"),
 * 				},
 * 			},
 * 		})
 * 		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.TaskDefinition;
 * import com.pulumi.aws.ecs.TaskDefinitionArgs;
 * import com.pulumi.aws.ecs.inputs.TaskDefinitionInferenceAcceleratorArgs;
 * 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 test = new TaskDefinition("test", TaskDefinitionArgs.builder()
 *             .family("test")
 *             .containerDefinitions("""
 * [
 *   {
 *     "cpu": 10,
 *     "command": ["sleep", "10"],
 *     "entryPoint": ["/"],
 *     "environment": [
 *       {"name": "VARNAME", "value": "VARVAL"}
 *     ],
 *     "essential": true,
 *     "image": "jenkins",
 *     "memory": 128,
 *     "name": "jenkins",
 *     "portMappings": [
 *       {
 *         "containerPort": 80,
 *         "hostPort": 8080
 *       }
 *     ],
 *         "resourceRequirements":[
 *             {
 *                 "type":"InferenceAccelerator",
 *                 "value":"device_1"
 *             }
 *         ]
 *   }
 * ]
 *             """)
 *             .inferenceAccelerators(TaskDefinitionInferenceAcceleratorArgs.builder()
 *                 .deviceName("device_1")
 *                 .deviceType("eia1.medium")
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   test:
 *     type: aws:ecs:TaskDefinition
 *     properties:
 *       family: test
 *       containerDefinitions: |
 *         [
 *           {
 *             "cpu": 10,
 *             "command": ["sleep", "10"],
 *             "entryPoint": ["/"],
 *             "environment": [
 *               {"name": "VARNAME", "value": "VARVAL"}
 *             ],
 *             "essential": true,
 *             "image": "jenkins",
 *             "memory": 128,
 *             "name": "jenkins",
 *             "portMappings": [
 *               {
 *                 "containerPort": 80,
 *                 "hostPort": 8080
 *               }
 *             ],
 *                 "resourceRequirements":[
 *                     {
 *                         "type":"InferenceAccelerator",
 *                         "value":"device_1"
 *                     }
 *                 ]
 *           }
 *         ]
 *       inferenceAccelerators:
 *         - deviceName: device_1
 *           deviceType: eia1.medium
 * ```
 * 
 * ### Example Using `runtime_platform` and `fargate`
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const test = new aws.ecs.TaskDefinition("test", {
 *     family: "test",
 *     requiresCompatibilities: ["FARGATE"],
 *     networkMode: "awsvpc",
 *     cpu: "1024",
 *     memory: "2048",
 *     containerDefinitions: `[
 *   {
 *     "name": "iis",
 *     "image": "mcr.microsoft.com/windows/servercore/iis",
 *     "cpu": 1024,
 *     "memory": 2048,
 *     "essential": true
 *   }
 * ]
 * `,
 *     runtimePlatform: {
 *         operatingSystemFamily: "WINDOWS_SERVER_2019_CORE",
 *         cpuArchitecture: "X86_64",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * test = aws.ecs.TaskDefinition("test",
 *     family="test",
 *     requires_compatibilities=["FARGATE"],
 *     network_mode="awsvpc",
 *     cpu="1024",
 *     memory="2048",
 *     container_definitions="""[
 *   {
 *     "name": "iis",
 *     "image": "mcr.microsoft.com/windows/servercore/iis",
 *     "cpu": 1024,
 *     "memory": 2048,
 *     "essential": true
 *   }
 * ]
 * """,
 *     runtime_platform={
 *         "operating_system_family": "WINDOWS_SERVER_2019_CORE",
 *         "cpu_architecture": "X86_64",
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var test = new Aws.Ecs.TaskDefinition("test", new()
 *     {
 *         Family = "test",
 *         RequiresCompatibilities = new[]
 *         {
 *             "FARGATE",
 *         },
 *         NetworkMode = "awsvpc",
 *         Cpu = "1024",
 *         Memory = "2048",
 *         ContainerDefinitions = @"[
 *   {
 *     ""name"": ""iis"",
 *     ""image"": ""mcr.microsoft.com/windows/servercore/iis"",
 *     ""cpu"": 1024,
 *     ""memory"": 2048,
 *     ""essential"": true
 *   }
 * ]
 * ",
 *         RuntimePlatform = new Aws.Ecs.Inputs.TaskDefinitionRuntimePlatformArgs
 *         {
 *             OperatingSystemFamily = "WINDOWS_SERVER_2019_CORE",
 *             CpuArchitecture = "X86_64",
 *         },
 *     });
 * });
 * ```
 * ```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.NewTaskDefinition(ctx, "test", &ecs.TaskDefinitionArgs{
 * 			Family: pulumi.String("test"),
 * 			RequiresCompatibilities: pulumi.StringArray{
 * 				pulumi.String("FARGATE"),
 * 			},
 * 			NetworkMode: pulumi.String("awsvpc"),
 * 			Cpu:         pulumi.String("1024"),
 * 			Memory:      pulumi.String("2048"),
 * 			ContainerDefinitions: pulumi.String(`[
 *   {
 *     "name": "iis",
 *     "image": "mcr.microsoft.com/windows/servercore/iis",
 *     "cpu": 1024,
 *     "memory": 2048,
 *     "essential": true
 *   }
 * ]
 * `),
 * 			RuntimePlatform: &ecs.TaskDefinitionRuntimePlatformArgs{
 * 				OperatingSystemFamily: pulumi.String("WINDOWS_SERVER_2019_CORE"),
 * 				CpuArchitecture:       pulumi.String("X86_64"),
 * 			},
 * 		})
 * 		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.TaskDefinition;
 * import com.pulumi.aws.ecs.TaskDefinitionArgs;
 * import com.pulumi.aws.ecs.inputs.TaskDefinitionRuntimePlatformArgs;
 * 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 test = new TaskDefinition("test", TaskDefinitionArgs.builder()
 *             .family("test")
 *             .requiresCompatibilities("FARGATE")
 *             .networkMode("awsvpc")
 *             .cpu(1024)
 *             .memory(2048)
 *             .containerDefinitions("""
 * [
 *   {
 *     "name": "iis",
 *     "image": "mcr.microsoft.com/windows/servercore/iis",
 *     "cpu": 1024,
 *     "memory": 2048,
 *     "essential": true
 *   }
 * ]
 *             """)
 *             .runtimePlatform(TaskDefinitionRuntimePlatformArgs.builder()
 *                 .operatingSystemFamily("WINDOWS_SERVER_2019_CORE")
 *                 .cpuArchitecture("X86_64")
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   test:
 *     type: aws:ecs:TaskDefinition
 *     properties:
 *       family: test
 *       requiresCompatibilities:
 *         - FARGATE
 *       networkMode: awsvpc
 *       cpu: 1024
 *       memory: 2048
 *       containerDefinitions: |
 *         [
 *           {
 *             "name": "iis",
 *             "image": "mcr.microsoft.com/windows/servercore/iis",
 *             "cpu": 1024,
 *             "memory": 2048,
 *             "essential": true
 *           }
 *         ]
 *       runtimePlatform:
 *         operatingSystemFamily: WINDOWS_SERVER_2019_CORE
 *         cpuArchitecture: X86_64
 * ```
 * 
 * ## Import
 * Using `pulumi import`, import ECS Task Definitions using their ARNs. For example:
 * ```sh
 * $ pulumi import aws:ecs/taskDefinition:TaskDefinition example arn:aws:ecs:us-east-1:012345678910:task-definition/mytaskfamily:123
 * ```
 * @property containerDefinitions A list of valid [container definitions](http://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ContainerDefinition.html) provided as a single valid JSON document. Please note that you should only provide values that are part of the container definition document. For a detailed description of what parameters are available, see the [Task Definition Parameters](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html) section from the official [Developer Guide](https://docs.aws.amazon.com/AmazonECS/latest/developerguide).
 * @property cpu Number of cpu units used by the task. If the `requires_compatibilities` is `FARGATE` this field is required.
 * @property ephemeralStorage The amount of ephemeral storage to allocate for the task. This parameter is used to expand the total amount of ephemeral storage available, beyond the default amount, for tasks hosted on AWS Fargate. See Ephemeral Storage.
 * @property executionRoleArn ARN of the task execution role that the Amazon ECS container agent and the Docker daemon can assume.
 * @property family A unique name for your task definition.
 * The following arguments are optional:
 * @property inferenceAccelerators Configuration block(s) with Inference Accelerators settings. Detailed below.
 * @property ipcMode IPC resource namespace to be used for the containers in the task The valid values are `host`, `task`, and `none`.
 * @property memory Amount (in MiB) of memory used by the task. If the `requires_compatibilities` is `FARGATE` this field is required.
 * @property networkMode Docker networking mode to use for the containers in the task. Valid values are `none`, `bridge`, `awsvpc`, and `host`.
 * @property pidMode Process namespace to use for the containers in the task. The valid values are `host` and `task`.
 * @property placementConstraints Configuration block for rules that are taken into consideration during task placement. Maximum number of `placement_constraints` is `10`. Detailed below.
 * @property proxyConfiguration Configuration block for the App Mesh proxy. Detailed below.
 * @property requiresCompatibilities Set of launch types required by the task. The valid values are `EC2` and `FARGATE`.
 * @property runtimePlatform Configuration block for runtime_platform that containers in your task may use.
 * @property skipDestroy Whether to retain the old revision when the resource is destroyed or replacement is necessary. Default is `false`.
 * @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 taskRoleArn ARN of IAM role that allows your Amazon ECS container task to make calls to other AWS services.
 * @property trackLatest Whether should track latest `ACTIVE` task definition on AWS or the one created with the resource stored in state. Default is `false`. Useful in the event the task definition is modified outside of this resource.
 * @property volumes Configuration block for volumes that containers in your task may use. Detailed below.
 */
public data class TaskDefinitionArgs(
    public val containerDefinitions: Output? = null,
    public val cpu: Output? = null,
    public val ephemeralStorage: Output? = null,
    public val executionRoleArn: Output? = null,
    public val family: Output? = null,
    public val inferenceAccelerators: Output>? = null,
    public val ipcMode: Output? = null,
    public val memory: Output? = null,
    public val networkMode: Output? = null,
    public val pidMode: Output? = null,
    public val placementConstraints: Output>? = null,
    public val proxyConfiguration: Output? = null,
    public val requiresCompatibilities: Output>? = null,
    public val runtimePlatform: Output? = null,
    public val skipDestroy: Output? = null,
    public val tags: Output>? = null,
    public val taskRoleArn: Output? = null,
    public val trackLatest: Output? = null,
    public val volumes: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.ecs.TaskDefinitionArgs =
        com.pulumi.aws.ecs.TaskDefinitionArgs.builder()
            .containerDefinitions(containerDefinitions?.applyValue({ args0 -> args0 }))
            .cpu(cpu?.applyValue({ args0 -> args0 }))
            .ephemeralStorage(ephemeralStorage?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .executionRoleArn(executionRoleArn?.applyValue({ args0 -> args0 }))
            .family(family?.applyValue({ args0 -> args0 }))
            .inferenceAccelerators(
                inferenceAccelerators?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .ipcMode(ipcMode?.applyValue({ args0 -> args0 }))
            .memory(memory?.applyValue({ args0 -> args0 }))
            .networkMode(networkMode?.applyValue({ args0 -> args0 }))
            .pidMode(pidMode?.applyValue({ args0 -> args0 }))
            .placementConstraints(
                placementConstraints?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .proxyConfiguration(
                proxyConfiguration?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .requiresCompatibilities(
                requiresCompatibilities?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0
                    })
                }),
            )
            .runtimePlatform(runtimePlatform?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .skipDestroy(skipDestroy?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .taskRoleArn(taskRoleArn?.applyValue({ args0 -> args0 }))
            .trackLatest(trackLatest?.applyValue({ args0 -> args0 }))
            .volumes(
                volumes?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [TaskDefinitionArgs].
 */
@PulumiTagMarker
public class TaskDefinitionArgsBuilder internal constructor() {
    private var containerDefinitions: Output? = null

    private var cpu: Output? = null

    private var ephemeralStorage: Output? = null

    private var executionRoleArn: Output? = null

    private var family: Output? = null

    private var inferenceAccelerators: Output>? = null

    private var ipcMode: Output? = null

    private var memory: Output? = null

    private var networkMode: Output? = null

    private var pidMode: Output? = null

    private var placementConstraints: Output>? = null

    private var proxyConfiguration: Output? = null

    private var requiresCompatibilities: Output>? = null

    private var runtimePlatform: Output? = null

    private var skipDestroy: Output? = null

    private var tags: Output>? = null

    private var taskRoleArn: Output? = null

    private var trackLatest: Output? = null

    private var volumes: Output>? = null

    /**
     * @param value A list of valid [container definitions](http://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ContainerDefinition.html) provided as a single valid JSON document. Please note that you should only provide values that are part of the container definition document. For a detailed description of what parameters are available, see the [Task Definition Parameters](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html) section from the official [Developer Guide](https://docs.aws.amazon.com/AmazonECS/latest/developerguide).
     */
    @JvmName("atkdobccoavvmrhn")
    public suspend fun containerDefinitions(`value`: Output) {
        this.containerDefinitions = value
    }

    /**
     * @param value Number of cpu units used by the task. If the `requires_compatibilities` is `FARGATE` this field is required.
     */
    @JvmName("rbpdjkryphgbppye")
    public suspend fun cpu(`value`: Output) {
        this.cpu = value
    }

    /**
     * @param value The amount of ephemeral storage to allocate for the task. This parameter is used to expand the total amount of ephemeral storage available, beyond the default amount, for tasks hosted on AWS Fargate. See Ephemeral Storage.
     */
    @JvmName("gxlsucohmaubiwyu")
    public suspend fun ephemeralStorage(`value`: Output) {
        this.ephemeralStorage = value
    }

    /**
     * @param value ARN of the task execution role that the Amazon ECS container agent and the Docker daemon can assume.
     */
    @JvmName("xmjmomfenfamhvhd")
    public suspend fun executionRoleArn(`value`: Output) {
        this.executionRoleArn = value
    }

    /**
     * @param value A unique name for your task definition.
     * The following arguments are optional:
     */
    @JvmName("tjqrslbbujnevode")
    public suspend fun family(`value`: Output) {
        this.family = value
    }

    /**
     * @param value Configuration block(s) with Inference Accelerators settings. Detailed below.
     */
    @JvmName("baasatwnkbutqxab")
    public suspend fun inferenceAccelerators(`value`: Output>) {
        this.inferenceAccelerators = value
    }

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

    /**
     * @param values Configuration block(s) with Inference Accelerators settings. Detailed below.
     */
    @JvmName("jtebgfmfkwrgflum")
    public suspend fun inferenceAccelerators(values: List>) {
        this.inferenceAccelerators = Output.all(values)
    }

    /**
     * @param value IPC resource namespace to be used for the containers in the task The valid values are `host`, `task`, and `none`.
     */
    @JvmName("dupyvdrssvkdtumq")
    public suspend fun ipcMode(`value`: Output) {
        this.ipcMode = value
    }

    /**
     * @param value Amount (in MiB) of memory used by the task. If the `requires_compatibilities` is `FARGATE` this field is required.
     */
    @JvmName("fmrasnlrdqmuatil")
    public suspend fun memory(`value`: Output) {
        this.memory = value
    }

    /**
     * @param value Docker networking mode to use for the containers in the task. Valid values are `none`, `bridge`, `awsvpc`, and `host`.
     */
    @JvmName("yxdfhmfadmogyrqp")
    public suspend fun networkMode(`value`: Output) {
        this.networkMode = value
    }

    /**
     * @param value Process namespace to use for the containers in the task. The valid values are `host` and `task`.
     */
    @JvmName("tihtfsdobvomfafn")
    public suspend fun pidMode(`value`: Output) {
        this.pidMode = value
    }

    /**
     * @param value Configuration block for rules that are taken into consideration during task placement. Maximum number of `placement_constraints` is `10`. Detailed below.
     */
    @JvmName("gytxqbxjsobsjpju")
    public suspend fun placementConstraints(`value`: Output>) {
        this.placementConstraints = value
    }

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

    /**
     * @param values Configuration block for rules that are taken into consideration during task placement. Maximum number of `placement_constraints` is `10`. Detailed below.
     */
    @JvmName("ywvohjhxuhgqmtfp")
    public suspend fun placementConstraints(values: List>) {
        this.placementConstraints = Output.all(values)
    }

    /**
     * @param value Configuration block for the App Mesh proxy. Detailed below.
     */
    @JvmName("mdohsdotyhtibbnd")
    public suspend fun proxyConfiguration(`value`: Output) {
        this.proxyConfiguration = value
    }

    /**
     * @param value Set of launch types required by the task. The valid values are `EC2` and `FARGATE`.
     */
    @JvmName("wadytqpilpnniosm")
    public suspend fun requiresCompatibilities(`value`: Output>) {
        this.requiresCompatibilities = value
    }

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

    /**
     * @param values Set of launch types required by the task. The valid values are `EC2` and `FARGATE`.
     */
    @JvmName("apxvpmyowyxdfela")
    public suspend fun requiresCompatibilities(values: List>) {
        this.requiresCompatibilities = Output.all(values)
    }

    /**
     * @param value Configuration block for runtime_platform that containers in your task may use.
     */
    @JvmName("wtmxtoiayymnprsy")
    public suspend fun runtimePlatform(`value`: Output) {
        this.runtimePlatform = value
    }

    /**
     * @param value Whether to retain the old revision when the resource is destroyed or replacement is necessary. Default is `false`.
     */
    @JvmName("xvdjlsovxwkykdim")
    public suspend fun skipDestroy(`value`: Output) {
        this.skipDestroy = 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("xfwqcurwroycmupx")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value ARN of IAM role that allows your Amazon ECS container task to make calls to other AWS services.
     */
    @JvmName("gqlolvxpvvssybod")
    public suspend fun taskRoleArn(`value`: Output) {
        this.taskRoleArn = value
    }

    /**
     * @param value Whether should track latest `ACTIVE` task definition on AWS or the one created with the resource stored in state. Default is `false`. Useful in the event the task definition is modified outside of this resource.
     */
    @JvmName("ywhjpuqgphdkdaha")
    public suspend fun trackLatest(`value`: Output) {
        this.trackLatest = value
    }

    /**
     * @param value Configuration block for volumes that containers in your task may use. Detailed below.
     */
    @JvmName("ljoqwakkxraongkc")
    public suspend fun volumes(`value`: Output>) {
        this.volumes = value
    }

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

    /**
     * @param values Configuration block for volumes that containers in your task may use. Detailed below.
     */
    @JvmName("iyjewnxnjjewhdsh")
    public suspend fun volumes(values: List>) {
        this.volumes = Output.all(values)
    }

    /**
     * @param value A list of valid [container definitions](http://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ContainerDefinition.html) provided as a single valid JSON document. Please note that you should only provide values that are part of the container definition document. For a detailed description of what parameters are available, see the [Task Definition Parameters](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html) section from the official [Developer Guide](https://docs.aws.amazon.com/AmazonECS/latest/developerguide).
     */
    @JvmName("infuyhkgmyuprxhs")
    public suspend fun containerDefinitions(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.containerDefinitions = mapped
    }

    /**
     * @param value Number of cpu units used by the task. If the `requires_compatibilities` is `FARGATE` this field is required.
     */
    @JvmName("isskauxirwllmkov")
    public suspend fun cpu(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.cpu = mapped
    }

    /**
     * @param value The amount of ephemeral storage to allocate for the task. This parameter is used to expand the total amount of ephemeral storage available, beyond the default amount, for tasks hosted on AWS Fargate. See Ephemeral Storage.
     */
    @JvmName("jdiktgohkhlsbxqe")
    public suspend fun ephemeralStorage(`value`: TaskDefinitionEphemeralStorageArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ephemeralStorage = mapped
    }

    /**
     * @param argument The amount of ephemeral storage to allocate for the task. This parameter is used to expand the total amount of ephemeral storage available, beyond the default amount, for tasks hosted on AWS Fargate. See Ephemeral Storage.
     */
    @JvmName("rouvxhuwyjiebmmt")
    public suspend fun ephemeralStorage(argument: suspend TaskDefinitionEphemeralStorageArgsBuilder.() -> Unit) {
        val toBeMapped = TaskDefinitionEphemeralStorageArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.ephemeralStorage = mapped
    }

    /**
     * @param value ARN of the task execution role that the Amazon ECS container agent and the Docker daemon can assume.
     */
    @JvmName("frdrbnedjtvitiin")
    public suspend fun executionRoleArn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.executionRoleArn = mapped
    }

    /**
     * @param value A unique name for your task definition.
     * The following arguments are optional:
     */
    @JvmName("oirivonmqnlouxkj")
    public suspend fun family(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.family = mapped
    }

    /**
     * @param value Configuration block(s) with Inference Accelerators settings. Detailed below.
     */
    @JvmName("yrwyahcxadehtqxh")
    public suspend fun inferenceAccelerators(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.inferenceAccelerators = mapped
    }

    /**
     * @param argument Configuration block(s) with Inference Accelerators settings. Detailed below.
     */
    @JvmName("qssdewprkqicrlkj")
    public suspend fun inferenceAccelerators(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            TaskDefinitionInferenceAcceleratorArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.inferenceAccelerators = mapped
    }

    /**
     * @param argument Configuration block(s) with Inference Accelerators settings. Detailed below.
     */
    @JvmName("jqftkadnnuvrjkib")
    public suspend fun inferenceAccelerators(vararg argument: suspend TaskDefinitionInferenceAcceleratorArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            TaskDefinitionInferenceAcceleratorArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.inferenceAccelerators = mapped
    }

    /**
     * @param argument Configuration block(s) with Inference Accelerators settings. Detailed below.
     */
    @JvmName("ecxinncehusmssji")
    public suspend fun inferenceAccelerators(argument: suspend TaskDefinitionInferenceAcceleratorArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            TaskDefinitionInferenceAcceleratorArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.inferenceAccelerators = mapped
    }

    /**
     * @param values Configuration block(s) with Inference Accelerators settings. Detailed below.
     */
    @JvmName("wslapvtdywwutyep")
    public suspend fun inferenceAccelerators(vararg values: TaskDefinitionInferenceAcceleratorArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.inferenceAccelerators = mapped
    }

    /**
     * @param value IPC resource namespace to be used for the containers in the task The valid values are `host`, `task`, and `none`.
     */
    @JvmName("yxxxkienwbcfspde")
    public suspend fun ipcMode(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ipcMode = mapped
    }

    /**
     * @param value Amount (in MiB) of memory used by the task. If the `requires_compatibilities` is `FARGATE` this field is required.
     */
    @JvmName("ynnhtqnwtaylcupk")
    public suspend fun memory(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.memory = mapped
    }

    /**
     * @param value Docker networking mode to use for the containers in the task. Valid values are `none`, `bridge`, `awsvpc`, and `host`.
     */
    @JvmName("mykvmrfukdswokxu")
    public suspend fun networkMode(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.networkMode = mapped
    }

    /**
     * @param value Process namespace to use for the containers in the task. The valid values are `host` and `task`.
     */
    @JvmName("dlbxwhnyytwjvkkb")
    public suspend fun pidMode(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.pidMode = mapped
    }

    /**
     * @param value Configuration block for rules that are taken into consideration during task placement. Maximum number of `placement_constraints` is `10`. Detailed below.
     */
    @JvmName("rvpdrcanlhumatph")
    public suspend fun placementConstraints(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.placementConstraints = mapped
    }

    /**
     * @param argument Configuration block for rules that are taken into consideration during task placement. Maximum number of `placement_constraints` is `10`. Detailed below.
     */
    @JvmName("ktqsgkokrqifxvhx")
    public suspend fun placementConstraints(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            TaskDefinitionPlacementConstraintArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.placementConstraints = mapped
    }

    /**
     * @param argument Configuration block for rules that are taken into consideration during task placement. Maximum number of `placement_constraints` is `10`. Detailed below.
     */
    @JvmName("rkmficoqgdemkfxr")
    public suspend fun placementConstraints(vararg argument: suspend TaskDefinitionPlacementConstraintArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            TaskDefinitionPlacementConstraintArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.placementConstraints = mapped
    }

    /**
     * @param argument Configuration block for rules that are taken into consideration during task placement. Maximum number of `placement_constraints` is `10`. Detailed below.
     */
    @JvmName("nejmreenkdlmoiae")
    public suspend fun placementConstraints(argument: suspend TaskDefinitionPlacementConstraintArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            TaskDefinitionPlacementConstraintArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.placementConstraints = mapped
    }

    /**
     * @param values Configuration block for rules that are taken into consideration during task placement. Maximum number of `placement_constraints` is `10`. Detailed below.
     */
    @JvmName("uxmpevcnyjlphtag")
    public suspend fun placementConstraints(vararg values: TaskDefinitionPlacementConstraintArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.placementConstraints = mapped
    }

    /**
     * @param value Configuration block for the App Mesh proxy. Detailed below.
     */
    @JvmName("hoaybyclqsfhtcew")
    public suspend fun proxyConfiguration(`value`: TaskDefinitionProxyConfigurationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.proxyConfiguration = mapped
    }

    /**
     * @param argument Configuration block for the App Mesh proxy. Detailed below.
     */
    @JvmName("rcsxuxndttnjtxdo")
    public suspend fun proxyConfiguration(argument: suspend TaskDefinitionProxyConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = TaskDefinitionProxyConfigurationArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.proxyConfiguration = mapped
    }

    /**
     * @param value Set of launch types required by the task. The valid values are `EC2` and `FARGATE`.
     */
    @JvmName("kcgcbkkyeewgmcai")
    public suspend fun requiresCompatibilities(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.requiresCompatibilities = mapped
    }

    /**
     * @param values Set of launch types required by the task. The valid values are `EC2` and `FARGATE`.
     */
    @JvmName("nsqbaarqbtdiyiwa")
    public suspend fun requiresCompatibilities(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.requiresCompatibilities = mapped
    }

    /**
     * @param value Configuration block for runtime_platform that containers in your task may use.
     */
    @JvmName("mxntjtyxkpcuxxiw")
    public suspend fun runtimePlatform(`value`: TaskDefinitionRuntimePlatformArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.runtimePlatform = mapped
    }

    /**
     * @param argument Configuration block for runtime_platform that containers in your task may use.
     */
    @JvmName("wghfobjkofiqcqgu")
    public suspend fun runtimePlatform(argument: suspend TaskDefinitionRuntimePlatformArgsBuilder.() -> Unit) {
        val toBeMapped = TaskDefinitionRuntimePlatformArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.runtimePlatform = mapped
    }

    /**
     * @param value Whether to retain the old revision when the resource is destroyed or replacement is necessary. Default is `false`.
     */
    @JvmName("jcryasuysriqnytp")
    public suspend fun skipDestroy(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.skipDestroy = 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("pbdlerqntdpjwmeg")
    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("iccjckvctflmedpo")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value ARN of IAM role that allows your Amazon ECS container task to make calls to other AWS services.
     */
    @JvmName("idvyvyvpohqcbfkf")
    public suspend fun taskRoleArn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.taskRoleArn = mapped
    }

    /**
     * @param value Whether should track latest `ACTIVE` task definition on AWS or the one created with the resource stored in state. Default is `false`. Useful in the event the task definition is modified outside of this resource.
     */
    @JvmName("khdenpiqblyjibev")
    public suspend fun trackLatest(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.trackLatest = mapped
    }

    /**
     * @param value Configuration block for volumes that containers in your task may use. Detailed below.
     */
    @JvmName("gqnnvpkevmmqmofk")
    public suspend fun volumes(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.volumes = mapped
    }

    /**
     * @param argument Configuration block for volumes that containers in your task may use. Detailed below.
     */
    @JvmName("cwsdbalbmshusuxt")
    public suspend fun volumes(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            TaskDefinitionVolumeArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.volumes = mapped
    }

    /**
     * @param argument Configuration block for volumes that containers in your task may use. Detailed below.
     */
    @JvmName("xkxxomjrjadixutp")
    public suspend fun volumes(vararg argument: suspend TaskDefinitionVolumeArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            TaskDefinitionVolumeArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.volumes = mapped
    }

    /**
     * @param argument Configuration block for volumes that containers in your task may use. Detailed below.
     */
    @JvmName("bhqimdwwxuvgfukv")
    public suspend fun volumes(argument: suspend TaskDefinitionVolumeArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TaskDefinitionVolumeArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.volumes = mapped
    }

    /**
     * @param values Configuration block for volumes that containers in your task may use. Detailed below.
     */
    @JvmName("rupkblmpqgrfxnqj")
    public suspend fun volumes(vararg values: TaskDefinitionVolumeArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.volumes = mapped
    }

    internal fun build(): TaskDefinitionArgs = TaskDefinitionArgs(
        containerDefinitions = containerDefinitions,
        cpu = cpu,
        ephemeralStorage = ephemeralStorage,
        executionRoleArn = executionRoleArn,
        family = family,
        inferenceAccelerators = inferenceAccelerators,
        ipcMode = ipcMode,
        memory = memory,
        networkMode = networkMode,
        pidMode = pidMode,
        placementConstraints = placementConstraints,
        proxyConfiguration = proxyConfiguration,
        requiresCompatibilities = requiresCompatibilities,
        runtimePlatform = runtimePlatform,
        skipDestroy = skipDestroy,
        tags = tags,
        taskRoleArn = taskRoleArn,
        trackLatest = trackLatest,
        volumes = volumes,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy