Class CfnCanary.CodeProperty.Builder
java.lang.Object
software.amazon.awscdk.services.synthetics.CfnCanary.CodeProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnCanary.CodeProperty>
- Enclosing interface:
CfnCanary.CodeProperty
@Stability(Stable)
public static final class CfnCanary.CodeProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnCanary.CodeProperty>
A builder for
CfnCanary.CodeProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionblueprintTypes(List<String> blueprintTypes) Sets the value ofCfnCanary.CodeProperty.getBlueprintTypes()build()Builds the configured instance.dependencies(List<? extends Object> dependencies) Sets the value ofCfnCanary.CodeProperty.getDependencies()dependencies(IResolvable dependencies) Sets the value ofCfnCanary.CodeProperty.getDependencies()Sets the value ofCfnCanary.CodeProperty.getHandler()Sets the value ofCfnCanary.CodeProperty.getS3Bucket()Sets the value ofCfnCanary.CodeProperty.getS3Key()s3ObjectVersion(String s3ObjectVersion) Sets the value ofCfnCanary.CodeProperty.getS3ObjectVersion()Sets the value ofCfnCanary.CodeProperty.getScript()sourceLocationArn(String sourceLocationArn) Sets the value ofCfnCanary.CodeProperty.getSourceLocationArn()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
blueprintTypes
@Stability(Stable) public CfnCanary.CodeProperty.Builder blueprintTypes(List<String> blueprintTypes) Sets the value ofCfnCanary.CodeProperty.getBlueprintTypes()- Parameters:
blueprintTypes-BlueprintTypesare a list of templates that enable simplified canary creation. You can create canaries for common monitoring scenarios by providing only a JSON configuration file instead of writing custom scripts.multi-checksis the only supported value.When you specify
BlueprintTypes, theHandlerfield cannot be specified since the blueprint provides a pre-defined entry point.- Returns:
this
-
dependencies
Sets the value ofCfnCanary.CodeProperty.getDependencies()- Parameters:
dependencies- List of Lambda layers to attach to the canary.- Returns:
this
-
dependencies
@Stability(Stable) public CfnCanary.CodeProperty.Builder dependencies(List<? extends Object> dependencies) Sets the value ofCfnCanary.CodeProperty.getDependencies()- Parameters:
dependencies- List of Lambda layers to attach to the canary.- Returns:
this
-
handler
Sets the value ofCfnCanary.CodeProperty.getHandler()- Parameters:
handler- The entry point to use for the source code when running the canary. For canaries that use thesyn-python-selenium-1.0runtime or asyn-nodejs.puppeteerruntime 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*.This field is required when you don't specify
BlueprintTypesand is not allowed when you specifyBlueprintTypes.- Returns:
this
-
s3Bucket
Sets the value ofCfnCanary.CodeProperty.getS3Bucket()- Parameters:
s3Bucket- If your canary script is located in S3, specify the bucket name here. The bucket must already exist.- Returns:
this
-
s3Key
Sets the value ofCfnCanary.CodeProperty.getS3Key()- Parameters:
s3Key- The Amazon S3 key of your script. For more information, see Working with Amazon S3 Objects .- Returns:
this
-
s3ObjectVersion
Sets the value ofCfnCanary.CodeProperty.getS3ObjectVersion()- Parameters:
s3ObjectVersion- The Amazon S3 version ID of your script.- Returns:
this
-
script
Sets the value ofCfnCanary.CodeProperty.getScript()- Parameters:
script- 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.- Returns:
this
-
sourceLocationArn
@Stability(Stable) public CfnCanary.CodeProperty.Builder sourceLocationArn(String sourceLocationArn) Sets the value ofCfnCanary.CodeProperty.getSourceLocationArn()- Parameters:
sourceLocationArn- The ARN of the Lambda layer where Synthetics stores the canary script code.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnCanary.CodeProperty>- Returns:
- a new instance of
CfnCanary.CodeProperty - Throws:
NullPointerException- if any required attribute was not provided
-