• 沒有找到結果。

Amazon Elastic Container Registry API Reference API Version 2015-09-21

N/A
N/A
Protected

Academic year: 2022

Share "Amazon Elastic Container Registry API Reference API Version 2015-09-21"

Copied!
223
0
0

加載中.... (立即查看全文)

全文

(1)

Amazon Elastic Container Registry

API Reference

API Version 2015-09-21

(2)

Amazon Elastic Container Registry: API Reference

Copyright © Amazon Web Services, Inc. and/or its affiliates. All rights reserved.

Amazon's trademarks and trade dress may not be used in connection with any product or service that is not Amazon's, in any manner that is likely to cause confusion among customers, or in any manner that disparages or discredits Amazon. All other trademarks not owned by Amazon are the property of their respective owners, who may or may not be affiliated with, connected to, or sponsored by Amazon.

(3)

Table of Contents

Welcome ... 1

Actions ... 2

BatchCheckLayerAvailability ... 4

Request Syntax ... 4

Request Parameters ... 4

Response Syntax ... 5

Response Elements ... 5

Errors ... 5

Examples ... 6

See Also ... 7

BatchDeleteImage ... 8

Request Syntax ... 8

Request Parameters ... 8

Response Syntax ... 9

Response Elements ... 9

Errors ... 9

Examples ... 10

See Also ... 11

BatchGetImage ... 13

Request Syntax ... 13

Request Parameters ... 13

Response Syntax ... 14

Response Elements ... 14

Errors ... 15

Examples ... 15

See Also ... 16

BatchGetRepositoryScanningConfiguration ... 17

Request Syntax ... 17

Request Parameters ... 17

Response Syntax ... 17

Response Elements ... 18

Errors ... 18

See Also ... 18

CompleteLayerUpload ... 20

Request Syntax ... 20

Request Parameters ... 20

Response Syntax ... 21

Response Elements ... 21

Errors ... 22

See Also ... 23

CreatePullThroughCacheRule ... 24

Request Syntax ... 24

Request Parameters ... 24

Response Syntax ... 24

Response Elements ... 25

Errors ... 25

See Also ... 26

CreateRepository ... 27

Request Syntax ... 27

Request Parameters ... 27

Response Syntax ... 28

Response Elements ... 28

Errors ... 29

Examples ... 29

(4)

See Also ... 30

DeleteLifecyclePolicy ... 32

Request Syntax ... 32

Request Parameters ... 32

Response Syntax ... 32

Response Elements ... 32

Errors ... 33

Examples ... 34

See Also ... 34

DeletePullThroughCacheRule ... 36

Request Syntax ... 36

Request Parameters ... 36

Response Syntax ... 36

Response Elements ... 36

Errors ... 37

See Also ... 37

DeleteRegistryPolicy ... 39

Response Syntax ... 39

Response Elements ... 39

Errors ... 39

See Also ... 40

DeleteRepository ... 41

Request Syntax ... 41

Request Parameters ... 41

Response Syntax ... 41

Response Elements ... 42

Errors ... 42

Examples ... 43

See Also ... 43

DeleteRepositoryPolicy ... 45

Request Syntax ... 45

Request Parameters ... 45

Response Syntax ... 45

Response Elements ... 45

Errors ... 46

Examples ... 46

See Also ... 47

DescribeImageReplicationStatus ... 49

Request Syntax ... 49

Request Parameters ... 49

Response Syntax ... 49

Response Elements ... 50

Errors ... 50

See Also ... 51

DescribeImages ... 52

Request Syntax ... 52

Request Parameters ... 52

Response Syntax ... 53

Response Elements ... 54

Errors ... 54

Examples ... 55

See Also ... 56

DescribeImageScanFindings ... 58

Request Syntax ... 58

Request Parameters ... 58

Response Syntax ... 59

Response Elements ... 61

(5)

Errors ... 62

Examples ... 62

See Also ... 64

DescribePullThroughCacheRules ... 65

Request Syntax ... 65

Request Parameters ... 65

Response Syntax ... 66

Response Elements ... 66

Errors ... 66

See Also ... 67

DescribeRegistry ... 68

Response Syntax ... 68

Response Elements ... 68

Errors ... 68

See Also ... 69

DescribeRepositories ... 70

Request Syntax ... 70

Request Parameters ... 70

Response Syntax ... 71

Response Elements ... 71

Errors ... 72

Examples ... 72

See Also ... 73

GetAuthorizationToken ... 74

Request Syntax ... 74

Request Parameters ... 74

Response Syntax ... 74

Response Elements ... 74

Errors ... 75

Examples ... 75

See Also ... 76

GetDownloadUrlForLayer ... 77

Request Syntax ... 77

Request Parameters ... 77

Response Syntax ... 78

Response Elements ... 78

Errors ... 78

See Also ... 79

GetLifecyclePolicy ... 80

Request Syntax ... 80

Request Parameters ... 80

Response Syntax ... 80

Response Elements ... 80

Errors ... 81

Examples ... 82

See Also ... 82

GetLifecyclePolicyPreview ... 84

Request Syntax ... 84

Request Parameters ... 84

Response Syntax ... 85

Response Elements ... 86

Errors ... 87

Examples ... 87

See Also ... 88

GetRegistryPolicy ... 89

Response Syntax ... 89

Response Elements ... 89

(6)

Errors ... 89

See Also ... 90

GetRegistryScanningConfiguration ... 91

Response Syntax ... 91

Response Elements ... 91

Errors ... 91

See Also ... 92

GetRepositoryPolicy ... 93

Request Syntax ... 93

Request Parameters ... 93

Response Syntax ... 93

Response Elements ... 93

Errors ... 94

Examples ... 94

See Also ... 95

InitiateLayerUpload ... 97

Request Syntax ... 97

Request Parameters ... 97

Response Syntax ... 97

Response Elements ... 98

Errors ... 98

See Also ... 98

ListImages ... 100

Request Syntax ... 100

Request Parameters ... 100

Response Syntax ... 101

Response Elements ... 101

Errors ... 102

Examples ... 102

See Also ... 103

ListTagsForResource ... 104

Request Syntax ... 104

Request Parameters ... 104

Response Syntax ... 104

Response Elements ... 104

Errors ... 104

Examples ... 105

See Also ... 106

PutImage ... 107

Request Syntax ... 107

Request Parameters ... 107

Response Syntax ... 108

Response Elements ... 108

Errors ... 108

Examples ... 110

See Also ... 111

PutImageScanningConfiguration ... 112

Request Syntax ... 112

Request Parameters ... 112

Response Syntax ... 113

Response Elements ... 113

Errors ... 113

See Also ... 114

PutImageTagMutability ... 115

Request Syntax ... 115

Request Parameters ... 115

Response Syntax ... 115

(7)

Response Elements ... 116

Errors ... 116

Examples ... 117

See Also ... 117

PutLifecyclePolicy ... 119

Request Syntax ... 119

Request Parameters ... 119

