CloudWatchClient
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.
Functions
Deletes the specified alarms. You can delete up to 100 alarms in one operation. However, this total can include no more than one composite alarm. For example, you could delete 99 metric alarms and one composite alarms with one operation, but you can't delete two composite alarms with one operation.
Deletes the specified anomaly detection model from your account. For more information about how to delete an anomaly detection model, see Deleting an anomaly detection model in the CloudWatch User Guide.
Deletes all dashboards that you specify. You can specify up to 100 dashboards to delete. If there is an error during this call, no dashboards are deleted.
Permanently deletes the specified Contributor Insights rules.
Permanently deletes the metric stream that you specify.
Retrieves the history for the specified alarm. You can filter the results by date range or item type. If an alarm name is not specified, the histories for either all metric alarms or all composite alarms are returned.
Retrieves the specified alarms. You can filter the results by specifying a prefix for the alarm name, the alarm state, or a prefix for any action.
Retrieves the alarms for the specified metric. To filter the results, specify a statistic, period, or unit.
Lists the anomaly detection models that you have created in your account. For single metric anomaly detectors, you can list all of the models in your account or filter the results to only the models that are related to a certain namespace, metric name, or metric dimension. For metric math anomaly detectors, you can list them by adding METRIC_MATH
to the AnomalyDetectorTypes
array. This will return all metric math anomaly detectors in your account.
Returns a list of all the Contributor Insights rules in your account.
Disables the actions for the specified alarms. When an alarm's actions are disabled, the alarm actions do not execute when the alarm state changes.
Disables the specified Contributor Insights rules. When rules are disabled, they do not analyze log groups and do not incur costs.
Enables the actions for the specified alarms.
Enables the specified Contributor Insights rules. When rules are enabled, they immediately begin analyzing log data.
Displays the details of the dashboard that you specify.
This operation returns the time series data collected by a Contributor Insights rule. The data includes the identity and number of contributors to the log group.
You can use the GetMetricData
API to retrieve CloudWatch metric values. The operation can also include a CloudWatch Metrics Insights query, and one or more metric math functions.
Gets statistics for the specified metric.
Returns information about the metric stream that you specify.
You can use the GetMetricWidgetImage
API to retrieve a snapshot graph of one or more Amazon CloudWatch metrics as a bitmap image. You can then embed this image into your services and products, such as wiki pages, reports, and documents. You could also retrieve images regularly, such as every minute, and create your own custom live dashboard.
Returns a list of the dashboards for your account. If you include DashboardNamePrefix
, only those dashboards with names starting with the prefix are listed. Otherwise, all dashboards in your account are listed.
Returns a list that contains the number of managed Contributor Insights rules in your account.
List the specified metrics. You can use the returned metrics with GetMetricData or GetMetricStatistics to get statistical data.
Returns a list of metric streams in this account.
Displays the tags associated with a CloudWatch resource. Currently, alarms and Contributor Insights rules support tagging.
Creates an anomaly detection model for a CloudWatch metric. You can use the model to display a band of expected normal values when the metric is graphed.
Creates or updates a composite alarm. When you create a composite alarm, you specify a rule expression for the alarm that takes into account the alarm states of other alarms that you have created. The composite alarm goes into ALARM state only if all conditions of the rule are met.
Creates a dashboard if it does not already exist, or updates an existing dashboard. If you update a dashboard, the entire contents are replaced with what you specify here.
Creates a Contributor Insights rule. Rules evaluate log events in a CloudWatch Logs log group, enabling you to find contributor data for the log events in that log group. For more information, see Using Contributor Insights to Analyze High-Cardinality Data.
Creates a managed Contributor Insights rule for a specified Amazon Web Services resource. When you enable a managed rule, you create a Contributor Insights rule that collects data from Amazon Web Services services. You cannot edit these rules with PutInsightRule
. The rules can be enabled, disabled, and deleted using EnableInsightRules
, DisableInsightRules
, and DeleteInsightRules
. If a previously created managed rule is currently disabled, a subsequent call to this API will re-enable it. Use ListManagedInsightRules
to describe all available rules.
Creates or updates an alarm and associates it with the specified metric, metric math expression, anomaly detection model, or Metrics Insights query. For more information about using a Metrics Insights query for an alarm, see Create alarms on Metrics Insights queries.
Publishes metric data to Amazon CloudWatch. CloudWatch associates the data with the specified metric. If the specified metric does not exist, CloudWatch creates the metric. When CloudWatch creates a metric, it can take up to fifteen minutes for the metric to appear in calls to ListMetrics.
Creates or updates a metric stream. Metric streams can automatically stream CloudWatch metrics to Amazon Web Services destinations, including Amazon S3, and to many third-party solutions.
Temporarily sets the state of an alarm for testing purposes. When the updated state differs from the previous value, the action configured for the appropriate state is invoked. For example, if your alarm is configured to send an Amazon SNS message when an alarm is triggered, temporarily changing the alarm state to ALARM
sends an SNS message.
Starts the streaming of metrics for one or more of your metric streams.
Stops the streaming of metrics for one or more of your metric streams.
Assigns one or more tags (key-value pairs) to the specified CloudWatch resource. Currently, the only CloudWatch resources that can be tagged are alarms and Contributor Insights rules.
Removes one or more tags from the specified resource.
Inherited functions
Deletes the specified alarms. You can delete up to 100 alarms in one operation. However, this total can include no more than one composite alarm. For example, you could delete 99 metric alarms and one composite alarms with one operation, but you can't delete two composite alarms with one operation.
Deletes the specified anomaly detection model from your account. For more information about how to delete an anomaly detection model, see Deleting an anomaly detection model in the CloudWatch User Guide.
Deletes all dashboards that you specify. You can specify up to 100 dashboards to delete. If there is an error during this call, no dashboards are deleted.
Permanently deletes the specified Contributor Insights rules.
Permanently deletes the metric stream that you specify.
Retrieves the history for the specified alarm. You can filter the results by date range or item type. If an alarm name is not specified, the histories for either all metric alarms or all composite alarms are returned.
Paginate over DescribeAlarmHistoryResponse results.
Retrieves the specified alarms. You can filter the results by specifying a prefix for the alarm name, the alarm state, or a prefix for any action.
Retrieves the alarms for the specified metric. To filter the results, specify a statistic, period, or unit.
Paginate over DescribeAlarmsResponse results.
Lists the anomaly detection models that you have created in your account. For single metric anomaly detectors, you can list all of the models in your account or filter the results to only the models that are related to a certain namespace, metric name, or metric dimension. For metric math anomaly detectors, you can list them by adding METRIC_MATH
to the AnomalyDetectorTypes
array. This will return all metric math anomaly detectors in your account.
Paginate over DescribeAnomalyDetectorsResponse results.
Returns a list of all the Contributor Insights rules in your account.
Paginate over DescribeInsightRulesResponse results.
Disables the actions for the specified alarms. When an alarm's actions are disabled, the alarm actions do not execute when the alarm state changes.
Disables the specified Contributor Insights rules. When rules are disabled, they do not analyze log groups and do not incur costs.
Enables the actions for the specified alarms.
Enables the specified Contributor Insights rules. When rules are enabled, they immediately begin analyzing log data.
Displays the details of the dashboard that you specify.
This operation returns the time series data collected by a Contributor Insights rule. The data includes the identity and number of contributors to the log group.
You can use the GetMetricData
API to retrieve CloudWatch metric values. The operation can also include a CloudWatch Metrics Insights query, and one or more metric math functions.
Paginate over GetMetricDataResponse results.
Gets statistics for the specified metric.
Returns information about the metric stream that you specify.
You can use the GetMetricWidgetImage
API to retrieve a snapshot graph of one or more Amazon CloudWatch metrics as a bitmap image. You can then embed this image into your services and products, such as wiki pages, reports, and documents. You could also retrieve images regularly, such as every minute, and create your own custom live dashboard.
Returns a list of the dashboards for your account. If you include DashboardNamePrefix
, only those dashboards with names starting with the prefix are listed. Otherwise, all dashboards in your account are listed.
Paginate over ListDashboardsResponse results.
Returns a list that contains the number of managed Contributor Insights rules in your account.
Paginate over ListManagedInsightRulesResponse results.
List the specified metrics. You can use the returned metrics with GetMetricData or GetMetricStatistics to get statistical data.
Paginate over ListMetricsResponse results.
Returns a list of metric streams in this account.
Paginate over ListMetricStreamsResponse results.
Displays the tags associated with a CloudWatch resource. Currently, alarms and Contributor Insights rules support tagging.
Creates an anomaly detection model for a CloudWatch metric. You can use the model to display a band of expected normal values when the metric is graphed.
Creates or updates a composite alarm. When you create a composite alarm, you specify a rule expression for the alarm that takes into account the alarm states of other alarms that you have created. The composite alarm goes into ALARM state only if all conditions of the rule are met.
Creates a dashboard if it does not already exist, or updates an existing dashboard. If you update a dashboard, the entire contents are replaced with what you specify here.
Creates a Contributor Insights rule. Rules evaluate log events in a CloudWatch Logs log group, enabling you to find contributor data for the log events in that log group. For more information, see Using Contributor Insights to Analyze High-Cardinality Data.
Creates a managed Contributor Insights rule for a specified Amazon Web Services resource. When you enable a managed rule, you create a Contributor Insights rule that collects data from Amazon Web Services services. You cannot edit these rules with PutInsightRule
. The rules can be enabled, disabled, and deleted using EnableInsightRules
, DisableInsightRules
, and DeleteInsightRules
. If a previously created managed rule is currently disabled, a subsequent call to this API will re-enable it. Use ListManagedInsightRules
to describe all available rules.
Creates or updates an alarm and associates it with the specified metric, metric math expression, anomaly detection model, or Metrics Insights query. For more information about using a Metrics Insights query for an alarm, see Create alarms on Metrics Insights queries.
Publishes metric data to Amazon CloudWatch. CloudWatch associates the data with the specified metric. If the specified metric does not exist, CloudWatch creates the metric. When CloudWatch creates a metric, it can take up to fifteen minutes for the metric to appear in calls to ListMetrics.
Creates or updates a metric stream. Metric streams can automatically stream CloudWatch metrics to Amazon Web Services destinations, including Amazon S3, and to many third-party solutions.
Temporarily sets the state of an alarm for testing purposes. When the updated state differs from the previous value, the action configured for the appropriate state is invoked. For example, if your alarm is configured to send an Amazon SNS message when an alarm is triggered, temporarily changing the alarm state to ALARM
sends an SNS message.
Starts the streaming of metrics for one or more of your metric streams.
Stops the streaming of metrics for one or more of your metric streams.
Assigns one or more tags (key-value pairs) to the specified CloudWatch resource. Currently, the only CloudWatch resources that can be tagged are alarms and Contributor Insights rules.
Removes one or more tags from the specified resource.
Create a copy of the client with one or more configuration values overridden. This method allows the caller to perform scoped config overrides for one or more client operations.