repository_tags
Creates, updates, deletes, gets or lists a repository_tags resource.
Overview
| Name | repository_tags |
| Type | Resource |
| Id | digitalocean.container_registry.repository_tags |
Fields
The following fields are returned by SELECT queries:
- registries_list_repository_tags
The response body will be a JSON object with a key of tags. This will be set to an array containing objects each representing a tag.
| Name | Datatype | Description |
|---|---|---|
registry_name | string | The name of the container registry. (example: example) |
compressed_size_bytes | integer | The compressed size of the tag in bytes. |
manifest_digest | string | The digest of the manifest associated with the tag. (example: sha256:cb8a924afdf0229ef7515d9e5b3024e23b3eb03ddbba287f4a19c6ac90b8d221) |
repository | string | The name of the repository. (example: repo-1) |
size_bytes | integer | The uncompressed size of the tag in bytes (this size is calculated asynchronously so it may not be immediately available). |
tag | string | The name of the tag. (example: latest) |
updated_at | string (date-time) | The time the tag was last updated. (example: 2020-04-09T23:54:25Z) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
registries_list_repository_tags | select | registry_name, repository_name | per_page, page | To list all tags in one of your container registry's repository, send a GET request to /v2/registries/$REGISTRY_NAME/repositories/$REPOSITORY_NAME/tags.Note that if your repository name contains / characters, it must beURL-encoded in the request URL. For example, to list tags for registry.digitalocean.com/example/my/repo, the path would be/v2/registry/example/repositories/my%2Frepo/tags. It is similar to GET /v2/registry/$REGISTRY_NAME/repositories/$REPOSITORY_NAME/tags and exists for backward compatibility. |
registries_delete_repository_tag | delete | registry_name, repository_name, repository_tag | To delete a container repository tag in on of our container registries, send a DELETE request to/v2/registries/$REGISTRY_NAME/repositories/$REPOSITORY_NAME/tags/$TAG.Note that if your repository name contains / characters, it must beURL-encoded in the request URL. For example, to delete registry.digitalocean.com/example/my/repo:mytag, the path would be/v2/registry/example/repositories/my%2Frepo/tags/mytag.A successful request will receive a 204 status code with no body in response. This indicates that the request was processed successfully. It is similar to DELETE /v2/registry/$REGISTRY_NAME/repositories/$REPOSITORY_NAME/tags/$TAG and exists for backward compatibility. | |
registry_list_repository_tags_legacy | exec | registry_name, repository_name | per_page, page | To list all tags in your container registry repository, send a GET request to /v2/registry/$REGISTRY_NAME/repositories/$REPOSITORY_NAME/tags.Note that if your repository name contains / characters, it must beURL-encoded in the request URL. For example, to list tags for registry.digitalocean.com/example/my/repo, the path would be/v2/registry/example/repositories/my%2Frepo/tags. |
registry_delete_repository_tag_legacy | exec | registry_name, repository_name, repository_tag | To delete a container repository tag, send a DELETE request to/v2/registry/$REGISTRY_NAME/repositories/$REPOSITORY_NAME/tags/$TAG.Note that if your repository name contains / characters, it must beURL-encoded in the request URL. For example, to delete registry.digitalocean.com/example/my/repo:mytag, the path would be/v2/registry/example/repositories/my%2Frepo/tags/mytag.A successful request will receive a 204 status code with no body in response. This indicates that the request was processed successfully. |
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) |
repository_tag | string | The name of a container registry repository tag. (example: 06a447a) |
page | integer | Which 'page' of paginated results to return. (example: 1) |
per_page | integer | Number of items returned per page (example: 2) |
SELECT examples
- registries_list_repository_tags
To list all tags in one of your container registry's repository, send a GET
request to /v2/registries/$REGISTRY_NAME/repositories/$REPOSITORY_NAME/tags.
Note that if your repository name contains / characters, it must be
URL-encoded in the request URL. For example, to list tags forregistry.digitalocean.com/example/my/repo, the path would be/v2/registry/example/repositories/my%2Frepo/tags.
It is similar to GET /v2/registry/$REGISTRY_NAME/repositories/$REPOSITORY_NAME/tags and exists for backward compatibility.
SELECT
registry_name,
compressed_size_bytes,
manifest_digest,
repository,
size_bytes,
tag,
updated_at
FROM digitalocean.container_registry.repository_tags
WHERE registry_name = '{{ registry_name }}' -- required
AND repository_name = '{{ repository_name }}' -- required
AND per_page = '{{ per_page }}'
AND page = '{{ page }}'
;
DELETE examples
- registries_delete_repository_tag
To delete a container repository tag in on of our container registries, send a DELETE request to/v2/registries/$REGISTRY_NAME/repositories/$REPOSITORY_NAME/tags/$TAG.
Note that if your repository name contains / characters, it must be
URL-encoded in the request URL. For example, to deleteregistry.digitalocean.com/example/my/repo:mytag, the path would be/v2/registry/example/repositories/my%2Frepo/tags/mytag.
A successful request will receive a 204 status code with no body in response.
This indicates that the request was processed successfully. It is similar to DELETE /v2/registry/$REGISTRY_NAME/repositories/$REPOSITORY_NAME/tags/$TAG and exists for backward compatibility.
DELETE FROM digitalocean.container_registry.repository_tags
WHERE registry_name = '{{ registry_name }}' --required
AND repository_name = '{{ repository_name }}' --required
AND repository_tag = '{{ repository_tag }}' --required
;
Lifecycle Methods
- registry_list_repository_tags_legacy
- registry_delete_repository_tag_legacy
To list all tags in your container registry repository, send a GET
request to /v2/registry/$REGISTRY_NAME/repositories/$REPOSITORY_NAME/tags.
Note that if your repository name contains / characters, it must be
URL-encoded in the request URL. For example, to list tags forregistry.digitalocean.com/example/my/repo, the path would be/v2/registry/example/repositories/my%2Frepo/tags.
EXEC digitalocean.container_registry.repository_tags.registry_list_repository_tags_legacy
@registry_name='{{ registry_name }}' --required,
@repository_name='{{ repository_name }}' --required,
@per_page='{{ per_page }}',
@page='{{ page }}'
;
To delete a container repository tag, send a DELETE request to/v2/registry/$REGISTRY_NAME/repositories/$REPOSITORY_NAME/tags/$TAG.
Note that if your repository name contains / characters, it must be
URL-encoded in the request URL. For example, to deleteregistry.digitalocean.com/example/my/repo:mytag, the path would be/v2/registry/example/repositories/my%2Frepo/tags/mytag.
A successful request will receive a 204 status code with no body in response.
This indicates that the request was processed successfully.
EXEC digitalocean.container_registry.repository_tags.registry_delete_repository_tag_legacy
@registry_name='{{ registry_name }}' --required,
@repository_name='{{ repository_name }}' --required,
@repository_tag='{{ repository_tag }}' --required
;