Skip to content

Commit e2fb477

Browse files
author
awstools
committed
feat(client-ecr): Adds dualstack support for Amazon Elastic Container Registry (Amazon ECR).
1 parent f6a809d commit e2fb477

File tree

4 files changed

+862
-147
lines changed

4 files changed

+862
-147
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ export interface DescribeImagesCommandOutput extends DescribeImagesResponse, __M
3030
/**
3131
* <p>Returns metadata about the images in a repository.</p>
3232
* <note>
33-
* <p>Starting with Docker version 1.9, the Docker client compresses image layers before
34-
* pushing them to a V2 Docker registry. The output of the <code>docker images</code>
35-
* command shows the uncompressed image size. Therefore, Docker might return a larger
36-
* image than the image shown in the Amazon Web Services Management Console.</p>
33+
* <p>Beginning with Docker version 1.9, the Docker client compresses image layers
34+
* before pushing them to a V2 Docker registry. The output of the <code>docker
35+
* images</code> command shows the uncompressed image size, so it may return a
36+
* larger image size than the image sizes returned by <a>DescribeImages</a>.</p>
3737
* </note>
3838
* @example
3939
* Use a bare-bones client and the command you need to make an API call.

clients/client-ecr/src/endpoint/ruleset.ts

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,13 @@ import { RuleSetObject } from "@smithy/types";
66
or see "smithy.rules#endpointRuleSet"
77
in codegen/sdk-codegen/aws-models/ecr.json */
88

