Skip to content

Commit c885d48

Browse files
author
awstools
committed
feat(client-ecr): This release will have ValidationException be thrown from ECR LifecyclePolicy APIs in regions LifecyclePolicy is not supported, this includes existing Amazon Dedicated Cloud (ADC) regions. This release will also change Tag: TagValue and Tag: TagKey to required.
1 parent 12e1529 commit c885d48

11 files changed

+73
-23
lines changed

clients/client-ecr/src/commands/CreateRepositoryCommand.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ export interface CreateRepositoryCommandOutput extends CreateRepositoryResponse,
4949
* repositoryName: "STRING_VALUE", // required
5050
* tags: [ // TagList
5151
* { // Tag
52-
* Key: "STRING_VALUE",
53-
* Value: "STRING_VALUE",
52+
* Key: "STRING_VALUE", // required
53+
* Value: "STRING_VALUE", // required
5454
* },
5555
* ],
5656
* imageTagMutability: "MUTABLE" || "IMMUTABLE",

clients/client-ecr/src/commands/DeleteLifecyclePolicyCommand.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ export interface DeleteLifecyclePolicyCommandOutput extends DeleteLifecyclePolic
7979
* @throws {@link ServerException} (server fault)
8080
* <p>These errors are usually caused by a server-side issue.</p>
8181
*
82+
* @throws {@link ValidationException} (client fault)
83+
* <p>There was an exception validating this request.</p>
84+
*
8285
* @throws {@link ECRServiceException}
8386
* <p>Base exception class for all service exceptions from ECR service.</p>
8487
*

clients/client-ecr/src/commands/GetLifecyclePolicyCommand.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ export interface GetLifecyclePolicyCommandOutput extends GetLifecyclePolicyRespo
7979
* @throws {@link ServerException} (server fault)
8080
* <p>These errors are usually caused by a server-side issue.</p>
8181
*
82+
* @throws {@link ValidationException} (client fault)
83+
* <p>There was an exception validating this request.</p>
84+
*
8285
* @throws {@link ECRServiceException}
8386
* <p>Base exception class for all service exceptions from ECR service.</p>
8487
*

clients/client-ecr/src/commands/GetLifecyclePolicyPreviewCommand.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ export interface GetLifecyclePolicyPreviewCommandOutput extends GetLifecyclePoli
107107
* @throws {@link ServerException} (server fault)
108108
* <p>These errors are usually caused by a server-side issue.</p>
109109
*
110+
* @throws {@link ValidationException} (client fault)
111+
* <p>There was an exception validating this request.</p>
112+
*
110113
* @throws {@link ECRServiceException}
111114
* <p>Base exception class for all service exceptions from ECR service.</p>
112115
*

clients/client-ecr/src/commands/ListTagsForResourceCommand.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ export interface ListTagsForResourceCommandOutput extends ListTagsForResourceRes
5151
* // { // ListTagsForResourceResponse
5252
* // tags: [ // TagList
5353
* // { // Tag
54-
* // Key: "STRING_VALUE",
55-
* // Value: "STRING_VALUE",
54+
* // Key: "STRING_VALUE", // required
55+
* // Value: "STRING_VALUE", // required
5656
* // },
5757
* // ],
5858
* // };

clients/client-ecr/src/commands/PutLifecyclePolicyCommand.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ export interface PutLifecyclePolicyCommandOutput extends PutLifecyclePolicyRespo
7777
* @throws {@link ServerException} (server fault)
7878
* <p>These errors are usually caused by a server-side issue.</p>
7979
*
80+
* @throws {@link ValidationException} (client fault)
81+
* <p>There was an exception validating this request.</p>
82+
*
8083
* @throws {@link ECRServiceException}
8184
* <p>Base exception class for all service exceptions from ECR service.</p>
8285
*

clients/client-ecr/src/commands/StartLifecyclePolicyPreviewCommand.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ export interface StartLifecyclePolicyPreviewCommandOutput
8787
* @throws {@link ServerException} (server fault)
8888
* <p>These errors are usually caused by a server-side issue.</p>
8989
*
90+
* @throws {@link ValidationException} (client fault)
91+
* <p>There was an exception validating this request.</p>
92+
*
9093
* @throws {@link ECRServiceException}
9194
* <p>Base exception class for all service exceptions from ECR service.</p>
9295
*

