Retrieves information about a registered capability for an OpenSearch UI application, including its configuration and current status.
Parameters:
-
application_id
(ApplicationId)
–
The unique identifier of the OpenSearch UI application.
-
capability_name
(CapabilityName)
–
The name of the capability to retrieve information about.
Raises:
Source code in docs_src/capo_opensearch/_services/open_search.py
| def get_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.get_capability_response.GetCapabilityResponse":
"""<p>Retrieves information about a registered capability for an OpenSearch UI application, including its configuration and current status.</p>
Args:
application_id: <p>The unique identifier of the OpenSearch UI application.</p>
capability_name: <p>The name of the capability to retrieve information about.</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.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_capability_request.GetCapabilityRequest]",
) -> OperationResponse[
"capo_opensearch.types.get_capability_response.GetCapabilityResponse"
]:
import capo_opensearch._operations.amazon_open_search_service.get_capability
output, http_response = (
capo_opensearch._operations.amazon_open_search_service.get_capability.get_capability(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetCapability")
)
input_: capo_opensearch.types.get_capability_request.GetCapabilityRequest = {
"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
|