aws_sdk_synthetics/client/start_canary_dry_run.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3 /// Constructs a fluent builder for the [`StartCanaryDryRun`](crate::operation::start_canary_dry_run::builders::StartCanaryDryRunFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`name(impl Into<String>)`](crate::operation::start_canary_dry_run::builders::StartCanaryDryRunFluentBuilder::name) / [`set_name(Option<String>)`](crate::operation::start_canary_dry_run::builders::StartCanaryDryRunFluentBuilder::set_name):<br>required: **true**<br><p>The name of the canary that you want to dry run. To find canary names, use <a href="https://docs.aws.amazon.com/AmazonSynthetics/latest/APIReference/API_DescribeCanaries.html">DescribeCanaries</a>.</p><br>
7 /// - [`code(CanaryCodeInput)`](crate::operation::start_canary_dry_run::builders::StartCanaryDryRunFluentBuilder::code) / [`set_code(Option<CanaryCodeInput>)`](crate::operation::start_canary_dry_run::builders::StartCanaryDryRunFluentBuilder::set_code):<br>required: **false**<br><p>Use this structure to input your script code for the canary. This structure contains the Lambda handler with the location where the canary should start running the script. If the script is stored in an Amazon S3 bucket, the bucket name, key, and version are also included. If the script was passed into the canary directly, the script code is contained in the value of <code>Zipfile</code>.</p> <p>If you are uploading your canary scripts with an Amazon S3 bucket, your zip file should include your script in a certain folder structure.</p> <ul> <li> <p>For Node.js canaries, the folder structure must be <code>nodejs/node_modules/<i>myCanaryFilename.js</i> </code> For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_WritingCanary_Nodejs.html#CloudWatch_Synthetics_Canaries_package">Packaging your Node.js canary files</a></p></li> <li> <p>For Python canaries, the folder structure must be <code>python/<i>myCanaryFilename.py</i> </code> or <code>python/<i>myFolder/myCanaryFilename.py</i> </code> For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_WritingCanary_Python.html#CloudWatch_Synthetics_Canaries_WritingCanary_Python_package">Packaging your Python canary files</a></p></li> </ul><br>
8 /// - [`runtime_version(impl Into<String>)`](crate::operation::start_canary_dry_run::builders::StartCanaryDryRunFluentBuilder::runtime_version) / [`set_runtime_version(Option<String>)`](crate::operation::start_canary_dry_run::builders::StartCanaryDryRunFluentBuilder::set_runtime_version):<br>required: **false**<br><p>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>.</p><br>
9 /// - [`run_config(CanaryRunConfigInput)`](crate::operation::start_canary_dry_run::builders::StartCanaryDryRunFluentBuilder::run_config) / [`set_run_config(Option<CanaryRunConfigInput>)`](crate::operation::start_canary_dry_run::builders::StartCanaryDryRunFluentBuilder::set_run_config):<br>required: **false**<br><p>A structure that contains input information for a canary run.</p><br>
10 /// - [`vpc_config(VpcConfigInput)`](crate::operation::start_canary_dry_run::builders::StartCanaryDryRunFluentBuilder::vpc_config) / [`set_vpc_config(Option<VpcConfigInput>)`](crate::operation::start_canary_dry_run::builders::StartCanaryDryRunFluentBuilder::set_vpc_config):<br>required: **false**<br><p>If this canary is to test an endpoint in a VPC, this structure contains information about the subnets and security groups of the VPC endpoint. For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_VPC.html"> Running a Canary in a VPC</a>.</p><br>
11 /// - [`execution_role_arn(impl Into<String>)`](crate::operation::start_canary_dry_run::builders::StartCanaryDryRunFluentBuilder::execution_role_arn) / [`set_execution_role_arn(Option<String>)`](crate::operation::start_canary_dry_run::builders::StartCanaryDryRunFluentBuilder::set_execution_role_arn):<br>required: **false**<br><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><br>
12 /// - [`success_retention_period_in_days(i32)`](crate::operation::start_canary_dry_run::builders::StartCanaryDryRunFluentBuilder::success_retention_period_in_days) / [`set_success_retention_period_in_days(Option<i32>)`](crate::operation::start_canary_dry_run::builders::StartCanaryDryRunFluentBuilder::set_success_retention_period_in_days):<br>required: **false**<br><p>The number of days to retain data about successful runs of this canary. If you omit this field, the default of 31 days is used. The valid range is 1 to 455 days.</p> <p>This setting affects the range of information returned by <a href="https://docs.aws.amazon.com/AmazonSynthetics/latest/APIReference/API_GetCanaryRuns.html">GetCanaryRuns</a>, as well as the range of information displayed in the Synthetics console.</p><br>
13 /// - [`failure_retention_period_in_days(i32)`](crate::operation::start_canary_dry_run::builders::StartCanaryDryRunFluentBuilder::failure_retention_period_in_days) / [`set_failure_retention_period_in_days(Option<i32>)`](crate::operation::start_canary_dry_run::builders::StartCanaryDryRunFluentBuilder::set_failure_retention_period_in_days):<br>required: **false**<br><p>The number of days to retain data about failed runs of this canary. If you omit this field, the default of 31 days is used. The valid range is 1 to 455 days.</p> <p>This setting affects the range of information returned by <a href="https://docs.aws.amazon.com/AmazonSynthetics/latest/APIReference/API_GetCanaryRuns.html">GetCanaryRuns</a>, as well as the range of information displayed in the Synthetics console.</p><br>
14 /// - [`visual_reference(VisualReferenceInput)`](crate::operation::start_canary_dry_run::builders::StartCanaryDryRunFluentBuilder::visual_reference) / [`set_visual_reference(Option<VisualReferenceInput>)`](crate::operation::start_canary_dry_run::builders::StartCanaryDryRunFluentBuilder::set_visual_reference):<br>required: **false**<br><p>An object that specifies what screenshots to use as a baseline for visual monitoring by this canary. It can optionally also specify parts of the screenshots to ignore during the visual monitoring comparison.</p> <p>Visual monitoring is supported only on canaries running the <b>syn-puppeteer-node-3.2</b> runtime or later. For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Library_SyntheticsLogger_VisualTesting.html"> Visual monitoring</a> and <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Blueprints_VisualTesting.html"> Visual monitoring blueprint</a></p><br>
15 /// - [`artifact_s3_location(impl Into<String>)`](crate::operation::start_canary_dry_run::builders::StartCanaryDryRunFluentBuilder::artifact_s3_location) / [`set_artifact_s3_location(Option<String>)`](crate::operation::start_canary_dry_run::builders::StartCanaryDryRunFluentBuilder::set_artifact_s3_location):<br>required: **false**<br><p>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 Amazon S3 bucket can't include a period (.).</p><br>
16 /// - [`artifact_config(ArtifactConfigInput)`](crate::operation::start_canary_dry_run::builders::StartCanaryDryRunFluentBuilder::artifact_config) / [`set_artifact_config(Option<ArtifactConfigInput>)`](crate::operation::start_canary_dry_run::builders::StartCanaryDryRunFluentBuilder::set_artifact_config):<br>required: **false**<br><p>A structure that contains the configuration for canary artifacts, including the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3.</p><br>
17 /// - [`provisioned_resource_cleanup(ProvisionedResourceCleanupSetting)`](crate::operation::start_canary_dry_run::builders::StartCanaryDryRunFluentBuilder::provisioned_resource_cleanup) / [`set_provisioned_resource_cleanup(Option<ProvisionedResourceCleanupSetting>)`](crate::operation::start_canary_dry_run::builders::StartCanaryDryRunFluentBuilder::set_provisioned_resource_cleanup):<br>required: **false**<br><p>Specifies whether to also delete the Lambda functions and layers used by this canary when the canary is deleted. If you omit this parameter, the default of <code>AUTOMATIC</code> is used, which means that the Lambda functions and layers will be deleted when the canary is deleted.</p> <p>If the value of this parameter is <code>OFF</code>, then the value of the <code>DeleteLambda</code> parameter of the <a href="https://docs.aws.amazon.com/AmazonSynthetics/latest/APIReference/API_DeleteCanary.html">DeleteCanary</a> operation determines whether the Lambda functions and layers will be deleted.</p><br>
18 /// - [`browser_configs(BrowserConfig)`](crate::operation::start_canary_dry_run::builders::StartCanaryDryRunFluentBuilder::browser_configs) / [`set_browser_configs(Option<Vec::<BrowserConfig>>)`](crate::operation::start_canary_dry_run::builders::StartCanaryDryRunFluentBuilder::set_browser_configs):<br>required: **false**<br><p>A structure that specifies the browser type to use for a canary run. CloudWatch Synthetics supports running canaries on both <code>CHROME</code> and <code>FIREFOX</code> browsers.</p><note> <p>If not specified, <code>browserConfigs</code> defaults to Chrome.</p> </note><br>
19 /// - [`visual_references(VisualReferenceInput)`](crate::operation::start_canary_dry_run::builders::StartCanaryDryRunFluentBuilder::visual_references) / [`set_visual_references(Option<Vec::<VisualReferenceInput>>)`](crate::operation::start_canary_dry_run::builders::StartCanaryDryRunFluentBuilder::set_visual_references):<br>required: **false**<br><p>A list of visual reference configurations for the canary, one for each browser type that the canary is configured to run on. Visual references are used for visual monitoring comparisons.</p> <p><code>syn-nodejs-puppeteer-11.0</code> and above, and <code>syn-nodejs-playwright-3.0</code> and above, only supports <code>visualReferences</code>. <code>visualReference</code> field is not supported.</p> <p>Versions older than <code>syn-nodejs-puppeteer-11.0</code> supports both <code>visualReference</code> and <code>visualReferences</code> for backward compatibility. It is recommended to use <code>visualReferences</code> for consistency and future compatibility.</p><br>
20 /// - On success, responds with [`StartCanaryDryRunOutput`](crate::operation::start_canary_dry_run::StartCanaryDryRunOutput) with field(s):
21 /// - [`dry_run_config(Option<DryRunConfigOutput>)`](crate::operation::start_canary_dry_run::StartCanaryDryRunOutput::dry_run_config): <p>Returns the dry run configurations for a canary.</p>
22 /// - On failure, responds with [`SdkError<StartCanaryDryRunError>`](crate::operation::start_canary_dry_run::StartCanaryDryRunError)
23 pub fn start_canary_dry_run(&self) -> crate::operation::start_canary_dry_run::builders::StartCanaryDryRunFluentBuilder {
24 crate::operation::start_canary_dry_run::builders::StartCanaryDryRunFluentBuilder::new(self.handle.clone())
25 }
26}