:doc:`OpenSearchService <../../opensearch>` / Client / associate_packages

******************
associate_packages
******************



.. py:method:: OpenSearchService.Client.associate_packages(**kwargs)

  

  Operation in the Amazon OpenSearch Service API for associating multiple packages with a domain simultaneously.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/opensearch-2021-01-01/AssociatePackages>`_  


  **Request Syntax**
  ::

    response = client.associate_packages(
        PackageList=[
            {
                'PackageID': 'string',
                'PrerequisitePackageIDList': [
                    'string',
                ],
                'AssociationConfiguration': {
                    'KeyStoreAccessOption': {
                        'KeyAccessRoleArn': 'string',
                        'KeyStoreAccessEnabled': True|False
                    }
                }
            },
        ],
        DomainName='string'
    )
    
  :type PackageList: list
  :param PackageList: **[REQUIRED]** 

    A list of packages and their prerequisites to be associated with a domain.

    

  
    - *(dict) --* 

      Details of a package that is associated with a domain.

      

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

        Internal ID of the package that you want to associate with a domain.

        

      
      - **PrerequisitePackageIDList** *(list) --* 

        List of package IDs that must be linked to the domain before or simultaneously with the package association.

        

      
        - *(string) --* 

        
    
      - **AssociationConfiguration** *(dict) --* 

        The configuration parameters for associating the package with a domain.

        

      
        - **KeyStoreAccessOption** *(dict) --* 

          The configuration parameters to enable accessing the key store required by the package.

          

        
          - **KeyAccessRoleArn** *(string) --* 

            Role ARN to access the KeyStore Key

            

          
          - **KeyStoreAccessEnabled** *(boolean) --* **[REQUIRED]** 

            This indicates whether Key Store access is enabled

            

          
        
      
    

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

    The name of an OpenSearch Service domain. Domain names are unique across the domains owned by an account within an Amazon Web Services Region.

    

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

    
    ::

      {
          'DomainPackageDetailsList': [
              {
                  'PackageID': 'string',
                  'PackageName': 'string',
                  'PackageType': 'TXT-DICTIONARY'|'ZIP-PLUGIN'|'PACKAGE-LICENSE'|'PACKAGE-CONFIG',
                  'LastUpdated': datetime(2015, 1, 1),
                  'DomainName': 'string',
                  'DomainPackageStatus': 'ASSOCIATING'|'ASSOCIATION_FAILED'|'ACTIVE'|'DISSOCIATING'|'DISSOCIATION_FAILED',
                  'PackageVersion': 'string',
                  'PrerequisitePackageIDList': [
                      'string',
                  ],
                  'ReferencePath': 'string',
                  'ErrorDetails': {
                      'ErrorType': 'string',
                      'ErrorMessage': 'string'
                  },
                  'AssociationConfiguration': {
                      'KeyStoreAccessOption': {
                          'KeyAccessRoleArn': 'string',
                          'KeyStoreAccessEnabled': True|False
                      }
                  }
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **DomainPackageDetailsList** *(list) --* 

        List of information about packages that are associated with a domain.

        
        

        - *(dict) --* 

          Information about a package that is associated with a domain. For more information, see `Custom packages for Amazon OpenSearch Service <https://docs.aws.amazon.com/opensearch-service/latest/developerguide/custom-packages.html>`__.

          
          

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

            Internal ID of the package.

            
          

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

            User-specified name of the package.

            
          

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

            The type of package.

            
          

          - **LastUpdated** *(datetime) --* 

            Timestamp of the most recent update to the package association status.

            
          

          - **DomainName** *(string) --* 

            Name of the domain that the package is associated with.

            
          

          - **DomainPackageStatus** *(string) --* 

            State of the association.

            
          

          - **PackageVersion** *(string) --* 

            The current version of the package.

            
          

          - **PrerequisitePackageIDList** *(list) --* 

            A list of package IDs that must be associated with the domain before or with the package can be associated.

            
            

            - *(string) --* 
        
          

          - **ReferencePath** *(string) --* 

            The relative path of the package on the OpenSearch Service cluster nodes. This is ``synonym_path`` when the package is for synonym files.

            
          

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

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

            
            

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

              The type of error that occurred.

              
            

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

              A message describing the error.

              
        
          

          - **AssociationConfiguration** *(dict) --* 

            The configuration for associating a package with an Amazon OpenSearch Service domain.

            
            

            - **KeyStoreAccessOption** *(dict) --* 

              The configuration parameters to enable accessing the key store required by the package.

              
              

              - **KeyAccessRoleArn** *(string) --* 

                Role ARN to access the KeyStore Key

                
              

              - **KeyStoreAccessEnabled** *(boolean) --* 

                This indicates whether Key Store access is enabled

                
          
        
      
    
  
  **Exceptions**
  
  *   :py:class:`OpenSearchService.Client.exceptions.BaseException`

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

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

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

  
  *   :py:class:`OpenSearchService.Client.exceptions.ConflictException`

  
  *   :py:class:`OpenSearchService.Client.exceptions.DisabledOperationException`

  