CloudWatchClient#
Index > CloudWatch > CloudWatchClient
Auto-generated documentation for CloudWatch type annotations stubs module mypy-boto3-cloudwatch.
CloudWatchClient#
Type annotations and code completion for boto3.client("cloudwatch").
boto3 documentation
# CloudWatchClient usage example
from boto3.session import Session
from mypy_boto3_cloudwatch.client import CloudWatchClient
def get_cloudwatch_client() -> CloudWatchClient:
return Session().client("cloudwatch")
Exceptions#
boto3 client exceptions are generated in runtime.
This class provides code completion for boto3.client("cloudwatch").exceptions structure.
# Exceptions.exceptions usage example
client = boto3.client("cloudwatch")
try:
do_something(client)
except (
client.exceptions.ClientError,
client.exceptions.ConcurrentModificationException,
client.exceptions.ConflictException,
client.exceptions.DashboardInvalidInputError,
client.exceptions.DashboardNotFoundError,
client.exceptions.InternalServiceFault,
client.exceptions.InvalidFormatFault,
client.exceptions.InvalidNextToken,
client.exceptions.InvalidParameterCombinationException,
client.exceptions.InvalidParameterValueException,
client.exceptions.LimitExceededException,
client.exceptions.LimitExceededFault,
client.exceptions.MissingRequiredParameterException,
client.exceptions.ResourceNotFound,
client.exceptions.ResourceNotFoundException,
) as e:
print(e)
# Exceptions.exceptions type checking example
from mypy_boto3_cloudwatch.client import Exceptions
def handle_error(exc: Exceptions.ClientError) -> None:
...
Methods#
can_paginate#
Type annotations and code completion for boto3.client("cloudwatch").can_paginate method.
boto3 documentation
# can_paginate method definition
def can_paginate(
self,
operation_name: str,
) -> bool:
...
generate_presigned_url#
Type annotations and code completion for boto3.client("cloudwatch").generate_presigned_url method.
boto3 documentation
# generate_presigned_url method definition
def generate_presigned_url(
self,
ClientMethod: str,
Params: Mapping[str, Any] = ...,
ExpiresIn: int = 3600,
HttpMethod: str = ...,
) -> str:
...
delete_alarm_mute_rule#
Deletes a specific alarm mute rule.
Type annotations and code completion for boto3.client("cloudwatch").delete_alarm_mute_rule method.
boto3 documentation
# delete_alarm_mute_rule method definition
def delete_alarm_mute_rule(
self,
*,
AlarmMuteRuleName: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
# delete_alarm_mute_rule method usage example with argument unpacking
kwargs: DeleteAlarmMuteRuleInputTypeDef = { # (1)
"AlarmMuteRuleName": ...,
}
parent.delete_alarm_mute_rule(**kwargs)
delete_alarms#
Deletes the specified alarms.
Type annotations and code completion for boto3.client("cloudwatch").delete_alarms method.
boto3 documentation
# delete_alarms method definition
def delete_alarms(
self,
*,
AlarmNames: Sequence[str],
) -> EmptyResponseMetadataTypeDef: # (1)
...
# delete_alarms method usage example with argument unpacking
kwargs: DeleteAlarmsInputTypeDef = { # (1)
"AlarmNames": ...,
}
parent.delete_alarms(**kwargs)
delete_anomaly_detector#
Deletes the specified anomaly detection model from your account.
Type annotations and code completion for boto3.client("cloudwatch").delete_anomaly_detector method.
boto3 documentation
# delete_anomaly_detector method definition
def delete_anomaly_detector(
self,
*,
Namespace: str = ...,
MetricName: str = ...,
Dimensions: Sequence[DimensionTypeDef] = ..., # (1)
Stat: str = ...,
SingleMetricAnomalyDetector: SingleMetricAnomalyDetectorUnionTypeDef = ..., # (2)
MetricMathAnomalyDetector: MetricMathAnomalyDetectorUnionTypeDef = ..., # (3)
) -> dict[str, Any]:
...
- See
Sequence[DimensionTypeDef] - See SingleMetricAnomalyDetectorUnionTypeDef
- See MetricMathAnomalyDetectorUnionTypeDef
# delete_anomaly_detector method usage example with argument unpacking
kwargs: DeleteAnomalyDetectorInputTypeDef = { # (1)
"Namespace": ...,
}
parent.delete_anomaly_detector(**kwargs)
delete_dashboards#
Deletes all dashboards that you specify.
Type annotations and code completion for boto3.client("cloudwatch").delete_dashboards method.
boto3 documentation
# delete_dashboards method definition
def delete_dashboards(
self,
*,
DashboardNames: Sequence[str],
) -> dict[str, Any]:
...
# delete_dashboards method usage example with argument unpacking
kwargs: DeleteDashboardsInputTypeDef = { # (1)
"DashboardNames": ...,
}
parent.delete_dashboards(**kwargs)
delete_insight_rules#
Permanently deletes the specified Contributor Insights rules.
Type annotations and code completion for boto3.client("cloudwatch").delete_insight_rules method.
boto3 documentation
# delete_insight_rules method definition
def delete_insight_rules(
self,
*,
RuleNames: Sequence[str],
) -> DeleteInsightRulesOutputTypeDef: # (1)
...
# delete_insight_rules method usage example with argument unpacking
kwargs: DeleteInsightRulesInputTypeDef = { # (1)
"RuleNames": ...,
}
parent.delete_insight_rules(**kwargs)
delete_metric_stream#
Permanently deletes the metric stream that you specify.
Type annotations and code completion for boto3.client("cloudwatch").delete_metric_stream method.
boto3 documentation
# delete_metric_stream method definition
def delete_metric_stream(
self,
*,
Name: str,
) -> dict[str, Any]:
...
# delete_metric_stream method usage example with argument unpacking
kwargs: DeleteMetricStreamInputTypeDef = { # (1)
"Name": ...,
}
parent.delete_metric_stream(**kwargs)
describe_alarm_contributors#
Returns the information of the current alarm contributors that are in
ALARM state.
Type annotations and code completion for boto3.client("cloudwatch").describe_alarm_contributors method.
boto3 documentation
# describe_alarm_contributors method definition
def describe_alarm_contributors(
self,
*,
AlarmName: str,
NextToken: str = ...,
) -> DescribeAlarmContributorsOutputTypeDef: # (1)
...
# describe_alarm_contributors method usage example with argument unpacking
kwargs: DescribeAlarmContributorsInputTypeDef = { # (1)
"AlarmName": ...,
}
parent.describe_alarm_contributors(**kwargs)
describe_alarm_history#
Retrieves the history for the specified alarm.
Type annotations and code completion for boto3.client("cloudwatch").describe_alarm_history method.
boto3 documentation
# describe_alarm_history method definition
def describe_alarm_history(
self,
*,
AlarmName: str = ...,
AlarmContributorId: str = ...,
AlarmTypes: Sequence[AlarmTypeType] = ..., # (1)
HistoryItemType: HistoryItemTypeType = ..., # (2)
StartDate: TimestampTypeDef = ...,
EndDate: TimestampTypeDef = ...,
MaxRecords: int = ...,
NextToken: str = ...,
ScanBy: ScanByType = ..., # (3)
) -> DescribeAlarmHistoryOutputTypeDef: # (4)
...
- See
Sequence[AlarmTypeType] - See HistoryItemTypeType
- See ScanByType
- See DescribeAlarmHistoryOutputTypeDef
# describe_alarm_history method usage example with argument unpacking
kwargs: DescribeAlarmHistoryInputTypeDef = { # (1)
"AlarmName": ...,
}
parent.describe_alarm_history(**kwargs)
describe_alarms#
Retrieves the specified alarms.
Type annotations and code completion for boto3.client("cloudwatch").describe_alarms method.
boto3 documentation
# describe_alarms method definition
def describe_alarms(
self,
*,
AlarmNames: Sequence[str] = ...,
AlarmNamePrefix: str = ...,
AlarmTypes: Sequence[AlarmTypeType] = ..., # (1)
ChildrenOfAlarmName: str = ...,
ParentsOfAlarmName: str = ...,
StateValue: StateValueType = ..., # (2)
ActionPrefix: str = ...,
MaxRecords: int = ...,
NextToken: str = ...,
) -> DescribeAlarmsOutputTypeDef: # (3)
...
- See
Sequence[AlarmTypeType] - See StateValueType
- See DescribeAlarmsOutputTypeDef
# describe_alarms method usage example with argument unpacking
kwargs: DescribeAlarmsInputTypeDef = { # (1)
"AlarmNames": ...,
}
parent.describe_alarms(**kwargs)
describe_alarms_for_metric#
Retrieves the alarms for the specified metric.
Type annotations and code completion for boto3.client("cloudwatch").describe_alarms_for_metric method.
boto3 documentation
# describe_alarms_for_metric method definition
def describe_alarms_for_metric(
self,
*,
MetricName: str,
Namespace: str,
Statistic: StatisticType = ..., # (1)
ExtendedStatistic: str = ...,
Dimensions: Sequence[DimensionTypeDef] = ..., # (2)
Period: int = ...,
Unit: StandardUnitType = ..., # (3)
) -> DescribeAlarmsForMetricOutputTypeDef: # (4)
...
- See StatisticType
- See
Sequence[DimensionTypeDef] - See StandardUnitType
- See DescribeAlarmsForMetricOutputTypeDef
# describe_alarms_for_metric method usage example with argument unpacking
kwargs: DescribeAlarmsForMetricInputTypeDef = { # (1)
"MetricName": ...,
"Namespace": ...,
}
parent.describe_alarms_for_metric(**kwargs)
describe_anomaly_detectors#
Lists the anomaly detection models that you have created in your account.
Type annotations and code completion for boto3.client("cloudwatch").describe_anomaly_detectors method.
boto3 documentation
# describe_anomaly_detectors method definition
def describe_anomaly_detectors(
self,
*,
NextToken: str = ...,
MaxResults: int = ...,
Namespace: str = ...,
MetricName: str = ...,
Dimensions: Sequence[DimensionTypeDef] = ..., # (1)
AnomalyDetectorTypes: Sequence[AnomalyDetectorTypeType] = ..., # (2)
) -> DescribeAnomalyDetectorsOutputTypeDef: # (3)
...
- See
Sequence[DimensionTypeDef] - See
Sequence[AnomalyDetectorTypeType] - See DescribeAnomalyDetectorsOutputTypeDef
# describe_anomaly_detectors method usage example with argument unpacking
kwargs: DescribeAnomalyDetectorsInputTypeDef = { # (1)
"NextToken": ...,
}
parent.describe_anomaly_detectors(**kwargs)
describe_insight_rules#
Returns a list of all the Contributor Insights rules in your account.
Type annotations and code completion for boto3.client("cloudwatch").describe_insight_rules method.
boto3 documentation
# describe_insight_rules method definition
def describe_insight_rules(
self,
*,
NextToken: str = ...,
MaxResults: int = ...,
) -> DescribeInsightRulesOutputTypeDef: # (1)
...
# describe_insight_rules method usage example with argument unpacking
kwargs: DescribeInsightRulesInputTypeDef = { # (1)
"NextToken": ...,
}
parent.describe_insight_rules(**kwargs)
disable_alarm_actions#
Disables the actions for the specified alarms.
Type annotations and code completion for boto3.client("cloudwatch").disable_alarm_actions method.
boto3 documentation
# disable_alarm_actions method definition
def disable_alarm_actions(
self,
*,
AlarmNames: Sequence[str],
) -> EmptyResponseMetadataTypeDef: # (1)
...
# disable_alarm_actions method usage example with argument unpacking
kwargs: DisableAlarmActionsInputTypeDef = { # (1)
"AlarmNames": ...,
}
parent.disable_alarm_actions(**kwargs)
disable_insight_rules#
Disables the specified Contributor Insights rules.
Type annotations and code completion for boto3.client("cloudwatch").disable_insight_rules method.
boto3 documentation
# disable_insight_rules method definition
def disable_insight_rules(
self,
*,
RuleNames: Sequence[str],
) -> DisableInsightRulesOutputTypeDef: # (1)
...
# disable_insight_rules method usage example with argument unpacking
kwargs: DisableInsightRulesInputTypeDef = { # (1)
"RuleNames": ...,
}
parent.disable_insight_rules(**kwargs)
enable_alarm_actions#
Enables the actions for the specified alarms.
Type annotations and code completion for boto3.client("cloudwatch").enable_alarm_actions method.
boto3 documentation
# enable_alarm_actions method definition
def enable_alarm_actions(
self,
*,
AlarmNames: Sequence[str],
) -> EmptyResponseMetadataTypeDef: # (1)
...
# enable_alarm_actions method usage example with argument unpacking
kwargs: EnableAlarmActionsInputTypeDef = { # (1)
"AlarmNames": ...,
}
parent.enable_alarm_actions(**kwargs)
enable_insight_rules#
Enables the specified Contributor Insights rules.
Type annotations and code completion for boto3.client("cloudwatch").enable_insight_rules method.
boto3 documentation
# enable_insight_rules method definition
def enable_insight_rules(
self,
*,
RuleNames: Sequence[str],
) -> EnableInsightRulesOutputTypeDef: # (1)
...
# enable_insight_rules method usage example with argument unpacking
kwargs: EnableInsightRulesInputTypeDef = { # (1)
"RuleNames": ...,
}
parent.enable_insight_rules(**kwargs)
get_alarm_mute_rule#
Retrieves details for a specific alarm mute rule.
Type annotations and code completion for boto3.client("cloudwatch").get_alarm_mute_rule method.
boto3 documentation
# get_alarm_mute_rule method definition
def get_alarm_mute_rule(
self,
*,
AlarmMuteRuleName: str,
) -> GetAlarmMuteRuleOutputTypeDef: # (1)
...
# get_alarm_mute_rule method usage example with argument unpacking
kwargs: GetAlarmMuteRuleInputTypeDef = { # (1)
"AlarmMuteRuleName": ...,
}
parent.get_alarm_mute_rule(**kwargs)
get_dashboard#
Displays the details of the dashboard that you specify.
Type annotations and code completion for boto3.client("cloudwatch").get_dashboard method.
boto3 documentation
# get_dashboard method definition
def get_dashboard(
self,
*,
DashboardName: str,
) -> GetDashboardOutputTypeDef: # (1)
...
# get_dashboard method usage example with argument unpacking
kwargs: GetDashboardInputTypeDef = { # (1)
"DashboardName": ...,
}
parent.get_dashboard(**kwargs)
get_insight_rule_report#
This operation returns the time series data collected by a Contributor Insights rule.
Type annotations and code completion for boto3.client("cloudwatch").get_insight_rule_report method.
boto3 documentation
# get_insight_rule_report method definition
def get_insight_rule_report(
self,
*,
RuleName: str,
StartTime: TimestampTypeDef,
EndTime: TimestampTypeDef,
Period: int,
MaxContributorCount: int = ...,
Metrics: Sequence[str] = ...,
OrderBy: str = ...,
) -> GetInsightRuleReportOutputTypeDef: # (1)
...
# get_insight_rule_report method usage example with argument unpacking
kwargs: GetInsightRuleReportInputTypeDef = { # (1)
"RuleName": ...,
"StartTime": ...,
"EndTime": ...,
"Period": ...,
}
parent.get_insight_rule_report(**kwargs)
get_metric_data#
You can use the GetMetricData API to retrieve CloudWatch metric
values.
Type annotations and code completion for boto3.client("cloudwatch").get_metric_data method.
boto3 documentation
# get_metric_data method definition
def get_metric_data(
self,
*,
MetricDataQueries: Sequence[MetricDataQueryUnionTypeDef], # (1)
StartTime: TimestampTypeDef,
EndTime: TimestampTypeDef,
NextToken: str = ...,
ScanBy: ScanByType = ..., # (2)
MaxDatapoints: int = ...,
LabelOptions: LabelOptionsTypeDef = ..., # (3)
) -> GetMetricDataOutputTypeDef: # (4)
...
- See
Sequence[MetricDataQueryUnionTypeDef] - See ScanByType
- See LabelOptionsTypeDef
- See GetMetricDataOutputTypeDef
# get_metric_data method usage example with argument unpacking
kwargs: GetMetricDataInputTypeDef = { # (1)
"MetricDataQueries": ...,
"StartTime": ...,
"EndTime": ...,
}
parent.get_metric_data(**kwargs)
get_metric_statistics#
Gets statistics for the specified metric.
Type annotations and code completion for boto3.client("cloudwatch").get_metric_statistics method.
boto3 documentation
# get_metric_statistics method definition
def get_metric_statistics(
self,
*,
Namespace: str,
MetricName: str,
StartTime: TimestampTypeDef,
EndTime: TimestampTypeDef,
Period: int,
Dimensions: Sequence[DimensionTypeDef] = ..., # (1)
Statistics: Sequence[StatisticType] = ..., # (2)
ExtendedStatistics: Sequence[str] = ...,
Unit: StandardUnitType = ..., # (3)
) -> GetMetricStatisticsOutputTypeDef: # (4)
...
- See
Sequence[DimensionTypeDef] - See
Sequence[StatisticType] - See StandardUnitType
- See GetMetricStatisticsOutputTypeDef
# get_metric_statistics method usage example with argument unpacking
kwargs: GetMetricStatisticsInputTypeDef = { # (1)
"Namespace": ...,
"MetricName": ...,
"StartTime": ...,
"EndTime": ...,
"Period": ...,
}
parent.get_metric_statistics(**kwargs)
get_metric_stream#
Returns information about the metric stream that you specify.
Type annotations and code completion for boto3.client("cloudwatch").get_metric_stream method.
boto3 documentation
# get_metric_stream method definition
def get_metric_stream(
self,
*,
Name: str,
) -> GetMetricStreamOutputTypeDef: # (1)
...
# get_metric_stream method usage example with argument unpacking
kwargs: GetMetricStreamInputTypeDef = { # (1)
"Name": ...,
}
parent.get_metric_stream(**kwargs)
get_metric_widget_image#
You can use the GetMetricWidgetImage API to retrieve a snapshot
graph of one or more Amazon CloudWatch metrics as a bitmap image.
Type annotations and code completion for boto3.client("cloudwatch").get_metric_widget_image method.
boto3 documentation
# get_metric_widget_image method definition
def get_metric_widget_image(
self,
*,
MetricWidget: str,
OutputFormat: str = ...,
) -> GetMetricWidgetImageOutputTypeDef: # (1)
...
# get_metric_widget_image method usage example with argument unpacking
kwargs: GetMetricWidgetImageInputTypeDef = { # (1)
"MetricWidget": ...,
}
parent.get_metric_widget_image(**kwargs)
get_o_tel_enrichment#
Returns the current status of vended metric enrichment for the account, including whether CloudWatch vended metrics are enriched with resource ARN and resource tag labels and queryable using PromQL.
Type annotations and code completion for boto3.client("cloudwatch").get_o_tel_enrichment method.
boto3 documentation
# get_o_tel_enrichment method definition
def get_o_tel_enrichment(
self,
) -> GetOTelEnrichmentOutputTypeDef: # (1)
...
list_alarm_mute_rules#
Lists alarm mute rules in your Amazon Web Services account and region.
Type annotations and code completion for boto3.client("cloudwatch").list_alarm_mute_rules method.
boto3 documentation
# list_alarm_mute_rules method definition
def list_alarm_mute_rules(
self,
*,
AlarmName: str = ...,
Statuses: Sequence[AlarmMuteRuleStatusType] = ..., # (1)
MaxRecords: int = ...,
NextToken: str = ...,
) -> ListAlarmMuteRulesOutputTypeDef: # (2)
...
- See
Sequence[AlarmMuteRuleStatusType] - See ListAlarmMuteRulesOutputTypeDef
# list_alarm_mute_rules method usage example with argument unpacking
kwargs: ListAlarmMuteRulesInputTypeDef = { # (1)
"AlarmName": ...,
}
parent.list_alarm_mute_rules(**kwargs)
list_dashboards#
Returns a list of the dashboards for your account.
Type annotations and code completion for boto3.client("cloudwatch").list_dashboards method.
boto3 documentation
# list_dashboards method definition
def list_dashboards(
self,
*,
DashboardNamePrefix: str = ...,
NextToken: str = ...,
) -> ListDashboardsOutputTypeDef: # (1)
...
# list_dashboards method usage example with argument unpacking
kwargs: ListDashboardsInputTypeDef = { # (1)
"DashboardNamePrefix": ...,
}
parent.list_dashboards(**kwargs)
list_managed_insight_rules#
Returns a list that contains the number of managed Contributor Insights rules in your account.
Type annotations and code completion for boto3.client("cloudwatch").list_managed_insight_rules method.
boto3 documentation
# list_managed_insight_rules method definition
def list_managed_insight_rules(
self,
*,
ResourceARN: str,
NextToken: str = ...,
MaxResults: int = ...,
) -> ListManagedInsightRulesOutputTypeDef: # (1)
...
# list_managed_insight_rules method usage example with argument unpacking
kwargs: ListManagedInsightRulesInputTypeDef = { # (1)
"ResourceARN": ...,
}
parent.list_managed_insight_rules(**kwargs)
list_metric_streams#
Returns a list of metric streams in this account.
Type annotations and code completion for boto3.client("cloudwatch").list_metric_streams method.
boto3 documentation
# list_metric_streams method definition
def list_metric_streams(
self,
*,
NextToken: str = ...,
MaxResults: int = ...,
) -> ListMetricStreamsOutputTypeDef: # (1)
...
# list_metric_streams method usage example with argument unpacking
kwargs: ListMetricStreamsInputTypeDef = { # (1)
"NextToken": ...,
}
parent.list_metric_streams(**kwargs)
list_metrics#
List the specified metrics.
Type annotations and code completion for boto3.client("cloudwatch").list_metrics method.
boto3 documentation
# list_metrics method definition
def list_metrics(
self,
*,
Namespace: str = ...,
MetricName: str = ...,
Dimensions: Sequence[DimensionFilterTypeDef] = ..., # (1)
NextToken: str = ...,
RecentlyActive: RecentlyActiveType = ..., # (2)
IncludeLinkedAccounts: bool = ...,
OwningAccount: str = ...,
) -> ListMetricsOutputTypeDef: # (3)
...
- See
Sequence[DimensionFilterTypeDef] - See RecentlyActiveType
- See ListMetricsOutputTypeDef
# list_metrics method usage example with argument unpacking
kwargs: ListMetricsInputTypeDef = { # (1)
"Namespace": ...,
}
parent.list_metrics(**kwargs)
list_tags_for_resource#
Displays the tags associated with a CloudWatch resource.
Type annotations and code completion for boto3.client("cloudwatch").list_tags_for_resource method.
boto3 documentation
# list_tags_for_resource method definition
def list_tags_for_resource(
self,
*,
ResourceARN: str,
) -> ListTagsForResourceOutputTypeDef: # (1)
...
# list_tags_for_resource method usage example with argument unpacking
kwargs: ListTagsForResourceInputTypeDef = { # (1)
"ResourceARN": ...,
}
parent.list_tags_for_resource(**kwargs)
put_alarm_mute_rule#
Creates or updates an alarm mute rule.
Type annotations and code completion for boto3.client("cloudwatch").put_alarm_mute_rule method.
boto3 documentation
# put_alarm_mute_rule method definition
def put_alarm_mute_rule(
self,
*,
Name: str,
Rule: RuleTypeDef, # (1)
Description: str = ...,
MuteTargets: MuteTargetsUnionTypeDef = ..., # (2)
Tags: Sequence[TagTypeDef] = ..., # (3)
StartDate: TimestampTypeDef = ...,
ExpireDate: TimestampTypeDef = ...,
) -> EmptyResponseMetadataTypeDef: # (4)
...
- See RuleTypeDef
- See MuteTargetsUnionTypeDef
- See
Sequence[TagTypeDef] - See EmptyResponseMetadataTypeDef
# put_alarm_mute_rule method usage example with argument unpacking
kwargs: PutAlarmMuteRuleInputTypeDef = { # (1)
"Name": ...,
"Rule": ...,
}
parent.put_alarm_mute_rule(**kwargs)
put_anomaly_detector#
Creates an anomaly detection model for a CloudWatch metric.
Type annotations and code completion for boto3.client("cloudwatch").put_anomaly_detector method.
boto3 documentation
# put_anomaly_detector method definition
def put_anomaly_detector(
self,
*,
Namespace: str = ...,
MetricName: str = ...,
Dimensions: Sequence[DimensionTypeDef] = ..., # (1)
Stat: str = ...,
Configuration: AnomalyDetectorConfigurationUnionTypeDef = ..., # (2)
MetricCharacteristics: MetricCharacteristicsTypeDef = ..., # (3)
SingleMetricAnomalyDetector: SingleMetricAnomalyDetectorUnionTypeDef = ..., # (4)
MetricMathAnomalyDetector: MetricMathAnomalyDetectorUnionTypeDef = ..., # (5)
) -> dict[str, Any]:
...
- See
Sequence[DimensionTypeDef] - See AnomalyDetectorConfigurationUnionTypeDef
- See MetricCharacteristicsTypeDef
- See SingleMetricAnomalyDetectorUnionTypeDef
- See MetricMathAnomalyDetectorUnionTypeDef
# put_anomaly_detector method usage example with argument unpacking
kwargs: PutAnomalyDetectorInputTypeDef = { # (1)
"Namespace": ...,
}
parent.put_anomaly_detector(**kwargs)
put_composite_alarm#
Creates or updates a composite alarm.
Type annotations and code completion for boto3.client("cloudwatch").put_composite_alarm method.
boto3 documentation
# put_composite_alarm method definition
def put_composite_alarm(
self,
*,
AlarmName: str,
AlarmRule: str,
ActionsEnabled: bool = ...,
AlarmActions: Sequence[str] = ...,
AlarmDescription: str = ...,
InsufficientDataActions: Sequence[str] = ...,
OKActions: Sequence[str] = ...,
Tags: Sequence[TagTypeDef] = ..., # (1)
ActionsSuppressor: str = ...,
ActionsSuppressorWaitPeriod: int = ...,
ActionsSuppressorExtensionPeriod: int = ...,
) -> EmptyResponseMetadataTypeDef: # (2)
...
- See
Sequence[TagTypeDef] - See EmptyResponseMetadataTypeDef
# put_composite_alarm method usage example with argument unpacking
kwargs: PutCompositeAlarmInputTypeDef = { # (1)
"AlarmName": ...,
"AlarmRule": ...,
}
parent.put_composite_alarm(**kwargs)
put_dashboard#
Creates a dashboard if it does not already exist, or updates an existing dashboard.
Type annotations and code completion for boto3.client("cloudwatch").put_dashboard method.
boto3 documentation
# put_dashboard method definition
def put_dashboard(
self,
*,
DashboardName: str,
DashboardBody: str,
) -> PutDashboardOutputTypeDef: # (1)
...
# put_dashboard method usage example with argument unpacking
kwargs: PutDashboardInputTypeDef = { # (1)
"DashboardName": ...,
"DashboardBody": ...,
}
parent.put_dashboard(**kwargs)
put_insight_rule#
Creates a Contributor Insights rule.
Type annotations and code completion for boto3.client("cloudwatch").put_insight_rule method.
boto3 documentation
# put_insight_rule method definition
def put_insight_rule(
self,
*,
RuleName: str,
RuleDefinition: str,
RuleState: str = ...,
Tags: Sequence[TagTypeDef] = ..., # (1)
ApplyOnTransformedLogs: bool = ...,
) -> dict[str, Any]:
...
- See
Sequence[TagTypeDef]
# put_insight_rule method usage example with argument unpacking
kwargs: PutInsightRuleInputTypeDef = { # (1)
"RuleName": ...,
"RuleDefinition": ...,
}
parent.put_insight_rule(**kwargs)
put_managed_insight_rules#
Creates a managed Contributor Insights rule for a specified Amazon Web Services resource.
Type annotations and code completion for boto3.client("cloudwatch").put_managed_insight_rules method.
boto3 documentation
# put_managed_insight_rules method definition
def put_managed_insight_rules(
self,
*,
ManagedRules: Sequence[ManagedRuleTypeDef], # (1)
) -> PutManagedInsightRulesOutputTypeDef: # (2)
...
- See
Sequence[ManagedRuleTypeDef] - See PutManagedInsightRulesOutputTypeDef
# put_managed_insight_rules method usage example with argument unpacking
kwargs: PutManagedInsightRulesInputTypeDef = { # (1)
"ManagedRules": ...,
}
parent.put_managed_insight_rules(**kwargs)
put_metric_alarm#
Creates or updates an alarm and associates it with the specified metric, metric math expression, anomaly detection model, Metrics Insights query, or PromQL query.
Type annotations and code completion for boto3.client("cloudwatch").put_metric_alarm method.
boto3 documentation
# put_metric_alarm method definition
def put_metric_alarm(
self,
*,
AlarmName: str,
AlarmDescription: str = ...,
ActionsEnabled: bool = ...,
OKActions: Sequence[str] = ...,
AlarmActions: Sequence[str] = ...,
InsufficientDataActions: Sequence[str] = ...,
MetricName: str = ...,
Namespace: str = ...,
Statistic: StatisticType = ..., # (1)
ExtendedStatistic: str = ...,
Dimensions: Sequence[DimensionTypeDef] = ..., # (2)
Period: int = ...,
Unit: StandardUnitType = ..., # (3)
EvaluationPeriods: int = ...,
DatapointsToAlarm: int = ...,
Threshold: float = ...,
ComparisonOperator: ComparisonOperatorType = ..., # (4)
TreatMissingData: str = ...,
EvaluateLowSampleCountPercentile: str = ...,
Metrics: Sequence[MetricDataQueryUnionTypeDef] = ..., # (5)
Tags: Sequence[TagTypeDef] = ..., # (6)
ThresholdMetricId: str = ...,
EvaluationCriteria: EvaluationCriteriaTypeDef = ..., # (7)
EvaluationInterval: int = ...,
) -> EmptyResponseMetadataTypeDef: # (8)
...
- See StatisticType
- See
Sequence[DimensionTypeDef] - See StandardUnitType
- See ComparisonOperatorType
- See
Sequence[MetricDataQueryUnionTypeDef] - See
Sequence[TagTypeDef] - See EvaluationCriteriaTypeDef
- See EmptyResponseMetadataTypeDef
# put_metric_alarm method usage example with argument unpacking
kwargs: PutMetricAlarmInputTypeDef = { # (1)
"AlarmName": ...,
}
parent.put_metric_alarm(**kwargs)
put_metric_data#
Publishes metric data to Amazon CloudWatch.
Type annotations and code completion for boto3.client("cloudwatch").put_metric_data method.
boto3 documentation
# put_metric_data method definition
def put_metric_data(
self,
*,
Namespace: str,
MetricData: Sequence[MetricDatumTypeDef] = ..., # (1)
EntityMetricData: Sequence[EntityMetricDataTypeDef] = ..., # (2)
StrictEntityValidation: bool = ...,
) -> EmptyResponseMetadataTypeDef: # (3)
...
- See
Sequence[MetricDatumTypeDef] - See
Sequence[EntityMetricDataTypeDef] - See EmptyResponseMetadataTypeDef
# put_metric_data method usage example with argument unpacking
kwargs: PutMetricDataInputTypeDef = { # (1)
"Namespace": ...,
}
parent.put_metric_data(**kwargs)
put_metric_stream#
Creates or updates a metric stream.
Type annotations and code completion for boto3.client("cloudwatch").put_metric_stream method.
boto3 documentation
# put_metric_stream method definition
def put_metric_stream(
self,
*,
Name: str,
FirehoseArn: str,
RoleArn: str,
OutputFormat: MetricStreamOutputFormatType, # (1)
IncludeFilters: Sequence[MetricStreamFilterUnionTypeDef] = ..., # (2)
ExcludeFilters: Sequence[MetricStreamFilterUnionTypeDef] = ..., # (2)
Tags: Sequence[TagTypeDef] = ..., # (4)
StatisticsConfigurations: Sequence[MetricStreamStatisticsConfigurationUnionTypeDef] = ..., # (5)
IncludeLinkedAccountsMetrics: bool = ...,
) -> PutMetricStreamOutputTypeDef: # (6)
...
- See MetricStreamOutputFormatType
- See
Sequence[MetricStreamFilterUnionTypeDef] - See
Sequence[MetricStreamFilterUnionTypeDef] - See
Sequence[TagTypeDef] - See
Sequence[MetricStreamStatisticsConfigurationUnionTypeDef] - See PutMetricStreamOutputTypeDef
# put_metric_stream method usage example with argument unpacking
kwargs: PutMetricStreamInputTypeDef = { # (1)
"Name": ...,
"FirehoseArn": ...,
"RoleArn": ...,
"OutputFormat": ...,
}
parent.put_metric_stream(**kwargs)
set_alarm_state#
Temporarily sets the state of an alarm for testing purposes.
Type annotations and code completion for boto3.client("cloudwatch").set_alarm_state method.
boto3 documentation
# set_alarm_state method definition
def set_alarm_state(
self,
*,
AlarmName: str,
StateValue: StateValueType, # (1)
StateReason: str,
StateReasonData: str = ...,
) -> EmptyResponseMetadataTypeDef: # (2)
...
# set_alarm_state method usage example with argument unpacking
kwargs: SetAlarmStateInputTypeDef = { # (1)
"AlarmName": ...,
"StateValue": ...,
"StateReason": ...,
}
parent.set_alarm_state(**kwargs)
start_metric_streams#
Starts the streaming of metrics for one or more of your metric streams.
Type annotations and code completion for boto3.client("cloudwatch").start_metric_streams method.
boto3 documentation
# start_metric_streams method definition
def start_metric_streams(
self,
*,
Names: Sequence[str],
) -> dict[str, Any]:
...
# start_metric_streams method usage example with argument unpacking
kwargs: StartMetricStreamsInputTypeDef = { # (1)
"Names": ...,
}
parent.start_metric_streams(**kwargs)
start_o_tel_enrichment#
Enables enrichment and PromQL access for CloudWatch vended metrics for supported AWS resources in the account.
Type annotations and code completion for boto3.client("cloudwatch").start_o_tel_enrichment method.
boto3 documentation
# start_o_tel_enrichment method definition
def start_o_tel_enrichment(
self,
) -> dict[str, Any]:
...
stop_metric_streams#
Stops the streaming of metrics for one or more of your metric streams.
Type annotations and code completion for boto3.client("cloudwatch").stop_metric_streams method.
boto3 documentation
# stop_metric_streams method definition
def stop_metric_streams(
self,
*,
Names: Sequence[str],
) -> dict[str, Any]:
...
# stop_metric_streams method usage example with argument unpacking
kwargs: StopMetricStreamsInputTypeDef = { # (1)
"Names": ...,
}
parent.stop_metric_streams(**kwargs)
stop_o_tel_enrichment#
Disables enrichment and PromQL access for CloudWatch vended metrics for supported AWS resources in the account.
Type annotations and code completion for boto3.client("cloudwatch").stop_o_tel_enrichment method.
boto3 documentation
# stop_o_tel_enrichment method definition
def stop_o_tel_enrichment(
self,
) -> dict[str, Any]:
...
tag_resource#
Assigns one or more tags (key-value pairs) to the specified CloudWatch resource.
Type annotations and code completion for boto3.client("cloudwatch").tag_resource method.
boto3 documentation
# tag_resource method definition
def tag_resource(
self,
*,
ResourceARN: str,
Tags: Sequence[TagTypeDef], # (1)
) -> dict[str, Any]:
...
- See
Sequence[TagTypeDef]
# tag_resource method usage example with argument unpacking
kwargs: TagResourceInputTypeDef = { # (1)
"ResourceARN": ...,
"Tags": ...,
}
parent.tag_resource(**kwargs)
untag_resource#
Removes one or more tags from the specified resource.
Type annotations and code completion for boto3.client("cloudwatch").untag_resource method.
boto3 documentation
# untag_resource method definition
def untag_resource(
self,
*,
ResourceARN: str,
TagKeys: Sequence[str],
) -> dict[str, Any]:
...
# untag_resource method usage example with argument unpacking
kwargs: UntagResourceInputTypeDef = { # (1)
"ResourceARN": ...,
"TagKeys": ...,
}
parent.untag_resource(**kwargs)
get_paginator#
Type annotations and code completion for boto3.client("cloudwatch").get_paginator method with overloads.
client.get_paginator("describe_alarm_history")-> DescribeAlarmHistoryPaginatorclient.get_paginator("describe_alarms")-> DescribeAlarmsPaginatorclient.get_paginator("describe_anomaly_detectors")-> DescribeAnomalyDetectorsPaginatorclient.get_paginator("get_metric_data")-> GetMetricDataPaginatorclient.get_paginator("list_alarm_mute_rules")-> ListAlarmMuteRulesPaginatorclient.get_paginator("list_dashboards")-> ListDashboardsPaginatorclient.get_paginator("list_metrics")-> ListMetricsPaginator
get_waiter#
Type annotations and code completion for boto3.client("cloudwatch").get_waiter method with overloads.
client.get_waiter("alarm_exists")-> AlarmExistsWaiterclient.get_waiter("alarm_mute_rule_exists")-> AlarmMuteRuleExistsWaiterclient.get_waiter("composite_alarm_exists")-> CompositeAlarmExistsWaiter