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_language="queryLanguage", 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" )], threshold=123, treat_missing_data="treatMissingData" ), 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']
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.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.
- 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.
- 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.
ScheduledQueryConfigurationProperty
- class CfnLogAlarmPropsMixin.ScheduledQueryConfigurationProperty(*, aggregation_expression=None, log_group_identifiers=None, query_language=None, query_string=None, schedule_configuration=None, scheduled_query_role_arn=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_language (
Optional[str]) – The query language to use for the scheduled query (CWLI or SQL).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.
- 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 scheduled_query_configuration_property = cloudwatch.CfnLogAlarmPropsMixin.ScheduledQueryConfigurationProperty( aggregation_expression="aggregationExpression", log_group_identifiers=["logGroupIdentifiers"], query_language="queryLanguage", query_string="queryString", schedule_configuration=cloudwatch.CfnLogAlarmPropsMixin.ScheduleConfigurationProperty( end_time_offset=123, schedule_expression="scheduleExpression", start_time_offset=123 ), scheduled_query_role_arn="scheduledQueryRoleArn" )
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_language
The query language to use for the scheduled query (CWLI or SQL).
- 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.