Skip to content

PutLogAlarmInput

Source code in docs_src/capo_cloudwatch/types/put_log_alarm_input.py
class PutLogAlarmInput(TypedDict, closed=True):
    alarm_name: NotRequired["capo_cloudwatch.types.alarm_name.AlarmName"]
    """<p>The name for the alarm. This name must be unique within the Amazon Web Services account and Region.</p>"""
    alarm_description: NotRequired[
        "capo_cloudwatch.types.alarm_description.AlarmDescription"
    ]
    """<p>The description for the alarm.</p>"""
    scheduled_query_configuration: NotRequired[
        "capo_cloudwatch.types.scheduled_query_configuration.ScheduledQueryConfiguration"
    ]
    """<p>The configuration of the underlying CloudWatch Logs scheduled query that this alarm evaluates, including the query string, log groups, schedule, and aggregation expression.</p>"""
    action_log_line_count: NotRequired[
        "capo_cloudwatch.types.action_log_line_count.ActionLogLineCount"
    ]
    """<p>The number of log lines from the most recent scheduled query execution to include in alarm action notifications. Valid range is 0 through 50. The default is 0, which means no log lines are included.</p>"""
    action_log_line_role_arn: NotRequired[
        "capo_cloudwatch.types.action_log_line_role_arn.ActionLogLineRoleArn"
    ]
    """<p>The Amazon Resource Name (ARN) of an IAM role that CloudWatch assumes to retrieve log events for inclusion in alarm action notifications. Required when <code>ActionLogLineCount</code> is greater than 0.</p>"""
    actions_enabled: NotRequired["capo_cloudwatch.types.actions_enabled.ActionsEnabled"]
    """<p>Indicates whether actions should be executed during any changes to the alarm state. The default is <code>true</code>.</p>"""
    ok_actions: NotRequired["capo_cloudwatch.types.resource_list.ResourceList"]
    """<p>The actions to execute when this alarm transitions to the <code>OK</code> state from any other state. Each action is specified as an Amazon Resource Name (ARN).</p> <p>Valid Values:</p> <p> <b>Amazon SNS actions:</b> </p> <p> <code>arn:aws:sns:<i>region</i>:<i>account-id</i>:<i>sns-topic-name</i> </code> </p> <p> <b>Lambda actions:</b> </p> <ul> <li> <p>Invoke the latest version of a Lambda function: <code>arn:aws:lambda:<i>region</i>:<i>account-id</i>:function:<i>function-name</i> </code> </p> </li> <li> <p>Invoke a specific version of a Lambda function: <code>arn:aws:lambda:<i>region</i>:<i>account-id</i>:function:<i>function-name</i>:<i>version-number</i> </code> </p> </li> <li> <p>Invoke a function by using an alias Lambda function: <code>arn:aws:lambda:<i>region</i>:<i>account-id</i>:function:<i>function-name</i>:<i>alias-name</i> </code> </p> </li> </ul>"""
    alarm_actions: NotRequired["capo_cloudwatch.types.resource_list.ResourceList"]
    """<p>The actions to execute when this alarm transitions to the <code>ALARM</code> state from any other state. Each action is specified as an Amazon Resource Name (ARN).</p> <p>Valid Values:</p> <p> <b>Amazon SNS actions:</b> </p> <p> <code>arn:aws:sns:<i>region</i>:<i>account-id</i>:<i>sns-topic-name</i> </code> </p> <p> <b>Lambda actions:</b> </p> <ul> <li> <p>Invoke the latest version of a Lambda function: <code>arn:aws:lambda:<i>region</i>:<i>account-id</i>:function:<i>function-name</i> </code> </p> </li> <li> <p>Invoke a specific version of a Lambda function: <code>arn:aws:lambda:<i>region</i>:<i>account-id</i>:function:<i>function-name</i>:<i>version-number</i> </code> </p> </li> <li> <p>Invoke a function by using an alias Lambda function: <code>arn:aws:lambda:<i>region</i>:<i>account-id</i>:function:<i>function-name</i>:<i>alias-name</i> </code> </p> </li> </ul> <p> <b>Systems Manager actions:</b> </p> <p> <code>arn:aws:ssm:<i>region</i>:<i>account-id</i>:opsitem:<i>severity</i> </code> </p>"""
    insufficient_data_actions: NotRequired[
        "capo_cloudwatch.types.resource_list.ResourceList"
    ]
    """<p>The actions to execute when this alarm transitions to the <code>INSUFFICIENT_DATA</code> state from any other state. Each action is specified as an Amazon Resource Name (ARN).</p> <p>Valid Values:</p> <p> <b>Amazon SNS actions:</b> </p> <p> <code>arn:aws:sns:<i>region</i>:<i>account-id</i>:<i>sns-topic-name</i> </code> </p> <p> <b>Lambda actions:</b> </p> <ul> <li> <p>Invoke the latest version of a Lambda function: <code>arn:aws:lambda:<i>region</i>:<i>account-id</i>:function:<i>function-name</i> </code> </p> </li> <li> <p>Invoke a specific version of a Lambda function: <code>arn:aws:lambda:<i>region</i>:<i>account-id</i>:function:<i>function-name</i>:<i>version-number</i> </code> </p> </li> <li> <p>Invoke a function by using an alias Lambda function: <code>arn:aws:lambda:<i>region</i>:<i>account-id</i>:function:<i>function-name</i>:<i>alias-name</i> </code> </p> </li> </ul>"""
    query_results_to_evaluate: NotRequired[
        "capo_cloudwatch.types.query_results_to_evaluate.QueryResultsToEvaluate"
    ]
    """<p>The number of most recent scheduled query results to evaluate against the threshold (the N in M-of-N evaluation). Valid range is 1 through 100.</p>"""
    query_results_to_alarm: NotRequired[
        "capo_cloudwatch.types.query_results_to_alarm.QueryResultsToAlarm"
    ]
    """<p>The number of query results, out of the most recent <code>QueryResultsToEvaluate</code> results, that must breach the threshold to trigger the alarm to transition to <code>ALARM</code> (the M in M-of-N evaluation). Must be less than or equal to <code>QueryResultsToEvaluate</code>.</p>"""
    threshold: NotRequired["capo_cloudwatch.types.threshold.Threshold"]
    """<p>The value to compare with the aggregated query result.</p>"""
    comparison_operator: NotRequired[
        "capo_cloudwatch.types.comparison_operator.ComparisonOperator"
    ]
    """<p>The arithmetic operation to use when comparing the aggregated query result and the threshold. The aggregated query result is used as the first operand. Valid values are <code>GreaterThanThreshold</code>, <code>GreaterThanOrEqualToThreshold</code>, <code>LessThanThreshold</code>, and <code>LessThanOrEqualToThreshold</code>.</p>"""
    treat_missing_data: NotRequired[
        "capo_cloudwatch.types.treat_missing_data.TreatMissingData"
    ]
    """<p>Sets how this alarm is to handle missing data points. Valid values are <code>breaching</code>, <code>notBreaching</code>, <code>ignore</code>, and <code>missing</code>. If this parameter is omitted, the default behavior of <code>missing</code> is used.</p>"""
    tags: NotRequired["capo_cloudwatch.types.tag_list.TagList"]
    """<p>A list of key-value pairs to associate with the alarm. You can use tags to categorize and manage your alarms.</p>"""
    warm_up_configuration: NotRequired[
        "capo_cloudwatch.types.warm_up_configuration.WarmUpConfiguration"
    ]
    """<p>The warm-up configuration for the alarm. A warm-up period delays alarm evaluation after you create or update the alarm. The warm-up period reduces alarm noise from missing data while a new resource or service starts publishing data.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/alarm-warm-up.html">Alarm warm-up periods</a> in the <i>Amazon CloudWatch User Guide</i>.</p>"""