Response Syntax ... 119

Response Elements ... 120

Errors ... 120

Examples ... 120

See Also ... 121

PutRegistryPolicy ... 123

Request Syntax ... 123

Request Parameters ... 123

Response Syntax ... 123

Response Elements ... 123

Errors ... 124

See Also ... 124

PutRegistryScanningConfiguration ... 125

Request Syntax ... 125

Request Parameters ... 125

Response Syntax ... 126

Response Elements ... 126

Errors ... 126

See Also ... 126

PutReplicationConfiguration ... 128

Request Syntax ... 128

Request Parameters ... 128

Response Syntax ... 128

Response Elements ... 129

Errors ... 129

See Also ... 129

SetRepositoryPolicy ... 131

Request Syntax ... 131

Request Parameters ... 131

Response Syntax ... 132

Response Elements ... 132

Errors ... 132

Examples ... 133

See Also ... 134

StartImageScan ... 135

Request Syntax ... 135

Request Parameters ... 135

Response Syntax ... 135

Response Elements ... 136

Errors ... 136

Examples ... 137

See Also ... 138

StartLifecyclePolicyPreview ... 139

Request Syntax ... 139

Request Parameters ... 139

Response Syntax ... 139

Response Elements ... 140

Errors ... 140

Examples ... 141

See Also ... 142

(8)

TagResource ... 143

Request Syntax ... 143

Request Parameters ... 143

Response Elements ... 143

Errors ... 143

See Also ... 144

UntagResource ... 145

Request Syntax ... 145

Request Parameters ... 145

Response Elements ... 145

Errors ... 145

See Also ... 146

UploadLayerPart ... 147

Request Syntax ... 147

Request Parameters ... 147

Response Syntax ... 148

Response Elements ... 148

Errors ... 149

See Also ... 150

Data Types ... 151

Attribute ... 153

Contents ... 153

See Also ... 153

AuthorizationData ... 154

Contents ... 154

See Also ... 154

AwsEcrContainerImageDetails ... 155

Contents ... 155

See Also ... 156

CvssScore ... 157

Contents ... 157

See Also ... 157

CvssScoreAdjustment ... 158

Contents ... 158

See Also ... 158

CvssScoreDetails ... 159

Contents ... 159

See Also ... 159

DescribeImagesFilter ... 160

Contents ... 160

See Also ... 160

EncryptionConfiguration ... 161

Contents ... 161

See Also ... 161

EnhancedImageScanFinding ... 163

Contents ... 163

See Also ... 164

Image ... 166

Contents ... 166

See Also ... 166

ImageDetail ... 168

Contents ... 168

See Also ... 169

ImageFailure ... 171

Contents ... 171

See Also ... 171

ImageIdentifier ... 172

(9)

Contents ... 172

See Also ... 172

ImageReplicationStatus ... 173

Contents ... 173

See Also ... 173

ImageScanFinding ... 174

Contents ... 174

See Also ... 174

ImageScanFindings ... 175

Contents ... 175

See Also ... 175

ImageScanFindingsSummary ... 176

Contents ... 176

See Also ... 176

ImageScanningConfiguration ... 177

Contents ... 177

See Also ... 177

ImageScanStatus ... 178

Contents ... 178

See Also ... 178

Layer ... 179

Contents ... 179

See Also ... 179

LayerFailure ... 180

Contents ... 180

See Also ... 180

LifecyclePolicyPreviewFilter ... 181

Contents ... 181

See Also ... 181

LifecyclePolicyPreviewResult ... 182

Contents ... 182

See Also ... 182

LifecyclePolicyPreviewSummary ... 184

Contents ... 184

See Also ... 184

LifecyclePolicyRuleAction ... 185

Contents ... 185

See Also ... 185

ListImagesFilter ... 186

Contents ... 186

See Also ... 186

PackageVulnerabilityDetails ... 187

Contents ... 187

See Also ... 188

PullThroughCacheRule ... 189

Contents ... 189

See Also ... 189

Recommendation ... 190

Contents ... 190

See Also ... 190

RegistryScanningConfiguration ... 191

Contents ... 191

See Also ... 191

RegistryScanningRule ... 192

Contents ... 192

See Also ... 192

Remediation ... 193

(10)

Contents ... 193

See Also ... 193

ReplicationConfiguration ... 194

Contents ... 194

See Also ... 194

ReplicationDestination ... 195

Contents ... 195

See Also ... 195

ReplicationRule ... 196

Contents ... 196

See Also ... 196

Repository ... 197

Contents ... 197

See Also ... 198

RepositoryFilter ... 199

Contents ... 199

See Also ... 199

RepositoryScanningConfiguration ... 200

Contents ... 200

See Also ... 200

RepositoryScanningConfigurationFailure ... 202

Contents ... 202

See Also ... 202

Resource ... 203

Contents ... 203

See Also ... 203

ResourceDetails ... 204

Contents ... 204

See Also ... 204

ScanningRepositoryFilter ... 205

Contents ... 205

See Also ... 205

ScoreDetails ... 206

Contents ... 206

See Also ... 206

Tag ... 207

Contents ... 207

See Also ... 207

VulnerablePackage ... 208

Contents ... 208

See Also ... 209

Common Parameters ... 210

Common Errors ... 212

(11)

Welcome

Amazon Elastic Container Registry (Amazon ECR) is a managed container image registry service.

Customers can use the familiar Docker CLI, or their preferred client, to push, pull, and manage images.

Amazon ECR provides a secure, scalable, and reliable registry for your Docker or Open Container

Initiative (OCI) images. Amazon ECR supports private repositories with resource-based permissions using IAM so that specific users or Amazon EC2 instances can access repositories and images.

Amazon ECR has service endpoints in each supported Region. For more information, see Amazon ECR endpoints in the AWS General Reference.

This document was last published on March 6, 2022.

(12)

Actions

The following actions are supported:

• BatchCheckLayerAvailability (p. 4)

• BatchDeleteImage (p. 8)

• BatchGetImage (p. 13)

• BatchGetRepositoryScanningConfiguration (p. 17)

• CompleteLayerUpload (p. 20)

• CreatePullThroughCacheRule (p. 24)

• CreateRepository (p. 27)

• DeleteLifecyclePolicy (p. 32)

• DeletePullThroughCacheRule (p. 36)

• DeleteRegistryPolicy (p. 39)

• DeleteRepository (p. 41)

• DeleteRepositoryPolicy (p. 45)

• DescribeImageReplicationStatus (p. 49)

• DescribeImages (p. 52)

• DescribeImageScanFindings (p. 58)

• DescribePullThroughCacheRules (p. 65)

• DescribeRegistry (p. 68)

• DescribeRepositories (p. 70)

• GetAuthorizationToken (p. 74)

• GetDownloadUrlForLayer (p. 77)

• GetLifecyclePolicy (p. 80)

• GetLifecyclePolicyPreview (p. 84)

• GetRegistryPolicy (p. 89)

