AWS Native is in preview. AWS Classic is fully supported.
aws-native.cloudwatch.getAlarm
Explore with Pulumi AI
AWS Native is in preview. AWS Classic is fully supported.
Resource Type definition for AWS::CloudWatch::Alarm
Using getAlarm
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getAlarm(args: GetAlarmArgs, opts?: InvokeOptions): Promise<GetAlarmResult>
function getAlarmOutput(args: GetAlarmOutputArgs, opts?: InvokeOptions): Output<GetAlarmResult>
def get_alarm(alarm_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetAlarmResult
def get_alarm_output(alarm_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetAlarmResult]
func LookupAlarm(ctx *Context, args *LookupAlarmArgs, opts ...InvokeOption) (*LookupAlarmResult, error)
func LookupAlarmOutput(ctx *Context, args *LookupAlarmOutputArgs, opts ...InvokeOption) LookupAlarmResultOutput
> Note: This function is named LookupAlarm
in the Go SDK.
public static class GetAlarm
{
public static Task<GetAlarmResult> InvokeAsync(GetAlarmArgs args, InvokeOptions? opts = null)
public static Output<GetAlarmResult> Invoke(GetAlarmInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAlarmResult> getAlarm(GetAlarmArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: aws-native:cloudwatch:getAlarm
arguments:
# arguments dictionary
The following arguments are supported:
- Alarm
Name string The name of the alarm.
- Alarm
Name string The name of the alarm.
- alarm
Name String The name of the alarm.
- alarm
Name string The name of the alarm.
- alarm_
name str The name of the alarm.
- alarm
Name String The name of the alarm.
getAlarm Result
The following output properties are available:
- Actions
Enabled bool Indicates whether actions should be executed during any changes to the alarm state. The default is TRUE.
- Alarm
Actions List<string> The list of actions to execute when this alarm transitions into an ALARM state from any other state.
- Alarm
Description string The description of the alarm.
- Arn string
Amazon Resource Name is a unique name for each resource.
- Comparison
Operator string The arithmetic operation to use when comparing the specified statistic and threshold.
- Datapoints
To intAlarm The number of datapoints that must be breaching to trigger the alarm.
- Dimensions
List<Pulumi.
Aws Native. Cloud Watch. Outputs. Alarm Dimension> The dimensions for the metric associated with the alarm. For an alarm based on a math expression, you can't specify Dimensions. Instead, you use Metrics.
- Evaluate
Low stringSample Count Percentile Used only for alarms based on percentiles.
- Evaluation
Periods int The number of periods over which data is compared to the specified threshold.
- Extended
Statistic string The percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100.
- Insufficient
Data List<string>Actions The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state.
- Metric
Name string The name of the metric associated with the alarm.
- Metrics
List<Pulumi.
Aws Native. Cloud Watch. Outputs. Alarm Metric Data Query> An array that enables you to create an alarm based on the result of a metric math expression.
- Namespace string
The namespace of the metric associated with the alarm.
- Ok
Actions List<string> The actions to execute when this alarm transitions to the OK state from any other state.
- Period int
The period in seconds, over which the statistic is applied.
- Statistic string
The statistic for the metric associated with the alarm, other than percentile.
- Threshold double
In an alarm based on an anomaly detection model, this is the ID of the ANOMALY_DETECTION_BAND function used as the threshold for the alarm.
- Threshold
Metric stringId In an alarm based on an anomaly detection model, this is the ID of the ANOMALY_DETECTION_BAND function used as the threshold for the alarm.
- Treat
Missing stringData Sets how this alarm is to handle missing data points. Valid values are breaching, notBreaching, ignore, and missing.
- Unit string
The unit of the metric associated with the alarm.
- Actions
Enabled bool Indicates whether actions should be executed during any changes to the alarm state. The default is TRUE.
- Alarm
Actions []string The list of actions to execute when this alarm transitions into an ALARM state from any other state.
- Alarm
Description string The description of the alarm.
- Arn string
Amazon Resource Name is a unique name for each resource.
- Comparison
Operator string The arithmetic operation to use when comparing the specified statistic and threshold.
- Datapoints
To intAlarm The number of datapoints that must be breaching to trigger the alarm.
- Dimensions
[]Alarm
Dimension The dimensions for the metric associated with the alarm. For an alarm based on a math expression, you can't specify Dimensions. Instead, you use Metrics.
- Evaluate
Low stringSample Count Percentile Used only for alarms based on percentiles.
- Evaluation
Periods int The number of periods over which data is compared to the specified threshold.
- Extended
Statistic string The percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100.
- Insufficient
Data []stringActions The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state.
- Metric
Name string The name of the metric associated with the alarm.
- Metrics
[]Alarm
Metric Data Query An array that enables you to create an alarm based on the result of a metric math expression.
- Namespace string
The namespace of the metric associated with the alarm.
- Ok
Actions []string The actions to execute when this alarm transitions to the OK state from any other state.
- Period int
The period in seconds, over which the statistic is applied.
- Statistic string
The statistic for the metric associated with the alarm, other than percentile.
- Threshold float64
In an alarm based on an anomaly detection model, this is the ID of the ANOMALY_DETECTION_BAND function used as the threshold for the alarm.
- Threshold
Metric stringId In an alarm based on an anomaly detection model, this is the ID of the ANOMALY_DETECTION_BAND function used as the threshold for the alarm.
- Treat
Missing stringData Sets how this alarm is to handle missing data points. Valid values are breaching, notBreaching, ignore, and missing.
- Unit string
The unit of the metric associated with the alarm.
- actions
Enabled Boolean Indicates whether actions should be executed during any changes to the alarm state. The default is TRUE.
- alarm
Actions List<String> The list of actions to execute when this alarm transitions into an ALARM state from any other state.
- alarm
Description String The description of the alarm.
- arn String
Amazon Resource Name is a unique name for each resource.
- comparison
Operator String The arithmetic operation to use when comparing the specified statistic and threshold.
- datapoints
To IntegerAlarm The number of datapoints that must be breaching to trigger the alarm.
- dimensions
List<Alarm
Dimension> The dimensions for the metric associated with the alarm. For an alarm based on a math expression, you can't specify Dimensions. Instead, you use Metrics.
- evaluate
Low StringSample Count Percentile Used only for alarms based on percentiles.
- evaluation
Periods Integer The number of periods over which data is compared to the specified threshold.
- extended
Statistic String The percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100.
- insufficient
Data List<String>Actions The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state.
- metric
Name String The name of the metric associated with the alarm.
- metrics
List<Alarm
Metric Data Query> An array that enables you to create an alarm based on the result of a metric math expression.
- namespace String
The namespace of the metric associated with the alarm.
- ok
Actions List<String> The actions to execute when this alarm transitions to the OK state from any other state.
- period Integer
The period in seconds, over which the statistic is applied.
- statistic String
The statistic for the metric associated with the alarm, other than percentile.
- threshold Double
In an alarm based on an anomaly detection model, this is the ID of the ANOMALY_DETECTION_BAND function used as the threshold for the alarm.
- threshold
Metric StringId In an alarm based on an anomaly detection model, this is the ID of the ANOMALY_DETECTION_BAND function used as the threshold for the alarm.
- treat
Missing StringData Sets how this alarm is to handle missing data points. Valid values are breaching, notBreaching, ignore, and missing.
- unit String
The unit of the metric associated with the alarm.
- actions
Enabled boolean Indicates whether actions should be executed during any changes to the alarm state. The default is TRUE.
- alarm
Actions string[] The list of actions to execute when this alarm transitions into an ALARM state from any other state.
- alarm
Description string The description of the alarm.
- arn string
Amazon Resource Name is a unique name for each resource.
- comparison
Operator string The arithmetic operation to use when comparing the specified statistic and threshold.
- datapoints
To numberAlarm The number of datapoints that must be breaching to trigger the alarm.
- dimensions
Alarm
Dimension[] The dimensions for the metric associated with the alarm. For an alarm based on a math expression, you can't specify Dimensions. Instead, you use Metrics.
- evaluate
Low stringSample Count Percentile Used only for alarms based on percentiles.
- evaluation
Periods number The number of periods over which data is compared to the specified threshold.
- extended
Statistic string The percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100.
- insufficient
Data string[]Actions The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state.
- metric
Name string The name of the metric associated with the alarm.
- metrics
Alarm
Metric Data Query[] An array that enables you to create an alarm based on the result of a metric math expression.
- namespace string
The namespace of the metric associated with the alarm.
- ok
Actions string[] The actions to execute when this alarm transitions to the OK state from any other state.
- period number
The period in seconds, over which the statistic is applied.
- statistic string
The statistic for the metric associated with the alarm, other than percentile.
- threshold number
In an alarm based on an anomaly detection model, this is the ID of the ANOMALY_DETECTION_BAND function used as the threshold for the alarm.
- threshold
Metric stringId In an alarm based on an anomaly detection model, this is the ID of the ANOMALY_DETECTION_BAND function used as the threshold for the alarm.
- treat
Missing stringData Sets how this alarm is to handle missing data points. Valid values are breaching, notBreaching, ignore, and missing.
- unit string
The unit of the metric associated with the alarm.
- actions_
enabled bool Indicates whether actions should be executed during any changes to the alarm state. The default is TRUE.
- alarm_
actions Sequence[str] The list of actions to execute when this alarm transitions into an ALARM state from any other state.
- alarm_
description str The description of the alarm.
- arn str
Amazon Resource Name is a unique name for each resource.
- comparison_
operator str The arithmetic operation to use when comparing the specified statistic and threshold.
- datapoints_
to_ intalarm The number of datapoints that must be breaching to trigger the alarm.
- dimensions
Sequence[Alarm
Dimension] The dimensions for the metric associated with the alarm. For an alarm based on a math expression, you can't specify Dimensions. Instead, you use Metrics.
- evaluate_
low_ strsample_ count_ percentile Used only for alarms based on percentiles.
- evaluation_
periods int The number of periods over which data is compared to the specified threshold.
- extended_
statistic str The percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100.
- insufficient_
data_ Sequence[str]actions The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state.
- metric_
name str The name of the metric associated with the alarm.
- metrics
Sequence[Alarm
Metric Data Query] An array that enables you to create an alarm based on the result of a metric math expression.
- namespace str
The namespace of the metric associated with the alarm.
- ok_
actions Sequence[str] The actions to execute when this alarm transitions to the OK state from any other state.
- period int
The period in seconds, over which the statistic is applied.
- statistic str
The statistic for the metric associated with the alarm, other than percentile.
- threshold float
In an alarm based on an anomaly detection model, this is the ID of the ANOMALY_DETECTION_BAND function used as the threshold for the alarm.
- threshold_
metric_ strid In an alarm based on an anomaly detection model, this is the ID of the ANOMALY_DETECTION_BAND function used as the threshold for the alarm.
- treat_
missing_ strdata Sets how this alarm is to handle missing data points. Valid values are breaching, notBreaching, ignore, and missing.
- unit str
The unit of the metric associated with the alarm.
- actions
Enabled Boolean Indicates whether actions should be executed during any changes to the alarm state. The default is TRUE.
- alarm
Actions List<String> The list of actions to execute when this alarm transitions into an ALARM state from any other state.
- alarm
Description String The description of the alarm.
- arn String
Amazon Resource Name is a unique name for each resource.
- comparison
Operator String The arithmetic operation to use when comparing the specified statistic and threshold.
- datapoints
To NumberAlarm The number of datapoints that must be breaching to trigger the alarm.
- dimensions List<Property Map>
The dimensions for the metric associated with the alarm. For an alarm based on a math expression, you can't specify Dimensions. Instead, you use Metrics.
- evaluate
Low StringSample Count Percentile Used only for alarms based on percentiles.
- evaluation
Periods Number The number of periods over which data is compared to the specified threshold.
- extended
Statistic String The percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100.
- insufficient
Data List<String>Actions The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state.
- metric
Name String The name of the metric associated with the alarm.
- metrics List<Property Map>
An array that enables you to create an alarm based on the result of a metric math expression.
- namespace String
The namespace of the metric associated with the alarm.
- ok
Actions List<String> The actions to execute when this alarm transitions to the OK state from any other state.
- period Number
The period in seconds, over which the statistic is applied.
- statistic String
The statistic for the metric associated with the alarm, other than percentile.
- threshold Number
In an alarm based on an anomaly detection model, this is the ID of the ANOMALY_DETECTION_BAND function used as the threshold for the alarm.
- threshold
Metric StringId In an alarm based on an anomaly detection model, this is the ID of the ANOMALY_DETECTION_BAND function used as the threshold for the alarm.
- treat
Missing StringData Sets how this alarm is to handle missing data points. Valid values are breaching, notBreaching, ignore, and missing.
- unit String
The unit of the metric associated with the alarm.
Supporting Types
AlarmDimension
AlarmMetric
- Dimensions
List<Pulumi.
Aws Native. Cloud Watch. Inputs. Alarm Dimension> The dimensions for the metric.
- Metric
Name string The name of the metric.
- Namespace string
The namespace of the metric.
- Dimensions
[]Alarm
Dimension The dimensions for the metric.
- Metric
Name string The name of the metric.
- Namespace string
The namespace of the metric.
- dimensions
List<Alarm
Dimension> The dimensions for the metric.
- metric
Name String The name of the metric.
- namespace String
The namespace of the metric.
- dimensions
Alarm
Dimension[] The dimensions for the metric.
- metric
Name string The name of the metric.
- namespace string
The namespace of the metric.
- dimensions
Sequence[Alarm
Dimension] The dimensions for the metric.
- metric_
name str The name of the metric.
- namespace str
The namespace of the metric.
- dimensions List<Property Map>
The dimensions for the metric.
- metric
Name String The name of the metric.
- namespace String
The namespace of the metric.
AlarmMetricDataQuery
- Id string
A short name used to tie this object to the results in the response.
- Account
Id string The ID of the account where the metrics are located, if this is a cross-account alarm.
- Expression string
The math expression to be performed on the returned data.
- Label string
A human-readable label for this metric or expression.
- Metric
Stat Pulumi.Aws Native. Cloud Watch. Inputs. Alarm Metric Stat The metric to be returned, along with statistics, period, and units.
- Period int
The period in seconds, over which the statistic is applied.
- Return
Data bool This option indicates whether to return the timestamps and raw data values of this metric.
- Id string
A short name used to tie this object to the results in the response.
- Account
Id string The ID of the account where the metrics are located, if this is a cross-account alarm.
- Expression string
The math expression to be performed on the returned data.
- Label string
A human-readable label for this metric or expression.
- Metric
Stat AlarmMetric Stat The metric to be returned, along with statistics, period, and units.
- Period int
The period in seconds, over which the statistic is applied.
- Return
Data bool This option indicates whether to return the timestamps and raw data values of this metric.
- id String
A short name used to tie this object to the results in the response.
- account
Id String The ID of the account where the metrics are located, if this is a cross-account alarm.
- expression String
The math expression to be performed on the returned data.
- label String
A human-readable label for this metric or expression.
- metric
Stat AlarmMetric Stat The metric to be returned, along with statistics, period, and units.
- period Integer
The period in seconds, over which the statistic is applied.
- return
Data Boolean This option indicates whether to return the timestamps and raw data values of this metric.
- id string
A short name used to tie this object to the results in the response.
- account
Id string The ID of the account where the metrics are located, if this is a cross-account alarm.
- expression string
The math expression to be performed on the returned data.
- label string
A human-readable label for this metric or expression.
- metric
Stat AlarmMetric Stat The metric to be returned, along with statistics, period, and units.
- period number
The period in seconds, over which the statistic is applied.
- return
Data boolean This option indicates whether to return the timestamps and raw data values of this metric.
- id str
A short name used to tie this object to the results in the response.
- account_
id str The ID of the account where the metrics are located, if this is a cross-account alarm.
- expression str
The math expression to be performed on the returned data.
- label str
A human-readable label for this metric or expression.
- metric_
stat AlarmMetric Stat The metric to be returned, along with statistics, period, and units.
- period int
The period in seconds, over which the statistic is applied.
- return_
data bool This option indicates whether to return the timestamps and raw data values of this metric.
- id String
A short name used to tie this object to the results in the response.
- account
Id String The ID of the account where the metrics are located, if this is a cross-account alarm.
- expression String
The math expression to be performed on the returned data.
- label String
A human-readable label for this metric or expression.
- metric
Stat Property Map The metric to be returned, along with statistics, period, and units.
- period Number
The period in seconds, over which the statistic is applied.
- return
Data Boolean This option indicates whether to return the timestamps and raw data values of this metric.
AlarmMetricStat
- Metric
Pulumi.
Aws Native. Cloud Watch. Inputs. Alarm Metric The metric to return, including the metric name, namespace, and dimensions.
- Period int
The granularity, in seconds, of the returned data points.
- Stat string
The statistic to return.
- Unit string
The unit to use for the returned data points.
- Metric
Alarm
Metric The metric to return, including the metric name, namespace, and dimensions.
- Period int
The granularity, in seconds, of the returned data points.
- Stat string
The statistic to return.
- Unit string
The unit to use for the returned data points.
- metric
Alarm
Metric The metric to return, including the metric name, namespace, and dimensions.
- period Integer
The granularity, in seconds, of the returned data points.
- stat String
The statistic to return.
- unit String
The unit to use for the returned data points.
- metric
Alarm
Metric The metric to return, including the metric name, namespace, and dimensions.
- period number
The granularity, in seconds, of the returned data points.
- stat string
The statistic to return.
- unit string
The unit to use for the returned data points.
- metric
Alarm
Metric The metric to return, including the metric name, namespace, and dimensions.
- period int
The granularity, in seconds, of the returned data points.
- stat str
The statistic to return.
- unit str
The unit to use for the returned data points.
- metric Property Map
The metric to return, including the metric name, namespace, and dimensions.
- period Number
The granularity, in seconds, of the returned data points.
- stat String
The statistic to return.
- unit String
The unit to use for the returned data points.
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
AWS Native is in preview. AWS Classic is fully supported.