AWS SDK for .NET Documentation
AmazonCloudWatchClient Class
AmazonAmazon.CloudWatchAmazonCloudWatchClient Did this page help you?   Yes   No    Tell us about it...
Implementation for accessing AmazonCloudWatch. Amazon CloudWatch

This is the Amazon CloudWatch API Reference . This guide provides detailed information about Amazon CloudWatch actions, data types, parameters, and errors. For detailed information about Amazon CloudWatch features and their associated API calls, go to the Amazon CloudWatch Developer Guide.

Amazon CloudWatch is a web service that enables you to publish, monitor, and manage various metrics, as well as configure alarm actions based on data from metrics. For more information about this product go to http://aws.amazon.com/cloudwatch.

For information about the namespace, metric names, and dimensions that other Amazon Web Services products use to send metrics to Cloudwatch, go to Amazon CloudWatch Metrics, Namespaces, and Dimensions Reference in the Amazon CloudWatch Developer Guide .

Use the following links to get started using the Amazon CloudWatch API Reference :

Declaration Syntax
C#
public class AmazonCloudWatchClient : AmazonWebServiceClient, 
	AmazonCloudWatch, IDisposable
Members
All MembersConstructorsMethodsEvents



IconMemberDescription
AmazonCloudWatchClient()()()()
Constructs AmazonCloudWatchClient with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set.
CopyC#
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <appSettings>
        <add key="AWSAccessKey" value="********************"/>
        <add key="AWSSecretKey" value="****************************************"/>
    </appSettings>
</configuration>

AmazonCloudWatchClient(RegionEndpoint)
Constructs AmazonCloudWatchClient with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set.
CopyC#
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <appSettings>
        <add key="AWSAccessKey" value="********************"/>
        <add key="AWSSecretKey" value="****************************************"/>
    </appSettings>
</configuration>

AmazonCloudWatchClient(AmazonCloudWatchConfig)
Constructs AmazonCloudWatchClient with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set.
CopyC#
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <appSettings>
        <add key="AWSAccessKey" value="********************"/>
        <add key="AWSSecretKey" value="****************************************"/>
    </appSettings>
</configuration>

AmazonCloudWatchClient(AWSCredentials)
Constructs AmazonCloudWatchClient with AWS Credentials

AmazonCloudWatchClient(AWSCredentials, RegionEndpoint)
Constructs AmazonCloudWatchClient with AWS Credentials

AmazonCloudWatchClient(AWSCredentials, AmazonCloudWatchConfig)
Constructs AmazonCloudWatchClient with AWS Credentials and an AmazonCloudWatchClient Configuration object.

AmazonCloudWatchClient(String, String)
Constructs AmazonCloudWatchClient with AWS Access Key ID and AWS Secret Key

AmazonCloudWatchClient(String, String, RegionEndpoint)
Constructs AmazonCloudWatchClient with AWS Access Key ID and AWS Secret Key

AmazonCloudWatchClient(String, String, AmazonCloudWatchConfig)
Constructs AmazonCloudWatchClient with AWS Access Key ID, AWS Secret Key and an AmazonCloudWatchClient Configuration object. If the config object's UseSecureStringForAwsSecretKey is false, the AWS Secret Key is stored as a clear-text string. Please use this option only if the application environment doesn't allow the use of SecureStrings.

AmazonCloudWatchClient(String, String, String)
Constructs AmazonCloudWatchClient with AWS Access Key ID and AWS Secret Key

AmazonCloudWatchClient(String, String, String, RegionEndpoint)
Constructs AmazonCloudWatchClient with AWS Access Key ID and AWS Secret Key

AmazonCloudWatchClient(String, String, String, AmazonCloudWatchConfig)
Constructs AmazonCloudWatchClient with AWS Access Key ID, AWS Secret Key and an AmazonCloudWatchConfig Configuration object. If the config object's UseSecureStringForAwsSecretKey is false, the AWS Secret Key is stored as a clear-text string. Please use this option only if the application environment doesn't allow the use of SecureStrings.

AfterResponseEvent
Occurs after a response is received from the service.
(Inherited from AmazonWebServiceClient.)
BeforeRequestEvent
Occurs before a request is issued against the service.
(Inherited from AmazonWebServiceClient.)
BeginDeleteAlarms(DeleteAlarmsRequest, AsyncCallback, Object)
Initiates the asynchronous execution of the DeleteAlarms operation.

BeginDescribeAlarmHistory(DescribeAlarmHistoryRequest, AsyncCallback, Object)
Initiates the asynchronous execution of the DescribeAlarmHistory operation.

