Use this operation to run a canary that has already been created. The frequency of the canary runs is determined by the value of the canary's Schedule. To see a canary's schedule, use GetCanary.
Parameters:
Raises:
Source code in docs_src/capo_synthetics/_services/synthetics.py
| def start_canary(
self,
name: "capo_synthetics.types.canary_name.CanaryName",
*,
config_overrides: Optional[syntheticsClientConfig] = None,
) -> "capo_synthetics.types.start_canary_response.StartCanaryResponse":
"""<p>Use this operation to run a canary that has already been created. The frequency of the canary runs is determined by the value of the canary's <code>Schedule</code>. To see a canary's schedule, use <a href="https://docs.aws.amazon.com/AmazonSynthetics/latest/APIReference/API_GetCanary.html">GetCanary</a>.</p>
Args:
name: <p>The name of the canary that you want to run. To find canary names, use <a href="https://docs.aws.amazon.com/AmazonSynthetics/latest/APIReference/API_DescribeCanaries.html">DescribeCanaries</a>.</p>
Raises:
capo_synthetics.errors.conflict_exception.ConflictException: <p>A conflicting operation is already in progress.</p>
capo_synthetics.errors.internal_server_exception.InternalServerException: <p>An unknown internal error occurred.</p>
capo_synthetics.errors.resource_not_found_exception.ResourceNotFoundException: <p>One of the specified resources was not found.</p>
capo_synthetics.errors.validation_exception.ValidationException: <p>A parameter could not be validated.</p>
capo_synthetics.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_synthetics.types.start_canary_request.StartCanaryRequest]",
) -> OperationResponse[
"capo_synthetics.types.start_canary_response.StartCanaryResponse"
]:
import capo_synthetics._operations.synthetics.start_canary
output, http_response = (
capo_synthetics._operations.synthetics.start_canary.start_canary(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("StartCanary")
)
input_: capo_synthetics.types.start_canary_request.StartCanaryRequest = {
"name": name
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|