tags
Overview
Name | tags |
Type | Resource |
Id | digitalocean.tags.tags |
Fields
Name | Datatype | Description |
---|---|---|
name | string | The name of the tag. Tags may contain letters, numbers, colons, dashes, and underscores. There is a limit of 255 characters per tag. Note: Tag names are case stable, which means the capitalization you use when you first create a tag is canonical. When working with tags in the API, you must use the tag's canonical capitalization. For example, if you create a tag named "PROD", the URL to add that tag to a resource would be https://api.digitalocean.com/v2/tags/PROD/resources (not /v2/tags/prod/resources ).Tagged resources in the control panel will always display the canonical capitalization. For example, if you create a tag named "PROD", you can tag resources in the control panel by entering "prod". The tag will still display with its canonical capitalization, "PROD". |
resources | object | An embedded object containing key value pairs of resource type and resource statistics. It also includes a count of the total number of resources tagged with the current tag as well as a last_tagged_uri attribute set to the last resource tagged with the current tag. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | tag_id | To retrieve an individual tag, you can send a GET request to /v2/tags/$TAG_NAME . |
list | SELECT | To list all of your tags, you can send a GET request to /v2/tags . | |
create | INSERT | To create a tag you can send a POST request to /v2/tags with a name attribute. | |
delete | DELETE | tag_id | A tag can be deleted by sending a DELETE request to /v2/tags/$TAG_NAME . Deleting a tag also untags all the resources that have previously been tagged by the Tag |
_get | EXEC | tag_id | To retrieve an individual tag, you can send a GET request to /v2/tags/$TAG_NAME . |
_list | EXEC | To list all of your tags, you can send a GET request to /v2/tags . |