Skip to content

CloudWatch module

Index > CloudWatch

Auto-generated documentation for CloudWatch type annotations stubs module types-aiobotocore-cloudwatch.

How to install

From PyPI with pip

Install types-aioboto3 for CloudWatch service.

# install with aioboto3 type annotations
python -m pip install 'types-aioboto3[cloudwatch]'


# Lite version does not provide session.client/resource overloads
# it is more RAM-friendly, but requires explicit type annotations
python -m pip install 'types-aioboto3-lite[cloudwatch]'


# standalone installation
python -m pip install types-aiobotocore-cloudwatch

How to uninstall

python -m pip uninstall -y types-aiobotocore-cloudwatch

Usage

Code samples can be found in Examples.

CloudWatchClient

Type annotations and code completion for session.client("cloudwatch") as CloudWatchClient boto3 documentation

Usage example
from aioboto3.session import Session

from types_aiobotocore_cloudwatch.client import CloudWatchClient


session = Session()
async with session.client("cloudwatch") as client:
    client: CloudWatchClient

Paginators

Type annotations and code completion for paginators from session.client("cloudwatch").get_paginator("...").

Usage example
from types_aiobotocore_cloudwatch.paginator import DescribeAlarmHistoryPaginator

def get_describe_alarm_history_paginator() -> DescribeAlarmHistoryPaginator:
    return client.get_paginator("describe_alarm_history"))

Waiters

Type annotations and code completion for waiters from session.client("cloudwatch").get_waiter("...").

Usage example
from types_aiobotocore_cloudwatch.waiter import AlarmExistsWaiter

def get_alarm_exists_waiter() -> AlarmExistsWaiter:
    return Session().client("cloudwatch").get_waiter("alarm_exists")

CloudWatchServiceResource

Type annotations and code completion for session.resource("cloudwatch") as CloudWatchServiceResource boto3 documentation

Usage example
from types_aiobotocore_cloudwatch.service_resource import CloudWatchServiceResource

Collections

Type annotations and code completion for collections from session.resource("cloudwatch").*.

Usage example
from types_aiobotocore_cloudwatch.service_resource import ServiceResourceAlarmsCollection

def get_collection() -> ServiceResourceAlarmsCollection:
    return resource.alarms

Resources

Type annotations and code completion for additional resources from session.resource("cloudwatch").*.

Usage example
from types_aiobotocore_cloudwatch.service_resource import Alarm

def get_resource() -> Alarm:
    return resource.Alarm(...)

Literals

Type annotations for literals used in methods and schema.

Usage example
from types_aiobotocore_cloudwatch.literals import ActionsSuppressedByType

def get_value() -> ActionsSuppressedByType:
    return "Alarm"

Typed dictionaries

Type annotations for typed dictionaries used in methods and schema.

Usage example
from types_aiobotocore_cloudwatch.type_defs import AlarmHistoryItemTypeDef

def get_value() -> AlarmHistoryItemTypeDef:
    return {
        "AlarmName": ...,
    }