Skip to content

Tags

All operations require authentication.

3 operationsv2/iam/resource
Agent setup

Add a resource tagProduction

POST
/v2/iam/resource/{resourceURN}/tag

Adds a tag, made of a key and a value, to the resource. Requires the $resourceType:apiovh:iam/resource/tag/add action on the resource type.

Path parameters

resourceURN
required
string

ResourceURN

Request body (required)

key
required
string

Resource tag key. It must comply with ^[a-zA-Z0-9_.:/=+@-]{1,128}\z.

value
required
string

Resource tag value. It must comply with ^[a-zA-Z0-9_.:/=+@-]{0,256}\z.

Response

200—successful operation

Example uses resourceURN = string

$ curl https://api.eu.ovhcloud.com/v2/iam/resource/{resourceURN}/tag \
  -H "authorization: Bearer $OVH_TOKEN"

Delete a resource tagProduction

DELETE
/v2/iam/resource/{resourceURN}/tag/{key}

Deletes the tag identified by its key. Computed ovh: tags cannot be deleted. Requires the $resourceType:apiovh:iam/resource/tag/remove action on the resource type.

Path parameters

key
required
string

Key

resourceURN
required
string

ResourceURN

Response

200—successful operation

Example uses key = string, resourceURN = string

$ curl https://api.eu.ovhcloud.com/v2/iam/resource/{resourceURN}/tag/{key} \
  -H "authorization: Bearer $OVH_TOKEN"

Update a resourceProduction

PUT
/v2/iam/resource/{resourceURN}

Updates the tags of the resource. Adding a tag requires the $resourceType:apiovh:iam/resource/tag/add action and removing one requires $resourceType:apiovh:iam/resource/tag/remove, with $resourceType the type of the resource.

Path parameters

resourceURN
required
string

ResourceURN

Request body (required)

displayName
read-only
string

Resource display name

id
read-only
stringuuid

Identifier of the resource

name
read-only
string

Resource name

owner
read-only
string

Resource owner

tags
object

Resource tags. Tags that were internally computed are prefixed with ovh:

type
read-only
string

Resource type. All types can be retrieved at /reference/resource/type.

urn
read-only
string

Unique resource name used in policies

Response

200Resourcesuccessful operation
displayName
read-only
string

Resource display name

id
read-only
stringuuid

Identifier of the resource

name
read-only
string

Resource name

owner
read-only
string

Resource owner

tags
object

Resource tags. Tags that were internally computed are prefixed with ovh:

type
read-only
string

Resource type. All types can be retrieved at /reference/resource/type.

urn
read-only
string

Unique resource name used in policies

Example uses resourceURN = string

$ curl https://api.eu.ovhcloud.com/v2/iam/resource/{resourceURN} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "displayName": "string", "id": "00000000-0000-0000-0000-000000000000", "name": "string", "owner": "string", "tags": { "key": "string" }, "type": "string", "urn": "string"}