Returns information about a safety rule.
Parameters:
-
safety_rule_arn
(__string)
–
The ARN of the safety rule.
Raises:
-
ResourceNotFoundException
–
404 response - MalformedQueryString. The query string contains a syntax error or resource not found.
-
ValidationException
–
400 response - Multiple causes. For example, you might have a malformed query string and input parameter might be out of range, or you might have used parameters together incorrectly.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_route53_recovery_control_config/_services/route53_recovery_control_config.py
| def describe_safety_rule(
self,
safety_rule_arn: "capo_route53_recovery_control_config.types.__string.__string",
*,
config_overrides: Optional[Route53RecoveryControlConfigClientConfig] = None,
) -> "capo_route53_recovery_control_config.types.describe_safety_rule_response.DescribeSafetyRuleResponse":
"""<p>Returns information about a safety rule.</p>
Args:
safety_rule_arn: <p>The ARN of the safety rule.</p>
Raises:
capo_route53_recovery_control_config.errors.resource_not_found_exception.ResourceNotFoundException: <p>404 response - MalformedQueryString. The query string contains a syntax error or resource not found.</p>
capo_route53_recovery_control_config.errors.validation_exception.ValidationException: <p>400 response - Multiple causes. For example, you might have a malformed query string and input parameter might be out of range, or you might have used parameters together incorrectly.</p>
capo_route53_recovery_control_config.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_route53_recovery_control_config.types.describe_safety_rule_request.DescribeSafetyRuleRequest]",
) -> OperationResponse[
"capo_route53_recovery_control_config.types.describe_safety_rule_response.DescribeSafetyRuleResponse"
]:
import capo_route53_recovery_control_config._operations.route53_recovery_control_config.describe_safety_rule
output, http_response = (
capo_route53_recovery_control_config._operations.route53_recovery_control_config.describe_safety_rule.describe_safety_rule(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DescribeSafetyRule")
)
input_: capo_route53_recovery_control_config.types.describe_safety_rule_request.DescribeSafetyRuleRequest = {
"safety_rule_arn": safety_rule_arn
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|