AWS::CloudTrail::Channel
Contains information about a returned CloudTrail channel.
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::CloudTrail::Channel", "Properties" : { "Destinations" :
[ Destination, ... ]
, "Name" :String
, "Source" :String
, "Tags" :[ Tag, ... ]
} }
YAML
Type: AWS::CloudTrail::Channel Properties: Destinations:
- Destination
Name:String
Source:String
Tags:- Tag
Properties
Destinations
-
One or more event data stores to which events arriving through a channel will be logged.
Required: No
Type: Array of Destination
Maximum:
10
Update requires: No interruption
Name
-
The name of the channel.
Required: No
Type: String
Pattern:
(^[a-zA-Z0-9._\-]+$)
Minimum:
3
Maximum:
128
Update requires: No interruption
Source
-
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-AWS 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: No
Type: String
Pattern:
(.*)
Minimum:
1
Maximum:
256
Update requires: Replacement
-
A list of tags.
Required: No
Type: Array of Tag
Maximum:
200
Update requires: No interruption
Return values
Ref
When the logical ID of this resource is provided to the Ref intrinsic function,
Ref
returns the resource name.
Fn::GetAtt
The Fn::GetAtt
intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.
For more information about using the Fn::GetAtt
intrinsic function, see Fn::GetAtt
.
ChannelArn
-
When you pass the logical ID of this resource to the intrinsic
Ref
function,Ref
returns the ARN of the CloudTrail channel, such asarn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890
.
Examples
Example
The following example creates a channel for a CloudTrail Lake integration with an event source outside of AWS. For information about CloudTrail Lake integrations, see Create an integration with an event source outside of AWS in the AWS CloudTrail User Guide.
JSON
{ "Parameters": { "Name" : String, "EventDataStoreArn" : String, "Source" : String }, "Resources": { "myChannel": { "Type": "AWS::CloudTrail::Channel", "Properties": { "Name": { "Ref": "Name" }, "Source": { "Ref": "Source" }, "Destinations": [ { "Type": "EVENT_DATA_STORE", "Location": "{ "Ref": "arn:aws:cloudtrail:us-east-1:12345678910:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE" } } ], "Tags": [ { "Key": "TagKeyIntTest", "Value": "TagValueIntTest" }, { "Key": "TagKeyIntTest2", "Value": "TagValueIntTest2" } ] } } }, "Outputs": { "myChannelArn": { "Description": "The channel ARN", "Value": { "Fn::GetAtt": [ "myChannel", "arn:aws:cloudtrail:us-east-1:01234567890:channel/EXAMPLE8-0558-4f7e-a06a-43969EXAMPLE" ] } } } }
YAML
Parameters: Name: Type: String EventDataStoreArn: Type: String Source: Type: String Resources: myChannel: Type: AWS::CloudTrail::Channel Properties: Name: !Ref Name Source: !Ref Source Destinations: - Type: "EVENT_DATA_STORE" Location: !Ref arn:aws:cloudtrail:us-east-1:12345678910:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE Tags: - Key: "TagKeyIntTest" Value: "TagValueIntTest" - Key: "TagKeyIntTest2" Value: "TagValueIntTest2" Outputs: myChannelArn: Description: The channel ARN Value: 'Fn::GetAtt': - myChannel - arn:aws:cloudtrail:us-east-1:01234567890:channel/EXAMPLE8-0558-4f7e-a06a-43969EXAMPLE