ECRPublic / Client / delete_repository
delete_repository#
- ECRPublic.Client.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 )
- Parameters:
registryId (string) – The Amazon Web Services account ID that’s associated with the public registry that contains the repository to delete. If you do not specify a registry, the default public registry is assumed.
repositoryName (string) –
[REQUIRED]
The name of the repository to delete.
force (boolean) – The force option can be used to delete a repository that contains images. If the force option is not used, the repository must be empty prior to deletion.
- Return type:
dict
- Returns:
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
andpull
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