2020/12/01 - Amazon Elastic Container Registry Public - 20 new api methods
Changes Supports Amazon Elastic Container Registry (Amazon ECR) Public, a fully managed registry that makes it easy for a developer to publicly share container software worldwide for anyone to download.
Notifies Amazon ECR that you intend to upload an image layer.
When an image is pushed, the InitiateLayerUpload API is called once per image layer that has not already been uploaded. Whether or not an image layer has been uploaded is determined by the BatchCheckLayerAvailability API action.
Note
This 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.
See also: AWS API Documentation
Request Syntax
client.initiate_layer_upload( registryId='string', repositoryName='string' )
string
The AWS account ID associated with the registry to which you intend to upload layers. If you do not specify a registry, the default public registry is assumed.
string
[REQUIRED]
The name of the repository to which you intend to upload layers.
dict
Response Syntax
{ 'uploadId': 'string', 'partSize': 123 }
Response Structure
(dict) --
uploadId (string) --
The upload ID for the layer upload. This parameter is passed to further UploadLayerPart and CompleteLayerUpload operations.
partSize (integer) --
The size, in bytes, that Amazon ECR expects future layer part uploads to be.
Retrieves catalog metadata for a public registry.
See also: AWS API Documentation
Request Syntax
client.get_registry_catalog_data()
dict
Response Syntax
{ 'registryCatalogData': { 'displayName': 'string' } }
Response Structure
(dict) --
registryCatalogData (dict) --
The catalog metadata for the public registry.
displayName (string) --
The display name for a public registry. This appears on the Amazon ECR Public Gallery.
Warning
Only accounts that have the verified account badge can have a registry display name.
Retrieves the repository policy for the specified repository.
See also: AWS API Documentation
Request Syntax
client.get_repository_policy( registryId='string', repositoryName='string' )
string
The AWS account ID associated with the public registry that contains the repository. If you do not specify a registry, the default public registry is assumed.
string
[REQUIRED]
The name of the repository with the policy to retrieve.
dict
Response Syntax
{ 'registryId': 'string', 'repositoryName': 'string', 'policyText': 'string' }
Response Structure
(dict) --
registryId (string) --
The registry ID associated with the request.
repositoryName (string) --
The repository name associated with the request.
policyText (string) --
The repository policy text associated with the repository. The policy text will be in JSON format.
Describes repositories in a public registry.
See also: AWS API Documentation
Request Syntax
client.describe_repositories( registryId='string', repositoryNames=[ 'string', ], nextToken='string', maxResults=123 )
string
The AWS account ID associated with the registry that contains the repositories to be described. If you do not specify a registry, the default public registry is assumed.
list
A list of repositories to describe. If this parameter is omitted, then all repositories in a registry are described.
(string) --
string
The nextToken value returned from a previous paginated DescribeRepositories request where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value. This value is null when there are no more results to return. This option cannot be used when you specify repositories with repositoryNames .
Note
This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.
integer
The maximum number of repository results returned by DescribeRepositories in paginated output. When this parameter is used, DescribeRepositories only returns maxResults results in a single page along with a nextToken response element. The remaining results of the initial request can be seen by sending another DescribeRepositories request with the returned nextToken value. This value can be between 1 and 1000. If this parameter is not used, then DescribeRepositories returns up to 100 results and a nextToken value, if applicable. This option cannot be used when you specify repositories with repositoryNames .
dict
Response Syntax
{ 'repositories': [ { 'repositoryArn': 'string', 'registryId': 'string', 'repositoryName': 'string', 'repositoryUri': 'string', 'createdAt': datetime(2015, 1, 1) }, ], 'nextToken': 'string' }
Response Structure
(dict) --
repositories (list) --
A list of repository objects corresponding to valid repositories.
(dict) --
An object representing a repository.
repositoryArn (string) --
The Amazon Resource Name (ARN) that identifies the repository. The ARN contains the arn:aws:ecr namespace, followed by the region of the repository, AWS account ID of the repository owner, repository namespace, and repository name. For example, arn:aws:ecr:region:012345678910:repository/test .
registryId (string) --
The AWS account ID associated with the public registry that contains the repository.
repositoryName (string) --
The name of the repository.
repositoryUri (string) --
The URI for the repository. You can use this URI for container image push and pull operations.
createdAt (datetime) --
The date and time, in JavaScript date format, when the repository was created.
nextToken (string) --
The nextToken value to include in a future DescribeRepositories request. When the results of a DescribeRepositories request exceed maxResults , this value can be used to retrieve the next page of results. This value is null when there are no more results to return.
Creates or updates the catalog data for a repository in a public registry.
See also: AWS API Documentation
Request Syntax
client.put_repository_catalog_data( registryId='string', repositoryName='string', catalogData={ 'description': 'string', 'architectures': [ 'string', ], 'operatingSystems': [ 'string', ], 'logoImageBlob': b'bytes', 'aboutText': 'string', 'usageText': 'string' } )
string
The AWS account ID associated with the public registry the repository is in. If you do not specify a registry, the default public registry is assumed.
string
[REQUIRED]
The name of the repository to create or update the catalog data for.
dict
[REQUIRED]
An object containing the catalog data for a repository. This data is publicly visible in the Amazon ECR Public Gallery.
description (string) --
A short description of the contents of the repository. This text appears in both the image details and also when searching for repositories on the Amazon ECR Public Gallery.
architectures (list) --
The system architecture that the images in the repository are compatible with. On the Amazon ECR Public Gallery, the following supported architectures will appear as badges on the repository and are used as search filters.
Linux
Windows
Note
If an unsupported tag is added to your repository catalog data, it will be associated with the repository and can be retrieved using the API but will not be discoverable in the Amazon ECR Public Gallery.
(string) --
operatingSystems (list) --
The operating systems that the images in the repository are compatible with. On the Amazon ECR Public Gallery, the following supported operating systems will appear as badges on the repository and are used as search filters.
ARM
ARM 64
x86
x86-64
Note
If an unsupported tag is added to your repository catalog data, it will be associated with the repository and can be retrieved using the API but will not be discoverable in the Amazon ECR Public Gallery.
(string) --
logoImageBlob (bytes) --
The base64-encoded repository logo payload.
Note
The repository logo is only publicly visible in the Amazon ECR Public Gallery for verified accounts.
aboutText (string) --
A detailed description of the contents of the repository. It is publicly visible in the Amazon ECR Public Gallery. The text must be in markdown format.
usageText (string) --
Detailed information on how to use the contents of the repository. It is publicly visible in the Amazon ECR Public Gallery. The usage text provides context, support information, and additional usage details for users of the repository. The text must be in markdown format.
dict
Response Syntax
{ 'catalogData': { 'description': 'string', 'architectures': [ 'string', ], 'operatingSystems': [ 'string', ], 'logoUrl': 'string', 'aboutText': 'string', 'usageText': 'string', 'marketplaceCertified': True|False } }
Response Structure
(dict) --
catalogData (dict) --
The catalog data for the repository.
description (string) --
The short description of the repository.
architectures (list) --
The architecture tags that are associated with the repository.
Note
Only supported operating system tags appear publicly in the Amazon ECR Public Gallery. For more information, see RepositoryCatalogDataInput .
(string) --
operatingSystems (list) --
The operating system tags that are associated with the repository.
Note
Only supported operating system tags appear publicly in the Amazon ECR Public Gallery. For more information, see RepositoryCatalogDataInput .
(string) --
logoUrl (string) --
The URL containing the logo associated with the repository.
aboutText (string) --
The longform description of the contents of the repository. This text appears in the repository details on the Amazon ECR Public Gallery.
usageText (string) --
The longform usage details of the contents of the repository. The usage text provides context for users of the repository.
marketplaceCertified (boolean) --
Whether or not the repository is certified by AWS Marketplace.
Retrieves an authorization token. An authorization token represents your IAM authentication credentials and can be used to access any Amazon ECR registry that your IAM principal has access to. The authorization token is valid for 12 hours. This API requires the ecr-public:GetAuthorizationToken and sts:GetServiceBearerToken permissions.
See also: AWS API Documentation
Request Syntax
client.get_authorization_token()
dict
Response Syntax
{ 'authorizationData': { 'authorizationToken': 'string', 'expiresAt': datetime(2015, 1, 1) } }
Response Structure
(dict) --
authorizationData (dict) --
An authorization token data object that corresponds to a public registry.
authorizationToken (string) --
A base64-encoded string that contains authorization data for a public Amazon ECR registry. When the string is decoded, it is presented in the format user:password for public registry authentication using docker login .
expiresAt (datetime) --
The Unix time in seconds and milliseconds when the authorization token expires. Authorization tokens are valid for 12 hours.
Deletes a list of specified images within a repository in a public registry. 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.
See also: AWS API Documentation
Request Syntax
client.batch_delete_image( registryId='string', repositoryName='string', imageIds=[ { 'imageDigest': 'string', 'imageTag': 'string' }, ] )
string
The AWS account ID associated with the registry that contains the image to delete. If you do not specify a registry, the default public registry is assumed.
string
[REQUIRED]
The repository in a public registry that contains the image to delete.
list
[REQUIRED]
A list of image ID references that correspond to images to delete. The format of the imageIds reference is imageTag=tag or imageDigest=digest .
(dict) --
An object with identifying information for an Amazon ECR image.
imageDigest (string) --
The sha256 digest of the image manifest.
imageTag (string) --
The tag used for the image.
dict
Response Syntax
{ 'imageIds': [ { 'imageDigest': 'string', 'imageTag': 'string' }, ], 'failures': [ { 'imageId': { 'imageDigest': 'string', 'imageTag': 'string' }, 'failureCode': 'InvalidImageDigest'|'InvalidImageTag'|'ImageTagDoesNotMatchDigest'|'ImageNotFound'|'MissingDigestAndTag'|'ImageReferencedByManifestList'|'KmsError', 'failureReason': 'string' }, ] }
Response Structure
(dict) --
imageIds (list) --
The image IDs of the deleted images.
(dict) --
An object with identifying information for an Amazon ECR image.
imageDigest (string) --
The sha256 digest of the image manifest.
imageTag (string) --
The tag used for the image.
failures (list) --
Any failures associated with the call.
(dict) --
An object representing an Amazon ECR image failure.
imageId (dict) --
The image ID associated with the failure.
imageDigest (string) --
The sha256 digest of the image manifest.
imageTag (string) --
The tag used for the image.
failureCode (string) --
The code associated with the failure.
failureReason (string) --
The reason for the failure.
Create or updates the catalog data for a public registry.
See also: AWS API Documentation
Request Syntax
client.put_registry_catalog_data( displayName='string' )
string
The display name for a public registry. The display name is shown as the repository author in the Amazon ECR Public Gallery.
Note
The registry display name is only publicly visible in the Amazon ECR Public Gallery for verified accounts.
dict
Response Syntax
{ 'registryCatalogData': { 'displayName': 'string' } }
Response Structure
(dict) --
registryCatalogData (dict) --
The catalog data for the public registry.
displayName (string) --
The display name for a public registry. This appears on the Amazon ECR Public Gallery.
Warning
Only accounts that have the verified account badge can have a registry display name.
Deletes a repository in a public registry. If the repository contains images, you must either delete all images in the repository or use the force option which deletes all images on your behalf before deleting the repository.
See also: AWS API Documentation
Request Syntax
client.delete_repository( registryId='string', repositoryName='string', force=True|False )
string
The AWS account ID associated with the public registry that contains the repository to delete. If you do not specify a registry, the default public registry is assumed.
string
[REQUIRED]
The name of the repository to delete.
boolean
If a repository contains images, forces the deletion.
dict
Response Syntax
{ 'repository': { 'repositoryArn': 'string', 'registryId': 'string', 'repositoryName': 'string', 'repositoryUri': 'string', 'createdAt': datetime(2015, 1, 1) } }
Response Structure
(dict) --
repository (dict) --
The repository that was deleted.
repositoryArn (string) --
The Amazon Resource Name (ARN) that identifies the repository. The ARN contains the arn:aws:ecr namespace, followed by the region of the repository, AWS account ID of the repository owner, repository namespace, and repository name. For example, arn:aws:ecr:region:012345678910:repository/test .
registryId (string) --
The AWS account ID associated with the public registry that contains the repository.
repositoryName (string) --
The name of the repository.
repositoryUri (string) --
The URI for the repository. You can use this URI for container image push and pull operations.
createdAt (datetime) --
The date and time, in JavaScript date format, when the repository was created.
Retrieve catalog metadata for a repository in a public registry. This metadata is displayed publicly in the Amazon ECR Public Gallery.
See also: AWS API Documentation
Request Syntax
client.get_repository_catalog_data( registryId='string', repositoryName='string' )
string
The AWS account ID associated with the registry that contains the repositories to be described. If you do not specify a registry, the default public registry is assumed.
string
[REQUIRED]
The name of the repository to retrieve the catalog metadata for.
dict
Response Syntax
{ 'catalogData': { 'description': 'string', 'architectures': [ 'string', ], 'operatingSystems': [ 'string', ], 'logoUrl': 'string', 'aboutText': 'string', 'usageText': 'string', 'marketplaceCertified': True|False } }
Response Structure
(dict) --
catalogData (dict) --
The catalog metadata for the repository.
description (string) --
The short description of the repository.
architectures (list) --
The architecture tags that are associated with the repository.
Note
Only supported operating system tags appear publicly in the Amazon ECR Public Gallery. For more information, see RepositoryCatalogDataInput .
(string) --
operatingSystems (list) --
The operating system tags that are associated with the repository.
Note
Only supported operating system tags appear publicly in the Amazon ECR Public Gallery. For more information, see RepositoryCatalogDataInput .
(string) --
logoUrl (string) --
The URL containing the logo associated with the repository.
aboutText (string) --
The longform description of the contents of the repository. This text appears in the repository details on the Amazon ECR Public Gallery.
usageText (string) --
The longform usage details of the contents of the repository. The usage text provides context for users of the repository.
marketplaceCertified (boolean) --
Whether or not the repository is certified by AWS Marketplace.
Creates or updates the image manifest and tags associated with an image.
When an image is pushed and all new image layers have been uploaded, the PutImage API is called once to create or update the image manifest and the tags associated with the image.
Note
This 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.
See also: AWS API Documentation
Request Syntax
client.put_image( registryId='string', repositoryName='string', imageManifest='string', imageManifestMediaType='string', imageTag='string', imageDigest='string' )
string
The AWS account ID associated with the public registry that contains the repository in which to put the image. If you do not specify a registry, the default public registry is assumed.
string
[REQUIRED]
The name of the repository in which to put the image.
string
[REQUIRED]
The image manifest corresponding to the image to be uploaded.
string
The media type of the image manifest. If you push an image manifest that does not contain the mediaType field, you must specify the imageManifestMediaType in the request.
string
The tag to associate with the image. This parameter is required for images that use the Docker Image Manifest V2 Schema 2 or Open Container Initiative (OCI) formats.
string
The image digest of the image manifest corresponding to the image.
dict
Response Syntax
{ 'image': { 'registryId': 'string', 'repositoryName': 'string', 'imageId': { 'imageDigest': 'string', 'imageTag': 'string' }, 'imageManifest': 'string', 'imageManifestMediaType': 'string' } }
Response Structure
(dict) --
image (dict) --
Details of the image uploaded.
registryId (string) --
The AWS account ID associated with the registry containing the image.
repositoryName (string) --
The name of the repository associated with the image.
imageId (dict) --
An object containing the image tag and image digest associated with an image.
imageDigest (string) --
The sha256 digest of the image manifest.
imageTag (string) --
The tag used for the image.
imageManifest (string) --
The image manifest associated with the image.
imageManifestMediaType (string) --
The manifest media type of the image.
Creates a repository in a public registry. For more information, see Amazon ECR repositories in the Amazon Elastic Container Registry User Guide .
See also: AWS API Documentation
Request Syntax
client.create_repository( repositoryName='string', catalogData={ 'description': 'string', 'architectures': [ 'string', ], 'operatingSystems': [ 'string', ], 'logoImageBlob': b'bytes', 'aboutText': 'string', 'usageText': 'string' } )
string
[REQUIRED]
The name to use for the repository. This appears publicly in the Amazon ECR Public Gallery. 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 ).
dict
The details about the repository that are publicly visible in the Amazon ECR Public Gallery.
description (string) --
A short description of the contents of the repository. This text appears in both the image details and also when searching for repositories on the Amazon ECR Public Gallery.
architectures (list) --
The system architecture that the images in the repository are compatible with. On the Amazon ECR Public Gallery, the following supported architectures will appear as badges on the repository and are used as search filters.
Linux
Windows
Note
If an unsupported tag is added to your repository catalog data, it will be associated with the repository and can be retrieved using the API but will not be discoverable in the Amazon ECR Public Gallery.
(string) --
operatingSystems (list) --
The operating systems that the images in the repository are compatible with. On the Amazon ECR Public Gallery, the following supported operating systems will appear as badges on the repository and are used as search filters.
ARM
ARM 64
x86
x86-64
Note
If an unsupported tag is added to your repository catalog data, it will be associated with the repository and can be retrieved using the API but will not be discoverable in the Amazon ECR Public Gallery.
(string) --
logoImageBlob (bytes) --
The base64-encoded repository logo payload.
Note
The repository logo is only publicly visible in the Amazon ECR Public Gallery for verified accounts.
aboutText (string) --
A detailed description of the contents of the repository. It is publicly visible in the Amazon ECR Public Gallery. The text must be in markdown format.
usageText (string) --
Detailed information on how to use the contents of the repository. It is publicly visible in the Amazon ECR Public Gallery. The usage text provides context, support information, and additional usage details for users of the repository. The text must be in markdown format.
dict
Response Syntax
{ 'repository': { 'repositoryArn': 'string', 'registryId': 'string', 'repositoryName': 'string', 'repositoryUri': 'string', 'createdAt': datetime(2015, 1, 1) }, 'catalogData': { 'description': 'string', 'architectures': [ 'string', ], 'operatingSystems': [ 'string', ], 'logoUrl': 'string', 'aboutText': 'string', 'usageText': 'string', 'marketplaceCertified': True|False } }
Response Structure
(dict) --
repository (dict) --
The repository that was created.
repositoryArn (string) --
The Amazon Resource Name (ARN) that identifies the repository. The ARN contains the arn:aws:ecr namespace, followed by the region of the repository, AWS account ID of the repository owner, repository namespace, and repository name. For example, arn:aws:ecr:region:012345678910:repository/test .
registryId (string) --
The AWS account ID associated with the public registry that contains the repository.
repositoryName (string) --
The name of the repository.
repositoryUri (string) --
The URI for the repository. You can use this URI for container image push and pull operations.
createdAt (datetime) --
The date and time, in JavaScript date format, when the repository was created.
catalogData (dict) --
The catalog data for a repository. This data is publicly visible in the Amazon ECR Public Gallery.
description (string) --
The short description of the repository.
architectures (list) --
The architecture tags that are associated with the repository.
Note
Only supported operating system tags appear publicly in the Amazon ECR Public Gallery. For more information, see RepositoryCatalogDataInput .
(string) --
operatingSystems (list) --
The operating system tags that are associated with the repository.
Note
Only supported operating system tags appear publicly in the Amazon ECR Public Gallery. For more information, see RepositoryCatalogDataInput .
(string) --
logoUrl (string) --
The URL containing the logo associated with the repository.
aboutText (string) --
The longform description of the contents of the repository. This text appears in the repository details on the Amazon ECR Public Gallery.
usageText (string) --
The longform usage details of the contents of the repository. The usage text provides context for users of the repository.
marketplaceCertified (boolean) --
Whether or not the repository is certified by AWS Marketplace.
Returns metadata about the images in a repository in a public registry.
Note
Beginning with Docker version 1.9, the Docker client compresses image layers before pushing them to a V2 Docker registry. The output of the docker images command shows the uncompressed image size, so it may return a larger image size than the image sizes returned by DescribeImages .
See also: AWS API Documentation
Request Syntax
client.describe_images( registryId='string', repositoryName='string', imageIds=[ { 'imageDigest': 'string', 'imageTag': 'string' }, ], nextToken='string', maxResults=123 )
string
The AWS account ID associated with the public registry that contains the repository in which to describe images. If you do not specify a registry, the default public registry is assumed.
string
[REQUIRED]
The repository that contains the images to describe.
list
The list of image IDs for the requested repository.
(dict) --
An object with identifying information for an Amazon ECR image.
imageDigest (string) --
The sha256 digest of the image manifest.
imageTag (string) --
The tag used for the image.
string
The nextToken value returned from a previous paginated DescribeImages request where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value. This value is null when there are no more results to return. This option cannot be used when you specify images with imageIds .
integer
The maximum number of repository results returned by DescribeImages in paginated output. When this parameter is used, DescribeImages only returns maxResults results in a single page along with a nextToken response element. The remaining results of the initial request can be seen by sending another DescribeImages request with the returned nextToken value. This value can be between 1 and 1000. If this parameter is not used, then DescribeImages returns up to 100 results and a nextToken value, if applicable. This option cannot be used when you specify images with imageIds .
dict
Response Syntax
{ 'imageDetails': [ { 'registryId': 'string', 'repositoryName': 'string', 'imageDigest': 'string', 'imageTags': [ 'string', ], 'imageSizeInBytes': 123, 'imagePushedAt': datetime(2015, 1, 1), 'imageManifestMediaType': 'string', 'artifactMediaType': 'string' }, ], 'nextToken': 'string' }
Response Structure
(dict) --
imageDetails (list) --
A list of ImageDetail objects that contain data about the image.
(dict) --
An object that describes an image returned by a DescribeImages operation.
registryId (string) --
The AWS account ID associated with the public registry to which this image belongs.
repositoryName (string) --
The name of the repository to which this image belongs.
imageDigest (string) --
The sha256 digest of the image manifest.
imageTags (list) --
The list of tags associated with this image.
(string) --
imageSizeInBytes (integer) --
The size, in bytes, of the image in the repository.
If the image is a manifest list, this will be the max size of all manifests in the list.
Note
Beginning with Docker version 1.9, the Docker client compresses image layers before pushing them to a V2 Docker registry. The output of the docker images command shows the uncompressed image size, so it may return a larger image size than the image sizes returned by DescribeImages .
imagePushedAt (datetime) --
The date and time, expressed in standard JavaScript date format, at which the current image was pushed to the repository.
imageManifestMediaType (string) --
The media type of the image manifest.
artifactMediaType (string) --
The artifact media type of the image.
nextToken (string) --
The nextToken value to include in a future DescribeImages request. When the results of a DescribeImages request exceed maxResults , this value can be used to retrieve the next page of results. This value is null when there are no more results to return.
Informs Amazon ECR that the image layer upload has completed for a specified public 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.
Note
This 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.
See also: AWS API Documentation
Request Syntax
client.complete_layer_upload( registryId='string', repositoryName='string', uploadId='string', layerDigests=[ 'string', ] )
string
The AWS account ID associated with the registry to which to upload layers. If you do not specify a registry, the default public registry is assumed.
string
[REQUIRED]
The name of the repository in a public registry to associate with the image layer.
string
[REQUIRED]
The upload ID from a previous InitiateLayerUpload operation to associate with the image layer.
list
[REQUIRED]
The sha256 digest of the image layer.
(string) --
dict
Response Syntax
{ 'registryId': 'string', 'repositoryName': 'string', 'uploadId': 'string', 'layerDigest': 'string' }
Response Structure
(dict) --
registryId (string) --
The public registry ID associated with the request.
repositoryName (string) --
The repository name associated with the request.
uploadId (string) --
The upload ID associated with the layer.
layerDigest (string) --
The sha256 digest of the image layer.
Applies a repository policy to the specified public repository to control access permissions. For more information, see Amazon ECR Repository Policies in the Amazon Elastic Container Registry User Guide .
See also: AWS API Documentation
Request Syntax
client.set_repository_policy( registryId='string', repositoryName='string', policyText='string', force=True|False )
string
The AWS account ID associated with the registry that contains the repository. If you do not specify a registry, the default public registry is assumed.
string
[REQUIRED]
The name of the repository to receive the policy.
string
[REQUIRED]
The JSON repository policy text to apply to the repository. For more information, see Amazon ECR Repository Policies in the Amazon Elastic Container Registry User Guide .
boolean
If the policy you are attempting to set on a repository policy would prevent you from setting another policy in the future, you must force the SetRepositoryPolicy operation. This is intended to prevent accidental repository lock outs.
dict
Response Syntax
{ 'registryId': 'string', 'repositoryName': 'string', 'policyText': 'string' }
Response Structure
(dict) --
registryId (string) --
The registry ID associated with the request.
repositoryName (string) --
The repository name associated with the request.
policyText (string) --
The JSON repository policy text applied to the repository.
Deletes the repository policy associated with the specified repository.
See also: AWS API Documentation
Request Syntax
client.delete_repository_policy( registryId='string', repositoryName='string' )
string
The AWS account ID associated with the public registry that contains the repository policy to delete. If you do not specify a registry, the default public registry is assumed.
string
[REQUIRED]
The name of the repository that is associated with the repository policy to delete.
dict
Response Syntax
{ 'registryId': 'string', 'repositoryName': 'string', 'policyText': 'string' }
Response Structure
(dict) --
registryId (string) --
The registry ID associated with the request.
repositoryName (string) --
The repository name associated with the request.
policyText (string) --
The JSON repository policy that was deleted from the repository.
Returns the image tag details for a repository in a public registry.
See also: AWS API Documentation
Request Syntax
client.describe_image_tags( registryId='string', repositoryName='string', nextToken='string', maxResults=123 )
string
The AWS account ID associated with the public registry that contains the repository in which to describe images. If you do not specify a registry, the default public registry is assumed.
string
[REQUIRED]
The name of the repository that contains the image tag details to describe.
string
The nextToken value returned from a previous paginated DescribeImageTags request where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value. This value is null when there are no more results to return. This option cannot be used when you specify images with imageIds .
integer
The maximum number of repository results returned by DescribeImageTags in paginated output. When this parameter is used, DescribeImageTags only returns maxResults results in a single page along with a nextToken response element. The remaining results of the initial request can be seen by sending another DescribeImageTags request with the returned nextToken value. This value can be between 1 and 1000. If this parameter is not used, then DescribeImageTags returns up to 100 results and a nextToken value, if applicable. This option cannot be used when you specify images with imageIds .
dict
Response Syntax
{ 'imageTagDetails': [ { 'imageTag': 'string', 'createdAt': datetime(2015, 1, 1), 'imageDetail': { 'imageDigest': 'string', 'imageSizeInBytes': 123, 'imagePushedAt': datetime(2015, 1, 1), 'imageManifestMediaType': 'string', 'artifactMediaType': 'string' } }, ], 'nextToken': 'string' }
Response Structure
(dict) --
imageTagDetails (list) --
The image tag details for the images in the requested repository.
(dict) --
An object representing the image tag details for an image.
imageTag (string) --
The tag associated with the image.
createdAt (datetime) --
The time stamp indicating when the image tag was created.
imageDetail (dict) --
An object that describes the details of an image.
imageDigest (string) --
The sha256 digest of the image manifest.
imageSizeInBytes (integer) --
The size, in bytes, of the image in the repository.
If the image is a manifest list, this will be the max size of all manifests in the list.
Note
Beginning with Docker version 1.9, the Docker client compresses image layers before pushing them to a V2 Docker registry. The output of the docker images command shows the uncompressed image size, so it may return a larger image size than the image sizes returned by DescribeImages .
imagePushedAt (datetime) --
The date and time, expressed in standard JavaScript date format, at which the current image tag was pushed to the repository.
imageManifestMediaType (string) --
The media type of the image manifest.
artifactMediaType (string) --
The artifact media type of the image.
nextToken (string) --
The nextToken value to include in a future DescribeImageTags request. When the results of a DescribeImageTags request exceed maxResults , this value can be used to retrieve the next page of results. This value is null when there are no more results to return.
Checks the availability of one or more image layers within a repository in a public registry. 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.
Note
This 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.
See also: AWS API Documentation
Request Syntax
client.batch_check_layer_availability( registryId='string', repositoryName='string', layerDigests=[ 'string', ] )
string
The AWS account ID associated with the public registry that contains the image layers to check. If you do not specify a registry, the default public registry is assumed.
string
[REQUIRED]
The name of the repository that is associated with the image layers to check.
list
[REQUIRED]
The digests of the image layers to check.
(string) --
dict
Response Syntax
{ 'layers': [ { 'layerDigest': 'string', 'layerAvailability': 'AVAILABLE'|'UNAVAILABLE', 'layerSize': 123, 'mediaType': 'string' }, ], 'failures': [ { 'layerDigest': 'string', 'failureCode': 'InvalidLayerDigest'|'MissingLayerDigest', 'failureReason': 'string' }, ] }
Response Structure
(dict) --
layers (list) --
A list of image layer objects corresponding to the image layer references in the request.
(dict) --
An object representing an Amazon ECR image layer.
layerDigest (string) --
The sha256 digest of the image layer.
layerAvailability (string) --
The availability status of the image layer.
layerSize (integer) --
The size, in bytes, of the image layer.
mediaType (string) --
The media type of the layer, such as application/vnd.docker.image.rootfs.diff.tar.gzip or application/vnd.oci.image.layer.v1.tar+gzip .
failures (list) --
Any failures associated with the call.
(dict) --
An object representing an Amazon ECR image layer failure.
layerDigest (string) --
The layer digest associated with the failure.
failureCode (string) --
The failure code associated with the failure.
failureReason (string) --
The reason for the failure.
Uploads an image layer part to Amazon ECR.
When an image is pushed, each new image layer is uploaded in parts. The maximum size of each image layer part can be 20971520 bytes (or about 20MB). The UploadLayerPart API is called once per each new image layer part.
Note
This 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.
See also: AWS API Documentation
Request Syntax
client.upload_layer_part( registryId='string', repositoryName='string', uploadId='string', partFirstByte=123, partLastByte=123, layerPartBlob=b'bytes' )
string
The AWS account ID associated with the registry to which you are uploading layer parts. If you do not specify a registry, the default public registry is assumed.
string
[REQUIRED]
The name of the repository to which you are uploading layer parts.
string
[REQUIRED]
The upload ID from a previous InitiateLayerUpload operation to associate with the layer part upload.
integer
[REQUIRED]
The position of the first byte of the layer part witin the overall image layer.
integer
[REQUIRED]
The position of the last byte of the layer part within the overall image layer.
bytes
[REQUIRED]
The base64-encoded layer part payload.
dict
Response Syntax
{ 'registryId': 'string', 'repositoryName': 'string', 'uploadId': 'string', 'lastByteReceived': 123 }
Response Structure
(dict) --
registryId (string) --
The registry ID associated with the request.
repositoryName (string) --
The repository name associated with the request.
uploadId (string) --
The upload ID associated with the request.
lastByteReceived (integer) --
The integer value of the last byte received in the request.
Returns details for a public registry.
See also: AWS API Documentation
Request Syntax
client.describe_registries( nextToken='string', maxResults=123 )
string
The nextToken value returned from a previous paginated DescribeRegistries request where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value. This value is null when there are no more results to return.
Note
This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.
integer
The maximum number of repository results returned by DescribeRegistries in paginated output. When this parameter is used, DescribeRegistries only returns maxResults results in a single page along with a nextToken response element. The remaining results of the initial request can be seen by sending another DescribeRegistries request with the returned nextToken value. This value can be between 1 and 1000. If this parameter is not used, then DescribeRegistries returns up to 100 results and a nextToken value, if applicable.
dict
Response Syntax
{ 'registries': [ { 'registryId': 'string', 'registryArn': 'string', 'registryUri': 'string', 'verified': True|False, 'aliases': [ { 'name': 'string', 'status': 'ACTIVE'|'PENDING'|'REJECTED', 'primaryRegistryAlias': True|False, 'defaultRegistryAlias': True|False }, ] }, ], 'nextToken': 'string' }
Response Structure
(dict) --
registries (list) --
An object containing the details for a public registry.
(dict) --
The details of a public registry.
registryId (string) --
The AWS account ID associated with the registry. If you do not specify a registry, the default public registry is assumed.
registryArn (string) --
The Amazon Resource Name (ARN) of the public registry.
registryUri (string) --
The URI of a public registry. The URI contains a universal prefix and the registry alias.
verified (boolean) --
Whether the account is verified. This indicates whether the account is an AWS Marketplace vendor. If an account is verified, each public repository will received a verified account badge on the Amazon ECR Public Gallery.
aliases (list) --
An array of objects representing the aliases for a public registry.
(dict) --
An object representing the aliases for a public registry. A public registry is given an alias upon creation but a custom alias can be set using the Amazon ECR console. For more information, see Registries in the Amazon Elastic Container Registry User Guide .
name (string) --
The name of the registry alias.
status (string) --
The status of the registry alias.
primaryRegistryAlias (boolean) --
Whether or not the registry alias is the primary alias for the registry. If true, the alias is the primary registry alias and is displayed in both the repository URL and the image URI used in the docker pull commands on the Amazon ECR Public Gallery.
Note
A registry alias that is not the primary registry alias can be used in the repository URI in a docker pull command.
defaultRegistryAlias (boolean) --
Whether or not the registry alias is the default alias for the registry. When the first public repository is created, your public registry is assigned a default registry alias.
nextToken (string) --
The nextToken value to include in a future DescribeRepositories request. When the results of a DescribeRepositories request exceed maxResults , this value can be used to retrieve the next page of results. This value is null when there are no more results to return.