• GetRegistryScanningConfiguration (p. 91)

• GetRepositoryPolicy (p. 93)

• InitiateLayerUpload (p. 97)

• ListImages (p. 100)

• ListTagsForResource (p. 104)

• PutImage (p. 107)

• PutImageScanningConfiguration (p. 112)

• PutImageTagMutability (p. 115)

• PutLifecyclePolicy (p. 119)

• PutRegistryPolicy (p. 123)

• PutRegistryScanningConfiguration (p. 125)

• PutReplicationConfiguration (p. 128)

• SetRepositoryPolicy (p. 131)

• StartImageScan (p. 135)

• StartLifecyclePolicyPreview (p. 139)

• TagResource (p. 143)

• UntagResource (p. 145)

(13)

• UploadLayerPart (p. 147)

(14)

BatchCheckLayerAvailability

BatchCheckLayerAvailability

Checks the availability of one or more image layers in a repository.

When an image is pushed to a repository, each image layer is checked to verify if it has been uploaded before. If it has been uploaded, then the image layer is skipped.

NoteThis operation is used by the Amazon ECR proxy and is not generally used by customers for pulling and pushing images. In most cases, you should use the docker CLI to pull, tag, and push images.

Request Syntax

{ "layerDigests": [ "string" ], "registryId": "string", "repositoryName": "string"

}

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters (p. 210).

The request accepts the following data in JSON format.

layerDigests (p. 4)

The digests of the image layers to check.

Type: Array of strings

Array Members: Minimum number of 1 item. Maximum number of 100 items.

Length Constraints: Minimum length of 0. Maximum length of 1000.

Required: Yes registryId (p. 4)

The AWS account ID associated with the registry that contains the image layers to check. If you do not specify a registry, the default registry is assumed.

Type: String

Pattern: [0-9]{12}

Required: No repositoryName (p. 4)

The name of the repository that is associated with the image layers to check.

Type: String

Length Constraints: Minimum length of 2. Maximum length of 256.

Pattern: (?:[a-z0-9]+(?:[._-][a-z0-9]+)*/)*[a-z0-9]+(?:[._-][a-z0-9]+)*

(15)

Response Syntax

Required: Yes

Response Syntax

{ "failures": [ {

"failureCode": "string", "failureReason": "string", "layerDigest": "string"

} ],

"layers": [ {

"layerAvailability": "string", "layerDigest": "string", "layerSize": number, "mediaType": "string"

} ]}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

failures (p. 5)

Any failures associated with the call.

Type: Array of LayerFailure (p. 180) objects layers (p. 5)

A list of image layer objects corresponding to the image layer references in the request.

Type: Array of Layer (p. 179) objects

Errors

For information about the errors that are common to all actions, see Common Errors (p. 212).

InvalidParameterException

The specified parameter is invalid. Review the available parameters for the API request.

HTTP Status Code: 400 RepositoryNotFoundException

The specified repository could not be found. Check the spelling of the specified repository and ensure that you are performing operations on the correct registry.

HTTP Status Code: 400 ServerException

These errors are usually caused by a server-side issue.

(16)

Examples

HTTP Status Code: 500

Examples

In the following example or examples, the Authorization header contents (AUTHPARAMS) must be replaced with an AWS Signature Version 4 signature. For more information about creating these signatures, see Signature Version 4 Signing Process in the AWS General Reference.

You only need to learn how to sign HTTP requests if you intend to manually create them. When you use the AWS Command Line Interface (AWS CLI) or one of the AWS SDKs to make requests to AWS, these tools automatically sign the requests for you with the access key that you specify when you configure the tools. When you use these tools, you don't need to learn how to sign requests yourself.

Example

This example checks the availability of an image layer in the amazonlinux repository.

Sample Request

POST / HTTP/1.1

Host: ecr.us-west-2.amazonaws.com Accept-Encoding: identity

Content-Length: 126

X-Amz-Target: AmazonEC2ContainerRegistry_V20150921.BatchCheckLayerAvailability X-Amz-Date: 20161216T195733Zc

User-Agent: aws-cli/1.11.22 Python/2.7.12 Darwin/16.3.0 botocore/1.4.79 Content-Type: application/x-amz-json-1.1

Authorization: AUTHPARAMS { "layerDigests": [

"sha256:8e3fa21c4cc40232e835a6761332d225c7af3235c5755f44ada2ed9d0e4ab7e8"

], "repositoryName": "amazonlinux"

}

Sample Response

HTTP/1.1 200 OK Server: Server

Date: Fri, 16 Dec 2016 19:57:33 GMT Content-Type: application/x-amz-json-1.1 Content-Length: 233

Connection: keep-alive

x-amzn-RequestId: e2422faf-c3c9-11e6-a3ee-63b3b5dcf3b9 { "failures": [],

"layers": [ {

"layerAvailability": "AVAILABLE", "layerDigest":

"sha256:8e3fa21c4cc40232e835a6761332d225c7af3235c5755f44ada2ed9d0e4ab7e8", "layerSize": 91768077,

"mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip"

} ]}

(17)

See Also

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

(18)

BatchDeleteImage

BatchDeleteImage

Deletes a list of specified images within a repository. Images are specified with either an imageTag or imageDigest.

You can remove a tag from an image by specifying the image's tag in your request. When you remove the last tag from an image, the image is deleted from your repository.

You can completely delete an image (and all of its tags) by specifying the image's digest in your request.

Request Syntax

{ "imageIds": [ {

"imageDigest": "string", "imageTag": "string"

} ],

"registryId": "string", "repositoryName": "string"

}

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters (p. 210).

The request accepts the following data in JSON format.

imageIds (p. 8)

A list of image ID references that correspond to images to delete. The format of the imageIds reference is imageTag=tag or imageDigest=digest.

Type: Array of ImageIdentifier (p. 172) objects

Array Members: Minimum number of 1 item. Maximum number of 100 items.

Required: Yes registryId (p. 8)

The AWS account ID associated with the registry that contains the image to delete. If you do not specify a registry, the default registry is assumed.

Type: String

Pattern: [0-9]{12}

Required: No repositoryName (p. 8)

The repository that contains the image to delete.

Type: String

Length Constraints: Minimum length of 2. Maximum length of 256.

Pattern: (?:[a-z0-9]+(?:[._-][a-z0-9]+)*/)*[a-z0-9]+(?:[._-][a-z0-9]+)*

(19)

Response Syntax

Required: Yes

Response Syntax

{

"failures": [ {

"failureCode": "string", "failureReason": "string", "imageId": {

"imageDigest": "string", "imageTag": "string"

} } ],

"imageIds": [ {

"imageDigest": "string", "imageTag": "string"

} ]}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

failures (p. 9)

Any failures associated with the call.

Type: Array of ImageFailure (p. 171) objects imageIds (p. 9)

The image IDs of the deleted images.

Type: Array of ImageIdentifier (p. 172) objects

Array Members: Minimum number of 1 item. Maximum number of 100 items.

