consents
Creates, updates, deletes, gets or lists a consents resource.
Overview
| Name | consents |
| Type | Resource |
| Id | sumologic.oauth.consents |
Fields
The following fields are returned by SELECT queries:
- list
A list of OAuth consents.
| Name | Datatype | Description |
|---|---|---|
id | string | Unique identifier for the consent. (example: 0000000006743FDE) |
client_id | string | The ID of the registered client that was used in granting consent. (example: zVplCFHcpTDwtktBIQmFI2K6s9HEo4HAtcQD1f1M5eQ) (wire: clientId) |
client_name | string | The name of the registered client that was used in granting consent. (example: My OAuth App) (wire: clientName) |
authorized_at | string (date-time) | Timestamp when the consent was authorized in UTC in RFC3339 format. (example: 2018-10-16T09:10:00.000Z) (wire: authorizedAt) |
authorized_user | string | Identifier of the user who authorized the consent. (example: 0000000006743FDD) (wire: authorizedUser) |
last_used_at | string (date-time) | Timestamp when the consent was last used to grant an access token in UTC in RFC3339 format. Null if never used. (example: 2018-10-16T09:10:00.000Z) (wire: lastUsedAt) |
scopes | array | The scopes that were granted in the consent. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | region | limit, token, authorized_user, client_id | Get a list of OAuth consents within the organization. Administrators can list all consents, while others can only list consents that they have authorized. |
delete | delete | consent_id, region | Deletes the OAuth consent with the given Id. |
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 |
|---|---|---|
consent_id | string | The ID of the OAuth consent to delete. (wire: consentId) |
region | string | Sumo Logic deployment (au, ca, ch, de, eu, fed, in, jp, kr, us1, us2). Resolved from the SUMOLOGIC_ENVIRONMENT environment variable when it is set (x-stackQL-envVar, the same variable the Terraform provider reads); otherwise defaults to us2. A WHERE region = '...' value always takes precedence. (enum: [au, ca, ch, de, eu, fed, in, jp, kr, us1, us2], default: us2, x-stackQL-envVar: SUMOLOGIC_ENVIRONMENT) |
authorized_user | string | Filter consents by the identifier of the user who authorized the consent. (wire: authorizedUser) |
client_id | string | Filter consents by the clientId of a registered OAuth client. (wire: clientId) |
limit | integer (int32) | Limit the number of consents returned in the response. |
token | string | Continuation token to get the next page of results. |
SELECT examples
- list
Get a list of OAuth consents within the organization. Administrators can list all consents, while others can only list consents that they have authorized.
SELECT
id,
client_id,
client_name,
authorized_at,
authorized_user,
last_used_at,
scopes
FROM sumologic.oauth.consents
WHERE region = '{{ region }}' -- required unless SUMOLOGIC_ENVIRONMENT is set
AND limit = '{{ limit }}'
AND token = '{{ token }}'
AND authorized_user = '{{ authorized_user }}'
AND client_id = '{{ client_id }}'
;
DELETE examples
- delete
Deletes the OAuth consent with the given Id.
DELETE FROM sumologic.oauth.consents
WHERE consent_id = '{{ consent_id }}' --required
AND region = '{{ region }}' --required unless SUMOLOGIC_ENVIRONMENT is set
;