Skip to content

Type definitions#

Index > CloudWatch > Type definitions

Auto-generated documentation for CloudWatch type annotations stubs module mypy-boto3-cloudwatch.

TimestampTypeDef#

# TimestampTypeDef definition

TimestampTypeDef = Union[
    datetime,
    str,
]

AlarmHistoryItemTypeDef#

# AlarmHistoryItemTypeDef definition

class AlarmHistoryItemTypeDef(TypedDict):
    AlarmName: NotRequired[str],
    AlarmType: NotRequired[AlarmTypeType],  # (1)
    Timestamp: NotRequired[datetime],
    HistoryItemType: NotRequired[HistoryItemTypeType],  # (2)
    HistorySummary: NotRequired[str],
    HistoryData: NotRequired[str],
  1. See AlarmTypeType
  2. See HistoryItemTypeType

RangeTypeDef#

# RangeTypeDef definition

class RangeTypeDef(TypedDict):
    StartTime: datetime,
    EndTime: datetime,

DimensionTypeDef#

# DimensionTypeDef definition

class DimensionTypeDef(TypedDict):
    Name: str,
    Value: str,

MetricCharacteristicsTypeDef#

# MetricCharacteristicsTypeDef definition

class MetricCharacteristicsTypeDef(TypedDict):
    PeriodicSpikes: NotRequired[bool],

CloudwatchEventStateTypeDef#

# CloudwatchEventStateTypeDef definition

class CloudwatchEventStateTypeDef(TypedDict):
    timestamp: str,
    value: str,
    reason: NotRequired[str],
    reasonData: NotRequired[str],
    actionsSuppressedBy: NotRequired[str],
    actionsSuppressedReason: NotRequired[str],

CloudwatchEventMetricStatsMetricTypeDef#

# CloudwatchEventMetricStatsMetricTypeDef definition

class CloudwatchEventMetricStatsMetricTypeDef(TypedDict):
    metricName: str,
    namespace: str,
    dimensions: Dict[str, str],

CompositeAlarmTypeDef#

# CompositeAlarmTypeDef definition

class CompositeAlarmTypeDef(TypedDict):
    ActionsEnabled: NotRequired[bool],
    AlarmActions: NotRequired[List[str]],
    AlarmArn: NotRequired[str],
    AlarmConfigurationUpdatedTimestamp: NotRequired[datetime],
    AlarmDescription: NotRequired[str],
    AlarmName: NotRequired[str],
    AlarmRule: NotRequired[str],
    InsufficientDataActions: NotRequired[List[str]],
    OKActions: NotRequired[List[str]],
    StateReason: NotRequired[str],
    StateReasonData: NotRequired[str],
    StateUpdatedTimestamp: NotRequired[datetime],
    StateValue: NotRequired[StateValueType],  # (1)
    StateTransitionedTimestamp: NotRequired[datetime],
    ActionsSuppressedBy: NotRequired[ActionsSuppressedByType],  # (2)
    ActionsSuppressedReason: NotRequired[str],
    ActionsSuppressor: NotRequired[str],
    ActionsSuppressorWaitPeriod: NotRequired[int],
    ActionsSuppressorExtensionPeriod: NotRequired[int],
  1. See StateValueType
  2. See ActionsSuppressedByType

DashboardEntryTypeDef#

# DashboardEntryTypeDef definition

class DashboardEntryTypeDef(TypedDict):
    DashboardName: NotRequired[str],
    DashboardArn: NotRequired[str],
    LastModified: NotRequired[datetime],
    Size: NotRequired[int],

DashboardValidationMessageTypeDef#

# DashboardValidationMessageTypeDef definition

class DashboardValidationMessageTypeDef(TypedDict):
    DataPath: NotRequired[str],
    Message: NotRequired[str],

DatapointTypeDef#

# DatapointTypeDef definition

class DatapointTypeDef(TypedDict):
    Timestamp: NotRequired[datetime],
    SampleCount: NotRequired[float],
    Average: NotRequired[float],
    Sum: NotRequired[float],
    Minimum: NotRequired[float],
    Maximum: NotRequired[float],
    Unit: NotRequired[StandardUnitType],  # (1)
    ExtendedStatistics: NotRequired[Dict[str, float]],
  1. See StandardUnitType

DeleteAlarmsInputRequestTypeDef#

# DeleteAlarmsInputRequestTypeDef definition

class DeleteAlarmsInputRequestTypeDef(TypedDict):
    AlarmNames: Sequence[str],

DeleteDashboardsInputRequestTypeDef#

# DeleteDashboardsInputRequestTypeDef definition

class DeleteDashboardsInputRequestTypeDef(TypedDict):
    DashboardNames: Sequence[str],

DeleteInsightRulesInputRequestTypeDef#

# DeleteInsightRulesInputRequestTypeDef definition

