CloudTrail.Client.
create_channel
(**kwargs)¶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.
See also: AWS API Documentation
Request Syntax
response = client.create_channel(
Name='string',
Source='string',
Destinations=[
{
'Type': 'EVENT_DATA_STORE'|'AWS_SERVICE',
'Location': 'string'
},
],
Tags=[
{
'Key': 'string',
'Value': 'string'
},
]
)
[REQUIRED]
The name of the channel.
[REQUIRED]
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.
[REQUIRED]
One or more event data stores to which events arriving through a channel will be logged.
Contains information about the destination receiving events.
The type of destination for events arriving from a channel. For channels used for a CloudTrail Lake integration, the value is EventDataStore
. For service-linked channels, the value is AWS_SERVICE
.
For channels used for a CloudTrail Lake integration, the location is the ARN of an event data store that receives events from a channel. For service-linked channels, the location is the name of the Amazon Web Services service.
A list of tags.
A custom key-value pair associated with a resource such as a CloudTrail trail, event data store, or channel.
The key in a key-value pair. The key must be must be no longer than 128 Unicode characters. The key must be unique for the resource to which it applies.
The value in a key-value pair of a tag. The value must be no longer than 256 Unicode characters.
dict
Response Syntax
{
'ChannelArn': 'string',
'Name': 'string',
'Source': 'string',
'Destinations': [
{
'Type': 'EVENT_DATA_STORE'|'AWS_SERVICE',
'Location': 'string'
},
],
'Tags': [
{
'Key': 'string',
'Value': 'string'
},
]
}
Response Structure
(dict) --
ChannelArn (string) --
The Amazon Resource Name (ARN) of the new channel.
Name (string) --
The name of the new channel.
Source (string) --
The partner or external event source name.
Destinations (list) --
The event data stores that log the events arriving through the channel.
(dict) --
Contains information about the destination receiving events.
Type (string) --
The type of destination for events arriving from a channel. For channels used for a CloudTrail Lake integration, the value is EventDataStore
. For service-linked channels, the value is AWS_SERVICE
.
Location (string) --
For channels used for a CloudTrail Lake integration, the location is the ARN of an event data store that receives events from a channel. For service-linked channels, the location is the name of the Amazon Web Services service.
Tags (list) --
A list of tags.
(dict) --
A custom key-value pair associated with a resource such as a CloudTrail trail, event data store, or channel.
Key (string) --
The key in a key-value pair. The key must be must be no longer than 128 Unicode characters. The key must be unique for the resource to which it applies.
Value (string) --
The value in a key-value pair of a tag. The value must be no longer than 256 Unicode characters.
Exceptions
CloudTrail.Client.exceptions.ChannelMaxLimitExceededException
CloudTrail.Client.exceptions.InvalidSourceException
CloudTrail.Client.exceptions.ChannelAlreadyExistsException
CloudTrail.Client.exceptions.EventDataStoreARNInvalidException
CloudTrail.Client.exceptions.EventDataStoreNotFoundException
CloudTrail.Client.exceptions.InvalidEventDataStoreCategoryException
CloudTrail.Client.exceptions.InactiveEventDataStoreException
CloudTrail.Client.exceptions.InvalidParameterException
CloudTrail.Client.exceptions.InvalidTagParameterException
CloudTrail.Client.exceptions.TagsLimitExceededException
CloudTrail.Client.exceptions.OperationNotPermittedException
CloudTrail.Client.exceptions.UnsupportedOperationException