:doc:`ElasticsearchService <../../es>` / Client / create_package

**************
create_package
**************



.. py:method:: ElasticsearchService.Client.create_package(**kwargs)

  

  Create a package for use with Amazon ES domains.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01/CreatePackage>`_  


  **Request Syntax**
  ::

    response = client.create_package(
        PackageName='string',
        PackageType='TXT-DICTIONARY',
        PackageDescription='string',
        PackageSource={
            'S3BucketName': 'string',
            'S3Key': 'string'
        }
    )
    
  :type PackageName: string
  :param PackageName: **[REQUIRED]** 

    Unique identifier for the package.

    

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

    Type of package. Currently supports only TXT-DICTIONARY.

    

  
  :type PackageDescription: string
  :param PackageDescription: 

    Description of the package.

    

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

    The customer S3 location ``PackageSource`` for importing the package.

    

  
    - **S3BucketName** *(string) --* 

      Name of the bucket containing the package.

      

    
    - **S3Key** *(string) --* 

      Key (file name) of the package.

      

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

    
    ::

      {
          'PackageDetails': {
              'PackageID': 'string',
              'PackageName': 'string',
              'PackageType': 'TXT-DICTIONARY',
              'PackageDescription': 'string',
              'PackageStatus': 'COPYING'|'COPY_FAILED'|'VALIDATING'|'VALIDATION_FAILED'|'AVAILABLE'|'DELETING'|'DELETED'|'DELETE_FAILED',
              'CreatedAt': datetime(2015, 1, 1),
              'LastUpdatedAt': datetime(2015, 1, 1),
              'AvailablePackageVersion': 'string',
              'ErrorDetails': {
                  'ErrorType': 'string',
                  'ErrorMessage': 'string'
              }
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 

      Container for response returned by ``CreatePackage`` operation.

      
      

      - **PackageDetails** *(dict) --* 

        Information about the package ``PackageDetails``.

        
        

        - **PackageID** *(string) --* 

          Internal ID of the package.

          
        

        - **PackageName** *(string) --* 

          User specified name of the package.

          
        

        - **PackageType** *(string) --* 

          Currently supports only TXT-DICTIONARY.

          
        

        - **PackageDescription** *(string) --* 

          User-specified description of the package.

          
        

        - **PackageStatus** *(string) --* 

          Current state of the package. Values are COPYING/COPY_FAILED/AVAILABLE/DELETING/DELETE_FAILED

          
        

        - **CreatedAt** *(datetime) --* 

          Timestamp which tells creation date of the package.

          
        

        - **LastUpdatedAt** *(datetime) --* 
        

        - **AvailablePackageVersion** *(string) --* 
        

        - **ErrorDetails** *(dict) --* 

          Additional information if the package is in an error state. Null otherwise.

          
          

          - **ErrorType** *(string) --* 
          

          - **ErrorMessage** *(string) --* 
      
    
  
  **Exceptions**
  
  *   :py:class:`ElasticsearchService.Client.exceptions.BaseException`

  
  *   :py:class:`ElasticsearchService.Client.exceptions.InternalException`

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

  
  *   :py:class:`ElasticsearchService.Client.exceptions.InvalidTypeException`

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

  
  *   :py:class:`ElasticsearchService.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`ElasticsearchService.Client.exceptions.ValidationException`

  