Interface CfnCanaryProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
CfnCanaryProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:40.463Z") @Stability(Stable) public interface CfnCanaryProps extends software.amazon.jsii.JsiiSerializable
Properties for defining a CfnCanary.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.synthetics.*;
 CfnCanaryProps cfnCanaryProps = CfnCanaryProps.builder()
         .artifactS3Location("artifactS3Location")
         .code(CodeProperty.builder()
                 .handler("handler")
                 // the properties below are optional
                 .s3Bucket("s3Bucket")
                 .s3Key("s3Key")
                 .s3ObjectVersion("s3ObjectVersion")
                 .script("script")
                 .sourceLocationArn("sourceLocationArn")
                 .build())
         .executionRoleArn("executionRoleArn")
         .name("name")
         .runtimeVersion("runtimeVersion")
         .schedule(ScheduleProperty.builder()
                 .expression("expression")
                 // the properties below are optional
                 .durationInSeconds("durationInSeconds")
                 .build())
         // the properties below are optional
         .artifactConfig(ArtifactConfigProperty.builder()
                 .s3Encryption(S3EncryptionProperty.builder()
                         .encryptionMode("encryptionMode")
                         .kmsKeyArn("kmsKeyArn")
                         .build())
                 .build())
         .deleteLambdaResourcesOnCanaryDeletion(false)
         .failureRetentionPeriod(123)
         .runConfig(RunConfigProperty.builder()
                 .activeTracing(false)
                 .environmentVariables(Map.of(
                         "environmentVariablesKey", "environmentVariables"))
                 .memoryInMb(123)
                 .timeoutInSeconds(123)
                 .build())
         .startCanaryAfterCreation(false)
         .successRetentionPeriod(123)
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .visualReference(VisualReferenceProperty.builder()
                 .baseCanaryRunId("baseCanaryRunId")
                 // the properties below are optional
                 .baseScreenshots(List.of(BaseScreenshotProperty.builder()
                         .screenshotName("screenshotName")
                         // the properties below are optional
                         .ignoreCoordinates(List.of("ignoreCoordinates"))
                         .build()))
                 .build())
         .vpcConfig(VPCConfigProperty.builder()
                 .securityGroupIds(List.of("securityGroupIds"))
                 .subnetIds(List.of("subnetIds"))
                 // the properties below are optional
                 .vpcId("vpcId")
                 .build())
         .build();
 
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final class 
    A builder for CfnCanaryProps
    static final class 
    An implementation for CfnCanaryProps
  • Method Summary

    Modifier and Type
    Method
    Description
     
    default Object
    A structure that contains the configuration for canary artifacts, including the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3.
    The location in Amazon S3 where Synthetics stores artifacts from the runs of this canary.
    Use this structure to input your script code for the canary.
    default Object
    AWS::Synthetics::Canary.DeleteLambdaResourcesOnCanaryDeletion.
    The ARN of the IAM role to be used to run the canary.
    default Number
    The number of days to retain data about failed runs of this canary.
    The name for this canary.
    default Object
    A structure that contains input information for a canary run.
    Specifies the runtime version to use for the canary.
    A structure that contains information about how often the canary is to run, and when these runs are to stop.
    default Object
    Specify TRUE to have the canary start making runs immediately after it is created.
    default Number
    The number of days to retain data about successful runs of this canary.
    default List<CfnTag>
    The list of key-value pairs that are associated with the canary.
    default Object
    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.
    default Object
    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.

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Method Details

    • getArtifactS3Location

      @Stability(Stable) @NotNull String getArtifactS3Location()
      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.

    • getCode

      @Stability(Stable) @NotNull Object getCode()
      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 .

    • getExecutionRoleArn

      @Stability(Stable) @NotNull String getExecutionRoleArn()
      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
    • getName

      @Stability(Stable) @NotNull String getName()
      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 .

    • getRuntimeVersion

      @Stability(Stable) @NotNull String getRuntimeVersion()
      Specifies the runtime version to use for the canary.

      For more information about runtime versions, see Canary Runtime Versions .

    • getSchedule

      @Stability(Stable) @NotNull Object getSchedule()
      A structure that contains information about how often the canary is to run, and when these runs are to stop.
    • getArtifactConfig

      @Stability(Stable) @Nullable default Object getArtifactConfig()
      A structure that contains the configuration for canary artifacts, including the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3.
    • getDeleteLambdaResourcesOnCanaryDeletion

      @Stability(Stable) @Nullable default Object getDeleteLambdaResourcesOnCanaryDeletion()
      AWS::Synthetics::Canary.DeleteLambdaResourcesOnCanaryDeletion.
    • getFailureRetentionPeriod

      @Stability(Stable) @Nullable default Number getFailureRetentionPeriod()
      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.

    • getRunConfig

      @Stability(Stable) @Nullable default Object getRunConfig()
      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.

    • getStartCanaryAfterCreation

      @Stability(Stable) @Nullable default Object getStartCanaryAfterCreation()
      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.

    • getSuccessRetentionPeriod

      @Stability(Stable) @Nullable default Number getSuccessRetentionPeriod()
      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.

    • getTags

      @Stability(Stable) @Nullable default List<CfnTag> getTags()
      The list of key-value pairs that are associated with the canary.
    • getVisualReference

      @Stability(Stable) @Nullable default Object getVisualReference()
      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.
    • getVpcConfig

      @Stability(Stable) @Nullable default Object getVpcConfig()
      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 .

    • builder

      @Stability(Stable) static CfnCanaryProps.Builder builder()
      Returns:
      a CfnCanaryProps.Builder of CfnCanaryProps