Errors

For information about the errors that are common to all actions, see Common Errors (p. 212).

InvalidParameterException

The specified parameter is invalid. Review the available parameters for the API request.

HTTP Status Code: 400 RepositoryNotFoundException

The specified repository could not be found. Check the spelling of the specified repository and ensure that you are performing operations on the correct registry.

HTTP Status Code: 400

(20)

Examples

ServerException

These errors are usually caused by a server-side issue.

HTTP Status Code: 500

Examples

In the following example or examples, the Authorization header contents (AUTHPARAMS) must be replaced with an AWS Signature Version 4 signature. For more information about creating these signatures, see Signature Version 4 Signing Process in the AWS General Reference.

You only need to learn how to sign HTTP requests if you intend to manually create them. When you use the AWS Command Line Interface (AWS CLI) or one of the AWS SDKs to make requests to AWS, these tools automatically sign the requests for you with the access key that you specify when you configure the tools. When you use these tools, you don't need to learn how to sign requests yourself.

Example

This example deletes an image in the ubuntu repository with the imageTag value of xenial.

Sample Request

POST / HTTP/1.1

Host: ecr.us-west-2.amazonaws.com Accept-Encoding: identity

Content-Length: 66

X-Amz-Target: AmazonEC2ContainerRegistry_V20150921.BatchDeleteImage X-Amz-Date: 20161216T193711Z

User-Agent: aws-cli/1.11.22 Python/2.7.12 Darwin/16.3.0 botocore/1.4.79 Content-Type: application/x-amz-json-1.1

Authorization: AUTHPARAMS { "repositoryName": "ubuntu", "imageIds": [

{

"imageTag": "xenial"

} ]}

Sample Response

HTTP/1.1 200 OK Server: Server

Date: Fri, 16 Dec 2016 19:37:11 GMT Content-Type: application/x-amz-json-1.1 Content-Length: 138

Connection: keep-alive

x-amzn-RequestId: 09cc7023-c3c7-11e6-8acf-61b7dd8abe56 { "failures": [],

"imageIds": [ {

"imageDigest":

"sha256:7a64bc9c8843b0a8c8b8a7e4715b7615e4e1b0d8ca3c7e7a76ec8250899c397a", "imageTag": "xenial"

(21)

See Also

} ]}

Example

This example deletes an image (and all of its tags) in the ubuntu repository with the imageDigest value of sha256:7a64bc9c8843b0a8c8b8a7e4715b7615e4e1b0d8ca3c7e7a76ec8250899c397a.

Sample Request

POST / HTTP/1.1

Host: ecr.us-west-2.amazonaws.com Accept-Encoding: identity

Content-Length: 134

X-Amz-Target: AmazonEC2ContainerRegistry_V20150921.BatchDeleteImage X-Amz-Date: 20161216T194250Z

User-Agent: aws-cli/1.11.22 Python/2.7.12 Darwin/16.3.0 botocore/1.4.79 Content-Type: application/x-amz-json-1.1

Authorization: AUTHPARAMS {

"repositoryName": "ubuntu", "imageIds": [

{

"imageDigest":

"sha256:7a64bc9c8843b0a8c8b8a7e4715b7615e4e1b0d8ca3c7e7a76ec8250899c397a"

} ]}

Sample Response

HTTP/1.1 200 OK Server: Server

Date: Fri, 16 Dec 2016 19:42:50 GMT Content-Type: application/x-amz-json-1.1 Content-Length: 248

Connection: keep-alive

x-amzn-RequestId: d441a9f6-c3c7-11e6-8acf-61b7dd8abe56 { "failures": [],

"imageIds": [ {

"imageDigest":

"sha256:7a64bc9c8843b0a8c8b8a7e4715b7615e4e1b0d8ca3c7e7a76ec8250899c397a", "imageTag": "xenial"

}, {

"imageDigest":

"sha256:7a64bc9c8843b0a8c8b8a7e4715b7615e4e1b0d8ca3c7e7a76ec8250899c397a", "imageTag": "latest"

} ]}

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

(22)

See Also

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

(23)

BatchGetImage

BatchGetImage

Gets detailed information for an image. Images are specified with either an imageTag or imageDigest.

When an image is pulled, the BatchGetImage API is called once to retrieve the image manifest.

Request Syntax

{ "acceptedMediaTypes": [ "string" ], "imageIds": [

{

"imageDigest": "string", "imageTag": "string"

} ],

"registryId": "string", "repositoryName": "string"

}

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters (p. 210).

The request accepts the following data in JSON format.

acceptedMediaTypes (p. 13)

The accepted media types for the request.

Valid values: application/vnd.docker.distribution.manifest.v1+json | application/vnd.docker.distribution.manifest.v2+json | application/

vnd.oci.image.manifest.v1+json Type: Array of strings

Array Members: Minimum number of 1 item. Maximum number of 100 items.

Required: No imageIds (p. 13)

A list of image ID references that correspond to images to describe. The format of the imageIds reference is imageTag=tag or imageDigest=digest.

Type: Array of ImageIdentifier (p. 172) objects

Array Members: Minimum number of 1 item. Maximum number of 100 items.

Required: Yes registryId (p. 13)

The AWS account ID associated with the registry that contains the images to describe. If you do not specify a registry, the default registry is assumed.

Type: String

(24)

Response Syntax

Pattern: [0-9]{12}

Required: No repositoryName (p. 13)

The repository that contains the images to describe.

Type: String

Length Constraints: Minimum length of 2. Maximum length of 256.

Pattern: (?:[a-z0-9]+(?:[._-][a-z0-9]+)*/)*[a-z0-9]+(?:[._-][a-z0-9]+)*

Required: Yes

Response Syntax

{ "failures": [ {

"failureCode": "string", "failureReason": "string", "imageId": {

"imageDigest": "string", "imageTag": "string"

} } ],

"images": [ {

"imageId": {

"imageDigest": "string", "imageTag": "string"

},

"imageManifest": "string",

"imageManifestMediaType": "string", "registryId": "string",

"repositoryName": "string"

} ] }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

failures (p. 14)

Any failures associated with the call.

Type: Array of ImageFailure (p. 171) objects images (p. 14)

A list of image objects corresponding to the image references in the request.

Type: Array of Image (p. 166) objects

(25)

Errors

Errors

For information about the errors that are common to all actions, see Common Errors (p. 212).

InvalidParameterException

The specified parameter is invalid. Review the available parameters for the API request.

HTTP Status Code: 400 RepositoryNotFoundException

The specified repository could not be found. Check the spelling of the specified repository and ensure that you are performing operations on the correct registry.

HTTP Status Code: 400 ServerException

These errors are usually caused by a server-side issue.

HTTP Status Code: 500

Examples

In the following example or examples, the Authorization header contents (AUTHPARAMS) must be replaced with an AWS Signature Version 4 signature. For more information about creating these signatures, see Signature Version 4 Signing Process in the AWS General Reference.

