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

# 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)
    ...
  1. See EmptyResponseMetadataTypeDef
# delete_alarms method usage example with argument unpacking

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

# 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]:
    ...
  1. See DimensionTypeDef
  2. See SingleMetricAnomalyDetectorTypeDef
  3. See MetricMathAnomalyDetectorTypeDef
# delete_anomaly_detector method usage example with argument unpacking

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

# 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)
  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

# delete_insight_rules method definition

def delete_insight_rules(
    self,
    *,
    RuleNames: Sequence[str],
) -> DeleteInsightRulesOutputTypeDef:  # (1)
    ...
  1. See DeleteInsightRulesOutputTypeDef
# delete_insight_rules method usage example with argument unpacking

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

# 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)
  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

# describe_alarm_history 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
# describe_alarm_history method usage example with argument unpacking

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

# 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)
    ...
  1. See AlarmTypeType
  2. See StateValueType
  3. See DescribeAlarmsOutputTypeDef
# describe_alarms method usage example with argument unpacking

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

# 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)
    ...
  1. See StatisticType
  2. See DimensionTypeDef
  3. See StandardUnitType
  4. See DescribeAlarmsForMetricOutputTypeDef
# describe_alarms_for_metric method usage example with argument unpacking

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

# 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)
    ...
  1. See DimensionTypeDef
  2. See AnomalyDetectorTypeType
  3. See DescribeAnomalyDetectorsOutputTypeDef
# describe_anomaly_detectors method usage example with argument unpacking

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

# describe_insight_rules method definition

def describe_insight_rules(
    self,
    *,
    NextToken: str = ...,
    MaxResults: int = ...,
) -> DescribeInsightRulesOutputTypeDef:  # (1)
    ...
  1. See DescribeInsightRulesOutputTypeDef
# describe_insight_rules method usage example with argument unpacking

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

# disable_alarm_actions method definition

