create_repository
async
¶
create_repository(
repository_name: RepositoryName,
*,
config_overrides: Optional[AsyncECRPUBLICClientConfig] = None,
catalog_data: Optional[RepositoryCatalogDataInput] = None,
tags: Optional[TagList] = None,
) -> CreateRepositoryResponse
Creates a repository in a public registry. For more information, see Public repositories in the Amazon Elastic Container Registry Public User Guide.
Parameters:
-
repository_name(RepositoryName) –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 exampleproject-a/nginx-web-app). -
catalog_data(Optional[RepositoryCatalogDataInput], default:None) –The details about the repository that are publicly visible in the Amazon ECR Public Gallery.
-
tags(Optional[TagList], default:None) –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.
Raises:
-
InvalidParameterException–The specified parameter is invalid. Review the available parameters for the API request.
-
InvalidTagParameterException–An invalid parameter has been specified. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.
-
LimitExceededException–The operation didn't succeed because it would have exceeded a service limit for your account. For more information, see Amazon ECR Public service quotas in the Amazon Elastic Container Registry Public User Guide.
-
RepositoryAlreadyExistsException–The specified repository already exists in the specified registry. Choose a different repository name, or use the existing repository.
-
ServerException–These errors are usually caused by a server-side issue. Retry the request. If it continues to fail, contact Amazon Web Services Support.
-
TooManyTagsException–The list of tags on the repository is over the limit. A repository can have up to 50 tags. Remove tags with
UntagResource, or specify fewer tags, then try again. -
UnsupportedCommandException–The action isn't supported in this Region. Check that the action is available in the Amazon Web Services Region that you're using, and try again in a supported Region.
-
UnknownServiceError–The service returned an error code this client does not model.