Skip to content

Commit d632c0c

Browse files
author
awstools
committed
feat(client-ecs): This release introduces support for configuring the version consistency feature for individual containers defined within a task definition. The configuration allows to specify whether ECS should resolve the container image tag specified in the container definition to an image digest.
1 parent 7905a8e commit d632c0c

9 files changed

+74
-21
lines changed

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

+1
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ export interface DeleteTaskDefinitionsCommandOutput extends DeleteTaskDefinition
168168
* // ],
169169
* // startTimeout: Number("int"),
170170
* // stopTimeout: Number("int"),
171+
* // versionConsistency: "enabled" || "disabled",
171172
* // hostname: "STRING_VALUE",
172173
* // user: "STRING_VALUE",
173174
* // workingDirectory: "STRING_VALUE",

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

+1
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ export interface DeregisterTaskDefinitionCommandOutput extends DeregisterTaskDef
165165
* // ],
166166
* // startTimeout: Number("int"),
167167
* // stopTimeout: Number("int"),
168+
* // versionConsistency: "enabled" || "disabled",
168169
* // hostname: "STRING_VALUE",
169170
* // user: "STRING_VALUE",
170171
* // workingDirectory: "STRING_VALUE",

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

+1
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ export interface DescribeTaskDefinitionCommandOutput extends DescribeTaskDefinit
158158
* // ],
159159
* // startTimeout: Number("int"),
160160
* // stopTimeout: Number("int"),
161+
* // versionConsistency: "enabled" || "disabled",
161162
* // hostname: "STRING_VALUE",
162163
* // user: "STRING_VALUE",
163164
* // workingDirectory: "STRING_VALUE",

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

+2
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ export interface RegisterTaskDefinitionCommandOutput extends RegisterTaskDefinit
160160
* ],
161161
* startTimeout: Number("int"),
162162
* stopTimeout: Number("int"),
163+
* versionConsistency: "enabled" || "disabled",
163164
* hostname: "STRING_VALUE",
164165
* user: "STRING_VALUE",
165166
* workingDirectory: "STRING_VALUE",
@@ -419,6 +420,7 @@ export interface RegisterTaskDefinitionCommandOutput extends RegisterTaskDefinit
419420
* // ],
420421
* // startTimeout: Number("int"),
421422
* // stopTimeout: Number("int"),
423+
* // versionConsistency: "enabled" || "disabled",
422424
* // hostname: "STRING_VALUE",
423425
* // user: "STRING_VALUE",
424426
* // workingDirectory: "STRING_VALUE",

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

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
66

