Class CfnCanaryMixinProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnCanaryMixinProps>
- Enclosing interface:
CfnCanaryMixinProps
CfnCanaryMixinProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionartifactConfig(CfnCanaryPropsMixin.ArtifactConfigProperty artifactConfig) Sets the value ofCfnCanaryMixinProps.getArtifactConfig()artifactConfig(IResolvable artifactConfig) Sets the value ofCfnCanaryMixinProps.getArtifactConfig()artifactS3Location(String artifactS3Location) Sets the value ofCfnCanaryMixinProps.getArtifactS3Location()browserConfigs(List<? extends Object> browserConfigs) Sets the value ofCfnCanaryMixinProps.getBrowserConfigs()browserConfigs(IResolvable browserConfigs) Sets the value ofCfnCanaryMixinProps.getBrowserConfigs()build()Builds the configured instance.Sets the value ofCfnCanaryMixinProps.getCode()code(IResolvable code) Sets the value ofCfnCanaryMixinProps.getCode()deleteLambdaResourcesOnCanaryDeletion(Boolean deleteLambdaResourcesOnCanaryDeletion) Deprecated.this property has been deprecateddeleteLambdaResourcesOnCanaryDeletion(IResolvable deleteLambdaResourcesOnCanaryDeletion) Deprecated.this property has been deprecateddryRunAndUpdate(Boolean dryRunAndUpdate) Sets the value ofCfnCanaryMixinProps.getDryRunAndUpdate()dryRunAndUpdate(IResolvable dryRunAndUpdate) Sets the value ofCfnCanaryMixinProps.getDryRunAndUpdate()executionRoleArn(String executionRoleArn) Sets the value ofCfnCanaryMixinProps.getExecutionRoleArn()executionRoleArn(IRoleRef executionRoleArn) Sets the value ofCfnCanaryMixinProps.getExecutionRoleArn()failureRetentionPeriod(Number failureRetentionPeriod) Sets the value ofCfnCanaryMixinProps.getFailureRetentionPeriod()Sets the value ofCfnCanaryMixinProps.getName()provisionedResourceCleanup(String provisionedResourceCleanup) Sets the value ofCfnCanaryMixinProps.getProvisionedResourceCleanup()resourcesToReplicateTags(List<String> resourcesToReplicateTags) Sets the value ofCfnCanaryMixinProps.getResourcesToReplicateTags()runConfig(CfnCanaryPropsMixin.RunConfigProperty runConfig) Sets the value ofCfnCanaryMixinProps.getRunConfig()runConfig(IResolvable runConfig) Sets the value ofCfnCanaryMixinProps.getRunConfig()runtimeVersion(String runtimeVersion) Sets the value ofCfnCanaryMixinProps.getRuntimeVersion()schedule(CfnCanaryPropsMixin.ScheduleProperty schedule) Sets the value ofCfnCanaryMixinProps.getSchedule()schedule(IResolvable schedule) Sets the value ofCfnCanaryMixinProps.getSchedule()startCanaryAfterCreation(Boolean startCanaryAfterCreation) Sets the value ofCfnCanaryMixinProps.getStartCanaryAfterCreation()startCanaryAfterCreation(IResolvable startCanaryAfterCreation) Sets the value ofCfnCanaryMixinProps.getStartCanaryAfterCreation()successRetentionPeriod(Number successRetentionPeriod) Sets the value ofCfnCanaryMixinProps.getSuccessRetentionPeriod()Sets the value ofCfnCanaryMixinProps.getTags()visualReference(CfnCanaryPropsMixin.VisualReferenceProperty visualReference) Deprecated.this property has been deprecatedvisualReference(IResolvable visualReference) Deprecated.this property has been deprecatedvisualReferences(List<? extends Object> visualReferences) Sets the value ofCfnCanaryMixinProps.getVisualReferences()visualReferences(IResolvable visualReferences) Sets the value ofCfnCanaryMixinProps.getVisualReferences()vpcConfig(CfnCanaryPropsMixin.VPCConfigProperty vpcConfig) Sets the value ofCfnCanaryMixinProps.getVpcConfig()vpcConfig(IResolvable vpcConfig) Sets the value ofCfnCanaryMixinProps.getVpcConfig()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
artifactConfig
Sets the value ofCfnCanaryMixinProps.getArtifactConfig()- 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.- Returns:
this
-
artifactConfig
@Stability(Stable) public CfnCanaryMixinProps.Builder artifactConfig(CfnCanaryPropsMixin.ArtifactConfigProperty artifactConfig) Sets the value ofCfnCanaryMixinProps.getArtifactConfig()- 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.- Returns:
this
-
artifactS3Location
Sets the value ofCfnCanaryMixinProps.getArtifactS3Location()- Parameters:
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, includings3://at the beginning of the path.- Returns:
this
-
browserConfigs
Sets the value ofCfnCanaryMixinProps.getBrowserConfigs()- Parameters:
browserConfigs- A structure that specifies the browser type to use for a canary run. CloudWatch Synthetics supports running canaries on bothCHROMEandFIREFOXbrowsers.If not specified,
browserConfigsdefaults to Chrome.- Returns:
this
-
browserConfigs
@Stability(Stable) public CfnCanaryMixinProps.Builder browserConfigs(List<? extends Object> browserConfigs) Sets the value ofCfnCanaryMixinProps.getBrowserConfigs()- Parameters:
browserConfigs- A structure that specifies the browser type to use for a canary run. CloudWatch Synthetics supports running canaries on bothCHROMEandFIREFOXbrowsers.If not specified,
browserConfigsdefaults to Chrome.- Returns:
this
-
code
Sets the value ofCfnCanaryMixinProps.getCode()- Parameters:
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 ofScript.- Returns:
this
-
code
Sets the value ofCfnCanaryMixinProps.getCode()- Parameters:
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 ofScript.- Returns:
this
-
deleteLambdaResourcesOnCanaryDeletion
@Stability(Deprecated) @Deprecated public CfnCanaryMixinProps.Builder deleteLambdaResourcesOnCanaryDeletion(Boolean deleteLambdaResourcesOnCanaryDeletion) Deprecated.this property has been deprecatedSets the value ofCfnCanaryMixinProps.getDeleteLambdaResourcesOnCanaryDeletion()- Parameters:
deleteLambdaResourcesOnCanaryDeletion- Deletes associated lambda resources created by Synthetics if set to True. Default is False- Returns:
this
-
deleteLambdaResourcesOnCanaryDeletion
@Stability(Deprecated) @Deprecated public CfnCanaryMixinProps.Builder deleteLambdaResourcesOnCanaryDeletion(IResolvable deleteLambdaResourcesOnCanaryDeletion) Deprecated.this property has been deprecatedSets the value ofCfnCanaryMixinProps.getDeleteLambdaResourcesOnCanaryDeletion()- Parameters:
deleteLambdaResourcesOnCanaryDeletion- Deletes associated lambda resources created by Synthetics if set to True. Default is False- Returns:
this
-
dryRunAndUpdate
Sets the value ofCfnCanaryMixinProps.getDryRunAndUpdate()- Parameters:
dryRunAndUpdate- Specifies whether to perform a dry run before updating the canary. If set totrue, CloudFormation will execute a dry run to validate the changes before applying them to the canary. If the dry run succeeds, the canary will be updated with the changes. If the dry run fails, the CloudFormation deployment will fail with the dry run’s failure reason.If set to
falseor omitted, the canary will be updated directly without first performing a dry run. The default value isfalse.For more information, see Performing safe canary updates .
- Returns:
this
-
dryRunAndUpdate
Sets the value ofCfnCanaryMixinProps.getDryRunAndUpdate()- Parameters:
dryRunAndUpdate- Specifies whether to perform a dry run before updating the canary. If set totrue, CloudFormation will execute a dry run to validate the changes before applying them to the canary. If the dry run succeeds, the canary will be updated with the changes. If the dry run fails, the CloudFormation deployment will fail with the dry run’s failure reason.If set to
falseor omitted, the canary will be updated directly without first performing a dry run. The default value isfalse.For more information, see Performing safe canary updates .
- Returns:
this
-
executionRoleArn
Sets the value ofCfnCanaryMixinProps.getExecutionRoleArn()- Parameters:
executionRoleArn- The ARN of the IAM role to be used to run the canary. This role must already exist, and must includelambda.amazonaws.com.rproxy.govskope.usas a principal in the trust policy. The role must also have the following permissions:s3:PutObjects3:GetBucketLocations3:ListAllMyBucketscloudwatch:PutMetricDatalogs:CreateLogGrouplogs:CreateLogStreamlogs:PutLogEvents
- Returns:
this
-
executionRoleArn
Sets the value ofCfnCanaryMixinProps.getExecutionRoleArn()- Parameters:
executionRoleArn- The ARN of the IAM role to be used to run the canary. This role must already exist, and must includelambda.amazonaws.com.rproxy.govskope.usas a principal in the trust policy. The role must also have the following permissions:s3:PutObjects3:GetBucketLocations3:ListAllMyBucketscloudwatch:PutMetricDatalogs:CreateLogGrouplogs:CreateLogStreamlogs:PutLogEvents
- Returns:
this
-
failureRetentionPeriod
@Stability(Stable) public CfnCanaryMixinProps.Builder failureRetentionPeriod(Number failureRetentionPeriod) Sets the value ofCfnCanaryMixinProps.getFailureRetentionPeriod()- Parameters:
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.This setting affects the range of information returned by GetCanaryRuns , as well as the range of information displayed in the Synthetics console.
- Returns:
this
-
name
Sets the value ofCfnCanaryMixinProps.getName()- Parameters:
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 .
- Returns:
this
-
provisionedResourceCleanup
@Stability(Stable) public CfnCanaryMixinProps.Builder provisionedResourceCleanup(String provisionedResourceCleanup) Sets the value ofCfnCanaryMixinProps.getProvisionedResourceCleanup()- Parameters:
provisionedResourceCleanup- Specifies whether to also delete the Lambda functions and layers used by this canary when the canary is deleted. If it isAUTOMATIC, the Lambda functions and layers will be deleted when the canary is deleted.If the value of this parameter is
OFF, then the value of theDeleteLambdaparameter of the DeleteCanary operation determines whether the Lambda functions and layers will be deleted.- Returns:
this
-
resourcesToReplicateTags
@Stability(Stable) public CfnCanaryMixinProps.Builder resourcesToReplicateTags(List<String> resourcesToReplicateTags) Sets the value ofCfnCanaryMixinProps.getResourcesToReplicateTags()- Parameters:
resourcesToReplicateTags- To have the tags that you apply to this canary also be applied to the Lambda function that the canary uses, specify this property with the valuelambda-function. If you do this, CloudWatch Synthetics will keep the tags of the canary and the Lambda function synchronized. Any future changes you make to the canary's tags will also be applied to the function.- Returns:
this
-
runConfig
Sets the value ofCfnCanaryMixinProps.getRunConfig()- Parameters:
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.- Returns:
this
-
runConfig
@Stability(Stable) public CfnCanaryMixinProps.Builder runConfig(CfnCanaryPropsMixin.RunConfigProperty runConfig) Sets the value ofCfnCanaryMixinProps.getRunConfig()- Parameters:
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.- Returns:
this
-
runtimeVersion
Sets the value ofCfnCanaryMixinProps.getRuntimeVersion()- Parameters:
runtimeVersion- Specifies the runtime version to use for the canary. For more information about runtime versions, see Canary Runtime Versions .- Returns:
this
-
schedule
Sets the value ofCfnCanaryMixinProps.getSchedule()- Parameters:
schedule- A structure that contains information about how often the canary is to run, and when these runs are to stop.- Returns:
this
-
schedule
@Stability(Stable) public CfnCanaryMixinProps.Builder schedule(CfnCanaryPropsMixin.ScheduleProperty schedule) Sets the value ofCfnCanaryMixinProps.getSchedule()- Parameters:
schedule- A structure that contains information about how often the canary is to run, and when these runs are to stop.- Returns:
this
-
startCanaryAfterCreation
@Stability(Stable) public CfnCanaryMixinProps.Builder startCanaryAfterCreation(Boolean startCanaryAfterCreation) Sets the value ofCfnCanaryMixinProps.getStartCanaryAfterCreation()- Parameters:
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.- Returns:
this
-
startCanaryAfterCreation
@Stability(Stable) public CfnCanaryMixinProps.Builder startCanaryAfterCreation(IResolvable startCanaryAfterCreation) Sets the value ofCfnCanaryMixinProps.getStartCanaryAfterCreation()- Parameters:
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.- Returns:
this
-
successRetentionPeriod
@Stability(Stable) public CfnCanaryMixinProps.Builder successRetentionPeriod(Number successRetentionPeriod) Sets the value ofCfnCanaryMixinProps.getSuccessRetentionPeriod()- Parameters:
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.This setting affects the range of information returned by GetCanaryRuns , as well as the range of information displayed in the Synthetics console.
- Returns:
this
-
tags
Sets the value ofCfnCanaryMixinProps.getTags()- Parameters:
tags- The list of key-value pairs that are associated with the canary.- Returns:
this
-
visualReference
@Stability(Deprecated) @Deprecated public CfnCanaryMixinProps.Builder visualReference(IResolvable visualReference) Deprecated.this property has been deprecatedSets the value ofCfnCanaryMixinProps.getVisualReference()- Parameters:
visualReference- the value to be set.- Returns:
this
-
visualReference
@Stability(Deprecated) @Deprecated public CfnCanaryMixinProps.Builder visualReference(CfnCanaryPropsMixin.VisualReferenceProperty visualReference) Deprecated.this property has been deprecatedSets the value ofCfnCanaryMixinProps.getVisualReference()- Parameters:
visualReference- the value to be set.- Returns:
this
-
visualReferences
@Stability(Stable) public CfnCanaryMixinProps.Builder visualReferences(IResolvable visualReferences) Sets the value ofCfnCanaryMixinProps.getVisualReferences()- Parameters:
visualReferences- 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.syn-nodejs-puppeteer-11.0and above, andsyn-nodejs-playwright-3.0and above, only supportsvisualReferences.visualReferencefield is not supported.Versions older than
syn-nodejs-puppeteer-11.0supports bothvisualReferenceandvisualReferencesfor backward compatibility. It is recommended to usevisualReferencesfor consistency and future compatibility.- Returns:
this
-
visualReferences
@Stability(Stable) public CfnCanaryMixinProps.Builder visualReferences(List<? extends Object> visualReferences) Sets the value ofCfnCanaryMixinProps.getVisualReferences()- Parameters:
visualReferences- 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.syn-nodejs-puppeteer-11.0and above, andsyn-nodejs-playwright-3.0and above, only supportsvisualReferences.visualReferencefield is not supported.Versions older than
syn-nodejs-puppeteer-11.0supports bothvisualReferenceandvisualReferencesfor backward compatibility. It is recommended to usevisualReferencesfor consistency and future compatibility.- Returns:
this
-
vpcConfig
Sets the value ofCfnCanaryMixinProps.getVpcConfig()- 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. For more information, see Running a Canary in a VPC .- Returns:
this
-
vpcConfig
@Stability(Stable) public CfnCanaryMixinProps.Builder vpcConfig(CfnCanaryPropsMixin.VPCConfigProperty vpcConfig) Sets the value ofCfnCanaryMixinProps.getVpcConfig()- 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. For more information, see Running a Canary in a VPC .- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnCanaryMixinProps>- Returns:
- a new instance of
CfnCanaryMixinProps - Throws:
NullPointerException- if any required attribute was not provided
-