/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.synthetics.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class UpdateCanaryRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *

* The name of the canary that you want to update. To find the names of your canaries, use DescribeCanaries. *

*

* You cannot change the name of a canary that has already been created. *

*/ private String name; /** *

* A structure that includes the entry point from which the canary should start running your script. If the script * is stored in an S3 bucket, the bucket name, key, and version are also included. *

*/ private CanaryCodeInput code; /** *

* The ARN of the IAM role to be used to run the canary. This role must already exist, and must include * lambda.amazonaws.com as a principal in the trust policy. The role must also have the following * permissions: *

* */ private String executionRoleArn; /** *

* Specifies the runtime version to use for the canary. For a list of valid runtime versions and for more * information about runtime versions, see * Canary Runtime Versions. *

*/ private String runtimeVersion; /** *

* A structure that contains information about how often the canary is to run, and when these runs are to stop. *

*/ private CanaryScheduleInput schedule; /** *

* A structure that contains the timeout value that is used for each individual run of the canary. *

* *

* The environment variables keys and values are not encrypted. Do not store sensitive information in this field. *

*
*/ private CanaryRunConfigInput runConfig; /** *

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

*/ private Integer successRetentionPeriodInDays; /** *

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

*/ private Integer failureRetentionPeriodInDays; /** *

* If this canary is to test an endpoint in a VPC, this structure contains information about the subnet and security * groups of the VPC endpoint. For more information, see * Running a Canary in a VPC. *

*/ private VpcConfigInput vpcConfig; /** *

* Defines the screenshots to use as the baseline for comparisons during visual monitoring comparisons during future * runs of this canary. If you omit this parameter, no changes are made to any baseline screenshots that the canary * might be using already. *

*

* Visual monitoring is supported only on canaries running the syn-puppeteer-node-3.2 runtime or later. For * more information, see Visual monitoring and Visual monitoring blueprint *

*/ private VisualReferenceInput visualReference; /** *

* 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 (.). *

*/ private String artifactS3Location; /** *

* A structure that contains the configuration for canary artifacts, including the encryption-at-rest settings for * artifacts that the canary uploads to Amazon S3. *

*/ private ArtifactConfigInput artifactConfig; /** *

* The name of the canary that you want to update. To find the names of your canaries, use DescribeCanaries. *

*

* You cannot change the name of a canary that has already been created. *

* * @param name * The name of the canary that you want to update. To find the names of your canaries, use DescribeCanaries.

*

* You cannot change the name of a canary that has already been created. */ public void setName(String name) { this.name = name; } /** *

* The name of the canary that you want to update. To find the names of your canaries, use DescribeCanaries. *

*

* You cannot change the name of a canary that has already been created. *

* * @return The name of the canary that you want to update. To find the names of your canaries, use DescribeCanaries.

*

* You cannot change the name of a canary that has already been created. */ public String getName() { return this.name; } /** *

* The name of the canary that you want to update. To find the names of your canaries, use DescribeCanaries. *

*

* You cannot change the name of a canary that has already been created. *

* * @param name * The name of the canary that you want to update. To find the names of your canaries, use DescribeCanaries.

*

* You cannot change the name of a canary that has already been created. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateCanaryRequest withName(String name) { setName(name); return this; } /** *

* A structure that includes the entry point from which the canary should start running your script. If the script * is stored in an S3 bucket, the bucket name, key, and version are also included. *

* * @param code * A structure that includes the entry point from which the canary should start running your script. If the * script is stored in an S3 bucket, the bucket name, key, and version are also included. */ public void setCode(CanaryCodeInput code) { this.code = code; } /** *

* A structure that includes the entry point from which the canary should start running your script. If the script * is stored in an S3 bucket, the bucket name, key, and version are also included. *

* * @return A structure that includes the entry point from which the canary should start running your script. If the * script is stored in an S3 bucket, the bucket name, key, and version are also included. */ public CanaryCodeInput getCode() { return this.code; } /** *

* A structure that includes the entry point from which the canary should start running your script. If the script * is stored in an S3 bucket, the bucket name, key, and version are also included. *

* * @param code * A structure that includes the entry point from which the canary should start running your script. If the * script is stored in an S3 bucket, the bucket name, key, and version are also included. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateCanaryRequest withCode(CanaryCodeInput code) { setCode(code); return this; } /** *

* The ARN of the IAM role to be used to run the canary. This role must already exist, and must include * lambda.amazonaws.com as a principal in the trust policy. The role must also have the following * permissions: *

* * * @param executionRoleArn * The ARN of the IAM role to be used to run the canary. This role must already exist, and must include * lambda.amazonaws.com as a principal in the trust policy. The role must also have the * following permissions:

*