Skip to main content

oauth2_client_scopes_restrictions

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

Overview

Nameoauth2_client_scopes_restrictions
TypeResource
Iddatadog.organization.oauth2_client_scopes_restrictions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstring (uuid)UUID of the OAuth2 client this restriction applies to. (example: fafa8e1c-36a5-11f0-a83d-da7ad0900001)
attributesobjectAttributes of an OAuth2 client scopes restriction.
typestringJSON: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:

NameAccessible byRequired ParamsOptional ParamsDescription
get_scopes_restrictionselectclient_uuidGet the scopes restriction configured for the OAuth2 client.
upsert_scopes_restrictioninsertclient_uuid, dataCreate or update the scopes restriction configured for the OAuth2 client.
delete_scopes_restrictiondeleteclient_uuidDelete 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.

NameDatatypeDescription
client_uuidstring (uuid)UUID of the OAuth2 client.
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.

SELECT examples

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

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
;

DELETE examples

Delete the scopes restriction configured for the OAuth2 client.

DELETE FROM datadog.organization.oauth2_client_scopes_restrictions
WHERE client_uuid = '{{ client_uuid }}' --required
;