Skip to content

Commit 1816b91

Browse files
author
awstools
committed
feat(client-ecs): This release provides the functionality of mounting Amazon S3 Files to Amazon ECS tasks by adding support for the new S3FilesVolumeConfiguration parameter in ECS RegisterTaskDefinition API.
1 parent 2493464 commit 1816b91

11 files changed

Lines changed: 162 additions & 44 deletions

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,12 @@ export interface DeleteTaskDefinitionsCommandOutput extends DeleteTaskDefinition
253253
* // iam: "ENABLED" || "DISABLED",
254254
* // },
255255
* // },
256+
* // s3filesVolumeConfiguration: { // S3FilesVolumeConfiguration
257+
* // fileSystemArn: "STRING_VALUE", // required
258+
* // rootDirectory: "STRING_VALUE",
259+
* // transitEncryptionPort: Number("int"),
260+
* // accessPointArn: "STRING_VALUE",
261+
* // },
256262
* // fsxWindowsFileServerVolumeConfiguration: { // FSxWindowsFileServerVolumeConfiguration
257263
* // fileSystemId: "STRING_VALUE", // required
258264
* // rootDirectory: "STRING_VALUE", // required

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,12 @@ export interface DeregisterTaskDefinitionCommandOutput extends DeregisterTaskDef
250250
* // iam: "ENABLED" || "DISABLED",
251251
* // },
252252
* // },
253+
* // s3filesVolumeConfiguration: { // S3FilesVolumeConfiguration
254+
* // fileSystemArn: "STRING_VALUE", // required
255+
* // rootDirectory: "STRING_VALUE",
256+
* // transitEncryptionPort: Number("int"),
257+
* // accessPointArn: "STRING_VALUE",
258+
* // },
253259
* // fsxWindowsFileServerVolumeConfiguration: { // FSxWindowsFileServerVolumeConfiguration
254260
* // fileSystemId: "STRING_VALUE", // required
255261
* // rootDirectory: "STRING_VALUE", // required

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,12 @@ export interface DescribeTaskDefinitionCommandOutput extends DescribeTaskDefinit
253253
* // iam: "ENABLED" || "DISABLED",
254254
* // },
255255
* // },
256+
* // s3filesVolumeConfiguration: { // S3FilesVolumeConfiguration
257+
* // fileSystemArn: "STRING_VALUE", // required
258+
* // rootDirectory: "STRING_VALUE",
259+
* // transitEncryptionPort: Number("int"),
260+
* // accessPointArn: "STRING_VALUE",
261+
* // },
256262
* // fsxWindowsFileServerVolumeConfiguration: { // FSxWindowsFileServerVolumeConfiguration
257263
* // fileSystemId: "STRING_VALUE", // required
258264
* // rootDirectory: "STRING_VALUE", // required

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
55

