Skip to content

cancel_index_rebuild async

cancel_index_rebuild(
    rebuild_id: str, *, config_overrides: Optional[AsyncneptunedataClientConfig] = None
) -> CancelIndexRebuildOutput

Cancels an in-progress index rebuild operation.

When invoking this operation in a Neptune cluster that has IAM authentication enabled, the IAM user or role making the request must have a policy attached that allows the neptune-db:CancelIndexRebuild IAM action in that cluster.

Parameters:

  • rebuild_id (str) –

    The unique identifier of the index rebuild job to cancel.

Raises:

Source code in docs_src/capo_neptunedata/_services/async_neptunedata.py
async def cancel_index_rebuild(
    self,
    rebuild_id: str,
    *,
    config_overrides: Optional[AsyncneptunedataClientConfig] = None,
) -> "capo_neptunedata.types.cancel_index_rebuild_output.CancelIndexRebuildOutput":
    """<p>Cancels an in-progress index rebuild operation.</p> <p>When invoking this operation in a Neptune cluster that has IAM authentication enabled, the IAM user or role making the request must have a policy attached that allows the <a href="https://docs.aws.amazon.com/neptune/latest/userguide/iam-dp-actions.html#cancelindexrebuild">neptune-db:CancelIndexRebuild</a> IAM action in that cluster.</p>

    Args:
        rebuild_id: <p>The unique identifier of the index rebuild job to cancel.</p>

    Raises:
        capo_neptunedata.errors.access_denied_exception.AccessDeniedException: <p>Raised in case of an authentication or authorization failure.</p>
        capo_neptunedata.errors.cancelled_by_maintenance_exception.CancelledByMaintenanceException: <p>Raised when a request is cancelled because the storage layer entered maintenance mode. This typically happens during a customer-initiated operation such as an index rebuild. It should be treated like <code>ConcurrentModificationException</code>.</p>
        capo_neptunedata.errors.cancelled_by_user_exception.CancelledByUserException: <p>Raised when a user cancelled a request.</p>
        capo_neptunedata.errors.client_timeout_exception.ClientTimeoutException: <p>Raised when a request timed out in the client.</p>
        capo_neptunedata.errors.constraint_violation_exception.ConstraintViolationException: <p>Raised when a value in a request field did not satisfy required constraints.</p>
        capo_neptunedata.errors.illegal_argument_exception.IllegalArgumentException: <p>Raised when an argument in a request is not supported.</p>
        capo_neptunedata.errors.internal_failure_exception.InternalFailureException: <p>Raised when the processing of the request failed unexpectedly.</p>
        capo_neptunedata.errors.invalid_argument_exception.InvalidArgumentException: <p>Raised when an argument in a request has an invalid value.</p>
        capo_neptunedata.errors.invalid_parameter_exception.InvalidParameterException: <p>Raised when a parameter value is not valid.</p>
        capo_neptunedata.errors.method_not_allowed_exception.MethodNotAllowedException: <p>Raised when the HTTP method used by a request is not supported by the endpoint being used.</p>
        capo_neptunedata.errors.preconditions_failed_exception.PreconditionsFailedException: <p>Raised when a precondition for processing a request is not satisfied.</p>
        capo_neptunedata.errors.read_only_violation_exception.ReadOnlyViolationException: <p>Raised when a request attempts to write to a read-only resource.</p>
        capo_neptunedata.errors.server_shutdown_exception.ServerShutdownException: <p>Raised when the server shuts down while processing a request.</p>
        capo_neptunedata.errors.too_many_requests_exception.TooManyRequestsException: <p>Raised when the number of requests being processed exceeds the limit.</p>
        capo_neptunedata.errors.unsupported_operation_exception.UnsupportedOperationException: <p>Raised when a request attempts to initiate an operation that is not supported.</p>
        capo_neptunedata.errors.validation_exception.ValidationException: <p>Raised when a parameter value is not valid or is malformed.</p>
        capo_neptunedata.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_neptunedata.types.cancel_index_rebuild_input.CancelIndexRebuildInput]",
    ) -> AsyncOperationResponse[
        "capo_neptunedata.types.cancel_index_rebuild_output.CancelIndexRebuildOutput"
    ]:
        import capo_neptunedata._operations.amazon_neptune_dataplane.cancel_index_rebuild

        (
            output,
            http_response,
        ) = await capo_neptunedata._operations.amazon_neptune_dataplane.cancel_index_rebuild.async_cancel_index_rebuild(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CancelIndexRebuild")
    )
    input_: capo_neptunedata.types.cancel_index_rebuild_input.CancelIndexRebuildInput = {
        "rebuild_id": rebuild_id
    }

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