clients/client-ecr/src/commands/TagResourceCommand.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ export interface TagResourceCommandOutput extends TagResourceResponse, __Metadat
4848
* resourceArn: "STRING_VALUE", // required
4949
* tags: [ // TagList // required
5050
* { // Tag
51-
* Key: "STRING_VALUE",
52-
* Value: "STRING_VALUE",
51+
* Key: "STRING_VALUE", // required
52+
* Value: "STRING_VALUE", // required
5353
* },
5454
* ],
5555
* };

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

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -962,13 +962,13 @@ export interface Tag {
962962
* <p>One part of a key-value pair that make up a tag. A <code>key</code> is a general label
963963
* that acts like a category for more specific tag values.</p>
964964
*/
965-
Key?: string;
965+
Key: string | undefined;
966966

967967
/**
968968
* @public
969969
* <p>A <code>value</code> acts as a descriptor within a tag category (key).</p>
970970
*/
971-
Value?: string;
971+
Value: string | undefined;
972972
}
973973

974974
/**
@@ -987,6 +987,8 @@ export interface CreateRepositoryRequest {
987987
* <p>The name to use for the repository. The repository name may be specified on its own
988988
* (such as <code>nginx-web-app</code>) or it can be prepended with a namespace to group
989989
* the repository into a category (such as <code>project-a/nginx-web-app</code>).</p>
990+
* <p>The repository name must start with a letter and can only contain lowercase letters,
991+
* numbers, hyphens, underscores, and forward slashes.</p>
990992
*/
991993
repositoryName: string | undefined;
992994