def disable_alarm_actions(
    self,
    *,
    AlarmNames: Sequence[str],
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
# disable_alarm_actions method usage example with argument unpacking

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

# disable_insight_rules method definition

def disable_insight_rules(
    self,
    *,
    RuleNames: Sequence[str],
) -> DisableInsightRulesOutputTypeDef:  # (1)
    ...
  1. See DisableInsightRulesOutputTypeDef
# disable_insight_rules method usage example with argument unpacking

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

# enable_alarm_actions method definition

def enable_alarm_actions(
    self,
    *,
    AlarmNames: Sequence[str],
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
# enable_alarm_actions method usage example with argument unpacking

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

# enable_insight_rules method definition

def enable_insight_rules(
    self,
    *,
    RuleNames: Sequence[str],
) -> EnableInsightRulesOutputTypeDef:  # (1)
    ...
  1. See EnableInsightRulesOutputTypeDef
# enable_insight_rules method usage example with argument unpacking

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

# 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)
    ...
  1. See GetDashboardOutputTypeDef
# get_dashboard method usage example with argument unpacking

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

# get_insight_rule_report 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
# get_insight_rule_report method usage example with argument unpacking

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

# get_metric_data 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
# get_metric_data method usage example with argument unpacking

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

# get_metric_statistics 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
# get_metric_statistics method usage example with argument unpacking

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

# get_metric_stream method definition

def get_metric_stream(
    self,
    *,
    Name: str,
) -> GetMetricStreamOutputTypeDef:  # (1)
    ...
  1. See GetMetricStreamOutputTypeDef
# get_metric_stream method usage example with argument unpacking

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

# get_metric_widget_image method definition

def get_metric_widget_image(
    self,
    *,
    MetricWidget: str,
    OutputFormat: str = ...,
) -> GetMetricWidgetImageOutputTypeDef:  # (1)
    ...
  1. See GetMetricWidgetImageOutputTypeDef
# get_metric_widget_image method usage example with argument unpacking

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

# list_dashboards method definition

def list_dashboards(
    self,
    *,
    DashboardNamePrefix: str = ...,
    NextToken: str = ...,
) -> ListDashboardsOutputTypeDef:  # (1)
    ...
  1. See ListDashboardsOutputTypeDef
# list_dashboards method usage example with argument unpacking

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

# list_managed_insight_rules method definition

def list_managed_insight_rules(
    self,
    *,
    ResourceARN: str,
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListManagedInsightRulesOutputTypeDef:  # (1)
    ...
  1. See ListManagedInsightRulesOutputTypeDef
# list_managed_insight_rules method usage example with argument unpacking

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

# list_metric_streams method definition

def list_metric_streams(
    self,
    *,
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListMetricStreamsOutputTypeDef:  # (1)
    ...
  1. See ListMetricStreamsOutputTypeDef
# list_metric_streams method usage example with argument unpacking

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

# 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)
    ...
  1. See DimensionFilterTypeDef
  2. See RecentlyActiveType
  3. See ListMetricsOutputTypeDef
# list_metrics method usage example with argument unpacking

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

# list_tags_for_resource method definition

def list_tags_for_resource(
    self,
    *,
    ResourceARN: str,
) -> ListTagsForResourceOutputTypeDef:  # (1)
    ...
  1. See ListTagsForResourceOutputTypeDef
# list_tags_for_resource method usage example with argument unpacking

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

# put_anomaly_detector 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
# put_anomaly_detector method usage example with argument unpacking

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

# 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)
    ...
  1. See TagTypeDef
  2. See EmptyResponseMetadataTypeDef
# put_composite_alarm method usage example with argument unpacking

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

# put_dashboard method definition

def put_dashboard(
    self,
    *,
    DashboardName: str,
    DashboardBody: str,
) -> PutDashboardOutputTypeDef:  # (1)
    ...
  1. See PutDashboardOutputTypeDef
# put_dashboard method usage example with argument unpacking

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

# put_insight_rule method definition

def put_insight_rule(
    self,
    *,
    RuleName: str,
    RuleDefinition: str,
    RuleState: str = ...,
    Tags: Sequence[TagTypeDef] = ...,  # (1)
) -> Dict[str, Any]:
    ...
  1. See TagTypeDef
# put_insight_rule method usage example with argument unpacking

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

# put_managed_insight_rules method definition

def put_managed_insight_rules(
    self,
    *,
    ManagedRules: Sequence[ManagedRuleTypeDef],  # (1)
) -> PutManagedInsightRulesOutputTypeDef:  # (2)
    ...
  1. See ManagedRuleTypeDef
  2. See PutManagedInsightRulesOutputTypeDef
# put_managed_insight_rules method usage example with argument unpacking

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, 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)
    ...
  1. See ComparisonOperatorType
  2. See StatisticType
  3. See DimensionTypeDef
  4. See StandardUnitType
  5. See MetricDataQueryTypeDef
  6. See TagTypeDef
  7. See EmptyResponseMetadataTypeDef
# put_metric_alarm method usage example with argument unpacking

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

# put_metric_data method definition

def put_metric_data(
    self,
    *,
    Namespace: str,
    MetricData: Sequence[MetricDatumTypeDef],  # (1)
) -> EmptyResponseMetadataTypeDef:  # (2)
    ...
  1. See MetricDatumTypeDef
  2. See EmptyResponseMetadataTypeDef
# put_metric_data method usage example with argument unpacking

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

# put_metric_stream 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)
    IncludeLinkedAccountsMetrics: bool = ...,
) -> PutMetricStreamOutputTypeDef:  # (6)
    ...
  1. See MetricStreamOutputFormatType
  2. See MetricStreamFilterTypeDef
  3. See MetricStreamFilterTypeDef
  4. See TagTypeDef
  5. See MetricStreamStatisticsConfigurationTypeDef
  6. See PutMetricStreamOutputTypeDef
# put_metric_stream method usage example with argument unpacking

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

# set_alarm_state method definition

def set_alarm_state(
    self,
    *,
    AlarmName: str,
    StateValue: StateValueType,  # (1)
    StateReason: str,
    StateReasonData: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (2)
    ...
  1. See StateValueType
  2. See EmptyResponseMetadataTypeDef
# set_alarm_state method usage example with argument unpacking

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

# 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)
  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

# 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)
  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

# tag_resource method definition

def tag_resource(
    self,
    *,
    ResourceARN: str,
    Tags: Sequence[TagTypeDef],  # (1)
) -> Dict[str, Any]:
    ...
  1. See TagTypeDef
# tag_resource method usage example with argument unpacking

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

# 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)
  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.