BeginDescribeAlarms(DescribeAlarmsRequest, AsyncCallback, Object)
Initiates the asynchronous execution of the DescribeAlarms operation.

BeginDescribeAlarmsForMetric(DescribeAlarmsForMetricRequest, AsyncCallback, Object)
Initiates the asynchronous execution of the DescribeAlarmsForMetric operation.

BeginDisableAlarmActions(DisableAlarmActionsRequest, AsyncCallback, Object)
Initiates the asynchronous execution of the DisableAlarmActions operation.

BeginEnableAlarmActions(EnableAlarmActionsRequest, AsyncCallback, Object)
Initiates the asynchronous execution of the EnableAlarmActions operation.

BeginGetMetricStatistics(GetMetricStatisticsRequest, AsyncCallback, Object)
Initiates the asynchronous execution of the GetMetricStatistics operation.

BeginListMetrics(ListMetricsRequest, AsyncCallback, Object)
Initiates the asynchronous execution of the ListMetrics operation.

BeginPutMetricAlarm(PutMetricAlarmRequest, AsyncCallback, Object)
Initiates the asynchronous execution of the PutMetricAlarm operation.

BeginPutMetricData(PutMetricDataRequest, AsyncCallback, Object)
Initiates the asynchronous execution of the PutMetricData operation.

BeginSetAlarmState(SetAlarmStateRequest, AsyncCallback, Object)
Initiates the asynchronous execution of the SetAlarmState operation.

DeleteAlarms(DeleteAlarmsRequest)

Deletes all specified alarms. In the event of an error, no alarms are deleted.


DescribeAlarmHistory(DescribeAlarmHistoryRequest)

Retrieves history for the specified alarm. Filter alarms by date range or item type. If an alarm name is not specified, Amazon CloudWatch returns histories for all of the owner's alarms.

NOTE: Amazon CloudWatch retains the history of an alarm for two weeks, whether or not you delete the alarm.


DescribeAlarmHistory()()()()

Retrieves history for the specified alarm. Filter alarms by date range or item type. If an alarm name is not specified, Amazon CloudWatch returns histories for all of the owner's alarms.

NOTE: Amazon CloudWatch retains the history of an alarm for two weeks, whether or not you delete the alarm.


DescribeAlarms(DescribeAlarmsRequest)

Retrieves alarms with the specified names. If no name is specified, all alarms for the user are returned. Alarms can be retrieved by using only a prefix for the alarm name, the alarm state, or a prefix for any action.


DescribeAlarms()()()()

Retrieves alarms with the specified names. If no name is specified, all alarms for the user are returned. Alarms can be retrieved by using only a prefix for the alarm name, the alarm state, or a prefix for any action.


DescribeAlarmsForMetric(DescribeAlarmsForMetricRequest)

Retrieves all alarms for a single metric. Specify a statistic, period, or unit to filter the set of alarms further.


DisableAlarmActions(DisableAlarmActionsRequest)

Disables actions for the specified alarms. When an alarm's actions are disabled the alarm's state may change, but none of the alarm's actions will execute.


Dispose()()()()
Disposes of all managed and unmanaged resources.
(Inherited from AmazonWebServiceClient.)
EnableAlarmActions(EnableAlarmActionsRequest)

Enables actions for the specified alarms.


EndDeleteAlarms(IAsyncResult)
Finishes the asynchronous execution of the DeleteAlarms operation.

EndDescribeAlarmHistory(IAsyncResult)
Finishes the asynchronous execution of the DescribeAlarmHistory operation.

EndDescribeAlarms(IAsyncResult)
Finishes the asynchronous execution of the DescribeAlarms operation.

EndDescribeAlarmsForMetric(IAsyncResult)
Finishes the asynchronous execution of the DescribeAlarmsForMetric operation.

EndDisableAlarmActions(IAsyncResult)
Finishes the asynchronous execution of the DisableAlarmActions operation.

EndEnableAlarmActions(IAsyncResult)
Finishes the asynchronous execution of the EnableAlarmActions operation.

EndGetMetricStatistics(IAsyncResult)
Finishes the asynchronous execution of the GetMetricStatistics operation.

EndListMetrics(IAsyncResult)
Finishes the asynchronous execution of the ListMetrics operation.

EndPutMetricAlarm(IAsyncResult)
Finishes the asynchronous execution of the PutMetricAlarm operation.

EndPutMetricData(IAsyncResult)
Finishes the asynchronous execution of the PutMetricData operation.

