Skip to content

Commit

Permalink
feat(client-ecs): This release adds support for adding an ElasticBloc…
Browse files Browse the repository at this point in the history
…kStorage volume configurations in ECS RunTask/StartTask/CreateService/UpdateService APIs. The configuration allows for attaching EBS volumes to ECS Tasks.
  • Loading branch information
awstools committed Jan 11, 2024
1 parent 0f0b785 commit 8b7b13e
Show file tree
Hide file tree
Showing 19 changed files with 1,577 additions and 398 deletions.
6 changes: 3 additions & 3 deletions clients/client-ecs/src/commands/CreateClusterCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ export interface CreateClusterCommandOutput extends CreateClusterResponse, __Met
* <note>
* <p>When you call the <a>CreateCluster</a> API operation, Amazon ECS attempts to
* create the Amazon ECS service-linked role for your account. This is so that it can manage
* required resources in other Amazon Web Services services on your behalf. However, if the user
* that makes the call doesn't have permissions to create the service-linked role, it
* isn't created. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using-service-linked-roles.html">Using
* required resources in other Amazon Web Services services on your behalf. However, if the user that
* makes the call doesn't have permissions to create the service-linked role, it isn't
* created. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using-service-linked-roles.html">Using
* service-linked roles for Amazon ECS</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
* </note>
* @example
Expand Down
66 changes: 60 additions & 6 deletions clients/client-ecs/src/commands/CreateServiceCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ export interface CreateServiceCommandOutput extends CreateServiceResponse, __Met
* optionally run your service behind one or more load balancers. The load balancers
* distribute traffic across the tasks that are associated with the service. For more
* 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>
* <p>You can attach Amazon EBS volumes to Amazon ECS tasks by configuring the volume when creating or
* updating a service. <code>volumeConfigurations</code> is only supported for REPLICA
* 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>
* <p>Tasks for services that don't use a load balancer are considered healthy if they're in
* the <code>RUNNING</code> state. Tasks for services that use a load balancer are
* considered healthy if they're in the <code>RUNNING</code> state and are reported as
Expand Down Expand Up @@ -227,6 +230,34 @@ export interface CreateServiceCommandOutput extends CreateServiceResponse, __Met
* ],
* },
* },
* volumeConfigurations: [ // ServiceVolumeConfigurations
* { // ServiceVolumeConfiguration
* name: "STRING_VALUE", // required
* managedEBSVolume: { // ServiceManagedEBSVolumeConfiguration
* encrypted: true || false,
* kmsKeyId: "STRING_VALUE",
* volumeType: "STRING_VALUE",
* sizeInGiB: Number("int"),
* snapshotId: "STRING_VALUE",
* iops: Number("int"),
* throughput: Number("int"),
* tagSpecifications: [ // EBSTagSpecifications
* { // EBSTagSpecification
* resourceType: "volume", // required
* tags: [
* {
* key: "STRING_VALUE",
* value: "STRING_VALUE",
* },
* ],
* propagateTags: "TASK_DEFINITION" || "SERVICE" || "NONE",
* },
* ],
* roleArn: "STRING_VALUE", // required
* filesystemType: "ext3" || "ext4" || "xfs",
* },
* },
* ],
* };
* const command = new CreateServiceCommand(input);
* const response = await client.send(command);
Expand Down Expand Up @@ -416,6 +447,34 @@ export interface CreateServiceCommandOutput extends CreateServiceResponse, __Met
* // discoveryArn: "STRING_VALUE",
* // },
* // ],
* // volumeConfigurations: [ // ServiceVolumeConfigurations
* // { // ServiceVolumeConfiguration
* // name: "STRING_VALUE", // required
* // managedEBSVolume: { // ServiceManagedEBSVolumeConfiguration
* // encrypted: true || false,
* // kmsKeyId: "STRING_VALUE",
* // volumeType: "STRING_VALUE",
* // sizeInGiB: Number("int"),
* // snapshotId: "STRING_VALUE",
* // iops: Number("int"),
* // throughput: Number("int"),
* // tagSpecifications: [ // EBSTagSpecifications
* // { // EBSTagSpecification
* // resourceType: "volume", // required
* // tags: [
* // {
* // key: "STRING_VALUE",
* // value: "STRING_VALUE",
* // },
* // ],
* // propagateTags: "TASK_DEFINITION" || "SERVICE" || "NONE",
* // },
* // ],
* // roleArn: "STRING_VALUE", // required
* // filesystemType: "ext3" || "ext4" || "xfs",
* // },
* // },
* // ],
* // },
* // ],
* // roleArn: "STRING_VALUE",
Expand Down Expand Up @@ -451,12 +510,7 @@ export interface CreateServiceCommandOutput extends CreateServiceResponse, __Met
* // deploymentController: { // DeploymentController
* // type: "ECS" || "CODE_DEPLOY" || "EXTERNAL", // required
* // },
* // tags: [
* // {
* // key: "STRING_VALUE",
* // value: "STRING_VALUE",
* // },
* // ],
* // tags: "<Tags>",
* // createdBy: "STRING_VALUE",
* // enableECSManagedTags: true || false,
* // propagateTags: "TASK_DEFINITION" || "SERVICE" || "NONE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ export interface DeleteAccountSettingCommandOutput extends DeleteAccountSettingR

