Skip to main content

log_subscriptions

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

Overview

Namelog_subscriptions
TypeResource
Idaws.ds.log_subscriptions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
directory_idstringIdentifier (ID) of the directory that you want to associate with the log subscription. (pattern: <code>^d-[0-9a-f]{10}$</code>)
log_group_namestringThe name of the log group. (pattern: <code>[-._/#A-Za-z0-9]+</code>)
subscription_created_date_timestring (date-time)The date and time that the log subscription was created.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_log_subscriptionsselectregionLists the active log subscriptions for the Amazon Web Services account.
create_log_subscriptioninsertregion, DirectoryId, LogGroupNameCreates a subscription to forward real-time Directory Service domain controller security logs to the specified Amazon CloudWatch log group in your Amazon Web Services account.
delete_log_subscriptiondeleteregionDeletes the specified log subscription.

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)

SELECT examples

Lists the active log subscriptions for the Amazon Web Services account.

SELECT
directory_id,
log_group_name,
subscription_created_date_time
FROM aws.ds.log_subscriptions
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a subscription to forward real-time Directory Service domain controller security logs to the specified Amazon CloudWatch log group in your Amazon Web Services account.

INSERT INTO aws.ds.log_subscriptions (
DirectoryId,
LogGroupName,
region
)
SELECT
'{{ DirectoryId }}' /* required */,
'{{ LogGroupName }}' /* required */,
'{{ region }}'
;

DELETE examples

Deletes the specified log subscription.

DELETE FROM aws.ds.log_subscriptions
WHERE region = '{{ region }}' --required
;