Interface CfnCanary.CodeProperty
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnCanary.CodeProperty.Jsii$Proxy
- Enclosing class:
- CfnCanary
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
.
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.*; CodeProperty codeProperty = CodeProperty.builder() .handler("handler") // the properties below are optional .s3Bucket("s3Bucket") .s3Key("s3Key") .s3ObjectVersion("s3ObjectVersion") .script("script") .sourceLocationArn("sourceLocationArn") .build();
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forCfnCanary.CodeProperty
static final class
An implementation forCfnCanary.CodeProperty
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
The entry point to use for the source code when running the canary.default String
If your canary script is located in S3, specify the bucket name here.default String
getS3Key()
The S3 key of your script.default String
The S3 version ID of your script.default String
If you input your canary script directly into the canary instead of referring to an S3 location, the value of this parameter is the script in plain text.default String
The ARN of the Lambda layer where Synthetics stores the canary script code.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getHandler
The entry point to use for the source code when running the canary.For canaries that use the
syn-python-selenium-1.0
runtime or asyn-nodejs.puppeteer
runtime earlier thansyn-nodejs.puppeteer-3.4
, the handler must be specified as*fileName* .handler
. Forsyn-python-selenium-1.1
,syn-nodejs.puppeteer-3.4
, and later runtimes, the handler can be specified as*fileName* . *functionName*
, or you can specify a folder where canary scripts reside as*folder* / *fileName* . *functionName*
. -
getS3Bucket
If your canary script is located in S3, specify the bucket name here.The bucket must already exist.
-
getS3Key
The S3 key of your script.For more information, see Working with Amazon S3 Objects .
-
getS3ObjectVersion
The S3 version ID of your script. -
getScript
If you input your canary script directly into the canary instead of referring to an S3 location, the value of this parameter is the script in plain text.It can be up to 5 MB.
-
getSourceLocationArn
The ARN of the Lambda layer where Synthetics stores the canary script code. -
builder
- Returns:
- a
CfnCanary.CodeProperty.Builder
ofCfnCanary.CodeProperty
-