Skip to content

Commit 8b7b13e

Browse files
author
awstools
committed
feat(client-ecs): This release adds support for adding an ElasticBlockStorage volume configurations in ECS RunTask/StartTask/CreateService/UpdateService APIs. The configuration allows for attaching EBS volumes to ECS Tasks.
1 parent 0f0b785 commit 8b7b13e

19 files changed

+1577
-398
lines changed

clients/client-ecs/src/commands/CreateClusterCommand.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ export interface CreateClusterCommandOutput extends CreateClusterResponse, __Met
3434
* <note>
3535
* <p>When you call the <a>CreateCluster</a> API operation, Amazon ECS attempts to
3636
* create the Amazon ECS service-linked role for your account. This is so that it can manage
37-
* required resources in other Amazon Web Services services on your behalf. However, if the user
38-
* that makes the call doesn't have permissions to create the service-linked role, it
39-
* isn't created. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using-service-linked-roles.html">Using
37+
* required resources in other Amazon Web Services services on your behalf. However, if the user that
38+
* makes the call doesn't have permissions to create the service-linked role, it isn't
39+
* created. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using-service-linked-roles.html">Using
4040
* service-linked roles for Amazon ECS</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
4141
* </note>
4242
* @example

clients/client-ecs/src/commands/CreateServiceCommand.ts

Lines changed: 60 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ export interface CreateServiceCommandOutput extends CreateServiceResponse, __Met
3939
* optionally run your service behind one or more load balancers. The load balancers
4040
* distribute traffic across the tasks that are associated with the service. For more
4141
* information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-load-balancing.html">Service load balancing</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
42+
* <p>You can attach Amazon EBS volumes to Amazon ECS tasks by configuring the volume when creating or
43+
* updating a service. <code>volumeConfigurations</code> is only supported for REPLICA
44+
* service and not DAEMON service. For more infomation, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ebs-volumes.html#ebs-volume-types">Amazon EBS volumes</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
4245
* <p>Tasks for services that don't use a load balancer are considered healthy if they're in
4346
* the <code>RUNNING</code> state. Tasks for services that use a load balancer are
4447
* considered healthy if they're in the <code>RUNNING</code> state and are reported as
@@ -227,6 +230,34 @@ export interface CreateServiceCommandOutput extends CreateServiceResponse, __Met
227230
* ],
228231
* },
229232
* },
233+
* volumeConfigurations: [ // ServiceVolumeConfigurations
234+
* { // ServiceVolumeConfiguration
235+
* name: "STRING_VALUE", // required
236+
* managedEBSVolume: { // ServiceManagedEBSVolumeConfiguration
237+
* encrypted: true || false,
238+
* kmsKeyId: "STRING_VALUE",
239+
* volumeType: "STRING_VALUE",
240+
* sizeInGiB: Number("int"),
241+
* snapshotId: "STRING_VALUE",
242+
* iops: Number("int"),
243+
* throughput: Number("int"),
244+
* tagSpecifications: [ // EBSTagSpecifications
245+
* { // EBSTagSpecification
246+
* resourceType: "volume", // required
247+
* tags: [
248+
* {
249+
* key: "STRING_VALUE",
250+
* value: "STRING_VALUE",
251+
* },
252+
* ],
253+
* propagateTags: "TASK_DEFINITION" || "SERVICE" || "NONE",
254+
* },
255+
* ],
256+
* roleArn: "STRING_VALUE", // required
257+
* filesystemType: "ext3" || "ext4" || "xfs",
258+
* },
259+
* },
260+
* ],
230261
* };
231262
* const command = new CreateServiceCommand(input);
232263
* const response = await client.send(command);
@@ -416,6 +447,34 @@ export interface CreateServiceCommandOutput extends CreateServiceResponse, __Met
416447
* // discoveryArn: "STRING_VALUE",
417448
* // },
418449
* // ],
450+
* // volumeConfigurations: [ // ServiceVolumeConfigurations
451+
* // { // ServiceVolumeConfiguration
452+
* // name: "STRING_VALUE", // required
453+
* // managedEBSVolume: { // ServiceManagedEBSVolumeConfiguration
454+
* // encrypted: true || false,
455+
* // kmsKeyId: "STRING_VALUE",
456+
* // volumeType: "STRING_VALUE",
457+
* // sizeInGiB: Number("int"),
458+
* // snapshotId: "STRING_VALUE",
459+
* // iops: Number("int"),
460+
* // throughput: Number("int"),
461+
* // tagSpecifications: [ // EBSTagSpecifications
462+
* // { // EBSTagSpecification
463+
* // resourceType: "volume", // required
464+
* // tags: [
465+
* // {
466+
* // key: "STRING_VALUE",
467+
* // value: "STRING_VALUE",
468+
* // },
469+
* // ],
470+
* // propagateTags: "TASK_DEFINITION" || "SERVICE" || "NONE",
471+
* // },
472+
* // ],
473+
* // roleArn: "STRING_VALUE", // required
474+
* // filesystemType: "ext3" || "ext4" || "xfs",
475+
* // },
476+
* // },
477+
* // ],
419478
* // },
420479
* // ],
421480
* // roleArn: "STRING_VALUE",
@@ -451,12 +510,7 @@ export interface CreateServiceCommandOutput extends CreateServiceResponse, __Met
451510
* // deploymentController: { // DeploymentController
452511
* // type: "ECS" || "CODE_DEPLOY" || "EXTERNAL", // required
453512
* // },
454-
* // tags: [
455-
* // {
456-
* // key: "STRING_VALUE",
457-
* // value: "STRING_VALUE",
458-
* // },
459-
* // ],
513+
* // tags: "<Tags>",
460514
* // createdBy: "STRING_VALUE",
461515
* // enableECSManagedTags: true || false,
462516
* // propagateTags: "TASK_DEFINITION" || "SERVICE" || "NONE",

