log_subscriptions
Creates, updates, deletes, gets or lists a log_subscriptions resource.
Overview
| Name | log_subscriptions |
| Type | Resource |
| Id | aws.ds.log_subscriptions |
Fields
The following fields are returned by SELECT queries:
- list_log_subscriptions
| Name | Datatype | Description |
|---|---|---|
directory_id | string | Identifier (ID) of the directory that you want to associate with the log subscription. (pattern: <code>^d-[0-9a-f]{10}$</code>) |
log_group_name | string | The name of the log group. (pattern: <code>[-._/#A-Za-z0-9]+</code>) |
subscription_created_date_time | string (date-time) | The date and time that the log subscription was created. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_log_subscriptions | select | region | Lists the active log subscriptions for the Amazon Web Services account. | |
create_log_subscription | insert | region, DirectoryId, LogGroupName | 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. | |
delete_log_subscription | delete | region | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- list_log_subscriptions
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
- create_log_subscription
- Manifest
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 }}'
;
# Description fields are for documentation purposes
- name: log_subscriptions
props:
- name: region
value: "{{ region }}"
description: Required parameter for the log_subscriptions resource.
- name: DirectoryId
value: "{{ DirectoryId }}"
description: |
Identifier of the directory to which you want to subscribe and receive real-time logs to your specified CloudWatch log group.
- name: LogGroupName
value: "{{ LogGroupName }}"
description: |
The name of the CloudWatch log group where the real-time domain controller logs are forwarded.
DELETE examples
- delete_log_subscription
Deletes the specified log subscription.
DELETE FROM aws.ds.log_subscriptions
WHERE region = '{{ region }}' --required
;