Class CfnAlarm
The AWS::Lightsail::Alarm
resource specifies an alarm that can be used to monitor a single metric for one of your Lightsail resources.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.Lightsail
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnAlarm : CfnResource, IInspectable
Syntax (vb)
Public Class CfnAlarm
Inherits CfnResource
Implements IInspectable
Remarks
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-alarm.html
CloudformationResource: AWS::Lightsail::Alarm
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Lightsail;
var cfnAlarm = new CfnAlarm(this, "MyCfnAlarm", new CfnAlarmProps {
AlarmName = "alarmName",
ComparisonOperator = "comparisonOperator",
EvaluationPeriods = 123,
MetricName = "metricName",
MonitoredResourceName = "monitoredResourceName",
Threshold = 123,
// the properties below are optional
ContactProtocols = new [] { "contactProtocols" },
DatapointsToAlarm = 123,
NotificationEnabled = false,
NotificationTriggers = new [] { "notificationTriggers" },
TreatMissingData = "treatMissingData"
});
Synopsis
Constructors
CfnAlarm(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnAlarm(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
CfnAlarm(Construct, String, ICfnAlarmProps) |
Properties
AlarmName | The name of the alarm. |
AttrAlarmArn | The Amazon Resource Name (ARN) of the alarm. |
AttrState | The current state of the alarm. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
ComparisonOperator | The arithmetic operation to use when comparing the specified statistic and threshold. |
ContactProtocols | The contact protocols for the alarm, such as |
DatapointsToAlarm | The number of data points within the evaluation periods that must be breaching to cause the alarm to go to the |
EvaluationPeriods | The number of periods over which data is compared to the specified threshold. |
MetricName | The name of the metric associated with the alarm. |
MonitoredResourceName | The name of the Lightsail resource that the alarm monitors. |
NotificationEnabled | A Boolean value indicating whether the alarm is enabled. |
NotificationTriggers | The alarm states that trigger a notification. |
Threshold | The value against which the specified statistic is compared. |
TreatMissingData | Specifies how the alarm handles missing data points. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnAlarm(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnAlarm(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnAlarm(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnAlarm(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
CfnAlarm(Construct, String, ICfnAlarmProps)
public CfnAlarm(Construct scope, string id, ICfnAlarmProps props)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnAlarmProps
Resource properties.
Properties
AlarmName
The name of the alarm.
public virtual string AlarmName { get; set; }
Property Value
System.String
AttrAlarmArn
The Amazon Resource Name (ARN) of the alarm.
public virtual string AttrAlarmArn { get; }
Property Value
System.String
Remarks
CloudformationAttribute: AlarmArn
AttrState
The current state of the alarm.
public virtual string AttrState { get; }
Property Value
System.String
Remarks
An alarm has the following possible states:
CloudformationAttribute: State
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
ComparisonOperator
The arithmetic operation to use when comparing the specified statistic and threshold.
public virtual string ComparisonOperator { get; set; }
Property Value
System.String
ContactProtocols
The contact protocols for the alarm, such as Email
, SMS
(text messaging), or both.
public virtual string[] ContactProtocols { get; set; }
Property Value
System.String[]
DatapointsToAlarm
The number of data points within the evaluation periods that must be breaching to cause the alarm to go to the ALARM
state.
public virtual Nullable<double> DatapointsToAlarm { get; set; }
Property Value
System.Nullable<System.Double>
EvaluationPeriods
The number of periods over which data is compared to the specified threshold.
public virtual double EvaluationPeriods { get; set; }
Property Value
System.Double
MetricName
The name of the metric associated with the alarm.
public virtual string MetricName { get; set; }
Property Value
System.String
MonitoredResourceName
The name of the Lightsail resource that the alarm monitors.
public virtual string MonitoredResourceName { get; set; }
Property Value
System.String
NotificationEnabled
A Boolean value indicating whether the alarm is enabled.
public virtual object NotificationEnabled { get; set; }
Property Value
System.Object
NotificationTriggers
The alarm states that trigger a notification.
public virtual string[] NotificationTriggers { get; set; }
Property Value
System.String[]
Threshold
The value against which the specified statistic is compared.
public virtual double Threshold { get; set; }
Property Value
System.Double
TreatMissingData
Specifies how the alarm handles missing data points.
public virtual string TreatMissingData { get; set; }
Property Value
System.String
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>