:doc:`Personalize <../../personalize>` / Client / create_dataset_export_job

*************************
create_dataset_export_job
*************************



.. py:method:: Personalize.Client.create_dataset_export_job(**kwargs)

  

  Creates a job that exports data from your dataset to an Amazon S3 bucket. To allow Amazon Personalize to export the training data, you must specify an service-linked IAM role that gives Amazon Personalize ``PutObject`` permissions for your Amazon S3 bucket. For information, see `Exporting a dataset <https://docs.aws.amazon.com/personalize/latest/dg/export-data.html>`__ in the Amazon Personalize developer guide.

   

  **Status**

   

  A dataset export job can be in one of the following states:

   

  
  * CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED
  

   

  To get the status of the export job, call `DescribeDatasetExportJob <https://docs.aws.amazon.com/personalize/latest/dg/API_DescribeDatasetExportJob.html>`__, and specify the Amazon Resource Name (ARN) of the dataset export job. The dataset export is complete when the status shows as ACTIVE. If the status shows as CREATE FAILED, the response includes a ``failureReason`` key, which describes why the job failed.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/personalize-2018-05-22/CreateDatasetExportJob>`_  


  **Request Syntax**
  ::

    response = client.create_dataset_export_job(
        jobName='string',
        datasetArn='string',
        ingestionMode='BULK'|'PUT'|'ALL',
        roleArn='string',
        jobOutput={
            's3DataDestination': {
                'path': 'string',
                'kmsKeyArn': 'string'
            }
        },
        tags=[
            {
                'tagKey': 'string',
                'tagValue': 'string'
            },
        ]
    )
    
  :type jobName: string
  :param jobName: **[REQUIRED]** 

    The name for the dataset export job.

    

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

    The Amazon Resource Name (ARN) of the dataset that contains the data to export.

    

  
  :type ingestionMode: string
  :param ingestionMode: 

    The data to export, based on how you imported the data. You can choose to export only ``BULK`` data that you imported using a dataset import job, only ``PUT`` data that you imported incrementally (using the console, PutEvents, PutUsers and PutItems operations), or ``ALL`` for both types. The default value is ``PUT``.

    

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

    The Amazon Resource Name (ARN) of the IAM service role that has permissions to add data to your output Amazon S3 bucket.

    

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

    The path to the Amazon S3 bucket where the job's output is stored.

    

  
    - **s3DataDestination** *(dict) --* **[REQUIRED]** 

      The configuration details of an Amazon S3 input or output bucket.

      

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

        The file path of the Amazon S3 bucket.

        

      
      - **kmsKeyArn** *(string) --* 

        The Amazon Resource Name (ARN) of the Key Management Service (KMS) key that Amazon Personalize uses to encrypt or decrypt the input and output files.

        

      
    
  
  :type tags: list
  :param tags: 

    A list of `tags <https://docs.aws.amazon.com/personalize/latest/dg/tagging-resources.html>`__ to apply to the dataset export job.

    

  
    - *(dict) --* 

      The optional metadata that you apply to resources to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define. For more information see `Tagging Amazon Personalize resources <https://docs.aws.amazon.com/personalize/latest/dg/tagging-resources.html>`__.

      

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

        One part of a key-value pair that makes up a tag. A key is a general label that acts like a category for more specific tag values.

        

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

        The optional part of a key-value pair that makes up a tag. A value acts as a descriptor within a tag category (key).

        

      
    

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

    
    ::

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

    

    - *(dict) --* 
      

      - **datasetExportJobArn** *(string) --* 

        The Amazon Resource Name (ARN) of the dataset export job.

        
  
  **Exceptions**
  
  *   :py:class:`Personalize.Client.exceptions.InvalidInputException`

  
  *   :py:class:`Personalize.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`Personalize.Client.exceptions.ResourceAlreadyExistsException`

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

  
  *   :py:class:`Personalize.Client.exceptions.ResourceInUseException`

  
  *   :py:class:`Personalize.Client.exceptions.TooManyTagsException`

  