query_logging_configurations
Creates, updates, deletes, gets or lists a query_logging_configurations resource.
Overview
| Name | query_logging_configurations |
| Type | Resource |
| Id | aws.amp.query_logging_configurations |
Fields
The following fields are returned by SELECT queries:
- describe_query_logging_configuration
| Name | Datatype | Description |
|---|---|---|
created_at | string (date-time) | The date and time when the query logging configuration was created. |
destinations | array | A list structure that contains a single CloudWatch Logs destination. |
modified_at | string (date-time) | The date and time when the query logging configuration was last modified. |
status | object | The current status of the query logging configuration. |
workspace | string | A workspace ID. (pattern: <code>.[0-9A-Za-z][-.0-9A-Z_a-z].*</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_query_logging_configuration | select | workspace_id, region | Retrieves the details of the query logging configuration for the specified workspace. | |
create_query_logging_configuration | insert | workspace_id, region, destinations | Creates a query logging configuration for the specified workspace. This operation enables logging of queries that exceed the specified QSP threshold. | |
update_query_logging_configuration | update | workspace_id, region, destinations | Updates the query logging configuration for the specified workspace. | |
delete_query_logging_configuration | delete | workspace_id, region | clientToken | Deletes the query logging configuration for the specified workspace. |
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 |
|---|---|---|
region | string | AWS region (default: us-east-1) |
workspace_id | string | The ID of the workspace from which to delete the query logging configuration. |
clientToken | string | (Optional) A unique, case-sensitive identifier that you can provide to ensure the idempotency of the request. |
SELECT examples
- describe_query_logging_configuration
Retrieves the details of the query logging configuration for the specified workspace.
SELECT
created_at,
destinations,
modified_at,
status,
workspace
FROM aws.amp.query_logging_configurations
WHERE workspace_id = '{{ workspace_id }}' -- required
AND region = '{{ region }}' -- required
;
INSERT examples
- create_query_logging_configuration
- Manifest
Creates a query logging configuration for the specified workspace. This operation enables logging of queries that exceed the specified QSP threshold.
INSERT INTO aws.amp.query_logging_configurations (
destinations,
clientToken,
workspace_id,
region
)
SELECT
'{{ destinations }}' /* required */,
'{{ clientToken }}',
'{{ workspace_id }}',
'{{ region }}'
RETURNING
status
;
# Description fields are for documentation purposes
- name: query_logging_configurations
props:
- name: workspace_id
value: "{{ workspace_id }}"
description: Required parameter for the query_logging_configurations resource.
- name: region
value: "{{ region }}"
description: Required parameter for the query_logging_configurations resource.
- name: destinations
description: |
A list structure that contains a single CloudWatch Logs destination.
value:
- cloudWatchLogs:
logGroupArn: "{{ logGroupArn }}"
filters:
qspThreshold: {{ qspThreshold }}
- name: clientToken
value: "{{ clientToken }}"
description: |
An identifier used to ensure the idempotency of a write request.
UPDATE examples
- update_query_logging_configuration
Updates the query logging configuration for the specified workspace.
UPDATE aws.amp.query_logging_configurations
SET
destinations = '{{ destinations }}',
clientToken = '{{ clientToken }}'
WHERE
workspace_id = '{{ workspace_id }}' --required
AND region = '{{ region }}' --required
AND destinations = '{{ destinations }}' --required
RETURNING
status;
DELETE examples
- delete_query_logging_configuration
Deletes the query logging configuration for the specified workspace.
DELETE FROM aws.amp.query_logging_configurations
WHERE workspace_id = '{{ workspace_id }}' --required
AND region = '{{ region }}' --required
AND clientToken = '{{ clientToken }}'
;