Skip to main content

logging_configurations

Creates, updates, deletes, gets or lists a logging_configurations resource.

Overview

Namelogging_configurations
TypeResource
Idaws.amp.logging_configurations

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
created_atstring (date-time)The date and time that the logging configuration was created.
log_group_arnstringThe 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_atstring (date-time)The date and time that the logging configuration was most recently changed.
statusobjectThe current status of the logging configuration.
workspacestringA workspace ID. (pattern: <code>.[0-9A-Za-z][-.0-9A-Z_a-z].*</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_logging_configurationselectworkspace_id, regionReturns 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_configurationinsertworkspace_id, region, logGroupArnThe 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_configurationupdateworkspace_id, region, logGroupArnUpdates 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_configurationdeleteworkspace_id, regionclientTokenDeletes 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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)
workspace_idstringThe ID of the workspace containing the logging configuration to delete.
clientTokenstringA unique identifier that you can provide to ensure the idempotency of the request. Case-sensitive.

SELECT examples

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

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
;

UPDATE examples

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

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 }}'
;