CfnLogAlarmPropsMixin
- class aws_cdk.cfn_property_mixins.aws_cloudwatch.CfnLogAlarmPropsMixin(props, *, strategy=None)
Bases:
MixinResource Type definition for AWS::CloudWatch::LogAlarm.
A LogAlarm evaluates scheduled query results from CloudWatch Logs and triggers actions when thresholds are breached.
- See:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-logalarm.html
- CloudformationResource:
AWS::CloudWatch::LogAlarm
- Mixin:
true
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.cfn_property_mixins import aws_cloudwatch as cloudwatch import aws_cdk as cdk # merge_strategy: cdk.IMergeStrategy cfn_log_alarm_props_mixin = cloudwatch.CfnLogAlarmPropsMixin(cloudwatch.CfnLogAlarmMixinProps( action_log_line_count=123, action_log_line_role_arn="actionLogLineRoleArn", actions_enabled=False, alarm_actions=["alarmActions"], alarm_description="alarmDescription", alarm_name="alarmName", comparison_operator="comparisonOperator", insufficient_data_actions=["insufficientDataActions"], ok_actions=["okActions"], query_results_to_alarm=123, query_results_to_evaluate=123, scheduled_query_configuration=cloudwatch.CfnLogAlarmPropsMixin.ScheduledQueryConfigurationProperty( aggregation_expression="aggregationExpression", log_group_identifiers=["logGroupIdentifiers"], query_string="queryString", schedule_configuration=cloudwatch.CfnLogAlarmPropsMixin.ScheduleConfigurationProperty( end_time_offset=123, schedule_expression="scheduleExpression", start_time_offset=123 ), scheduled_query_role_arn="scheduledQueryRoleArn", tags=[cdk.CfnTag( key="key", value="value" )] ), tags=[cdk.CfnTag( key="key", value="value" )], threshold=123, treat_missing_data="treatMissingData", warm_up_configuration=cloudwatch.CfnLogAlarmPropsMixin.WarmUpConfigurationProperty( only_start_evaluating_after_warm_up_period_ends=False, warm_up_period_duration_in_minutes=123 ) ), strategy=merge_strategy )
Create a mixin to apply properties to
AWS::CloudWatch::LogAlarm.- Parameters:
props (
Union[CfnLogAlarmMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[IMergeStrategy]) – Strategy for merging nested properties. Default: - PropertyMergeStrategy.combine()
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
None
- supports(construct)
Check if this mixin supports the given construct.
- Parameters:
construct (
IConstruct)- Return type:
bool
Attributes
- CFN_PROPERTY_KEYS = ['actionLogLineCount', 'actionLogLineRoleArn', 'actionsEnabled', 'alarmActions', 'alarmDescription', 'alarmName', 'comparisonOperator', 'insufficientDataActions', 'okActions', 'queryResultsToAlarm', 'queryResultsToEvaluate', 'scheduledQueryConfiguration', 'tags', 'threshold', 'treatMissingData', 'warmUpConfiguration']
Static Methods
- classmethod is_mixin(x)
Checks if
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.
ScheduleConfigurationProperty
- class CfnLogAlarmPropsMixin.ScheduleConfigurationProperty(*, end_time_offset=None, schedule_expression=None, start_time_offset=None)
Bases:
objectThe schedule configuration for the scheduled query.
- Parameters:
end_time_offset (
Union[int,float,None]) – The number of seconds into the past to end the query window. Must be a non-negative value and cannot exceed 2592000 seconds (30 days).schedule_expression (
Optional[str]) – The expression that defines when the scheduled query runs, e.g. rate(1 minute).start_time_offset (
Union[int,float,None]) – The number of seconds into the past to start the query window. Must be a positive value and cannot exceed 2592000 seconds (30 days).
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.cfn_property_mixins import aws_cloudwatch as cloudwatch schedule_configuration_property = cloudwatch.CfnLogAlarmPropsMixin.ScheduleConfigurationProperty( end_time_offset=123, schedule_expression="scheduleExpression", start_time_offset=123 )
Attributes
- end_time_offset
The number of seconds into the past to end the query window.
Must be a non-negative value and cannot exceed 2592000 seconds (30 days).
- schedule_expression
The expression that defines when the scheduled query runs, e.g. rate(1 minute).
- start_time_offset
The number of seconds into the past to start the query window.
Must be a positive value and cannot exceed 2592000 seconds (30 days).
ScheduledQueryConfigurationProperty
- class CfnLogAlarmPropsMixin.ScheduledQueryConfigurationProperty(*, aggregation_expression=None, log_group_identifiers=None, query_string=None, schedule_configuration=None, scheduled_query_role_arn=None, tags=None)
Bases:
objectThe scheduled query configuration for the log alarm.
- Parameters:
aggregation_expression (
Optional[str]) – The aggregation expression for the scheduled query, e.g. count(*) or avg(latency) by host.log_group_identifiers (
Optional[Sequence[str]]) – The log groups to query.query_string (
Optional[str]) – The query string to execute against the specified log groups.schedule_configuration (
Union[IResolvable,ScheduleConfigurationProperty,Dict[str,Any],None]) – The schedule configuration for the scheduled query.scheduled_query_role_arn (
Optional[str]) – The ARN of the IAM role that grants permissions to execute the scheduled query.tags (
Optional[Sequence[Union[CfnTag,Dict[str,Any]]]]) – A list of key-value pairs to associate with the scheduled query that backs the log alarm.
- See:
- ExampleMetadata:
fixture=_generated
Example:
from aws_cdk import CfnTag # The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.cfn_property_mixins import aws_cloudwatch as cloudwatch scheduled_query_configuration_property = cloudwatch.CfnLogAlarmPropsMixin.ScheduledQueryConfigurationProperty( aggregation_expression="aggregationExpression", log_group_identifiers=["logGroupIdentifiers"], query_string="queryString", schedule_configuration=cloudwatch.CfnLogAlarmPropsMixin.ScheduleConfigurationProperty( end_time_offset=123, schedule_expression="scheduleExpression", start_time_offset=123 ), scheduled_query_role_arn="scheduledQueryRoleArn", tags=[CfnTag( key="key", value="value" )] )
Attributes
- aggregation_expression
The aggregation expression for the scheduled query, e.g. count(*) or avg(latency) by host.
- log_group_identifiers
The log groups to query.
- query_string
The query string to execute against the specified log groups.
- schedule_configuration
The schedule configuration for the scheduled query.
- scheduled_query_role_arn
The ARN of the IAM role that grants permissions to execute the scheduled query.
- tags
A list of key-value pairs to associate with the scheduled query that backs the log alarm.
WarmUpConfigurationProperty
- class CfnLogAlarmPropsMixin.WarmUpConfigurationProperty(*, only_start_evaluating_after_warm_up_period_ends=None, warm_up_period_duration_in_minutes=None)
Bases:
objectThe warm-up configuration for an alarm.
A warm-up period delays alarm evaluation after you create or update the alarm. This reduces alarm noise from missing data while a new resource or service starts up. During the warm-up period, the alarm stays in INSUFFICIENT_DATA and doesn’t perform alarm actions.
- Parameters:
only_start_evaluating_after_warm_up_period_ends (
Union[bool,IResolvable,None]) – Specifies whether the alarm waits for the full warm-up period before it starts evaluating. If true, the alarm waits the entire WarmUpPeriodDurationInMinutes before it starts evaluating, even if metric data arrives earlier. If false, the alarm ends the warm-up period early and starts evaluating as soon as it has enough metric data to fill its evaluation window. This is the default behavior.warm_up_period_duration_in_minutes (
Union[int,float,None]) – The length of the warm-up period, in minutes. For this duration after you create or update the alarm, the alarm stays in INSUFFICIENT_DATA and doesn’t perform alarm actions. Valid values range from 1 to 2,880 minutes (2 days). You can change this value while the alarm is still in its warm-up period. Changes have no effect after the warm-up period ends.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.cfn_property_mixins import aws_cloudwatch as cloudwatch warm_up_configuration_property = cloudwatch.CfnLogAlarmPropsMixin.WarmUpConfigurationProperty( only_start_evaluating_after_warm_up_period_ends=False, warm_up_period_duration_in_minutes=123 )
Attributes
- only_start_evaluating_after_warm_up_period_ends
Specifies whether the alarm waits for the full warm-up period before it starts evaluating.
If true, the alarm waits the entire WarmUpPeriodDurationInMinutes before it starts evaluating, even if metric data arrives earlier. If false, the alarm ends the warm-up period early and starts evaluating as soon as it has enough metric data to fill its evaluation window. This is the default behavior.
- warm_up_period_duration_in_minutes
The length of the warm-up period, in minutes.
For this duration after you create or update the alarm, the alarm stays in INSUFFICIENT_DATA and doesn’t perform alarm actions. Valid values range from 1 to 2,880 minutes (2 days). You can change this value while the alarm is still in its warm-up period. Changes have no effect after the warm-up period ends.