current_user_application_keys
Creates, updates, deletes, gets or lists a current_user_application_keys resource.
Overview
| Name | current_user_application_keys |
| Type | Resource |
| Id | datadog.organization.current_user_application_keys |
Fields
The following fields are returned by SELECT queries:
- get_current_user_application_key
- list_current_user_application_keys
| Name | Datatype | Description |
|---|---|---|
id | string | ID of the application key. |
attributes | object | Attributes of a full application key. |
relationships | object | Resources related to the application key. |
type | string | Application Keys resource type. (application_keys) (default: application_keys, example: application_keys) |
| Name | Datatype | Description |
|---|---|---|
id | string | ID of the application key. |
attributes | object | Attributes of a partial application key. |
relationships | object | Resources related to the application key. |
type | string | Application Keys resource type. (application_keys) (default: application_keys, example: application_keys) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_current_user_application_key | select | app_key_id | Get an application key owned by current user.<br />The key field is not returned for organizations in [One-Time Read mode](https://docs.datadoghq.com/account_management/api-app-keys/#one-time-read-mode). | |
list_current_user_application_keys | select | page[size], page[number], sort, filter, filter[created_at][start], filter[created_at][end], include | List all application keys available for current user | |
create_current_user_application_key | insert | data | Create an application key for current user | |
update_current_user_application_key | update | app_key_id, data | Edit an application key owned by current user.<br />The key field is not returned for organizations in [One-Time Read mode](https://docs.datadoghq.com/account_management/api-app-keys/#one-time-read-mode). | |
delete_current_user_application_key | delete | app_key_id | Delete an application key owned by current user |
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 |
|---|---|---|
app_key_id | string | The ID of the application key. |
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 application keys by the specified string. |
filter[created_at][end] | string | Only include application keys created on or before the specified date. |
filter[created_at][start] | string | Only include application keys created on or after the specified date. |
include | string | Resource path for related resources to include in the response. Only owned_by is supported. |
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 | Application key attribute used to sort results. Sort order is ascending by default. In order to specify a descending sort, prefix the attribute with a minus sign. |
SELECT examples
- get_current_user_application_key
- list_current_user_application_keys
Get an application key owned by current user.<br />The key field is not returned for organizations in [One-Time Read mode](https://docs.datadoghq.com/account_management/api-app-keys/#one-time-read-mode).
SELECT
id,
attributes,
relationships,
type
FROM datadog.organization.current_user_application_keys
WHERE app_key_id = '{{ app_key_id }}' -- required
;
List all application keys available for current user
SELECT
id,
attributes,
relationships,
type
FROM datadog.organization.current_user_application_keys
WHERE page[size] = '{{ page[size] }}'
AND page[number] = '{{ page[number] }}'
AND sort = '{{ sort }}'
AND filter = '{{ filter }}'
AND filter[created_at][start] = '{{ filter[created_at][start] }}'
AND filter[created_at][end] = '{{ filter[created_at][end] }}'
AND include = '{{ include }}'
;
INSERT examples
- create_current_user_application_key
- Manifest
Create an application key for current user
INSERT INTO datadog.organization.current_user_application_keys (
data
)
SELECT
'{{ data }}' /* required */
RETURNING
data,
included
;
# Description fields are for documentation purposes
- name: current_user_application_keys
props:
- name: data
description: |
Object used to create an application key.
value:
attributes:
name: "{{ name }}"
scopes:
- "{{ scopes }}"
type: "{{ type }}"
UPDATE examples
- update_current_user_application_key
Edit an application key owned by current user.<br />The key field is not returned for organizations in [One-Time Read mode](https://docs.datadoghq.com/account_management/api-app-keys/#one-time-read-mode).
UPDATE datadog.organization.current_user_application_keys
SET
data = '{{ data }}'
WHERE
app_key_id = '{{ app_key_id }}' --required
AND data = '{{ data }}' --required
RETURNING
data,
included;
DELETE examples
- delete_current_user_application_key
Delete an application key owned by current user
DELETE FROM datadog.organization.current_user_application_keys
WHERE app_key_id = '{{ app_key_id }}' --required
;