@@ -1032,7 +1034,7 @@ export interface Repository {
10321034
* @public
10331035
* <p>The Amazon Resource Name (ARN) that identifies the repository. The ARN contains the <code>arn:aws:ecr</code> namespace, followed by the region of the
10341036
* repository, Amazon Web Services account ID of the repository owner, repository namespace, and repository name.
1035-
* For example, <code>arn:aws:ecr:region:012345678910:repository/test</code>.</p>
1037+
* For example, <code>arn:aws:ecr:region:012345678910:repository-namespace/repository-name</code>.</p>
10361038
*/
10371039
repositoryArn?: string;
10381040

@@ -2626,8 +2628,8 @@ export type RepositoryFilterType = (typeof RepositoryFilterType)[keyof typeof Re
26262628
* @public
26272629
* <p>The filter settings used with image replication. Specifying a repository filter to a
26282630
* replication rule provides a method for controlling which repositories in a private
2629-
* registry are replicated. If no repository filter is specified, all images in the
2630-
* repository are replicated.</p>
2631+
* registry are replicated. If no filters are added, the contents of all repositories are
2632+
* replicated.</p>
26312633
*/
26322634
export interface RepositoryFilter {
26332635
/**
@@ -3224,8 +3226,9 @@ export interface RegistryScanningRule {
32243226
* <p>The frequency that scans are performed at for a private registry. When the
32253227
* <code>ENHANCED</code> scan type is specified, the supported scan frequencies are
32263228
* <code>CONTINUOUS_SCAN</code> and <code>SCAN_ON_PUSH</code>. When the
3227-
* <code>BASIC</code> scan type is specified, the <code>SCAN_ON_PUSH</code> and
3228-
* <code>MANUAL</code> scan frequencies are supported.</p>
3229+
* <code>BASIC</code> scan type is specified, the <code>SCAN_ON_PUSH</code> scan
3230+
* frequency is supported. If scan on push is not specified, then the <code>MANUAL</code>
3231+
* scan frequency is set by default.</p>
32293232
*/
32303233
scanFrequency: ScanFrequency | string | undefined;
32313234

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1239,6 +1239,9 @@ const de_DeleteLifecyclePolicyCommandError = async (
12391239
case "ServerException":
12401240
case "com.amazonaws.ecr#ServerException":
12411241
throw await de_ServerExceptionRes(parsedOutput, context);
1242+
case "ValidationException":
1243+
case "com.amazonaws.ecr#ValidationException":
1244+
throw await de_ValidationExceptionRes(parsedOutput, context);
12421245
default:
12431246
const parsedBody = parsedOutput.body;
12441247
return throwDefaultError({
@@ -1957,6 +1960,9 @@ const de_GetLifecyclePolicyCommandError = async (
19571960
case "ServerException":
19581961
case "com.amazonaws.ecr#ServerException":
19591962
throw await de_ServerExceptionRes(parsedOutput, context);
1963+
case "ValidationException":
1964+
case "com.amazonaws.ecr#ValidationException":
1965+
throw await de_ValidationExceptionRes(parsedOutput, context);
19601966
default:
19611967
const parsedBody = parsedOutput.body;
19621968
return throwDefaultError({
@@ -2012,6 +2018,9 @@ const de_GetLifecyclePolicyPreviewCommandError = async (
20122018
case "ServerException":
20132019
case "com.amazonaws.ecr#ServerException":
20142020
throw await de_ServerExceptionRes(parsedOutput, context);
2021+
case "ValidationException":
2022+
case "com.amazonaws.ecr#ValidationException":
2023+
throw await de_ValidationExceptionRes(parsedOutput, context);
20152024
default:
20162025
const parsedBody = parsedOutput.body;
20172026
return throwDefaultError({
@@ -2565,6 +2574,9 @@ const de_PutLifecyclePolicyCommandError = async (
25652574
case "ServerException":
25662575
case "com.amazonaws.ecr#ServerException":
25672576
throw await de_ServerExceptionRes(parsedOutput, context);
2577+
case "ValidationException":
2578+
case "com.amazonaws.ecr#ValidationException":
2579+
throw await de_ValidationExceptionRes(parsedOutput, context);
25682580
default:
25692581
const parsedBody = parsedOutput.body;
25702582
return throwDefaultError({
@@ -2895,6 +2907,9 @@ const de_StartLifecyclePolicyPreviewCommandError = async (
28952907
case "ServerException":
28962908
case "com.amazonaws.ecr#ServerException":
28972909
throw await de_ServerExceptionRes(parsedOutput, context);
2910+
case "ValidationException":
2911+
case "com.amazonaws.ecr#ValidationException":
2912+
throw await de_ValidationExceptionRes(parsedOutput, context);
28982913
default:
28992914
const parsedBody = parsedOutput.body;
29002915
return throwDefaultError({

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

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1994,7 +1994,7 @@
19941994
"repositoryName": {
19951995
"target": "com.amazonaws.ecr#RepositoryName",
19961996
"traits": {
1997-
"smithy.api#documentation": "<p>The name to use for the repository. The repository name may be specified on its own\n (such as <code>nginx-web-app</code>) or it can be prepended with a namespace to group\n the repository into a category (such as <code>project-a/nginx-web-app</code>).</p>",
1997+
"smithy.api#documentation": "<p>The name to use for the repository. The repository name may be specified on its own\n (such as <code>nginx-web-app</code>) or it can be prepended with a namespace to group\n the repository into a category (such as <code>project-a/nginx-web-app</code>).</p>\n <p>The repository name must start with a letter and can only contain lowercase letters,\n numbers, hyphens, underscores, and forward slashes.</p>",
19981998
"smithy.api#required": {}
19991999
}
20002000
},
@@ -2171,6 +2171,9 @@
21712171
},
21722172
{
21732173
"target": "com.amazonaws.ecr#ServerException"
2174+
},
2175+
{
2176+
"target": "com.amazonaws.ecr#ValidationException"
21742177
}
21752178
],
21762179
"traits": {
@@ -3505,6 +3508,9 @@
35053508
},
35063509
{
35073510
"target": "com.amazonaws.ecr#ServerException"
3511+
},
3512+
{
3513+
"target": "com.amazonaws.ecr#ValidationException"
35083514
}
35093515
],
35103516
"traits": {
@@ -3531,6 +3537,9 @@
35313537
},
35323538
{
35333539
"target": "com.amazonaws.ecr#ServerException"
3540+
},
3541+
{
3542+
"target": "com.amazonaws.ecr#ValidationException"
35343543
}
35353544
],
35363545
"traits": {
@@ -3596,13 +3605,13 @@
35963605
"nextToken": {
35973606
"target": "com.amazonaws.ecr#NextToken",
35983607
"traits": {
3599-
"smithy.api#documentation": "<p>The <code>nextToken</code> value returned from a previous paginated\n <code>GetLifecyclePolicyPreviewRequest</code> request where <code>maxResults</code>\n was used and the results exceeded the value of that parameter. Pagination continues\n from the end of the previous results that returned the <code>nextToken</code> value.\n This value is <code>null</code> when there are no more results to return. This option\n cannot be used when you specify images with <code>imageIds</code>.</p>"
3608+
"smithy.api#documentation": "<p>The <code>nextToken</code> value returned from a previous paginated\u2028\n <code>GetLifecyclePolicyPreviewRequest</code> request where <code>maxResults</code>\n was used and the\u2028 results exceeded the value of that parameter. Pagination continues\n from the end of the\u2028 previous results that returned the <code>nextToken</code> value.\n This value is\u2028 <code>null</code> when there are no more results to return. This option\n cannot be used when you specify images with <code>imageIds</code>.</p>"
36003609
}
36013610
},
36023611
"maxResults": {
36033612
"target": "com.amazonaws.ecr#LifecyclePreviewMaxResults",
36043613
"traits": {
3605-
"smithy.api#documentation": "<p>The maximum number of repository results returned by\n <code>GetLifecyclePolicyPreviewRequest</code> in paginated output. When this\n parameter is used, <code>GetLifecyclePolicyPreviewRequest</code> only returns\n <code>maxResults</code> results in a single page along with a\n <code>nextToken</code> response element. The remaining results of the initial request\n can be seen by sending another <code>GetLifecyclePolicyPreviewRequest</code> request\n with the returned <code>nextToken</code> value. This value can be between\n 1 and 1000. If this parameter is not used, then\n <code>GetLifecyclePolicyPreviewRequest</code> returns up to 100\n results and a <code>nextToken</code> value, if applicable. This option cannot be used\n when you specify images with <code>imageIds</code>.</p>"
3614+
"smithy.api#documentation": "<p>The maximum number of repository results returned by\n <code>GetLifecyclePolicyPreviewRequest</code> in\u2028 paginated output. When this\n parameter is used, <code>GetLifecyclePolicyPreviewRequest</code> only returns\u2028\n <code>maxResults</code> results in a single page along with a\n <code>nextToken</code>\u2028 response element. The remaining results of the initial request\n can be seen by sending\u2028 another <code>GetLifecyclePolicyPreviewRequest</code> request\n with the returned <code>nextToken</code>\u2028 value. This value can be between\n 1 and 1000. If this\u2028 parameter is not used, then\n <code>GetLifecyclePolicyPreviewRequest</code> returns up to\u2028 100\n results and a <code>nextToken</code> value, if\u2028 applicable. This option cannot be used\n when you specify images with <code>imageIds</code>.</p>"
36063615
}
36073616
},
36083617
"filter": {
@@ -5669,6 +5678,9 @@
56695678
},
56705679
{
56715680
"target": "com.amazonaws.ecr#ServerException"
5681+
},
5682+
{
5683+
"target": "com.amazonaws.ecr#ValidationException"
56725684
}
56735685
],
56745686
"traits": {
@@ -5681,7 +5693,7 @@
56815693
"registryId": {
56825694
"target": "com.amazonaws.ecr#RegistryId",
56835695
"traits": {
5684-
"smithy.api#documentation": "<p>The Amazon Web Services account ID associated with the registry that contains the repository. If you\n do not specify a registry, the default registry is assumed.</p>"
5696+
"smithy.api#documentation": "<p>The Amazon Web Services account ID associated with the registry that contains the repository. If you\n do\u2028 not specify a registry, the default registry is assumed.</p>"
56855697
}
56865698
},
56875699
"repositoryName": {
@@ -6006,7 +6018,7 @@
60066018
"scanFrequency": {
60076019
"target": "com.amazonaws.ecr#ScanFrequency",
60086020
"traits": {
6009-
"smithy.api#documentation": "<p>The frequency that scans are performed at for a private registry. When the\n <code>ENHANCED</code> scan type is specified, the supported scan frequencies are\n <code>CONTINUOUS_SCAN</code> and <code>SCAN_ON_PUSH</code>. When the\n <code>BASIC</code> scan type is specified, the <code>SCAN_ON_PUSH</code> and\n <code>MANUAL</code> scan frequencies are supported.</p>",
6021+
"smithy.api#documentation": "<p>The frequency that scans are performed at for a private registry. When the\n <code>ENHANCED</code> scan type is specified, the supported scan frequencies are\n <code>CONTINUOUS_SCAN</code> and <code>SCAN_ON_PUSH</code>. When the\n <code>BASIC</code> scan type is specified, the <code>SCAN_ON_PUSH</code> scan\n frequency is supported. If scan on push is not specified, then the <code>MANUAL</code>\n scan frequency is set by default.</p>",
60106022
"smithy.api#required": {}
60116023
}
60126024
},
@@ -6174,7 +6186,7 @@
61746186
"repositoryArn": {
61756187
"target": "com.amazonaws.ecr#Arn",
61766188
"traits": {
6177-
"smithy.api#documentation": "<p>The Amazon Resource Name (ARN) that identifies the repository. The ARN contains the <code>arn:aws:ecr</code> namespace, followed by the region of the\n repository, Amazon Web Services account ID of the repository owner, repository namespace, and repository name.\n For example, <code>arn:aws:ecr:region:012345678910:repository/test</code>.</p>"
6189+
"smithy.api#documentation": "<p>The Amazon Resource Name (ARN) that identifies the repository. The ARN contains the <code>arn:aws:ecr</code> namespace, followed by the region of the\n repository, Amazon Web Services account ID of the repository owner, repository namespace, and repository name.\n For example, <code>arn:aws:ecr:region:012345678910:repository-namespace/repository-name</code>.</p>"
61786190
}
61796191
},
61806192
"registryId": {
@@ -6255,7 +6267,7 @@
62556267
}
62566268
},
62576269
"traits": {
6258-
"smithy.api#documentation": "<p>The filter settings used with image replication. Specifying a repository filter to a\n replication rule provides a method for controlling which repositories in a private\n registry are replicated. If no repository filter is specified, all images in the\n repository are replicated.</p>"
6270+
"smithy.api#documentation": "<p>The filter settings used with image replication. Specifying a repository filter to a\n replication rule provides a method for controlling which repositories in a private\n registry are replicated. If no filters are added, the contents of all repositories are\n replicated.</p>"
62596271
}
62606272
},
62616273
"com.amazonaws.ecr#RepositoryFilterList": {
@@ -6956,6 +6968,9 @@
69566968
},
69576969
{
69586970
"target": "com.amazonaws.ecr#ServerException"
6971+
},
6972+
{
6973+
"target": "com.amazonaws.ecr#ValidationException"
69596974
}
69606975
],
69616976
"traits": {
@@ -7030,13 +7045,15 @@
70307045
"Key": {
70317046
"target": "com.amazonaws.ecr#TagKey",
70327047
"traits": {
7033-
"smithy.api#documentation": "<p>One part of a key-value pair that make up a tag. A <code>key</code> is a general label\n that acts like a category for more specific tag values.</p>"
7048+
"smithy.api#documentation": "<p>One part of a key-value pair that make up a tag. A <code>key</code> is a general label\n that acts like a category for more specific tag values.</p>",
7049+
"smithy.api#required": {}
70347050
}
70357051
},
70367052
"Value": {
70377053
"target": "com.amazonaws.ecr#TagValue",
70387054
"traits": {
7039-
"smithy.api#documentation": "<p>A <code>value</code> acts as a descriptor within a tag category (key).</p>"
7055+
"smithy.api#documentation": "<p>A <code>value</code> acts as a descriptor within a tag category (key).</p>",
7056+
"smithy.api#required": {}
70407057
}
70417058
}
70427059
},
@@ -7480,4 +7497,4 @@
74807497
}
74817498
}
74827499
}
7483-
}
7500+
}

0 commit comments

Comments
 (0)