@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-28T21:34:23.082Z") 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 . |
IConnectable.Jsii$Default, IConnectable.Jsii$Proxy
IResource.Jsii$Default
Modifier | Constructor and Description |
---|---|
protected |
Canary(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
Canary(software.amazon.jsii.JsiiObjectRef objRef) |
|
Canary(software.constructs.Construct scope,
java.lang.String id,
CanaryProps props) |
Modifier and Type | Method and Description |
---|---|
IBucket |
getArtifactsBucket()
(experimental) Bucket where data from each canary run is stored.
|
java.lang.String |
getCanaryId()
(experimental) The canary ID.
|
java.lang.String |
getCanaryName()
(experimental) The canary Name.
|
java.lang.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, isResource
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getNode
protected Canary(software.amazon.jsii.JsiiObjectRef objRef)
protected Canary(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public Canary(software.constructs.Construct scope, java.lang.String id, CanaryProps props)
scope
- This parameter is required.id
- This parameter is required.props
- This parameter is required.public Metric metricDuration(MetricOptions options)
Default: avg over 5 minutes
options
- - configuration options for the metric.public Metric metricDuration()
Default: avg over 5 minutes
public Metric metricFailed(MetricOptions options)
Default: sum over 5 minutes
options
- - configuration options for the metric.public Metric metricFailed()
Default: sum over 5 minutes
public Metric metricSuccessPercent(MetricOptions options)
Default: avg over 5 minutes
options
- - configuration options for the metric.public Metric metricSuccessPercent()
Default: avg over 5 minutes
public IBucket getArtifactsBucket()
public java.lang.String getCanaryId()
public java.lang.String getCanaryName()
public java.lang.String getCanaryState()
For example, 'RUNNING', 'STOPPED', 'NOT STARTED', or 'ERROR'.
public Connections getConnections()
Will fail if not a VPC-enabled Canary
getConnections
in interface IConnectable
public IRole getRole()