async def get_space(
self,
space_id: "capo_opensearchmemory.types.space_id.SpaceId",
*,
config_overrides: Optional[AsyncOpenSearchMemoryClientConfig] = None,
) -> "capo_opensearchmemory.types.get_space_response.GetSpaceResponse":
"""<p>Returns a space's configuration and status.</p>
Args:
space_id: <p>The ID of the space.</p>
Raises:
capo_opensearchmemory.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.</p>
capo_opensearchmemory.errors.internal_server_exception.InternalServerException: <p>The service couldn't process the request because of an internal error. Retry the request.</p>
capo_opensearchmemory.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource doesn't exist. Check the IDs in the request.</p>
capo_opensearchmemory.errors.throttling_exception.ThrottlingException: <p>The service throttled the request. Retry the request with exponential backoff.</p>
capo_opensearchmemory.errors.validation_exception.ValidationException: <p>The request isn't valid. The <code>reason</code>, <code>message</code>, and <code>fieldList</code> members describe the problem. Fix the request, and then try again.</p>
capo_opensearchmemory.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_opensearchmemory.types.get_space_request.GetSpaceRequest]",
) -> AsyncOperationResponse[
"capo_opensearchmemory.types.get_space_response.GetSpaceResponse"
]:
import capo_opensearchmemory._operations.open_search_memory.get_space
(
output,
http_response,
) = await capo_opensearchmemory._operations.open_search_memory.get_space.async_get_space(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
def _redact_output(
output: "capo_opensearchmemory.types.get_space_response.GetSpaceResponse",
) -> dict[str, Any]:
import capo_opensearchmemory.types.get_space_response
return capo_opensearchmemory.types.get_space_response.redact_sensitive(
output
)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetSpace", redact_output=_redact_output)
)
input_: capo_opensearchmemory.types.get_space_request.GetSpaceRequest = {
"space_id": space_id
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output