Skip to main content

repository_tags

Creates, updates, deletes, gets or lists a repository_tags resource.

Overview

Namerepository_tags
TypeResource
Iddigitalocean.container_registry.repository_tags

Fields

The following fields are returned by SELECT queries:

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.

NameDatatypeDescription
registry_namestringThe name of the container registry. (example: example)
compressed_size_bytesintegerThe compressed size of the tag in bytes.
manifest_digeststringThe digest of the manifest associated with the tag. (example: sha256:cb8a924afdf0229ef7515d9e5b3024e23b3eb03ddbba287f4a19c6ac90b8d221)
repositorystringThe name of the repository. (example: repo-1)
size_bytesintegerThe uncompressed size of the tag in bytes (this size is calculated asynchronously so it may not be immediately available).
tagstringThe name of the tag. (example: latest)
updated_atstring (date-time)The time the tag was last updated. (example: 2020-04-09T23:54:25Z)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
registries_list_repository_tagsselectregistry_name, repository_nameper_page, pageTo 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 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_tagdeleteregistry_name, repository_name, repository_tagTo 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 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_legacyexecregistry_name, repository_nameper_page, pageTo 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 for
registry.digitalocean.com/example/my/repo, the path would be
/v2/registry/example/repositories/my%2Frepo/tags.
registry_delete_repository_tag_legacyexecregistry_name, repository_name, repository_tagTo 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 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.

NameDatatypeDescription
registry_namestringThe name of a container registry. (example: example)
repository_namestringThe name of a container registry repository. If the name contains / characters, they must be URL-encoded, e.g. %2F. (example: repo-1)
repository_tagstringThe name of a container registry repository tag. (example: 06a447a)
pageintegerWhich 'page' of paginated results to return. (example: 1)
per_pageintegerNumber of items returned per page (example: 2)

SELECT examples

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 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.

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

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 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.

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

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 for
registry.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 }}';