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. (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,region | Returns all read roles a given archive is restricted to. | |
| add_read_role_to_archive | insert | archive_id,region | Adds a read role to an archive. (Roles API) | |
| remove_role_from_archive | delete | archive_id,region | Removes a role from an archive. (Roles API) | 
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. | 
| region | string | (default: datadoghq.com) | 
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
AND region = '{{ region }}' -- 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__data,
archive_id,
region
)
SELECT 
'{{ data }}',
'{{ archive_id }}',
'{{ region }}'
;
# Description fields are for documentation purposes
- name: archive_read_roles
  props:
    - name: archive_id
      value: string
      description: Required parameter for the archive_read_roles resource.
    - name: region
      value: string
      description: Required parameter for the archive_read_roles resource.
    - name: data
      value: object
      description: |
        Relationship to role object.
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
AND region = '{{ region }}' --required
;