@Generated(value="jsii-pacmak/1.60.0 (build ebcefe6)",
date="2022-06-22T23:27:56.215Z")
public interface CfnCanaryProps
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") .build()) .executionRoleArn("executionRoleArn") .name("name") .runtimeVersion("runtimeVersion") .schedule(ScheduleProperty.builder() .expression("expression") // the properties below are optional .durationInSeconds("durationInSeconds") .build()) .startCanaryAfterCreation(false) // 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()) .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();
Modifier and Type | Interface and Description |
---|---|
static class |
CfnCanaryProps.Builder
A builder for
CfnCanaryProps |
static class |
CfnCanaryProps.Jsii$Proxy
An implementation for
CfnCanaryProps |
Modifier and Type | Method and Description |
---|---|
static CfnCanaryProps.Builder |
builder() |
default java.lang.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.
|
java.lang.String |
getArtifactS3Location()
The location in Amazon S3 where Synthetics stores artifacts from the runs of this canary.
|
java.lang.Object |
getCode()
Use this structure to input your script code for the canary.
|
default java.lang.Object |
getDeleteLambdaResourcesOnCanaryDeletion()
Specifies whether AWS CloudFormation is to also delete the Lambda functions and layers used by this canary, when the canary is deleted.
|
java.lang.String |
getExecutionRoleArn()
The ARN of the IAM role to be used to run the canary.
|
default java.lang.Number |
getFailureRetentionPeriod()
The number of days to retain data about failed runs of this canary.
|
java.lang.String |
getName()
The name for this canary.
|
default java.lang.Object |
getRunConfig()
A structure that contains input information for a canary run.
|
java.lang.String |
getRuntimeVersion()
Specifies the runtime version to use for the canary.
|
java.lang.Object |
getSchedule()
A structure that contains information about how often the canary is to run, and when these runs are to stop.
|
java.lang.Object |
getStartCanaryAfterCreation()
Specify TRUE to have the canary start making runs immediately after it is created.
|
default java.lang.Number |
getSuccessRetentionPeriod()
The number of days to retain data about successful runs of this canary.
|
default java.util.List<CfnTag> |
getTags()
The list of key-value pairs that are associated with the canary.
|
default java.lang.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.
|
default java.lang.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.
|
java.lang.String getArtifactS3Location()
Artifacts include the log file, screenshots, and HAR files. Specify the full location path, including s3://
at the beginning of the path.
java.lang.Object getCode()
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
.
java.lang.String getExecutionRoleArn()
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
java.lang.String getName()
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 .
java.lang.String getRuntimeVersion()
For more information about runtime versions, see Canary Runtime Versions .
java.lang.Object getSchedule()
java.lang.Object getStartCanaryAfterCreation()
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.
default java.lang.Object getArtifactConfig()
default java.lang.Object getDeleteLambdaResourcesOnCanaryDeletion()
The default is false.
default java.lang.Number getFailureRetentionPeriod()
If you omit this field, the default of 31 days is used. The valid range is 1 to 455 days.
default java.lang.Object getRunConfig()
If you omit this structure, the frequency of the canary is used as canary's timeout value, up to a maximum of 900 seconds.
default java.lang.Number getSuccessRetentionPeriod()
If you omit this field, the default of 31 days is used. The valid range is 1 to 455 days.
default java.util.List<CfnTag> getTags()
default java.lang.Object getVisualReference()
default java.lang.Object getVpcConfig()
For more information, see Running a Canary in a VPC .
static CfnCanaryProps.Builder builder()
CfnCanaryProps.Builder
of CfnCanaryProps