archive_read_roles
Creates, updates, deletes, gets or lists an archive_read_roles resource.
Overview
| Name | archive_read_roles |
| Type | Resource |
| Id | datadog.logs.archive_read_roles |
Fields
The following fields are returned by SELECT queries:
- list_archive_read_roles
| Name | Datatype | Description |
|---|---|---|
id | string | The unique identifier of the role. |
attributes | object | Attributes of the role. |
relationships | object | Relationships of the role object returned by the API. |
type | string | Roles type. (roles) (default: roles, example: roles) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_archive_read_roles | select | archive_id | Returns all read roles a given archive is restricted to. | |
add_read_role_to_archive | insert | archive_id | Adds a read role to an archive. ([Roles API](https://docs.datadoghq.com/api/v2/roles/)) | |
remove_role_from_archive | delete | archive_id | Removes a role from an archive. ([Roles API](https://docs.datadoghq.com/api/v2/roles/)) |
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 |
|---|---|---|
archive_id | string | The ID of the archive. |
site | string | The Datadog site (region) for your organization, for example datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, ap1.datadoghq.com, ap2.datadoghq.com, datadoghq.eu, ddog-gov.com. Resolved from the DD_SITE environment variable when set. Optional: defaults to datadoghq.com, or the value of the DD_SITE environment variable when set; a WHERE value overrides both. |
SELECT examples
- list_archive_read_roles
Returns all read roles a given archive is restricted to.
SELECT
id,
attributes,
relationships,
type
FROM datadog.logs.archive_read_roles
WHERE archive_id = '{{ archive_id }}' -- required
;
INSERT examples
- add_read_role_to_archive
- Manifest
Adds a read role to an archive. (Roles API)
INSERT INTO datadog.logs.archive_read_roles (
data,
archive_id
)
SELECT
'{{ data }}',
'{{ archive_id }}'
;
# Description fields are for documentation purposes
- name: archive_read_roles
props:
- name: archive_id
value: "{{ archive_id }}"
description: Required parameter for the archive_read_roles resource.
- name: data
description: |
Relationship to role object.
value:
id: "{{ id }}"
type: "{{ type }}"
DELETE examples
- remove_role_from_archive
Removes a role from an archive. (Roles API)
DELETE FROM datadog.logs.archive_read_roles
WHERE archive_id = '{{ archive_id }}' --required
;