StopCanary
Source:
src/AWS/Synthetics/StopCanary.ts
Runtime binding for synthetics:StopCanary — stop future runs of the
bound Canary (an in-flight run completes on its own); the canary
name is injected automatically.
Provide Synthetics.StopCanaryHttp on the hosting Lambda Function to
satisfy the requirement.
Controlling the Canary
Section titled “Controlling the Canary”// init — grants synthetics:StopCanary on the canaryconst stopCanary = yield* AWS.Synthetics.StopCanary(canary);
// runtime — a ConflictException means it is not currently runningyield* stopCanary().pipe( Effect.catchTag("ConflictException", () => Effect.void),);