66
import type { ECSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ECSClient";
77
import { commonParams } from "../endpoint/EndpointParameters";
8-
import type { ListTaskDefinitionsRequest } from "../models/models_0";
9-
import type { ListTaskDefinitionsResponse } from "../models/models_1";
8+
import type { ListTaskDefinitionsRequest, ListTaskDefinitionsResponse } from "../models/models_1";
109
import { ListTaskDefinitions$ } from "../schemas/schemas_0";
1110

1211
/**

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,12 @@ export interface RegisterTaskDefinitionCommandOutput extends RegisterTaskDefinit
242242
* iam: "ENABLED" || "DISABLED",
243243
* },
244244
* },
245+
* s3filesVolumeConfiguration: { // S3FilesVolumeConfiguration
246+
* fileSystemArn: "STRING_VALUE", // required
247+
* rootDirectory: "STRING_VALUE",
248+
* transitEncryptionPort: Number("int"),
249+
* accessPointArn: "STRING_VALUE",
250+
* },
245251
* fsxWindowsFileServerVolumeConfiguration: { // FSxWindowsFileServerVolumeConfiguration
246252
* fileSystemId: "STRING_VALUE", // required
247253
* rootDirectory: "STRING_VALUE", // required
@@ -508,6 +514,12 @@ export interface RegisterTaskDefinitionCommandOutput extends RegisterTaskDefinit
508514
* // iam: "ENABLED" || "DISABLED",
509515
* // },
510516
* // },
517+
* // s3filesVolumeConfiguration: { // S3FilesVolumeConfiguration
518+
* // fileSystemArn: "STRING_VALUE", // required
519+
* // rootDirectory: "STRING_VALUE",
520+
* // transitEncryptionPort: Number("int"),
521+
* // accessPointArn: "STRING_VALUE",
522+
* // },
511523
* // fsxWindowsFileServerVolumeConfiguration: { // FSxWindowsFileServerVolumeConfiguration
512524
* // fileSystemId: "STRING_VALUE", // required
513525
* // rootDirectory: "STRING_VALUE", // required

clients/client-ecs/src/models/models_0.ts

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -5304,12 +5304,42 @@ export interface FSxWindowsFileServerVolumeConfiguration {
53045304
}
53055305

53065306
/**
5307-
* <p>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 <code>name</code> and one of either <code>configuredAtLaunch</code>, <code>dockerVolumeConfiguration</code>, <code>efsVolumeConfiguration</code>, <code>fsxWindowsFileServerVolumeConfiguration</code>, or <code>host</code>. If an empty volume configuration is specified, by default Amazon ECS uses a host volume. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_data_volumes.html">Using data volumes in tasks</a>.</p>
5307+
* <p>This parameter is specified when you're using an Amazon S3 Files file system for task storage. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/s3files-volumes.html">Amazon S3 Files volumes</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p> <important> <p>Your task definition must include a Task IAM Role. See <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-files-prereq-policies.html#s3-files-prereq-iam-compute-role"> IAM role for attaching your file system to AWS compute resources</a> for required permissions.</p> </important>
5308+
* @public
5309+
*/
5310+
export interface S3FilesVolumeConfiguration {
5311+
/**
5312+
* <p>The full ARN of the S3 Files file system to mount.</p>
5313+
* @public
5314+
*/
5315+
fileSystemArn: string | undefined;
5316+
5317+
/**
5318+
* <p>The directory within the Amazon S3 Files file system to mount as the root directory. If this parameter is omitted, the root of the Amazon S3 Files file system will be used. Specifying <code>/</code> will have the same effect as omitting this parameter.</p> <important> <p>If a S3 Files access point is specified in the <code>accessPointArn</code>, the root directory parameter must either be omitted or set to <code>/</code> which will enforce the path set on the S3 Files access point.</p> </important>
5319+
* @public
5320+
*/
5321+
rootDirectory?: string | undefined;
5322+
5323+
/**
5324+
* <p>The port to use for sending encrypted data between the ECS host and the S3 Files file system. If you do not specify a transit encryption port, it will use the port selection strategy that the Amazon S3 Files mount helper uses. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-files-mounting.html">S3 Files mount helper</a>.</p>
5325+
* @public
5326+
*/
5327+
transitEncryptionPort?: number | undefined;
5328+
5329+
/**
5330+
* <p>The full ARN of the S3 Files access point to use. If an access point is specified, the root directory value specified in the <code>S3FilesVolumeConfiguration</code> must either be omitted or set to <code>/</code> which will enforce the path set on the S3 Files access point. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-files-access-points-creating.html">Creating S3 Files access points</a>.</p>
5331+
* @public
5332+
*/
5333+
accessPointArn?: string | undefined;
5334+
}
5335+
5336+
/**
5337+
* <p>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 <code>name</code> and one of either <code>configuredAtLaunch</code>, <code>dockerVolumeConfiguration</code>, <code>efsVolumeConfiguration</code>, <code>s3filesVolumeConfiguration</code>, <code>fsxWindowsFileServerVolumeConfiguration</code>, or <code>host</code>. If an empty volume configuration is specified, by default Amazon ECS uses a host volume. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_data_volumes.html">Using data volumes in tasks</a>.</p>
53085338
* @public
53095339
*/
53105340
export interface Volume {
53115341
/**
5312-
* <p>The name of the volume. Up to 255 letters (uppercase and lowercase), numbers, underscores, and hyphens are allowed.</p> <p>When using a volume configured at launch, the <code>name</code> is required and must also be specified as the volume name in the <code>ServiceVolumeConfiguration</code> or <code>TaskVolumeConfiguration</code> parameter when creating your service or standalone task.</p> <p>For all other types of volumes, this name is referenced in the <code>sourceVolume</code> parameter of the <code>mountPoints</code> object in the container definition.</p> <p>When a volume is using the <code>efsVolumeConfiguration</code>, the name is required.</p>
5342+
* <p>The name of the volume. Up to 255 letters (uppercase and lowercase), numbers, underscores, and hyphens are allowed.</p> <p>When using a volume configured at launch, the <code>name</code> is required and must also be specified as the volume name in the <code>ServiceVolumeConfiguration</code> or <code>TaskVolumeConfiguration</code> parameter when creating your service or standalone task.</p> <p>For all other types of volumes, this name is referenced in the <code>sourceVolume</code> parameter of the <code>mountPoints</code> object in the container definition.</p> <p>When a volume is using the <code>efsVolumeConfiguration</code>, the name is required.</p> <p>When a volume is using the <code>s3filesVolumeConfiguration</code>, the name is required.</p>
53135343
* @public
53145344
*/
53155345
name?: string | undefined;
@@ -5332,6 +5362,12 @@ export interface Volume {
53325362
*/
53335363
efsVolumeConfiguration?: EFSVolumeConfiguration | undefined;
53345364

5365+
/**
5366+
* <p>This parameter is specified when you use an Amazon S3 Files file system for task storage.</p>
5367+
* @public
5368+
*/
5369+
s3filesVolumeConfiguration?: S3FilesVolumeConfiguration | undefined;
5370+
53355371
/**
53365372
* <p>This parameter is specified when you use Amazon FSx for Windows File Server file system for task storage.</p>
53375373
* @public
@@ -9296,39 +9332,3 @@ export interface DeleteTaskDefinitionsResponse {
92969332
*/
92979333
failures?: Failure[] | undefined;
92989334
}
9299-
9300-
/**
9301-
*
9302-
* @public
9303-
*/
9304-
export interface ListTaskDefinitionsRequest {
9305-
/**
9306-
* <p>The full family name to filter the <code>ListTaskDefinitions</code> results with. Specifying a <code>familyPrefix</code> limits the listed task definitions to task definition revisions that belong to that family.</p>
9307-
* @public
9308-
*/
9309-
familyPrefix?: string | undefined;
9310-
9311-
/**
9312-
* <p>The task definition status to filter the <code>ListTaskDefinitions</code> results with. By default, only <code>ACTIVE</code> task definitions are listed. By setting this parameter to <code>INACTIVE</code>, you can view task definitions that are <code>INACTIVE</code> as long as an active task or service still references them. If you paginate the resulting output, be sure to keep the <code>status</code> value constant in each subsequent request.</p>
9313-
* @public
9314-
*/
9315-
status?: TaskDefinitionStatus | undefined;
9316-
9317-
/**
9318-
* <p>The order to sort the results in. Valid values are <code>ASC</code> and <code>DESC</code>. By default, (<code>ASC</code>) task definitions are listed lexicographically by family name and in ascending numerical order by revision so that the newest task definitions in a family are listed last. Setting this parameter to <code>DESC</code> reverses the sort order on family name and revision. This is so that the newest task definitions in a family are listed first.</p>
9319-
* @public
9320-
*/
9321-
sort?: SortOrder | undefined;
9322-
9323-
/**
9324-
* <p>The <code>nextToken</code> value returned from a <code>ListTaskDefinitions</code> request indicating that more results are available to fulfill the request and further calls will be needed. If <code>maxResults</code> was provided, it is possible the number of results to be fewer than <code>maxResults</code>.</p> <note> <p>This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.</p> </note>
9325-
* @public
9326-
*/
9327-
nextToken?: string | undefined;
9328-
9329-
/**
9330-
* <p>The maximum number of task definition results that <code>ListTaskDefinitions</code> returned in paginated output. When this parameter is used, <code>ListTaskDefinitions</code> only returns <code>maxResults</code> results in a single page along with a <code>nextToken</code> response element. The remaining results of the initial request can be seen by sending another <code>ListTaskDefinitions</code> request with the returned <code>nextToken</code> value. This value can be between 1 and 100. If this parameter isn't used, then <code>ListTaskDefinitions</code> returns up to 100 results and a <code>nextToken</code> value if applicable.</p>
9331-
* @public
9332-
*/
9333-
maxResults?: number | undefined;
9334-
}

clients/client-ecs/src/models/models_1.ts

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import type {
99
NetworkMode,
1010
PidMode,
1111
PropagateTags,
12+
SortOrder,
13+
TaskDefinitionStatus,
1214
TaskField,
1315
TaskFilesystemType,
1416
TaskSetField,
@@ -42,6 +44,42 @@ import type {
4244
Volume,
4345
} from "./models_0";
4446

47+
/**
48+
*
49+
* @public
50+
*/
51+
export interface ListTaskDefinitionsRequest {
52+
/**
53+
* <p>The full family name to filter the <code>ListTaskDefinitions</code> results with. Specifying a <code>familyPrefix</code> limits the listed task definitions to task definition revisions that belong to that family.</p>
54+
* @public
55+
*/
56+
familyPrefix?: string | undefined;
57+
58+
/**
59+
* <p>The task definition status to filter the <code>ListTaskDefinitions</code> results with. By default, only <code>ACTIVE</code> task definitions are listed. By setting this parameter to <code>INACTIVE</code>, you can view task definitions that are <code>INACTIVE</code> as long as an active task or service still references them. If you paginate the resulting output, be sure to keep the <code>status</code> value constant in each subsequent request.</p>
60+
* @public
61+
*/
62+
status?: TaskDefinitionStatus | undefined;
63+
64+
/**
65+
* <p>The order to sort the results in. Valid values are <code>ASC</code> and <code>DESC</code>. By default, (<code>ASC</code>) task definitions are listed lexicographically by family name and in ascending numerical order by revision so that the newest task definitions in a family are listed last. Setting this parameter to <code>DESC</code> reverses the sort order on family name and revision. This is so that the newest task definitions in a family are listed first.</p>
66+
* @public
67+
*/
68+
sort?: SortOrder | undefined;
69+
70+
/**
71+
* <p>The <code>nextToken</code> value returned from a <code>ListTaskDefinitions</code> request indicating that more results are available to fulfill the request and further calls will be needed. If <code>maxResults</code> was provided, it is possible the number of results to be fewer than <code>maxResults</code>.</p> <note> <p>This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.</p> </note>
72+
* @public
73+
*/
74+
nextToken?: string | undefined;
75+
76+
/**
77+
* <p>The maximum number of task definition results that <code>ListTaskDefinitions</code> returned in paginated output. When this parameter is used, <code>ListTaskDefinitions</code> only returns <code>maxResults</code> results in a single page along with a <code>nextToken</code> response element. The remaining results of the initial request can be seen by sending another <code>ListTaskDefinitions</code> request with the returned <code>nextToken</code> value. This value can be between 1 and 100. If this parameter isn't used, then <code>ListTaskDefinitions</code> returns up to 100 results and a <code>nextToken</code> value if applicable.</p>
78+
* @public
79+
*/
80+
maxResults?: number | undefined;
81+
}
82+
4583
/**
4684
*
4785
* @public

clients/client-ecs/src/schemas/schemas_0.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,7 @@ const _SDe = "ServiceDeployments";
437437
const _SE = "ServerException";
438438
const _SEe = "ServiceEvent";
439439
const _SEer = "ServiceEvents";
440+
const _SFVC = "S3FilesVolumeConfiguration";
440441
const _SL = "SecretList";
441442
const _SMEBSVC = "ServiceManagedEBSVolumeConfiguration";
442443
const _SNAE = "ServiceNotActiveException";
@@ -566,6 +567,7 @@ const _aN = "alarmNames";
566567
const _aNc = "acceleratorNames";
567568
const _aNt = "attributeName";
568569
const _aP = "appProtocol";
570+
const _aPA = "accessPointArn";
569571
const _aPAA = "awsPcaAuthorityArn";
570572
const _aPI = "assignPublicIp";
571573
const _aPIc = "accessPointId";
@@ -744,6 +746,7 @@ const _fES = "fargateEphemeralStorage";
744746
const _fESKKI = "fargateEphemeralStorageKmsKeyId";
745747
const _fND = "forceNewDeployment";
746748
const _fP = "familyPrefix";
749+
const _fSA = "fileSystemArn";
747750
const _fSI = "fileSystemId";
748751
const _fT = "failedTasks";
749752
const _fTi = "filesystemType";
@@ -1011,6 +1014,7 @@ const _sTt = "stopTimeout";
10111014
const _sTto = "stopType";
10121015
const _sU = "streamUrl";
10131016
const _sV = "sourceVolume";
1017+
const _sVC = "s3filesVolumeConfiguration";
10141018
const _sc = "scale";
10151019
const _sch = "scheme";
10161020
const _sco = "scope";
@@ -2587,6 +2591,11 @@ export var RuntimePlatform$: StaticStructureSchema = [3, n0, _RP,
25872591
[_cAp, _oSF],
25882592
[0, 0]
25892593
];
2594+
export var S3FilesVolumeConfiguration$: StaticStructureSchema = [3, n0, _SFVC,
2595+
0,
2596+
[_fSA, _rD, _tEP, _aPA],
2597+
[0, 0, 1, 0], 1
2598+
];
25902599
export var Scale$: StaticStructureSchema = [3, n0, _S,
25912600
0,
25922601
[_v, _un],
@@ -3009,8 +3018,8 @@ export var VersionInfo$: StaticStructureSchema = [3, n0, _VI,
30093018
];
30103019
export var Volume$: StaticStructureSchema = [3, n0, _V,
30113020
0,
3012-
[_n, _ho, _dVC, _eVC, _fWFSVC, _cAL],
3013-
[0, () => HostVolumeProperties$, () => DockerVolumeConfiguration$, () => EFSVolumeConfiguration$, () => FSxWindowsFileServerVolumeConfiguration$, 2]
3021+
[_n, _ho, _dVC, _eVC, _sVC, _fWFSVC, _cAL],
3022+
[0, () => HostVolumeProperties$, () => DockerVolumeConfiguration$, () => EFSVolumeConfiguration$, () => S3FilesVolumeConfiguration$, () => FSxWindowsFileServerVolumeConfiguration$, 2]
30143023
];
30153024
export var VolumeFrom$: StaticStructureSchema = [3, n0, _VF,
30163025
0,

clients/client-ecs/test/index-objects.spec.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,7 @@ import {
490490
RunTaskRequest$,
491491
RunTaskResponse$,
492492
RuntimePlatform$,
493+
S3FilesVolumeConfiguration$,
493494
Scale$,
494495
ScaleUnit,
495496
SchedulingStrategy,
@@ -1086,6 +1087,7 @@ assert(typeof Rollback$ === "object");
10861087
assert(typeof RunTaskRequest$ === "object");
10871088
assert(typeof RunTaskResponse$ === "object");
10881089
assert(typeof RuntimePlatform$ === "object");
1090+
assert(typeof S3FilesVolumeConfiguration$ === "object");
10891091
assert(typeof Scale$ === "object");
10901092
assert(typeof Secret$ === "object");
10911093
assert(typeof Service$ === "object");

clients/client-ecs/test/index-types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -579,6 +579,7 @@ export type {
579579
RunTaskRequest,
580580
RunTaskResponse,
581581
RuntimePlatform,
582+
S3FilesVolumeConfiguration,
582583
Scale,
583584
Secret,
584585
Service,

0 commit comments

Comments
 (0)