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(Construct, string, ICfnAlarmProps) | The |
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 | The |
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>) | The |
Constructors
CfnAlarm(Construct, string, ICfnAlarmProps)
The AWS::Lightsail::Alarm
resource specifies an alarm that can be used to monitor a single metric for one of your Lightsail resources.
public CfnAlarm(Construct scope, string id, ICfnAlarmProps props)
Parameters
- scope Construct
Scope in which this resource is defined.
- id string
Construct identifier for this resource (unique in its scope).
- props ICfnAlarmProps
Resource properties.
Remarks
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-alarm.html
CloudformationResource: AWS::Lightsail::Alarm
ExampleMetadata: fixture=_generated
Properties
AlarmName
The name of the alarm.
public virtual string AlarmName { get; set; }
Property Value
Remarks
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-alarm.html
CloudformationResource: AWS::Lightsail::Alarm
ExampleMetadata: fixture=_generated
AttrAlarmArn
The Amazon Resource Name (ARN) of the alarm.
public virtual string AttrAlarmArn { get; }
Property Value
Remarks
CloudformationAttribute: AlarmArn
AttrState
The current state of the alarm.
public virtual string AttrState { get; }
Property Value
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
Remarks
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-alarm.html
CloudformationResource: AWS::Lightsail::Alarm
ExampleMetadata: fixture=_generated
CfnProperties
The AWS::Lightsail::Alarm
resource specifies an alarm that can be used to monitor a single metric for one of your Lightsail resources.
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
Overrides
Remarks
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-alarm.html
CloudformationResource: AWS::Lightsail::Alarm
ExampleMetadata: fixture=_generated
ComparisonOperator
The arithmetic operation to use when comparing the specified statistic and threshold.
public virtual string ComparisonOperator { get; set; }
Property Value
Remarks
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-alarm.html
CloudformationResource: AWS::Lightsail::Alarm
ExampleMetadata: fixture=_generated
ContactProtocols
The contact protocols for the alarm, such as Email
, SMS
(text messaging), or both.
public virtual string[]? ContactProtocols { get; set; }
Property Value
string[]
Remarks
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-alarm.html
CloudformationResource: AWS::Lightsail::Alarm
ExampleMetadata: fixture=_generated
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 double? DatapointsToAlarm { get; set; }
Property Value
Remarks
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-alarm.html
CloudformationResource: AWS::Lightsail::Alarm
ExampleMetadata: fixture=_generated
EvaluationPeriods
The number of periods over which data is compared to the specified threshold.
public virtual double EvaluationPeriods { get; set; }
Property Value
Remarks
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-alarm.html
CloudformationResource: AWS::Lightsail::Alarm
ExampleMetadata: fixture=_generated
MetricName
The name of the metric associated with the alarm.
public virtual string MetricName { get; set; }
Property Value
Remarks
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-alarm.html
CloudformationResource: AWS::Lightsail::Alarm
ExampleMetadata: fixture=_generated
MonitoredResourceName
The name of the Lightsail resource that the alarm monitors.
public virtual string MonitoredResourceName { get; set; }
Property Value
Remarks
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-alarm.html
CloudformationResource: AWS::Lightsail::Alarm
ExampleMetadata: fixture=_generated
NotificationEnabled
A Boolean value indicating whether the alarm is enabled.
public virtual object? NotificationEnabled { get; set; }
Property Value
Remarks
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-alarm.html
CloudformationResource: AWS::Lightsail::Alarm
ExampleMetadata: fixture=_generated
NotificationTriggers
The alarm states that trigger a notification.
public virtual string[]? NotificationTriggers { get; set; }
Property Value
string[]
Remarks
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-alarm.html
CloudformationResource: AWS::Lightsail::Alarm
ExampleMetadata: fixture=_generated
Threshold
The value against which the specified statistic is compared.
public virtual double Threshold { get; set; }
Property Value
Remarks
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-alarm.html
CloudformationResource: AWS::Lightsail::Alarm
ExampleMetadata: fixture=_generated
TreatMissingData
Specifies how the alarm handles missing data points.
public virtual string? TreatMissingData { get; set; }
Property Value
Remarks
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-alarm.html
CloudformationResource: AWS::Lightsail::Alarm
ExampleMetadata: fixture=_generated
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.
Remarks
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-alarm.html
CloudformationResource: AWS::Lightsail::Alarm
ExampleMetadata: fixture=_generated
RenderProperties(IDictionary<string, object>)
The AWS::Lightsail::Alarm
resource specifies an alarm that can be used to monitor a single metric for one of your Lightsail resources.
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props IDictionary<string, object>
Returns
Overrides
Remarks
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-alarm.html
CloudformationResource: AWS::Lightsail::Alarm
ExampleMetadata: fixture=_generated