class DeleteInsightRulesInputRequestTypeDef(TypedDict):
    RuleNames: Sequence[str],

PartialFailureTypeDef#

# PartialFailureTypeDef definition

class PartialFailureTypeDef(TypedDict):
    FailureResource: NotRequired[str],
    ExceptionType: NotRequired[str],
    FailureCode: NotRequired[str],
    FailureDescription: NotRequired[str],

ResponseMetadataTypeDef#

# ResponseMetadataTypeDef definition

class ResponseMetadataTypeDef(TypedDict):
    RequestId: str,
    HTTPStatusCode: int,
    HTTPHeaders: Dict[str, str],
    RetryAttempts: int,
    HostId: NotRequired[str],

DeleteMetricStreamInputRequestTypeDef#

# DeleteMetricStreamInputRequestTypeDef definition

class DeleteMetricStreamInputRequestTypeDef(TypedDict):
    Name: str,

PaginatorConfigTypeDef#

# PaginatorConfigTypeDef definition

class PaginatorConfigTypeDef(TypedDict):
    MaxItems: NotRequired[int],
    PageSize: NotRequired[int],
    StartingToken: NotRequired[str],

WaiterConfigTypeDef#

# WaiterConfigTypeDef definition

class WaiterConfigTypeDef(TypedDict):
    Delay: NotRequired[int],
    MaxAttempts: NotRequired[int],

DescribeAlarmsInputRequestTypeDef#

# DescribeAlarmsInputRequestTypeDef definition

class DescribeAlarmsInputRequestTypeDef(TypedDict):
    AlarmNames: NotRequired[Sequence[str]],
    AlarmNamePrefix: NotRequired[str],
    AlarmTypes: NotRequired[Sequence[AlarmTypeType]],  # (1)
    ChildrenOfAlarmName: NotRequired[str],
    ParentsOfAlarmName: NotRequired[str],
    StateValue: NotRequired[StateValueType],  # (2)
    ActionPrefix: NotRequired[str],
    MaxRecords: NotRequired[int],
    NextToken: NotRequired[str],
  1. See AlarmTypeType
  2. See StateValueType

DescribeInsightRulesInputRequestTypeDef#

# DescribeInsightRulesInputRequestTypeDef definition

class DescribeInsightRulesInputRequestTypeDef(TypedDict):
    NextToken: NotRequired[str],
    MaxResults: NotRequired[int],

InsightRuleTypeDef#

# InsightRuleTypeDef definition

class InsightRuleTypeDef(TypedDict):
    Name: str,
    State: str,
    Schema: str,
    Definition: str,
    ManagedRule: NotRequired[bool],

DimensionFilterTypeDef#

# DimensionFilterTypeDef definition

class DimensionFilterTypeDef(TypedDict):
    Name: str,
    Value: NotRequired[str],

DisableAlarmActionsInputRequestTypeDef#

# DisableAlarmActionsInputRequestTypeDef definition

class DisableAlarmActionsInputRequestTypeDef(TypedDict):
    AlarmNames: Sequence[str],

DisableInsightRulesInputRequestTypeDef#

# DisableInsightRulesInputRequestTypeDef definition

class DisableInsightRulesInputRequestTypeDef(TypedDict):
    RuleNames: Sequence[str],

EnableAlarmActionsInputRequestTypeDef#

# EnableAlarmActionsInputRequestTypeDef definition

class EnableAlarmActionsInputRequestTypeDef(TypedDict):
    AlarmNames: Sequence[str],

EnableInsightRulesInputRequestTypeDef#

# EnableInsightRulesInputRequestTypeDef definition

class EnableInsightRulesInputRequestTypeDef(TypedDict):
    RuleNames: Sequence[str],

GetDashboardInputRequestTypeDef#

# GetDashboardInputRequestTypeDef definition

class GetDashboardInputRequestTypeDef(TypedDict):
    DashboardName: str,

InsightRuleMetricDatapointTypeDef#

# InsightRuleMetricDatapointTypeDef definition

class InsightRuleMetricDatapointTypeDef(TypedDict):
    Timestamp: datetime,
    UniqueContributors: NotRequired[float],
    MaxContributorValue: NotRequired[float],
    SampleCount: NotRequired[float],
    Average: NotRequired[float],
    Sum: NotRequired[float],
    Minimum: NotRequired[float],
    Maximum: NotRequired[float],

LabelOptionsTypeDef#

# LabelOptionsTypeDef definition

class LabelOptionsTypeDef(TypedDict):
    Timezone: NotRequired[str],

MessageDataTypeDef#

# MessageDataTypeDef definition

class MessageDataTypeDef(TypedDict):
    Code: NotRequired[str],
    Value: NotRequired[str],

GetMetricStreamInputRequestTypeDef#

# GetMetricStreamInputRequestTypeDef definition

class GetMetricStreamInputRequestTypeDef(TypedDict):
    Name: str,

