:doc:`WorkMail <../../workmail>` / Client / start_mailbox_export_job

************************
start_mailbox_export_job
************************



.. py:method:: WorkMail.Client.start_mailbox_export_job(**kwargs)

  

  Starts a mailbox export job to export MIME-format email messages and calendar items from the specified mailbox to the specified Amazon Simple Storage Service (Amazon S3) bucket. For more information, see `Exporting mailbox content <https://docs.aws.amazon.com/workmail/latest/adminguide/mail-export.html>`__ in the *WorkMail Administrator Guide*.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/workmail-2017-10-01/StartMailboxExportJob>`_  


  **Request Syntax**
  ::

    response = client.start_mailbox_export_job(
        ClientToken='string',
        OrganizationId='string',
        EntityId='string',
        Description='string',
        RoleArn='string',
        KmsKeyArn='string',
        S3BucketName='string',
        S3Prefix='string'
    )
    
  :type ClientToken: string
  :param ClientToken: **[REQUIRED]** 

    The idempotency token for the client request.

    This field is autopopulated if not provided.

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

    The identifier associated with the organization.

    

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

    The identifier of the user or resource associated with the mailbox.

     

    The identifier can accept *UserId or ResourceId*, *Username or Resourcename*, or *email*. The following identity formats are available:

     

    
    * Entity ID: 12345678-1234-1234-1234-123456789012, r-0123456789a0123456789b0123456789 , or S-1-1-12-1234567890-123456789-123456789-1234
     
    * Email address: entity@domain.tld
     
    * Entity name: entity
    

    

  
  :type Description: string
  :param Description: 

    The mailbox export job description.

    

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

    The ARN of the AWS Identity and Access Management (IAM) role that grants write permission to the S3 bucket.

    

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

    The Amazon Resource Name (ARN) of the symmetric AWS Key Management Service (AWS KMS) key that encrypts the exported mailbox content.

    

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

    The name of the S3 bucket.

    

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

    The S3 bucket prefix.

    

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

    
    ::

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

    

    - *(dict) --* 
      

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

        The job ID.

        
  
  **Exceptions**
  
  *   :py:class:`WorkMail.Client.exceptions.InvalidParameterException`

  
  *   :py:class:`WorkMail.Client.exceptions.OrganizationNotFoundException`

  
  *   :py:class:`WorkMail.Client.exceptions.OrganizationStateException`

  
  *   :py:class:`WorkMail.Client.exceptions.EntityNotFoundException`

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

  