Skip to content

cancel_domain_config_change async

cancel_domain_config_change(
    domain_name: DomainName,
    *,
    config_overrides: Optional[AsyncElasticsearchServiceClientConfig] = None,
    dry_run: Optional[DryRun] = None,
) -> CancelDomainConfigChangeResponse

Cancels a pending configuration change on an Amazon OpenSearch Service domain.

Parameters:

  • domain_name (DomainName) –

    Name of the OpenSearch Service domain configuration request to cancel.

  • dry_run (Optional[DryRun], default: None ) –

    When set to True, returns the list of change IDs and properties that will be cancelled without actually cancelling the change.

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.

  • 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/async_elasticsearch_service.py
async def cancel_domain_config_change(
    self,
    domain_name: "capo_elasticsearch_service.types.domain_name.DomainName",
    *,
    config_overrides: Optional[AsyncElasticsearchServiceClientConfig] = None,
    dry_run: Optional["capo_elasticsearch_service.types.dry_run.DryRun"] = None,
) -> "capo_elasticsearch_service.types.cancel_domain_config_change_response.CancelDomainConfigChangeResponse":
    """<p>Cancels a pending configuration change on an Amazon OpenSearch Service domain.</p>

    Args:
        domain_name: <p>Name of the OpenSearch Service domain configuration request to cancel.</p>
        dry_run: <p>When set to <b>True</b>, returns the list of change IDs and properties that will be cancelled without actually cancelling the change.</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_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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_elasticsearch_service.types.cancel_domain_config_change_request.CancelDomainConfigChangeRequest]",
    ) -> AsyncOperationResponse[
        "capo_elasticsearch_service.types.cancel_domain_config_change_response.CancelDomainConfigChangeResponse"
    ]:
        import capo_elasticsearch_service._operations.amazon_elasticsearch_service2015.cancel_domain_config_change

        (
            output,
            http_response,
        ) = await capo_elasticsearch_service._operations.amazon_elasticsearch_service2015.cancel_domain_config_change.async_cancel_domain_config_change(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CancelDomainConfigChange")
    )
    input_: capo_elasticsearch_service.types.cancel_domain_config_change_request.CancelDomainConfigChangeRequest = {
        "domain_name": domain_name
    }
    if dry_run is not None:
        input_["dry_run"] = dry_run

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output