Skip to content

Commit

Permalink
feat(client-ecs): This release adds support for an account-level sett…
Browse files Browse the repository at this point in the history
…ing that you can use to configure the number of days for AWS Fargate task retirement.
  • Loading branch information
awstools committed Aug 31, 2023
1 parent 185a231 commit 8946a54
Show file tree
Hide file tree
Showing 6 changed files with 188 additions and 86 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ export interface DeleteAccountSettingCommandOutput extends DeleteAccountSettingR
* // const { ECSClient, DeleteAccountSettingCommand } = require("@aws-sdk/client-ecs"); // CommonJS import
* const client = new ECSClient(config);
* const input = { // DeleteAccountSettingRequest
* name: "serviceLongArnFormat" || "taskLongArnFormat" || "containerInstanceLongArnFormat" || "awsvpcTrunking" || "containerInsights" || "fargateFIPSMode" || "tagResourceAuthorization", // required
* name: "serviceLongArnFormat" || "taskLongArnFormat" || "containerInstanceLongArnFormat" || "awsvpcTrunking" || "containerInsights" || "fargateFIPSMode" || "tagResourceAuthorization" || "fargateTaskRetirementWaitPeriod", // required
* principalArn: "STRING_VALUE",
* };
* const command = new DeleteAccountSettingCommand(input);
* const response = await client.send(command);
* // { // DeleteAccountSettingResponse
* // setting: { // Setting
* // name: "serviceLongArnFormat" || "taskLongArnFormat" || "containerInstanceLongArnFormat" || "awsvpcTrunking" || "containerInsights" || "fargateFIPSMode" || "tagResourceAuthorization",
* // name: "serviceLongArnFormat" || "taskLongArnFormat" || "containerInstanceLongArnFormat" || "awsvpcTrunking" || "containerInsights" || "fargateFIPSMode" || "tagResourceAuthorization" || "fargateTaskRetirementWaitPeriod",
* // value: "STRING_VALUE",
* // principalArn: "STRING_VALUE",
* // },
Expand Down
4 changes: 2 additions & 2 deletions clients/client-ecs/src/commands/ListAccountSettingsCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export interface ListAccountSettingsCommandOutput extends ListAccountSettingsRes
* // const { ECSClient, ListAccountSettingsCommand } = require("@aws-sdk/client-ecs"); // CommonJS import
* const client = new ECSClient(config);
* const input = { // ListAccountSettingsRequest
* name: "serviceLongArnFormat" || "taskLongArnFormat" || "containerInstanceLongArnFormat" || "awsvpcTrunking" || "containerInsights" || "fargateFIPSMode" || "tagResourceAuthorization",
* name: "serviceLongArnFormat" || "taskLongArnFormat" || "containerInstanceLongArnFormat" || "awsvpcTrunking" || "containerInsights" || "fargateFIPSMode" || "tagResourceAuthorization" || "fargateTaskRetirementWaitPeriod",
* value: "STRING_VALUE",
* principalArn: "STRING_VALUE",
* effectiveSettings: true || false,
Expand All @@ -56,7 +56,7 @@ export interface ListAccountSettingsCommandOutput extends ListAccountSettingsRes
* // { // ListAccountSettingsResponse
* // settings: [ // Settings
* // { // Setting
* // name: "serviceLongArnFormat" || "taskLongArnFormat" || "containerInstanceLongArnFormat" || "awsvpcTrunking" || "containerInsights" || "fargateFIPSMode" || "tagResourceAuthorization",
* // name: "serviceLongArnFormat" || "taskLongArnFormat" || "containerInstanceLongArnFormat" || "awsvpcTrunking" || "containerInsights" || "fargateFIPSMode" || "tagResourceAuthorization" || "fargateTaskRetirementWaitPeriod",
* // value: "STRING_VALUE",
* // principalArn: "STRING_VALUE",
* // },
Expand Down
33 changes: 19 additions & 14 deletions clients/client-ecs/src/commands/PutAccountSettingCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,20 @@ export interface PutAccountSettingCommandOutput extends PutAccountSettingRespons
* and roles that do not have specified individual account settings. For more information,
* see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html">Account
* Settings</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
* <p>When <code>serviceLongArnFormat</code>, <code>taskLongArnFormat</code>, or
* <code>containerInstanceLongArnFormat</code> are specified, the Amazon Resource Name
* (ARN) and resource ID format of the resource type for a specified user, role, or
* the root user for an account is affected. The opt-in and opt-out account setting must be
* set for each Amazon ECS resource separately. The ARN and resource ID format of a resource
* is defined by the opt-in status of the user or role that created the resource. You
* must turn on this setting to use Amazon ECS features such as resource tagging.</p>
* <p>When <code>awsvpcTrunking</code> is specified, the elastic network interface (ENI)
* limit for any new container instances that support the feature is changed. If
* <code>awsvpcTrunking</code> is turned on, any new container instances that support the
* feature are launched have the increased ENI limits available to them. For more
* <p>When you specify <code>serviceLongArnFormat</code>, <code>taskLongArnFormat</code>, or
* <code>containerInstanceLongArnFormat</code>, the Amazon Resource Name (ARN) and
* resource ID format of the resource type for a specified user, role, or the root user for an
* account is affected. The opt-in and opt-out account setting must be set for each Amazon ECS
* resource separately. The ARN and resource ID format of a resource is defined by the
* opt-in status of the user or role that created the resource. You must turn on this
* setting to use Amazon ECS features such as resource tagging.</p>
* <p>When you specify <code>awsvpcTrunking</code>, the elastic network interface (ENI) limit for
* any new container instances that support the feature is changed. If
* <code>awsvpcTrunking</code> is turned on, any new container instances that support
* the feature are launched have the increased ENI limits available to them. For more
* information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/container-instance-eni.html">Elastic Network
* Interface Trunking</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
* <p>When <code>containerInsights</code> is specified, the default setting indicating whether
* <p>When you specify <code>containerInsights</code>, the default setting indicating whether
* Amazon Web Services CloudWatch Container Insights is turned on for your clusters is changed. If
* <code>containerInsights</code> is turned on, any new clusters that are created will
* have Container Insights turned on unless you disable it during cluster creation. For
Expand All @@ -68,22 +68,27 @@ export interface PutAccountSettingCommandOutput extends PutAccountSettingRespons
* more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/supported-iam-actions-tagging.html">Grant
* permission to tag resources on creation</a> in the <i>Amazon ECS Developer
* Guide</i>.</p>
* <p>When Amazon Web Services determines that a security or infrastructure update is needed for an Amazon ECS
* task hosted on Fargate, the tasks need to be stopped and new tasks launched to replace
* them. Use <code>fargateTaskRetirementWaitPeriod</code> to configure the wait time to
* retire a Fargate task. For information about the Fargate tasks maintenance, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-maintenance.html">Amazon Web Services Fargate task maintenance</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
* import { ECSClient, PutAccountSettingCommand } from "@aws-sdk/client-ecs"; // ES Modules import
* // const { ECSClient, PutAccountSettingCommand } = require("@aws-sdk/client-ecs"); // CommonJS import
* const client = new ECSClient(config);
* const input = { // PutAccountSettingRequest
* name: "serviceLongArnFormat" || "taskLongArnFormat" || "containerInstanceLongArnFormat" || "awsvpcTrunking" || "containerInsights" || "fargateFIPSMode" || "tagResourceAuthorization", // required
* name: "serviceLongArnFormat" || "taskLongArnFormat" || "containerInstanceLongArnFormat" || "awsvpcTrunking" || "containerInsights" || "fargateFIPSMode" || "tagResourceAuthorization" || "fargateTaskRetirementWaitPeriod", // required
* value: "STRING_VALUE", // required
* principalArn: "STRING_VALUE",
* };
* const command = new PutAccountSettingCommand(input);
* const response = await client.send(command);
* // { // PutAccountSettingResponse
* // setting: { // Setting
* // name: "serviceLongArnFormat" || "taskLongArnFormat" || "containerInstanceLongArnFormat" || "awsvpcTrunking" || "containerInsights" || "fargateFIPSMode" || "tagResourceAuthorization",
* // name: "serviceLongArnFormat" || "taskLongArnFormat" || "containerInstanceLongArnFormat" || "awsvpcTrunking" || "containerInsights" || "fargateFIPSMode" || "tagResourceAuthorization" || "fargateTaskRetirementWaitPeriod",
* // value: "STRING_VALUE",
* // principalArn: "STRING_VALUE",
* // },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ export interface PutAccountSettingDefaultCommandOutput extends PutAccountSetting
* // const { ECSClient, PutAccountSettingDefaultCommand } = require("@aws-sdk/client-ecs"); // CommonJS import
* const client = new ECSClient(config);
* const input = { // PutAccountSettingDefaultRequest
* name: "serviceLongArnFormat" || "taskLongArnFormat" || "containerInstanceLongArnFormat" || "awsvpcTrunking" || "containerInsights" || "fargateFIPSMode" || "tagResourceAuthorization", // required
* name: "serviceLongArnFormat" || "taskLongArnFormat" || "containerInstanceLongArnFormat" || "awsvpcTrunking" || "containerInsights" || "fargateFIPSMode" || "tagResourceAuthorization" || "fargateTaskRetirementWaitPeriod", // required
* value: "STRING_VALUE", // required
* };
* const command = new PutAccountSettingDefaultCommand(input);
* const response = await client.send(command);
* // { // PutAccountSettingDefaultResponse
* // setting: { // Setting
* // name: "serviceLongArnFormat" || "taskLongArnFormat" || "containerInstanceLongArnFormat" || "awsvpcTrunking" || "containerInsights" || "fargateFIPSMode" || "tagResourceAuthorization",
* // name: "serviceLongArnFormat" || "taskLongArnFormat" || "containerInstanceLongArnFormat" || "awsvpcTrunking" || "containerInsights" || "fargateFIPSMode" || "tagResourceAuthorization" || "fargateTaskRetirementWaitPeriod",
* // value: "STRING_VALUE",
* // principalArn: "STRING_VALUE",
* // },
Expand Down
Loading

0 comments on commit 8946a54

Please sign in to comment.