v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-1441293181.2 KB

Creates a repository. For more information, see <a href="https://docs.aws.amazon.com/AmazonECR/latest/userguide/Repositories.html">Amazon ECR repositories</a> in the <i>Amazon Elastic Container Registry User Guide</i>.

post/#X-Amz-Target=AmazonEC2ContainerRegistry_V20150921.CreateRepository

Headers

X-Amz-Target'AmazonEC2ContainerRegistry_V20150921.CreateRepository' required

Request body

registryIdstring

The Amazon Web Services account ID associated with the registry to create the repository. If you do not specify a registry, the default registry is assumed.

repositoryNamestring required

The name to use for the repository. The repository name may be specified on its own (such as <code>nginx-web-app</code>) or it can be prepended with a namespace to group the repository into a category (such as <code>project-a/nginx-web-app</code>).

imageTagMutability'MUTABLE' | 'IMMUTABLE'

The tag mutability setting for the repository. If this parameter is omitted, the default setting of <code>MUTABLE</code> will be used which will allow image tags to be overwritten. If <code>IMMUTABLE</code> is specified, all image tags within the repository will be immutable which will prevent them from being overwritten.

Response

Success

Example response

{
  "repository": {
    "registryId": 12345678901,
    "repositoryArn": "arn:aws:ecr:us-west-2:012345678901:repository/project-a/nginx-web-app",
    "repositoryName": "project-a/nginx-web-app"
  }
}