action_log_line_count instance-attribute

action_log_line_count: NotRequired[ActionLogLineCount]

The number of log lines from the most recent scheduled query execution to include in alarm action notifications. Valid range is 0 through 50. The default is 0, which means no log lines are included.

action_log_line_role_arn instance-attribute

action_log_line_role_arn: NotRequired[ActionLogLineRoleArn]

The Amazon Resource Name (ARN) of an IAM role that CloudWatch assumes to retrieve log events for inclusion in alarm action notifications. Required when ActionLogLineCount is greater than 0.

actions_enabled instance-attribute

actions_enabled: NotRequired[ActionsEnabled]

Indicates whether actions should be executed during any changes to the alarm state. The default is true.

alarm_actions instance-attribute

alarm_actions: NotRequired[ResourceList]

The actions to execute when this alarm transitions to the ALARM state from any other state. Each action is specified as an Amazon Resource Name (ARN).

Valid Values:

Amazon SNS actions:

arn:aws:sns:region:account-id:sns-topic-name

Lambda actions:

  • Invoke the latest version of a Lambda function: arn:aws:lambda:region:account-id:function:function-name

  • Invoke a specific version of a Lambda function: arn:aws:lambda:region:account-id:function:function-name:version-number

  • Invoke a function by using an alias Lambda function: arn:aws:lambda:region:account-id:function:function-name:alias-name