77
import { ECSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ECSClient";
88
import { commonParams } from "../endpoint/EndpointParameters";
9-
import { UpdateCapacityProviderRequest } from "../models/models_0";
10-
import { UpdateCapacityProviderResponse } from "../models/models_1";
9+
import { UpdateCapacityProviderRequest, UpdateCapacityProviderResponse } from "../models/models_1";
1110
import { de_UpdateCapacityProviderCommand, se_UpdateCapacityProviderCommand } from "../protocols/Aws_json1_1";
1211

1312
/**

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

+25-18
Original file line numberDiff line numberDiff line change
@@ -5513,6 +5513,20 @@ export interface Ulimit {
55135513
hardLimit: number | undefined;
55145514
}
55155515

5516+
/**
5517+
* @public
5518+
* @enum
5519+
*/
5520+
export const VersionConsistency = {
5521+
DISABLED: "disabled",
5522+
ENABLED: "enabled",
5523+
} as const;
5524+
5525+
/**
5526+
* @public
5527+
*/
5528+
export type VersionConsistency = (typeof VersionConsistency)[keyof typeof VersionConsistency];
5529+
55165530
/**
55175531
* <p>Details on a data volume from another container in the same task definition.</p>
55185532
* @public
@@ -5933,6 +5947,17 @@ export interface ContainerDefinition {
59335947
*/
59345948
stopTimeout?: number | undefined;
59355949

5950+
/**
5951+
* <p>Specifies whether Amazon ECS will resolve the container image tag
5952+
* provided in the container definition to an image digest. By default, the
5953+
* value is <code>enabled</code>. If you set the value for a container as
5954+
* <code>disabled</code>, Amazon ECS will not resolve the provided container image tag
5955+
* to a digest and will use the original image URI specified in the container definition for deployment.
5956+
* For more information about container image resolution, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-type-ecs.html#deployment-container-image-stability">Container image resolution</a> in the <i>Amazon ECS Developer Guide</i>.</p>
5957+
* @public
5958+
*/
5959+
versionConsistency?: VersionConsistency | undefined;
5960+
59365961
/**
59375962
* <p>The hostname to use for your container. This parameter maps to <code>Hostname</code> in the docker
59385963
* container create command and the <code>--hostname</code> option to docker run.</p>
@@ -12687,24 +12712,6 @@ export interface AutoScalingGroupProviderUpdate {
1268712712
managedDraining?: ManagedDraining | undefined;
1268812713
}
1268912714

12690-
/**
12691-
* @public
12692-
*/
12693-
export interface UpdateCapacityProviderRequest {
12694-
/**
12695-
* <p>The name of the capacity provider to update.</p>
12696-
* @public
12697-
*/
12698-
name: string | undefined;
12699-
12700-
/**
12701-
* <p>An object that represent the parameters to update for the Auto Scaling group capacity
12702-
* provider.</p>
12703-
* @public
12704-
*/
12705-
autoScalingGroupProvider: AutoScalingGroupProviderUpdate | undefined;
12706-
}
12707-
1270812715
/**
1270912716
* @internal
1271012717
*/

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

+19
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-cli
44
import { ECSServiceException as __BaseException } from "./ECSServiceException";
55

66
import {
7+
AutoScalingGroupProviderUpdate,
78
CapacityProvider,
89
CapacityProviderStrategyItem,
910
Cluster,
@@ -29,6 +30,24 @@ import {
2930
VpcLatticeConfiguration,
3031
} from "./models_0";
3132

33+
/**
34+
* @public
35+
*/
36+
export interface UpdateCapacityProviderRequest {
37+
/**
38+
* <p>The name of the capacity provider to update.</p>
39+
* @public
40+
*/
41+
name: string | undefined;
42+
43+
/**
44+
* <p>An object that represent the parameters to update for the Auto Scaling group capacity
45+
* provider.</p>
46+
* @public
47+
*/
48+
autoScalingGroupProvider: AutoScalingGroupProviderUpdate | undefined;
49+
}
50+
3251
/**
3352
* @public
3453
*/

clients/client-ecs/src/protocols/Aws_json1_1.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,6 @@ import {
378378
Ulimit,
379379
UnsupportedFeatureException,
380380
UntagResourceRequest,
381-
UpdateCapacityProviderRequest,
382381
UpdateInProgressException,
383382
VersionInfo,
384383
Volume,
@@ -388,6 +387,7 @@ import {
388387
import {
389388
MissingVersionException,
390389
NoUpdateAvailableException,
390+
UpdateCapacityProviderRequest,
391391
UpdateClusterRequest,
392392
UpdateClusterSettingsRequest,
393393
UpdateContainerAgentRequest,

codegen/sdk-codegen/aws-models/ecs.json

+23
Original file line numberDiff line numberDiff line change
@@ -2412,6 +2412,12 @@
24122412
"smithy.api#documentation": "<p>Time duration (in seconds) to wait before the container is forcefully killed if it doesn't exit\n\t\t\tnormally on its own.</p>\n <p>For tasks using the Fargate launch type, the task or service requires the following\n\t\t\tplatforms:</p>\n <ul>\n <li>\n <p>Linux platform version <code>1.3.0</code> or later.</p>\n </li>\n <li>\n <p>Windows platform version <code>1.0.0</code> or later.</p>\n </li>\n </ul>\n <p>For tasks that use the Fargate launch type, the max stop timeout value is 120 seconds and if the\n\t\t\tparameter is not specified, the default value of 30 seconds is used.</p>\n <p>For tasks that use the EC2 launch type, if the <code>stopTimeout</code> parameter isn't\n\t\t\tspecified, the value set for the Amazon ECS container agent configuration variable\n\t\t\t\t<code>ECS_CONTAINER_STOP_TIMEOUT</code> is used. If neither the <code>stopTimeout</code> parameter\n\t\t\tor the <code>ECS_CONTAINER_STOP_TIMEOUT</code> agent configuration variable are set, then the default\n\t\t\tvalues of 30 seconds for Linux containers and 30 seconds on Windows containers are used. Your container\n\t\t\tinstances require at least version 1.26.0 of the container agent to use a container stop timeout value.\n\t\t\tHowever, we recommend using the latest container agent version. For information about checking your\n\t\t\tagent version and updating to the latest version, see <a href=\"https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-update.html\">Updating the Amazon ECS Container\n\t\t\t\tAgent</a> in the <i>Amazon Elastic Container Service Developer Guide</i>. If you're using an Amazon ECS-optimized Linux AMI, your instance needs at\n\t\t\tleast version 1.26.0-1 of the <code>ecs-init</code> package. If your container instances are launched\n\t\t\tfrom version <code>20190301</code> or later, then they contain the required versions of the container\n\t\t\tagent and <code>ecs-init</code>. For more information, see <a href=\"https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html\">Amazon ECS-optimized Linux AMI</a> in the\n\t\t\t<i>Amazon Elastic Container Service Developer Guide</i>.</p>\n <p>The valid values for Fargate are 2-120 seconds.</p>"
24132413
}
24142414
},
2415+
"versionConsistency": {
2416+
"target": "com.amazonaws.ecs#VersionConsistency",
2417+
"traits": {
2418+
"smithy.api#documentation": "<p>Specifies whether Amazon ECS will resolve the container image tag\n\t\t\tprovided in the container definition to an image digest. By default, the\n\t\t\tvalue is <code>enabled</code>. If you set the value for a container as\n\t\t\t<code>disabled</code>, Amazon ECS will not resolve the provided container image tag\n\t\t\tto a digest and will use the original image URI specified in the container definition for deployment.\n\t\t\tFor more information about container image resolution, see <a href=\"https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-type-ecs.html#deployment-container-image-stability\">Container image resolution</a> in the <i>Amazon ECS Developer Guide</i>.</p>"
2419+
}
2420+
},
24152421
"hostname": {
24162422
"target": "com.amazonaws.ecs#String",
24172423
"traits": {
@@ -14218,6 +14224,23 @@
1421814224
"smithy.api#output": {}
1421914225
}
1422014226
},
14227+
"com.amazonaws.ecs#VersionConsistency": {
14228+
"type": "enum",
14229+
"members": {
14230+
"ENABLED": {
14231+
"target": "smithy.api#Unit",
14232+
"traits": {
14233+
"smithy.api#enumValue": "enabled"
14234+
}
14235+
},
14236+
"DISABLED": {
14237+
"target": "smithy.api#Unit",
14238+
"traits": {
14239+
"smithy.api#enumValue": "disabled"
14240+
}
14241+
}
14242+
}
14243+
},
1422114244
"com.amazonaws.ecs#VersionInfo": {
1422214245
"type": "structure",
1422314246
"members": {

0 commit comments

Comments
 (0)