:doc:`SESV2 <../../sesv2>` / Client / create_import_job

*****************
create_import_job
*****************



.. py:method:: SESV2.Client.create_import_job(**kwargs)

  

  Creates an import job for a data destination.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/sesv2-2019-09-27/CreateImportJob>`_  


  **Request Syntax**
  ::

    response = client.create_import_job(
        ImportDestination={
            'SuppressionListDestination': {
                'SuppressionListImportAction': 'DELETE'|'PUT'
            },
            'ContactListDestination': {
                'ContactListName': 'string',
                'ContactListImportAction': 'DELETE'|'PUT'
            }
        },
        ImportDataSource={
            'S3Url': 'string',
            'DataFormat': 'CSV'|'JSON'
        }
    )
    
  :type ImportDestination: dict
  :param ImportDestination: **[REQUIRED]** 

    The destination for the import job.

    

  
    - **SuppressionListDestination** *(dict) --* 

      An object that contains the action of the import job towards suppression list.

      

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

        The type of action to perform on the address. The following are possible values:

         

        
        * PUT: add the addresses to the suppression list. If the record already exists, it will override it with the new value.
         
        * DELETE: remove the addresses from the suppression list.
        

        

      
    
    - **ContactListDestination** *(dict) --* 

      An object that contains the action of the import job towards a contact list.

      

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

        The name of the contact list.

        

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

        >The type of action to perform on the addresses. The following are the possible values:

         

        
        * PUT: add the addresses to the contact list. If the record already exists, it will override it with the new value.
         
        * DELETE: remove the addresses from the contact list.
        

        

      
    
  
  :type ImportDataSource: dict
  :param ImportDataSource: **[REQUIRED]** 

    The data source for the import job.

    

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

      An Amazon S3 URL in the format s3://*<bucket_name>*/*<object>*.

      

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

      The data format of the import job's data source.

      

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

    
    ::

      {
          'JobId': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 

      An HTTP 200 response if the request succeeds, or an error message if the request fails.

      
      

      - **JobId** *(string) --* 

        A string that represents the import job ID.

        
  
  **Exceptions**
  
  *   :py:class:`SESV2.Client.exceptions.BadRequestException`

  
  *   :py:class:`SESV2.Client.exceptions.LimitExceededException`

  
  *   :py:class:`SESV2.Client.exceptions.TooManyRequestsException`

  