Skip to content

get_upgrade_history

get_upgrade_history(
    domain_name: DomainName,
    *,
    config_overrides: Optional[OpenSearchClientConfig] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
) -> GetUpgradeHistoryResponse

Retrieves the complete history of the last 10 upgrades performed on an Amazon OpenSearch Service domain.

Parameters:

  • domain_name (DomainName) –

    The name of an existing domain.

  • max_results (Optional[MaxResults], default: None ) –

    An optional parameter that specifies the maximum number of results to return. You can use nextToken to get the next page of results.

  • next_token (Optional[NextToken], default: None ) –

    If your initial GetUpgradeHistory operation returns a nextToken, you can include the returned nextToken in subsequent GetUpgradeHistory operations, which returns results in the next page.

Raises:

Source code in docs_src/capo_opensearch/_services/open_search.py
def get_upgrade_history(
    self,
    domain_name: "capo_opensearch.types.domain_name.DomainName",
    *,
    config_overrides: Optional[OpenSearchClientConfig] = None,
    max_results: Optional["capo_opensearch.types.max_results.MaxResults"] = None,
    next_token: Optional["capo_opensearch.types.next_token.NextToken"] = None,
) -> "capo_opensearch.types.get_upgrade_history_response.GetUpgradeHistoryResponse":
    """<p>Retrieves the complete history of the last 10 upgrades performed on an Amazon OpenSearch Service domain.</p>

    Args:
        domain_name: <p>The name of an existing domain.</p>
        max_results: <p>An optional parameter that specifies the maximum number of results to return. You can use <code>nextToken</code> to get the next page of results.</p>
        next_token: <p>If your initial <code>GetUpgradeHistory</code> operation returns a <code>nextToken</code>, you can include the returned <code>nextToken</code> in subsequent <code>GetUpgradeHistory</code> operations, which returns results in the next page.</p>

    Raises:
        capo_opensearch.errors.base_exception.BaseException: <p>An error occurred while processing the request.</p>
        capo_opensearch.errors.disabled_operation_exception.DisabledOperationException: <p>An error occured because the client wanted to access an unsupported operation.</p>
        capo_opensearch.errors.internal_exception.InternalException: <p>Request processing failed because of an unknown error, exception, or internal failure.</p>
        capo_opensearch.errors.resource_not_found_exception.ResourceNotFoundException: <p>An exception for accessing or deleting a resource that doesn't exist.</p>
        capo_opensearch.errors.validation_exception.ValidationException: <p>An exception for accessing or deleting a resource that doesn't exist.</p>
        capo_opensearch.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_opensearch.types.get_upgrade_history_request.GetUpgradeHistoryRequest]",
    ) -> OperationResponse[
        "capo_opensearch.types.get_upgrade_history_response.GetUpgradeHistoryResponse"
    ]:
        import capo_opensearch._operations.amazon_open_search_service.get_upgrade_history

        output, http_response = (
            capo_opensearch._operations.amazon_open_search_service.get_upgrade_history.get_upgrade_history(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetUpgradeHistory")
    )
    input_: capo_opensearch.types.get_upgrade_history_request.GetUpgradeHistoryRequest = {
        "domain_name": domain_name
    }
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

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