Metric Alerts - Delete

Delete an alert rule definition.

DELETE https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts/{ruleName}?api-version=2024-03-01-preview

URI Parameters

Name In Required Type Description
resourceGroupName
path True

string

minLength: 1
maxLength: 90

The name of the resource group. The name is case insensitive.

ruleName
path True

string

The name of the rule.

subscriptionId
path True

string

minLength: 1

The ID of the target subscription.

api-version
query True

string

minLength: 1

The API version to use for this operation.

Responses

Name Type Description
200 OK

Resource deleted successfully.

204 No Content

Resource does not exist.

Other Status Codes

MetricAlertErrorResponse

An unexpected error response.

Security

azure_auth

Azure Active Directory OAuth2 Flow.

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

Delete an alert rule

Sample request

DELETE https://management.azure.com/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Insights/metricAlerts/chiricutin?api-version=2024-03-01-preview

Sample response

Definitions

Name Description
MetricAlertErrorResponse

Describes the format of Error response.

Microsoft.Common.ErrorDetail

Describes details of an error response.

Microsoft.Common.ErrorDetailAdditionalInfoItem
Microsoft.Common.ErrorResponseError
Microsoft.Common.ErrorResponseErrorAdditionalInfoItem

MetricAlertErrorResponse

Describes the format of Error response.

Name Type Description
error

Microsoft.Common.ErrorResponseError

Microsoft.Common.ErrorDetail

Describes details of an error response.

Name Type Description
additionalInfo

Microsoft.Common.ErrorDetailAdditionalInfoItem[]

An array of objects with 'type' and 'info' properties. The schema of 'info' is service-specific and dependent on the 'type' string.

code

string

Unlocalized string which can be used to programmatically identify the error.

message

string

Describes the error in detail and provides debugging information.

target

string

The target of the particular error (for example, the name of the property in error).

Microsoft.Common.ErrorDetailAdditionalInfoItem

Name Type Description
info

The additional information specific to the type.

type

string

The type of additional information.

Microsoft.Common.ErrorResponseError

Name Type Description
additionalInfo

Microsoft.Common.ErrorResponseErrorAdditionalInfoItem[]

An array of objects with 'type' and 'info' properties. The schema of 'info' is service-specific and dependent on the 'type' string.

code

string

Unlocalized string which can be used to programmatically identify the error.

details

Microsoft.Common.ErrorDetail[]

An array of additional nested error response info objects, as described by this contract.

message

string

Describes the error in detail and provides debugging information. If Accept-Language is set in the request, it must be localized to that language.

target

string

The target of the particular error (for example, the name of the property in error).

Microsoft.Common.ErrorResponseErrorAdditionalInfoItem

Name Type Description
info

The additional information specific to the type.

type

string

The type of additional information.