You only need to learn how to sign HTTP requests if you intend to manually create them. When you use the AWS Command Line Interface (AWS CLI) or one of the AWS SDKs to make requests to AWS, these tools automatically sign the requests for you with the access key that you specify when you configure the tools. When you use these tools, you don't need to learn how to sign requests yourself.

Example

This example describes an image in the amazonlinux repository with the imageTag value of latest.

Sample Request

POST / HTTP/1.1

Host: ecr.us-west-2.amazonaws.com Accept-Encoding: identity

Content-Length: 71

X-Amz-Target: AmazonEC2ContainerRegistry_V20150921.BatchGetImage X-Amz-Date: 20161216T195356Z

User-Agent: aws-cli/1.11.22 Python/2.7.12 Darwin/16.3.0 botocore/1.4.79 Content-Type: application/x-amz-json-1.1

Authorization: AUTHPARAMS

{ "repositoryName": "amazonlinux", "imageIds": [

{

"imageTag": "latest"

} ]}

(26)

See Also

Sample Response

HTTP/1.1 200 OK Server: Server

Date: Fri, 16 Dec 2016 19:53:56 GMT Content-Type: application/x-amz-json-1.1 Content-Length: 800

Connection: keep-alive

x-amzn-RequestId: 60dc1ea1-c3c9-11e6-aa04-25c3a5fb1b54 { "failures": [],

"images": [ {

"imageId": { "imageDigest":

"sha256:f1d4ae3f7261a72e98c6ebefe9985cf10a0ea5bd762585a43e0700ed99863807", "imageTag": "latest"

},

"imageManifest": "{\n \"schemaVersion\": 2,\n \"mediaType\": \"application/

vnd.docker.distribution.manifest.v2+json\",\n \"config\": {\n \"mediaType\":

\"application/vnd.docker.container.image.v1+json\",\n \"size\": 1486,\n

\"digest\": \"sha256:5b52b314511a611975c2c65e695d920acdf8ae8848fe0ef00b7d018d1f118b64\"\n },\n \"layers\": [\n {\n \"mediaType\": \"application/

vnd.docker.image.rootfs.diff.tar.gzip\",\n \"size\": 91768077,\n \"digest

\": \"sha256:8e3fa21c4cc40232e835a6761332d225c7af3235c5755f44ada2ed9d0e4ab7e8\"\n }\n ]\n}",

"registryId": "012345678910", "repositoryName": "amazonlinux"

} ]}

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

(27)

BatchGetRepositoryScanningConfiguration

BatchGetRepositoryScanningConfiguration

Gets the scanning configuration for one or more repositories.

Request Syntax

{ "repositoryNames": [ "string" ] }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters (p. 210).

The request accepts the following data in JSON format.

repositoryNames (p. 17)

One or more repository names to get the scanning configuration for.

Type: Array of strings

Array Members: Minimum number of 1 item. Maximum number of 25 items.

Length Constraints: Minimum length of 2. Maximum length of 256.

Pattern: (?:[a-z0-9]+(?:[._-][a-z0-9]+)*/)*[a-z0-9]+(?:[._-][a-z0-9]+)*

Required: Yes

Response Syntax

{ "failures": [ {

"failureCode": "string", "failureReason": "string", "repositoryName": "string"

} ],

"scanningConfigurations": [ {

"appliedScanFilters": [ {

"filter": "string", "filterType": "string"

} ],

"repositoryArn": "string", "repositoryName": "string", "scanFrequency": "string", "scanOnPush": boolean }

]}

(28)

Response Elements

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

failures (p. 17)

Any failures associated with the call.

Type: Array of RepositoryScanningConfigurationFailure (p. 202) objects scanningConfigurations (p. 17)

The scanning configuration for the requested repositories.

Type: Array of RepositoryScanningConfiguration (p. 200) objects

Errors

For information about the errors that are common to all actions, see Common Errors (p. 212).

InvalidParameterException

The specified parameter is invalid. Review the available parameters for the API request.

HTTP Status Code: 400 RepositoryNotFoundException

The specified repository could not be found. Check the spelling of the specified repository and ensure that you are performing operations on the correct registry.

HTTP Status Code: 400 ServerException

These errors are usually caused by a server-side issue.

HTTP Status Code: 500 ValidationException

There was an exception validating this request.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

(29)

See Also

• AWS SDK for Python

• AWS SDK for Ruby V3

(30)

CompleteLayerUpload

CompleteLayerUpload

Informs Amazon ECR that the image layer upload has completed for a specified registry, repository name, and upload ID. You can optionally provide a sha256 digest of the image layer for data validation purposes.

When an image is pushed, the CompleteLayerUpload API is called once per each new image layer to verify that the upload has completed.

NoteThis operation is used by the Amazon ECR proxy and is not generally used by customers for pulling and pushing images. In most cases, you should use the docker CLI to pull, tag, and push images.

Request Syntax

{ "layerDigests": [ "string" ], "registryId": "string", "repositoryName": "string", "uploadId": "string"

}

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters (p. 210).

The request accepts the following data in JSON format.

layerDigests (p. 20)

The sha256 digest of the image layer.

Type: Array of strings

Array Members: Minimum number of 1 item. Maximum number of 100 items.

Pattern: [a-zA-Z0-9-_+.]+:[a-fA-F0-9]+

Required: Yes registryId (p. 20)

The AWS account ID associated with the registry to which to upload layers. If you do not specify a registry, the default registry is assumed.

Type: String

Pattern: [0-9]{12}

Required: No repositoryName (p. 20)

The name of the repository to associate with the image layer.

Type: String

Length Constraints: Minimum length of 2. Maximum length of 256.

(31)

Response Syntax

Pattern: (?:[a-z0-9]+(?:[._-][a-z0-9]+)*/)*[a-z0-9]+(?:[._-][a-z0-9]+)*

Required: Yes uploadId (p. 20)

The upload ID from a previous InitiateLayerUpload (p. 97) operation to associate with the image layer.

Type: String

Pattern: [0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA- F]{12}

Required: Yes

Response Syntax

{ "layerDigest": "string", "registryId": "string", "repositoryName": "string", "uploadId": "string"

}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

layerDigest (p. 21)

The sha256 digest of the image layer.

Type: String

Pattern: [a-zA-Z0-9-_+.]+:[a-fA-F0-9]+

registryId (p. 21)

The registry ID associated with the request.

Type: String

Pattern: [0-9]{12}

repositoryName (p. 21)

The repository name associated with the request.

Type: String

Length Constraints: Minimum length of 2. Maximum length of 256.

Pattern: (?:[a-z0-9]+(?:[._-][a-z0-9]+)*/)*[a-z0-9]+(?:[._-][a-z0-9]+)*

uploadId (p. 21)

The upload ID associated with the layer.

(32)

Errors

Type: String

Pattern: [0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA- F]{12}

Errors

For information about the errors that are common to all actions, see Common Errors (p. 212).

EmptyUploadException

