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: Union[SingleMetricAnomalyDetectorTypeDef, SingleMetricAnomalyDetectorExtraOutputTypeDef] = ..., # (2)
MetricMathAnomalyDetector: Union[MetricMathAnomalyDetectorTypeDef, MetricMathAnomalyDetectorExtraOutputTypeDef] = ..., # (3)
) -> Dict[str, Any]:
...
- See DimensionTypeDef
- See SingleMetricAnomalyDetectorTypeDef SingleMetricAnomalyDetectorExtraOutputTypeDef
- See MetricMathAnomalyDetectorTypeDef MetricMathAnomalyDetectorExtraOutputTypeDef
# 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.