:doc:`Redshift <../../redshift>` / Client / create_integration

******************
create_integration
******************



.. py:method:: Redshift.Client.create_integration(**kwargs)

  

  Creates a zero-ETL integration or S3 event integration with Amazon Redshift.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/CreateIntegration>`_  


  **Request Syntax**
  ::

    response = client.create_integration(
        SourceArn='string',
        TargetArn='string',
        IntegrationName='string',
        KMSKeyId='string',
        TagList=[
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        AdditionalEncryptionContext={
            'string': 'string'
        },
        Description='string'
    )
    
  :type SourceArn: string
  :param SourceArn: **[REQUIRED]** 

    The Amazon Resource Name (ARN) of the database to use as the source for replication.

    

  
  :type TargetArn: string
  :param TargetArn: **[REQUIRED]** 

    The Amazon Resource Name (ARN) of the Amazon Redshift data warehouse to use as the target for replication.

    

  
  :type IntegrationName: string
  :param IntegrationName: **[REQUIRED]** 

    The name of the integration.

    

  
  :type KMSKeyId: string
  :param KMSKeyId: 

    An Key Management Service (KMS) key identifier for the key to use to encrypt the integration. If you don't specify an encryption key, the default Amazon Web Services owned key is used.

    

  
  :type TagList: list
  :param TagList: 

    A list of tags.

    

  
    - *(dict) --* 

      A tag consisting of a name/value pair for a resource.

      

    
      - **Key** *(string) --* 

        The key, or name, for the resource tag.

        

      
      - **Value** *(string) --* 

        The value for the resource tag.

        

      
    

  :type AdditionalEncryptionContext: dict
  :param AdditionalEncryptionContext: 

    An optional set of non-secret key–value pairs that contains additional contextual information about the data. For more information, see `Encryption context <https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context>`__ in the *Amazon Web Services Key Management Service Developer Guide*.

     

    You can only include this parameter if you specify the ``KMSKeyId`` parameter.

    

  
    - *(string) --* 

    
      - *(string) --* 

      


  :type Description: string
  :param Description: 

    A description of the integration.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'IntegrationArn': 'string',
          'IntegrationName': 'string',
          'SourceArn': 'string',
          'TargetArn': 'string',
          'Status': 'creating'|'active'|'modifying'|'failed'|'deleting'|'syncing'|'needs_attention',
          'Errors': [
              {
                  'ErrorCode': 'string',
                  'ErrorMessage': 'string'
              },
          ],
          'CreateTime': datetime(2015, 1, 1),
          'Description': 'string',
          'KMSKeyId': 'string',
          'AdditionalEncryptionContext': {
              'string': 'string'
          },
          'Tags': [
              {
                  'Key': 'string',
                  'Value': 'string'
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **IntegrationArn** *(string) --* 

        The Amazon Resource Name (ARN) of the integration.

        
      

      - **IntegrationName** *(string) --* 

        The name of the integration.

        
      

      - **SourceArn** *(string) --* 

        The Amazon Resource Name (ARN) of the database used as the source for replication.

        
      

      - **TargetArn** *(string) --* 

        The Amazon Resource Name (ARN) of the Amazon Redshift data warehouse to use as the target for replication.

        
      

      - **Status** *(string) --* 

        The current status of the integration.

        
      

      - **Errors** *(list) --* 

        Any errors associated with the integration.

        
        

        - *(dict) --* 

          The error of an inbound integration.

          
          

          - **ErrorCode** *(string) --* 

            The error code of an inbound integration error.

            
          

          - **ErrorMessage** *(string) --* 

            The error message of an inbound integration error.

            
      
    
      

      - **CreateTime** *(datetime) --* 

        The time (UTC) when the integration was created.

        
      

      - **Description** *(string) --* 

        The description of the integration.

        
      

      - **KMSKeyId** *(string) --* 

        The Key Management Service (KMS) key identifier for the key used to encrypt the integration.

        
      

      - **AdditionalEncryptionContext** *(dict) --* 

        The encryption context for the integration. For more information, see `Encryption context <https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context>`__ in the *Amazon Web Services Key Management Service Developer Guide*.

        
        

        - *(string) --* 
          

          - *(string) --* 
    
  
      

      - **Tags** *(list) --* 

        The list of tags associated with the integration.

        
        

        - *(dict) --* 

          A tag consisting of a name/value pair for a resource.

          
          

          - **Key** *(string) --* 

            The key, or name, for the resource tag.

            
          

          - **Value** *(string) --* 

            The value for the resource tag.

            
      
    
  
  **Exceptions**
  
  *   :py:class:`Redshift.Client.exceptions.IntegrationAlreadyExistsFault`

  
  *   :py:class:`Redshift.Client.exceptions.IntegrationConflictOperationFault`

  
  *   :py:class:`Redshift.Client.exceptions.IntegrationQuotaExceededFault`

  
  *   :py:class:`Redshift.Client.exceptions.IntegrationSourceNotFoundFault`

  
  *   :py:class:`Redshift.Client.exceptions.IntegrationTargetNotFoundFault`

  
  *   :py:class:`Redshift.Client.exceptions.UnsupportedOperationFault`

  
  *   :py:class:`Redshift.Client.exceptions.InvalidClusterStateFault`

  
  *   :py:class:`Redshift.Client.exceptions.TagLimitExceededFault`

  
  *   :py:class:`Redshift.Client.exceptions.InvalidTagFault`

  