Skip to content

upgrade_elasticsearch_domain

upgrade_elasticsearch_domain(
    domain_name: DomainName,
    target_version: ElasticsearchVersionString,
    *,
    config_overrides: Optional[ElasticsearchServiceClientConfig] = None,
    perform_check_only: Optional[Boolean] = None,
) -> UpgradeElasticsearchDomainResponse

Allows you to either upgrade your domain or perform an Upgrade eligibility check to a compatible Elasticsearch version.

Parameters:

  • target_version (ElasticsearchVersionString) –

    The version of Elasticsearch that you intend to upgrade the domain to.

  • perform_check_only (Optional[Boolean], default: None ) –

    This flag, when set to True, indicates that an Upgrade Eligibility Check needs to be performed. This will not actually perform the Upgrade.

Raises:

  • BaseException –

    An error occurred while processing the request.

  • DisabledOperationException –

    An error occured because the client wanted to access a not supported operation. Gives http status code of 409.

  • InternalException –

    The request processing has failed because of an unknown error, exception or failure (the failure is internal to the service) . Gives http status code of 500.

  • ResourceAlreadyExistsException –

    An exception for creating a resource that already exists. Gives http status code of 400.

  • ResourceNotFoundException –

    An exception for accessing or deleting a resource that does not exist. Gives http status code of 400.

  • ValidationException –

    An exception for missing / invalid input fields. Gives http status code of 400.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_elasticsearch_service/_services/elasticsearch_service.py
def upgrade_elasticsearch_domain(
    self,
    domain_name: "capo_elasticsearch_service.types.domain_name.DomainName",
    target_version: "capo_elasticsearch_service.types.elasticsearch_version_string.ElasticsearchVersionString",
    *,
    config_overrides: Optional[ElasticsearchServiceClientConfig] = None,
    perform_check_only: Optional[
        "capo_elasticsearch_service.types.boolean.Boolean"
    ] = None,
) -> "capo_elasticsearch_service.types.upgrade_elasticsearch_domain_response.UpgradeElasticsearchDomainResponse":
    """<p>Allows you to either upgrade your domain or perform an Upgrade eligibility check to a compatible Elasticsearch version.</p>

    Args:
        target_version: <p>The version of Elasticsearch that you intend to upgrade the domain to.</p>
        perform_check_only: <p> This flag, when set to True, indicates that an Upgrade Eligibility Check needs to be performed. This will not actually perform the Upgrade. </p>

    Raises:
        capo_elasticsearch_service.errors.base_exception.BaseException: <p>An error occurred while processing the request.</p>
        capo_elasticsearch_service.errors.disabled_operation_exception.DisabledOperationException: <p>An error occured because the client wanted to access a not supported operation. Gives http status code of 409.</p>
        capo_elasticsearch_service.errors.internal_exception.InternalException: <p>The request processing has failed because of an unknown error, exception or failure (the failure is internal to the service) . Gives http status code of 500.</p>
        capo_elasticsearch_service.errors.resource_already_exists_exception.ResourceAlreadyExistsException: <p>An exception for creating a resource that already exists. Gives http status code of 400.</p>
        capo_elasticsearch_service.errors.resource_not_found_exception.ResourceNotFoundException: <p>An exception for accessing or deleting a resource that does not exist. Gives http status code of 400.</p>
        capo_elasticsearch_service.errors.validation_exception.ValidationException: <p>An exception for missing / invalid input fields. Gives http status code of 400.</p>
        capo_elasticsearch_service.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_elasticsearch_service.types.upgrade_elasticsearch_domain_request.UpgradeElasticsearchDomainRequest]",
    ) -> OperationResponse[
        "capo_elasticsearch_service.types.upgrade_elasticsearch_domain_response.UpgradeElasticsearchDomainResponse"
    ]:
        import capo_elasticsearch_service._operations.amazon_elasticsearch_service2015.upgrade_elasticsearch_domain

        output, http_response = (
            capo_elasticsearch_service._operations.amazon_elasticsearch_service2015.upgrade_elasticsearch_domain.upgrade_elasticsearch_domain(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpgradeElasticsearchDomain")
    )
    input_: capo_elasticsearch_service.types.upgrade_elasticsearch_domain_request.UpgradeElasticsearchDomainRequest = {
        "domain_name": domain_name,
        "target_version": target_version,
    }
    if perform_check_only is not None:
        input_["perform_check_only"] = perform_check_only

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output