Skip to content

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

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.

Usage example
client = boto3.client("cloudwatch")

try:
    do_something(client)
except (
    client.ClientError,
    client.ConcurrentModificationException,
    client.DashboardInvalidInputError,
    client.DashboardNotFoundError,
    client.InternalServiceFault,
    client.InvalidFormatFault,
    client.InvalidNextToken,
    client.InvalidParameterCombinationException,
    client.InvalidParameterValueException,
    client.LimitExceededException,
    client.LimitExceededFault,
    client.MissingRequiredParameterException,
    client.ResourceNotFound,
    client.ResourceNotFoundException,
) as e:
    print(e)
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

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

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

Method definition
def delete_alarms(
    self,
    *,
    AlarmNames: Sequence[str],
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: DeleteAlarmsInputRequestTypeDef = {  # (1)
    "AlarmNames": ...,
}

parent.delete_alarms(**kwargs)
  1. See DeleteAlarmsInputRequestTypeDef

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

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]:
    ...
  1. See DimensionTypeDef
  2. See SingleMetricAnomalyDetectorTypeDef
  3. See MetricMathAnomalyDetectorTypeDef
Usage example with kwargs
kwargs: DeleteAnomalyDetectorInputRequestTypeDef = {  # (1)
    "Namespace": ...,
}

parent.delete_anomaly_detector(**kwargs)
  1. See DeleteAnomalyDetectorInputRequestTypeDef

delete_dashboards

Deletes all dashboards that you specify.

Type annotations and code completion for boto3.client("cloudwatch").delete_dashboards method. boto3 documentation

Method definition
def delete_dashboards(
    self,
    *,
    DashboardNames: Sequence[str],
) -> Dict[str, Any]:
    ...
Usage example with kwargs
kwargs: DeleteDashboardsInputRequestTypeDef = {  # (1)
    "DashboardNames": ...,
}

parent.delete_dashboards(**kwargs)
  1. See DeleteDashboardsInputRequestTypeDef

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

Method definition
def delete_insight_rules(
    self,
    *,
    RuleNames: Sequence[str],
) -> DeleteInsightRulesOutputTypeDef:  # (1)
    ...
  1. See DeleteInsightRulesOutputTypeDef
Usage example with kwargs
kwargs: DeleteInsightRulesInputRequestTypeDef = {  # (1)
    "RuleNames": ...,
}

parent.delete_insight_rules(**kwargs)
  1. See DeleteInsightRulesInputRequestTypeDef

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

Method definition
def delete_metric_stream(
    self,
    *,
    Name: str,
) -> Dict[str, Any]:
    ...
Usage example with kwargs
kwargs: DeleteMetricStreamInputRequestTypeDef = {  # (1)
    "Name": ...,
}

parent.delete_metric_stream(**kwargs)
  1. See DeleteMetricStreamInputRequestTypeDef

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

Method definition
def describe_alarm_history(
    self,
    *,
    AlarmName: str = ...,
    AlarmTypes: Sequence[AlarmTypeType] = ...,  # (1)
    HistoryItemType: HistoryItemTypeType = ...,  # (2)
    StartDate: Union[datetime, str] = ...,
    EndDate: Union[datetime, str] = ...,
    MaxRecords: int = ...,
    NextToken: str = ...,
    ScanBy: ScanByType = ...,  # (3)
) -> DescribeAlarmHistoryOutputTypeDef:  # (4)
    ...
  1. See AlarmTypeType
  2. See HistoryItemTypeType
  3. See ScanByType
  4. See DescribeAlarmHistoryOutputTypeDef
Usage example with kwargs
kwargs: DescribeAlarmHistoryInputRequestTypeDef = {  # (1)
    "AlarmName": ...,
}

parent.describe_alarm_history(**kwargs)
  1. See DescribeAlarmHistoryInputRequestTypeDef

describe_alarms

Retrieves the specified alarms.