EndSetAlarmState(IAsyncResult)
Finishes the asynchronous execution of the SetAlarmState operation.

Equals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
ExceptionEvent
Occurs after an exception is encountered.
(Inherited from AmazonWebServiceClient.)
GetHashCode()()()()
Serves as a hash function for a particular type.
(Inherited from Object.)
GetMetricStatistics(GetMetricStatisticsRequest)

Gets statistics for the specified metric.

NOTE: The maximum number of data points returned from a single GetMetricStatistics request is 1,440. If a request is made that generates more than 1,440 data points, Amazon CloudWatch returns an error. In such a case, alter the request by narrowing the specified time range or increasing the specified period. Alternatively, make multiple requests across adjacent time ranges.

Amazon CloudWatch aggregates data points based on the length of the period that you specify. For example, if you request statistics with a one-minute granularity, Amazon CloudWatch aggregates data points with time stamps that fall within the same one-minute period. In such a case, the data points queried can greatly outnumber the data points returned.

NOTE: The maximum number of data points that can be queried is 50,850; whereas the maximum number of data points returned is 1,440.

The following examples show various statistics allowed by the data point query maximum of 50,850 when you call GetMetricStatistics on Amazon EC2 instances with detailed (one-minute) monitoring enabled:

  • Statistics for up to 400 instances for a span of one hour
  • Statistics for up to 35 instances over a span of 24 hours
  • Statistics for up to 2 instances over a span of 2 weeks

For information about the namespace, metric names, and dimensions that other Amazon Web Services products use to send metrics to Cloudwatch, go to Amazon CloudWatch Metrics, Namespaces, and Dimensions Reference in the Amazon CloudWatch Developer Guide .


GetType()()()()
Gets the type of the current instance.
(Inherited from Object.)
ListMetrics(ListMetricsRequest)

Returns a list of valid metrics stored for the AWS account owner. Returned metrics can be used with GetMetricStatistics to obtain statistical data for a given metric.

NOTE: Up to 500 results are returned for any one call. To retrieve further results, use returned NextToken values with subsequent ListMetrics operations.

NOTE: If you create a metric with the PutMetricData action, allow up to fifteen minutes for the metric to appear in calls to the ListMetrics action. Statistics about the metric, however, are available sooner using GetMetricStatistics.


ListMetrics()()()()

Returns a list of valid metrics stored for the AWS account owner. Returned metrics can be used with GetMetricStatistics to obtain statistical data for a given metric.

NOTE: Up to 500 results are returned for any one call. To retrieve further results, use returned NextToken values with subsequent ListMetrics operations.

NOTE: If you create a metric with the PutMetricData action, allow up to fifteen minutes for the metric to appear in calls to the ListMetrics action. Statistics about the metric, however, are available sooner using GetMetricStatistics.


PutMetricAlarm(PutMetricAlarmRequest)

Creates or updates an alarm and associates it with the specified Amazon CloudWatch metric. Optionally, this operation can associate one or more Amazon Simple Notification Service resources with the alarm.

When this operation creates an alarm, the alarm state is immediately set to INSUFFICIENT_DATA . The alarm is evaluated and its StateValue is set appropriately. Any actions associated with the StateValue is then executed.

NOTE: When updating an existing alarm, its StateValue is left unchanged.


PutMetricData(PutMetricDataRequest)

Publishes metric data points to Amazon CloudWatch. Amazon Cloudwatch associates the data points with the specified metric. If the specified metric does not exist, Amazon CloudWatch creates the metric.

NOTE: If you create a metric with the PutMetricData action, allow up to fifteen minutes for the metric to appear in calls to the ListMetrics action.

The size of a PutMetricData request is limited to 8 KB for HTTP GET requests and 40 KB for HTTP POST requests.

IMPORTANT: Although the Value parameter accepts numbers of type Double, Amazon CloudWatch truncates values with very large exponents. Values with base-10 exponents greater than 126 (1 x 10^126) are truncated. Likewise, values with base-10 exponents less than -130 (1 x 10^-130) are also truncated.


SetAlarmState(SetAlarmStateRequest)

Temporarily sets the state of an alarm. When the updated StateValue differs from the previous value, the action configured for the appropriate state is invoked. This is not a permanent change. The next periodic alarm check (in about a minute) will set the alarm to its actual state.


ToString()()()()
Returns a string that represents the current object.
(Inherited from Object.)
Inheritance Hierarchy
Object
AmazonWebServiceClient
 AmazonCloudWatchClient

Assembly: AWSSDK (Module: AWSSDK) Version: 1.5.60.0 (1.5.60.0)