Class CfnCanaryPropsMixin.CodeProperty.Builder
java.lang.Object
software.amazon.awscdk.cfnpropertymixins.services.synthetics.CfnCanaryPropsMixin.CodeProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnCanaryPropsMixin.CodeProperty>
- Enclosing interface:
CfnCanaryPropsMixin.CodeProperty
@Stability(Stable)
public static final class CfnCanaryPropsMixin.CodeProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnCanaryPropsMixin.CodeProperty>
A builder for
CfnCanaryPropsMixin.CodeProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionblueprintTypes(List<String> blueprintTypes) Sets the value ofCfnCanaryPropsMixin.CodeProperty.getBlueprintTypes()build()Builds the configured instance.dependencies(List<? extends Object> dependencies) Sets the value ofCfnCanaryPropsMixin.CodeProperty.getDependencies()dependencies(IResolvable dependencies) Sets the value ofCfnCanaryPropsMixin.CodeProperty.getDependencies()Sets the value ofCfnCanaryPropsMixin.CodeProperty.getHandler()Sets the value ofCfnCanaryPropsMixin.CodeProperty.getS3Bucket()s3Bucket(IBucketRef s3Bucket) Sets the value ofCfnCanaryPropsMixin.CodeProperty.getS3Bucket()Sets the value ofCfnCanaryPropsMixin.CodeProperty.getS3Key()s3ObjectVersion(String s3ObjectVersion) Sets the value ofCfnCanaryPropsMixin.CodeProperty.getS3ObjectVersion()Sets the value ofCfnCanaryPropsMixin.CodeProperty.getScript()sourceLocationArn(String sourceLocationArn) Sets the value ofCfnCanaryPropsMixin.CodeProperty.getSourceLocationArn()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
blueprintTypes
@Stability(Stable) public CfnCanaryPropsMixin.CodeProperty.Builder blueprintTypes(List<String> blueprintTypes) Sets the value ofCfnCanaryPropsMixin.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
@Stability(Stable) public CfnCanaryPropsMixin.CodeProperty.Builder dependencies(IResolvable dependencies) Sets the value ofCfnCanaryPropsMixin.CodeProperty.getDependencies()- Parameters:
dependencies- List of Lambda layers to attach to the canary.- Returns:
this
-
dependencies
@Stability(Stable) public CfnCanaryPropsMixin.CodeProperty.Builder dependencies(List<? extends Object> dependencies) Sets the value ofCfnCanaryPropsMixin.CodeProperty.getDependencies()- Parameters:
dependencies- List of Lambda layers to attach to the canary.- Returns:
this
-
handler
Sets the value ofCfnCanaryPropsMixin.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 ofCfnCanaryPropsMixin.CodeProperty.getS3Bucket()- Parameters:
s3Bucket- If your canary script is located in S3, specify the bucket name here. The bucket must already exist.- Returns:
this
-
s3Bucket
Sets the value ofCfnCanaryPropsMixin.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 ofCfnCanaryPropsMixin.CodeProperty.getS3Key()- Parameters:
s3Key- The Amazon S3 key of your script. For more information, see Working with Amazon S3 Objects .- Returns:
this
-
s3ObjectVersion
@Stability(Stable) public CfnCanaryPropsMixin.CodeProperty.Builder s3ObjectVersion(String s3ObjectVersion) Sets the value ofCfnCanaryPropsMixin.CodeProperty.getS3ObjectVersion()- Parameters:
s3ObjectVersion- The Amazon S3 version ID of your script.- Returns:
this
-
script
Sets the value ofCfnCanaryPropsMixin.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 CfnCanaryPropsMixin.CodeProperty.Builder sourceLocationArn(String sourceLocationArn) Sets the value ofCfnCanaryPropsMixin.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<CfnCanaryPropsMixin.CodeProperty>- Returns:
- a new instance of
CfnCanaryPropsMixin.CodeProperty - Throws:
NullPointerException- if any required attribute was not provided
-