AWS SDK Version 2 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

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

Namespace: Amazon.CloudWatch
Assembly: AWSSDK.dll
Version: (assembly version)

Syntax

C#
public virtual DeleteAlarmsResponse DeleteAlarms(
         DeleteAlarmsRequest request
)

Parameters

request
Type: Amazon.CloudWatch.Model.DeleteAlarmsRequest

Container for the necessary parameters to execute the DeleteAlarms service method.

Return Value
Type: Amazon.CloudWatch.Model.DeleteAlarmsResponse
The response from the DeleteAlarms service method, as returned by CloudWatch.

Exceptions

ExceptionCondition
ResourceNotFoundException The named resource does not exist.

Examples

This example shows how to delete an alarm.

Delete alarm example

var client = new AmazonCloudWatchClient();

var request = new DeleteAlarmsRequest
{
  AlarmNames = new List<string>() { "t1.microCPUUtilization" }
};

client.DeleteAlarms(request);
      

Version Information

.NET Framework:
Supported in: 4.5, 4.0, 3.5