org_authorized_clients
Creates, updates, deletes, gets or lists an org_authorized_clients resource.
Overview
| Name | org_authorized_clients |
| Type | Resource |
| Id | datadog.organization.org_authorized_clients |
Fields
The following fields are returned by SELECT queries:
- get_org_authorized_client
- list_org_authorized_clients
| Name | Datatype | Description |
|---|---|---|
id | string | The unique identifier of the org authorized client. (example: 00000000-0000-0000-0000-000000000001) |
attributes | object | Attributes of an org authorized client. |
relationships | object | Relationships for an org authorized client. |
type | string | The resource type for org authorized clients. (org_authorized_clients) (example: org_authorized_clients) |
| Name | Datatype | Description |
|---|---|---|
id | string | The unique identifier of the org authorized client. (example: 00000000-0000-0000-0000-000000000001) |
attributes | object | Attributes of an org authorized client. |
relationships | object | Relationships for an org authorized client. |
type | string | The resource type for org authorized clients. (org_authorized_clients) (example: org_authorized_clients) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_org_authorized_client | select | org_authorized_client_id | include, filter[user_authorized_clients][disabled], filter[user_authorized_clients][user][disabled] | Get a single OAuth2 client authorized for the current organization. |
list_org_authorized_clients | select | page[size], page[number], sort, filter, filter[oauth2_client][name], filter[disabled], include | Get a list of all OAuth2 clients authorized for the current organization. | |
update_org_authorized_client | update | org_authorized_client_id, data | Enable or disable an OAuth2 client authorization for the current organization. | |
delete_org_authorized_client | delete | org_authorized_client_id | Disable an OAuth2 client authorization for the current organization, revoking access for all users. |
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 |
|---|---|---|
org_authorized_client_id | string | The ID of the org authorized client. |
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. |
filter | string | Filter results by client name, app title, or app description. |
filter[disabled] | string | Filter results by the org-level disabled status. |
filter[oauth2_client][name] | string | Filter results by the OAuth2 client name. |
filter[user_authorized_clients][disabled] | string | Filter included user authorized clients by disabled status. |
filter[user_authorized_clients][user][disabled] | string | Filter included user authorized clients by user disabled status. |
include | string | Comma-separated list of related resources to include. Options: oauth2_client, oauth2_client.app, user_authorized_clients.user. |
page[number] | integer (int64) | Specific page number to return. |
page[size] | integer (int64) | Number of items to return per page. The maximum allowed value is 100. |
sort | string | Field to sort results by. Options include oauth2_client.name. |
SELECT examples
- get_org_authorized_client
- list_org_authorized_clients
Get a single OAuth2 client authorized for the current organization.
SELECT
id,
attributes,
relationships,
type
FROM datadog.organization.org_authorized_clients
WHERE org_authorized_client_id = '{{ org_authorized_client_id }}' -- required
AND include = '{{ include }}'
AND filter[user_authorized_clients][disabled] = '{{ filter[user_authorized_clients][disabled] }}'
AND filter[user_authorized_clients][user][disabled] = '{{ filter[user_authorized_clients][user][disabled] }}'
;
Get a list of all OAuth2 clients authorized for the current organization.
SELECT
id,
attributes,
relationships,
type
FROM datadog.organization.org_authorized_clients
WHERE page[size] = '{{ page[size] }}'
AND page[number] = '{{ page[number] }}'
AND sort = '{{ sort }}'
AND filter = '{{ filter }}'
AND filter[oauth2_client][name] = '{{ filter[oauth2_client][name] }}'
AND filter[disabled] = '{{ filter[disabled] }}'
AND include = '{{ include }}'
;
UPDATE examples
- update_org_authorized_client
Enable or disable an OAuth2 client authorization for the current organization.
UPDATE datadog.organization.org_authorized_clients
SET
data = '{{ data }}'
WHERE
org_authorized_client_id = '{{ org_authorized_client_id }}' --required
AND data = '{{ data }}' --required
RETURNING
data;
DELETE examples
- delete_org_authorized_client
Disable an OAuth2 client authorization for the current organization, revoking access for all users.
DELETE FROM datadog.organization.org_authorized_clients
WHERE org_authorized_client_id = '{{ org_authorized_client_id }}' --required
;