:doc:`CloudTrail <../../cloudtrail>` / Client / create_channel

**************
create_channel
**************



.. py:method:: 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 <https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateChannel>`_  


  **Request Syntax**
  ::

    response = client.create_channel(
        Name='string',
        Source='string',
        Destinations=[
            {
                'Type': 'EVENT_DATA_STORE'|'AWS_SERVICE',
                'Location': 'string'
            },
        ],
        Tags=[
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    )
    
  :type Name: string
  :param Name: **[REQUIRED]** 

    The name of the channel.

    

  
  :type Source: string
  :param Source: **[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 <https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store-integration.html#cloudtrail-lake-partner-information>`__ in the CloudTrail User Guide.

    

  
  :type Destinations: list
  :param Destinations: **[REQUIRED]** 

    One or more event data stores to which events arriving through a channel will be logged.

    

  
    - *(dict) --* 

      Contains information about the destination receiving events.

      

    
      - **Type** *(string) --* **[REQUIRED]** 

        The type of destination for events arriving from a channel. For channels used for a CloudTrail Lake integration, the value is ``EVENT_DATA_STORE``. For service-linked channels, the value is ``AWS_SERVICE``.

        

      
      - **Location** *(string) --* **[REQUIRED]** 

        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.

        

      
    

  :type Tags: list
  :param Tags: 

    A list of tags.

    

  
    - *(dict) --* 

      A custom key-value pair associated with a resource such as a CloudTrail trail, event data store, dashboard, or channel.

      

    
      - **Key** *(string) --* **[REQUIRED]** 

        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.

        

      
    

  
  :rtype: dict
  :returns: 
    
    **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 ``EVENT_DATA_STORE``. 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, dashboard, 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**
  
  *   :py:class:`CloudTrail.Client.exceptions.ChannelMaxLimitExceededException`

  
  *   :py:class:`CloudTrail.Client.exceptions.InvalidSourceException`

  
  *   :py:class:`CloudTrail.Client.exceptions.ChannelAlreadyExistsException`

  
  *   :py:class:`CloudTrail.Client.exceptions.EventDataStoreARNInvalidException`

  
  *   :py:class:`CloudTrail.Client.exceptions.EventDataStoreNotFoundException`

  
  *   :py:class:`CloudTrail.Client.exceptions.InvalidEventDataStoreCategoryException`

  
  *   :py:class:`CloudTrail.Client.exceptions.InactiveEventDataStoreException`

  
  *   :py:class:`CloudTrail.Client.exceptions.InvalidParameterException`

  
  *   :py:class:`CloudTrail.Client.exceptions.InvalidTagParameterException`

  
  *   :py:class:`CloudTrail.Client.exceptions.TagsLimitExceededException`

  
  *   :py:class:`CloudTrail.Client.exceptions.OperationNotPermittedException`

  
  *   :py:class:`CloudTrail.Client.exceptions.UnsupportedOperationException`

  