Skip to main content

seat_assignments

Creates, updates, deletes, gets or lists a seat_assignments resource.

Overview

Nameseat_assignments
TypeResource
Iddatadog.organization.seat_assignments

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe ID of the seat user. (example: 00000000-0000-0000-0000-000000000000)
attributesobjectThe attributes of the seat user.
typestringSeat users resource type. (seat-users) (default: seat-users, example: seat-users)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_seats_usersselectproduct_codepage[limit], page[cursor]Get the list of users assigned seats for a product code.
assign_seats_userinsertAssign seats to users for a product code.
unassign_seats_userdeleteUnassign seats from users for a product code.

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
product_codestringThe product code for which to retrieve seat users.
sitestringThe 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.
page[cursor]stringCursor for pagination.
page[limit]integer (int64)Maximum number of results to return.

SELECT examples

Get the list of users assigned seats for a product code.

SELECT
id,
attributes,
type
FROM datadog.organization.seat_assignments
WHERE product_code = '{{ product_code }}' -- required
AND page[limit] = '{{ page[limit] }}'
AND page[cursor] = '{{ page[cursor] }}'
;

INSERT examples

Assign seats to users for a product code.

INSERT INTO datadog.organization.seat_assignments (
data
)
SELECT
'{{ data }}'
RETURNING
data
;

DELETE examples

Unassign seats from users for a product code.

DELETE FROM datadog.organization.seat_assignments
;