Type annotations and code completion for boto3.client("cloudwatch").describe_alarms method. boto3 documentation

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)
    ...
  1. See AlarmTypeType
  2. See StateValueType
  3. See DescribeAlarmsOutputTypeDef
Usage example with kwargs
kwargs: DescribeAlarmsInputRequestTypeDef = {  # (1)
    "AlarmNames": ...,
}

parent.describe_alarms(**kwargs)
  1. See DescribeAlarmsInputRequestTypeDef

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

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)
    ...
  1. See StatisticType
  2. See DimensionTypeDef
  3. See StandardUnitType
  4. See DescribeAlarmsForMetricOutputTypeDef
Usage example with kwargs
kwargs: DescribeAlarmsForMetricInputRequestTypeDef = {  # (1)
    "MetricName": ...,
    "Namespace": ...,
}

parent.describe_alarms_for_metric(**kwargs)
  1. See DescribeAlarmsForMetricInputRequestTypeDef

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

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)
    ...
  1. See DimensionTypeDef
  2. See AnomalyDetectorTypeType
  3. See DescribeAnomalyDetectorsOutputTypeDef
Usage example with kwargs
kwargs: DescribeAnomalyDetectorsInputRequestTypeDef = {  # (1)
    "NextToken": ...,
}

parent.describe_anomaly_detectors(**kwargs)
  1. See DescribeAnomalyDetectorsInputRequestTypeDef

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

Method definition
def describe_insight_rules(
    self,
    *,
    NextToken: str = ...,
    MaxResults: int = ...,
) -> DescribeInsightRulesOutputTypeDef:  # (1)
    ...
  1. See DescribeInsightRulesOutputTypeDef
Usage example with kwargs
kwargs: DescribeInsightRulesInputRequestTypeDef = {  # (1)
    "NextToken": ...,
}

parent.describe_insight_rules(**kwargs)
  1. See DescribeInsightRulesInputRequestTypeDef

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

