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

***********************
get_compatible_versions
***********************



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

  

  Returns a map of OpenSearch or Elasticsearch versions and the versions you can upgrade them to.

  

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


  **Request Syntax**
  ::

    response = client.get_compatible_versions(
        DomainName='string'
    )
    
  :type DomainName: string
  :param DomainName: 

    The name of an existing domain. Provide this parameter to limit the results to a single domain.

    

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

    
    ::

      {
          'CompatibleVersions': [
              {
                  'SourceVersion': 'string',
                  'TargetVersions': [
                      'string',
                  ]
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 

      Container for the response returned by the ``GetCompatibleVersions`` operation.

      
      

      - **CompatibleVersions** *(list) --* 

        A map of OpenSearch or Elasticsearch versions and the versions you can upgrade them to.

        
        

        - *(dict) --* 

          A map of OpenSearch or Elasticsearch versions and the versions you can upgrade them to.

          
          

          - **SourceVersion** *(string) --* 

            The current version that the OpenSearch Service domain is running.

            
          

          - **TargetVersions** *(list) --* 

            The possible versions that you can upgrade the domain to.

            
            

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

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

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

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

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

  