@Generated(value="jsii-pacmak/1.71.0 (build f1f58ae)", date="2022-12-07T17:24:41.780Z") @Stability(value=Experimental) public class Canary extends Resource implements IConnectable
Example:
Canary canary = Canary.Builder.create(this, "MyCanary")
.schedule(Schedule.rate(Duration.minutes(5)))
.test(Test.custom(CustomTestOptions.builder()
.code(Code.fromAsset(join(__dirname, "canary")))
.handler("index.handler")
.build()))
.runtime(Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_1)
.environmentVariables(Map.of(
"stage", "prod"))
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
Canary.Builder
(experimental) A fluent builder for
Canary. |
software.amazon.jsii.JsiiObject.InitializationModeIConnectable.Jsii$Default, IConnectable.Jsii$ProxyIResource.Jsii$Default| Modifier | Constructor and Description |
|---|---|
|
Canary(software.constructs.Construct scope,
String id,
CanaryProps props) |
protected |
Canary(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
Canary(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
IBucket |
getArtifactsBucket()
(experimental) Bucket where data from each canary run is stored.
|
String |
getCanaryId()
(experimental) The canary ID.
|
String |
getCanaryName()
(experimental) The canary Name.
|
String |
getCanaryState()
(experimental) The state of the canary.
|
Connections |
getConnections()
(experimental) Access the Connections object.
|
IRole |
getRole()
(experimental) Execution role associated with this Canary.
|
Metric |
metricDuration()
(experimental) Measure the Duration of a single canary run, in seconds.
|
Metric |
metricDuration(MetricOptions options)
(experimental) Measure the Duration of a single canary run, in seconds.
|
Metric |
metricFailed()
(experimental) Measure the number of failed canary runs over a given time period.
|
Metric |
metricFailed(MetricOptions options)
(experimental) Measure the number of failed canary runs over a given time period.
|
Metric |
metricSuccessPercent()
(experimental) Measure the percentage of successful canary runs.
|
Metric |
metricSuccessPercent(MetricOptions options)
(experimental) Measure the percentage of successful canary runs.
|
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResourcegetNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validatejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetNodeprotected Canary(software.amazon.jsii.JsiiObjectRef objRef)
protected Canary(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Experimental)
public Canary(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
CanaryProps props)
scope - This parameter is required.id - This parameter is required.props - This parameter is required.@Stability(value=Experimental) @NotNull public Metric metricDuration(@Nullable MetricOptions options)
Default: avg over 5 minutes
options - - configuration options for the metric.@Stability(value=Experimental) @NotNull public Metric metricDuration()
Default: avg over 5 minutes
@Stability(value=Experimental) @NotNull public Metric metricFailed(@Nullable MetricOptions options)
Default: sum over 5 minutes
options - - configuration options for the metric.@Stability(value=Experimental) @NotNull public Metric metricFailed()
Default: sum over 5 minutes
@Stability(value=Experimental) @NotNull public Metric metricSuccessPercent(@Nullable MetricOptions options)
Default: avg over 5 minutes
options - - configuration options for the metric.@Stability(value=Experimental) @NotNull public Metric metricSuccessPercent()
Default: avg over 5 minutes
@Stability(value=Experimental) @NotNull public IBucket getArtifactsBucket()
@Stability(value=Experimental) @NotNull public String getCanaryId()
@Stability(value=Experimental) @NotNull public String getCanaryName()
@Stability(value=Experimental) @NotNull public String getCanaryState()
For example, 'RUNNING', 'STOPPED', 'NOT STARTED', or 'ERROR'.
@Stability(value=Experimental) @NotNull public Connections getConnections()
Will fail if not a VPC-enabled Canary
getConnections in interface IConnectable@Stability(value=Experimental) @NotNull public IRole getRole()
Copyright © 2022. All rights reserved.