logging_configurations
Creates, updates, deletes, gets or lists a logging_configurations resource.
Overview
| Name | logging_configurations |
| Type | Resource |
| Id | aws.amp.logging_configurations |
Fields
The following fields are returned by SELECT queries:
- describe_logging_configuration
| Name | Datatype | Description |
|---|---|---|
created_at | string (date-time) | The date and time that the logging configuration was created. |
log_group_arn | string | The ARN of the CloudWatch log group to which the vended log data will be published. (pattern: <code>arn:aws[a-z0-9-]*:logs:[a-z0-9-]+:[0-9]{12}:log-group:[A-Za-z0-9.-_#/]{1,512}:*</code>) |
modified_at | string (date-time) | The date and time that the logging configuration was most recently changed. |
status | object | The current status of the 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_logging_configuration | select | workspace_id, region | Returns complete information about the current rules and alerting logging configuration of the workspace. These logging configurations are only for rules and alerting logs. | |
create_logging_configuration | insert | workspace_id, region, logGroupArn | The CreateLoggingConfiguration operation creates rules and alerting logging configuration for the workspace. Use this operation to set the CloudWatch log group to which the logs will be published to. These logging configurations are only for rules and alerting logs. | |
update_logging_configuration | update | workspace_id, region, logGroupArn | Updates the log group ARN or the workspace ID of the current rules and alerting logging configuration. These logging configurations are only for rules and alerting logs. | |
delete_logging_configuration | delete | workspace_id, region | clientToken | Deletes the rules and alerting logging configuration for a workspace. These logging configurations are only for rules and alerting logs. |
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 containing the logging configuration to delete. |
clientToken | string | A unique identifier that you can provide to ensure the idempotency of the request. Case-sensitive. |
SELECT examples
- describe_logging_configuration
Returns complete information about the current rules and alerting logging configuration of the workspace. These logging configurations are only for rules and alerting logs.
SELECT
created_at,
log_group_arn,
modified_at,
status,
workspace
FROM aws.amp.logging_configurations
WHERE workspace_id = '{{ workspace_id }}' -- required
AND region = '{{ region }}' -- required
;
INSERT examples
- create_logging_configuration
- Manifest
The CreateLoggingConfiguration operation creates rules and alerting logging configuration for the workspace. Use this operation to set the CloudWatch log group to which the logs will be published to. These logging configurations are only for rules and alerting logs.
INSERT INTO aws.amp.logging_configurations (
logGroupArn,
clientToken,
workspace_id,
region
)
SELECT
'{{ logGroupArn }}' /* required */,
'{{ clientToken }}',
'{{ workspace_id }}',
'{{ region }}'
RETURNING
status
;
# Description fields are for documentation purposes
- name: logging_configurations
props:
- name: workspace_id
value: "{{ workspace_id }}"
description: Required parameter for the logging_configurations resource.
- name: region
value: "{{ region }}"
description: Required parameter for the logging_configurations resource.
- name: logGroupArn
value: "{{ logGroupArn }}"
- name: clientToken
value: "{{ clientToken }}"
description: |
An identifier used to ensure the idempotency of a write request.
UPDATE examples
- update_logging_configuration
Updates the log group ARN or the workspace ID of the current rules and alerting logging configuration. These logging configurations are only for rules and alerting logs.
UPDATE aws.amp.logging_configurations
SET
logGroupArn = '{{ logGroupArn }}',
clientToken = '{{ clientToken }}'
WHERE
workspace_id = '{{ workspace_id }}' --required
AND region = '{{ region }}' --required
AND logGroupArn = '{{ logGroupArn }}' --required
RETURNING
status;
DELETE examples
- delete_logging_configuration
Deletes the rules and alerting logging configuration for a workspace. These logging configurations are only for rules and alerting logs.
DELETE FROM aws.amp.logging_configurations
WHERE workspace_id = '{{ workspace_id }}' --required
AND region = '{{ region }}' --required
AND clientToken = '{{ clientToken }}'
;