Class Canary
Define a new Canary.
Inherited Members
Namespace: Amazon.CDK.AWS.Synthetics
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class Canary : Resource, IResource, IConnectable
Syntax (vb)
Public Class Canary
Inherits Resource
Implements IResource, IConnectable
Remarks
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_6_2,
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 | Bucket where data from each canary run is stored. |
CanaryId | The canary ID. |
CanaryName | The canary Name. |
CanaryState | The state of the canary. |
Connections | Access the Connections object. |
Role | Execution role associated with this Canary. |
Methods
MetricDuration(IMetricOptions) | Measure the Duration of a single canary run, in seconds. |
MetricFailed(IMetricOptions) | Measure the number of failed canary runs over a given time period. |
MetricSuccessPercent(IMetricOptions) | 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
Properties
ArtifactsBucket
Bucket where data from each canary run is stored.
public virtual IBucket ArtifactsBucket { get; }
Property Value
CanaryId
The canary ID.
public virtual string CanaryId { get; }
Property Value
System.String
Remarks
Attribute: true
CanaryName
The canary Name.
public virtual string CanaryName { get; }
Property Value
System.String
Remarks
Attribute: true
CanaryState
The state of the canary.
public virtual string CanaryState { get; }
Property Value
System.String
Remarks
For example, 'RUNNING', 'STOPPED', 'NOT STARTED', or 'ERROR'.
Attribute: true
Connections
Access the Connections object.
public virtual Connections_ Connections { get; }
Property Value
Remarks
Will fail if not a VPC-enabled Canary
Role
Methods
MetricDuration(IMetricOptions)
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
MetricFailed(IMetricOptions)
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
MetricSuccessPercent(IMetricOptions)
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