CreateRepository - Amazon Elastic Container Registry Public

CreateRepository

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

Request Syntax

{ "catalogData": { "aboutText": "string", "architectures": [ "string" ], "description": "string", "logoImageBlob": blob, "operatingSystems": [ "string" ], "usageText": "string" }, "repositoryName": "string", "tags": [ { "Key": "string", "Value": "string" } ] }

Request Parameters

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

The request accepts the following data in JSON format.

catalogData

The details about the repository that are publicly visible in the Amazon ECR Public Gallery.

Type: RepositoryCatalogDataInput object

Required: No

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 example project-a/nginx-web-app).

Type: String

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

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

Required: Yes

tags

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.

Type: Array of Tag objects

Array Members: Minimum number of 0 items. Maximum number of 200 items.

Required: No

Response Syntax

{ "catalogData": { "aboutText": "string", "architectures": [ "string" ], "description": "string", "logoUrl": "string", "marketplaceCertified": boolean, "operatingSystems": [ "string" ], "usageText": "string" }, "repository": { "createdAt": number, "registryId": "string", "repositoryArn": "string", "repositoryName": "string", "repositoryUri": "string" } }

Response Elements

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

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

catalogData

The catalog data for a repository. This data is publicly visible in the Amazon ECR Public Gallery.

Type: RepositoryCatalogData object

repository

The repository that was created.

Type: Repository object

Errors

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

InvalidParameterException

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

HTTP Status Code: 400

InvalidTagParameterException

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

HTTP Status Code: 400

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.

HTTP Status Code: 400

RepositoryAlreadyExistsException

The specified repository already exists in the specified registry.

HTTP Status Code: 400

ServerException

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

HTTP Status Code: 500

TooManyTagsException

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

HTTP Status Code: 400

UnsupportedCommandException

The action isn't supported in this Region.

HTTP Status Code: 400

See Also

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