Systems Manager actions:

arn:aws:ssm:region:account-id:opsitem:severity

alarm_description instance-attribute

alarm_description: NotRequired[AlarmDescription]

The description for the alarm.

alarm_name instance-attribute

alarm_name: NotRequired[AlarmName]

The name for the alarm. This name must be unique within the Amazon Web Services account and Region.

comparison_operator instance-attribute

comparison_operator: NotRequired[ComparisonOperator]

The arithmetic operation to use when comparing the aggregated query result and the threshold. The aggregated query result is used as the first operand. Valid values are GreaterThanThreshold, GreaterThanOrEqualToThreshold, LessThanThreshold, and LessThanOrEqualToThreshold.

insufficient_data_actions instance-attribute

insufficient_data_actions: NotRequired[ResourceList]

The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state. Each action is specified as an Amazon Resource Name (ARN).

Valid Values:

Amazon SNS actions:

arn:aws:sns:region:account-id:sns-topic-name

Lambda actions:

  • Invoke the latest version of a Lambda function: arn:aws:lambda:region:account-id:function:function-name

  • Invoke a specific version of a Lambda function: arn:aws:lambda:region:account-id:function:function-name:version-number

  • Invoke a function by using an alias Lambda function: arn:aws:lambda:region:account-id:function:function-name:alias-name

ok_actions instance-attribute

ok_actions: NotRequired[ResourceList]

The actions to execute when this alarm transitions to the OK state from any other state. Each action is specified as an Amazon Resource Name (ARN).

Valid Values:

Amazon SNS actions:

arn:aws:sns:region:account-id:sns-topic-name

Lambda actions:

  • Invoke the latest version of a Lambda function: arn:aws:lambda:region:account-id:function:function-name

  • Invoke a specific version of a Lambda function: arn:aws:lambda:region:account-id:function:function-name:version-number

  • Invoke a function by using an alias Lambda function: arn:aws:lambda:region:account-id:function:function-name:alias-name

query_results_to_alarm instance-attribute

query_results_to_alarm: NotRequired[QueryResultsToAlarm]

The number of query results, out of the most recent QueryResultsToEvaluate results, that must breach the threshold to trigger the alarm to transition to ALARM (the M in M-of-N evaluation). Must be less than or equal to QueryResultsToEvaluate.

query_results_to_evaluate instance-attribute

query_results_to_evaluate: NotRequired[QueryResultsToEvaluate]

The number of most recent scheduled query results to evaluate against the threshold (the N in M-of-N evaluation). Valid range is 1 through 100.

scheduled_query_configuration instance-attribute

scheduled_query_configuration: NotRequired[ScheduledQueryConfiguration]

The configuration of the underlying CloudWatch Logs scheduled query that this alarm evaluates, including the query string, log groups, schedule, and aggregation expression.

tags instance-attribute

tags: NotRequired[TagList]

A list of key-value pairs to associate with the alarm. You can use tags to categorize and manage your alarms.

threshold instance-attribute

threshold: NotRequired[Threshold]

The value to compare with the aggregated query result.

treat_missing_data instance-attribute

treat_missing_data: NotRequired[TreatMissingData]

Sets how this alarm is to handle missing data points. Valid values are breaching, notBreaching, ignore, and missing. If this parameter is omitted, the default behavior of missing is used.

warm_up_configuration instance-attribute

warm_up_configuration: NotRequired[WarmUpConfiguration]

The warm-up configuration for the alarm. A warm-up period delays alarm evaluation after you create or update the alarm. The warm-up period reduces alarm noise from missing data while a new resource or service starts publishing data.

For more information, see Alarm warm-up periods in the Amazon CloudWatch User Guide.