MetricStreamFilterTypeDef#

# MetricStreamFilterTypeDef definition

class MetricStreamFilterTypeDef(TypedDict):
    Namespace: NotRequired[str],
    MetricNames: NotRequired[List[str]],

GetMetricWidgetImageInputRequestTypeDef#

# GetMetricWidgetImageInputRequestTypeDef definition

class GetMetricWidgetImageInputRequestTypeDef(TypedDict):
    MetricWidget: str,
    OutputFormat: NotRequired[str],

InsightRuleContributorDatapointTypeDef#

# InsightRuleContributorDatapointTypeDef definition

class InsightRuleContributorDatapointTypeDef(TypedDict):
    Timestamp: datetime,
    ApproximateValue: float,

ListDashboardsInputRequestTypeDef#

# ListDashboardsInputRequestTypeDef definition

class ListDashboardsInputRequestTypeDef(TypedDict):
    DashboardNamePrefix: NotRequired[str],
    NextToken: NotRequired[str],

ListManagedInsightRulesInputRequestTypeDef#

# ListManagedInsightRulesInputRequestTypeDef definition

class ListManagedInsightRulesInputRequestTypeDef(TypedDict):
    ResourceARN: str,
    NextToken: NotRequired[str],
    MaxResults: NotRequired[int],

ListMetricStreamsInputRequestTypeDef#

# ListMetricStreamsInputRequestTypeDef definition

class ListMetricStreamsInputRequestTypeDef(TypedDict):
    NextToken: NotRequired[str],
    MaxResults: NotRequired[int],

MetricStreamEntryTypeDef#

# MetricStreamEntryTypeDef definition

class MetricStreamEntryTypeDef(TypedDict):
    Arn: NotRequired[str],
    CreationDate: NotRequired[datetime],
    LastUpdateDate: NotRequired[datetime],
    Name: NotRequired[str],
    FirehoseArn: NotRequired[str],
    State: NotRequired[str],
    OutputFormat: NotRequired[MetricStreamOutputFormatType],  # (1)
  1. See MetricStreamOutputFormatType

ListTagsForResourceInputRequestTypeDef#

# ListTagsForResourceInputRequestTypeDef definition

class ListTagsForResourceInputRequestTypeDef(TypedDict):
    ResourceARN: str,

TagTypeDef#

# TagTypeDef definition

class TagTypeDef(TypedDict):
    Key: str,
    Value: str,

ManagedRuleStateTypeDef#

# ManagedRuleStateTypeDef definition

class ManagedRuleStateTypeDef(TypedDict):
    RuleName: str,
    State: str,

StatisticSetTypeDef#

# StatisticSetTypeDef definition

class StatisticSetTypeDef(TypedDict):
    SampleCount: float,
    Sum: float,
    Minimum: float,
    Maximum: float,

MetricStreamStatisticsMetricTypeDef#

# MetricStreamStatisticsMetricTypeDef definition

class MetricStreamStatisticsMetricTypeDef(TypedDict):
    Namespace: str,
    MetricName: str,

PutDashboardInputRequestTypeDef#

# PutDashboardInputRequestTypeDef definition

class PutDashboardInputRequestTypeDef(TypedDict):
    DashboardName: str,
    DashboardBody: str,

SetAlarmStateInputAlarmSetStateTypeDef#

# SetAlarmStateInputAlarmSetStateTypeDef definition

class SetAlarmStateInputAlarmSetStateTypeDef(TypedDict):
    StateValue: StateValueType,  # (1)
    StateReason: str,
    StateReasonData: NotRequired[str],
  1. See StateValueType

SetAlarmStateInputRequestTypeDef#

# SetAlarmStateInputRequestTypeDef definition

class SetAlarmStateInputRequestTypeDef(TypedDict):
    AlarmName: str,
    StateValue: StateValueType,  # (1)
    StateReason: str,
    StateReasonData: NotRequired[str],
  1. See StateValueType

StartMetricStreamsInputRequestTypeDef#

# StartMetricStreamsInputRequestTypeDef definition

class StartMetricStreamsInputRequestTypeDef(TypedDict):
    Names: Sequence[str],

StopMetricStreamsInputRequestTypeDef#

# StopMetricStreamsInputRequestTypeDef definition

class StopMetricStreamsInputRequestTypeDef(TypedDict):
    Names: Sequence[str],

UntagResourceInputRequestTypeDef#

# UntagResourceInputRequestTypeDef definition

class UntagResourceInputRequestTypeDef(TypedDict):
    ResourceARN: str,
    TagKeys: Sequence[str],

AnomalyDetectorConfigurationTypeDef#

# AnomalyDetectorConfigurationTypeDef definition

class AnomalyDetectorConfigurationTypeDef(TypedDict):
    ExcludedTimeRanges: NotRequired[List[RangeTypeDef]],  # (1)
    MetricTimezone: No