Skip to main content

channels

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

Overview

Namechannels
TypeResource
Idaws.cloudtrail.channels

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
channel_arnstringThe ARN of an channel returned by a GetChannel request. (pattern: <code>^[a-zA-Z0-9._/-:]+$</code>)
destinationsarrayThe 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_statusobjectA table showing information about the most recent successful and failed attempts to ingest events.
namestringThe 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>)
sourcestringThe source for the CloudTrail channel. (pattern: <code>.*</code>)
source_configobjectProvides information about the advanced event selectors configured for the channel, and whether the channel applies to all Regions or a single Region.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_channelselectregionReturns information about a specific channel.
list_channelsselectregionLists the channels in the current account, and their source names.
create_channelinsertregionCreates 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_channelupdateregion, ChannelUpdates a channel specified by a required channel ARN or UUID.
delete_channeldeleteregionDeletes 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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Returns information about a specific channel.

SELECT
channel_arn,
destinations,
ingestion_status,
name,
source,
source_config
FROM aws.cloudtrail.channels
WHERE region = '{{ region }}' -- required
;

INSERT examples

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
;

UPDATE examples

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

Deletes a channel.

DELETE FROM aws.cloudtrail.channels
WHERE region = '{{ region }}' --required
;