The specified layer upload does not contain any layer parts.

HTTP Status Code: 400 InvalidLayerException

The layer digest calculation performed by Amazon ECR upon receipt of the image layer does not match the digest specified.

HTTP Status Code: 400 InvalidParameterException

The specified parameter is invalid. Review the available parameters for the API request.

HTTP Status Code: 400 KmsException

The operation failed due to a KMS exception.

HTTP Status Code: 400 LayerAlreadyExistsException

The image layer already exists in the associated repository.

HTTP Status Code: 400 LayerPartTooSmallException

Layer parts must be at least 5 MiB in size.

HTTP Status Code: 400 RepositoryNotFoundException

The specified repository could not be found. Check the spelling of the specified repository and ensure that you are performing operations on the correct registry.

HTTP Status Code: 400 ServerException

These errors are usually caused by a server-side issue.

HTTP Status Code: 500 UploadNotFoundException

The upload could not be found, or the specified upload ID is not valid for this repository.

HTTP Status Code: 400

(33)

See Also

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

(34)

CreatePullThroughCacheRule

CreatePullThroughCacheRule

Creates a pull through cache rule. A pull through cache rule provides a way to cache images from an external public registry in your Amazon ECR private registry.

Request Syntax

{ "ecrRepositoryPrefix": "string", "registryId": "string",

"upstreamRegistryUrl": "string"

}

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters (p. 210).

The request accepts the following data in JSON format.

ecrRepositoryPrefix (p. 24)

The repository name prefix to use when caching images from the source registry.

Type: String

Length Constraints: Minimum length of 2. Maximum length of 20.

Pattern: [a-z0-9]+(?:[._-][a-z0-9]+)*

Required: Yes registryId (p. 24)

The AWS account ID associated with the registry to create the pull through cache rule for. If you do not specify a registry, the default registry is assumed.

Type: String

Pattern: [0-9]{12}

Required: No

upstreamRegistryUrl (p. 24)

The registry URL of the upstream public registry to use as the source for the pull through cache rule.

Type: String Required: Yes

Response Syntax

{ "createdAt": number,

"ecrRepositoryPrefix": "string", "registryId": "string",

(35)

Response Elements

"upstreamRegistryUrl": "string"

}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

createdAt (p. 24)

The date and time, in JavaScript date format, when the pull through cache rule was created.

Type: Timestamp ecrRepositoryPrefix (p. 24)

The Amazon ECR repository prefix associated with the pull through cache rule.

Type: String

Length Constraints: Minimum length of 2. Maximum length of 20.

Pattern: [a-z0-9]+(?:[._-][a-z0-9]+)*

registryId (p. 24)

The registry ID associated with the request.

Type: String

Pattern: [0-9]{12}

upstreamRegistryUrl (p. 24)

The upstream registry URL associated with the pull through cache rule.

Type: String

Errors

For information about the errors that are common to all actions, see Common Errors (p. 212).

InvalidParameterException

The specified parameter is invalid. Review the available parameters for the API request.

HTTP Status Code: 400 LimitExceededException

The operation did not succeed because it would have exceeded a service limit for your account. For more information, see Amazon ECR service quotas in the Amazon Elastic Container Registry User Guide.

HTTP Status Code: 400

PullThroughCacheRuleAlreadyExistsException

A pull through cache rule with these settings already exists for the private registry.

HTTP Status Code: 400

(36)

See Also

ServerException

These errors are usually caused by a server-side issue.

HTTP Status Code: 500

UnsupportedUpstreamRegistryException

The specified upstream registry isn't supported.

HTTP Status Code: 400 ValidationException

There was an exception validating this request.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

(37)

CreateRepository

CreateRepository

Creates a repository. For more information, see Amazon ECR repositories in the Amazon Elastic Container Registry User Guide.

Request Syntax

{ "encryptionConfiguration": { "encryptionType": "string", "kmsKey": "string"

},

"imageScanningConfiguration": { "scanOnPush": boolean

},

"imageTagMutability": "string", "registryId": "string",

"repositoryName": "string", "tags": [

{

"Key": "string", "Value": "string"

} ]}

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters (p. 210).

The request accepts the following data in JSON format.

encryptionConfiguration (p. 27)

The encryption configuration for the repository. This determines how the contents of your repository are encrypted at rest.

Type: EncryptionConfiguration (p. 161) object Required: No

imageScanningConfiguration (p. 27)

The image scanning configuration for the repository. This determines whether images are scanned for known vulnerabilities after being pushed to the repository.

Type: ImageScanningConfiguration (p. 177) object Required: No

imageTagMutability (p. 27)

The tag mutability setting for the repository. If this parameter is omitted, the default setting of MUTABLE will be used which will allow image tags to be overwritten. If IMMUTABLE is specified, all image tags within the repository will be immutable which will prevent them from being overwritten.

Type: String

Valid Values: MUTABLE | IMMUTABLE

(38)

Response Syntax

Required: No registryId (p. 27)

The AWS account ID associated with the registry to create the repository. If you do not specify a registry, the default registry is assumed.

Type: String

Pattern: [0-9]{12}

Required: No repositoryName (p. 27)

The name to use for the repository. The repository name may be specified on its own (such as nginx-web-app) or it can be prepended with a namespace to group the repository into a category (such as project-a/nginx-web-app).

Type: String

Length Constraints: Minimum length of 2. Maximum length of 256.

Pattern: (?:[a-z0-9]+(?:[._-][a-z0-9]+)*/)*[a-z0-9]+(?:[._-][a-z0-9]+)*

Required: Yes tags (p. 27)

The metadata that you apply to the repository to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.

Type: Array of Tag (p. 207) objects Required: No

Response Syntax

{

"repository": { "createdAt": number,

"encryptionConfiguration": { "encryptionType": "string", "kmsKey": "string"

},

"imageScanningConfiguration": { "scanOnPush": boolean

},

"imageTagMutability": "string", "registryId": "string",

"repositoryArn": "string", "repositoryName": "string", "repositoryUri": "string"

} }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

(39)

Errors

The following data is returned in JSON format by the service.

repository (p. 28)

The repository that was created.

Type: Repository (p. 197) object

Errors

For information about the errors that are common to all actions, see Common Errors (p. 212).

InvalidParameterException

The specified parameter is invalid. Review the available parameters for the API request.

HTTP Status Code: 400 InvalidTagParameterException

An invalid parameter has been specified. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.

HTTP Status Code: 400 KmsException

The operation failed due to a KMS exception.

HTTP Status Code: 400 LimitExceededException

The operation did not succeed because it would have exceeded a service limit for your account. For more information, see Amazon ECR service quotas in the Amazon Elastic Container Registry User Guide.

HTTP Status Code: 400 RepositoryAlreadyExistsException

The specified repository already exists in the specified registry.

HTTP Status Code: 400 ServerException

These errors are usually caused by a server-side issue.

HTTP Status Code: 500 TooManyTagsException

