We recommend new projects start with resources from the AWS provider.
published on Monday, Jun 15, 2026 by Pulumi
We recommend new projects start with resources from the AWS provider.
published on Monday, Jun 15, 2026 by Pulumi
Resource Type definition for AWS::CloudWatch::LogAlarm. A LogAlarm evaluates scheduled query results from CloudWatch Logs and triggers actions when thresholds are breached.
Using getLogAlarm
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 getLogAlarm(args: GetLogAlarmArgs, opts?: InvokeOptions): Promise<GetLogAlarmResult>
function getLogAlarmOutput(args: GetLogAlarmOutputArgs, opts?: InvokeOptions): Output<GetLogAlarmResult>def get_log_alarm(alarm_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetLogAlarmResult
def get_log_alarm_output(alarm_name: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetLogAlarmResult]func LookupLogAlarm(ctx *Context, args *LookupLogAlarmArgs, opts ...InvokeOption) (*LookupLogAlarmResult, error)
func LookupLogAlarmOutput(ctx *Context, args *LookupLogAlarmOutputArgs, opts ...InvokeOption) LookupLogAlarmResultOutput> Note: This function is named LookupLogAlarm in the Go SDK.
public static class GetLogAlarm
{
public static Task<GetLogAlarmResult> InvokeAsync(GetLogAlarmArgs args, InvokeOptions? opts = null)
public static Output<GetLogAlarmResult> Invoke(GetLogAlarmInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetLogAlarmResult> getLogAlarm(GetLogAlarmArgs args, InvokeOptions options)
public static Output<GetLogAlarmResult> getLogAlarm(GetLogAlarmArgs args, InvokeOptions options)
fn::invoke:
function: aws-native:cloudwatch:getLogAlarm
arguments:
# arguments dictionarydata "aws-native_cloudwatch_getlogalarm" "name" {
# arguments
}The following arguments are supported:
- Alarm
Name string - The name of the log alarm.
- Alarm
Name string - The name of the log alarm.
- alarm_
name string - The name of the log alarm.
- alarm
Name String - The name of the log alarm.
- alarm
Name string - The name of the log alarm.
- alarm_
name str - The name of the log alarm.
- alarm
Name String - The name of the log alarm.
getLogAlarm Result
The following output properties are available:
- Action
Log intLine Count - The number of log lines to include in alarm notifications. Valid values are 0 to 50.
- Action
Log stringLine Role Arn - The ARN of the IAM role that grants CloudWatch permissions to fetch log lines for alarm notifications. Required when ActionLogLineCount is greater than 0.
- 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 log alarm.
- Arn string
- The ARN of the log alarm.
- Comparison
Operator string - The arithmetic operation to use when comparing the specified threshold and the query results. Valid values are GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanThreshold, and LessThanOrEqualToThreshold.
- Insufficient
Data List<string>Actions - The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state.
- Ok
Actions List<string> - The actions to execute when this alarm transitions to the OK state from any other state.
- Query
Results intTo Alarm - The number of query results that must be breaching to trigger the alarm.
- Query
Results intTo Evaluate - The number of query results over which data is compared to the specified threshold.
- Scheduled
Query Pulumi.Configuration Aws Native. Cloud Watch. Outputs. Log Alarm Scheduled Query Configuration - The scheduled query configuration for the log alarm.
-
List<Pulumi.
Aws Native. Outputs. Tag> - A list of key-value pairs to associate with the log alarm.
- Threshold double
- The value to compare against the results of the scheduled query evaluation.
- Treat
Missing stringData - Sets how this alarm is to handle missing data points. Valid values are breaching, notBreaching, ignore, and missing.
- Action
Log intLine Count - The number of log lines to include in alarm notifications. Valid values are 0 to 50.
- Action
Log stringLine Role Arn - The ARN of the IAM role that grants CloudWatch permissions to fetch log lines for alarm notifications. Required when ActionLogLineCount is greater than 0.
- 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 log alarm.
- Arn string
- The ARN of the log alarm.
- Comparison
Operator string - The arithmetic operation to use when comparing the specified threshold and the query results. Valid values are GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanThreshold, and LessThanOrEqualToThreshold.
- Insufficient
Data []stringActions - The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state.
- Ok
Actions []string - The actions to execute when this alarm transitions to the OK state from any other state.
- Query
Results intTo Alarm - The number of query results that must be breaching to trigger the alarm.
- Query
Results intTo Evaluate - The number of query results over which data is compared to the specified threshold.
- Scheduled
Query LogConfiguration Alarm Scheduled Query Configuration - The scheduled query configuration for the log alarm.
- Tag
- A list of key-value pairs to associate with the log alarm.
- Threshold float64
- The value to compare against the results of the scheduled query evaluation.
- Treat
Missing stringData - Sets how this alarm is to handle missing data points. Valid values are breaching, notBreaching, ignore, and missing.
- action_
log_ numberline_ count - The number of log lines to include in alarm notifications. Valid values are 0 to 50.
- action_
log_ stringline_ role_ arn - The ARN of the IAM role that grants CloudWatch permissions to fetch log lines for alarm notifications. Required when ActionLogLineCount is greater than 0.
- 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 log alarm.
- arn string
- The ARN of the log alarm.
- comparison_
operator string - The arithmetic operation to use when comparing the specified threshold and the query results. Valid values are GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanThreshold, and LessThanOrEqualToThreshold.
- insufficient_
data_ list(string)actions - The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state.
- ok_
actions list(string) - The actions to execute when this alarm transitions to the OK state from any other state.
- query_
results_ numberto_ alarm - The number of query results that must be breaching to trigger the alarm.
- query_
results_ numberto_ evaluate - The number of query results over which data is compared to the specified threshold.
- scheduled_
query_ objectconfiguration - The scheduled query configuration for the log alarm.
- list(object)
- A list of key-value pairs to associate with the log alarm.
- threshold number
- The value to compare against the results of the scheduled query evaluation.
- treat_
missing_ stringdata - Sets how this alarm is to handle missing data points. Valid values are breaching, notBreaching, ignore, and missing.
- action
Log IntegerLine Count - The number of log lines to include in alarm notifications. Valid values are 0 to 50.
- action
Log StringLine Role Arn - The ARN of the IAM role that grants CloudWatch permissions to fetch log lines for alarm notifications. Required when ActionLogLineCount is greater than 0.
- 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 log alarm.
- arn String
- The ARN of the log alarm.
- comparison
Operator String - The arithmetic operation to use when comparing the specified threshold and the query results. Valid values are GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanThreshold, and LessThanOrEqualToThreshold.
- insufficient
Data List<String>Actions - The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state.
- ok
Actions List<String> - The actions to execute when this alarm transitions to the OK state from any other state.
- query
Results IntegerTo Alarm - The number of query results that must be breaching to trigger the alarm.
- query
Results IntegerTo Evaluate - The number of query results over which data is compared to the specified threshold.
- scheduled
Query LogConfiguration Alarm Scheduled Query Configuration - The scheduled query configuration for the log alarm.
- List<Tag>
- A list of key-value pairs to associate with the log alarm.
- threshold Double
- The value to compare against the results of the scheduled query evaluation.
- treat
Missing StringData - Sets how this alarm is to handle missing data points. Valid values are breaching, notBreaching, ignore, and missing.
- action
Log numberLine Count - The number of log lines to include in alarm notifications. Valid values are 0 to 50.
- action
Log stringLine Role Arn - The ARN of the IAM role that grants CloudWatch permissions to fetch log lines for alarm notifications. Required when ActionLogLineCount is greater than 0.
- 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 log alarm.
- arn string
- The ARN of the log alarm.
- comparison
Operator string - The arithmetic operation to use when comparing the specified threshold and the query results. Valid values are GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanThreshold, and LessThanOrEqualToThreshold.
- insufficient
Data string[]Actions - The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state.
- ok
Actions string[] - The actions to execute when this alarm transitions to the OK state from any other state.
- query
Results numberTo Alarm - The number of query results that must be breaching to trigger the alarm.
- query
Results numberTo Evaluate - The number of query results over which data is compared to the specified threshold.
- scheduled
Query LogConfiguration Alarm Scheduled Query Configuration - The scheduled query configuration for the log alarm.
- Tag[]
- A list of key-value pairs to associate with the log alarm.
- threshold number
- The value to compare against the results of the scheduled query evaluation.
- treat
Missing stringData - Sets how this alarm is to handle missing data points. Valid values are breaching, notBreaching, ignore, and missing.
- action_
log_ intline_ count - The number of log lines to include in alarm notifications. Valid values are 0 to 50.
- action_
log_ strline_ role_ arn - The ARN of the IAM role that grants CloudWatch permissions to fetch log lines for alarm notifications. Required when ActionLogLineCount is greater than 0.
- 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 log alarm.
- arn str
- The ARN of the log alarm.
- comparison_
operator str - The arithmetic operation to use when comparing the specified threshold and the query results. Valid values are GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanThreshold, and LessThanOrEqualToThreshold.
- insufficient_
data_ Sequence[str]actions - The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state.
- ok_
actions Sequence[str] - The actions to execute when this alarm transitions to the OK state from any other state.
- query_
results_ intto_ alarm - The number of query results that must be breaching to trigger the alarm.
- query_
results_ intto_ evaluate - The number of query results over which data is compared to the specified threshold.
- scheduled_
query_ Logconfiguration Alarm Scheduled Query Configuration - The scheduled query configuration for the log alarm.
- Sequence[root_Tag]
- A list of key-value pairs to associate with the log alarm.
- threshold float
- The value to compare against the results of the scheduled query evaluation.
- treat_
missing_ strdata - Sets how this alarm is to handle missing data points. Valid values are breaching, notBreaching, ignore, and missing.
- action
Log NumberLine Count - The number of log lines to include in alarm notifications. Valid values are 0 to 50.
- action
Log StringLine Role Arn - The ARN of the IAM role that grants CloudWatch permissions to fetch log lines for alarm notifications. Required when ActionLogLineCount is greater than 0.
- 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 log alarm.
- arn String
- The ARN of the log alarm.
- comparison
Operator String - The arithmetic operation to use when comparing the specified threshold and the query results. Valid values are GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanThreshold, and LessThanOrEqualToThreshold.
- insufficient
Data List<String>Actions - The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state.
- ok
Actions List<String> - The actions to execute when this alarm transitions to the OK state from any other state.
- query
Results NumberTo Alarm - The number of query results that must be breaching to trigger the alarm.
- query
Results NumberTo Evaluate - The number of query results over which data is compared to the specified threshold.
- scheduled
Query Property MapConfiguration - The scheduled query configuration for the log alarm.
- List<Property Map>
- A list of key-value pairs to associate with the log alarm.
- threshold Number
- The value to compare against the results of the scheduled query evaluation.
- treat
Missing StringData - Sets how this alarm is to handle missing data points. Valid values are breaching, notBreaching, ignore, and missing.
Supporting Types
LogAlarmScheduleConfiguration
- Schedule
Expression string - The expression that defines when the scheduled query runs, e.g. rate(1 minute).
- End
Time intOffset - The number of seconds into the past to end the query window.
- Start
Time intOffset - The number of seconds into the past to start the query window.
- Schedule
Expression string - The expression that defines when the scheduled query runs, e.g. rate(1 minute).
- End
Time intOffset - The number of seconds into the past to end the query window.
- Start
Time intOffset - The number of seconds into the past to start the query window.
- schedule_
expression string - The expression that defines when the scheduled query runs, e.g. rate(1 minute).
- end_
time_ numberoffset - The number of seconds into the past to end the query window.
- start_
time_ numberoffset - The number of seconds into the past to start the query window.
- schedule
Expression String - The expression that defines when the scheduled query runs, e.g. rate(1 minute).
- end
Time IntegerOffset - The number of seconds into the past to end the query window.
- start
Time IntegerOffset - The number of seconds into the past to start the query window.
- schedule
Expression string - The expression that defines when the scheduled query runs, e.g. rate(1 minute).
- end
Time numberOffset - The number of seconds into the past to end the query window.
- start
Time numberOffset - The number of seconds into the past to start the query window.
- schedule_
expression str - The expression that defines when the scheduled query runs, e.g. rate(1 minute).
- end_
time_ intoffset - The number of seconds into the past to end the query window.
- start_
time_ intoffset - The number of seconds into the past to start the query window.
- schedule
Expression String - The expression that defines when the scheduled query runs, e.g. rate(1 minute).
- end
Time NumberOffset - The number of seconds into the past to end the query window.
- start
Time NumberOffset - The number of seconds into the past to start the query window.
LogAlarmScheduledQueryConfiguration
- Aggregation
Expression string - The aggregation expression for the scheduled query, e.g. count(*) or avg(latency) by host.
- Log
Group List<string>Identifiers - The log groups to query.
- Query
String string - The query string to execute against the specified log groups.
- Schedule
Configuration Pulumi.Aws Native. Cloud Watch. Inputs. Log Alarm Schedule Configuration - The schedule configuration.
- Scheduled
Query stringRole Arn - The ARN of the IAM role that grants permissions to execute the scheduled query.
- Aggregation
Expression string - The aggregation expression for the scheduled query, e.g. count(*) or avg(latency) by host.
- Log
Group []stringIdentifiers - The log groups to query.
- Query
String string - The query string to execute against the specified log groups.
- Schedule
Configuration LogAlarm Schedule Configuration - The schedule configuration.
- Scheduled
Query stringRole Arn - The ARN of the IAM role that grants permissions to execute the scheduled query.
- aggregation_
expression string - The aggregation expression for the scheduled query, e.g. count(*) or avg(latency) by host.
- log_
group_ list(string)identifiers - The log groups to query.
- query_
string string - The query string to execute against the specified log groups.
- schedule_
configuration object - The schedule configuration.
- scheduled_
query_ stringrole_ arn - The ARN of the IAM role that grants permissions to execute the scheduled query.
- aggregation
Expression String - The aggregation expression for the scheduled query, e.g. count(*) or avg(latency) by host.
- log
Group List<String>Identifiers - The log groups to query.
- query
String String - The query string to execute against the specified log groups.
- schedule
Configuration LogAlarm Schedule Configuration - The schedule configuration.
- scheduled
Query StringRole Arn - The ARN of the IAM role that grants permissions to execute the scheduled query.
- aggregation
Expression string - The aggregation expression for the scheduled query, e.g. count(*) or avg(latency) by host.
- log
Group string[]Identifiers - The log groups to query.
- query
String string - The query string to execute against the specified log groups.
- schedule
Configuration LogAlarm Schedule Configuration - The schedule configuration.
- scheduled
Query stringRole Arn - The ARN of the IAM role that grants permissions to execute the scheduled query.
- aggregation_
expression str - The aggregation expression for the scheduled query, e.g. count(*) or avg(latency) by host.
- log_
group_ Sequence[str]identifiers - The log groups to query.
- query_
string str - The query string to execute against the specified log groups.
- schedule_
configuration LogAlarm Schedule Configuration - The schedule configuration.
- scheduled_
query_ strrole_ arn - The ARN of the IAM role that grants permissions to execute the scheduled query.
- aggregation
Expression String - The aggregation expression for the scheduled query, e.g. count(*) or avg(latency) by host.
- log
Group List<String>Identifiers - The log groups to query.
- query
String String - The query string to execute against the specified log groups.
- schedule
Configuration Property Map - The schedule configuration.
- scheduled
Query StringRole Arn - The ARN of the IAM role that grants permissions to execute the scheduled query.
Tag
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
We recommend new projects start with resources from the AWS provider.
published on Monday, Jun 15, 2026 by Pulumi