Method definition
def disable_alarm_actions(
    self,
    *,
    AlarmNames: Sequence[str],
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: DisableAlarmActionsInputRequestTypeDef = {  # (1)
    "AlarmNames": ...,
}

parent.disable_alarm_actions(**kwargs)
  1. See DisableAlarmActionsInputRequestTypeDef

disable_insight_rules

Disables the specified Contributor Insights rules.

Type annotations and code completion for boto3.client("cloudwatch").disable_insight_rules method. boto3 documentation

Method definition
def disable_insight_rules(
    self,
    *,
    RuleNames: Sequence[str],
) -> DisableInsightRulesOutputTypeDef:  # (1)
    ...
  1. See DisableInsightRulesOutputTypeDef
Usage example with kwargs
kwargs: DisableInsightRulesInputRequestTypeDef = {  # (1)
    "RuleNames": ...,
}

parent.disable_insight_rules(**kwargs)
  1. See DisableInsightRulesInputRequestTypeDef

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

Method definition
def enable_alarm_actions(
    self,
    *,
    AlarmNames: Sequence[str],
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: EnableAlarmActionsInputRequestTypeDef = {  # (1)
    "AlarmNames": ...,
}

parent.enable_alarm_actions(**kwargs)
  1. See EnableAlarmActionsInputRequestTypeDef

enable_insight_rules

Enables the specified Contributor Insights rules.

Type annotations and code completion for boto3.client("cloudwatch").enable_insight_rules method. boto3 documentation

Method definition
def enable_insight_rules(
    self,
    *,
    RuleNames: Sequence[str],
) -> EnableInsightRulesOutputTypeDef:  # (1)
    ...
  1. See EnableInsightRulesOutputTypeDef
Usage example with kwargs
kwargs: EnableInsightRulesInputRequestTypeDef = {  # (1)
    "RuleNames": ...,
}

parent.enable_insight_rules(**kwargs)
  1. See EnableInsightRulesInputRequestTypeDef

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

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

Method definition
def get_dashboard(
    self,
    *,
    DashboardName: str,
) -> GetDashboardOutputTypeDef:  # (1)
    ...
  1. See GetDashboardOutputTypeDef
Usage example with kwargs
kwargs: GetDashboardInputRequestTypeDef = {  # (1)
    "DashboardName": ...,
}

parent.get_dashboard(**kwargs)
  1. See GetDashboardInputRequestTypeDef

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

Method definition
def get_insight_rule_report(
    self,
    *,
    RuleName: str,
    StartTime: Union[datetime, str],
    EndTime: Union[datetime, str],
    Period: int,
    MaxContributorCount: int = ...,
    Metrics: Sequence[str] = ...,
    OrderBy: str = ...,
) -> GetInsightRuleReportOutputTypeDef:  # (1)
    ...
  1. See GetInsightRuleReportOutputTypeDef
Usage example with kwargs
kwargs: GetInsightRuleReportInputRequestTypeDef = {  # (1)
    "RuleName": ...,
    "StartTime": ...,
    "EndTime": ...,
    "Period": ...,
}

parent.get_insight_rule_report(**kwargs)
  1. See GetInsightRuleReportInputRequestTypeDef

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

Method definition
def get_metric_data(
    self,
    *,
    MetricDataQueries: Sequence[MetricDataQueryTypeDef],  # (1)
    StartTime: Union[datetime, str],
    EndTime: Union[datetime, str],
    NextToken: str = ...,
    ScanBy: ScanByType = ...,  # (2)
    MaxDatapoints: int = ...,
    LabelOptions: LabelOptionsTypeDef = ...,  # (3)
) -> GetMetricDataOutputTypeDef:  # (4)
    ...
  1. See MetricDataQueryTypeDef
  2. See ScanByType
  3. See LabelOptionsTypeDef
  4. See GetMetricDataOutputTypeDef
Usage example with kwargs
kwargs: GetMetricDataInputRequestTypeDef = {  # (1)
    "MetricDataQueries": ...,
    "StartTime": ...,
    "EndTime": ...,
}

parent.get_metric_data(**kwargs)
  1. See GetMetricDataInputRequestTypeDef

get_metric_statistics

Gets statistics for the specified metric.

Type annotations and code completion for boto3.client("cloudwatch").get_metric_statistics method. boto3 documentation

Method definition
def get_metric_statistics(
    self,
    *,
    Namespace: str,
    MetricName: str,
    StartTime: Union[datetime, str],
    EndTime: Union[datetime, str],
    Period: int,
    Dimensions: Sequence[DimensionTypeDef] = ...,  # (1)
    Statistics: Sequence[StatisticType] = ...,  # (2)
    ExtendedStatistics: Sequence[str] = ...,
    Unit: StandardUnitType = ...,  # (3)
) -> GetMetricStatisticsOutputTypeDef:  # (4)
    ...
  1. See DimensionTypeDef
  2. See StatisticType
  3. See StandardUnitType
  4. See GetMetricStatisticsOutputTypeDef
Usage example with kwargs
kwargs: GetMetricStatisticsInputRequestTypeDef = {  # (1)
    "Namespace": ...,
    "MetricName": ...,
    "StartTime": ...,
    "EndTime": ...,
    "Period": ...,
}

parent.get_metric_statistics(**kwargs)
  1. See GetMetricStatisticsInputRequestTypeDef

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

Method definition
def get_metric_stream(
    self,
    *,
    Name: str,
) -> GetMetricStreamOutputTypeDef:  # (1)
    ...
  1. See GetMetricStreamOutputTypeDef
Usage example with kwargs
kwargs: GetMetricStreamInputRequestTypeDef = {  # (1)
    "Name": ...,
}

parent.get_metric_stream(**kwargs)
  1. See GetMetricStreamInputRequestTypeDef

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

Method definition
def get_metric_widget_image(
    self,
    *,
    MetricWidget: str,
    OutputFormat: str = ...,
) -> GetMetricWidgetImageOutputTypeDef:  # (1)
    ...
  1. See GetMetricWidgetImageOutputTypeDef
Usage example with kwargs
kwargs: GetMetricWidgetImageInputRequestTypeDef = {  # (1)
    "MetricWidget": ...,
}

parent.get_metric_widget_image(**kwargs)
  1. See GetMetricWidgetImageInputRequestTypeDef

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

Method definition
def list_dashboards(
    self,
    *,
    DashboardNamePrefix: str = ...,
    NextToken: str = ...,
) -> ListDashboardsOutputTypeDef:  # (1)
    ...
  1. See ListDashboardsOutputTypeDef
Usage example with kwargs
kwargs: ListDashboardsInputRequestTypeDef = {  # (1)
    "DashboardNamePrefix": ...,
}

parent.list_dashboards(**kwargs)
  1. See ListDashboardsInputRequestTypeDef

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

Method definition
def list_managed_insight_rules(
    self,
    *,
    ResourceARN: str,
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListManagedInsightRulesOutputTypeDef:  # (1)
    ...
  1. See ListManagedInsightRulesOutputTypeDef
Usage example with kwargs
kwargs: ListManagedInsightRulesInputRequestTypeDef = {  # (1)
    "ResourceARN": ...,
}

parent.list_managed_insight_rules(**kwargs)
  1. See ListManagedInsightRulesInputRequestTypeDef

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

Method definition
def list_metric_streams(
    self,
    *,
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListMetricStreamsOutputTypeDef:  # (1)
    ...
  1. See ListMetricStreamsOutputTypeDef
Usage example with kwargs
kwargs: ListMetricStreamsInputRequestTypeDef = {  # (1)
    "NextToken": ...,
}

parent.list_metric_streams(**kwargs)
  1. See ListMetricStreamsInputRequestTypeDef

list_metrics

List the specified metrics.

Type annotations and code completion for boto3.client("cloudwatch").list_metrics method. boto3 documentation

Method definition
def list_metrics(
    self,
    *,
    Namespace: str = ...,
    MetricName: str = ...,
    Dimensions: Sequence[DimensionFilterTypeDef] = ...,  # (1)
    NextToken: str = ...,
    RecentlyActive: RecentlyActiveType = ...,  # (2)
) -> ListMetricsOutputTypeDef:  # (3)
    ...
  1. See DimensionFilterTypeDef
  2. See RecentlyActiveType
  3. See ListMetricsOutputTypeDef
Usage example with kwargs
kwargs: ListMetricsInputRequestTypeDef = {  # (1)
    "Namespace": ...,
}

parent.list_metrics(**kwargs)
  1. See ListMetricsInputRequestTypeDef

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

Method definition
def list_tags_for_resource(
    self,
    *,
    ResourceARN: str,
) -> ListTagsForResourceOutputTypeDef:  # (1)
    ...
  1. See ListTagsForResourceOutputTypeDef
Usage example with kwargs
kwargs: ListTagsForResourceInputRequestTypeDef = {  # (1)
    "ResourceARN": ...,
}

parent.list_tags_for_resource(**kwargs)
  1. See ListTagsForResourceInputRequestTypeDef

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

Method definition
def put_anomaly_detector(
    self,
    *,
    Namespace: str = ...,
    MetricName: str = ...,
    Dimensions: Sequence[DimensionTypeDef] = ...,  # (1)
    Stat: str = ...,
    Configuration: AnomalyDetectorConfigurationTypeDef = ...,  # (2)
    SingleMetricAnomalyDetector: SingleMetricAnomalyDetectorTypeDef = ...,  # (3)
    MetricMathAnomalyDetector: MetricMathAnomalyDetectorTypeDef = ...,  # (4)
) -> Dict[str, Any]:
    ...
  1. See DimensionTypeDef
  2. See AnomalyDetectorConfigurationTypeDef
  3. See SingleMetricAnomalyDetectorTypeDef
  4. See MetricMathAnomalyDetectorTypeDef
Usage example with kwargs
kwargs: PutAnomalyDetectorInputRequestTypeDef = {  # (1)
    "Namespace": ...,
}

parent.put_anomaly_detector(**kwargs)
  1. See PutAnomalyDetectorInputRequestTypeDef

put_composite_alarm

Creates or updates a composite alarm.

Type annotations and code completion for boto3.client("cloudwatch").put_composite_alarm method. boto3 documentation

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)
    ...
  1. See TagTypeDef
  2. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: PutCompositeAlarmInputRequestTypeDef = {  # (1)
    "AlarmName": ...,
    "AlarmRule": ...,
}

parent.put_composite_alarm(**kwargs)
  1. See PutCompositeAlarmInputRequestTypeDef

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

Method definition
def put_dashboard(
    self,
    *,
    DashboardName: str,
    DashboardBody: str,
) -> PutDashboardOutputTypeDef:  # (1)
    ...
  1. See PutDashboardOutputTypeDef
Usage example with kwargs
kwargs: PutDashboardInputRequestTypeDef = {  # (1)
    "DashboardName": ...,
    "DashboardBody": ...,
}

parent.put_dashboard(**kwargs)
  1. See PutDashboardInputRequestTypeDef

put_insight_rule

Creates a Contributor Insights rule.

Type annotations and code completion for boto3.client("cloudwatch").put_insight_rule method. boto3 documentation

Method definition
def put_insight_rule(
    self,
    *,
    RuleName: str,
    RuleDefinition: str,
    RuleState: str = ...,
    Tags: Sequence[TagTypeDef] = ...,  # (1)
) -> Dict[str, Any]:
    ...
  1. See TagTypeDef
Usage example with kwargs
kwargs: PutInsightRuleInputRequestTypeDef = {  # (1)
    "RuleName": ...,
    "RuleDefinition": ...,
}

parent.put_insight_rule(**kwargs)
  1. See PutInsightRuleInputRequestTypeDef

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

Method definition
def put_managed_insight_rules(
    self,
    *,
    ManagedRules: Sequence[ManagedRuleTypeDef],  # (1)
) -> PutManagedInsightRulesOutputTypeDef:  # (2)
    ...
  1. See ManagedRuleTypeDef
  2. See PutManagedInsightRulesOutputTypeDef
Usage example with kwargs
kwargs: PutManagedInsightRulesInputRequestTypeDef = {  # (1)
    "ManagedRules": ...,
}

parent.put_managed_insight_rules(**kwargs)
  1. See PutManagedInsightRulesInputRequestTypeDef

put_metric_alarm

Creates or updates an alarm and associates it with the specified metric, metric math expression, or anomaly detection model.

Type annotations and code completion for boto3.client("cloudwatch").put_metric_alarm method. boto3 documentation

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)
    ...
  1. See ComparisonOperatorType
  2. See StatisticType
  3. See DimensionTypeDef
  4. See StandardUnitType
  5. See MetricDataQueryTypeDef
  6. See TagTypeDef
  7. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: PutMetricAlarmInputRequestTypeDef = {  # (1)
    "AlarmName": ...,
    "EvaluationPeriods": ...,
    "ComparisonOperator": ...,
}

parent.put_metric_alarm(**kwargs)
  1. See PutMetricAlarmInputRequestTypeDef

put_metric_data

Publishes metric data points to Amazon CloudWatch.

Type annotations and code completion for boto3.client("cloudwatch").put_metric_data method. boto3 documentation

Method definition
def put_metric_data(
    self,
    *,
    Namespace: str,
    MetricData: Sequence[MetricDatumTypeDef],  # (1)
) -> EmptyResponseMetadataTypeDef:  # (2)
    ...
  1. See MetricDatumTypeDef
  2. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: PutMetricDataInputRequestTypeDef = {  # (1)
    "Namespace": ...,
    "MetricData": ...,
}

parent.put_metric_data(**kwargs)
  1. See PutMetricDataInputRequestTypeDef

put_metric_stream

Creates or updates a metric stream.

Type annotations and code completion for boto3.client("cloudwatch").put_metric_stream method. boto3 documentation

Method definition
def put_metric_stream(
    self,
    *,
    Name: str,
    FirehoseArn: str,
    RoleArn: str,
    OutputFormat: MetricStreamOutputFormatType,  # (1)
    IncludeFilters: Sequence[MetricStreamFilterTypeDef] = ...,  # (2)
    ExcludeFilters: Sequence[MetricStreamFilterTypeDef] = ...,  # (2)
    Tags: Sequence[TagTypeDef] = ...,  # (4)
    StatisticsConfigurations: Sequence[MetricStreamStatisticsConfigurationTypeDef] = ...,  # (5)
) -> PutMetricStreamOutputTypeDef:  # (6)
    ...
  1. See MetricStreamOutputFormatType
  2. See MetricStreamFilterTypeDef
  3. See MetricStreamFilterTypeDef
  4. See TagTypeDef
  5. See MetricStreamStatisticsConfigurationTypeDef
  6. See PutMetricStreamOutputTypeDef
Usage example with kwargs
kwargs: PutMetricStreamInputRequestTypeDef = {  # (1)
    "Name": ...,
    "FirehoseArn": ...,
    "RoleArn": ...,
    "OutputFormat": ...,
}

parent.put_metric_stream(**kwargs)
  1. See PutMetricStreamInputRequestTypeDef

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

Method definition
def set_alarm_state(
    self,
    *,
    AlarmName: str,
    StateValue: StateValueType,  # (1)
    StateReason: str,
    StateReasonData: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (2)
    ...
  1. See StateValueType
  2. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: SetAlarmStateInputRequestTypeDef = {  # (1)
    "AlarmName": ...,
    "StateValue": ...,
    "StateReason": ...,
}

parent.set_alarm_state(**kwargs)
  1. See SetAlarmStateInputRequestTypeDef

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

Method definition
def start_metric_streams(
    self,
    *,
    Names: Sequence[str],
) -> Dict[str, Any]:
    ...
Usage example with kwargs
kwargs: StartMetricStreamsInputRequestTypeDef = {  # (1)
    "Names": ...,
}

parent.start_metric_streams(**kwargs)
  1. See StartMetricStreamsInputRequestTypeDef

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

Method definition
def stop_metric_streams(
    self,
    *,
    Names: Sequence[str],
) -> Dict[str, Any]:
    ...
Usage example with kwargs
kwargs: StopMetricStreamsInputRequestTypeDef = {  # (1)
    "Names": ...,
}

parent.stop_metric_streams(**kwargs)
  1. See StopMetricStreamsInputRequestTypeDef

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

Method definition
def tag_resource(
    self,
    *,
    ResourceARN: str,
    Tags: Sequence[TagTypeDef],  # (1)
) -> Dict[str, Any]:
    ...
  1. See TagTypeDef
Usage example with kwargs
kwargs: TagResourceInputRequestTypeDef = {  # (1)
    "ResourceARN": ...,
    "Tags": ...,
}

parent.tag_resource(**kwargs)
  1. See TagResourceInputRequestTypeDef

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

Method definition
def untag_resource(
    self,
    *,
    ResourceARN: str,
    TagKeys: Sequence[str],
) -> Dict[str, Any]:
    ...
Usage example with kwargs
kwargs: UntagResourceInputRequestTypeDef = {  # (1)
    "ResourceARN": ...,
    "TagKeys": ...,
}

parent.untag_resource(**kwargs)
  1. See UntagResourceInputRequestTypeDef

get_paginator

Type annotations and code completion for boto3.client("cloudwatch").get_paginator method with overloads.

get_waiter

Type annotations and code completion for boto3.client("cloudwatch").get_waiter method with overloads.