1. Packages
  2. Packages
  3. AWS Cloud Control
  4. API Docs
  5. cloudwatch
  6. getLogAlarm

We recommend new projects start with resources from the AWS provider.

Viewing docs for AWS Cloud Control v1.69.0
published on Monday, Jun 15, 2026 by Pulumi
aws-native logo

We recommend new projects start with resources from the AWS provider.

Viewing docs for AWS Cloud Control v1.69.0
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 dictionary
    data "aws-native_cloudwatch_getlogalarm" "name" {
        # arguments
    }

    The following arguments are supported:

    AlarmName string
    The name of the log alarm.
    AlarmName string
    The name of the log alarm.
    alarm_name string
    The name of the log alarm.
    alarmName String
    The name of the log alarm.
    alarmName string
    The name of the log alarm.
    alarm_name str
    The name of the log alarm.
    alarmName String
    The name of the log alarm.

    getLogAlarm Result

    The following output properties are available:

    ActionLogLineCount int
    The number of log lines to include in alarm notifications. Valid values are 0 to 50.
    ActionLogLineRoleArn string
    The ARN of the IAM role that grants CloudWatch permissions to fetch log lines for alarm notifications. Required when ActionLogLineCount is greater than 0.
    ActionsEnabled bool
    Indicates whether actions should be executed during any changes to the alarm state. The default is TRUE.
    AlarmActions List<string>
    The list of actions to execute when this alarm transitions into an ALARM state from any other state.
    AlarmDescription string
    The description of the log alarm.
    Arn string
    The ARN of the log alarm.
    ComparisonOperator string
    The arithmetic operation to use when comparing the specified threshold and the query results. Valid values are GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanThreshold, and LessThanOrEqualToThreshold.
    InsufficientDataActions List<string>
    The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state.
    OkActions List<string>
    The actions to execute when this alarm transitions to the OK state from any other state.
    QueryResultsToAlarm int
    The number of query results that must be breaching to trigger the alarm.
    QueryResultsToEvaluate int
    The number of query results over which data is compared to the specified threshold.
    ScheduledQueryConfiguration Pulumi.AwsNative.CloudWatch.Outputs.LogAlarmScheduledQueryConfiguration
    The scheduled query configuration for the log alarm.
    Tags List<Pulumi.AwsNative.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.
    TreatMissingData string
    Sets how this alarm is to handle missing data points. Valid values are breaching, notBreaching, ignore, and missing.
    ActionLogLineCount int
    The number of log lines to include in alarm notifications. Valid values are 0 to 50.
    ActionLogLineRoleArn string
    The ARN of the IAM role that grants CloudWatch permissions to fetch log lines for alarm notifications. Required when ActionLogLineCount is greater than 0.
    ActionsEnabled bool
    Indicates whether actions should be executed during any changes to the alarm state. The default is TRUE.
    AlarmActions []string
    The list of actions to execute when this alarm transitions into an ALARM state from any other state.
    AlarmDescription string
    The description of the log alarm.
    Arn string
    The ARN of the log alarm.
    ComparisonOperator string
    The arithmetic operation to use when comparing the specified threshold and the query results. Valid values are GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanThreshold, and LessThanOrEqualToThreshold.
    InsufficientDataActions []string
    The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state.
    OkActions []string
    The actions to execute when this alarm transitions to the OK state from any other state.
    QueryResultsToAlarm int
    The number of query results that must be breaching to trigger the alarm.
    QueryResultsToEvaluate int
    The number of query results over which data is compared to the specified threshold.
    ScheduledQueryConfiguration LogAlarmScheduledQueryConfiguration
    The scheduled query configuration for the log alarm.
    Tags 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.
    TreatMissingData string
    Sets how this alarm is to handle missing data points. Valid values are breaching, notBreaching, ignore, and missing.
    action_log_line_count number
    The number of log lines to include in alarm notifications. Valid values are 0 to 50.
    action_log_line_role_arn string
    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_actions list(string)
    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_to_alarm number
    The number of query results that must be breaching to trigger the alarm.
    query_results_to_evaluate number
    The number of query results over which data is compared to the specified threshold.
    scheduled_query_configuration object
    The scheduled query configuration for the log alarm.
    tags 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_data string
    Sets how this alarm is to handle missing data points. Valid values are breaching, notBreaching, ignore, and missing.
    actionLogLineCount Integer
    The number of log lines to include in alarm notifications. Valid values are 0 to 50.
    actionLogLineRoleArn String
    The ARN of the IAM role that grants CloudWatch permissions to fetch log lines for alarm notifications. Required when ActionLogLineCount is greater than 0.
    actionsEnabled Boolean
    Indicates whether actions should be executed during any changes to the alarm state. The default is TRUE.
    alarmActions List<String>
    The list of actions to execute when this alarm transitions into an ALARM state from any other state.
    alarmDescription String
    The description of the log alarm.
    arn String
    The ARN of the log alarm.
    comparisonOperator String
    The arithmetic operation to use when comparing the specified threshold and the query results. Valid values are GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanThreshold, and LessThanOrEqualToThreshold.
    insufficientDataActions List<String>
    The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state.
    okActions List<String>
    The actions to execute when this alarm transitions to the OK state from any other state.
    queryResultsToAlarm Integer
    The number of query results that must be breaching to trigger the alarm.
    queryResultsToEvaluate Integer
    The number of query results over which data is compared to the specified threshold.
    scheduledQueryConfiguration LogAlarmScheduledQueryConfiguration
    The scheduled query configuration for the log alarm.
    tags 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.
    treatMissingData String
    Sets how this alarm is to handle missing data points. Valid values are breaching, notBreaching, ignore, and missing.
    actionLogLineCount number
    The number of log lines to include in alarm notifications. Valid values are 0 to 50.
    actionLogLineRoleArn string
    The ARN of the IAM role that grants CloudWatch permissions to fetch log lines for alarm notifications. Required when ActionLogLineCount is greater than 0.
    actionsEnabled boolean
    Indicates whether actions should be executed during any changes to the alarm state. The default is TRUE.
    alarmActions string[]
    The list of actions to execute when this alarm transitions into an ALARM state from any other state.
    alarmDescription string
    The description of the log alarm.
    arn string
    The ARN of the log alarm.
    comparisonOperator string
    The arithmetic operation to use when comparing the specified threshold and the query results. Valid values are GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanThreshold, and LessThanOrEqualToThreshold.
    insufficientDataActions string[]
    The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state.
    okActions string[]
    The actions to execute when this alarm transitions to the OK state from any other state.
    queryResultsToAlarm number
    The number of query results that must be breaching to trigger the alarm.
    queryResultsToEvaluate number
    The number of query results over which data is compared to the specified threshold.
    scheduledQueryConfiguration LogAlarmScheduledQueryConfiguration
    The scheduled query configuration for the log alarm.
    tags 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.
    treatMissingData string
    Sets how this alarm is to handle missing data points. Valid values are breaching, notBreaching, ignore, and missing.
    action_log_line_count int
    The number of log lines to include in alarm notifications. Valid values are 0 to 50.
    action_log_line_role_arn str
    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_actions Sequence[str]
    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_to_alarm int
    The number of query results that must be breaching to trigger the alarm.
    query_results_to_evaluate int
    The number of query results over which data is compared to the specified threshold.
    scheduled_query_configuration LogAlarmScheduledQueryConfiguration
    The scheduled query configuration for the log alarm.
    tags 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_data str
    Sets how this alarm is to handle missing data points. Valid values are breaching, notBreaching, ignore, and missing.
    actionLogLineCount Number
    The number of log lines to include in alarm notifications. Valid values are 0 to 50.
    actionLogLineRoleArn String
    The ARN of the IAM role that grants CloudWatch permissions to fetch log lines for alarm notifications. Required when ActionLogLineCount is greater than 0.
    actionsEnabled Boolean
    Indicates whether actions should be executed during any changes to the alarm state. The default is TRUE.
    alarmActions List<String>
    The list of actions to execute when this alarm transitions into an ALARM state from any other state.
    alarmDescription String
    The description of the log alarm.
    arn String
    The ARN of the log alarm.
    comparisonOperator String
    The arithmetic operation to use when comparing the specified threshold and the query results. Valid values are GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanThreshold, and LessThanOrEqualToThreshold.
    insufficientDataActions List<String>
    The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state.
    okActions List<String>
    The actions to execute when this alarm transitions to the OK state from any other state.
    queryResultsToAlarm Number
    The number of query results that must be breaching to trigger the alarm.
    queryResultsToEvaluate Number
    The number of query results over which data is compared to the specified threshold.
    scheduledQueryConfiguration Property Map
    The scheduled query configuration for the log alarm.
    tags 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.
    treatMissingData String
    Sets how this alarm is to handle missing data points. Valid values are breaching, notBreaching, ignore, and missing.

    Supporting Types

    LogAlarmScheduleConfiguration

    ScheduleExpression string
    The expression that defines when the scheduled query runs, e.g. rate(1 minute).
    EndTimeOffset int
    The number of seconds into the past to end the query window.
    StartTimeOffset int
    The number of seconds into the past to start the query window.
    ScheduleExpression string
    The expression that defines when the scheduled query runs, e.g. rate(1 minute).
    EndTimeOffset int
    The number of seconds into the past to end the query window.
    StartTimeOffset int
    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_offset number
    The number of seconds into the past to end the query window.
    start_time_offset number
    The number of seconds into the past to start the query window.
    scheduleExpression String
    The expression that defines when the scheduled query runs, e.g. rate(1 minute).
    endTimeOffset Integer
    The number of seconds into the past to end the query window.
    startTimeOffset Integer
    The number of seconds into the past to start the query window.
    scheduleExpression string
    The expression that defines when the scheduled query runs, e.g. rate(1 minute).
    endTimeOffset number
    The number of seconds into the past to end the query window.
    startTimeOffset number
    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_offset int
    The number of seconds into the past to end the query window.
    start_time_offset int
    The number of seconds into the past to start the query window.
    scheduleExpression String
    The expression that defines when the scheduled query runs, e.g. rate(1 minute).
    endTimeOffset Number
    The number of seconds into the past to end the query window.
    startTimeOffset Number
    The number of seconds into the past to start the query window.

    LogAlarmScheduledQueryConfiguration

    AggregationExpression string
    The aggregation expression for the scheduled query, e.g. count(*) or avg(latency) by host.
    LogGroupIdentifiers List<string>
    The log groups to query.
    QueryString string
    The query string to execute against the specified log groups.
    ScheduleConfiguration Pulumi.AwsNative.CloudWatch.Inputs.LogAlarmScheduleConfiguration
    The schedule configuration.
    ScheduledQueryRoleArn string
    The ARN of the IAM role that grants permissions to execute the scheduled query.
    AggregationExpression string
    The aggregation expression for the scheduled query, e.g. count(*) or avg(latency) by host.
    LogGroupIdentifiers []string
    The log groups to query.
    QueryString string
    The query string to execute against the specified log groups.
    ScheduleConfiguration LogAlarmScheduleConfiguration
    The schedule configuration.
    ScheduledQueryRoleArn string
    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_identifiers list(string)
    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_role_arn string
    The ARN of the IAM role that grants permissions to execute the scheduled query.
    aggregationExpression String
    The aggregation expression for the scheduled query, e.g. count(*) or avg(latency) by host.
    logGroupIdentifiers List<String>
    The log groups to query.
    queryString String
    The query string to execute against the specified log groups.
    scheduleConfiguration LogAlarmScheduleConfiguration
    The schedule configuration.
    scheduledQueryRoleArn String
    The ARN of the IAM role that grants permissions to execute the scheduled query.
    aggregationExpression string
    The aggregation expression for the scheduled query, e.g. count(*) or avg(latency) by host.
    logGroupIdentifiers string[]
    The log groups to query.
    queryString string
    The query string to execute against the specified log groups.
    scheduleConfiguration LogAlarmScheduleConfiguration
    The schedule configuration.
    scheduledQueryRoleArn string
    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_identifiers Sequence[str]
    The log groups to query.
    query_string str
    The query string to execute against the specified log groups.
    schedule_configuration LogAlarmScheduleConfiguration
    The schedule configuration.
    scheduled_query_role_arn str
    The ARN of the IAM role that grants permissions to execute the scheduled query.
    aggregationExpression String
    The aggregation expression for the scheduled query, e.g. count(*) or avg(latency) by host.
    logGroupIdentifiers List<String>
    The log groups to query.
    queryString String
    The query string to execute against the specified log groups.
    scheduleConfiguration Property Map
    The schedule configuration.
    scheduledQueryRoleArn String
    The ARN of the IAM role that grants permissions to execute the scheduled query.

    Tag

    Key string
    The key name of the tag
    Value string
    The value of the tag
    Key string
    The key name of the tag
    Value string
    The value of the tag
    key string
    The key name of the tag
    value string
    The value of the tag
    key String
    The key name of the tag
    value String
    The value of the tag
    key string
    The key name of the tag
    value string
    The value of the tag
    key str
    The key name of the tag
    value str
    The value of the tag
    key String
    The key name of the tag
    value String
    The value of the tag

    Package Details

    Repository
    AWS Native pulumi/pulumi-aws-native
    License
    Apache-2.0
    aws-native logo

    We recommend new projects start with resources from the AWS provider.

    Viewing docs for AWS Cloud Control v1.69.0
    published on Monday, Jun 15, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial