Class CfnCanaryMixinProps.Builder

java.lang.Object
software.amazon.awscdk.cfnpropertymixins.services.synthetics.CfnCanaryMixinProps.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<CfnCanaryMixinProps>
Enclosing interface:
CfnCanaryMixinProps

@Stability(Stable) public static final class CfnCanaryMixinProps.Builder extends Object implements software.amazon.jsii.Builder<CfnCanaryMixinProps>
A builder for CfnCanaryMixinProps
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • artifactConfig

      @Stability(Stable) public CfnCanaryMixinProps.Builder artifactConfig(IResolvable artifactConfig)
      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)
      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

      @Stability(Stable) public CfnCanaryMixinProps.Builder artifactS3Location(String artifactS3Location)
      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, including s3:// at the beginning of the path.
      Returns:
      this
    • browserConfigs

      @Stability(Stable) public CfnCanaryMixinProps.Builder browserConfigs(IResolvable browserConfigs)
      Parameters:
      browserConfigs - A structure that specifies the browser type to use for a canary run. CloudWatch Synthetics supports running canaries on both CHROME and FIREFOX browsers.

      If not specified, browserConfigs defaults to Chrome.

      Returns:
      this
    • browserConfigs

      @Stability(Stable) public CfnCanaryMixinProps.Builder browserConfigs(List<? extends Object> browserConfigs)
      Parameters:
      browserConfigs - A structure that specifies the browser type to use for a canary run. CloudWatch Synthetics supports running canaries on both CHROME and FIREFOX browsers.

      If not specified, browserConfigs defaults to Chrome.

      Returns:
      this
    • code

      @Stability(Stable) public CfnCanaryMixinProps.Builder code(IResolvable code)
      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 of Script .
      Returns:
      this
    • code

      @Stability(Stable) public CfnCanaryMixinProps.Builder code(CfnCanaryPropsMixin.CodeProperty code)
      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 of Script .
      Returns:
      this
    • deleteLambdaResourcesOnCanaryDeletion

      @Stability(Deprecated) @Deprecated public CfnCanaryMixinProps.Builder deleteLambdaResourcesOnCanaryDeletion(Boolean deleteLambdaResourcesOnCanaryDeletion)
      Deprecated.
      this property has been deprecated
      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 deprecated
      Parameters:
      deleteLambdaResourcesOnCanaryDeletion - Deletes associated lambda resources created by Synthetics if set to True. Default is False
      Returns:
      this
    • dryRunAndUpdate

      @Stability(Stable) public CfnCanaryMixinProps.Builder dryRunAndUpdate(Boolean dryRunAndUpdate)
      Parameters:
      dryRunAndUpdate - Specifies whether to perform a dry run before updating the canary. If set to true , 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 false or omitted, the canary will be updated directly without first performing a dry run. The default value is false .

      For more information, see Performing safe canary updates .

      Returns:
      this
    • dryRunAndUpdate

      @Stability(Stable) public CfnCanaryMixinProps.Builder dryRunAndUpdate(IResolvable dryRunAndUpdate)
      Parameters:
      dryRunAndUpdate - Specifies whether to perform a dry run before updating the canary. If set to true , 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 false or omitted, the canary will be updated directly without first performing a dry run. The default value is false .

      For more information, see Performing safe canary updates .

      Returns:
      this
    • executionRoleArn

      @Stability(Stable) public CfnCanaryMixinProps.Builder executionRoleArn(String executionRoleArn)
      Parameters:
      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
      Returns:
      this
    • executionRoleArn

      @Stability(Stable) public CfnCanaryMixinProps.Builder executionRoleArn(IRoleRef executionRoleArn)
      Parameters:
      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
      Returns:
      this
    • failureRetentionPeriod

      @Stability(Stable) public CfnCanaryMixinProps.Builder failureRetentionPeriod(Number failureRetentionPeriod)
      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

      @Stability(Stable) public CfnCanaryMixinProps.Builder name(String name)
      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)
      Parameters:
      provisionedResourceCleanup - Specifies whether to also delete the Lambda functions and layers used by this canary when the canary is deleted. If it is AUTOMATIC , 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 the DeleteLambda parameter 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)
      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 value lambda-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

      @Stability(Stable) public CfnCanaryMixinProps.Builder runConfig(IResolvable runConfig)
      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)
      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

      @Stability(Stable) public CfnCanaryMixinProps.Builder runtimeVersion(String runtimeVersion)
      Parameters:
      runtimeVersion - Specifies the runtime version to use for the canary. For more information about runtime versions, see Canary Runtime Versions .
      Returns:
      this
    • schedule

      @Stability(Stable) public CfnCanaryMixinProps.Builder schedule(IResolvable schedule)
      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)
      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)
      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)
      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)
      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

      @Stability(Stable) public CfnCanaryMixinProps.Builder tags(List<? extends CfnTag> tags)
      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 deprecated
      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 deprecated
      Parameters:
      visualReference - the value to be set.
      Returns:
      this
    • visualReferences

      @Stability(Stable) public CfnCanaryMixinProps.Builder visualReferences(IResolvable visualReferences)
      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.0 and above, and syn-nodejs-playwright-3.0 and above, only supports visualReferences . visualReference field is not supported.

      Versions older than syn-nodejs-puppeteer-11.0 supports both visualReference and visualReferences for backward compatibility. It is recommended to use visualReferences for consistency and future compatibility.

      Returns:
      this
    • visualReferences

      @Stability(Stable) public CfnCanaryMixinProps.Builder visualReferences(List<? extends Object> visualReferences)
      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.0 and above, and syn-nodejs-playwright-3.0 and above, only supports visualReferences . visualReference field is not supported.

      Versions older than syn-nodejs-puppeteer-11.0 supports both visualReference and visualReferences for backward compatibility. It is recommended to use visualReferences for consistency and future compatibility.

      Returns:
      this
    • vpcConfig

      @Stability(Stable) public CfnCanaryMixinProps.Builder vpcConfig(IResolvable vpcConfig)
      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)
      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

      @Stability(Stable) public CfnCanaryMixinProps build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<CfnCanaryMixinProps>
      Returns:
      a new instance of CfnCanaryMixinProps
      Throws:
      NullPointerException - if any required attribute was not provided