Skip to main content

archive_read_roles

Creates, updates, deletes, gets or lists an archive_read_roles resource.

Overview

Namearchive_read_roles
TypeResource
Iddatadog.logs.archive_read_roles

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe unique identifier of the role.
attributesobjectAttributes of the role.
relationshipsobjectRelationships of the role object returned by the API.
typestringRoles type. (default: roles, example: roles)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_archive_read_rolesselectarchive_id, regionReturns all read roles a given archive is restricted to.
add_read_role_to_archiveinsertarchive_id, regionAdds a read role to an archive. (Roles API)
remove_role_from_archivedeletearchive_id, regionRemoves 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.

NameDatatypeDescription
archive_idstringThe ID of the archive.
regionstring(default: datadoghq.com)

SELECT examples

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

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 }}'
;

DELETE examples

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
;