{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}

-- |
-- Module      : Amazonka.CloudWatch
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Derived from API version @2010-08-01@ of the AWS service descriptions, licensed under Apache 2.0.
--
-- Amazon CloudWatch monitors your Amazon Web Services (Amazon Web
-- Services) resources and the applications you run on Amazon Web Services
-- in real time. You can use CloudWatch to collect and track metrics, which
-- are the variables you want to measure for your resources and
-- applications.
--
-- CloudWatch alarms send notifications or automatically change the
-- resources you are monitoring based on rules that you define. For
-- example, you can monitor the CPU usage and disk reads and writes of your
-- Amazon EC2 instances. Then, use this data to determine whether you
-- should launch additional instances to handle increased load. You can
-- also use this data to stop under-used instances to save money.
--
-- In addition to monitoring the built-in metrics that come with Amazon Web
-- Services, you can monitor your own custom metrics. With CloudWatch, you
-- gain system-wide visibility into resource utilization, application
-- performance, and operational health.
module Amazonka.CloudWatch
  ( -- * Service Configuration
    defaultService,

    -- * Errors
    -- $errors

    -- ** LimitExceededFault
    _LimitExceededFault,

    -- ** DashboardNotFoundError
    _DashboardNotFoundError,

    -- ** InvalidNextToken
    _InvalidNextToken,

    -- ** InternalServiceFault
    _InternalServiceFault,

    -- ** DashboardInvalidInputError
    _DashboardInvalidInputError,

    -- ** InvalidParameterValueException
    _InvalidParameterValueException,

    -- ** ConcurrentModificationException
    _ConcurrentModificationException,

    -- ** InvalidFormatFault
    _InvalidFormatFault,

    -- ** MissingRequiredParameterException
    _MissingRequiredParameterException,

    -- ** ResourceNotFoundException
    _ResourceNotFoundException,

    -- ** InvalidParameterCombinationException
    _InvalidParameterCombinationException,

    -- ** LimitExceededException
    _LimitExceededException,

    -- ** ResourceNotFound
    _ResourceNotFound,

    -- * Waiters
    -- $waiters

    -- ** CompositeAlarmExists
    newCompositeAlarmExists,

    -- ** AlarmExists
    newAlarmExists,

    -- * Operations
    -- $operations

    -- ** EnableAlarmActions
    EnableAlarmActions (EnableAlarmActions'),
    newEnableAlarmActions,
    EnableAlarmActionsResponse (EnableAlarmActionsResponse'),
    newEnableAlarmActionsResponse,

    -- ** DisableInsightRules
    DisableInsightRules (DisableInsightRules'),
    newDisableInsightRules,
    DisableInsightRulesResponse (DisableInsightRulesResponse'),
    newDisableInsightRulesResponse,

    -- ** PutCompositeAlarm
    PutCompositeAlarm (PutCompositeAlarm'),
    newPutCompositeAlarm,
    PutCompositeAlarmResponse (PutCompositeAlarmResponse'),
    newPutCompositeAlarmResponse,

    -- ** DeleteAnomalyDetector
    DeleteAnomalyDetector (DeleteAnomalyDetector'),
    newDeleteAnomalyDetector,
    DeleteAnomalyDetectorResponse (DeleteAnomalyDetectorResponse'),
    newDeleteAnomalyDetectorResponse,

    -- ** DeleteInsightRules
    DeleteInsightRules (DeleteInsightRules'),
    newDeleteInsightRules,
    DeleteInsightRulesResponse (DeleteInsightRulesResponse'),
    newDeleteInsightRulesResponse,

    -- ** GetDashboard
    GetDashboard (GetDashboard'),
    newGetDashboard,
    GetDashboardResponse (GetDashboardResponse'),
    newGetDashboardResponse,

    -- ** PutAnomalyDetector
    PutAnomalyDetector (PutAnomalyDetector'),
    newPutAnomalyDetector,
    PutAnomalyDetectorResponse (PutAnomalyDetectorResponse'),
    newPutAnomalyDetectorResponse,

    -- ** ListTagsForResource
    ListTagsForResource (ListTagsForResource'),
    newListTagsForResource,
    ListTagsForResourceResponse (ListTagsForResourceResponse'),
    newListTagsForResourceResponse,

    -- ** GetMetricData (Paginated)
    GetMetricData (GetMetricData'),
    newGetMetricData,
    GetMetricDataResponse (GetMetricDataResponse'),
    newGetMetricDataResponse,

    -- ** PutMetricData
    PutMetricData (PutMetricData'),
    newPutMetricData,
    PutMetricDataResponse (PutMetricDataResponse'),
    newPutMetricDataResponse,

    -- ** ListDashboards (Paginated)
    ListDashboards (ListDashboards'),
    newListDashboards,
    ListDashboardsResponse (ListDashboardsResponse'),
    newListDashboardsResponse,

    -- ** DescribeAlarms (Paginated)
    DescribeAlarms (DescribeAlarms'),
    newDescribeAlarms,
    DescribeAlarmsResponse (DescribeAlarmsResponse'),
    newDescribeAlarmsResponse,

    -- ** ListMetrics (Paginated)
    ListMetrics (ListMetrics'),
    newListMetrics,
    ListMetricsResponse (ListMetricsResponse'),
    newListMetricsResponse,

    -- ** GetInsightRuleReport
    GetInsightRuleReport (GetInsightRuleReport'),
    newGetInsightRuleReport,
    GetInsightRuleReportResponse (GetInsightRuleReportResponse'),
    newGetInsightRuleReportResponse,

    -- ** StartMetricStreams
    StartMetricStreams (StartMetricStreams'),
    newStartMetricStreams,
    StartMetricStreamsResponse (StartMetricStreamsResponse'),
    newStartMetricStreamsResponse,

    -- ** DeleteDashboards
    DeleteDashboards (DeleteDashboards'),
    newDeleteDashboards,
    DeleteDashboardsResponse (DeleteDashboardsResponse'),
    newDeleteDashboardsResponse,

    -- ** PutInsightRule
    PutInsightRule (PutInsightRule'),
    newPutInsightRule,
    PutInsightRuleResponse (PutInsightRuleResponse'),
    newPutInsightRuleResponse,

    -- ** ListMetricStreams
    ListMetricStreams (ListMetricStreams'),
    newListMetricStreams,
    ListMetricStreamsResponse (ListMetricStreamsResponse'),
    newListMetricStreamsResponse,

    -- ** GetMetricWidgetImage
    GetMetricWidgetImage (GetMetricWidgetImage'),
    newGetMetricWidgetImage,
    GetMetricWidgetImageResponse (GetMetricWidgetImageResponse'),
    newGetMetricWidgetImageResponse,

    -- ** DeleteMetricStream
    DeleteMetricStream (DeleteMetricStream'),
    newDeleteMetricStream,
    DeleteMetricStreamResponse (DeleteMetricStreamResponse'),
    newDeleteMetricStreamResponse,

    -- ** DeleteAlarms
    DeleteAlarms (DeleteAlarms'),
    newDeleteAlarms,
    DeleteAlarmsResponse (DeleteAlarmsResponse'),
    newDeleteAlarmsResponse,

    -- ** PutMetricStream
    PutMetricStream (PutMetricStream'),
    newPutMetricStream,
    PutMetricStreamResponse (PutMetricStreamResponse'),
    newPutMetricStreamResponse,

    -- ** DescribeAlarmHistory (Paginated)
    DescribeAlarmHistory (DescribeAlarmHistory'),
    newDescribeAlarmHistory,
    DescribeAlarmHistoryResponse (DescribeAlarmHistoryResponse'),
    newDescribeAlarmHistoryResponse,

    -- ** GetMetricStatistics
    GetMetricStatistics (GetMetricStatistics'),
    newGetMetricStatistics,
    GetMetricStatisticsResponse (GetMetricStatisticsResponse'),
    newGetMetricStatisticsResponse,

    -- ** DescribeAlarmsForMetric
    DescribeAlarmsForMetric (DescribeAlarmsForMetric'),
    newDescribeAlarmsForMetric,
    DescribeAlarmsForMetricResponse (DescribeAlarmsForMetricResponse'),
    newDescribeAlarmsForMetricResponse,

    -- ** EnableInsightRules
    EnableInsightRules (EnableInsightRules'),
    newEnableInsightRules,
    EnableInsightRulesResponse (EnableInsightRulesResponse'),
    newEnableInsightRulesResponse,

    -- ** DisableAlarmActions
    DisableAlarmActions (DisableAlarmActions'),
    newDisableAlarmActions,
    DisableAlarmActionsResponse (DisableAlarmActionsResponse'),
    newDisableAlarmActionsResponse,

    -- ** DescribeAnomalyDetectors
    DescribeAnomalyDetectors (DescribeAnomalyDetectors'),
    newDescribeAnomalyDetectors,
    DescribeAnomalyDetectorsResponse (DescribeAnomalyDetectorsResponse'),
    newDescribeAnomalyDetectorsResponse,

    -- ** PutDashboard
    PutDashboard (PutDashboard'),
    newPutDashboard,
    PutDashboardResponse (PutDashboardResponse'),
    newPutDashboardResponse,

    -- ** TagResource
    TagResource (TagResource'),
    newTagResource,
    TagResourceResponse (TagResourceResponse'),
    newTagResourceResponse,

    -- ** StopMetricStreams
    StopMetricStreams (StopMetricStreams'),
    newStopMetricStreams,
    StopMetricStreamsResponse (StopMetricStreamsResponse'),
    newStopMetricStreamsResponse,

    -- ** UntagResource
    UntagResource (UntagResource'),
    newUntagResource,
    UntagResourceResponse (UntagResourceResponse'),
    newUntagResourceResponse,

    -- ** GetMetricStream
    GetMetricStream (GetMetricStream'),
    newGetMetricStream,
    GetMetricStreamResponse (GetMetricStreamResponse'),
    newGetMetricStreamResponse,

    -- ** PutMetricAlarm
    PutMetricAlarm (PutMetricAlarm'),
    newPutMetricAlarm,
    PutMetricAlarmResponse (PutMetricAlarmResponse'),
    newPutMetricAlarmResponse,

    -- ** SetAlarmState
    SetAlarmState (SetAlarmState'),
    newSetAlarmState,
    SetAlarmStateResponse (SetAlarmStateResponse'),
    newSetAlarmStateResponse,

    -- ** DescribeInsightRules
    DescribeInsightRules (DescribeInsightRules'),
    newDescribeInsightRules,
    DescribeInsightRulesResponse (DescribeInsightRulesResponse'),
    newDescribeInsightRulesResponse,

    -- * Types

    -- ** AlarmType
    AlarmType (..),

    -- ** AnomalyDetectorStateValue
    AnomalyDetectorStateValue (..),

    -- ** ComparisonOperator
    ComparisonOperator (..),

    -- ** HistoryItemType
    HistoryItemType (..),

    -- ** MetricStreamOutputFormat
    MetricStreamOutputFormat (..),

    -- ** RecentlyActive
    RecentlyActive (..),

    -- ** ScanBy
    ScanBy (..),

    -- ** StandardUnit
    StandardUnit (..),

    -- ** StateValue
    StateValue (..),

    -- ** Statistic
    Statistic (..),

    -- ** StatusCode
    StatusCode (..),

    -- ** AlarmHistoryItem
    AlarmHistoryItem (AlarmHistoryItem'),
    newAlarmHistoryItem,

    -- ** AnomalyDetector
    AnomalyDetector (AnomalyDetector'),
    newAnomalyDetector,

    -- ** AnomalyDetectorConfiguration
    AnomalyDetectorConfiguration (AnomalyDetectorConfiguration'),
    newAnomalyDetectorConfiguration,

    -- ** CompositeAlarm
    CompositeAlarm (CompositeAlarm'),
    newCompositeAlarm,

    -- ** DashboardEntry
    DashboardEntry (DashboardEntry'),
    newDashboardEntry,

    -- ** DashboardValidationMessage
    DashboardValidationMessage (DashboardValidationMessage'),
    newDashboardValidationMessage,

    -- ** Datapoint
    Datapoint (Datapoint'),
    newDatapoint,

    -- ** Dimension
    Dimension (Dimension'),
    newDimension,

    -- ** DimensionFilter
    DimensionFilter (DimensionFilter'),
    newDimensionFilter,

    -- ** InsightRule
    InsightRule (InsightRule'),
    newInsightRule,

    -- ** InsightRuleContributor
    InsightRuleContributor (InsightRuleContributor'),
    newInsightRuleContributor,

    -- ** InsightRuleContributorDatapoint
    InsightRuleContributorDatapoint (InsightRuleContributorDatapoint'),
    newInsightRuleContributorDatapoint,

    -- ** InsightRuleMetricDatapoint
    InsightRuleMetricDatapoint (InsightRuleMetricDatapoint'),
    newInsightRuleMetricDatapoint,

    -- ** LabelOptions
    LabelOptions (LabelOptions'),
    newLabelOptions,

    -- ** MessageData
    MessageData (MessageData'),
    newMessageData,

    -- ** Metric
    Metric (Metric'),
    newMetric,

    -- ** MetricAlarm
    MetricAlarm (MetricAlarm'),
    newMetricAlarm,

    -- ** MetricDataQuery
    MetricDataQuery (MetricDataQuery'),
    newMetricDataQuery,

    -- ** MetricDataResult
    MetricDataResult (MetricDataResult'),
    newMetricDataResult,

    -- ** MetricDatum
    MetricDatum (MetricDatum'),
    newMetricDatum,

    -- ** MetricStat
    MetricStat (MetricStat'),
    newMetricStat,

    -- ** MetricStreamEntry
    MetricStreamEntry (MetricStreamEntry'),
    newMetricStreamEntry,

    -- ** MetricStreamFilter
    MetricStreamFilter (MetricStreamFilter'),
    newMetricStreamFilter,

    -- ** PartialFailure
    PartialFailure (PartialFailure'),
    newPartialFailure,

    -- ** Range
    Range (Range'),
    newRange,

    -- ** StatisticSet
    StatisticSet (StatisticSet'),
    newStatisticSet,

    -- ** Tag
    Tag (Tag'),
    newTag,
  )
where

import Amazonka.CloudWatch.DeleteAlarms
import Amazonka.CloudWatch.DeleteAnomalyDetector
import Amazonka.CloudWatch.DeleteDashboards
import Amazonka.CloudWatch.DeleteInsightRules
import Amazonka.CloudWatch.DeleteMetricStream
import Amazonka.CloudWatch.DescribeAlarmHistory
import Amazonka.CloudWatch.DescribeAlarms
import Amazonka.CloudWatch.DescribeAlarmsForMetric
import Amazonka.CloudWatch.DescribeAnomalyDetectors
import Amazonka.CloudWatch.DescribeInsightRules
import Amazonka.CloudWatch.DisableAlarmActions
import Amazonka.CloudWatch.DisableInsightRules
import Amazonka.CloudWatch.EnableAlarmActions
import Amazonka.CloudWatch.EnableInsightRules
import Amazonka.CloudWatch.GetDashboard
import Amazonka.CloudWatch.GetInsightRuleReport
import Amazonka.CloudWatch.GetMetricData
import Amazonka.CloudWatch.GetMetricStatistics
import Amazonka.CloudWatch.GetMetricStream
import Amazonka.CloudWatch.GetMetricWidgetImage
import Amazonka.CloudWatch.Lens
import Amazonka.CloudWatch.ListDashboards
import Amazonka.CloudWatch.ListMetricStreams
import Amazonka.CloudWatch.ListMetrics
import Amazonka.CloudWatch.ListTagsForResource
import Amazonka.CloudWatch.PutAnomalyDetector
import Amazonka.CloudWatch.PutCompositeAlarm
import Amazonka.CloudWatch.PutDashboard
import Amazonka.CloudWatch.PutInsightRule
import Amazonka.CloudWatch.PutMetricAlarm
import Amazonka.CloudWatch.PutMetricData
import Amazonka.CloudWatch.PutMetricStream
import Amazonka.CloudWatch.SetAlarmState
import Amazonka.CloudWatch.StartMetricStreams
import Amazonka.CloudWatch.StopMetricStreams
import Amazonka.CloudWatch.TagResource
import Amazonka.CloudWatch.Types
import Amazonka.CloudWatch.UntagResource
import Amazonka.CloudWatch.Waiters

-- $errors
-- Error matchers are designed for use with the functions provided by
-- <http://hackage.haskell.org/package/lens/docs/Control-Exception-Lens.html Control.Exception.Lens>.
-- This allows catching (and rethrowing) service specific errors returned
-- by 'CloudWatch'.

-- $operations
-- Some AWS operations return results that are incomplete and require subsequent
-- requests in order to obtain the entire result set. The process of sending
-- subsequent requests to continue where a previous request left off is called
-- pagination. For example, the 'ListObjects' operation of Amazon S3 returns up to
-- 1000 objects at a time, and you must send subsequent requests with the
-- appropriate Marker in order to retrieve the next page of results.
--
-- Operations that have an 'AWSPager' instance can transparently perform subsequent
-- requests, correctly setting Markers and other request facets to iterate through
-- the entire result set of a truncated API operation. Operations which support
-- this have an additional note in the documentation.
--
-- Many operations have the ability to filter results on the server side. See the
-- individual operation parameters for details.

-- $waiters
-- Waiters poll by repeatedly sending a request until some remote success condition
-- configured by the 'Wait' specification is fulfilled. The 'Wait' specification
-- determines how many attempts should be made, in addition to delay and retry strategies.