permissions_groups
Creates, updates, deletes, gets or lists a permissions_groups resource.
Overview​
| Name | permissions_groups |
| Type | Resource |
| Id | ovh.iam.permissions_groups |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | Identifier of the permissions group |
name | string | Name of the permissions group |
created_at | string (date-time) | Creation time (wire: createdAt) |
description | string | Description of the permissions group |
owner | string | Owner of the permissions group |
permissions | object | Permissions granted when using this permissions group |
updated_at | string (date-time) | Last update time (wire: updatedAt) |
urn | string | Unique resource name used in policies to include this permissions group |
Permissions group defines a re-usable set of permissions
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | Identifier of the permissions group |
name | string | Name of the permissions group |
created_at | string (date-time) | Creation time (wire: createdAt) |
description | string | Description of the permissions group |
owner | string | Owner of the permissions group |
permissions | object | Permissions granted when using this permissions group |
updated_at | string (date-time) | Last update time (wire: updatedAt) |
urn | string | Unique resource name used in policies to include this permissions group |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | permissions_group_urn | Returns the name, description and permissions of the group. | |
list | select | x_pagination_cursor, x_pagination_size | Returns the permissions groups of the account, and the platform (ovh) groups reusable in policies. | |
create | insert | description, name, permissions | Creates a reusable allow/deny action set to attach to policies via permissionsGroups. | |
update | update | permissions_group_urn, description, name, permissions | Replaces the group's name, description and permissions. | |
delete | delete | permissions_group_urn | Deletes the permissions group. Resources and policies linked to it are not affected. |
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 |
|---|---|---|
api_host | string | The OVHcloud API host. Selected by OVH_ENDPOINT (ovh-eu, ovh-ca or ovh-us; default ovh-eu). (default: api.eu.ovhcloud.com, x-stackQL-envVarSelector: {"envVar":"OVH_ENDPOINT","default":"ovh-eu","values":{"ovh-eu":"api.eu.ovhcloud.com","ovh-ca":"api.ca.ovhcloud.com","ovh-us":"api.us.ovhcloud.com"}}) |
permissions_group_urn | string | Permissions groupurn (wire: permissionsGroupURN) |
x_pagination_cursor | string | Pagination cursor (wire: X-Pagination-Cursor) |
x_pagination_size | integer | Pagination size (wire: X-Pagination-Size) |
SELECT examples​
- get
- list
Returns the name, description and permissions of the group.
SELECT
id,
name,
created_at,
description,
owner,
permissions,
updated_at,
urn
FROM ovh.iam.permissions_groups
WHERE permissions_group_urn = '{{ permissions_group_urn }}' -- required
;
Returns the permissions groups of the account, and the platform (ovh) groups reusable in policies.
SELECT
id,
name,
created_at,
description,
owner,
permissions,
updated_at,
urn
FROM ovh.iam.permissions_groups
WHERE x_pagination_cursor = '{{ x_pagination_cursor }}'
AND x_pagination_size = '{{ x_pagination_size }}'
;
INSERT examples​
- create
- Manifest
Creates a reusable allow/deny action set to attach to policies via permissionsGroups.
INSERT INTO ovh.iam.permissions_groups (
description,
name,
permissions
)
SELECT
'{{ description }}' /* required */,
'{{ name }}' /* required */,
'{{ permissions }}' /* required */
RETURNING
id,
name,
created_at,
description,
owner,
permissions,
updated_at,
urn
;
# Description fields are for documentation purposes
- name: permissions_groups
props:
- name: description
value: "{{ description }}"
description: |
Description of the permissions group
- name: name
value: "{{ name }}"
description: |
Name of the permissions group
- name: permissions
description: |
Permissions granted when using this permissions group
value:
allow:
- action: "{{ action }}"
deny:
- action: "{{ action }}"
except:
- action: "{{ action }}"
UPDATE examples​
- update
Replaces the group's name, description and permissions.
UPDATE ovh.iam.permissions_groups
SET
description = '{{ description }}',
name = '{{ name }}',
permissions = '{{ permissions }}'
WHERE
permissions_group_urn = '{{ permissions_group_urn }}' --required
AND description = '{{ description }}' --required
AND name = '{{ name }}' --required
AND permissions = '{{ permissions }}' --required
RETURNING
id,
name,
created_at,
description,
owner,
permissions,
updated_at,
urn;
DELETE examples​
- delete
Deletes the permissions group. Resources and policies linked to it are not affected.
DELETE FROM ovh.iam.permissions_groups
WHERE permissions_group_urn = '{{ permissions_group_urn }}' --required
;