

# StopCanary
<a name="API_StopCanary"></a>

Stops the canary to prevent all future runs. If the canary is currently running,the run that is in progress completes on its own, publishes metrics, and uploads artifacts, but it is not recorded in Synthetics as a completed run.

You can use `StartCanary` to start it running again with the canary’s current schedule at any point in the future. 

## Request Syntax
<a name="API_StopCanary_RequestSyntax"></a>

```
POST /canary/name/stop HTTP/1.1
```

## URI Request Parameters
<a name="API_StopCanary_RequestParameters"></a>

The request uses the following URI parameters.

 ** [name](#API_StopCanary_RequestSyntax) **   <a name="synthetics-StopCanary-request-uri-Name"></a>
The name of the canary that you want to stop. To find the names of your canaries, use [ListCanaries](https://docs.aws.amazon.com/AmazonSynthetics/latest/APIReference/API_DescribeCanaries.html).  
Length Constraints: Minimum length of 1. Maximum length of 255.  
Pattern: `^[0-9a-z_\-]+$`   
Required: Yes

## Request Body
<a name="API_StopCanary_RequestBody"></a>

The request does not have a request body.

## Response Syntax
<a name="API_StopCanary_ResponseSyntax"></a>

```
HTTP/1.1 200
```

## Response Elements
<a name="API_StopCanary_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

## Errors
<a name="API_StopCanary_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** ConflictException **   
A conflicting operation is already in progress.  
HTTP Status Code: 409

 ** InternalServerException **   
An unknown internal error occurred.  
HTTP Status Code: 500

 ** ResourceNotFoundException **   
One of the specified resources was not found.  
HTTP Status Code: 404

 ** ValidationException **   
A parameter could not be validated.  
HTTP Status Code: 400

## See Also
<a name="API_StopCanary_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/synthetics-2017-10-11/StopCanary) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/synthetics-2017-10-11/StopCanary) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/synthetics-2017-10-11/StopCanary) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/synthetics-2017-10-11/StopCanary) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/synthetics-2017-10-11/StopCanary) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/synthetics-2017-10-11/StopCanary) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/synthetics-2017-10-11/StopCanary) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/synthetics-2017-10-11/StopCanary) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/synthetics-2017-10-11/StopCanary) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/synthetics-2017-10-11/StopCanary) 