Skip to content

deregister_capability

deregister_capability(
    application_id: ApplicationId,
    capability_name: CapabilityName,
    *,
    config_overrides: Optional[OpenSearchClientConfig] = None,
) -> DeregisterCapabilityResponse

Deregisters a capability from an OpenSearch UI application. This operation removes the capability and its associated configuration.

Parameters:

  • application_id (ApplicationId) –

    The unique identifier of the OpenSearch UI application to deregister the capability from.

  • capability_name (CapabilityName) –

    The name of the capability to deregister.

Raises:

Source code in docs_src/capo_opensearch/_services/open_search.py
def deregister_capability(
    self,
    application_id: "capo_opensearch.types.application_id.ApplicationId",
    capability_name: "capo_opensearch.types.capability_name.CapabilityName",
    *,
    config_overrides: Optional[OpenSearchClientConfig] = None,
) -> "capo_opensearch.types.deregister_capability_response.DeregisterCapabilityResponse":
    """<p>Deregisters a capability from an OpenSearch UI application. This operation removes the capability and its associated configuration.</p>

    Args:
        application_id: <p>The unique identifier of the OpenSearch UI application to deregister the capability from.</p>
        capability_name: <p>The name of the capability to deregister.</p>

    Raises:
        capo_opensearch.errors.access_denied_exception.AccessDeniedException: <p>An error occurred because you don't have permissions to access the resource.</p>
        capo_opensearch.errors.conflict_exception.ConflictException: <p>An error occurred because the client attempts to remove a resource that is currently in use.</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.deregister_capability_request.DeregisterCapabilityRequest]",
    ) -> OperationResponse[
        "capo_opensearch.types.deregister_capability_response.DeregisterCapabilityResponse"
    ]:
        import capo_opensearch._operations.amazon_open_search_service.deregister_capability

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeregisterCapability")
    )
    input_: capo_opensearch.types.deregister_capability_request.DeregisterCapabilityRequest = {
        "application_id": application_id,
        "capability_name": capability_name,
    }

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