The list of tags on the repository is over the limit. The maximum number of tags that can be applied to a repository is 50.

HTTP Status Code: 400

Examples

In the following example or examples, the Authorization header contents (AUTHPARAMS) must be replaced with an AWS Signature Version 4 signature. For more information about creating these signatures, see Signature Version 4 Signing Process in the AWS General Reference.

(40)

See Also

You only need to learn how to sign HTTP requests if you intend to manually create them. When you use the AWS Command Line Interface (AWS CLI) or one of the AWS SDKs to make requests to AWS, these tools automatically sign the requests for you with the access key that you specify when you configure the tools. When you use these tools, you don't need to learn how to sign requests yourself.

Example

This example creates a repository called sample-repo in the default registry for an account.

Sample Request

POST / HTTP/1.1

Host: api.ecr.us-west-2.amazonaws.com Accept-Encoding: identity

X-Amz-Target: AmazonEC2ContainerRegistry_V20150921.CreateRepository Content-Type: application/x-amz-json-1.1

User-Agent: aws-cli/1.16.190 Python/3.6.1 Darwin/16.7.0 botocore/1.12.180 X-Amz-Date: 20190715T204735Z

Authorization: AUTHPARAMS Content-Length: 33

{

"repositoryName": "sample-repo"

}

Sample Response

HTTP/1.1 200 OK

x-amzn-RequestId: 123a4b56-7c89-01d2-3ef4-example5678f Content-Type: application/x-amz-json-1.1

Content-Length: 339 Connection: keep-alive { "repository":{

"repositoryArn":"arn:aws:ecr:us-west-2:012345678910:repository/sample-repo", "registryId":"012345678910",

"repositoryName":"sample-repo",

"repositoryUri":"012345678910.dkr.ecr.us-west-2.amazonaws.com/sample-repo", "createdAt":1.563223656E9,

"imageTagMutability":"MUTABLE", "imageScanningConfiguration": { "scanOnPush": false }

} }

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

(41)

See Also

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

(42)

DeleteLifecyclePolicy

DeleteLifecyclePolicy

Deletes the lifecycle policy associated with the specified repository.

Request Syntax

{ "registryId": "string", "repositoryName": "string"

}

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters (p. 210).

The request accepts the following data in JSON format.

registryId (p. 32)

The AWS account ID associated with the registry that contains the repository. If you do not specify a registry, the default registry is assumed.

Type: String

Pattern: [0-9]{12}

Required: No repositoryName (p. 32)

The name of the repository.

Type: String

Length Constraints: Minimum length of 2. Maximum length of 256.

Pattern: (?:[a-z0-9]+(?:[._-][a-z0-9]+)*/)*[a-z0-9]+(?:[._-][a-z0-9]+)*

Required: Yes

Response Syntax

{ "lastEvaluatedAt": number, "lifecyclePolicyText": "string", "registryId": "string",

"repositoryName": "string"

}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

(43)

Errors

The following data is returned in JSON format by the service.

lastEvaluatedAt (p. 32)

The time stamp of the last time that the lifecycle policy was run.

Type: Timestamp lifecyclePolicyText (p. 32)

The JSON lifecycle policy text.

Type: String

Length Constraints: Minimum length of 100. Maximum length of 30720.

registryId (p. 32)

The registry ID associated with the request.

Type: String

Pattern: [0-9]{12}

repositoryName (p. 32)

The repository name associated with the request.

Type: String

Length Constraints: Minimum length of 2. Maximum length of 256.

Pattern: (?:[a-z0-9]+(?:[._-][a-z0-9]+)*/)*[a-z0-9]+(?:[._-][a-z0-9]+)*

Errors

For information about the errors that are common to all actions, see Common Errors (p. 212).

InvalidParameterException

The specified parameter is invalid. Review the available parameters for the API request.

HTTP Status Code: 400

LifecyclePolicyNotFoundException

The lifecycle policy could not be found, and no policy is set to the repository.

HTTP Status Code: 400 RepositoryNotFoundException

The specified repository could not be found. Check the spelling of the specified repository and ensure that you are performing operations on the correct registry.

HTTP Status Code: 400 ServerException

These errors are usually caused by a server-side issue.

HTTP Status Code: 500

(44)

Examples

Examples

In the following example or examples, the Authorization header contents (AUTHPARAMS) must be replaced with an AWS Signature Version 4 signature. For more information about creating these signatures, see Signature Version 4 Signing Process in the AWS General Reference.

You only need to learn how to sign HTTP requests if you intend to manually create them. When you use the AWS Command Line Interface (AWS CLI) or one of the AWS SDKs to make requests to AWS, these tools automatically sign the requests for you with the access key that you specify when you configure the tools. When you use these tools, you don't need to learn how to sign requests yourself.

Example

This example deletes a lifecycle policy for a repository called project-a/amazon-ecs-sample in the default registry for an account.

Sample Request

POST / HTTP/1.1

Host: ecr.us-west-2.amazonaws.com Accept-Encoding: identity

X-Amz-Target: AmazonEC2ContainerRegistry_V20150921.DeleteLifecyclePolicy Content-Type: application/x-amz-json-1.1

User-Agent: aws-cli/1.11.144 Python/3.6.1 Darwin/16.6.0 botocore/1.7.2 X-Amz-Date: 20170901T223937Z

Authorization: AUTHPARAMS Content-Length: 48

{ "repositoryName": "project-a/amazon-ecs-sample", }

Sample Response

HTTP/1.1 200 OK Server: Server

Date: Fri, 01 Sep 2017 19:42:18 GMT Content-Type: application/x-amz-json-1.1 Content-Length: 340

Connection: keep-alive

x-amzn-RequestId: 123a4b56-7c89-01d2-3ef4-example5678f { "lastEvaluatedAt":1.504295007E9,

"lifecyclePolicyText":"{\"rules\":[{\"rulePriority\":1,\"description\":\"Expire images older than 14 days\",\"selection\":{\"tagStatus\":\"untagged\",\"countType\":

\"sinceImagePushed\",\"countUnit\":\"days\",\"countNumber\":14},\"action\":{\"type\":

\"expire\"}}]}",

"registryId":"012345678910",

"repositoryName":"project-a/amazon-ecs-sample"

}

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

(45)

See Also

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

(46)

DeletePullThroughCacheRule

DeletePullThroughCacheRule

Deletes a pull through cache rule.

Request Syntax

{ "ecrRepositoryPrefix": "string", "registryId": "string"

}

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters (p. 210).

The request accepts the following data in JSON format.

ecrRepositoryPrefix (p. 36)

The Amazon ECR repository prefix associated with the pull through cache rule to delete.

Type: String

Length Constraints: Minimum length of 2. Maximum length of 20.

Pattern: [a-z0-9]+(?:[._-][a-z0-9]+)*

Required: Yes registryId (p. 36)

The AWS account ID associated with the registry that contains the pull through cache rule. If you do not specify a registry, the default registry is assumed.

Type: String

Pattern: [0-9]{12}

