v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-1421129123.2 KB

Updates the configuration of a canary that has already been created.

You can't use this operation to update the tags of an existing canary. To change the tags of an existing canary, use TagResource.

patch/canary/{name}

Path parameters

namestring required
<p>The name of the canary that you want to update. To find the names of your canaries, use <a href="https://docs.aws.amazon.com/AmazonSynthetics/latest/APIReference/API_DescribeCanaries.html">DescribeCanaries</a>.</p> <p>You cannot change the name of a canary that has already been created.</p>

Request body

ExecutionRoleArnstring
<p>The ARN of the IAM role to be used to run the canary. This role must already exist, and must include <code>lambda.amazonaws.com</code> as a principal in the trust policy. The role must also have the following permissions:</p> <ul> <li> <p> <code>s3:PutObject</code> </p> </li> <li> <p> <code>s3:GetBucketLocation</code> </p> </li> <li> <p> <code>s3:ListAllMyBuckets</code> </p> </li> <li> <p> <code>cloudwatch:PutMetricData</code> </p> </li> <li> <p> <code>logs:CreateLogGroup</code> </p> </li> <li> <p> <code>logs:CreateLogStream</code> </p> </li> <li> <p> <code>logs:CreateLogStream</code> </p> </li> </ul>
RuntimeVersionstring

Specifies the runtime version to use for the canary. For a list of valid runtime versions and for more information about runtime versions, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Library.html"> Canary Runtime Versions</a>.

SuccessRetentionPeriodInDaysinteger

The number of days to retain data about successful runs of this canary.

FailureRetentionPeriodInDaysinteger

The number of days to retain data about failed runs of this canary.

ArtifactS3Locationstring

The location in Amazon S3 where Synthetics stores artifacts from the test runs of this canary. Artifacts include the log file, screenshots, and HAR files. The name of the S3 bucket can't include a period (.).

Response

Success

UpdateCanaryResponse required