/**
* @public
* <p>Disables an account setting for a specified user, role, or the root user for
* an account.</p>
* <p>Disables an account setting for a specified user, role, or the root user for an
* account.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
35 changes: 29 additions & 6 deletions clients/client-ecs/src/commands/DeleteServiceCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,34 @@ export interface DeleteServiceCommandOutput extends DeleteServiceResponse, __Met
* // discoveryArn: "STRING_VALUE",
* // },
* // ],
* // volumeConfigurations: [ // ServiceVolumeConfigurations
* // { // ServiceVolumeConfiguration
* // name: "STRING_VALUE", // required
* // managedEBSVolume: { // ServiceManagedEBSVolumeConfiguration
* // encrypted: true || false,
* // kmsKeyId: "STRING_VALUE",
* // volumeType: "STRING_VALUE",
* // sizeInGiB: Number("int"),
* // snapshotId: "STRING_VALUE",
* // iops: Number("int"),
* // throughput: Number("int"),
* // tagSpecifications: [ // EBSTagSpecifications
* // { // EBSTagSpecification
* // resourceType: "volume", // required
* // tags: [
* // {
* // key: "STRING_VALUE",
* // value: "STRING_VALUE",
* // },
* // ],
* // propagateTags: "TASK_DEFINITION" || "SERVICE" || "NONE",
* // },
* // ],
* // roleArn: "STRING_VALUE", // required
* // filesystemType: "ext3" || "ext4" || "xfs",
* // },
* // },
* // ],
* // },
* // ],
* // roleArn: "STRING_VALUE",
Expand Down Expand Up @@ -283,12 +311,7 @@ export interface DeleteServiceCommandOutput extends DeleteServiceResponse, __Met
* // deploymentController: { // DeploymentController
* // type: "ECS" || "CODE_DEPLOY" || "EXTERNAL", // required
* // },
* // tags: [
* // {
* // key: "STRING_VALUE",
* // value: "STRING_VALUE",
* // },
* // ],
* // tags: "<Tags>",
* // createdBy: "STRING_VALUE",
* // enableECSManagedTags: true || false,
* // propagateTags: "TASK_DEFINITION" || "SERVICE" || "NONE",
Expand Down
28 changes: 17 additions & 11 deletions clients/client-ecs/src/commands/DeleteTaskDefinitionsCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,25 @@ export interface DeleteTaskDefinitionsCommandOutput extends DeleteTaskDefinition
/**
* @public
* <p>Deletes one or more task definitions.</p>
* <p>You must deregister a task definition revision before you delete it. For more information,
* see <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_DeregisterTaskDefinition.html">DeregisterTaskDefinition</a>.</p>
* <p>You must deregister a task definition revision before you delete it. For more
* information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_DeregisterTaskDefinition.html">DeregisterTaskDefinition</a>.</p>
* <p>When you delete a task definition revision, it is immediately transitions from the
* <code>INACTIVE</code> to <code>DELETE_IN_PROGRESS</code>. Existing tasks and services
* that reference a <code>DELETE_IN_PROGRESS</code> task definition revision continue to run
* without disruption. Existing services that reference a <code>DELETE_IN_PROGRESS</code> task
* definition revision can still scale up or down by modifying the service's desired
* count.</p>
* <p>You can't use a <code>DELETE_IN_PROGRESS</code> task definition revision to run new tasks
* or create new services. You also can't update an existing service to reference a
* <code>DELETE_IN_PROGRESS</code> task definition revision.</p>
* <code>INACTIVE</code> to <code>DELETE_IN_PROGRESS</code>. Existing tasks and
* services that reference a <code>DELETE_IN_PROGRESS</code> task definition revision
* continue to run without disruption. Existing services that reference a
* <code>DELETE_IN_PROGRESS</code> task definition revision can still scale up or down
* by modifying the service's desired count.</p>
* <p>You can't use a <code>DELETE_IN_PROGRESS</code> task definition revision to run new
* tasks or create new services. You also can't update an existing service to reference a
* <code>DELETE_IN_PROGRESS</code> task definition revision.</p>
* <p> A task definition revision will stay in <code>DELETE_IN_PROGRESS</code> status until
* all the associated tasks and services have been terminated.</p>
* <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>
* <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>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down Expand Up @@ -266,6 +271,7 @@ export interface DeleteTaskDefinitionsCommandOutput extends DeleteTaskDefinition
* // domain: "STRING_VALUE", // required
* // },
* // },
* // configuredAtLaunch: true || false,
* // },
* // ],
* // status: "ACTIVE" || "INACTIVE" || "DELETE_IN_PROGRESS",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ export interface DeregisterTaskDefinitionCommandOutput extends DeregisterTaskDef

/**
* @public
* <p>Deregisters the specified task definition by family and revision. Upon deregistration, the
* task definition is marked as <code>INACTIVE</code>. Existing tasks and services that
* <p>Deregisters the specified task definition by family and revision. Upon deregistration,
* the task definition is marked as <code>INACTIVE</code>. Existing tasks and services that
* reference an <code>INACTIVE</code> task definition continue to run without disruption.
* Existing services that reference an <code>INACTIVE</code> task definition can still
* scale up or down by modifying the service's desired count. If you want to delete a task
* definition revision, you must first deregister the task definition revision.</p>
* scale up or down by modifying the service's desired count. If you want to delete a task
* definition revision, you must first deregister the task definition revision.</p>
* <p>You can't use an <code>INACTIVE</code> task definition to run new tasks or create new
* services, and you can't update an existing service to reference an <code>INACTIVE</code>
* task definition. However, there may be up to a 10-minute window following deregistration
Expand All @@ -44,8 +44,8 @@ export interface DeregisterTaskDefinitionCommandOutput extends DeregisterTaskDef
* don't recommend that you rely on <code>INACTIVE</code> task definitions persisting
* beyond the lifecycle of any associated tasks and services.</p>
* </note>
* <p>You must deregister a task definition revision before you delete it. For more information,
* see <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_DeleteTaskDefinitions.html">DeleteTaskDefinitions</a>.</p>
* <p>You must deregister a task definition revision before you delete it. For more
* information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_DeleteTaskDefinitions.html">DeleteTaskDefinitions</a>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down Expand Up @@ -266,6 +266,7 @@ export interface DeregisterTaskDefinitionCommandOutput extends DeregisterTaskDef
* // domain: "STRING_VALUE", // required
* // },
* // },
* // configuredAtLaunch: true || false,
* // },
* // ],
* // status: "ACTIVE" || "INACTIVE" || "DELETE_IN_PROGRESS",
Expand Down
35 changes: 29 additions & 6 deletions clients/client-ecs/src/commands/DescribeServicesCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,34 @@ export interface DescribeServicesCommandOutput extends DescribeServicesResponse,
* // discoveryArn: "STRING_VALUE",
* // },
* // ],
* // volumeConfigurations: [ // ServiceVolumeConfigurations
* // { // ServiceVolumeConfiguration
* // name: "STRING_VALUE", // required
* // managedEBSVolume: { // ServiceManagedEBSVolumeConfiguration
* // encrypted: true || false,
* // kmsKeyId: "STRING_VALUE",
* // volumeType: "STRING_VALUE",
* // sizeInGiB: Number("int"),
* // snapshotId: "STRING_VALUE",
* // iops: Number("int"),
* // throughput: Number("int"),
* // tagSpecifications: [ // EBSTagSpecifications
* // { // EBSTagSpecification
* // resourceType: "volume", // required
* // tags: [
* // {
* // key: "STRING_VALUE",
* // value: "STRING_VALUE",
* // },
* // ],
* // propagateTags: "TASK_DEFINITION" || "SERVICE" || "NONE",
* // },
* // ],
* // roleArn: "STRING_VALUE", // required
* // filesystemType: "ext3" || "ext4" || "xfs",
* // },
* // },
* // ],
* // },
* // ],
* // roleArn: "STRING_VALUE",
Expand Down Expand Up @@ -268,12 +296,7 @@ export interface DescribeServicesCommandOutput extends DescribeServicesResponse,
* // deploymentController: { // DeploymentController
* // type: "ECS" || "CODE_DEPLOY" || "EXTERNAL", // required
* // },
* // tags: [
* // {
* // key: "STRING_VALUE",
* // value: "STRING_VALUE",
* // },
* // ],
* // tags: "<Tags>",
* // createdBy: "STRING_VALUE",
* // enableECSManagedTags: true || false,
* // propagateTags: "TASK_DEFINITION" || "SERVICE" || "NONE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ export interface DescribeTaskDefinitionCommandOutput extends DescribeTaskDefinit
* // domain: "STRING_VALUE", // required
* // },
* // },
* // configuredAtLaunch: true || false,
* // },
* // ],
* // status: "ACTIVE" || "INACTIVE" || "DELETE_IN_PROGRESS",
Expand Down
13 changes: 7 additions & 6 deletions clients/client-ecs/src/commands/ExecuteCommandCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,13 @@ export interface ExecuteCommandCommandOutput extends ExecuteCommandResponse, __M
/**
* @public
* <p>Runs a command remotely on a container within a task.</p>
* <p>If you use a condition key in your IAM policy to refine the conditions for the policy
* statement, for example limit the actions to a specific cluster, you receive an
* <p>If you use a condition key in your IAM policy to refine the conditions for the
* policy statement, for example limit the actions to a specific cluster, you receive an
* <code>AccessDeniedException</code> when there is a mismatch between the condition
* key value and the corresponding parameter value.</p>
* <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
* debugging</a> in the <i>Amazon ECS Developer Guide</i>. </p>
* <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 debugging</a> in the <i>Amazon ECS Developer Guide</i>.
* </p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down Expand Up @@ -104,8 +105,8 @@ export interface ExecuteCommandCommandOutput extends ExecuteCommandResponse, __M
* <p>The SSM agent is not installed or is not running</p>
* </li>
* <li>
* <p> There is an interface Amazon VPC endpoint for Amazon ECS, but there is not one for Systems
* Manager Session Manager</p>
* <p> There is an interface Amazon VPC endpoint for Amazon ECS, but there is not one for
* Systems Manager Session Manager</p>
* </li>
* </ul>
* <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
Expand Down
4 changes: 2 additions & 2 deletions clients/client-ecs/src/commands/ListTasksCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ export interface ListTasksCommandOutput extends ListTasksResponse, __MetadataBea
/**
* @public
* <p>Returns a list of tasks. You can filter the results by cluster, task definition
* family, container instance, launch type, what IAM principal started the task, or by the
* desired status of the task.</p>
* family, container instance, launch type, what IAM principal started the task, or by
* the desired status of the task.</p>
* <p>Recently stopped tasks might appear in the returned results. </p>
* @example
* Use a bare-bones client and the command you need to make an API call.
Expand Down
Loading

0 comments on commit 8b7b13e

Please sign in to comment.