Synthetics.Client.
delete_canary
(**kwargs)¶Permanently deletes the specified canary.
If you specify DeleteLambda
to true
, CloudWatch Synthetics also deletes the Lambda functions and layers that are used by the canary.
Other resources used and created by the canary are not automatically deleted. After you delete a canary that you do not intend to use again, you should also delete the following:
Synthetics-SharpDrop-Alarm-MyCanaryName
.role/service-role/CloudWatchSyntheticsRole-MyCanaryName
./aws/lambda/cwsyn-MyCanaryName
.Before you delete a canary, you might want to use GetCanary
to display the information about this canary. Make note of the information returned by this operation so that you can delete these resources after you delete the canary.
See also: AWS API Documentation
Request Syntax
response = client.delete_canary(
Name='string',
DeleteLambda=True|False
)
[REQUIRED]
The name of the canary that you want to delete. To find the names of your canaries, use DescribeCanaries.
Specifies whether to also delete the Lambda functions and layers used by this canary. The default is false.
Type: Boolean
dict
Response Syntax
{}
Response Structure
Exceptions
Synthetics.Client.exceptions.InternalServerException
Synthetics.Client.exceptions.ValidationException
Synthetics.Client.exceptions.ResourceNotFoundException
Synthetics.Client.exceptions.ConflictException