We recommend new projects start with resources from the AWS provider.
aws-native.lightsail.Alarm
Explore with Pulumi AI
We recommend new projects start with resources from the AWS provider.
Resource Type definition for AWS::Lightsail::Alarm
Create Alarm Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Alarm(name: string, args: AlarmArgs, opts?: CustomResourceOptions);@overload
def Alarm(resource_name: str,
          args: AlarmArgs,
          opts: Optional[ResourceOptions] = None)
@overload
def Alarm(resource_name: str,
          opts: Optional[ResourceOptions] = None,
          comparison_operator: Optional[str] = None,
          evaluation_periods: Optional[int] = None,
          metric_name: Optional[str] = None,
          monitored_resource_name: Optional[str] = None,
          threshold: Optional[float] = None,
          alarm_name: Optional[str] = None,
          contact_protocols: Optional[Sequence[str]] = None,
          datapoints_to_alarm: Optional[int] = None,
          notification_enabled: Optional[bool] = None,
          notification_triggers: Optional[Sequence[str]] = None,
          treat_missing_data: Optional[str] = None)func NewAlarm(ctx *Context, name string, args AlarmArgs, opts ...ResourceOption) (*Alarm, error)public Alarm(string name, AlarmArgs args, CustomResourceOptions? opts = null)type: aws-native:lightsail:Alarm
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args AlarmArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args AlarmArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args AlarmArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AlarmArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AlarmArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Alarm Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Alarm resource accepts the following input properties:
- ComparisonOperator string
- The arithmetic operation to use when comparing the specified statistic to the threshold. The specified statistic value is used as the first operand.
- EvaluationPeriods int
- The number of most recent periods over which data is compared to the specified threshold. If you are setting an "M out of N" alarm, this value (evaluationPeriods) is the N.
- MetricName string
- The name of the metric to associate with the alarm.
- MonitoredResource stringName 
- The name of the Lightsail resource that the alarm monitors.
- Threshold double
- The value against which the specified statistic is compared.
- AlarmName string
- The name for the alarm. Specify the name of an existing alarm to update, and overwrite the previous configuration of the alarm.
- ContactProtocols List<string>
- The contact protocols to use for the alarm, such as Email, SMS (text messaging), or both.
- DatapointsTo intAlarm 
- The number of data points that must be not within the specified threshold to trigger the alarm. If you are setting an "M out of N" alarm, this value (datapointsToAlarm) is the M.
- NotificationEnabled bool
- Indicates whether the alarm is enabled. Notifications are enabled by default if you don't specify this parameter.
- NotificationTriggers List<string>
- The alarm states that trigger a notification.
- TreatMissing stringData 
- Sets how this alarm will handle missing data points.
- ComparisonOperator string
- The arithmetic operation to use when comparing the specified statistic to the threshold. The specified statistic value is used as the first operand.
- EvaluationPeriods int
- The number of most recent periods over which data is compared to the specified threshold. If you are setting an "M out of N" alarm, this value (evaluationPeriods) is the N.
- MetricName string
- The name of the metric to associate with the alarm.
- MonitoredResource stringName 
- The name of the Lightsail resource that the alarm monitors.
- Threshold float64
- The value against which the specified statistic is compared.
- AlarmName string
- The name for the alarm. Specify the name of an existing alarm to update, and overwrite the previous configuration of the alarm.
- ContactProtocols []string
- The contact protocols to use for the alarm, such as Email, SMS (text messaging), or both.
- DatapointsTo intAlarm 
- The number of data points that must be not within the specified threshold to trigger the alarm. If you are setting an "M out of N" alarm, this value (datapointsToAlarm) is the M.
- NotificationEnabled bool
- Indicates whether the alarm is enabled. Notifications are enabled by default if you don't specify this parameter.
- NotificationTriggers []string
- The alarm states that trigger a notification.
- TreatMissing stringData 
- Sets how this alarm will handle missing data points.
- comparisonOperator String
- The arithmetic operation to use when comparing the specified statistic to the threshold. The specified statistic value is used as the first operand.
- evaluationPeriods Integer
- The number of most recent periods over which data is compared to the specified threshold. If you are setting an "M out of N" alarm, this value (evaluationPeriods) is the N.
- metricName String
- The name of the metric to associate with the alarm.
- monitoredResource StringName 
- The name of the Lightsail resource that the alarm monitors.
- threshold Double
- The value against which the specified statistic is compared.
- alarmName String
- The name for the alarm. Specify the name of an existing alarm to update, and overwrite the previous configuration of the alarm.
- contactProtocols List<String>
- The contact protocols to use for the alarm, such as Email, SMS (text messaging), or both.
- datapointsTo IntegerAlarm 
- The number of data points that must be not within the specified threshold to trigger the alarm. If you are setting an "M out of N" alarm, this value (datapointsToAlarm) is the M.
- notificationEnabled Boolean
- Indicates whether the alarm is enabled. Notifications are enabled by default if you don't specify this parameter.
- notificationTriggers List<String>
- The alarm states that trigger a notification.
- treatMissing StringData 
- Sets how this alarm will handle missing data points.
- comparisonOperator string
- The arithmetic operation to use when comparing the specified statistic to the threshold. The specified statistic value is used as the first operand.
- evaluationPeriods number
- The number of most recent periods over which data is compared to the specified threshold. If you are setting an "M out of N" alarm, this value (evaluationPeriods) is the N.
- metricName string
- The name of the metric to associate with the alarm.
- monitoredResource stringName 
- The name of the Lightsail resource that the alarm monitors.
- threshold number
- The value against which the specified statistic is compared.
- alarmName string
- The name for the alarm. Specify the name of an existing alarm to update, and overwrite the previous configuration of the alarm.
- contactProtocols string[]
- The contact protocols to use for the alarm, such as Email, SMS (text messaging), or both.
- datapointsTo numberAlarm 
- The number of data points that must be not within the specified threshold to trigger the alarm. If you are setting an "M out of N" alarm, this value (datapointsToAlarm) is the M.
- notificationEnabled boolean
- Indicates whether the alarm is enabled. Notifications are enabled by default if you don't specify this parameter.
- notificationTriggers string[]
- The alarm states that trigger a notification.
- treatMissing stringData 
- Sets how this alarm will handle missing data points.
- comparison_operator str
- The arithmetic operation to use when comparing the specified statistic to the threshold. The specified statistic value is used as the first operand.
- evaluation_periods int
- The number of most recent periods over which data is compared to the specified threshold. If you are setting an "M out of N" alarm, this value (evaluationPeriods) is the N.
- metric_name str
- The name of the metric to associate with the alarm.
- monitored_resource_ strname 
- The name of the Lightsail resource that the alarm monitors.
- threshold float
- The value against which the specified statistic is compared.
- alarm_name str
- The name for the alarm. Specify the name of an existing alarm to update, and overwrite the previous configuration of the alarm.
- contact_protocols Sequence[str]
- The contact protocols to use for the alarm, such as Email, SMS (text messaging), or both.
- datapoints_to_ intalarm 
- The number of data points that must be not within the specified threshold to trigger the alarm. If you are setting an "M out of N" alarm, this value (datapointsToAlarm) is the M.
- notification_enabled bool
- Indicates whether the alarm is enabled. Notifications are enabled by default if you don't specify this parameter.
- notification_triggers Sequence[str]
- The alarm states that trigger a notification.
- treat_missing_ strdata 
- Sets how this alarm will handle missing data points.
- comparisonOperator String
- The arithmetic operation to use when comparing the specified statistic to the threshold. The specified statistic value is used as the first operand.
- evaluationPeriods Number
- The number of most recent periods over which data is compared to the specified threshold. If you are setting an "M out of N" alarm, this value (evaluationPeriods) is the N.
- metricName String
- The name of the metric to associate with the alarm.
- monitoredResource StringName 
- The name of the Lightsail resource that the alarm monitors.
- threshold Number
- The value against which the specified statistic is compared.
- alarmName String
- The name for the alarm. Specify the name of an existing alarm to update, and overwrite the previous configuration of the alarm.
- contactProtocols List<String>
- The contact protocols to use for the alarm, such as Email, SMS (text messaging), or both.
- datapointsTo NumberAlarm 
- The number of data points that must be not within the specified threshold to trigger the alarm. If you are setting an "M out of N" alarm, this value (datapointsToAlarm) is the M.
- notificationEnabled Boolean
- Indicates whether the alarm is enabled. Notifications are enabled by default if you don't specify this parameter.
- notificationTriggers List<String>
- The alarm states that trigger a notification.
- treatMissing StringData 
- Sets how this alarm will handle missing data points.
Outputs
All input properties are implicitly available as output properties. Additionally, the Alarm resource produces the following output properties:
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
We recommend new projects start with resources from the AWS provider.