v1

latestSwagger 2.02026-08-04232286653.5 KB
Ccr
Container Registry

Creates a container registry repository in the project and returns the created repository.

post/projects/{project_id}/ccr/repositories

Path parameters

project_idstring required

ID of the project to create the repository in.

Request body

locationstring

Location to create the repository in.

max_size_bytesstring

Maximum total size for the new repository, in bytes.

modestring

Mode for the new repository, which determines how images are stored and served.

namestring

Name for the new repository.

Example request

{
  "location": "us-east1",
  "max_size_bytes": "10737418240",
  "name": "my-repository",
  "upstream_registry": {
    "upstream_registry_credentials": {
      "username": "my-registry-user"
    },
    "url": "https://registry-1.docker.io"
  }
}

Response

created_atstring date-time

Creation timestamp of the repository, in RFC3339 format.

idstring

ID of the repository.

locationstring

Location the repository is hosted in.

max_size_bytesstring

Maximum total size of the repository, in bytes.

modestring

Mode of the repository, which determines how images are stored and served.

namestring

Name of the repository.

statestring

State of the repository.

urlstring

URL at which the repository can be accessed.

Example response

{
  "created_at": "2021-12-03T19:58:34Z",
  "id": "ca39e669-47ee-456b-968d-303234fbf99f",
  "location": "us-east1",
  "max_size_bytes": "10737418240",
  "name": "my-repository",
  "upstream_registry": {
    "upstream_registry_credentials": {
      "username": "my-registry-user"
    },
    "url": "https://registry-1.docker.io"
  }
}