9-
const v="required",
10-
w="fn",
11-
x="argv",
12-
y="ref";
9+
const B="required",
10+
C="fn",
11+
D="argv",
12+
E="ref",
13+
F="url",
14+
G="properties",
15+
H="headers";
1316
const a=true,
1417
b="isSet",
1518
c="booleanEquals",
@@ -18,18 +21,24 @@ e="endpoint",
1821
f="tree",
1922
g="PartitionResult",
2023
h="stringEquals",
21-
i={[v]:false,"type":"String"},
22-
j={[v]:true,"default":false,"type":"Boolean"},
23-
k={[y]:"Endpoint"},
24-
l={[w]:c,[x]:[{[y]:"UseFIPS"},true]},
25-
m={[w]:c,[x]:[{[y]:"UseDualStack"},true]},
26-
n={},
27-
o={[w]:"getAttr",[x]:[{[y]:g},"supportsFIPS"]},
28-
p={[w]:c,[x]:[true,{[w]:"getAttr",[x]:[{[y]:g},"supportsDualStack"]}]},
29-
q={[w]:"getAttr",[x]:[{[y]:g},"name"]},
30-
r={"url":"https://ecr-fips.{Region}.amazonaws.com","properties":{},"headers":{}},
31-
s=[l],
32-
t=[m],
33-
u=[{[y]:"Region"}];
34-
const _data={version:"1.0",parameters:{Region:i,UseDualStack:j,UseFIPS:j,Endpoint:i},rules:[{conditions:[{[w]:b,[x]:[k]}],rules:[{conditions:s,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:d},{conditions:t,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:d},{endpoint:{url:k,properties:n,headers:n},type:e}],type:f},{conditions:[{[w]:b,[x]:u}],rules:[{conditions:[{[w]:"aws.partition",[x]:u,assign:g}],rules:[{conditions:[l,m],rules:[{conditions:[{[w]:c,[x]:[a,o]},p],rules:[{endpoint:{url:"https://api.ecr-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:n,headers:n},type:e}],type:f},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:d}],type:f},{conditions:s,rules:[{conditions:[{[w]:c,[x]:[o,a]}],rules:[{conditions:[{[w]:h,[x]:[q,"aws"]}],endpoint:r,type:e},{conditions:[{[w]:h,[x]:[q,"aws-us-gov"]}],endpoint:r,type:e},{endpoint:{url:"https://api.ecr-fips.{Region}.{PartitionResult#dnsSuffix}",properties:n,headers:n},type:e}],type:f},{error:"FIPS is enabled but this partition does not support FIPS",type:d}],type:f},{conditions:t,rules:[{conditions:[p],rules:[{endpoint:{url:"https://api.ecr.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:n,headers:n},type:e}],type:f},{error:"DualStack is enabled but this partition does not support DualStack",type:d}],type:f},{endpoint:{url:"https://api.ecr.{Region}.{PartitionResult#dnsSuffix}",properties:n,headers:n},type:e}],type:f}],type:f},{error:"Invalid Configuration: Missing Region",type:d}]};
24+
i="aws",
25+
j="aws-us-gov",
26+
k={[B]:false,"type":"String"},
27+
l={[B]:true,"default":false,"type":"Boolean"},
28+
m={[E]:"Endpoint"},
29+
n={[C]:c,[D]:[{[E]:"UseFIPS"},true]},
30+
o={[C]:c,[D]:[{[E]:"UseDualStack"},true]},
31+
p={},
32+
q={[C]:"getAttr",[D]:[{[E]:g},"supportsFIPS"]},
33+
r={[C]:c,[D]:[true,{[C]:"getAttr",[D]:[{[E]:g},"supportsDualStack"]}]},
34+
s={[C]:"getAttr",[D]:[{[E]:g},"name"]},
35+
t={[F]:"https://ecr-fips.{Region}.api.aws",[G]:{},[H]:{}},
36+
u={[F]:"https://ecr-fips.{Region}.amazonaws.com",[G]:{},[H]:{}},
37+
v={[F]:"https://ecr.{Region}.api.aws",[G]:{},[H]:{}},
38+
w=[n],
39+
x=[o],
40+
y=[{[E]:"Region"}],
41+
z=[{[C]:h,[D]:[i,s]}],
42+
A=[{[C]:h,[D]:[j,s]}];
43+
const _data={version:"1.0",parameters:{Region:k,UseDualStack:l,UseFIPS:l,Endpoint:k},rules:[{conditions:[{[C]:b,[D]:[m]}],rules:[{conditions:w,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:d},{conditions:x,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:d},{endpoint:{[F]:m,[G]:p,[H]:p},type:e}],type:f},{conditions:[{[C]:b,[D]:y}],rules:[{conditions:[{[C]:"aws.partition",[D]:y,assign:g}],rules:[{conditions:[n,o],rules:[{conditions:[{[C]:c,[D]:[a,q]},r],rules:[{conditions:z,endpoint:t,type:e},{conditions:A,endpoint:t,type:e},{endpoint:{[F]:"https://api.ecr-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",[G]:p,[H]:p},type:e}],type:f},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:d}],type:f},{conditions:w,rules:[{conditions:[{[C]:c,[D]:[q,a]}],rules:[{conditions:[{[C]:h,[D]:[s,i]}],endpoint:u,type:e},{conditions:[{[C]:h,[D]:[s,j]}],endpoint:u,type:e},{endpoint:{[F]:"https://api.ecr-fips.{Region}.{PartitionResult#dnsSuffix}",[G]:p,[H]:p},type:e}],type:f},{error:"FIPS is enabled but this partition does not support FIPS",type:d}],type:f},{conditions:x,rules:[{conditions:[r],rules:[{conditions:z,endpoint:v,type:e},{conditions:[{[C]:h,[D]:["aws-cn",s]}],endpoint:{[F]:"https://ecr.{Region}.api.amazonwebservices.com.cn",[G]:p,[H]:p},type:e},{conditions:A,endpoint:v,type:e},{endpoint:{[F]:"https://api.ecr.{Region}.{PartitionResult#dualStackDnsSuffix}",[G]:p,[H]:p},type:e}],type:f},{error:"DualStack is enabled but this partition does not support DualStack",type:d}],type:f},{endpoint:{[F]:"https://api.ecr.{Region}.{PartitionResult#dnsSuffix}",[G]:p,[H]:p},type:e}],type:f}],type:f},{error:"Invalid Configuration: Missing Region",type:d}]};
3544
export const ruleSet: RuleSetObject = _data;

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,7 @@ export interface CreatePullThroughCacheRuleRequest {
836836
* <ul>
837837
* <li>
838838
* <p>Amazon ECR (<code>ecr</code>) –
839-
* <code><accountId>.dkr.ecr.<region>.amazonaws.com</code>
839+
* <code>dkr.ecr.<region>.amazonaws.com</code>
840840
* </p>
841841
* </li>
842842
* <li>
@@ -2308,7 +2308,7 @@ export interface ImageDetail {
23082308
* <p>Starting with Docker version 1.9, the Docker client compresses image layers before
23092309
* pushing them to a V2 Docker registry. The output of the <code>docker images</code>
23102310
* command shows the uncompressed image size. Therefore, Docker might return a larger
2311-
* image than the image shown in the Amazon Web Services Management Console.</p>
2311+
* image than the image sizes returned by <a>DescribeImages</a>.</p>
23122312
* </note>
23132313
* @public
23142314
*/
@@ -3518,10 +3518,6 @@ export interface GetAuthorizationTokenResponse {
35183518
/**
35193519
* <p>A list of authorization token data objects that correspond to the
35203520
* <code>registryIds</code> values in the request.</p>
3521-
* <note>
3522-
* <p>The size of the authorization token returned by Amazon ECR is not fixed. We recommend
3523-
* that you don't make assumptions about the maximum size.</p>
3524-
* </note>
35253521
* @public
35263522
*/
35273523
authorizationData?: AuthorizationData[] | undefined;

0 commit comments

Comments
 (0)