repositories
Creates, updates, deletes, gets or lists a repositories
resource.
Overview
Name | repositories |
Type | Resource |
Id | digitalocean.container_registry.repositories |
Fields
The following fields are returned by SELECT
queries:
- registries_list_repositories_v2
The response body will be a JSON object with a key of repositories
. This will be set to an array containing objects each representing a repository.
Name | Datatype | Description |
---|---|---|
name | string | The name of the repository. (example: repo-1) |
registry_name | string | The name of the container registry. (example: example) |
latest_manifest | object | |
manifest_count | integer | The number of manifests in the repository. |
tag_count | integer | The number of tags in the repository. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
registries_list_repositories_v2 | select | registry_name | per_page , page , page_token | To list all repositories in your container registry, send a GET request to /v2/registries/$REGISTRY_NAME/repositoriesV2 . It is similar to GET /v2/registry/$REGISTRY_NAME/repositoriesV2 and exists for backward compatibility. |
registries_delete_repository | delete | registry_name , repository_name | To delete a container repository including all of its tags, send a DELETE request to/v2/registries/$REGISTRY_NAME/repositories/$REPOSITORY_NAME .A successful request will receive a 204 status code with no body in response. This indicates that the request was processed successfully. | |
registry_list_repositories_legacy | exec | registry_name | per_page , page | This endpoint has been deprecated in favor of the List All Container Registry Repositories [V2] endpoint. To list all repositories in your container registry, send a GET request to /v2/registry/$REGISTRY_NAME/repositories . |
registry_list_repositories_v2_legacy | exec | registry_name | per_page , page , page_token | To list all repositories in your container registry, send a GET request to /v2/registry/$REGISTRY_NAME/repositoriesV2 . |
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) |
repository_name | string | The name of a container registry repository. If the name contains / characters, they must be URL-encoded, e.g. %2F . (example: repo-1) |
page | integer | Which 'page' of paginated results to return. Ignored when 'page_token' is provided. (example: 1) |
page_token | string | Token to retrieve of the next or previous set of results more quickly than using 'page'. (example: eyJUb2tlbiI6IkNnZGpiMjlz) |
per_page | integer | Number of items returned per page (example: 2) |
SELECT
examples
- registries_list_repositories_v2
To list all repositories in your container registry, send a GET request to /v2/registries/$REGISTRY_NAME/repositoriesV2
. It is similar to GET /v2/registry/$REGISTRY_NAME/repositoriesV2
and exists for backward compatibility.
SELECT
name,
registry_name,
latest_manifest,
manifest_count,
tag_count
FROM digitalocean.container_registry.repositories
WHERE registry_name = '{{ registry_name }}' -- required
AND per_page = '{{ per_page }}'
AND page = '{{ page }}'
AND page_token = '{{ page_token }}';
DELETE
examples
- registries_delete_repository
To delete a container repository including all of its tags, send a DELETE request to/v2/registries/$REGISTRY_NAME/repositories/$REPOSITORY_NAME
.
A successful request will receive a 204 status code with no body in response.
This indicates that the request was processed successfully.
DELETE FROM digitalocean.container_registry.repositories
WHERE registry_name = '{{ registry_name }}' --required
AND repository_name = '{{ repository_name }}' --required;
Lifecycle Methods
- registry_list_repositories_legacy
- registry_list_repositories_v2_legacy
This endpoint has been deprecated in favor of the List All Container Registry Repositories [V2] endpoint.
To list all repositories in your container registry, send a GET
request to /v2/registry/$REGISTRY_NAME/repositories
.
EXEC digitalocean.container_registry.repositories.registry_list_repositories_legacy
@registry_name='{{ registry_name }}' --required,
@per_page='{{ per_page }}',
@page='{{ page }}';
To list all repositories in your container registry, send a GET request to /v2/registry/$REGISTRY_NAME/repositoriesV2
.
EXEC digitalocean.container_registry.repositories.registry_list_repositories_v2_legacy
@registry_name='{{ registry_name }}' --required,
@per_page='{{ per_page }}',
@page='{{ page }}',
@page_token='{{ page_token }}';