oauth2_client_scopes_restrictions
Creates, updates, deletes, gets or lists an oauth2_client_scopes_restrictions resource.
Overview
| Name | oauth2_client_scopes_restrictions |
| Type | Resource |
| Id | datadog.organization.oauth2_client_scopes_restrictions |
Fields
The following fields are returned by SELECT queries:
- get_scopes_restriction
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | UUID of the OAuth2 client this restriction applies to. (example: fafa8e1c-36a5-11f0-a83d-da7ad0900001) |
attributes | object | Attributes of an OAuth2 client scopes restriction. |
type | string | JSON:API resource type for an OAuth2 client scopes restriction. (scopes_restriction) (default: scopes_restriction, example: scopes_restriction) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_scopes_restriction | select | client_uuid | Get the scopes restriction configured for the OAuth2 client. | |
upsert_scopes_restriction | insert | client_uuid, data | Create or update the scopes restriction configured for the OAuth2 client. | |
delete_scopes_restriction | delete | client_uuid | Delete the scopes restriction configured for the OAuth2 client. |
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 |
|---|---|---|
client_uuid | string (uuid) | UUID of the OAuth2 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. |
SELECT examples
- get_scopes_restriction
Get the scopes restriction configured for the OAuth2 client.
SELECT
id,
attributes,
type
FROM datadog.organization.oauth2_client_scopes_restrictions
WHERE client_uuid = '{{ client_uuid }}' -- required
;
INSERT examples
- upsert_scopes_restriction
- Manifest
Create or update the scopes restriction configured for the OAuth2 client.
INSERT INTO datadog.organization.oauth2_client_scopes_restrictions (
data,
client_uuid
)
SELECT
'{{ data }}' /* required */,
'{{ client_uuid }}'
RETURNING
data
;
# Description fields are for documentation purposes
- name: oauth2_client_scopes_restrictions
props:
- name: client_uuid
value: "{{ client_uuid }}"
description: Required parameter for the oauth2_client_scopes_restrictions resource.
- name: data
description: |
Data object of an upsert OAuth2 scopes restriction request.
value:
attributes:
oidc_scopes:
- "{{ oidc_scopes }}"
permission_scopes:
- "{{ permission_scopes }}"
type: "{{ type }}"
DELETE examples
- delete_scopes_restriction
Delete the scopes restriction configured for the OAuth2 client.
DELETE FROM datadog.organization.oauth2_client_scopes_restrictions
WHERE client_uuid = '{{ client_uuid }}' --required
;