Required: No

Response Syntax

{ "createdAt": number,

"ecrRepositoryPrefix": "string", "registryId": "string",

"upstreamRegistryUrl": "string"

}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

(47)

Errors

createdAt (p. 36)

The timestamp associated with the pull through cache rule.

Type: Timestamp ecrRepositoryPrefix (p. 36)

The Amazon ECR repository prefix associated with the request.

Type: String

Length Constraints: Minimum length of 2. Maximum length of 20.

Pattern: [a-z0-9]+(?:[._-][a-z0-9]+)*

registryId (p. 36)

The registry ID associated with the request.

Type: String

Pattern: [0-9]{12}

upstreamRegistryUrl (p. 36)

The upstream registry URL associated with the pull through cache rule.

Type: String

Errors

For information about the errors that are common to all actions, see Common Errors (p. 212).

InvalidParameterException

The specified parameter is invalid. Review the available parameters for the API request.

HTTP Status Code: 400

PullThroughCacheRuleNotFoundException

The pull through cache rule was not found. Specify a valid pull through cache rule and try again.

HTTP Status Code: 400 ServerException

These errors are usually caused by a server-side issue.

HTTP Status Code: 500 ValidationException

There was an exception validating this request.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

(48)

See Also

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

(49)

DeleteRegistryPolicy

DeleteRegistryPolicy

Deletes the registry permissions policy.

Response Syntax

{ "policyText": "string", "registryId": "string"

}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

policyText (p. 39)

The contents of the registry permissions policy that was deleted.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 10240.

registryId (p. 39)

The registry ID associated with the request.

Type: String

Pattern: [0-9]{12}

Errors

For information about the errors that are common to all actions, see Common Errors (p. 212).

InvalidParameterException

The specified parameter is invalid. Review the available parameters for the API request.

HTTP Status Code: 400 RegistryPolicyNotFoundException

The registry doesn't have an associated registry policy.

HTTP Status Code: 400 ServerException

These errors are usually caused by a server-side issue.

HTTP Status Code: 500 ValidationException

There was an exception validating this request.

(50)

See Also

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

(51)

DeleteRepository

DeleteRepository

Deletes a repository. If the repository contains images, you must either delete all images in the repository or use the force option to delete the repository.

Request Syntax

{ "force": boolean, "registryId": "string", "repositoryName": "string"

}

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters (p. 210).

The request accepts the following data in JSON format.

force (p. 41)

If a repository contains images, forces the deletion.

Type: Boolean Required: No registryId (p. 41)

The AWS account ID associated with the registry that contains the repository to delete. If you do not specify a registry, the default registry is assumed.

Type: String

Pattern: [0-9]{12}

Required: No repositoryName (p. 41)

The name of the repository to delete.

Type: String

Length Constraints: Minimum length of 2. Maximum length of 256.

Pattern: (?:[a-z0-9]+(?:[._-][a-z0-9]+)*/)*[a-z0-9]+(?:[._-][a-z0-9]+)*

Required: Yes

Response Syntax

{

"repository": { "createdAt": number,

(52)

Response Elements

"encryptionConfiguration": { "encryptionType": "string", "kmsKey": "string"

},

"imageScanningConfiguration": { "scanOnPush": boolean

},

"imageTagMutability": "string", "registryId": "string",

"repositoryArn": "string", "repositoryName": "string", "repositoryUri": "string"

}}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

repository (p. 41)

The repository that was deleted.

Type: Repository (p. 197) object

Errors

For information about the errors that are common to all actions, see Common Errors (p. 212).

InvalidParameterException

The specified parameter is invalid. Review the available parameters for the API request.

HTTP Status Code: 400 KmsException

The operation failed due to a KMS exception.

HTTP Status Code: 400 RepositoryNotEmptyException

The specified repository contains images. To delete a repository that contains images, you must force the deletion with the force parameter.

HTTP Status Code: 400 RepositoryNotFoundException

The specified repository could not be found. Check the spelling of the specified repository and ensure that you are performing operations on the correct registry.

HTTP Status Code: 400 ServerException

These errors are usually caused by a server-side issue.

HTTP Status Code: 500

(53)

Examples

Examples

In the following example or examples, the Authorization header contents (AUTHPARAMS) must be replaced with an AWS Signature Version 4 signature. For more information about creating these signatures, see Signature Version 4 Signing Process in the AWS General Reference.

You only need to learn how to sign HTTP requests if you intend to manually create them. When you use the AWS Command Line Interface (AWS CLI) or one of the AWS SDKs to make requests to AWS, these tools automatically sign the requests for you with the access key that you specify when you configure the tools. When you use these tools, you don't need to learn how to sign requests yourself.

Example

This example deletes a repository named ubuntu in the default registry for an account.

Sample Request

POST / HTTP/1.1

Host: api.ecr.us-west-2.amazonaws.com Accept-Encoding: identity

X-Amz-Target: AmazonEC2ContainerRegistry_V20150921.DeleteRepository Content-Type: application/x-amz-json-1.1

User-Agent: aws-cli/1.16.190 Python/3.6.1 Darwin/16.7.0 botocore/1.12.180 X-Amz-Date: 20190715T205933Z

Authorization: AUTHPARAMS Content-Length: 33

{ "repositoryName":"sample-repo"

}

Sample Response

HTTP/1.1 200 OK

x-amzn-RequestId: 123a4b56-7c89-01d2-3ef4-example5678f Content-Type: application/x-amz-json-1.1

Content-Length: 252 Connection: keep-alive { "repository":{

"createdAt":1.563223656E9, "registryId":"012345678910",

"repositoryArn":"arn:aws:ecr:us-west-2:012345678910:repository/sample-repo", "repositoryName":"sample-repo",

"repositoryUri":"012345678910.dkr.ecr.us-west-2.amazonaws.com/sample-repo"

}}

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

(54)

See Also

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

參考文獻

相關文件

This discovery is not only to provide a precious resource for the research of Wenxuan that has a long and excellent tradition in Chinese literature studies, but also to stress

 The nanostructure with anisotropic transmission characteristics on ITO films induced by fs laser can be used for the alignment layer , polarizer and conducting layer in LCD cell.

In BHJ solar cells using P3HT:PCBM, adjustment of surface energy and work function of ITO may lead to a tuneable morphology for the active layer and hole injection barrier

If the best number of degrees of freedom for pure error can be specified, we might use some standard optimality criterion to obtain an optimal design for the given model, and

• BP can not correct the latent error neurons by adjusting their succeeding layers.. • AIR tree can trace the errors in a latent layer that near the front

For a deep NNet for written character recognition from raw pixels, which type of features are more likely extracted after the first hidden layer.

contributions to the nearby pixels and writes the final floating point image to a file on disk the final floating-point image to a file on disk. • Tone mapping operations can be

• The abstraction shall have two units in terms o f which subclasses of Anatomical structure are defined: Cell and Organ.. • Other subclasses of Anatomical structure shall