Gets information about the specified safety lever.
Parameters:
Raises:
Source code in docs_src/capo_fis/_services/fis.py
| def get_safety_lever(
self,
id: "capo_fis.types.safety_lever_id.SafetyLeverId",
*,
config_overrides: Optional[fisClientConfig] = None,
) -> "capo_fis.types.get_safety_lever_response.GetSafetyLeverResponse":
"""<p> Gets information about the specified safety lever. </p>
Args:
id: <p> The ID of the safety lever. </p>
Raises:
capo_fis.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource cannot be found.</p>
capo_fis.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_fis.types.get_safety_lever_request.GetSafetyLeverRequest]",
) -> OperationResponse[
"capo_fis.types.get_safety_lever_response.GetSafetyLeverResponse"
]:
import capo_fis._operations.fault_injection_simulator.get_safety_lever
output, http_response = (
capo_fis._operations.fault_injection_simulator.get_safety_lever.get_safety_lever(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetSafetyLever")
)
input_: capo_fis.types.get_safety_lever_request.GetSafetyLeverRequest = {
"id": id
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|