Skip to content

Resource Groups

All operations require authentication.

5 operationsv2/iam/resourceGroup
Agent setup

List resource groupsProduction

GET
/v2/iam/resourceGroup

Returns the resource groups of the account. Set details to true to expand resource information.

Query parameters

details
boolean

Add extra information about resources in output

Headers

X-Pagination-Cursor
string

Pagination cursor

X-Pagination-Size
integer

Pagination size

Response

200Response[]successful operation
createdAt
read-only
stringdate-time

Creation time

id
read-only
stringuuid

Unique identifier of the group

name
read-only
string

Name of the group

owner
read-only
string

Owner of the group

readOnly
read-only
boolean

Whether you can add or remove resources

resources
read-only
Resource[]

Resources included in the group

updatedAt
read-only
stringdate-time

Last update time

urn
read-only
string

Unique resource name used in policies

Reads your token from $OVH_TOKEN

$ curl https://api.eu.ovhcloud.com/v2/iam/resourceGroup \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ { "createdAt": "2024-01-01T12:00:00Z", "id": "00000000-0000-0000-0000-000000000000", "name": "string", "owner": "string", "readOnly": true, "resources": [ { "displayName": "string", "id": "00000000-0000-0000-0000-000000000000", "name": "string", "owner": "string", "tags": { "key": "string" }, "type": "string", "urn": "string" } ], "updatedAt": "2024-01-01T12:00:00Z", "urn": "string" }]

Get a resource groupProduction

GET
/v2/iam/resourceGroup/{groupId}

Returns the name and the resources of the group. Set details to true to expand resource information.

Path parameters

groupId
required
stringuuid

Group ID

Query parameters

details
boolean

Add extra information about resources in output

Response

200Responsesuccessful operation
createdAt
read-only
stringdate-time

Creation time

id
read-only
stringuuid

Unique identifier of the group

name
read-only
string

Name of the group

owner
read-only
string

Owner of the group

readOnly
read-only
boolean

Whether you can add or remove resources

resources
read-only
Resource[]

Resources included in the group

updatedAt
read-only
stringdate-time

Last update time

urn
read-only
string

Unique resource name used in policies

Example uses groupId = 00000000-0000-0000-0000-000000000000

$ curl https://api.eu.ovhcloud.com/v2/iam/resourceGroup/{groupId} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "createdAt": "2024-01-01T12:00:00Z", "id": "00000000-0000-0000-0000-000000000000", "name": "string", "owner": "string", "readOnly": true, "resources": [ { "displayName": "string", "id": "00000000-0000-0000-0000-000000000000", "name": "string", "owner": "string", "tags": { "key": "string" }, "type": "string", "urn": "string" } ], "updatedAt": "2024-01-01T12:00:00Z", "urn": "string"}

Create a resource groupProduction

POST
/v2/iam/resourceGroup

Creates a group of resources that policies can target as a single entity.

Request body (required)

name
required
string

Name of the group

resources
Resource[]

Resources to add in the created group

Response

200Responsesuccessful operation
createdAt
read-only
stringdate-time

Creation time

id
read-only
stringuuid

Unique identifier of the group

name
read-only
string

Name of the group

owner
read-only
string

Owner of the group

readOnly
read-only
boolean

Whether you can add or remove resources

resources
read-only
Resource[]

Resources included in the group

updatedAt
read-only
stringdate-time

Last update time

urn
read-only
string

Unique resource name used in policies

Reads your token from $OVH_TOKEN

$ curl https://api.eu.ovhcloud.com/v2/iam/resourceGroup \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "createdAt": "2024-01-01T12:00:00Z", "id": "00000000-0000-0000-0000-000000000000", "name": "string", "owner": "string", "readOnly": true, "resources": [ { "displayName": "string", "id": "00000000-0000-0000-0000-000000000000", "name": "string", "owner": "string", "tags": { "key": "string" }, "type": "string", "urn": "string" } ], "updatedAt": "2024-01-01T12:00:00Z", "urn": "string"}

Delete a resource groupProduction

DELETE
/v2/iam/resourceGroup/{groupId}

Deletes the resource group. The resources it contains are not deleted.

Path parameters

groupId
required
stringuuid

Group ID

Response

200—successful operation

Example uses groupId = 00000000-0000-0000-0000-000000000000

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

Update a resource groupProduction

PUT
/v2/iam/resourceGroup/{groupId}

Replaces the name and the list of resources of the group.

Path parameters

groupId
required
stringuuid

Group ID

Request body (required)

name
required
string

New name of the group

resources
required
Resource[]

New list of resources of the group

Response

200Responsesuccessful operation
createdAt
read-only
stringdate-time

Creation time

id
read-only
stringuuid

Unique identifier of the group

name
read-only
string

Name of the group

owner
read-only
string

Owner of the group

readOnly
read-only
boolean

Whether you can add or remove resources

resources
read-only
Resource[]

Resources included in the group

updatedAt
read-only
stringdate-time

Last update time

urn
read-only
string

Unique resource name used in policies

Example uses groupId = 00000000-0000-0000-0000-000000000000

$ curl https://api.eu.ovhcloud.com/v2/iam/resourceGroup/{groupId} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "createdAt": "2024-01-01T12:00:00Z", "id": "00000000-0000-0000-0000-000000000000", "name": "string", "owner": "string", "readOnly": true, "resources": [ { "displayName": "string", "id": "00000000-0000-0000-0000-000000000000", "name": "string", "owner": "string", "tags": { "key": "string" }, "type": "string", "urn": "string" } ], "updatedAt": "2024-01-01T12:00:00Z", "urn": "string"}