Class CfnCanary.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnCanary>
- Enclosing class:
- CfnCanary
CfnCanary
.-
Method Summary
Modifier and TypeMethodDescriptionartifactConfig
(IResolvable artifactConfig) A structure that contains the configuration for canary artifacts, including the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3.artifactConfig
(CfnCanary.ArtifactConfigProperty artifactConfig) A structure that contains the configuration for canary artifacts, including the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3.artifactS3Location
(String artifactS3Location) The location in Amazon S3 where Synthetics stores artifacts from the runs of this canary.build()
code
(IResolvable code) Use this structure to input your script code for the canary.code
(CfnCanary.CodeProperty code) Use this structure to input your script code for the canary.static CfnCanary.Builder
deleteLambdaResourcesOnCanaryDeletion
(Boolean deleteLambdaResourcesOnCanaryDeletion) AWS::Synthetics::Canary.DeleteLambdaResourcesOnCanaryDeletion
.deleteLambdaResourcesOnCanaryDeletion
(IResolvable deleteLambdaResourcesOnCanaryDeletion) AWS::Synthetics::Canary.DeleteLambdaResourcesOnCanaryDeletion
.executionRoleArn
(String executionRoleArn) The ARN of the IAM role to be used to run the canary.failureRetentionPeriod
(Number failureRetentionPeriod) The number of days to retain data about failed runs of this canary.The name for this canary.runConfig
(IResolvable runConfig) A structure that contains input information for a canary run.runConfig
(CfnCanary.RunConfigProperty runConfig) A structure that contains input information for a canary run.runtimeVersion
(String runtimeVersion) Specifies the runtime version to use for the canary.schedule
(IResolvable schedule) A structure that contains information about how often the canary is to run, and when these runs are to stop.schedule
(CfnCanary.ScheduleProperty schedule) A structure that contains information about how often the canary is to run, and when these runs are to stop.startCanaryAfterCreation
(Boolean startCanaryAfterCreation) Specify TRUE to have the canary start making runs immediately after it is created.startCanaryAfterCreation
(IResolvable startCanaryAfterCreation) Specify TRUE to have the canary start making runs immediately after it is created.successRetentionPeriod
(Number successRetentionPeriod) The number of days to retain data about successful runs of this canary.The list of key-value pairs that are associated with the canary.visualReference
(IResolvable visualReference) If this canary performs visual monitoring by comparing screenshots, this structure contains the ID of the canary run to use as the baseline for screenshots, and the coordinates of any parts of the screen to ignore during the visual monitoring comparison.visualReference
(CfnCanary.VisualReferenceProperty visualReference) If this canary performs visual monitoring by comparing screenshots, this structure contains the ID of the canary run to use as the baseline for screenshots, and the coordinates of any parts of the screen to ignore during the visual monitoring comparison.vpcConfig
(IResolvable vpcConfig) 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.vpcConfig
(CfnCanary.VPCConfigProperty vpcConfig) 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.
-
Method Details
-
create
- Parameters:
scope
-- scope in which this resource is defined.
id
-- scoped id of the resource.
- Returns:
- a new instance of
CfnCanary.Builder
.
-
artifactS3Location
The location in Amazon S3 where Synthetics stores artifacts from the runs of this canary.Artifacts include the log file, screenshots, and HAR files. Specify the full location path, including
s3://
at the beginning of the path.- Parameters:
artifactS3Location
- The location in Amazon S3 where Synthetics stores artifacts from the runs of this canary. This parameter is required.- Returns:
this
-
code
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 S3 bucket, the bucket name, key, and version are also included. If the script is passed into the canary directly, the script code is contained in the value of
Script
.- Parameters:
code
- Use this structure to input your script code for the canary. This parameter is required.- Returns:
this
-
code
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 S3 bucket, the bucket name, key, and version are also included. If the script is passed into the canary directly, the script code is contained in the value of
Script
.- Parameters:
code
- Use this structure to input your script code for the canary. This parameter is required.- Returns:
this
-
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:s3:PutObject
s3:GetBucketLocation
s3:ListAllMyBuckets
cloudwatch:PutMetricData
logs:CreateLogGroup
logs:CreateLogStream
logs:PutLogEvents
- Parameters:
executionRoleArn
- The ARN of the IAM role to be used to run the canary. This parameter is required.- Returns:
this
-
name
The name for this canary.Be sure to give it a descriptive name that distinguishes it from other canaries in your account.
Do not include secrets or proprietary information in your canary names. The canary name makes up part of the canary ARN, and the ARN is included in outbound calls over the internet. For more information, see Security Considerations for Synthetics Canaries .
- Parameters:
name
- The name for this canary. This parameter is required.- Returns:
this
-
runtimeVersion
Specifies the runtime version to use for the canary.For more information about runtime versions, see Canary Runtime Versions .
- Parameters:
runtimeVersion
- Specifies the runtime version to use for the canary. This parameter is required.- Returns:
this
-
schedule
A structure that contains information about how often the canary is to run, and when these runs are to stop.- Parameters:
schedule
- A structure that contains information about how often the canary is to run, and when these runs are to stop. This parameter is required.- Returns:
this
-
schedule
A structure that contains information about how often the canary is to run, and when these runs are to stop.- Parameters:
schedule
- A structure that contains information about how often the canary is to run, and when these runs are to stop. This parameter is required.- Returns:
this
-
artifactConfig
A structure that contains the configuration for canary artifacts, including the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3.- Parameters:
artifactConfig
- A structure that contains the configuration for canary artifacts, including the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. This parameter is required.- Returns:
this
-
artifactConfig
@Stability(Stable) public CfnCanary.Builder artifactConfig(CfnCanary.ArtifactConfigProperty artifactConfig) A structure that contains the configuration for canary artifacts, including the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3.- Parameters:
artifactConfig
- A structure that contains the configuration for canary artifacts, including the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. This parameter is required.- Returns:
this
-
deleteLambdaResourcesOnCanaryDeletion
@Stability(Stable) public CfnCanary.Builder deleteLambdaResourcesOnCanaryDeletion(Boolean deleteLambdaResourcesOnCanaryDeletion) AWS::Synthetics::Canary.DeleteLambdaResourcesOnCanaryDeletion
.- Parameters:
deleteLambdaResourcesOnCanaryDeletion
-AWS::Synthetics::Canary.DeleteLambdaResourcesOnCanaryDeletion
. This parameter is required.- Returns:
this
-
deleteLambdaResourcesOnCanaryDeletion
@Stability(Stable) public CfnCanary.Builder deleteLambdaResourcesOnCanaryDeletion(IResolvable deleteLambdaResourcesOnCanaryDeletion) AWS::Synthetics::Canary.DeleteLambdaResourcesOnCanaryDeletion
.- Parameters:
deleteLambdaResourcesOnCanaryDeletion
-AWS::Synthetics::Canary.DeleteLambdaResourcesOnCanaryDeletion
. This parameter is required.- Returns:
this
-
failureRetentionPeriod
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.
- Parameters:
failureRetentionPeriod
- The number of days to retain data about failed runs of this canary. This parameter is required.- Returns:
this
-
runConfig
A structure that contains input information for a canary run.If you omit this structure, the frequency of the canary is used as canary's timeout value, up to a maximum of 900 seconds.
- Parameters:
runConfig
- A structure that contains input information for a canary run. This parameter is required.- Returns:
this
-
runConfig
A structure that contains input information for a canary run.If you omit this structure, the frequency of the canary is used as canary's timeout value, up to a maximum of 900 seconds.
- Parameters:
runConfig
- A structure that contains input information for a canary run. This parameter is required.- Returns:
this
-
startCanaryAfterCreation
@Stability(Stable) public CfnCanary.Builder startCanaryAfterCreation(Boolean startCanaryAfterCreation) Specify TRUE to have the canary start making runs immediately after it is created.A canary that you create using CloudFormation can't be used to monitor the CloudFormation stack that creates the canary or to roll back that stack if there is a failure.
- Parameters:
startCanaryAfterCreation
- Specify TRUE to have the canary start making runs immediately after it is created. This parameter is required.- Returns:
this
-
startCanaryAfterCreation
@Stability(Stable) public CfnCanary.Builder startCanaryAfterCreation(IResolvable startCanaryAfterCreation) Specify TRUE to have the canary start making runs immediately after it is created.A canary that you create using CloudFormation can't be used to monitor the CloudFormation stack that creates the canary or to roll back that stack if there is a failure.
- Parameters:
startCanaryAfterCreation
- Specify TRUE to have the canary start making runs immediately after it is created. This parameter is required.- Returns:
this
-
successRetentionPeriod
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.
- Parameters:
successRetentionPeriod
- The number of days to retain data about successful runs of this canary. This parameter is required.- Returns:
this
-
tags
The list of key-value pairs that are associated with the canary.- Parameters:
tags
- The list of key-value pairs that are associated with the canary. This parameter is required.- Returns:
this
-
visualReference
If this canary performs visual monitoring by comparing screenshots, this structure contains the ID of the canary run to use as the baseline for screenshots, and the coordinates of any parts of the screen to ignore during the visual monitoring comparison.- Parameters:
visualReference
- If this canary performs visual monitoring by comparing screenshots, this structure contains the ID of the canary run to use as the baseline for screenshots, and the coordinates of any parts of the screen to ignore during the visual monitoring comparison. This parameter is required.- Returns:
this
-
visualReference
@Stability(Stable) public CfnCanary.Builder visualReference(CfnCanary.VisualReferenceProperty visualReference) If this canary performs visual monitoring by comparing screenshots, this structure contains the ID of the canary run to use as the baseline for screenshots, and the coordinates of any parts of the screen to ignore during the visual monitoring comparison.- Parameters:
visualReference
- If this canary performs visual monitoring by comparing screenshots, this structure contains the ID of the canary run to use as the baseline for screenshots, and the coordinates of any parts of the screen to ignore during the visual monitoring comparison. This parameter is required.- Returns:
this
-
vpcConfig
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 .
- Parameters:
vpcConfig
- 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. This parameter is required.- Returns:
this
-
vpcConfig
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 .
- Parameters:
vpcConfig
- 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. This parameter is required.- Returns:
this
-
build
-