channels
Creates, updates, deletes, gets or lists a channels resource.
Overview
| Name | channels |
| Type | Resource |
| Id | aws.cloudtrail.channels |
Fields
The following fields are returned by SELECT queries:
- get_channel
- list_channels
| Name | Datatype | Description |
|---|---|---|
channel_arn | string | The ARN of an channel returned by a GetChannel request. (pattern: <code>^[a-zA-Z0-9._/-:]+$</code>) |
destinations | array | The destinations for the channel. For channels created for integrations, the destinations are the event data stores that log events arriving through the channel. For service-linked channels, the destination is the Amazon Web Services service that created the service-linked channel to receive events. |
ingestion_status | object | A table showing information about the most recent successful and failed attempts to ingest events. |
name | string | The name of the CloudTrail channel. For service-linked channels, the name is aws-service-channel/service-name/custom-suffix where service-name represents the name of the Amazon Web Services service that created the channel and custom-suffix represents the suffix generated by the Amazon Web Services service. (pattern: <code>^[a-zA-Z0-9._-]+$</code>) |
source | string | The source for the CloudTrail channel. (pattern: <code>.*</code>) |
source_config | object | Provides information about the advanced event selectors configured for the channel, and whether the channel applies to all Regions or a single Region. |
| Name | Datatype | Description |
|---|---|---|
channels | array | The list of channels in the account. |
next_token | string | The token to use to get the next page of results after a previous API call. (pattern: <code>.*</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_channel | select | region | Returns information about a specific channel. | |
list_channels | select | region | Lists the channels in the current account, and their source names. | |
create_channel | insert | region | Creates a channel for CloudTrail to ingest events from a partner or external source. After you create a channel, a CloudTrail Lake event data store can log events from the partner or source that you specify. | |
update_channel | update | region, Channel | Updates a channel specified by a required channel ARN or UUID. | |
delete_channel | delete | region | Deletes a channel. |
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
- get_channel
- list_channels
Returns information about a specific channel.
SELECT
channel_arn,
destinations,
ingestion_status,
name,
source,
source_config
FROM aws.cloudtrail.channels
WHERE region = '{{ region }}' -- required
;
Lists the channels in the current account, and their source names.
SELECT
channels,
next_token
FROM aws.cloudtrail.channels
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_channel
- Manifest
Creates a channel for CloudTrail to ingest events from a partner or external source. After you create a channel, a CloudTrail Lake event data store can log events from the partner or source that you specify.
INSERT INTO aws.cloudtrail.channels (
Name,
Source,
Destinations,
Tags,
region
)
SELECT
'{{ Name }}',
'{{ Source }}',
'{{ Destinations }}',
'{{ Tags }}',
'{{ region }}'
RETURNING
channel_arn,
destinations,
name,
source,
tags
;
# Description fields are for documentation purposes
- name: channels
props:
- name: region
value: "{{ region }}"
description: Required parameter for the channels resource.
- name: Name
value: "{{ Name }}"
description: |
The name of the channel.
- name: Source
value: "{{ Source }}"
description: |
The name of the partner or external event source. You cannot change this name after you create the channel. A maximum of one channel is allowed per source. A source can be either Custom for all valid non-Amazon Web Services events, or the name of a partner event source. For information about the source names for available partners, see Additional information about integration partners in the CloudTrail User Guide.
- name: Destinations
description: |
One or more event data stores to which events arriving through a channel will be logged.
value:
- Type: "{{ Type }}"
Location: "{{ Location }}"
- name: Tags
description: |
A list of tags.
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
UPDATE examples
- update_channel
Updates a channel specified by a required channel ARN or UUID.
UPDATE aws.cloudtrail.channels
SET
Channel = '{{ Channel }}',
Destinations = '{{ Destinations }}',
Name = '{{ Name }}'
WHERE
region = '{{ region }}' --required
AND Channel = '{{ Channel }}' --required
RETURNING
channel_arn,
destinations,
name,
source;
DELETE examples
- delete_channel
Deletes a channel.
DELETE FROM aws.cloudtrail.channels
WHERE region = '{{ region }}' --required
;