@awboost/cfn-resource-types 0.1.21 → 0.1.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/AWS-AppSync-ApiCache.d.ts +1 -0
- package/lib/AWS-AppSync-DataSource.d.ts +1 -0
- package/lib/AWS-AppSync-GraphQLApi.d.ts +10 -0
- package/lib/AWS-AppSync-Resolver.d.ts +1 -0
- package/lib/AWS-Batch-JobDefinition.d.ts +8 -0
- package/lib/AWS-CodePipeline-Pipeline.d.ts +29 -0
- package/lib/AWS-Cognito-UserPoolRiskConfigurationAttachment.d.ts +1 -8
- package/lib/AWS-ControlTower-EnabledBaseline.d.ts +80 -0
- package/lib/AWS-ControlTower-EnabledBaseline.js +12 -0
- package/lib/AWS-DynamoDB-Table.d.ts +9 -0
- package/lib/AWS-EC2-InstanceConnectEndpoint.d.ts +1 -1
- package/lib/AWS-EC2-NatGateway.d.ts +46 -4
- package/lib/AWS-EC2-NatGateway.js +5 -1
- package/lib/AWS-EC2-PrefixList.d.ts +1 -1
- package/lib/AWS-EC2-Subnet.d.ts +6 -0
- package/lib/AWS-EC2-SubnetRouteTableAssociation.d.ts +11 -2
- package/lib/AWS-EC2-SubnetRouteTableAssociation.js +2 -1
- package/lib/AWS-EC2-VPC.d.ts +30 -31
- package/lib/AWS-EC2-VPC.js +4 -1
- package/lib/AWS-ECS-TaskDefinition.d.ts +641 -25
- package/lib/AWS-ECS-TaskDefinition.js +3 -1
- package/lib/AWS-EMR-Cluster.d.ts +1 -0
- package/lib/AWS-GuardDuty-Master.d.ts +14 -9
- package/lib/AWS-GuardDuty-Master.js +2 -1
- package/lib/AWS-IAM-User.d.ts +43 -25
- package/lib/AWS-IAM-User.js +3 -1
- package/lib/AWS-IoTWireless-WirelessDevice.d.ts +34 -0
- package/lib/AWS-KMS-Alias.d.ts +25 -11
- package/lib/AWS-KMS-Alias.js +3 -1
- package/lib/AWS-KMS-Key.d.ts +62 -28
- package/lib/AWS-KMS-Key.js +3 -1
- package/lib/AWS-Route53-RecordSet.d.ts +19 -0
- package/lib/AWS-Route53-RecordSetGroup.d.ts +19 -0
- package/lib/AWS-S3-Bucket.d.ts +381 -139
- package/lib/AWS-S3-Bucket.js +3 -1
- package/lib/AWS-S3-BucketPolicy.d.ts +15 -3
- package/lib/AWS-S3-BucketPolicy.js +7 -1
- package/lib/AWS-SageMaker-AppImageConfig.d.ts +1 -1
- package/package.json +1 -1
|
@@ -2,26 +2,113 @@ import { Resource as $Resource } from "@awboost/cfn-template-builder/template/re
|
|
|
2
2
|
import type { ResourceOptions as $ResourceOptions } from "@awboost/cfn-template-builder/template";
|
|
3
3
|
/**
|
|
4
4
|
* Resource type definition for `AWS::ECS::TaskDefinition`.
|
|
5
|
-
*
|
|
5
|
+
* Registers a new task definition from the supplied ``family`` and ``containerDefinitions``. Optionally, you can add data volumes to your containers with the ``volumes`` parameter. For more information about task definition parameters and defaults, see [Amazon ECS Task Definitions](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_defintions.html) in the *Amazon Elastic Container Service Developer Guide*.
|
|
6
|
+
You can specify a role for your task with the ``taskRoleArn`` parameter. When you specify a role for a task, its containers can then use the latest versions of the CLI or SDKs to make API requests to the AWS services that are specified in the policy that's associated with the role. For more information, see [IAM Roles for Tasks](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html) in the *Amazon Elastic Container Service Developer Guide*.
|
|
7
|
+
You can specify a Docker networking mode for the containers in your task definition with the ``networkMod
|
|
6
8
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-taskdefinition.html}
|
|
7
9
|
*/
|
|
8
10
|
export type ECSTaskDefinitionProperties = {
|
|
11
|
+
/**
|
|
12
|
+
* A list of container definitions in JSON format that describe the different containers that make up your task. For more information about container definition parameters and defaults, see [Amazon ECS Task Definitions](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_defintions.html) in the *Amazon Elastic Container Service Developer Guide*.
|
|
13
|
+
*/
|
|
9
14
|
ContainerDefinitions?: ContainerDefinition[];
|
|
15
|
+
/**
|
|
16
|
+
* The number of ``cpu`` units used by the task. If you use the EC2 launch type, this field is optional. Any value can be used. If you use the Fargate launch type, this field is required. You must use one of the following values. The value that you choose determines your range of valid values for the ``memory`` parameter.
|
|
17
|
+
The CPU units cannot be less than 1 vCPU when you use Windows containers on Fargate.
|
|
18
|
+
+ 256 (.25 vCPU) - Available ``memory`` values: 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB)
|
|
19
|
+
+ 512 (.5 vCPU) - Available ``memory`` values: 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB)
|
|
20
|
+
+ 1024 (1 vCPU) - Available ``memory`` values: 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB)
|
|
21
|
+
+ 2048 (2 vCPU) - Available ``memory`` values: 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB)
|
|
22
|
+
+ 4096 (4 vCPU) - Available ``memory`` values: 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB)
|
|
23
|
+
+ 8192 (8 vCPU) - Available ``memory`` va
|
|
24
|
+
*/
|
|
10
25
|
Cpu?: string;
|
|
26
|
+
/**
|
|
27
|
+
* The ephemeral storage settings to use for tasks run with the task definition.
|
|
28
|
+
*/
|
|
11
29
|
EphemeralStorage?: EphemeralStorage;
|
|
30
|
+
/**
|
|
31
|
+
* The Amazon Resource Name (ARN) of the task execution role that grants the Amazon ECS container agent permission to make AWS API calls on your behalf. The task execution IAM role is required depending on the requirements of your task. For more information, see [Amazon ECS task execution IAM role](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_execution_IAM_role.html) in the *Amazon Elastic Container Service Developer Guide*.
|
|
32
|
+
*/
|
|
12
33
|
ExecutionRoleArn?: string;
|
|
34
|
+
/**
|
|
35
|
+
* The name of a family that this task definition is registered to. Up to 255 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed.
|
|
36
|
+
A family groups multiple versions of a task definition. Amazon ECS gives the first task definition that you registered to a family a revision number of 1. Amazon ECS gives sequential revision numbers to each task definition that you add.
|
|
37
|
+
To use revision numbers when you update a task definition, specify this property. If you don't specify a value, CFNlong generates a new task definition each time that you update it.
|
|
38
|
+
*/
|
|
13
39
|
Family?: string;
|
|
40
|
+
/**
|
|
41
|
+
* The Elastic Inference accelerators to use for the containers in the task.
|
|
42
|
+
*/
|
|
14
43
|
InferenceAccelerators?: InferenceAccelerator[];
|
|
44
|
+
/**
|
|
45
|
+
* The IPC resource namespace to use for the containers in the task. The valid values are ``host``, ``task``, or ``none``. If ``host`` is specified, then all containers within the tasks that specified the ``host`` IPC mode on the same container instance share the same IPC resources with the host Amazon EC2 instance. If ``task`` is specified, all containers within the specified task share the same IPC resources. If ``none`` is specified, then IPC resources within the containers of a task are private and not shared with other containers in a task or on the container instance. If no value is specified, then the IPC resource namespace sharing depends on the Docker daemon setting on the container instance. For more information, see [IPC settings](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#ipc-settings---ipc) in the *Docker run reference*.
|
|
46
|
+
If the ``host`` IPC mode is used, be aware that there is a heightened risk of undesired IPC namespace expose. For more inform
|
|
47
|
+
*/
|
|
15
48
|
IpcMode?: string;
|
|
49
|
+
/**
|
|
50
|
+
* The amount (in MiB) of memory used by the task.
|
|
51
|
+
If your tasks runs on Amazon EC2 instances, you must specify either a task-level memory value or a container-level memory value. This field is optional and any value can be used. If a task-level memory value is specified, the container-level memory value is optional. For more information regarding container-level memory and memory reservation, see [ContainerDefinition](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ContainerDefinition.html).
|
|
52
|
+
If your tasks runs on FARGATElong, this field is required. You must use one of the following values. The value you choose determines your range of valid values for the ``cpu`` parameter.
|
|
53
|
+
+ 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available ``cpu`` values: 256 (.25 vCPU)
|
|
54
|
+
+ 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available ``cpu`` values: 512 (.5 vCPU)
|
|
55
|
+
+ 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) - Available ``cpu`` va
|
|
56
|
+
*/
|
|
16
57
|
Memory?: string;
|
|
58
|
+
/**
|
|
59
|
+
* The Docker networking mode to use for the containers in the task. The valid values are ``none``, ``bridge``, ``awsvpc``, and ``host``. If no network mode is specified, the default is ``bridge``.
|
|
60
|
+
For Amazon ECS tasks on Fargate, the ``awsvpc`` network mode is required. For Amazon ECS tasks on Amazon EC2 Linux instances, any network mode can be used. For Amazon ECS tasks on Amazon EC2 Windows instances, ``<default>`` or ``awsvpc`` can be used. If the network mode is set to ``none``, you cannot specify port mappings in your container definitions, and the tasks containers do not have external connectivity. The ``host`` and ``awsvpc`` network modes offer the highest networking performance for containers because they use the EC2 network stack instead of the virtualized network stack provided by the ``bridge`` mode.
|
|
61
|
+
With the ``host`` and ``awsvpc`` network modes, exposed container ports are mapped directly to the corresponding host port (for the ``host`` network mode) or the attached elasti
|
|
62
|
+
*/
|
|
17
63
|
NetworkMode?: string;
|
|
64
|
+
/**
|
|
65
|
+
* The process namespace to use for the containers in the task. The valid values are ``host`` or ``task``. On Fargate for Linux containers, the only valid value is ``task``. For example, monitoring sidecars might need ``pidMode`` to access information about other containers running in the same task.
|
|
66
|
+
If ``host`` is specified, all containers within the tasks that specified the ``host`` PID mode on the same container instance share the same process namespace with the host Amazon EC2 instance.
|
|
67
|
+
If ``task`` is specified, all containers within the specified task share the same process namespace.
|
|
68
|
+
If no value is specified, the default is a private namespace for each container. For more information, see [PID settings](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#pid-settings---pid) in the *Docker run reference*.
|
|
69
|
+
If the ``host`` PID mode is used, there's a heightened risk of undesired process namespace exposure. For more information, see [Docker security](https://doc
|
|
70
|
+
*/
|
|
18
71
|
PidMode?: string;
|
|
72
|
+
/**
|
|
73
|
+
* An array of placement constraint objects to use for tasks.
|
|
74
|
+
This parameter isn't supported for tasks run on FARGATElong.
|
|
75
|
+
*/
|
|
19
76
|
PlacementConstraints?: TaskDefinitionPlacementConstraint[];
|
|
77
|
+
/**
|
|
78
|
+
* The configuration details for the App Mesh proxy.
|
|
79
|
+
Your Amazon ECS container instances require at least version 1.26.0 of the container agent and at least version 1.26.0-1 of the ``ecs-init`` package to use a proxy configuration. If your container instances are launched from the Amazon ECS optimized AMI version ``20190301`` or later, they contain the required versions of the container agent and ``ecs-init``. For more information, see [Amazon ECS-optimized Linux AMI](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html) in the *Amazon Elastic Container Service Developer Guide*.
|
|
80
|
+
*/
|
|
20
81
|
ProxyConfiguration?: ProxyConfiguration;
|
|
82
|
+
/**
|
|
83
|
+
* The task launch types the task definition was validated against. The valid values are ``EC2``, ``FARGATE``, and ``EXTERNAL``. For more information, see [Amazon ECS launch types](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) in the *Amazon Elastic Container Service Developer Guide*.
|
|
84
|
+
*/
|
|
21
85
|
RequiresCompatibilities?: string[];
|
|
86
|
+
/**
|
|
87
|
+
* The operating system that your tasks definitions run on. A platform family is specified only for tasks using the Fargate launch type.
|
|
88
|
+
When you specify a task definition in a service, this value must match the ``runtimePlatform`` value of the service.
|
|
89
|
+
*/
|
|
22
90
|
RuntimePlatform?: RuntimePlatform;
|
|
91
|
+
/**
|
|
92
|
+
* The metadata that you apply to the task definition to help you categorize and organize them. Each tag consists of a key and an optional value. You define both of them.
|
|
93
|
+
The following basic restrictions apply to tags:
|
|
94
|
+
+ Maximum number of tags per resource - 50
|
|
95
|
+
+ For each resource, each tag key must be unique, and each tag key can have only one value.
|
|
96
|
+
+ Maximum key length - 128 Unicode characters in UTF-8
|
|
97
|
+
+ Maximum value length - 256 Unicode characters in UTF-8
|
|
98
|
+
+ If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
|
|
99
|
+
+ Tag keys and values are case-sensitive.
|
|
100
|
+
+ Do not use ``aws:``, ``AWS:``, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for AWS use. You cannot edit or delete tag keys or values
|
|
101
|
+
*/
|
|
23
102
|
Tags?: Tag[];
|
|
103
|
+
/**
|
|
104
|
+
* The short name or full Amazon Resource Name (ARN) of the IAMlong role that grants containers in the task permission to call AWS APIs on your behalf. For more information, see [Amazon ECS Task Role](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html) in the *Amazon Elastic Container Service Developer Guide*.
|
|
105
|
+
IAM roles for tasks on Windows require that the ``-EnableTaskIAMRole`` option is set when you launch the Amazon ECS-optimized Windows AMI. Your containers must also run some configuration code to use the feature. For more information, see [Windows IAM roles for tasks](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/windows_task_IAM_roles.html) in the *Amazon Elastic Container Service Developer Guide*.
|
|
106
|
+
*/
|
|
24
107
|
TaskRoleArn?: string;
|
|
108
|
+
/**
|
|
109
|
+
* The list of data volume definitions for the task. For more information, see [Using data volumes in tasks](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_data_volumes.html) in the *Amazon Elastic Container Service Developer Guide*.
|
|
110
|
+
The ``host`` and ``sourcePath`` parameters aren't supported for tasks run on FARGATElong.
|
|
111
|
+
*/
|
|
25
112
|
Volumes?: Volume[];
|
|
26
113
|
};
|
|
27
114
|
/**
|
|
@@ -29,362 +116,891 @@ export type ECSTaskDefinitionProperties = {
|
|
|
29
116
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-taskdefinition.html#aws-resource-ecs-taskdefinition-return-values}
|
|
30
117
|
*/
|
|
31
118
|
export type ECSTaskDefinitionAttributes = {
|
|
32
|
-
/**
|
|
33
|
-
* The Amazon Resource Name (ARN) of the Amazon ECS task definition
|
|
34
|
-
*/
|
|
35
119
|
TaskDefinitionArn: string;
|
|
36
120
|
};
|
|
37
121
|
/**
|
|
38
122
|
* Type definition for `AWS::ECS::TaskDefinition.AuthorizationConfig`.
|
|
123
|
+
* The authorization configuration details for the Amazon EFS file system.
|
|
39
124
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-authorizationconfig.html}
|
|
40
125
|
*/
|
|
41
126
|
export type AuthorizationConfig = {
|
|
127
|
+
/**
|
|
128
|
+
* The Amazon EFS access point ID to use. If an access point is specified, the root directory value specified in the ``EFSVolumeConfiguration`` must either be omitted or set to ``/`` which will enforce the path set on the EFS access point. If an access point is used, transit encryption must be on in the ``EFSVolumeConfiguration``. For more information, see [Working with Amazon EFS access points](https://docs.aws.amazon.com/efs/latest/ug/efs-access-points.html) in the *Amazon Elastic File System User Guide*.
|
|
129
|
+
*/
|
|
42
130
|
AccessPointId?: string;
|
|
131
|
+
/**
|
|
132
|
+
* Determines whether to use the Amazon ECS task role defined in a task definition when mounting the Amazon EFS file system. If it is turned on, transit encryption must be turned on in the ``EFSVolumeConfiguration``. If this parameter is omitted, the default value of ``DISABLED`` is used. For more information, see [Using Amazon EFS access points](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/efs-volumes.html#efs-volume-accesspoints) in the *Amazon Elastic Container Service Developer Guide*.
|
|
133
|
+
*/
|
|
43
134
|
IAM?: "ENABLED" | "DISABLED";
|
|
44
135
|
};
|
|
45
136
|
/**
|
|
46
137
|
* Type definition for `AWS::ECS::TaskDefinition.ContainerDefinition`.
|
|
47
|
-
*
|
|
138
|
+
* The ``ContainerDefinition`` property specifies a container definition. Container definitions are used in task definitions to describe the different containers that are launched as part of a task.
|
|
48
139
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-containerdefinition.html}
|
|
49
140
|
*/
|
|
50
141
|
export type ContainerDefinition = {
|
|
142
|
+
/**
|
|
143
|
+
* The command that's passed to the container. This parameter maps to ``Cmd`` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the ``COMMAND`` parameter to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration). For more information, see [https://docs.docker.com/engine/reference/builder/#cmd](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/builder/#cmd). If there are multiple arguments, each argument is a separated string in the array.
|
|
144
|
+
*/
|
|
51
145
|
Command?: string[];
|
|
146
|
+
/**
|
|
147
|
+
* The number of ``cpu`` units reserved for the container. This parameter maps to ``CpuShares`` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the ``--cpu-shares`` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration).
|
|
148
|
+
This field is optional for tasks using the Fargate launch type, and the only requirement is that the total amount of CPU reserved for all containers within a task be lower than the task-level ``cpu`` value.
|
|
149
|
+
You can determine the number of CPU units that are available per EC2 instance type by multiplying the vCPUs listed for that instance type on the [Amazon EC2 Instances](https://docs.aws.amazon.com/ec2/instance-types/) detail page by 1,024.
|
|
150
|
+
Linux containers share unallocated CPU units with other containers on the cont
|
|
151
|
+
*/
|
|
52
152
|
Cpu?: number;
|
|
153
|
+
/**
|
|
154
|
+
* A list of ARNs in SSM or Amazon S3 to a credential spec (``CredSpec``) file that configures the container for Active Directory authentication. We recommend that you use this parameter instead of the ``dockerSecurityOptions``. The maximum number of ARNs is 1.
|
|
155
|
+
There are two formats for each ARN.
|
|
156
|
+
+ credentialspecdomainless:MyARN You use credentialspecdomainless:MyARN to provide a CredSpec with an additional section for a secret in . You provide the login credentials to the domain in the secret. Each task that runs on any container instance can join different domains. You can use this format without joining the container instance to a domain. + credentialspec:MyARN You use credentialspec:MyARN to provide a CredSpec for a single domain. You must join the container instance to the domain before you start any tasks that use this task definition.
|
|
157
|
+
In both formats, replace ``MyARN`` with the ARN in SSM or Amazon S3.
|
|
158
|
+
If you provide a ``credentialspecdomainless:MyARN``, the ``credspec`` must
|
|
159
|
+
*/
|
|
53
160
|
CredentialSpecs?: string[];
|
|
161
|
+
/**
|
|
162
|
+
* The dependencies defined for container startup and shutdown. A container can contain multiple dependencies. When a dependency is defined for container startup, for container shutdown it is reversed.
|
|
163
|
+
For tasks using the EC2 launch type, the container instances require at least version 1.26.0 of the container agent to turn on container dependencies. However, we recommend using the latest container agent version. For information about checking your agent version and updating to the latest version, see [Updating the Amazon ECS Container Agent](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-update.html) in the *Amazon Elastic Container Service Developer Guide*. If you're using an Amazon ECS-optimized Linux AMI, your instance needs at least version 1.26.0-1 of the ``ecs-init`` package. If your container instances are launched from version ``20190301`` or later, then they contain the required versions of the container agent and ``ecs-init``. For more information, see [
|
|
164
|
+
*/
|
|
54
165
|
DependsOn?: ContainerDependency[];
|
|
166
|
+
/**
|
|
167
|
+
* When this parameter is true, networking is off within the container. This parameter maps to ``NetworkDisabled`` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/).
|
|
168
|
+
This parameter is not supported for Windows containers.
|
|
169
|
+
*/
|
|
55
170
|
DisableNetworking?: boolean;
|
|
171
|
+
/**
|
|
172
|
+
* A list of DNS search domains that are presented to the container. This parameter maps to ``DnsSearch`` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the ``--dns-search`` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration).
|
|
173
|
+
This parameter is not supported for Windows containers.
|
|
174
|
+
*/
|
|
56
175
|
DnsSearchDomains?: string[];
|
|
176
|
+
/**
|
|
177
|
+
* A list of DNS servers that are presented to the container. This parameter maps to ``Dns`` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the ``--dns`` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration).
|
|
178
|
+
This parameter is not supported for Windows containers.
|
|
179
|
+
*/
|
|
57
180
|
DnsServers?: string[];
|
|
181
|
+
/**
|
|
182
|
+
* A key/value map of labels to add to the container. This parameter maps to ``Labels`` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the ``--label`` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration). This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log in to your container instance and run the following command: ``sudo docker version --format '{{.Server.APIVersion}}'``
|
|
183
|
+
*/
|
|
58
184
|
DockerLabels?: Record<string, string>;
|
|
185
|
+
/**
|
|
186
|
+
* A list of strings to provide custom configuration for multiple security systems. For more information about valid values, see [Docker Run Security Configuration](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration). This field isn't valid for containers in tasks using the Fargate launch type.
|
|
187
|
+
For Linux tasks on EC2, this parameter can be used to reference custom labels for SELinux and AppArmor multi-level security systems.
|
|
188
|
+
For any tasks on EC2, this parameter can be used to reference a credential spec file that configures a container for Active Directory authentication. For more information, see [Using gMSAs for Windows Containers](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/windows-gmsa.html) and [Using gMSAs for Linux Containers](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/linux-gmsa.html) in the *Amazon Elastic Container Service Developer Guide*.
|
|
189
|
+
This parameter maps to ``SecurityOpt`` in the [Create a co
|
|
190
|
+
*/
|
|
59
191
|
DockerSecurityOptions?: string[];
|
|
192
|
+
/**
|
|
193
|
+
* Early versions of the Amazon ECS container agent don't properly handle ``entryPoint`` parameters. If you have problems using ``entryPoint``, update your container agent or enter your commands and arguments as ``command`` array items instead.
|
|
194
|
+
The entry point that's passed to the container. This parameter maps to ``Entrypoint`` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the ``--entrypoint`` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration). For more information, see [https://docs.docker.com/engine/reference/builder/#entrypoint](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/builder/#entrypoint).
|
|
195
|
+
*/
|
|
60
196
|
EntryPoint?: string[];
|
|
61
197
|
/**
|
|
62
|
-
|
|
63
|
-
|
|
198
|
+
* The environment variables to pass to a container. This parameter maps to ``Env`` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the ``--env`` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration).
|
|
199
|
+
We don't recommend that you use plaintext environment variables for sensitive information, such as credential data.
|
|
200
|
+
*/
|
|
64
201
|
Environment?: KeyValuePair[];
|
|
65
202
|
/**
|
|
66
|
-
|
|
67
|
-
|
|
203
|
+
* A list of files containing the environment variables to pass to a container. This parameter maps to the ``--env-file`` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration).
|
|
204
|
+
You can specify up to ten environment files. The file must have a ``.env`` file extension. Each line in an environment file contains an environment variable in ``VARIABLE=VALUE`` format. Lines beginning with ``#`` are treated as comments and are ignored. For more information about the environment variable file syntax, see [Declare default environment variables in file](https://docs.aws.amazon.com/https://docs.docker.com/compose/env-file/).
|
|
205
|
+
If there are environment variables specified using the ``environment`` parameter in a container definition, they take precedence over the variables contained within an environment file. If multiple environment files are specified that contain the same variable, they're processed from the top down. We recommend t
|
|
206
|
+
*/
|
|
68
207
|
EnvironmentFiles?: EnvironmentFile[];
|
|
208
|
+
/**
|
|
209
|
+
* If the ``essential`` parameter of a container is marked as ``true``, and that container fails or stops for any reason, all other containers that are part of the task are stopped. If the ``essential`` parameter of a container is marked as ``false``, its failure doesn't affect the rest of the containers in a task. If this parameter is omitted, a container is assumed to be essential.
|
|
210
|
+
All tasks must have at least one essential container. If you have an application that's composed of multiple containers, group containers that are used for a common purpose into components, and separate the different components into multiple task definitions. For more information, see [Application Architecture](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/application_architecture.html) in the *Amazon Elastic Container Service Developer Guide*.
|
|
211
|
+
*/
|
|
69
212
|
Essential?: boolean;
|
|
213
|
+
/**
|
|
214
|
+
* A list of hostnames and IP address mappings to append to the ``/etc/hosts`` file on the container. This parameter maps to ``ExtraHosts`` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the ``--add-host`` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration).
|
|
215
|
+
This parameter isn't supported for Windows containers or tasks that use the ``awsvpc`` network mode.
|
|
216
|
+
*/
|
|
70
217
|
ExtraHosts?: HostEntry[];
|
|
218
|
+
/**
|
|
219
|
+
* The FireLens configuration for the container. This is used to specify and configure a log router for container logs. For more information, see [Custom Log Routing](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_firelens.html) in the *Amazon Elastic Container Service Developer Guide*.
|
|
220
|
+
*/
|
|
71
221
|
FirelensConfiguration?: FirelensConfiguration;
|
|
72
222
|
/**
|
|
73
|
-
* The health check command and associated configuration parameters for the container.
|
|
223
|
+
* The container health check command and associated configuration parameters for the container. This parameter maps to ``HealthCheck`` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the ``HEALTHCHECK`` parameter of [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration).
|
|
74
224
|
*/
|
|
75
225
|
HealthCheck?: HealthCheck;
|
|
226
|
+
/**
|
|
227
|
+
* The hostname to use for your container. This parameter maps to ``Hostname`` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the ``--hostname`` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration).
|
|
228
|
+
The ``hostname`` parameter is not supported if you're using the ``awsvpc`` network mode.
|
|
229
|
+
*/
|
|
76
230
|
Hostname?: string;
|
|
77
231
|
/**
|
|
78
|
-
|
|
79
|
-
|
|
232
|
+
* The image used to start a container. This string is passed directly to the Docker daemon. By default, images in the Docker Hub registry are available. Other repositories are specified with either ``repository-url/image:tag`` or ``repository-url/image@digest``. Up to 255 letters (uppercase and lowercase), numbers, hyphens, underscores, colons, periods, forward slashes, and number signs are allowed. This parameter maps to ``Image`` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the ``IMAGE`` parameter of [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration).
|
|
233
|
+
+ When a new task starts, the Amazon ECS container agent pulls the latest version of the specified image and tag for the container to use. However, subsequent updates to a repository image
|
|
234
|
+
*/
|
|
80
235
|
Image: string;
|
|
236
|
+
/**
|
|
237
|
+
* When this parameter is ``true``, you can deploy containerized applications that require ``stdin`` or a ``tty`` to be allocated. This parameter maps to ``OpenStdin`` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the ``--interactive`` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration).
|
|
238
|
+
*/
|
|
81
239
|
Interactive?: boolean;
|
|
240
|
+
/**
|
|
241
|
+
* The ``links`` parameter allows containers to communicate with each other without the need for port mappings. This parameter is only supported if the network mode of a task definition is ``bridge``. The ``name:internalName`` construct is analogous to ``name:alias`` in Docker links. Up to 255 letters (uppercase and lowercase), numbers, underscores, and hyphens are allowed. For more information about linking Docker containers, go to [Legacy container links](https://docs.aws.amazon.com/https://docs.docker.com/network/links/) in the Docker documentation. This parameter maps to ``Links`` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the ``--link`` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration).
|
|
242
|
+
This parameter is not supported for W
|
|
243
|
+
*/
|
|
82
244
|
Links?: string[];
|
|
245
|
+
/**
|
|
246
|
+
* Linux-specific modifications that are applied to the container, such as Linux kernel capabilities. For more information see [KernelCapabilities](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_KernelCapabilities.html).
|
|
247
|
+
This parameter is not supported for Windows containers.
|
|
248
|
+
*/
|
|
83
249
|
LinuxParameters?: LinuxParameters;
|
|
250
|
+
/**
|
|
251
|
+
* The log configuration specification for the container.
|
|
252
|
+
This parameter maps to ``LogConfig`` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the ``--log-driver`` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/). By default, containers use the same logging driver that the Docker daemon uses. However, the container may use a different logging driver than the Docker daemon by specifying a log driver with this parameter in the container definition. To use a different logging driver for a container, the log system must be configured properly on the container instance (or on a different log server for remote logging options). For more information on the options for different supported log drivers, see [Configure logging drivers](https://docs.aws.amazon.com/htt
|
|
253
|
+
*/
|
|
84
254
|
LogConfiguration?: LogConfiguration;
|
|
85
255
|
/**
|
|
86
|
-
|
|
87
|
-
|
|
256
|
+
* The amount (in MiB) of memory to present to the container. If your container attempts to exceed the memory specified here, the container is killed. The total amount of memory reserved for all containers within a task must be lower than the task ``memory`` value, if one is specified. This parameter maps to ``Memory`` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the ``--memory`` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration).
|
|
257
|
+
If using the Fargate launch type, this parameter is optional.
|
|
258
|
+
If using the EC2 launch type, you must specify either a task-level memory value or a container-level memory value. If you specify both a container-level ``memory`` and ``memoryReservation`` value, ``memory`` must be greater than ``memoryReserva
|
|
259
|
+
*/
|
|
88
260
|
Memory?: number;
|
|
261
|
+
/**
|
|
262
|
+
* The soft limit (in MiB) of memory to reserve for the container. When system memory is under heavy contention, Docker attempts to keep the container memory to this soft limit. However, your container can consume more memory when it needs to, up to either the hard limit specified with the ``memory`` parameter (if applicable), or all of the available memory on the container instance, whichever comes first. This parameter maps to ``MemoryReservation`` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the ``--memory-reservation`` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration).
|
|
263
|
+
If a task-level memory value is not specified, you must specify a non-zero integer for one or both of ``memory`` or ``memoryReservation`` in a container definiti
|
|
264
|
+
*/
|
|
89
265
|
MemoryReservation?: number;
|
|
266
|
+
/**
|
|
267
|
+
* The mount points for data volumes in your container.
|
|
268
|
+
This parameter maps to ``Volumes`` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the ``--volume`` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration).
|
|
269
|
+
Windows containers can mount whole directories on the same drive as ``$env:ProgramData``. Windows containers can't mount directories on a different drive, and mount point can't be across drives.
|
|
270
|
+
*/
|
|
90
271
|
MountPoints?: MountPoint[];
|
|
91
272
|
/**
|
|
92
|
-
* The name of a container. Up to 255 letters (uppercase and lowercase), numbers,
|
|
273
|
+
* The name of a container. If you're linking multiple containers together in a task definition, the ``name`` of one container can be entered in the ``links`` of another container to connect the containers. Up to 255 letters (uppercase and lowercase), numbers, underscores, and hyphens are allowed. This parameter maps to ``name`` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the ``--name`` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration).
|
|
93
274
|
*/
|
|
94
275
|
Name: string;
|
|
95
276
|
/**
|
|
96
|
-
|
|
97
|
-
|
|
277
|
+
* The list of port mappings for the container. Port mappings allow containers to access ports on the host container instance to send or receive traffic.
|
|
278
|
+
For task definitions that use the ``awsvpc`` network mode, you should only specify the ``containerPort``. The ``hostPort`` can be left blank or it must be the same value as the ``containerPort``.
|
|
279
|
+
Port mappings on Windows use the ``NetNAT`` gateway address rather than ``localhost``. There is no loopback for port mappings on Windows, so you cannot access a container's mapped port from the host itself.
|
|
280
|
+
This parameter maps to ``PortBindings`` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the ``--publish`` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/). If the network mode of a task definition is set to
|
|
281
|
+
*/
|
|
98
282
|
PortMappings?: PortMapping[];
|
|
283
|
+
/**
|
|
284
|
+
* When this parameter is true, the container is given elevated privileges on the host container instance (similar to the ``root`` user). This parameter maps to ``Privileged`` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the ``--privileged`` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration).
|
|
285
|
+
This parameter is not supported for Windows containers or tasks run on FARGATElong.
|
|
286
|
+
*/
|
|
99
287
|
Privileged?: boolean;
|
|
288
|
+
/**
|
|
289
|
+
* When this parameter is ``true``, a TTY is allocated. This parameter maps to ``Tty`` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the ``--tty`` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration).
|
|
290
|
+
*/
|
|
100
291
|
PseudoTerminal?: boolean;
|
|
292
|
+
/**
|
|
293
|
+
* When this parameter is true, the container is given read-only access to its root file system. This parameter maps to ``ReadonlyRootfs`` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the ``--read-only`` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration).
|
|
294
|
+
This parameter is not supported for Windows containers.
|
|
295
|
+
*/
|
|
101
296
|
ReadonlyRootFilesystem?: boolean;
|
|
297
|
+
/**
|
|
298
|
+
* The private repository authentication credentials to use.
|
|
299
|
+
*/
|
|
102
300
|
RepositoryCredentials?: RepositoryCredentials;
|
|
301
|
+
/**
|
|
302
|
+
* The type and amount of a resource to assign to a container. The only supported resource is a GPU.
|
|
303
|
+
*/
|
|
103
304
|
ResourceRequirements?: ResourceRequirement[];
|
|
305
|
+
/**
|
|
306
|
+
* The secrets to pass to the container. For more information, see [Specifying Sensitive Data](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/specifying-sensitive-data.html) in the *Amazon Elastic Container Service Developer Guide*.
|
|
307
|
+
*/
|
|
104
308
|
Secrets?: Secret[];
|
|
309
|
+
/**
|
|
310
|
+
* Time duration (in seconds) to wait before giving up on resolving dependencies for a container. For example, you specify two containers in a task definition with containerA having a dependency on containerB reaching a ``COMPLETE``, ``SUCCESS``, or ``HEALTHY`` status. If a ``startTimeout`` value is specified for containerB and it doesn't reach the desired status within that time then containerA gives up and not start. This results in the task transitioning to a ``STOPPED`` state.
|
|
311
|
+
When the ``ECS_CONTAINER_START_TIMEOUT`` container agent configuration variable is used, it's enforced independently from this start timeout value.
|
|
312
|
+
For tasks using the Fargate launch type, the task or service requires the following platforms:
|
|
313
|
+
+ Linux platform version ``1.3.0`` or later.
|
|
314
|
+
+ Windows platform version ``1.0.0`` or later.
|
|
315
|
+
|
|
316
|
+
For tasks using the EC2 launch type, your container instances require at least version ``1.26.0`` of the container agent to use a container start timeout value. However
|
|
317
|
+
*/
|
|
105
318
|
StartTimeout?: number;
|
|
319
|
+
/**
|
|
320
|
+
* Time duration (in seconds) to wait before the container is forcefully killed if it doesn't exit normally on its own.
|
|
321
|
+
For tasks using the Fargate launch type, the task or service requires the following platforms:
|
|
322
|
+
+ Linux platform version ``1.3.0`` or later.
|
|
323
|
+
+ Windows platform version ``1.0.0`` or later.
|
|
324
|
+
|
|
325
|
+
The max stop timeout value is 120 seconds and if the parameter is not specified, the default value of 30 seconds is used.
|
|
326
|
+
For tasks that use the EC2 launch type, if the ``stopTimeout`` parameter isn't specified, the value set for the Amazon ECS container agent configuration variable ``ECS_CONTAINER_STOP_TIMEOUT`` is used. If neither the ``stopTimeout`` parameter or the ``ECS_CONTAINER_STOP_TIMEOUT`` agent configuration variable are set, then the default values of 30 seconds for Linux containers and 30 seconds on Windows containers are used. Your container instances require at least version 1.26.0 of the container agent to use a container stop timeout value. However, we recomm
|
|
327
|
+
*/
|
|
106
328
|
StopTimeout?: number;
|
|
329
|
+
/**
|
|
330
|
+
* A list of namespaced kernel parameters to set in the container. This parameter maps to ``Sysctls`` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the ``--sysctl`` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration). For example, you can configure ``net.ipv4.tcp_keepalive_time`` setting to maintain longer lived connections.
|
|
331
|
+
*/
|
|
107
332
|
SystemControls?: SystemControl[];
|
|
333
|
+
/**
|
|
334
|
+
* A list of ``ulimits`` to set in the container. This parameter maps to ``Ulimits`` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the ``--ulimit`` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/). Valid naming values are displayed in the [Ulimit](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_Ulimit.html) data type. This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log in to your container instance and run the following command: ``sudo docker version --format '{{.Server.APIVersion}}'``
|
|
335
|
+
This parameter is not supported for Windows containers.
|
|
336
|
+
*/
|
|
108
337
|
Ulimits?: Ulimit[];
|
|
338
|
+
/**
|
|
339
|
+
* The user to use inside the container. This parameter maps to ``User`` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the ``--user`` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration).
|
|
340
|
+
When running tasks using the ``host`` network mode, don't run containers using the root user (UID 0). We recommend using a non-root user for better security.
|
|
341
|
+
You can specify the ``user`` using the following formats. If specifying a UID or GID, you must specify it as a positive integer.
|
|
342
|
+
+ ``user``
|
|
343
|
+
+ ``user:group``
|
|
344
|
+
+ ``uid``
|
|
345
|
+
+ ``uid:gid``
|
|
346
|
+
+ ``user:gid``
|
|
347
|
+
+ ``uid:group``
|
|
348
|
+
|
|
349
|
+
This parameter is not supported for Windows containers.
|
|
350
|
+
*/
|
|
109
351
|
User?: string;
|
|
352
|
+
/**
|
|
353
|
+
* Data volumes to mount from another container. This parameter maps to ``VolumesFrom`` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the ``--volumes-from`` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration).
|
|
354
|
+
*/
|
|
110
355
|
VolumesFrom?: VolumeFrom[];
|
|
356
|
+
/**
|
|
357
|
+
* The working directory to run commands inside the container in. This parameter maps to ``WorkingDir`` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the ``--workdir`` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration).
|
|
358
|
+
*/
|
|
111
359
|
WorkingDirectory?: string;
|
|
112
360
|
};
|
|
113
361
|
/**
|
|
114
362
|
* Type definition for `AWS::ECS::TaskDefinition.ContainerDependency`.
|
|
363
|
+
* The ``ContainerDependency`` property specifies the dependencies defined for container startup and shutdown. A container can contain multiple dependencies. When a dependency is defined for container startup, for container shutdown it is reversed.
|
|
364
|
+
Your Amazon ECS container instances require at least version 1.26.0 of the container agent to enable container dependencies. However, we recommend using the latest container agent version. For information about checking your agent version and updating to the latest version, see [Updating the Amazon ECS Container Agent](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-update.html) in the *Amazon Elastic Container Service Developer Guide*. If you are using an Amazon ECS-optimized Linux AMI, your instance needs at least version 1.26.0-1 of the ``ecs-init`` package. If your container instances are launched from version ``20190301`` or later, then they contain the required versions of the container agent and ``ecs-init``. For m
|
|
115
365
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-containerdependency.html}
|
|
116
366
|
*/
|
|
117
367
|
export type ContainerDependency = {
|
|
368
|
+
/**
|
|
369
|
+
* The dependency condition of the container. The following are the available conditions and their behavior:
|
|
370
|
+
+ ``START`` - This condition emulates the behavior of links and volumes today. It validates that a dependent container is started before permitting other containers to start.
|
|
371
|
+
+ ``COMPLETE`` - This condition validates that a dependent container runs to completion (exits) before permitting other containers to start. This can be useful for nonessential containers that run a script and then exit. This condition can't be set on an essential container.
|
|
372
|
+
+ ``SUCCESS`` - This condition is the same as ``COMPLETE``, but it also requires that the container exits with a ``zero`` status. This condition can't be set on an essential container.
|
|
373
|
+
+ ``HEALTHY`` - This condition validates that the dependent container passes its Docker health check before permitting other containers to start. This requires that the dependent container has health checks configured. This condition is confi
|
|
374
|
+
*/
|
|
118
375
|
Condition?: string;
|
|
376
|
+
/**
|
|
377
|
+
* The name of a container.
|
|
378
|
+
*/
|
|
119
379
|
ContainerName?: string;
|
|
120
380
|
};
|
|
121
381
|
/**
|
|
122
382
|
* Type definition for `AWS::ECS::TaskDefinition.Device`.
|
|
383
|
+
* The ``Device`` property specifies an object representing a container instance host device.
|
|
123
384
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-device.html}
|
|
124
385
|
*/
|
|
125
386
|
export type Device = {
|
|
387
|
+
/**
|
|
388
|
+
* The path inside the container at which to expose the host device.
|
|
389
|
+
*/
|
|
126
390
|
ContainerPath?: string;
|
|
391
|
+
/**
|
|
392
|
+
* The path for the device on the host container instance.
|
|
393
|
+
*/
|
|
127
394
|
HostPath?: string;
|
|
395
|
+
/**
|
|
396
|
+
* The explicit permissions to provide to the container for the device. By default, the container has permissions for ``read``, ``write``, and ``mknod`` for the device.
|
|
397
|
+
*/
|
|
128
398
|
Permissions?: string[];
|
|
129
399
|
};
|
|
130
400
|
/**
|
|
131
401
|
* Type definition for `AWS::ECS::TaskDefinition.DockerVolumeConfiguration`.
|
|
402
|
+
* The ``DockerVolumeConfiguration`` property specifies a Docker volume configuration and is used when you use Docker volumes. Docker volumes are only supported when you are using the EC2 launch type. Windows containers only support the use of the ``local`` driver. To use bind mounts, specify a ``host`` instead.
|
|
132
403
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-dockervolumeconfiguration.html}
|
|
133
404
|
*/
|
|
134
405
|
export type DockerVolumeConfiguration = {
|
|
406
|
+
/**
|
|
407
|
+
* If this value is ``true``, the Docker volume is created if it doesn't already exist.
|
|
408
|
+
This field is only used if the ``scope`` is ``shared``.
|
|
409
|
+
*/
|
|
135
410
|
Autoprovision?: boolean;
|
|
411
|
+
/**
|
|
412
|
+
* The Docker volume driver to use. The driver value must match the driver name provided by Docker because it is used for task placement. If the driver was installed using the Docker plugin CLI, use ``docker plugin ls`` to retrieve the driver name from your container instance. If the driver was installed using another method, use Docker plugin discovery to retrieve the driver name. For more information, see [Docker plugin discovery](https://docs.aws.amazon.com/https://docs.docker.com/engine/extend/plugin_api/#plugin-discovery). This parameter maps to ``Driver`` in the [Create a volume](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/VolumeCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the ``xxdriver`` option to [docker volume create](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/commandline/volume_create/).
|
|
413
|
+
*/
|
|
136
414
|
Driver?: string;
|
|
415
|
+
/**
|
|
416
|
+
* A map of Docker driver-specific options passed through. This parameter maps to ``DriverOpts`` in the [Create a volume](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/VolumeCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the ``xxopt`` option to [docker volume create](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/commandline/volume_create/).
|
|
417
|
+
*/
|
|
137
418
|
DriverOpts?: Record<string, string>;
|
|
419
|
+
/**
|
|
420
|
+
* Custom metadata to add to your Docker volume. This parameter maps to ``Labels`` in the [Create a volume](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/VolumeCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the ``xxlabel`` option to [docker volume create](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/commandline/volume_create/).
|
|
421
|
+
*/
|
|
138
422
|
Labels?: Record<string, string>;
|
|
423
|
+
/**
|
|
424
|
+
* The scope for the Docker volume that determines its lifecycle. Docker volumes that are scoped to a ``task`` are automatically provisioned when the task starts and destroyed when the task stops. Docker volumes that are scoped as ``shared`` persist after the task stops.
|
|
425
|
+
*/
|
|
139
426
|
Scope?: string;
|
|
140
427
|
};
|
|
141
428
|
/**
|
|
142
429
|
* Type definition for `AWS::ECS::TaskDefinition.EFSVolumeConfiguration`.
|
|
430
|
+
* This parameter is specified when you're using an Amazon Elastic File System file system for task storage. For more information, see [Amazon EFS volumes](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/efs-volumes.html) in the *Amazon Elastic Container Service Developer Guide*.
|
|
143
431
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-efsvolumeconfiguration.html}
|
|
144
432
|
*/
|
|
145
433
|
export type EFSVolumeConfiguration = {
|
|
434
|
+
/**
|
|
435
|
+
* The authorization configuration details for the Amazon EFS file system.
|
|
436
|
+
*/
|
|
146
437
|
AuthorizationConfig?: AuthorizationConfig;
|
|
438
|
+
/**
|
|
439
|
+
* The Amazon EFS file system ID to use.
|
|
440
|
+
*/
|
|
147
441
|
FilesystemId: string;
|
|
442
|
+
/**
|
|
443
|
+
* The directory within the Amazon EFS file system to mount as the root directory inside the host. If this parameter is omitted, the root of the Amazon EFS volume will be used. Specifying ``/`` will have the same effect as omitting this parameter.
|
|
444
|
+
If an EFS access point is specified in the ``authorizationConfig``, the root directory parameter must either be omitted or set to ``/`` which will enforce the path set on the EFS access point.
|
|
445
|
+
*/
|
|
148
446
|
RootDirectory?: string;
|
|
447
|
+
/**
|
|
448
|
+
* Determines whether to use encryption for Amazon EFS data in transit between the Amazon ECS host and the Amazon EFS server. Transit encryption must be turned on if Amazon EFS IAM authorization is used. If this parameter is omitted, the default value of ``DISABLED`` is used. For more information, see [Encrypting data in transit](https://docs.aws.amazon.com/efs/latest/ug/encryption-in-transit.html) in the *Amazon Elastic File System User Guide*.
|
|
449
|
+
*/
|
|
149
450
|
TransitEncryption?: "ENABLED" | "DISABLED";
|
|
451
|
+
/**
|
|
452
|
+
* The port to use when sending encrypted data between the Amazon ECS host and the Amazon EFS server. If you do not specify a transit encryption port, it will use the port selection strategy that the Amazon EFS mount helper uses. For more information, see [EFS mount helper](https://docs.aws.amazon.com/efs/latest/ug/efs-mount-helper.html) in the *Amazon Elastic File System User Guide*.
|
|
453
|
+
*/
|
|
150
454
|
TransitEncryptionPort?: number;
|
|
151
455
|
};
|
|
152
456
|
/**
|
|
153
457
|
* Type definition for `AWS::ECS::TaskDefinition.EnvironmentFile`.
|
|
458
|
+
* A list of files containing the environment variables to pass to a container. You can specify up to ten environment files. The file must have a ``.env`` file extension. Each line in an environment file should contain an environment variable in ``VARIABLE=VALUE`` format. Lines beginning with ``#`` are treated as comments and are ignored.
|
|
459
|
+
If there are environment variables specified using the ``environment`` parameter in a container definition, they take precedence over the variables contained within an environment file. If multiple environment files are specified that contain the same variable, they're processed from the top down. We recommend that you use unique variable names. For more information, see [Specifying environment variables](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/taskdef-envfiles.html) in the *Amazon Elastic Container Service Developer Guide*.
|
|
460
|
+
You must use the following platforms for the Fargate launch type:
|
|
461
|
+
+ Linux platform version ``1.4.0`` or la
|
|
154
462
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-environmentfile.html}
|
|
155
463
|
*/
|
|
156
464
|
export type EnvironmentFile = {
|
|
465
|
+
/**
|
|
466
|
+
* The file type to use. The only supported value is ``s3``.
|
|
467
|
+
*/
|
|
157
468
|
Type?: string;
|
|
469
|
+
/**
|
|
470
|
+
* The Amazon Resource Name (ARN) of the Amazon S3 object containing the environment variable file.
|
|
471
|
+
*/
|
|
158
472
|
Value?: string;
|
|
159
473
|
};
|
|
160
474
|
/**
|
|
161
475
|
* Type definition for `AWS::ECS::TaskDefinition.EphemeralStorage`.
|
|
476
|
+
* 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 FARGATElong. For more information, see [Using data volumes in tasks](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_data_volumes.html) in the *Amazon ECS Developer Guide;*.
|
|
477
|
+
For tasks using the Fargate launch type, the task requires the following platforms:
|
|
478
|
+
+ Linux platform version ``1.4.0`` or later.
|
|
479
|
+
+ Windows platform version ``1.0.0`` or later.
|
|
162
480
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-ephemeralstorage.html}
|
|
163
481
|
*/
|
|
164
482
|
export type EphemeralStorage = {
|
|
483
|
+
/**
|
|
484
|
+
* The total amount, in GiB, of ephemeral storage to set for the task. The minimum supported value is ``21`` GiB and the maximum supported value is ``200`` GiB.
|
|
485
|
+
*/
|
|
165
486
|
SizeInGiB?: number;
|
|
166
487
|
};
|
|
167
488
|
/**
|
|
168
489
|
* Type definition for `AWS::ECS::TaskDefinition.FirelensConfiguration`.
|
|
490
|
+
* The FireLens configuration for the container. This is used to specify and configure a log router for container logs. For more information, see [Custom log routing](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_firelens.html) in the *Amazon Elastic Container Service Developer Guide*.
|
|
169
491
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-firelensconfiguration.html}
|
|
170
492
|
*/
|
|
171
493
|
export type FirelensConfiguration = {
|
|
494
|
+
/**
|
|
495
|
+
* The options to use when configuring the log router. This field is optional and can be used to add additional metadata, such as the task, task definition, cluster, and container instance details to the log event.
|
|
496
|
+
If specified, valid option keys are:
|
|
497
|
+
+ ``enable-ecs-log-metadata``, which can be ``true`` or ``false``
|
|
498
|
+
+ ``config-file-type``, which can be ``s3`` or ``file``
|
|
499
|
+
+ ``config-file-value``, which is either an S3 ARN or a file path
|
|
500
|
+
*/
|
|
172
501
|
Options?: Record<string, string>;
|
|
502
|
+
/**
|
|
503
|
+
* The log router to use. The valid values are ``fluentd`` or ``fluentbit``.
|
|
504
|
+
*/
|
|
173
505
|
Type?: string;
|
|
174
506
|
};
|
|
175
507
|
/**
|
|
176
508
|
* Type definition for `AWS::ECS::TaskDefinition.HealthCheck`.
|
|
177
|
-
* The health check
|
|
509
|
+
* The ``HealthCheck`` property specifies an object representing a container health check. Health check parameters that are specified in a container definition override any Docker health checks that exist in the container image (such as those specified in a parent image or from the image's Dockerfile). This configuration maps to the ``HEALTHCHECK`` parameter of [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/).
|
|
510
|
+
The Amazon ECS container agent only monitors and reports on the health checks specified in the task definition. Amazon ECS does not monitor Docker health checks that are embedded in a container image and not specified in the container definition. Health check parameters that are specified in a container definition override any Docker health checks that exist in the container image.
|
|
511
|
+
If a task is run manually, and not as part of a service, the task will continue its lifecycle regardless of its health status. For tasks that are part of a servi
|
|
178
512
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-healthcheck.html}
|
|
179
513
|
*/
|
|
180
514
|
export type HealthCheck = {
|
|
181
515
|
/**
|
|
182
|
-
|
|
183
|
-
|
|
516
|
+
* A string array representing the command that the container runs to determine if it is healthy. The string array must start with ``CMD`` to run the command arguments directly, or ``CMD-SHELL`` to run the command with the container's default shell.
|
|
517
|
+
When you use the AWS Management Console JSON panel, the CLIlong, or the APIs, enclose the list of commands in double quotes and brackets.
|
|
518
|
+
``[ "CMD-SHELL", "curl -f http://localhost/ || exit 1" ]``
|
|
519
|
+
You don't include the double quotes and brackets when you use the AWS Management Console.
|
|
520
|
+
``CMD-SHELL, curl -f http://localhost/ || exit 1``
|
|
521
|
+
An exit code of 0 indicates success, and non-zero exit code indicates failure. For more information, see ``HealthCheck`` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/).
|
|
522
|
+
*/
|
|
184
523
|
Command?: string[];
|
|
185
524
|
/**
|
|
186
525
|
* The time period in seconds between each health check execution. You may specify between 5 and 300 seconds. The default value is 30 seconds.
|
|
187
526
|
*/
|
|
188
527
|
Interval?: number;
|
|
189
528
|
/**
|
|
190
|
-
* The number of times to retry a failed health check before the container is considered unhealthy. You may specify between 1 and 10 retries. The default value is
|
|
529
|
+
* The number of times to retry a failed health check before the container is considered unhealthy. You may specify between 1 and 10 retries. The default value is 3.
|
|
191
530
|
*/
|
|
192
531
|
Retries?: number;
|
|
193
532
|
/**
|
|
194
|
-
|
|
195
|
-
|
|
533
|
+
* The optional grace period to provide containers time to bootstrap before failed health checks count towards the maximum number of retries. You can specify between 0 and 300 seconds. By default, the ``startPeriod`` is off.
|
|
534
|
+
If a health check succeeds within the ``startPeriod``, then the container is considered healthy and any subsequent failures count toward the maximum number of retries.
|
|
535
|
+
*/
|
|
196
536
|
StartPeriod?: number;
|
|
197
537
|
/**
|
|
198
|
-
* The time period in seconds to wait for a health check to succeed before it is considered a failure. You may specify between 2 and 60 seconds. The default value is 5
|
|
538
|
+
* The time period in seconds to wait for a health check to succeed before it is considered a failure. You may specify between 2 and 60 seconds. The default value is 5.
|
|
199
539
|
*/
|
|
200
540
|
Timeout?: number;
|
|
201
541
|
};
|
|
202
542
|
/**
|
|
203
543
|
* Type definition for `AWS::ECS::TaskDefinition.HostEntry`.
|
|
544
|
+
* The ``HostEntry`` property specifies a hostname and an IP address that are added to the ``/etc/hosts`` file of a container through the ``extraHosts`` parameter of its ``ContainerDefinition`` resource.
|
|
204
545
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-hostentry.html}
|
|
205
546
|
*/
|
|
206
547
|
export type HostEntry = {
|
|
548
|
+
/**
|
|
549
|
+
* The hostname to use in the ``/etc/hosts`` entry.
|
|
550
|
+
*/
|
|
207
551
|
Hostname?: string;
|
|
552
|
+
/**
|
|
553
|
+
* The IP address to use in the ``/etc/hosts`` entry.
|
|
554
|
+
*/
|
|
208
555
|
IpAddress?: string;
|
|
209
556
|
};
|
|
210
557
|
/**
|
|
211
558
|
* Type definition for `AWS::ECS::TaskDefinition.HostVolumeProperties`.
|
|
559
|
+
* The ``HostVolumeProperties`` property specifies details on a container instance bind mount host volume.
|
|
212
560
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-hostvolumeproperties.html}
|
|
213
561
|
*/
|
|
214
562
|
export type HostVolumeProperties = {
|
|
563
|
+
/**
|
|
564
|
+
* When the ``host`` parameter is used, specify a ``sourcePath`` to declare the path on the host container instance that's presented to the container. If this parameter is empty, then the Docker daemon has assigned a host path for you. If the ``host`` parameter contains a ``sourcePath`` file location, then the data volume persists at the specified location on the host container instance until you delete it manually. If the ``sourcePath`` value doesn't exist on the host container instance, the Docker daemon creates it. If the location does exist, the contents of the source path folder are exported.
|
|
565
|
+
If you're using the Fargate launch type, the ``sourcePath`` parameter is not supported.
|
|
566
|
+
*/
|
|
215
567
|
SourcePath?: string;
|
|
216
568
|
};
|
|
217
569
|
/**
|
|
218
570
|
* Type definition for `AWS::ECS::TaskDefinition.InferenceAccelerator`.
|
|
571
|
+
* Details on an Elastic Inference accelerator. For more information, see [Working with Amazon Elastic Inference on Amazon ECS](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-inference.html) in the *Amazon Elastic Container Service Developer Guide*.
|
|
219
572
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-inferenceaccelerator.html}
|
|
220
573
|
*/
|
|
221
574
|
export type InferenceAccelerator = {
|
|
575
|
+
/**
|
|
576
|
+
* The Elastic Inference accelerator device name. The ``deviceName`` must also be referenced in a container definition as a [ResourceRequirement](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ResourceRequirement.html).
|
|
577
|
+
*/
|
|
222
578
|
DeviceName?: string;
|
|
579
|
+
/**
|
|
580
|
+
* The Elastic Inference accelerator type to use.
|
|
581
|
+
*/
|
|
223
582
|
DeviceType?: string;
|
|
224
583
|
};
|
|
225
584
|
/**
|
|
226
585
|
* Type definition for `AWS::ECS::TaskDefinition.KernelCapabilities`.
|
|
586
|
+
* The ``KernelCapabilities`` property specifies the Linux capabilities for the container that are added to or dropped from the default configuration that is provided by Docker. For more information on the default capabilities and the non-default available capabilities, see [Runtime privilege and Linux capabilities](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities) in the *Docker run reference*. For more detailed information on these Linux capabilities, see the [capabilities(7)](https://docs.aws.amazon.com/http://man7.org/linux/man-pages/man7/capabilities.7.html) Linux manual page.
|
|
227
587
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-kernelcapabilities.html}
|
|
228
588
|
*/
|
|
229
589
|
export type KernelCapabilities = {
|
|
590
|
+
/**
|
|
591
|
+
* The Linux capabilities for the container that have been added to the default configuration provided by Docker. This parameter maps to ``CapAdd`` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the ``--cap-add`` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration).
|
|
592
|
+
Tasks launched on FARGATElong only support adding the ``SYS_PTRACE`` kernel capability.
|
|
593
|
+
Valid values: ``"ALL" | "AUDIT_CONTROL" | "AUDIT_WRITE" | "BLOCK_SUSPEND" | "CHOWN" | "DAC_OVERRIDE" | "DAC_READ_SEARCH" | "FOWNER" | "FSETID" | "IPC_LOCK" | "IPC_OWNER" | "KILL" | "LEASE" | "LINUX_IMMUTABLE" | "MAC_ADMIN" | "MAC_OVERRIDE" | "MKNOD" | "NET_ADMIN" | "NET_BIND_SERVICE" | "NET_BROADCAST" | "NET_RAW" | "SETFCAP" | "SETGID" | "SETPCAP" | "SETUID" | "SYS_ADMIN" | "SYS_BOOT"
|
|
594
|
+
*/
|
|
230
595
|
Add?: string[];
|
|
596
|
+
/**
|
|
597
|
+
* The Linux capabilities for the container that have been removed from the default configuration provided by Docker. This parameter maps to ``CapDrop`` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the ``--cap-drop`` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration).
|
|
598
|
+
Valid values: ``"ALL" | "AUDIT_CONTROL" | "AUDIT_WRITE" | "BLOCK_SUSPEND" | "CHOWN" | "DAC_OVERRIDE" | "DAC_READ_SEARCH" | "FOWNER" | "FSETID" | "IPC_LOCK" | "IPC_OWNER" | "KILL" | "LEASE" | "LINUX_IMMUTABLE" | "MAC_ADMIN" | "MAC_OVERRIDE" | "MKNOD" | "NET_ADMIN" | "NET_BIND_SERVICE" | "NET_BROADCAST" | "NET_RAW" | "SETFCAP" | "SETGID" | "SETPCAP" | "SETUID" | "SYS_ADMIN" | "SYS_BOOT" | "SYS_CHROOT" | "SYS_MODULE" | "SYS_NICE" | "SYS_PACCT" | "SYS_PTRACE" | "SYS_RAWIO"
|
|
599
|
+
*/
|
|
231
600
|
Drop?: string[];
|
|
232
601
|
};
|
|
233
602
|
/**
|
|
234
603
|
* Type definition for `AWS::ECS::TaskDefinition.KeyValuePair`.
|
|
604
|
+
* A key-value pair object.
|
|
235
605
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-keyvaluepair.html}
|
|
236
606
|
*/
|
|
237
607
|
export type KeyValuePair = {
|
|
608
|
+
/**
|
|
609
|
+
* The name of the key-value pair. For environment variables, this is the name of the environment variable.
|
|
610
|
+
*/
|
|
238
611
|
Name?: string;
|
|
612
|
+
/**
|
|
613
|
+
* The value of the key-value pair. For environment variables, this is the value of the environment variable.
|
|
614
|
+
*/
|
|
239
615
|
Value?: string;
|
|
240
616
|
};
|
|
241
617
|
/**
|
|
242
618
|
* Type definition for `AWS::ECS::TaskDefinition.LinuxParameters`.
|
|
619
|
+
* The Linux-specific options that are applied to the container, such as Linux [KernelCapabilities](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_KernelCapabilities.html).
|
|
243
620
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-linuxparameters.html}
|
|
244
621
|
*/
|
|
245
622
|
export type LinuxParameters = {
|
|
623
|
+
/**
|
|
624
|
+
* The Linux capabilities for the container that are added to or dropped from the default configuration provided by Docker.
|
|
625
|
+
For tasks that use the Fargate launch type, ``capabilities`` is supported for all platform versions but the ``add`` parameter is only supported if using platform version 1.4.0 or later.
|
|
626
|
+
*/
|
|
246
627
|
Capabilities?: KernelCapabilities;
|
|
628
|
+
/**
|
|
629
|
+
* Any host devices to expose to the container. This parameter maps to ``Devices`` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the ``--device`` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration).
|
|
630
|
+
If you're using tasks that use the Fargate launch type, the ``devices`` parameter isn't supported.
|
|
631
|
+
*/
|
|
247
632
|
Devices?: Device[];
|
|
633
|
+
/**
|
|
634
|
+
* Run an ``init`` process inside the container that forwards signals and reaps processes. This parameter maps to the ``--init`` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration). This parameter requires version 1.25 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log in to your container instance and run the following command: ``sudo docker version --format '{{.Server.APIVersion}}'``
|
|
635
|
+
*/
|
|
248
636
|
InitProcessEnabled?: boolean;
|
|
637
|
+
/**
|
|
638
|
+
* The total amount of swap memory (in MiB) a container can use. This parameter will be translated to the ``--memory-swap`` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration) where the value would be the sum of the container memory plus the ``maxSwap`` value.
|
|
639
|
+
If a ``maxSwap`` value of ``0`` is specified, the container will not use swap. Accepted values are ``0`` or any positive integer. If the ``maxSwap`` parameter is omitted, the container will use the swap configuration for the container instance it is running on. A ``maxSwap`` value must be set for the ``swappiness`` parameter to be used.
|
|
640
|
+
If you're using tasks that use the Fargate launch type, the ``maxSwap`` parameter isn't supported.
|
|
641
|
+
If you're using tasks on Amazon Linux 2023 the ``swappiness`` parameter isn't supported.
|
|
642
|
+
*/
|
|
249
643
|
MaxSwap?: number;
|
|
644
|
+
/**
|
|
645
|
+
* The value for the size (in MiB) of the ``/dev/shm`` volume. This parameter maps to the ``--shm-size`` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration).
|
|
646
|
+
If you are using tasks that use the Fargate launch type, the ``sharedMemorySize`` parameter is not supported.
|
|
647
|
+
*/
|
|
250
648
|
SharedMemorySize?: number;
|
|
649
|
+
/**
|
|
650
|
+
* This allows you to tune a container's memory swappiness behavior. A ``swappiness`` value of ``0`` will cause swapping to not happen unless absolutely necessary. A ``swappiness`` value of ``100`` will cause pages to be swapped very aggressively. Accepted values are whole numbers between ``0`` and ``100``. If the ``swappiness`` parameter is not specified, a default value of ``60`` is used. If a value is not specified for ``maxSwap`` then this parameter is ignored. This parameter maps to the ``--memory-swappiness`` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration).
|
|
651
|
+
If you're using tasks that use the Fargate launch type, the ``swappiness`` parameter isn't supported.
|
|
652
|
+
If you're using tasks on Amazon Linux 2023 the ``swappiness`` parameter isn't supported.
|
|
653
|
+
*/
|
|
251
654
|
Swappiness?: number;
|
|
655
|
+
/**
|
|
656
|
+
* The container path, mount options, and size (in MiB) of the tmpfs mount. This parameter maps to the ``--tmpfs`` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration).
|
|
657
|
+
If you're using tasks that use the Fargate launch type, the ``tmpfs`` parameter isn't supported.
|
|
658
|
+
*/
|
|
252
659
|
Tmpfs?: Tmpfs[];
|
|
253
660
|
};
|
|
254
661
|
/**
|
|
255
662
|
* Type definition for `AWS::ECS::TaskDefinition.LogConfiguration`.
|
|
663
|
+
* The ``LogConfiguration`` property specifies log configuration options to send to a custom log driver for the container.
|
|
256
664
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-logconfiguration.html}
|
|
257
665
|
*/
|
|
258
666
|
export type LogConfiguration = {
|
|
667
|
+
/**
|
|
668
|
+
* The log driver to use for the container.
|
|
669
|
+
For tasks on FARGATElong, the supported log drivers are ``awslogs``, ``splunk``, and ``awsfirelens``.
|
|
670
|
+
For tasks hosted on Amazon EC2 instances, the supported log drivers are ``awslogs``, ``fluentd``, ``gelf``, ``json-file``, ``journald``, ``logentries``,``syslog``, ``splunk``, and ``awsfirelens``.
|
|
671
|
+
For more information about using the ``awslogs`` log driver, see [Using the awslogs log driver](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_awslogs.html) in the *Amazon Elastic Container Service Developer Guide*.
|
|
672
|
+
For more information about using the ``awsfirelens`` log driver, see [Custom log routing](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_firelens.html) in the *Amazon Elastic Container Service Developer Guide*.
|
|
673
|
+
If you have a custom driver that isn't listed, you can fork the Amazon ECS container agent project that's [available on GitHub](https://docs.aws.amazon.com/https://github.com/aws/amazon-ecs
|
|
674
|
+
*/
|
|
259
675
|
LogDriver: string;
|
|
676
|
+
/**
|
|
677
|
+
* The configuration options to send to the log driver. This parameter requires version 1.19 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log in to your container instance and run the following command: ``sudo docker version --format '{{.Server.APIVersion}}'``
|
|
678
|
+
*/
|
|
260
679
|
Options?: Record<string, string>;
|
|
680
|
+
/**
|
|
681
|
+
* The secrets to pass to the log configuration. For more information, see [Specifying sensitive data](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/specifying-sensitive-data.html) in the *Amazon Elastic Container Service Developer Guide*.
|
|
682
|
+
*/
|
|
261
683
|
SecretOptions?: Secret[];
|
|
262
684
|
};
|
|
263
685
|
/**
|
|
264
686
|
* Type definition for `AWS::ECS::TaskDefinition.MountPoint`.
|
|
687
|
+
* The details for a volume mount point that's used in a container definition.
|
|
265
688
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-mountpoint.html}
|
|
266
689
|
*/
|
|
267
690
|
export type MountPoint = {
|
|
691
|
+
/**
|
|
692
|
+
* The path on the container to mount the host volume at.
|
|
693
|
+
*/
|
|
268
694
|
ContainerPath?: string;
|
|
695
|
+
/**
|
|
696
|
+
* If this value is ``true``, the container has read-only access to the volume. If this value is ``false``, then the container can write to the volume. The default value is ``false``.
|
|
697
|
+
*/
|
|
269
698
|
ReadOnly?: boolean;
|
|
699
|
+
/**
|
|
700
|
+
* The name of the volume to mount. Must be a volume name referenced in the ``name`` parameter of task definition ``volume``.
|
|
701
|
+
*/
|
|
270
702
|
SourceVolume?: string;
|
|
271
703
|
};
|
|
272
704
|
/**
|
|
273
705
|
* Type definition for `AWS::ECS::TaskDefinition.PortMapping`.
|
|
706
|
+
* The ``PortMapping`` property specifies a port mapping. Port mappings allow containers to access ports on the host container instance to send or receive traffic. Port mappings are specified as part of the container definition.
|
|
707
|
+
If you are using containers in a task with the ``awsvpc`` or ``host`` network mode, exposed ports should be specified using ``containerPort``. The ``hostPort`` can be left blank or it must be the same value as the ``containerPort``.
|
|
708
|
+
After a task reaches the ``RUNNING`` status, manual and automatic host and container port assignments are visible in the ``networkBindings`` section of [DescribeTasks](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_DescribeTasks.html) API responses.
|
|
274
709
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-portmapping.html}
|
|
275
710
|
*/
|
|
276
711
|
export type PortMapping = {
|
|
712
|
+
/**
|
|
713
|
+
* The application protocol that's used for the port mapping. This parameter only applies to Service Connect. We recommend that you set this parameter to be consistent with the protocol that your application uses. If you set this parameter, Amazon ECS adds protocol-specific connection handling to the Service Connect proxy. If you set this parameter, Amazon ECS adds protocol-specific telemetry in the Amazon ECS console and CloudWatch.
|
|
714
|
+
If you don't set a value for this parameter, then TCP is used. However, Amazon ECS doesn't add protocol-specific telemetry for TCP.
|
|
715
|
+
``appProtocol`` is immutable in a Service Connect service. Updating this field requires a service deletion and redeployment.
|
|
716
|
+
Tasks that run in a namespace can use short names to connect to services in the namespace. Tasks can connect to services across all of the clusters in the namespace. Tasks connect through a managed proxy container that collects logs and metrics for increased visibility. Only the tasks that Amazon ECS se
|
|
717
|
+
*/
|
|
277
718
|
AppProtocol?: "http" | "http2" | "grpc";
|
|
719
|
+
/**
|
|
720
|
+
* The port number on the container that's bound to the user-specified or automatically assigned host port.
|
|
721
|
+
If you use containers in a task with the ``awsvpc`` or ``host`` network mode, specify the exposed ports using ``containerPort``.
|
|
722
|
+
If you use containers in a task with the ``bridge`` network mode and you specify a container port and not a host port, your container automatically receives a host port in the ephemeral port range. For more information, see ``hostPort``. Port mappings that are automatically assigned in this way do not count toward the 100 reserved ports limit of a container instance.
|
|
723
|
+
*/
|
|
278
724
|
ContainerPort?: number;
|
|
725
|
+
/**
|
|
726
|
+
* The port number range on the container that's bound to the dynamically mapped host port range.
|
|
727
|
+
The following rules apply when you specify a ``containerPortRange``:
|
|
728
|
+
+ You must use either the ``bridge`` network mode or the ``awsvpc`` network mode.
|
|
729
|
+
+ This parameter is available for both the EC2 and FARGATElong launch types.
|
|
730
|
+
+ This parameter is available for both the Linux and Windows operating systems.
|
|
731
|
+
+ The container instance must have at least version 1.67.0 of the container agent and at least version 1.67.0-1 of the ``ecs-init`` package
|
|
732
|
+
+ You can specify a maximum of 100 port ranges per container.
|
|
733
|
+
+ You do not specify a ``hostPortRange``. The value of the ``hostPortRange`` is set as follows:
|
|
734
|
+
+ For containers in a task with the ``awsvpc`` network mode, the ``hostPortRange`` is set to the same value as the ``containerPortRange``. This is a static mapping strategy.
|
|
735
|
+
+ For containers in a task with the ``bridge`` network mode, the Amazon ECS agent finds open host
|
|
736
|
+
*/
|
|
279
737
|
ContainerPortRange?: string;
|
|
738
|
+
/**
|
|
739
|
+
* The port number on the container instance to reserve for your container.
|
|
740
|
+
If you specify a ``containerPortRange``, leave this field empty and the value of the ``hostPort`` is set as follows:
|
|
741
|
+
+ For containers in a task with the ``awsvpc`` network mode, the ``hostPort`` is set to the same value as the ``containerPort``. This is a static mapping strategy.
|
|
742
|
+
+ For containers in a task with the ``bridge`` network mode, the Amazon ECS agent finds open ports on the host and automatically binds them to the container ports. This is a dynamic mapping strategy.
|
|
743
|
+
|
|
744
|
+
If you use containers in a task with the ``awsvpc`` or ``host`` network mode, the ``hostPort`` can either be left blank or set to the same value as the ``containerPort``.
|
|
745
|
+
If you use containers in a task with the ``bridge`` network mode, you can specify a non-reserved host port for your container port mapping, or you can omit the ``hostPort`` (or set it to ``0``) while specifying a ``containerPort`` and your container automatically
|
|
746
|
+
*/
|
|
280
747
|
HostPort?: number;
|
|
748
|
+
/**
|
|
749
|
+
* The name that's used for the port mapping. This parameter only applies to Service Connect. This parameter is the name that you use in the ``serviceConnectConfiguration`` of a service. The name can include up to 64 characters. The characters can include lowercase letters, numbers, underscores (_), and hyphens (-). The name can't start with a hyphen.
|
|
750
|
+
For more information, see [Service Connect](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-connect.html) in the *Amazon Elastic Container Service Developer Guide*.
|
|
751
|
+
*/
|
|
281
752
|
Name?: string;
|
|
753
|
+
/**
|
|
754
|
+
* The protocol used for the port mapping. Valid values are ``tcp`` and ``udp``. The default is ``tcp``. ``protocol`` is immutable in a Service Connect service. Updating this field requires a service deletion and redeployment.
|
|
755
|
+
*/
|
|
282
756
|
Protocol?: string;
|
|
283
757
|
};
|
|
284
758
|
/**
|
|
285
759
|
* Type definition for `AWS::ECS::TaskDefinition.ProxyConfiguration`.
|
|
760
|
+
* The configuration details for the App Mesh proxy.
|
|
761
|
+
For tasks that use the EC2 launch type, the container instances require at least version 1.26.0 of the container agent and at least version 1.26.0-1 of the ``ecs-init`` package to use a proxy configuration. If your container instances are launched from the Amazon ECS optimized AMI version ``20190301`` or later, then they contain the required versions of the container agent and ``ecs-init``. For more information, see [Amazon ECS-optimized Linux AMI](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html)
|
|
286
762
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-proxyconfiguration.html}
|
|
287
763
|
*/
|
|
288
764
|
export type ProxyConfiguration = {
|
|
765
|
+
/**
|
|
766
|
+
* The name of the container that will serve as the App Mesh proxy.
|
|
767
|
+
*/
|
|
289
768
|
ContainerName: string;
|
|
769
|
+
/**
|
|
770
|
+
* The set of network configuration parameters to provide the Container Network Interface (CNI) plugin, specified as key-value pairs.
|
|
771
|
+
+ ``IgnoredUID`` - (Required) The user ID (UID) of the proxy container as defined by the ``user`` parameter in a container definition. This is used to ensure the proxy ignores its own traffic. If ``IgnoredGID`` is specified, this field can be empty.
|
|
772
|
+
+ ``IgnoredGID`` - (Required) The group ID (GID) of the proxy container as defined by the ``user`` parameter in a container definition. This is used to ensure the proxy ignores its own traffic. If ``IgnoredUID`` is specified, this field can be empty.
|
|
773
|
+
+ ``AppPorts`` - (Required) The list of ports that the application uses. Network traffic to these ports is forwarded to the ``ProxyIngressPort`` and ``ProxyEgressPort``.
|
|
774
|
+
+ ``ProxyIngressPort`` - (Required) Specifies the port that incoming traffic to the ``AppPorts`` is directed to.
|
|
775
|
+
+ ``ProxyEgressPort`` - (Required) Specifies the port that outgoi
|
|
776
|
+
*/
|
|
290
777
|
ProxyConfigurationProperties?: KeyValuePair[];
|
|
778
|
+
/**
|
|
779
|
+
* The proxy type. The only supported value is ``APPMESH``.
|
|
780
|
+
*/
|
|
291
781
|
Type?: string;
|
|
292
782
|
};
|
|
293
783
|
/**
|
|
294
784
|
* Type definition for `AWS::ECS::TaskDefinition.RepositoryCredentials`.
|
|
785
|
+
* The repository credentials for private registry authentication.
|
|
295
786
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-repositorycredentials.html}
|
|
296
787
|
*/
|
|
297
788
|
export type RepositoryCredentials = {
|
|
789
|
+
/**
|
|
790
|
+
* The Amazon Resource Name (ARN) of the secret containing the private repository credentials.
|
|
791
|
+
When you use the Amazon ECS API, CLI, or AWS SDK, if the secret exists in the same Region as the task that you're launching then you can use either the full ARN or the name of the secret. When you use the AWS Management Console, you must specify the full ARN of the secret.
|
|
792
|
+
*/
|
|
298
793
|
CredentialsParameter?: string;
|
|
299
794
|
};
|
|
300
795
|
/**
|
|
301
796
|
* Type definition for `AWS::ECS::TaskDefinition.ResourceRequirement`.
|
|
797
|
+
* The type and amount of a resource to assign to a container. The supported resource types are GPUs and Elastic Inference accelerators. For more information, see [Working with GPUs on Amazon ECS](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-gpu.html) or [Working with Amazon Elastic Inference on Amazon ECS](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-inference.html) in the *Amazon Elastic Container Service Developer Guide*
|
|
302
798
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-resourcerequirement.html}
|
|
303
799
|
*/
|
|
304
800
|
export type ResourceRequirement = {
|
|
801
|
+
/**
|
|
802
|
+
* The type of resource to assign to a container. The supported values are ``GPU`` or ``InferenceAccelerator``.
|
|
803
|
+
*/
|
|
305
804
|
Type: string;
|
|
805
|
+
/**
|
|
806
|
+
* The value for the specified resource type.
|
|
807
|
+
If the ``GPU`` type is used, the value is the number of physical ``GPUs`` the Amazon ECS container agent reserves for the container. The number of GPUs that's reserved for all containers in a task can't exceed the number of available GPUs on the container instance that the task is launched on.
|
|
808
|
+
If the ``InferenceAccelerator`` type is used, the ``value`` matches the ``deviceName`` for an [InferenceAccelerator](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_InferenceAccelerator.html) specified in a task definition.
|
|
809
|
+
*/
|
|
306
810
|
Value: string;
|
|
307
811
|
};
|
|
308
812
|
/**
|
|
309
813
|
* Type definition for `AWS::ECS::TaskDefinition.RuntimePlatform`.
|
|
814
|
+
* Information about the platform for the Amazon ECS service or task.
|
|
815
|
+
For more information about ``RuntimePlatform``, see [RuntimePlatform](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#runtime-platform) in the *Amazon Elastic Container Service Developer Guide*.
|
|
310
816
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-runtimeplatform.html}
|
|
311
817
|
*/
|
|
312
818
|
export type RuntimePlatform = {
|
|
819
|
+
/**
|
|
820
|
+
* The CPU architecture.
|
|
821
|
+
You can run your Linux tasks on an ARM-based platform by setting the value to ``ARM64``. This option is available for tasks that run on Linux Amazon EC2 instance or Linux containers on Fargate.
|
|
822
|
+
*/
|
|
313
823
|
CpuArchitecture?: string;
|
|
824
|
+
/**
|
|
825
|
+
* The operating system.
|
|
826
|
+
*/
|
|
314
827
|
OperatingSystemFamily?: string;
|
|
315
828
|
};
|
|
316
829
|
/**
|
|
317
830
|
* Type definition for `AWS::ECS::TaskDefinition.Secret`.
|
|
831
|
+
* An object representing the secret to expose to your container. Secrets can be exposed to a container in the following ways:
|
|
832
|
+
+ To inject sensitive data into your containers as environment variables, use the ``secrets`` container definition parameter.
|
|
833
|
+
+ To reference sensitive information in the log configuration of a container, use the ``secretOptions`` container definition parameter.
|
|
834
|
+
|
|
835
|
+
For more information, see [Specifying sensitive data](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/specifying-sensitive-data.html) in the *Amazon Elastic Container Service Developer Guide*.
|
|
318
836
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-secret.html}
|
|
319
837
|
*/
|
|
320
838
|
export type Secret = {
|
|
839
|
+
/**
|
|
840
|
+
* The name of the secret.
|
|
841
|
+
*/
|
|
321
842
|
Name: string;
|
|
843
|
+
/**
|
|
844
|
+
* The secret to expose to the container. The supported values are either the full ARN of the ASMlong secret or the full ARN of the parameter in the SSM Parameter Store.
|
|
845
|
+
For information about the require IAMlong permissions, see [Required IAM permissions for Amazon ECS secrets](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/specifying-sensitive-data-secrets.html#secrets-iam) (for Secrets Manager) or [Required IAM permissions for Amazon ECS secrets](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/specifying-sensitive-data-parameters.html) (for Systems Manager Parameter store) in the *Amazon Elastic Container Service Developer Guide*.
|
|
846
|
+
If the SSM Parameter Store parameter exists in the same Region as the task you're launching, then you can use either the full ARN or name of the parameter. If the parameter exists in a different Region, then the full ARN must be specified.
|
|
847
|
+
*/
|
|
322
848
|
ValueFrom: string;
|
|
323
849
|
};
|
|
324
850
|
/**
|
|
325
851
|
* Type definition for `AWS::ECS::TaskDefinition.SystemControl`.
|
|
852
|
+
* A list of namespaced kernel parameters to set in the container. This parameter maps to ``Sysctls`` in the [Create a container](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.aws.amazon.com/https://docs.docker.com/engine/api/v1.35/) and the ``--sysctl`` option to [docker run](https://docs.aws.amazon.com/https://docs.docker.com/engine/reference/run/#security-configuration). For example, you can configure ``net.ipv4.tcp_keepalive_time`` setting to maintain longer lived connections.
|
|
853
|
+
We don't recommend that you specify network-related ``systemControls`` parameters for multiple containers in a single task that also uses either the ``awsvpc`` or ``host`` network mode. Doing this has the following disadvantages:
|
|
854
|
+
+ For tasks that use the ``awsvpc`` network mode including Fargate, if you set ``systemControls`` for any container, it applies to all containers in the task. If you set different ``sy
|
|
326
855
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-systemcontrol.html}
|
|
327
856
|
*/
|
|
328
857
|
export type SystemControl = {
|
|
858
|
+
/**
|
|
859
|
+
* The namespaced kernel parameter to set a ``value`` for.
|
|
860
|
+
*/
|
|
329
861
|
Namespace?: string;
|
|
862
|
+
/**
|
|
863
|
+
* The namespaced kernel parameter to set a ``value`` for.
|
|
864
|
+
Valid IPC namespace values: ``"kernel.msgmax" | "kernel.msgmnb" | "kernel.msgmni" | "kernel.sem" | "kernel.shmall" | "kernel.shmmax" | "kernel.shmmni" | "kernel.shm_rmid_forced"``, and ``Sysctls`` that start with ``"fs.mqueue.*"``
|
|
865
|
+
Valid network namespace values: ``Sysctls`` that start with ``"net.*"``
|
|
866
|
+
All of these values are supported by Fargate.
|
|
867
|
+
*/
|
|
330
868
|
Value?: string;
|
|
331
869
|
};
|
|
332
870
|
/**
|
|
333
871
|
* Type definition for `AWS::ECS::TaskDefinition.Tag`.
|
|
872
|
+
* The metadata that you apply to a resource to help you categorize and organize them. Each tag consists of a key and an optional value. You define them.
|
|
873
|
+
The following basic restrictions apply to tags:
|
|
874
|
+
+ Maximum number of tags per resource - 50
|
|
875
|
+
+ For each resource, each tag key must be unique, and each tag key can have only one value.
|
|
876
|
+
+ Maximum key length - 128 Unicode characters in UTF-8
|
|
877
|
+
+ Maximum value length - 256 Unicode characters in UTF-8
|
|
878
|
+
+ If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
|
|
879
|
+
+ Tag keys and values are case-sensitive.
|
|
880
|
+
+ Do not use ``aws:``, ``AWS:``, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for AWS use. You cannot edit or delete tag keys or values with this prefix
|
|
334
881
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-tag.html}
|
|
335
882
|
*/
|
|
336
883
|
export type Tag = {
|
|
884
|
+
/**
|
|
885
|
+
* One part of a key-value pair that make up a tag. A ``key`` is a general label that acts like a category for more specific tag values.
|
|
886
|
+
*/
|
|
337
887
|
Key?: string;
|
|
888
|
+
/**
|
|
889
|
+
* The optional part of a key-value pair that make up a tag. A ``value`` acts as a descriptor within a tag category (key).
|
|
890
|
+
*/
|
|
338
891
|
Value?: string;
|
|
339
892
|
};
|
|
340
893
|
/**
|
|
341
894
|
* Type definition for `AWS::ECS::TaskDefinition.TaskDefinitionPlacementConstraint`.
|
|
895
|
+
* The constraint on task placement in the task definition. For more information, see [Task placement constraints](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-constraints.html) in the *Amazon Elastic Container Service Developer Guide*.
|
|
896
|
+
Task placement constraints aren't supported for tasks run on FARGATElong.
|
|
342
897
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-taskdefinitionplacementconstraint.html}
|
|
343
898
|
*/
|
|
344
899
|
export type TaskDefinitionPlacementConstraint = {
|
|
900
|
+
/**
|
|
901
|
+
* A cluster query language expression to apply to the constraint. For more information, see [Cluster query language](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-query-language.html) in the *Amazon Elastic Container Service Developer Guide*.
|
|
902
|
+
*/
|
|
345
903
|
Expression?: string;
|
|
904
|
+
/**
|
|
905
|
+
* The type of constraint. The ``MemberOf`` constraint restricts selection to be from a group of valid candidates.
|
|
906
|
+
*/
|
|
346
907
|
Type: string;
|
|
347
908
|
};
|
|
348
909
|
/**
|
|
349
910
|
* Type definition for `AWS::ECS::TaskDefinition.Tmpfs`.
|
|
911
|
+
* The container path, mount options, and size of the tmpfs mount.
|
|
350
912
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-tmpfs.html}
|
|
351
913
|
*/
|
|
352
914
|
export type Tmpfs = {
|
|
915
|
+
/**
|
|
916
|
+
* The absolute file path where the tmpfs volume is to be mounted.
|
|
917
|
+
*/
|
|
353
918
|
ContainerPath?: string;
|
|
919
|
+
/**
|
|
920
|
+
* The list of tmpfs volume mount options.
|
|
921
|
+
Valid values: ``"defaults" | "ro" | "rw" | "suid" | "nosuid" | "dev" | "nodev" | "exec" | "noexec" | "sync" | "async" | "dirsync" | "remount" | "mand" | "nomand" | "atime" | "noatime" | "diratime" | "nodiratime" | "bind" | "rbind" | "unbindable" | "runbindable" | "private" | "rprivate" | "shared" | "rshared" | "slave" | "rslave" | "relatime" | "norelatime" | "strictatime" | "nostrictatime" | "mode" | "uid" | "gid" | "nr_inodes" | "nr_blocks" | "mpol"``
|
|
922
|
+
*/
|
|
354
923
|
MountOptions?: string[];
|
|
924
|
+
/**
|
|
925
|
+
* The maximum size (in MiB) of the tmpfs volume.
|
|
926
|
+
*/
|
|
355
927
|
Size: number;
|
|
356
928
|
};
|
|
357
929
|
/**
|
|
358
930
|
* Type definition for `AWS::ECS::TaskDefinition.Ulimit`.
|
|
931
|
+
* The ``ulimit`` settings to pass to the container.
|
|
932
|
+
Amazon ECS tasks hosted on FARGATElong use the default resource limit values set by the operating system with the exception of the ``nofile`` resource limit parameter which FARGATElong overrides. The ``nofile`` resource limit sets a restriction on the number of open files that a container can use. The default ``nofile`` soft limit is ``1024`` and the default hard limit is ``65535``.
|
|
933
|
+
You can specify the ``ulimit`` settings for a container in a task definition.
|
|
359
934
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-ulimit.html}
|
|
360
935
|
*/
|
|
361
936
|
export type Ulimit = {
|
|
937
|
+
/**
|
|
938
|
+
* The hard limit for the ``ulimit`` type.
|
|
939
|
+
*/
|
|
362
940
|
HardLimit: number;
|
|
941
|
+
/**
|
|
942
|
+
* The ``type`` of the ``ulimit``.
|
|
943
|
+
*/
|
|
363
944
|
Name: string;
|
|
945
|
+
/**
|
|
946
|
+
* The soft limit for the ``ulimit`` type.
|
|
947
|
+
*/
|
|
364
948
|
SoftLimit: number;
|
|
365
949
|
};
|
|
366
950
|
/**
|
|
367
951
|
* Type definition for `AWS::ECS::TaskDefinition.Volume`.
|
|
952
|
+
* The data volume configuration for tasks launched using this task definition. Specifying a volume configuration in a task definition is optional. The volume configuration may contain multiple volumes but only one volume configured at launch is supported. Each volume defined in the volume configuration may only specify a ``name`` and one of either ``configuredAtLaunch``, ``dockerVolumeConfiguration``, ``efsVolumeConfiguration``, ``fsxWindowsFileServerVolumeConfiguration``, or ``host``. If an empty volume configuration is specified, by default Amazon ECS uses a host volume. For more information, see [Using data volumes in tasks](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_data_volumes.html).
|
|
368
953
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-volume.html}
|
|
369
954
|
*/
|
|
370
955
|
export type Volume = {
|
|
956
|
+
/**
|
|
957
|
+
* Indicates whether the volume should be configured at launch time. This is used to create Amazon EBS volumes for standalone tasks or tasks created as part of a service. Each task definition revision may only have one volume configured at launch in the volume configuration.
|
|
958
|
+
To configure a volume at launch time, use this task definition revision and specify a ``volumeConfigurations`` object when calling the ``CreateService``, ``UpdateService``, ``RunTask`` or ``StartTask`` APIs.
|
|
959
|
+
*/
|
|
371
960
|
ConfiguredAtLaunch?: boolean;
|
|
961
|
+
/**
|
|
962
|
+
* This parameter is specified when you use Docker volumes.
|
|
963
|
+
Windows containers only support the use of the ``local`` driver. To use bind mounts, specify the ``host`` parameter instead.
|
|
964
|
+
Docker volumes aren't supported by tasks run on FARGATElong.
|
|
965
|
+
*/
|
|
372
966
|
DockerVolumeConfiguration?: DockerVolumeConfiguration;
|
|
967
|
+
/**
|
|
968
|
+
* This parameter is specified when you use an Amazon Elastic File System file system for task storage.
|
|
969
|
+
*/
|
|
373
970
|
EFSVolumeConfiguration?: EFSVolumeConfiguration;
|
|
971
|
+
/**
|
|
972
|
+
* This parameter is specified when you use bind mount host volumes. The contents of the ``host`` parameter determine whether your bind mount host volume persists on the host container instance and where it's stored. If the ``host`` parameter is empty, then the Docker daemon assigns a host path for your data volume. However, the data isn't guaranteed to persist after the containers that are associated with it stop running.
|
|
973
|
+
Windows containers can mount whole directories on the same drive as ``$env:ProgramData``. Windows containers can't mount directories on a different drive, and mount point can't be across drives. For example, you can mount ``C:\my\path:C:\my\path`` and ``D:\:D:\``, but not ``D:\my\path:C:\my\path`` or ``D:\:C:\my\path``.
|
|
974
|
+
*/
|
|
374
975
|
Host?: HostVolumeProperties;
|
|
976
|
+
/**
|
|
977
|
+
* The name of the volume. Up to 255 letters (uppercase and lowercase), numbers, underscores, and hyphens are allowed.
|
|
978
|
+
When using a volume configured at launch, the ``name`` is required and must also be specified as the volume name in the ``ServiceVolumeConfiguration`` or ``TaskVolumeConfiguration`` parameter when creating your service or standalone task.
|
|
979
|
+
For all other types of volumes, this name is referenced in the ``sourceVolume`` parameter of the ``mountPoints`` object in the container definition.
|
|
980
|
+
When a volume is using the ``efsVolumeConfiguration``, the name is required.
|
|
981
|
+
*/
|
|
375
982
|
Name?: string;
|
|
376
983
|
};
|
|
377
984
|
/**
|
|
378
985
|
* Type definition for `AWS::ECS::TaskDefinition.VolumeFrom`.
|
|
986
|
+
* Details on a data volume from another container in the same task definition.
|
|
379
987
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-volumefrom.html}
|
|
380
988
|
*/
|
|
381
989
|
export type VolumeFrom = {
|
|
990
|
+
/**
|
|
991
|
+
* If this value is ``true``, the container has read-only access to the volume. If this value is ``false``, then the container can write to the volume. The default value is ``false``.
|
|
992
|
+
*/
|
|
382
993
|
ReadOnly?: boolean;
|
|
994
|
+
/**
|
|
995
|
+
* The name of another container within the same task definition to mount volumes from.
|
|
996
|
+
*/
|
|
383
997
|
SourceContainer?: string;
|
|
384
998
|
};
|
|
385
999
|
/**
|
|
386
1000
|
* Resource type definition for `AWS::ECS::TaskDefinition`.
|
|
387
|
-
*
|
|
1001
|
+
* Registers a new task definition from the supplied ``family`` and ``containerDefinitions``. Optionally, you can add data volumes to your containers with the ``volumes`` parameter. For more information about task definition parameters and defaults, see [Amazon ECS Task Definitions](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_defintions.html) in the *Amazon Elastic Container Service Developer Guide*.
|
|
1002
|
+
You can specify a role for your task with the ``taskRoleArn`` parameter. When you specify a role for a task, its containers can then use the latest versions of the CLI or SDKs to make API requests to the AWS services that are specified in the policy that's associated with the role. For more information, see [IAM Roles for Tasks](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html) in the *Amazon Elastic Container Service Developer Guide*.
|
|
1003
|
+
You can specify a Docker networking mode for the containers in your task definition with the ``networkMod
|
|
388
1004
|
* @see {@link https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-taskdefinition.html}
|
|
389
1005
|
*/
|
|
390
1006
|
export declare class ECSTaskDefinition extends $Resource<"AWS::ECS::TaskDefinition", ECSTaskDefinitionProperties, ECSTaskDefinitionAttributes> {
|