Table of Contents
ECRPublic.
Client
¶A low-level client representing Amazon Elastic Container Registry Public (ECR Public)
Amazon Elastic Container Registry Public (Amazon ECR Public) is a managed container image registry service. Amazon ECR provides both public and private registries to host your container images. You can use the Docker CLI or your 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 public repositories with this API. For information about the Amazon ECR API for private repositories, see Amazon Elastic Container Registry API Reference.
import boto3
client = boto3.client('ecr-public')
These are the available methods:
batch_check_layer_availability()
batch_delete_image()
can_paginate()
close()
complete_layer_upload()
create_repository()
delete_repository()
delete_repository_policy()
describe_image_tags()
describe_images()
describe_registries()
describe_repositories()
get_authorization_token()
get_paginator()
get_registry_catalog_data()
get_repository_catalog_data()
get_repository_policy()
get_waiter()
initiate_layer_upload()
list_tags_for_resource()
put_image()
put_registry_catalog_data()
put_repository_catalog_data()
set_repository_policy()
tag_resource()
untag_resource()
upload_layer_part()
batch_check_layer_availability
(**kwargs)¶Checks the availability of one or more image layers that are 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
response = client.batch_check_layer_availability(
registryId='string',
repositoryName='string',
layerDigests=[
'string',
]
)
[REQUIRED]
The name of the repository that's associated with the image layers to check.
[REQUIRED]
The digests of the image layers to check.
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 that correspond to the image layer references in the request.
(dict) --
An object that represents 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 that represents an Amazon ECR image layer failure.
layerDigest (string) --
The layer digest that's associated with the failure.
failureCode (string) --
The failure code that's associated with the failure.
failureReason (string) --
The reason for the failure.
Exceptions
ECRPublic.Client.exceptions.RepositoryNotFoundException
ECRPublic.Client.exceptions.InvalidParameterException
ECRPublic.Client.exceptions.ServerException
ECRPublic.Client.exceptions.RegistryNotFoundException
ECRPublic.Client.exceptions.UnsupportedCommandException
batch_delete_image
(**kwargs)¶Deletes a list of specified images that are 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 digest of the image in your request.
See also: AWS API Documentation
Request Syntax
response = client.batch_delete_image(
registryId='string',
repositoryName='string',
imageIds=[
{
'imageDigest': 'string',
'imageTag': 'string'
},
]
)
[REQUIRED]
The repository in a public registry that contains the image to delete.
[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
.
An object with identifying information for an Amazon ECR image.
The sha256
digest of the image manifest.
The tag that's 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 that's used for the image.
failures (list) --
Any failures associated with the call.
(dict) --
An object that represents an Amazon ECR image failure.
imageId (dict) --
The image ID that's associated with the failure.
imageDigest (string) --
The sha256
digest of the image manifest.
imageTag (string) --
The tag that's used for the image.
failureCode (string) --
The code that's associated with the failure.
failureReason (string) --
The reason for the failure.
Exceptions
ECRPublic.Client.exceptions.ServerException
ECRPublic.Client.exceptions.InvalidParameterException
ECRPublic.Client.exceptions.RepositoryNotFoundException
ECRPublic.Client.exceptions.UnsupportedCommandException
can_paginate
(operation_name)¶Check if an operation can be paginated.
create_foo
, and you'd normally invoke the
operation as client.create_foo(**kwargs)
, if the
create_foo
operation can be paginated, you can use the
call client.get_paginator("create_foo")
.True
if the operation can be paginated,
False
otherwise.close
()¶Closes underlying endpoint connections.
complete_layer_upload
(**kwargs)¶Informs Amazon ECR that the image layer upload is complete 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 for each new image layer to verify that the upload is complete.
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
response = client.complete_layer_upload(
registryId='string',
repositoryName='string',
uploadId='string',
layerDigests=[
'string',
]
)
[REQUIRED]
The name of the repository in a public registry to associate with the image layer.
[REQUIRED]
The upload ID from a previous InitiateLayerUpload operation to associate with the image layer.
[REQUIRED]
The sha256
digest of the image layer.
dict
Response Syntax
{
'registryId': 'string',
'repositoryName': 'string',
'uploadId': 'string',
'layerDigest': 'string'
}
Response Structure
(dict) --
registryId (string) --
The public registry ID that's associated with the request.
repositoryName (string) --
The repository name that's associated with the request.
uploadId (string) --
The upload ID that's associated with the layer.
layerDigest (string) --
The sha256
digest of the image layer.
Exceptions
ECRPublic.Client.exceptions.ServerException
ECRPublic.Client.exceptions.InvalidParameterException
ECRPublic.Client.exceptions.RepositoryNotFoundException
ECRPublic.Client.exceptions.UploadNotFoundException
ECRPublic.Client.exceptions.InvalidLayerException
ECRPublic.Client.exceptions.LayerPartTooSmallException
ECRPublic.Client.exceptions.LayerAlreadyExistsException
ECRPublic.Client.exceptions.EmptyUploadException
ECRPublic.Client.exceptions.RegistryNotFoundException
ECRPublic.Client.exceptions.UnsupportedCommandException
create_repository
(**kwargs)¶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
response = client.create_repository(
repositoryName='string',
catalogData={
'description': 'string',
'architectures': [
'string',
],
'operatingSystems': [
'string',
],
'logoImageBlob': b'bytes',
'aboutText': 'string',
'usageText': 'string'
},
tags=[
{
'Key': 'string',
'Value': 'string'
},
]
)
[REQUIRED]
The name to use for the repository. This appears publicly in the Amazon ECR Public Gallery. The repository name can be specified on its own (for example nginx-web-app
) or prepended with a namespace to group the repository into a category (for example project-a/nginx-web-app
).
The details about the repository that are publicly visible in the Amazon ECR Public Gallery.
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.
The system architecture that the images in the repository are compatible with. On the Amazon ECR Public Gallery, the following supported architectures appear as badges on the repository and are used as search filters.
Note
If an unsupported tag is added to your repository catalog data, it's associated with the repository and can be retrieved using the API but isn't discoverable in the Amazon ECR Public Gallery.
ARM
ARM 64
x86
x86-64
The operating systems that the images in the repository are compatible with. On the Amazon ECR Public Gallery, the following supported operating systems appear as badges on the repository and are used as search filters.
Note
If an unsupported tag is added to your repository catalog data, it's associated with the repository and can be retrieved using the API but isn't discoverable in the Amazon ECR Public Gallery.
Linux
Windows
The base64-encoded repository logo payload.
Note
The repository logo is only publicly visible in the Amazon ECR Public Gallery for verified accounts.
A detailed description of the contents of the repository. It's publicly visible in the Amazon ECR Public Gallery. The text must be in markdown format.
Detailed information about how to use the contents of the repository. It's 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.
The metadata that you apply to each repository to help categorize and organize your repositories. Each tag consists of a key and an optional value. You define both of them. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.
The metadata that you apply to a resource to help you categorize and organize them. Each tag consists of a key and an optional value. You define both. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.
One part of a key-value pair that make up a tag. A key
is a general label that acts like a category for more specific tag values.
The optional part of a key-value pair that make up a tag. A value
acts as a descriptor within a tag category (key).
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, Amazon Web Services account ID of the repository owner, repository namespace, and repository name. For example, arn:aws:ecr:region:012345678910:repository/test
.
registryId (string) --
The Amazon Web Services account ID that's 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.
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.
logoUrl (string) --
The URL that contains the logo that's 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) --
Indicates whether the repository is certified by Amazon Web Services Marketplace.
Exceptions
ECRPublic.Client.exceptions.ServerException
ECRPublic.Client.exceptions.InvalidParameterException
ECRPublic.Client.exceptions.InvalidTagParameterException
ECRPublic.Client.exceptions.TooManyTagsException
ECRPublic.Client.exceptions.RepositoryAlreadyExistsException
ECRPublic.Client.exceptions.LimitExceededException
ECRPublic.Client.exceptions.UnsupportedCommandException
delete_repository
(**kwargs)¶Deletes a repository in a public registry. If the repository contains images, you must either manually delete all images in the repository or use the force
option. This option deletes all images on your behalf before deleting the repository.
See also: AWS API Documentation
Request Syntax
response = client.delete_repository(
registryId='string',
repositoryName='string',
force=True|False
)
[REQUIRED]
The name of the repository to delete.
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, Amazon Web Services account ID of the repository owner, repository namespace, and repository name. For example, arn:aws:ecr:region:012345678910:repository/test
.
registryId (string) --
The Amazon Web Services account ID that's 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.
Exceptions
ECRPublic.Client.exceptions.ServerException
ECRPublic.Client.exceptions.InvalidParameterException
ECRPublic.Client.exceptions.RepositoryNotFoundException
ECRPublic.Client.exceptions.RepositoryNotEmptyException
ECRPublic.Client.exceptions.UnsupportedCommandException
delete_repository_policy
(**kwargs)¶Deletes the repository policy that's associated with the specified repository.
See also: AWS API Documentation
Request Syntax
response = client.delete_repository_policy(
registryId='string',
repositoryName='string'
)
[REQUIRED]
The name of the repository that's associated with the repository policy to delete.
dict
Response Syntax
{
'registryId': 'string',
'repositoryName': 'string',
'policyText': 'string'
}
Response Structure
(dict) --
registryId (string) --
The registry ID that's associated with the request.
repositoryName (string) --
The repository name that's associated with the request.
policyText (string) --
The JSON repository policy that was deleted from the repository.
Exceptions
ECRPublic.Client.exceptions.ServerException
ECRPublic.Client.exceptions.InvalidParameterException
ECRPublic.Client.exceptions.RepositoryNotFoundException
ECRPublic.Client.exceptions.RepositoryPolicyNotFoundException
ECRPublic.Client.exceptions.UnsupportedCommandException
Returns the image tag details for a repository in a public registry.
See also: AWS API Documentation
Request Syntax
response = client.describe_image_tags(
registryId='string',
repositoryName='string',
nextToken='string',
maxResults=123
)
[REQUIRED]
The name of the repository that contains the image tag details to describe.
nextToken
value that's 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. If there are no more results to return, this value is null
. If you specify images with imageIds
, you can't use this option.DescribeImageTags
in paginated output. When this parameter is used, DescribeImageTags
only returns maxResults
results in a single page along with a nextToken
response element. You can see the remaining results of the initial request by sending another DescribeImageTags
request with the returned nextToken
value. This value can be between 1 and 1000. If this parameter isn't used, then DescribeImageTags
returns up to 100 results and a nextToken
value, if applicable. If you specify images with imageIds
, you can't use this option.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 that represents the image tag details for an image.
imageTag (string) --
The tag that's associated with the image.
createdAt (datetime) --
The time stamp that indicates 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 is 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 might return a larger image size than the image sizes that are returned by DescribeImages.
imagePushedAt (datetime) --
The date and time, expressed in standard JavaScript date format, which the current image tag was pushed to the repository at.
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
, you can use this value to retrieve the next page of results. If there are no more results to return, this value is null
.
Exceptions
ECRPublic.Client.exceptions.ServerException
ECRPublic.Client.exceptions.InvalidParameterException
ECRPublic.Client.exceptions.RepositoryNotFoundException
ECRPublic.Client.exceptions.UnsupportedCommandException
describe_images
(**kwargs)¶Returns metadata that's related to 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. Therefore, it might return a larger image size than the image sizes that are returned by DescribeImages.
See also: AWS API Documentation
Request Syntax
response = client.describe_images(
registryId='string',
repositoryName='string',
imageIds=[
{
'imageDigest': 'string',
'imageTag': 'string'
},
],
nextToken='string',
maxResults=123
)
[REQUIRED]
The repository that contains the images to describe.
The list of image IDs for the requested repository.
An object with identifying information for an Amazon ECR image.
The sha256
digest of the image manifest.
The tag that's used for the image.
nextToken
value that's 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. If there are no more results to return, this value is null
. If you specify images with imageIds
, you can't use this option.DescribeImages
in paginated output. When this parameter is used, DescribeImages
only returns maxResults
results in a single page along with a nextToken
response element. You can see the remaining results of the initial request by sending another DescribeImages
request with the returned nextToken
value. This value can be between 1 and 1000. If this parameter isn't used, then DescribeImages
returns up to 100 results and a nextToken
value, if applicable. If you specify images with imageIds
, you can't use this option.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 that's returned by a DescribeImages operation.
registryId (string) --
The Amazon Web Services account ID that's associated with the public registry where this image belongs.
repositoryName (string) --
The name of the repository where this image belongs.
imageDigest (string) --
The sha256
digest of the image manifest.
imageTags (list) --
The list of tags that's associated with this image.
imageSizeInBytes (integer) --
The size, in bytes, of the image in the repository.
If the image is a manifest list, this is 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 might return a larger image size than the image sizes that are returned by DescribeImages.
imagePushedAt (datetime) --
The date and time, expressed in standard JavaScript date format, that the current image was pushed to the repository at.
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
, you can use this value to retrieve the next page of results. If there are no more results to return, this value is null
.
Exceptions
ECRPublic.Client.exceptions.ServerException
ECRPublic.Client.exceptions.InvalidParameterException
ECRPublic.Client.exceptions.RepositoryNotFoundException
ECRPublic.Client.exceptions.ImageNotFoundException
ECRPublic.Client.exceptions.UnsupportedCommandException
describe_registries
(**kwargs)¶Returns details for a public registry.
See also: AWS API Documentation
Request Syntax
response = client.describe_registries(
nextToken='string',
maxResults=123
)
The nextToken
value that's 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. If there are no more results to return, this value is null
.
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.
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 isn't 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 that contains the details for a public registry.
(dict) --
The details of a public registry.
registryId (string) --
The Amazon Web Services account ID that's 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) --
Indicates whether the account is a verified Amazon Web Services Marketplace vendor. If an account is verified, each public repository receives a verified account badge on the Amazon ECR Public Gallery.
aliases (list) --
An array of objects that represents the aliases for a public registry.
(dict) --
An object representing the aliases for a public registry. A public registry is given an alias when it's created. However, 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) --
Indicates whether 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 isn't the primary registry alias can be used in the repository URI in a docker pull
command.
defaultRegistryAlias (boolean) --
Indicates whether 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. If the results of a DescribeRepositories
request exceed maxResults
, you can use this value to retrieve the next page of results. If there are no more results, this value is null
.
Exceptions
ECRPublic.Client.exceptions.InvalidParameterException
ECRPublic.Client.exceptions.UnsupportedCommandException
ECRPublic.Client.exceptions.ServerException
describe_repositories
(**kwargs)¶Describes repositories that are in a public registry.
See also: AWS API Documentation
Request Syntax
response = client.describe_repositories(
registryId='string',
repositoryNames=[
'string',
],
nextToken='string',
maxResults=123
)
A list of repositories to describe. If this parameter is omitted, then all repositories in a registry are described.
The nextToken
value that's 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. If there are no more results to return, this value is null
. If you specify repositories with repositoryNames
, you can't use this option.
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.
DescribeRepositories
in paginated output. When this parameter is used, DescribeRepositories
only returns maxResults
results in a single page along with a nextToken
response element. You can see the remaining results of the initial request by sending another DescribeRepositories
request with the returned nextToken
value. This value can be between 1 and 1000. If this parameter isn't used, then DescribeRepositories
returns up to 100 results and a nextToken
value, if applicable. If you specify repositories with repositoryNames
, you can't use this option.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, Amazon Web Services account ID of the repository owner, repository namespace, and repository name. For example, arn:aws:ecr:region:012345678910:repository/test
.
registryId (string) --
The Amazon Web Services account ID that's 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. If there are no more results to return, this value is null
.
Exceptions
ECRPublic.Client.exceptions.ServerException
ECRPublic.Client.exceptions.InvalidParameterException
ECRPublic.Client.exceptions.RepositoryNotFoundException
ECRPublic.Client.exceptions.UnsupportedCommandException
Retrieves an authorization token. An authorization token represents your IAM authentication credentials. You can use it 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
response = client.get_authorization_token()
{
'authorizationData': {
'authorizationToken': 'string',
'expiresAt': datetime(2015, 1, 1)
}
}
Response Structure
An authorization token data object that corresponds to a public registry.
A base64-encoded string that contains authorization data for a public Amazon ECR registry. When the string is decoded, it's presented in the format user:password
for public registry authentication using docker login
.
The Unix time in seconds and milliseconds when the authorization token expires. Authorization tokens are valid for 12 hours.
Exceptions
ECRPublic.Client.exceptions.ServerException
ECRPublic.Client.exceptions.InvalidParameterException
ECRPublic.Client.exceptions.UnsupportedCommandException
get_paginator
(operation_name)¶Create a paginator for an operation.
create_foo
, and you'd normally invoke the
operation as client.create_foo(**kwargs)
, if the
create_foo
operation can be paginated, you can use the
call client.get_paginator("create_foo")
.client.can_paginate
method to
check if an operation is pageable.get_registry_catalog_data
()¶Retrieves catalog metadata for a public registry.
See also: AWS API Documentation
Request Syntax
response = client.get_registry_catalog_data()
{
'registryCatalogData': {
'displayName': 'string'
}
}
Response Structure
The catalog metadata for the public registry.
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.
Exceptions
ECRPublic.Client.exceptions.ServerException
ECRPublic.Client.exceptions.UnsupportedCommandException
get_repository_catalog_data
(**kwargs)¶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
response = client.get_repository_catalog_data(
registryId='string',
repositoryName='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.
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.
logoUrl (string) --
The URL that contains the logo that's 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) --
Indicates whether the repository is certified by Amazon Web Services Marketplace.
Exceptions
ECRPublic.Client.exceptions.ServerException
ECRPublic.Client.exceptions.InvalidParameterException
ECRPublic.Client.exceptions.RepositoryCatalogDataNotFoundException
ECRPublic.Client.exceptions.RepositoryNotFoundException
ECRPublic.Client.exceptions.UnsupportedCommandException
get_repository_policy
(**kwargs)¶Retrieves the repository policy for the specified repository.
See also: AWS API Documentation
Request Syntax
response = client.get_repository_policy(
registryId='string',
repositoryName='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 that's associated with the request.
repositoryName (string) --
The repository name that's associated with the request.
policyText (string) --
The repository policy text that's associated with the repository. The policy text will be in JSON format.
Exceptions
ECRPublic.Client.exceptions.ServerException
ECRPublic.Client.exceptions.InvalidParameterException
ECRPublic.Client.exceptions.RepositoryNotFoundException
ECRPublic.Client.exceptions.RepositoryPolicyNotFoundException
ECRPublic.Client.exceptions.UnsupportedCommandException
get_waiter
(waiter_name)¶Returns an object that can wait for some condition.
initiate_layer_upload
(**kwargs)¶Notifies Amazon ECR that you intend to upload an image layer.
When an image is pushed, the InitiateLayerUpload API is called once for each image layer that hasn't already been uploaded. Whether an image layer uploads 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
response = client.initiate_layer_upload(
registryId='string',
repositoryName='string'
)
[REQUIRED]
The name of the repository that you want to upload layers to.
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.
Exceptions
ECRPublic.Client.exceptions.ServerException
ECRPublic.Client.exceptions.InvalidParameterException
ECRPublic.Client.exceptions.RepositoryNotFoundException
ECRPublic.Client.exceptions.RegistryNotFoundException
ECRPublic.Client.exceptions.UnsupportedCommandException
List the tags for an Amazon ECR Public resource.
See also: AWS API Documentation
Request Syntax
response = client.list_tags_for_resource(
resourceArn='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) that identifies the resource to list the tags for. Currently, the supported resource is an Amazon ECR Public repository.
{
'tags': [
{
'Key': 'string',
'Value': 'string'
},
]
}
Response Structure
The tags for the resource.
The metadata that you apply to a resource to help you categorize and organize them. Each tag consists of a key and an optional value. You define both. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.
One part of a key-value pair that make up a tag. A key
is a general label that acts like a category for more specific tag values.
The optional part of a key-value pair that make up a tag. A value
acts as a descriptor within a tag category (key).
Exceptions
ECRPublic.Client.exceptions.InvalidParameterException
ECRPublic.Client.exceptions.RepositoryNotFoundException
ECRPublic.Client.exceptions.UnsupportedCommandException
ECRPublic.Client.exceptions.ServerException
put_image
(**kwargs)¶Creates or updates the image manifest and tags that are 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 that are 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
response = client.put_image(
registryId='string',
repositoryName='string',
imageManifest='string',
imageManifestMediaType='string',
imageTag='string',
imageDigest='string'
)
[REQUIRED]
The name of the repository where the image is put.
[REQUIRED]
The image manifest that corresponds to the image to be uploaded.
mediaType
field, you must specify the imageManifestMediaType
in the request.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 Amazon Web Services account ID that's associated with the registry containing the image.
repositoryName (string) --
The name of the repository that's associated with the image.
imageId (dict) --
An object that contains the image tag and image digest associated with an image.
imageDigest (string) --
The sha256
digest of the image manifest.
imageTag (string) --
The tag that's used for the image.
imageManifest (string) --
The image manifest that's associated with the image.
imageManifestMediaType (string) --
The manifest media type of the image.
Exceptions
ECRPublic.Client.exceptions.ServerException
ECRPublic.Client.exceptions.InvalidParameterException
ECRPublic.Client.exceptions.RepositoryNotFoundException
ECRPublic.Client.exceptions.ImageAlreadyExistsException
ECRPublic.Client.exceptions.LayersNotFoundException
ECRPublic.Client.exceptions.ReferencedImagesNotFoundException
ECRPublic.Client.exceptions.LimitExceededException
ECRPublic.Client.exceptions.ImageTagAlreadyExistsException
ECRPublic.Client.exceptions.ImageDigestDoesNotMatchException
ECRPublic.Client.exceptions.RegistryNotFoundException
ECRPublic.Client.exceptions.UnsupportedCommandException
put_registry_catalog_data
(**kwargs)¶Create or update the catalog data for a public registry.
See also: AWS API Documentation
Request Syntax
response = client.put_registry_catalog_data(
displayName='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.
{
'registryCatalogData': {
'displayName': 'string'
}
}
Response Structure
The catalog data for the public registry.
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.
Exceptions
ECRPublic.Client.exceptions.ServerException
ECRPublic.Client.exceptions.InvalidParameterException
ECRPublic.Client.exceptions.UnsupportedCommandException
put_repository_catalog_data
(**kwargs)¶Creates or updates the catalog data for a repository in a public registry.
See also: AWS API Documentation
Request Syntax
response = client.put_repository_catalog_data(
registryId='string',
repositoryName='string',
catalogData={
'description': 'string',
'architectures': [
'string',
],
'operatingSystems': [
'string',
],
'logoImageBlob': b'bytes',
'aboutText': 'string',
'usageText': 'string'
}
)
[REQUIRED]
The name of the repository to create or update the catalog data for.
[REQUIRED]
An object containing the catalog data for a repository. This data is publicly visible in the Amazon ECR Public Gallery.
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.
The system architecture that the images in the repository are compatible with. On the Amazon ECR Public Gallery, the following supported architectures appear as badges on the repository and are used as search filters.
Note
If an unsupported tag is added to your repository catalog data, it's associated with the repository and can be retrieved using the API but isn't discoverable in the Amazon ECR Public Gallery.
ARM
ARM 64
x86
x86-64
The operating systems that the images in the repository are compatible with. On the Amazon ECR Public Gallery, the following supported operating systems appear as badges on the repository and are used as search filters.
Note
If an unsupported tag is added to your repository catalog data, it's associated with the repository and can be retrieved using the API but isn't discoverable in the Amazon ECR Public Gallery.
Linux
Windows
The base64-encoded repository logo payload.
Note
The repository logo is only publicly visible in the Amazon ECR Public Gallery for verified accounts.
A detailed description of the contents of the repository. It's publicly visible in the Amazon ECR Public Gallery. The text must be in markdown format.
Detailed information about how to use the contents of the repository. It's 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.
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.
logoUrl (string) --
The URL that contains the logo that's 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) --
Indicates whether the repository is certified by Amazon Web Services Marketplace.
Exceptions
ECRPublic.Client.exceptions.ServerException
ECRPublic.Client.exceptions.InvalidParameterException
ECRPublic.Client.exceptions.RepositoryNotFoundException
ECRPublic.Client.exceptions.UnsupportedCommandException
set_repository_policy
(**kwargs)¶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
response = client.set_repository_policy(
registryId='string',
repositoryName='string',
policyText='string',
force=True|False
)
[REQUIRED]
The name of the repository to receive the policy.
[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 .
dict
Response Syntax
{
'registryId': 'string',
'repositoryName': 'string',
'policyText': 'string'
}
Response Structure
(dict) --
registryId (string) --
The registry ID that's associated with the request.
repositoryName (string) --
The repository name that's associated with the request.
policyText (string) --
The JSON repository policy text that's applied to the repository.
Exceptions
ECRPublic.Client.exceptions.ServerException
ECRPublic.Client.exceptions.InvalidParameterException
ECRPublic.Client.exceptions.RepositoryNotFoundException
ECRPublic.Client.exceptions.UnsupportedCommandException
tag_resource
(**kwargs)¶Associates the specified tags to a resource with the specified resourceArn
. If existing tags on a resource aren't specified in the request parameters, they aren't changed. When a resource is deleted, the tags associated with that resource are also deleted.
See also: AWS API Documentation
Request Syntax
response = client.tag_resource(
resourceArn='string',
tags=[
{
'Key': 'string',
'Value': 'string'
},
]
)
[REQUIRED]
The Amazon Resource Name (ARN) of the resource to add tags to. Currently, the supported resource is an Amazon ECR Public repository.
[REQUIRED]
The tags to add to the resource. A tag is an array of key-value pairs. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.
The metadata that you apply to a resource to help you categorize and organize them. Each tag consists of a key and an optional value. You define both. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.
One part of a key-value pair that make up a tag. A key
is a general label that acts like a category for more specific tag values.
The optional part of a key-value pair that make up a tag. A value
acts as a descriptor within a tag category (key).
dict
Response Syntax
{}
Response Structure
Exceptions
ECRPublic.Client.exceptions.InvalidParameterException
ECRPublic.Client.exceptions.InvalidTagParameterException
ECRPublic.Client.exceptions.TooManyTagsException
ECRPublic.Client.exceptions.RepositoryNotFoundException
ECRPublic.Client.exceptions.UnsupportedCommandException
ECRPublic.Client.exceptions.ServerException
untag_resource
(**kwargs)¶Deletes specified tags from a resource.
See also: AWS API Documentation
Request Syntax
response = client.untag_resource(
resourceArn='string',
tagKeys=[
'string',
]
)
[REQUIRED]
The Amazon Resource Name (ARN) of the resource to delete tags from. Currently, the supported resource is an Amazon ECR Public repository.
[REQUIRED]
The keys of the tags to be removed.
dict
Response Syntax
{}
Response Structure
Exceptions
ECRPublic.Client.exceptions.InvalidParameterException
ECRPublic.Client.exceptions.InvalidTagParameterException
ECRPublic.Client.exceptions.TooManyTagsException
ECRPublic.Client.exceptions.RepositoryNotFoundException
ECRPublic.Client.exceptions.UnsupportedCommandException
ECRPublic.Client.exceptions.ServerException
upload_layer_part
(**kwargs)¶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 (about 20MB). The UploadLayerPart API is called once for 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
response = client.upload_layer_part(
registryId='string',
repositoryName='string',
uploadId='string',
partFirstByte=123,
partLastByte=123,
layerPartBlob=b'bytes'
)
[REQUIRED]
The name of the repository that you're uploading layer parts to.
[REQUIRED]
The upload ID from a previous InitiateLayerUpload operation to associate with the layer part upload.
[REQUIRED]
The position of the first byte of the layer part witin the overall image layer.
[REQUIRED]
The position of the last byte of the layer part within the overall image layer.
[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 that's associated with the request.
repositoryName (string) --
The repository name that's associated with the request.
uploadId (string) --
The upload ID that's associated with the request.
lastByteReceived (integer) --
The integer value of the last byte that's received in the request.
Exceptions
ECRPublic.Client.exceptions.ServerException
ECRPublic.Client.exceptions.InvalidParameterException
ECRPublic.Client.exceptions.InvalidLayerPartException
ECRPublic.Client.exceptions.RepositoryNotFoundException
ECRPublic.Client.exceptions.UploadNotFoundException
ECRPublic.Client.exceptions.LimitExceededException
ECRPublic.Client.exceptions.RegistryNotFoundException
ECRPublic.Client.exceptions.UnsupportedCommandException
The available paginators are:
ECRPublic.Paginator.DescribeImageTags
ECRPublic.Paginator.DescribeImages
ECRPublic.Paginator.DescribeRegistries
ECRPublic.Paginator.DescribeRepositories
ECRPublic.Paginator.
DescribeImageTags
¶paginator = client.get_paginator('describe_image_tags')
paginate
(**kwargs)¶Creates an iterator that will paginate through responses from ECRPublic.Client.describe_image_tags()
.
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
registryId='string',
repositoryName='string',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
[REQUIRED]
The name of the repository that contains the image tag details to describe.
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken
will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken
from a previous response.
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 that represents the image tag details for an image.
imageTag (string) --
The tag that's associated with the image.
createdAt (datetime) --
The time stamp that indicates 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 is 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 might return a larger image size than the image sizes that are returned by DescribeImages.
imagePushedAt (datetime) --
The date and time, expressed in standard JavaScript date format, which the current image tag was pushed to the repository at.
imageManifestMediaType (string) --
The media type of the image manifest.
artifactMediaType (string) --
The artifact media type of the image.
NextToken (string) --
A token to resume pagination.
ECRPublic.Paginator.
DescribeImages
¶paginator = client.get_paginator('describe_images')
paginate
(**kwargs)¶Creates an iterator that will paginate through responses from ECRPublic.Client.describe_images()
.
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
registryId='string',
repositoryName='string',
imageIds=[
{
'imageDigest': 'string',
'imageTag': 'string'
},
],
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
[REQUIRED]
The repository that contains the images to describe.
The list of image IDs for the requested repository.
An object with identifying information for an Amazon ECR image.
The sha256
digest of the image manifest.
The tag that's used for the image.
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken
will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken
from a previous response.
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 that's returned by a DescribeImages operation.
registryId (string) --
The Amazon Web Services account ID that's associated with the public registry where this image belongs.
repositoryName (string) --
The name of the repository where this image belongs.
imageDigest (string) --
The sha256
digest of the image manifest.
imageTags (list) --
The list of tags that's associated with this image.
imageSizeInBytes (integer) --
The size, in bytes, of the image in the repository.
If the image is a manifest list, this is 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 might return a larger image size than the image sizes that are returned by DescribeImages.
imagePushedAt (datetime) --
The date and time, expressed in standard JavaScript date format, that the current image was pushed to the repository at.
imageManifestMediaType (string) --
The media type of the image manifest.
artifactMediaType (string) --
The artifact media type of the image.
NextToken (string) --
A token to resume pagination.
ECRPublic.Paginator.
DescribeRegistries
¶paginator = client.get_paginator('describe_registries')
paginate
(**kwargs)¶Creates an iterator that will paginate through responses from ECRPublic.Client.describe_registries()
.
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken
will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken
from a previous response.
{
'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
An object that contains the details for a public registry.
The details of a public registry.
The Amazon Web Services account ID that's associated with the registry. If you do not specify a registry, the default public registry is assumed.
The Amazon Resource Name (ARN) of the public registry.
The URI of a public registry. The URI contains a universal prefix and the registry alias.
Indicates whether the account is a verified Amazon Web Services Marketplace vendor. If an account is verified, each public repository receives a verified account badge on the Amazon ECR Public Gallery.
An array of objects that represents the aliases for a public registry.
An object representing the aliases for a public registry. A public registry is given an alias when it's created. However, a custom alias can be set using the Amazon ECR console. For more information, see Registries in the Amazon Elastic Container Registry User Guide .
The name of the registry alias.
The status of the registry alias.
Indicates whether 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 isn't the primary registry alias can be used in the repository URI in a docker pull
command.
Indicates whether 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.
A token to resume pagination.
ECRPublic.Paginator.
DescribeRepositories
¶paginator = client.get_paginator('describe_repositories')
paginate
(**kwargs)¶Creates an iterator that will paginate through responses from ECRPublic.Client.describe_repositories()
.
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
registryId='string',
repositoryNames=[
'string',
],
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
A list of repositories to describe. If this parameter is omitted, then all repositories in a registry are described.
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken
will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken
from a previous response.
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, Amazon Web Services account ID of the repository owner, repository namespace, and repository name. For example, arn:aws:ecr:region:012345678910:repository/test
.
registryId (string) --
The Amazon Web Services account ID that's 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) --
A token to resume pagination.