Retrieves details for a specific user.
Parameters:
-
user_id
(UserId)
–
The unique identifier of the user to get data for.
Raises:
Source code in docs_src/capo_finspace_data/_services/finspacedata.py
| def get_user(
self,
user_id: "capo_finspace_data.types.user_id.UserId",
*,
config_overrides: Optional[finspacedataClientConfig] = None,
) -> "capo_finspace_data.types.get_user_response.GetUserResponse":
"""<p>Retrieves details for a specific user.</p>
Args:
user_id: <p>The unique identifier of the user to get data for.</p>
Raises:
capo_finspace_data.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
capo_finspace_data.errors.internal_server_exception.InternalServerException: <p>The request processing has failed because of an unknown error, exception or failure.</p>
capo_finspace_data.errors.resource_not_found_exception.ResourceNotFoundException: <p>One or more resources can't be found.</p>
capo_finspace_data.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
capo_finspace_data.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an AWS service.</p>
capo_finspace_data.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_finspace_data.types.get_user_request.GetUserRequest]",
) -> OperationResponse[
"capo_finspace_data.types.get_user_response.GetUserResponse"
]:
import capo_finspace_data._operations.aws_habanero_public_api.get_user
output, http_response = (
capo_finspace_data._operations.aws_habanero_public_api.get_user.get_user(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
def _redact_output(
output: "capo_finspace_data.types.get_user_response.GetUserResponse",
) -> dict[str, Any]:
import capo_finspace_data.types.get_user_response
return capo_finspace_data.types.get_user_response.redact_sensitive(output)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetUser", redact_output=_redact_output)
)
input_: capo_finspace_data.types.get_user_request.GetUserRequest = {
"user_id": user_id
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|