@Generated(value="jsii-pacmak/1.26.0 (build 7d76e02)", date="2021-03-25T11:30:28.977Z") @Stability(value=Experimental) public abstract class Code extends software.amazon.jsii.JsiiObject
| Modifier | Constructor and Description |
|---|---|
protected |
Code() |
protected |
Code(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
Code(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
abstract CodeConfig |
bind(Construct scope,
String handler)
(experimental) Called when the canary is initialized to allow this object to bind to the stack, add resources and have fun.
|
static AssetCode |
fromAsset(String assetPath)
(experimental) Specify code from a local path.
|
static AssetCode |
fromAsset(String assetPath,
AssetOptions options)
(experimental) Specify code from a local path.
|
static S3Code |
fromBucket(IBucket bucket,
String key)
(experimental) Specify code from an s3 bucket.
|
static S3Code |
fromBucket(IBucket bucket,
String key,
String objectVersion)
(experimental) Specify code from an s3 bucket.
|
static InlineCode |
fromInline(String code)
(experimental) Specify code inline.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected Code(software.amazon.jsii.JsiiObjectRef objRef)
protected Code(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Experimental) protected Code()
@Stability(value=Experimental) @NotNull public static AssetCode fromAsset(@NotNull String assetPath, @Nullable AssetOptions options)
Path must include the folder structure nodejs/node_modules/myCanaryFilename.js.
assetPath - Either a directory or a .zip file. This parameter is required.options - https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_WritingCanary.html#CloudWatch_Synthetics_Canaries_write_from_scratch@Stability(value=Experimental) @NotNull public static AssetCode fromAsset(@NotNull String assetPath)
Path must include the folder structure nodejs/node_modules/myCanaryFilename.js.
assetPath - Either a directory or a .zip file. This parameter is required.https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_WritingCanary.html#CloudWatch_Synthetics_Canaries_write_from_scratch@Stability(value=Experimental) @NotNull public static S3Code fromBucket(@NotNull IBucket bucket, @NotNull String key, @Nullable String objectVersion)
The object in the s3 bucket must be a .zip file that contains
the structure nodejs/node_modules/myCanaryFilename.js.
bucket - The S3 bucket. This parameter is required.key - The object key. This parameter is required.objectVersion - Optional S3 object version.https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_WritingCanary.html#CloudWatch_Synthetics_Canaries_write_from_scratch@Stability(value=Experimental) @NotNull public static S3Code fromBucket(@NotNull IBucket bucket, @NotNull String key)
The object in the s3 bucket must be a .zip file that contains
the structure nodejs/node_modules/myCanaryFilename.js.
bucket - The S3 bucket. This parameter is required.key - The object key. This parameter is required.https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_WritingCanary.html#CloudWatch_Synthetics_Canaries_write_from_scratch@Stability(value=Experimental) @NotNull public static InlineCode fromInline(@NotNull String code)
code - The actual handler code (limited to 4KiB). This parameter is required.@Stability(value=Experimental) @NotNull public abstract CodeConfig bind(@NotNull Construct scope, @NotNull String handler)
scope - The binding scope. This parameter is required.handler - This parameter is required.Copyright © 2021. All rights reserved.