Class Canary
(experimental) Define a new Canary.
Inherited Members
Namespace: Amazon.CDK.AWS.Synthetics
Assembly: Amazon.CDK.AWS.Synthetics.dll
Syntax (csharp)
public class Canary : Resource, IResource, IConstruct, IDependable, IConnectable
Syntax (vb)
Public Class Canary
Inherits Resource
Implements IResource, IConstruct, IDependable, IConnectable
Remarks
Stability: Experimental
ExampleMetadata: infused
Examples
var canary = new Canary(this, "MyCanary", new CanaryProps {
Schedule = Schedule.Rate(Duration.Minutes(5)),
Test = Test.Custom(new CustomTestOptions {
Code = Code.FromAsset(Join(__dirname, "canary")),
Handler = "index.handler"
}),
Runtime = Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_1,
EnvironmentVariables = new Dictionary<string, string> {
{ "stage", "prod" }
}
});
Synopsis
Constructors
Canary(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
Canary(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Canary(Construct, String, ICanaryProps) |
Properties
ArtifactsBucket | (experimental) Bucket where data from each canary run is stored. |
CanaryId | (experimental) The canary ID. |
CanaryName | (experimental) The canary Name. |
CanaryState | (experimental) The state of the canary. |
Connections | (experimental) Access the Connections object. |
Role | (experimental) Execution role associated with this Canary. |
Methods
MetricDuration(IMetricOptions) | (experimental) Measure the Duration of a single canary run, in seconds. |
MetricFailed(IMetricOptions) | (experimental) Measure the number of failed canary runs over a given time period. |
MetricSuccessPercent(IMetricOptions) | (experimental) Measure the percentage of successful canary runs. |
Constructors
Canary(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected Canary(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
Canary(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected Canary(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Canary(Construct, String, ICanaryProps)
public Canary(Construct scope, string id, ICanaryProps props)
Parameters
- scope Constructs.Construct
- id System.String
- props ICanaryProps
Remarks
Stability: Experimental
Properties
ArtifactsBucket
(experimental) Bucket where data from each canary run is stored.
public virtual IBucket ArtifactsBucket { get; }
Property Value
Remarks
Stability: Experimental
CanaryId
(experimental) The canary ID.
public virtual string CanaryId { get; }
Property Value
System.String
Remarks
Stability: Experimental
Attribute: true
CanaryName
(experimental) The canary Name.
public virtual string CanaryName { get; }
Property Value
System.String
Remarks
Stability: Experimental
Attribute: true
CanaryState
(experimental) The state of the canary.
public virtual string CanaryState { get; }
Property Value
System.String
Remarks
For example, 'RUNNING', 'STOPPED', 'NOT STARTED', or 'ERROR'.
Stability: Experimental
Attribute: true
Connections
(experimental) Access the Connections object.
public virtual Connections_ Connections { get; }
Property Value
Remarks
Will fail if not a VPC-enabled Canary
Stability: Experimental
Role
(experimental) Execution role associated with this Canary.
public virtual IRole Role { get; }
Property Value
Remarks
Stability: Experimental
Methods
MetricDuration(IMetricOptions)
(experimental) Measure the Duration of a single canary run, in seconds.
public virtual Metric MetricDuration(IMetricOptions options = null)
Parameters
- options IMetricOptions
- configuration options for the metric.
Returns
Remarks
Default: avg over 5 minutes
Stability: Experimental
MetricFailed(IMetricOptions)
(experimental) Measure the number of failed canary runs over a given time period.
public virtual Metric MetricFailed(IMetricOptions options = null)
Parameters
- options IMetricOptions
- configuration options for the metric.
Returns
Remarks
Default: sum over 5 minutes
Stability: Experimental
MetricSuccessPercent(IMetricOptions)
(experimental) Measure the percentage of successful canary runs.
public virtual Metric MetricSuccessPercent(IMetricOptions options = null)
Parameters
- options IMetricOptions
- configuration options for the metric.
Returns
Remarks
Default: avg over 5 minutes
Stability: Experimental