clients/client-ecs/src/commands/DeleteAccountSettingCommand.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ export interface DeleteAccountSettingCommandOutput extends DeleteAccountSettingR
2828

2929
/**
3030
* @public
31-
* <p>Disables an account setting for a specified user, role, or the root user for
32-
* an account.</p>
31+
* <p>Disables an account setting for a specified user, role, or the root user for an
32+
* account.</p>
3333
* @example
3434
* Use a bare-bones client and the command you need to make an API call.
3535
* ```javascript

clients/client-ecs/src/commands/DeleteServiceCommand.ts

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,34 @@ export interface DeleteServiceCommandOutput extends DeleteServiceResponse, __Met
248248
* // discoveryArn: "STRING_VALUE",
249249
* // },
250250
* // ],
251+
* // volumeConfigurations: [ // ServiceVolumeConfigurations
252+
* // { // ServiceVolumeConfiguration
253+
* // name: "STRING_VALUE", // required
254+
* // managedEBSVolume: { // ServiceManagedEBSVolumeConfiguration
255+
* // encrypted: true || false,
256+
* // kmsKeyId: "STRING_VALUE",
257+
* // volumeType: "STRING_VALUE",
258+
* // sizeInGiB: Number("int"),
259+
* // snapshotId: "STRING_VALUE",
260+
* // iops: Number("int"),
261+
* // throughput: Number("int"),
262+
* // tagSpecifications: [ // EBSTagSpecifications
263+
* // { // EBSTagSpecification
264+
* // resourceType: "volume", // required
265+
* // tags: [
266+
* // {
267+
* // key: "STRING_VALUE",
268+
* // value: "STRING_VALUE",
269+
* // },
270+
* // ],
271+
* // propagateTags: "TASK_DEFINITION" || "SERVICE" || "NONE",
272+
* // },
273+
* // ],
274+
* // roleArn: "STRING_VALUE", // required
275+
* // filesystemType: "ext3" || "ext4" || "xfs",
276+
* // },
277+
* // },
278+
* // ],
251279
* // },
252280
* // ],
253281
* // roleArn: "STRING_VALUE",
@@ -283,12 +311,7 @@ export interface DeleteServiceCommandOutput extends DeleteServiceResponse, __Met
283311
* // deploymentController: { // DeploymentController
284312
* // type: "ECS" || "CODE_DEPLOY" || "EXTERNAL", // required
285313
* // },
286-
* // tags: [
287-
* // {
288-
* // key: "STRING_VALUE",
289-
* // value: "STRING_VALUE",
290-
* // },
291-
* // ],
314+
* // tags: "<Tags>",
292315
* // createdBy: "STRING_VALUE",
293316
* // enableECSManagedTags: true || false,
294317
* // propagateTags: "TASK_DEFINITION" || "SERVICE" || "NONE",

clients/client-ecs/src/commands/DeleteTaskDefinitionsCommand.ts

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,25 @@ export interface DeleteTaskDefinitionsCommandOutput extends DeleteTaskDefinition
2929
/**
3030
* @public
3131
* <p>Deletes one or more task definitions.</p>
32-
* <p>You must deregister a task definition revision before you delete it. For more information,
33-
* see <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_DeregisterTaskDefinition.html">DeregisterTaskDefinition</a>.</p>
32+
* <p>You must deregister a task definition revision before you delete it. For more
33+
* information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_DeregisterTaskDefinition.html">DeregisterTaskDefinition</a>.</p>
3434
* <p>When you delete a task definition revision, it is immediately transitions from the
35-
* <code>INACTIVE</code> to <code>DELETE_IN_PROGRESS</code>. Existing tasks and services
36-
* that reference a <code>DELETE_IN_PROGRESS</code> task definition revision continue to run
37-
* without disruption. Existing services that reference a <code>DELETE_IN_PROGRESS</code> task
38-
* definition revision can still scale up or down by modifying the service's desired
39-
* count.</p>
40-
* <p>You can't use a <code>DELETE_IN_PROGRESS</code> task definition revision to run new tasks
41-
* or create new services. You also can't update an existing service to reference a
42-
* <code>DELETE_IN_PROGRESS</code> task definition revision.</p>
35+
* <code>INACTIVE</code> to <code>DELETE_IN_PROGRESS</code>. Existing tasks and
36+
* services that reference a <code>DELETE_IN_PROGRESS</code> task definition revision
37+
* continue to run without disruption. Existing services that reference a
38+
* <code>DELETE_IN_PROGRESS</code> task definition revision can still scale up or down
39+
* by modifying the service's desired count.</p>
40+
* <p>You can't use a <code>DELETE_IN_PROGRESS</code> task definition revision to run new
41+
* tasks or create new services. You also can't update an existing service to reference a
42+
* <code>DELETE_IN_PROGRESS</code> task definition revision.</p>
4343
* <p> A task definition revision will stay in <code>DELETE_IN_PROGRESS</code> status until
4444
* all the associated tasks and services have been terminated.</p>
45-
* <p>When you delete all <code>INACTIVE</code> task definition revisions, the task definition name is not displayed in the console and not returned in the API. If a task definition revisions are in the <code>DELETE_IN_PROGRESS</code> state, the task definition name is displayed in the console and returned in the API. The task definition name is retained by Amazon ECS and the revision is incremented the next time you create a task definition with that name.</p>
45+
* <p>When you delete all <code>INACTIVE</code> task definition revisions, the task
46+
* definition name is not displayed in the console and not returned in the API. If a task
47+
* definition revisions are in the <code>DELETE_IN_PROGRESS</code> state, the task
48+
* definition name is displayed in the console and returned in the API. The task definition
49+
* name is retained by Amazon ECS and the revision is incremented the next time you create a
50+
* task definition with that name.</p>
4651
* @example
4752
* Use a bare-bones client and the command you need to make an API call.
4853
* ```javascript
@@ -266,6 +271,7 @@ export interface DeleteTaskDefinitionsCommandOutput extends DeleteTaskDefinition
266271
* // domain: "STRING_VALUE", // required
267272
* // },
268273
* // },
274+
* // configuredAtLaunch: true || false,
269275
* // },
270276
* // ],
271277
* // status: "ACTIVE" || "INACTIVE" || "DELETE_IN_PROGRESS",

clients/client-ecs/src/commands/DeregisterTaskDefinitionCommand.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ export interface DeregisterTaskDefinitionCommandOutput extends DeregisterTaskDef
2828

2929
/**
3030
* @public
31-
* <p>Deregisters the specified task definition by family and revision. Upon deregistration, the
32-
* task definition is marked as <code>INACTIVE</code>. Existing tasks and services that
31+
* <p>Deregisters the specified task definition by family and revision. Upon deregistration,
32+
* the task definition is marked as <code>INACTIVE</code>. Existing tasks and services that
3333
* reference an <code>INACTIVE</code> task definition continue to run without disruption.
3434
* Existing services that reference an <code>INACTIVE</code> task definition can still
35-
* scale up or down by modifying the service's desired count. If you want to delete a task
36-
* definition revision, you must first deregister the task definition revision.</p>
35+
* scale up or down by modifying the service's desired count. If you want to delete a task
36+
* definition revision, you must first deregister the task definition revision.</p>
3737
* <p>You can't use an <code>INACTIVE</code> task definition to run new tasks or create new
3838
* services, and you can't update an existing service to reference an <code>INACTIVE</code>
3939
* task definition. However, there may be up to a 10-minute window following deregistration
@@ -44,8 +44,8 @@ export interface DeregisterTaskDefinitionCommandOutput extends DeregisterTaskDef
4444
* don't recommend that you rely on <code>INACTIVE</code> task definitions persisting
4545
* beyond the lifecycle of any associated tasks and services.</p>
4646
* </note>
47-
* <p>You must deregister a task definition revision before you delete it. For more information,
48-
* see <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_DeleteTaskDefinitions.html">DeleteTaskDefinitions</a>.</p>
47+
* <p>You must deregister a task definition revision before you delete it. For more
48+
* information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_DeleteTaskDefinitions.html">DeleteTaskDefinitions</a>.</p>
4949
* @example
5050
* Use a bare-bones client and the command you need to make an API call.
5151
* ```javascript
@@ -266,6 +266,7 @@ export interface DeregisterTaskDefinitionCommandOutput extends DeregisterTaskDef
266266
* // domain: "STRING_VALUE", // required
267267
* // },
268268
* // },
269+
* // configuredAtLaunch: true || false,
269270
* // },
270271
* // ],
271272
* // status: "ACTIVE" || "INACTIVE" || "DELETE_IN_PROGRESS",

clients/client-ecs/src/commands/DescribeServicesCommand.ts

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,34 @@ export interface DescribeServicesCommandOutput extends DescribeServicesResponse,
233233
* // discoveryArn: "STRING_VALUE",
234234
* // },
235235
* // ],
236+
* // volumeConfigurations: [ // ServiceVolumeConfigurations
237+
* // { // ServiceVolumeConfiguration
238+
* // name: "STRING_VALUE", // required
239+
* // managedEBSVolume: { // ServiceManagedEBSVolumeConfiguration
240+
* // encrypted: true || false,
241+
* // kmsKeyId: "STRING_VALUE",
242+
* // volumeType: "STRING_VALUE",
243+
* // sizeInGiB: Number("int"),
244+
* // snapshotId: "STRING_VALUE",
245+
* // iops: Number("int"),
246+
* // throughput: Number("int"),
247+
* // tagSpecifications: [ // EBSTagSpecifications
248+
* // { // EBSTagSpecification
249+
* // resourceType: "volume", // required
250+
* // tags: [
251+
* // {
252+
* // key: "STRING_VALUE",
253+
* // value: "STRING_VALUE",
254+
* // },
255+
* // ],
256+
* // propagateTags: "TASK_DEFINITION" || "SERVICE" || "NONE",
257+
* // },
258+
* // ],
259+
* // roleArn: "STRING_VALUE", // required
260+
* // filesystemType: "ext3" || "ext4" || "xfs",
261+
* // },
262+
* // },
263+
* // ],
236264
* // },
237265
* // ],
238266
* // roleArn: "STRING_VALUE",
@@ -268,12 +296,7 @@ export interface DescribeServicesCommandOutput extends DescribeServicesResponse,
268296
* // deploymentController: { // DeploymentController
269297
* // type: "ECS" || "CODE_DEPLOY" || "EXTERNAL", // required
270298
* // },
271-
* // tags: [
272-
* // {
273-
* // key: "STRING_VALUE",
274-
* // value: "STRING_VALUE",
275-
* // },
276-
* // ],
299+
* // tags: "<Tags>",
277300
* // createdBy: "STRING_VALUE",
278301
* // enableECSManagedTags: true || false,
279302
* // propagateTags: "TASK_DEFINITION" || "SERVICE" || "NONE",

clients/client-ecs/src/commands/DescribeTaskDefinitionCommand.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ export interface DescribeTaskDefinitionCommandOutput extends DescribeTaskDefinit
259259
* // domain: "STRING_VALUE", // required
260260
* // },
261261
* // },
262+
* // configuredAtLaunch: true || false,
262263
* // },
263264
* // ],
264265
* // status: "ACTIVE" || "INACTIVE" || "DELETE_IN_PROGRESS",

clients/client-ecs/src/commands/ExecuteCommandCommand.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,13 @@ export interface ExecuteCommandCommandOutput extends ExecuteCommandResponse, __M
3333
/**
3434
* @public
3535
* <p>Runs a command remotely on a container within a task.</p>
36-
* <p>If you use a condition key in your IAM policy to refine the conditions for the policy
37-
* statement, for example limit the actions to a specific cluster, you receive an
36+
* <p>If you use a condition key in your IAM policy to refine the conditions for the
37+
* policy statement, for example limit the actions to a specific cluster, you receive an
3838
* <code>AccessDeniedException</code> when there is a mismatch between the condition
3939
* key value and the corresponding parameter value.</p>
40-
* <p>For information about required permissions and considerations, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-exec.html">Using Amazon ECS Exec for
41-
* debugging</a> in the <i>Amazon ECS Developer Guide</i>. </p>
40+
* <p>For information about required permissions and considerations, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-exec.html">Using Amazon ECS
41+
* Exec for debugging</a> in the <i>Amazon ECS Developer Guide</i>.
42+
* </p>
4243
* @example
4344
* Use a bare-bones client and the command you need to make an API call.
4445
* ```javascript
@@ -104,8 +105,8 @@ export interface ExecuteCommandCommandOutput extends ExecuteCommandResponse, __M
104105
* <p>The SSM agent is not installed or is not running</p>
105106
* </li>
106107
* <li>
107-
* <p> There is an interface Amazon VPC endpoint for Amazon ECS, but there is not one for Systems
108-
* Manager Session Manager</p>
108+
* <p> There is an interface Amazon VPC endpoint for Amazon ECS, but there is not one for
109+
* Systems Manager Session Manager</p>
109110
* </li>
110111
* </ul>
111112
* <p>For information about how to troubleshoot the issues, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-exec.html">Troubleshooting issues with ECS

clients/client-ecs/src/commands/ListTasksCommand.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ export interface ListTasksCommandOutput extends ListTasksResponse, __MetadataBea
2929
/**
3030
* @public
3131
* <p>Returns a list of tasks. You can filter the results by cluster, task definition
32-
* family, container instance, launch type, what IAM principal started the task, or by the
33-
* desired status of the task.</p>
32+
* family, container instance, launch type, what IAM principal started the task, or by
33+
* the desired status of the task.</p>
3434
* <p>Recently stopped tasks might appear in the returned results. </p>
3535
* @example
3636
* Use a bare-bones client and the command you need to make an API call.

0 commit comments

Comments
 (0)