registries
Creates, updates, deletes, gets or lists a registries
resource.
Overview
Name | registries |
Type | Resource |
Id | digitalocean.container_registry.registries |
Fields
The following fields are returned by SELECT
queries:
- registries_get
- registries_list
The response will be a JSON object with the key registry
containing information about your registry.
Name | Datatype | Description |
---|---|---|
name | string | A globally unique name for the container registry. Must be lowercase and be composed only of numbers, letters and - , up to a limit of 63 characters. (pattern: ^[a-z0-9-]{1,63}$, example: example) |
created_at | string (date-time) | A time value given in ISO8601 combined date and time format that represents when the registry was created. (example: 2020-03-21T16:02:37Z) |
region | string | Slug of the region where registry data is stored (example: fra1) |
storage_usage_bytes | integer | The amount of storage used in the registry in bytes. |
storage_usage_bytes_updated_at | string (date-time) | The time at which the storage usage was updated. Storage usage is calculated asynchronously, and may not immediately reflect pushes to the registry. (example: 2020-11-04T21:39:49.530562231Z) |
The response will be a JSON object with the key registry
containing information about your registry.
Name | Datatype | Description |
---|
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
registries_get | select | registry_name | To get information about any container registry in your account, send a GET request to /v2/registries/{registry_name} . | |
registries_list | select | To get information about any container registry in your account, send a GET request to /v2/registries/ . | ||
registries_create | insert | data__name | To create your container registry, send a POST request to /v2/registries .The name becomes part of the URL for images stored in the registry. Forexample, if your registry is called example , an image in it will have theURL registry.digitalocean.com/example/image:tag . | |
registries_delete | delete | registry_name | To delete your container registry, destroying all container image data stored in it, send a DELETE request to /v2/registries/{registry_name} . | |
registries_validate_name | exec | name | To validate that a container registry name is available for use, send a POST request to /v2/registries/validate-name .If the name is both formatted correctly and available, the response code will be 204 and contain no body. If the name is already in use, the response will be a 409 Conflict. It is similar to /v2/registry/validate-name and exists for backward compatibility. | |
registry_get_legacy | exec | To get information about your container registry, send a GET request to /v2/registry .This operation is not compatible with multiple registries in a DO account. You should use /v2/registries/{registry_name} instead. | ||
registry_create_legacy | exec | name , subscription_tier_slug | To create your container registry, send a POST request to /v2/registry .The name becomes part of the URL for images stored in the registry. Forexample, if your registry is called example , an image in it will have theURL registry.digitalocean.com/example/image:tag . | |
registry_delete_legacy | exec | To delete your container registry, destroying all container image data stored in it, send a DELETE request to /v2/registry .This operation is not compatible with multiple registries in a DO account. You should use /v2/registries/{registry_name} instead. | ||
registry_validate_name_legacy | exec | name | To validate that a container registry name is available for use, send a POST request to /v2/registry/validate-name .If the name is both formatted correctly and available, the response code will be 204 and contain no body. If the name is already in use, the response will be a 409 Conflict. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
registry_name | string | The name of a container registry. (example: example) |
SELECT
examples
- registries_get
- registries_list
To get information about any container registry in your account, send a GET request to /v2/registries/{registry_name}
.
SELECT
name,
created_at,
region,
storage_usage_bytes,
storage_usage_bytes_updated_at
FROM digitalocean.container_registry.registries
WHERE registry_name = '{{ registry_name }}' -- required;
To get information about any container registry in your account, send a GET request to /v2/registries/
.
SELECT
*
FROM digitalocean.container_registry.registries;
INSERT
examples
- registries_create
- Manifest
To create your container registry, send a POST request to /v2/registries
.
The name
becomes part of the URL for images stored in the registry. For
example, if your registry is called example
, an image in it will have the
URL registry.digitalocean.com/example/image:tag
.
INSERT INTO digitalocean.container_registry.registries (
data__name,
data__subscription_tier_slug,
data__region
)
SELECT
'{{ name }}' --required,
'{{ subscription_tier_slug }}',
'{{ region }}'
RETURNING
registry
;
# Description fields are for documentation purposes
- name: registries
props:
- name: name
value: string
description: >
A globally unique name for the container registry. Must be lowercase and be composed only of numbers, letters and `-`, up to a limit of 63 characters.
- name: subscription_tier_slug
value: string
description: >
The slug of the subscription tier to sign up for. Valid values can be retrieved using the options endpoint.
valid_values: ['starter', 'basic', 'professional']
- name: region
value: string
description: >
Slug of the region where registry data is stored. When not provided, a region will be selected.
valid_values: ['nyc3', 'sfo3', 'sfo2', 'ams3', 'sgp1', 'fra1', 'blr1', 'syd1']
DELETE
examples
- registries_delete
To delete your container registry, destroying all container image data stored in it, send a DELETE request to /v2/registries/{registry_name}
.
DELETE FROM digitalocean.container_registry.registries
WHERE registry_name = '{{ registry_name }}' --required;
Lifecycle Methods
- registries_validate_name
- registry_get_legacy
- registry_create_legacy
- registry_delete_legacy
- registry_validate_name_legacy
To validate that a container registry name is available for use, send a POST
request to /v2/registries/validate-name
.
If the name is both formatted correctly and available, the response code will
be 204 and contain no body. If the name is already in use, the response will
be a 409 Conflict.
It is similar to /v2/registry/validate-name
and exists for backward compatibility.
EXEC digitalocean.container_registry.registries.registries_validate_name
@@json=
'{
"name": "{{ name }}"
}';
To get information about your container registry, send a GET request to /v2/registry
.
This operation is not compatible with multiple registries in a DO account. You should use /v2/registries/{registry_name}
instead.
EXEC digitalocean.container_registry.registries.registry_get_legacy
;
To create your container registry, send a POST request to /v2/registry
.
The name
becomes part of the URL for images stored in the registry. For
example, if your registry is called example
, an image in it will have the
URL registry.digitalocean.com/example/image:tag
.
EXEC digitalocean.container_registry.registries.registry_create_legacy
@@json=
'{
"name": "{{ name }}",
"subscription_tier_slug": "{{ subscription_tier_slug }}",
"region": "{{ region }}"
}';
To delete your container registry, destroying all container image data stored in it, send a DELETE request to /v2/registry
.
This operation is not compatible with multiple registries in a DO account. You should use /v2/registries/{registry_name}
instead.
EXEC digitalocean.container_registry.registries.registry_delete_legacy
;
To validate that a container registry name is available for use, send a POST
request to /v2/registry/validate-name
.
If the name is both formatted correctly and available, the response code will
be 204 and contain no body. If the name is already in use, the response will
be a 409 Conflict.
EXEC digitalocean.container_registry.registries.registry_validate_name_legacy
@@json=
'{
"name": "{{ name }}"
}';