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.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#
Check if an operation can be paginated.
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:
...
close#
Closes underlying endpoint connections.
Type annotations and code completion for boto3.client("cloudwatch").close
method.
boto3 documentation
# close method definition
def close(
self,
) -> None:
...
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: DeleteAlarmsInputRequestTypeDef = { # (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: SingleMetricAnomalyDetectorTypeDef = ..., # (2)
MetricMathAnomalyDetector: MetricMathAnomalyDetectorTypeDef = ..., # (3)
) -> Dict[str, Any]:
...
# delete_anomaly_detector method usage example with argument unpacking
kwargs: DeleteAnomalyDetectorInputRequestTypeDef = { # (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: DeleteDashboardsInputRequestTypeDef = { # (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: DeleteInsightRulesInputRequestTypeDef = { # (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: DeleteMetricStreamInputRequestTypeDef = { # (1)
"Name": ...,
}
parent.delete_metric_stream(**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 = ...,
AlarmTypes: Sequence[AlarmTypeType] = ..., # (1)
HistoryItemType: HistoryItemTypeType = ..., # (2)
StartDate: TimestampTypeDef = ...,
EndDate: TimestampTypeDef = ...,
MaxRecords: int = ...,
NextToken: str = ...,
ScanBy: ScanByType = ..., # (3)
) -> DescribeAlarmHistoryOutputTypeDef: # (4)
...
- See AlarmTypeType
- See HistoryItemTypeType
- See ScanByType
- See DescribeAlarmHistoryOutputTypeDef
# describe_alarm_history method usage example with argument unpacking
kwargs: DescribeAlarmHistoryInputRequestTypeDef = { # (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 AlarmTypeType
- See StateValueType
- See DescribeAlarmsOutputTypeDef
# describe_alarms method usage example with argument unpacking
kwargs: DescribeAlarmsInputRequestTypeDef = { # (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 DimensionTypeDef
- See StandardUnitType
- See DescribeAlarmsForMetricOutputTypeDef
# describe_alarms_for_metric method usage example with argument unpacking
kwargs: DescribeAlarmsForMetricInputRequestTypeDef = { # (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)
...
# describe_anomaly_detectors method usage example with argument unpacking
kwargs: DescribeAnomalyDetectorsInputRequestTypeDef = { # (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: DescribeInsightRulesInputRequestTypeDef = { # (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: DisableAlarmActionsInputRequestTypeDef = { # (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: DisableInsightRulesInputRequestTypeDef = { # (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: EnableAlarmActionsInputRequestTypeDef = { # (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: EnableInsightRulesInputRequestTypeDef = { # (1)
"RuleNames": ...,
}
parent.enable_insight_rules(**kwargs)
generate_presigned_url#
Generate a presigned url given a client, its method, and arguments.
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:
...
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: GetDashboardInputRequestTypeDef = { # (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: GetInsightRuleReportInputRequestTypeDef = { # (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 MetricDataQueryTypeDef MetricDataQueryOutputTypeDef
- See ScanByType
- See LabelOptionsTypeDef
- See GetMetricDataOutputTypeDef
# get_metric_data method usage example with argument unpacking
kwargs: GetMetricDataInputRequestTypeDef = { # (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)
...
# get_metric_statistics method usage example with argument unpacking
kwargs: GetMetricStatisticsInputRequestTypeDef = { # (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: GetMetricStreamInputRequestTypeDef = { # (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: GetMetricWidgetImageInputRequestTypeDef = { # (1)
"MetricWidget": ...,
}
parent.get_metric_widget_image(**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: ListDashboardsInputRequestTypeDef = { # (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: ListManagedInsightRulesInputRequestTypeDef = { # (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: ListMetricStreamsInputRequestTypeDef = { # (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)
...
# list_metrics method usage example with argument unpacking
kwargs: ListMetricsInputRequestTypeDef = { # (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: ListTagsForResourceInputRequestTypeDef = { # (1)
"ResourceARN": ...,
}
parent.list_tags_for_resource(**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: AnomalyDetectorConfigurationTypeDef = ..., # (2)
MetricCharacteristics: MetricCharacteristicsTypeDef = ..., # (3)
SingleMetricAnomalyDetector: SingleMetricAnomalyDetectorTypeDef = ..., # (4)
MetricMathAnomalyDetector: MetricMathAnomalyDetectorTypeDef = ..., # (5)
) -> Dict[str, Any]:
...
- See DimensionTypeDef
- See AnomalyDetectorConfigurationTypeDef
- See MetricCharacteristicsTypeDef
- See SingleMetricAnomalyDetectorTypeDef
- See MetricMathAnomalyDetectorTypeDef
# put_anomaly_detector method usage example with argument unpacking
kwargs: PutAnomalyDetectorInputRequestTypeDef = { # (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)
...
# put_composite_alarm method usage example with argument unpacking
kwargs: PutCompositeAlarmInputRequestTypeDef = { # (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: PutDashboardInputRequestTypeDef = { # (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)
) -> Dict[str, Any]:
...
- See TagTypeDef
# put_insight_rule method usage example with argument unpacking
kwargs: PutInsightRuleInputRequestTypeDef = { # (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)
...
# put_managed_insight_rules method usage example with argument unpacking
kwargs: PutManagedInsightRulesInputRequestTypeDef = { # (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, or Metrics Insights 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,
EvaluationPeriods: int,
ComparisonOperator: ComparisonOperatorType, # (1)
AlarmDescription: str = ...,
ActionsEnabled: bool = ...,
OKActions: Sequence[str] = ...,
AlarmActions: Sequence[str] = ...,
InsufficientDataActions: Sequence[str] = ...,
MetricName: str = ...,
Namespace: str = ...,
Statistic: StatisticType = ..., # (2)
ExtendedStatistic: str = ...,
Dimensions: Sequence[DimensionTypeDef] = ..., # (3)
Period: int = ...,
Unit: StandardUnitType = ..., # (4)
DatapointsToAlarm: int = ...,
Threshold: float = ...,
TreatMissingData: str = ...,
EvaluateLowSampleCountPercentile: str = ...,
Metrics: Sequence[MetricDataQueryTypeDef] = ..., # (5)
Tags: Sequence[TagTypeDef] = ..., # (6)
ThresholdMetricId: str = ...,
) -> EmptyResponseMetadataTypeDef: # (7)
...
- See ComparisonOperatorType
- See StatisticType
- See DimensionTypeDef
- See StandardUnitType
- See MetricDataQueryTypeDef
- See TagTypeDef
- See EmptyResponseMetadataTypeDef
# put_metric_alarm method usage example with argument unpacking
kwargs: PutMetricAlarmInputRequestTypeDef = { # (1)
"AlarmName": ...,
"EvaluationPeriods": ...,
"ComparisonOperator": ...,
}
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)
...
# put_metric_data method usage example with argument unpacking
kwargs: PutMetricDataInputRequestTypeDef = { # (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[MetricStreamFilterTypeDef] = ..., # (3)
Tags: Sequence[TagTypeDef] = ..., # (4)
StatisticsConfigurations: Sequence[MetricStreamStatisticsConfigurationUnionTypeDef] = ..., # (5)
IncludeLinkedAccountsMetrics: bool = ...,
) -> PutMetricStreamOutputTypeDef: # (6)
...
- See MetricStreamOutputFormatType
- See MetricStreamFilterTypeDef MetricStreamFilterOutputTypeDef
- See MetricStreamFilterTypeDef
- See TagTypeDef
- See MetricStreamStatisticsConfigurationTypeDef MetricStreamStatisticsConfigurationOutputTypeDef
- See PutMetricStreamOutputTypeDef
# put_metric_stream method usage example with argument unpacking
kwargs: PutMetricStreamInputRequestTypeDef = { # (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: SetAlarmStateInputRequestTypeDef = { # (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: StartMetricStreamsInputRequestTypeDef = { # (1)
"Names": ...,
}
parent.start_metric_streams(**kwargs)
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: StopMetricStreamsInputRequestTypeDef = { # (1)
"Names": ...,
}
parent.stop_metric_streams(**kwargs)
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 TagTypeDef
# tag_resource method usage example with argument unpacking
kwargs: TagResourceInputRequestTypeDef = { # (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: UntagResourceInputRequestTypeDef = { # (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_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("composite_alarm_exists")
-> CompositeAlarmExistsWaiter