Microsoft.Insights (stable:2018-03-01)

2025/03/02 • 5 updated methods

MetricAlerts_ListBySubscription (updated)
Description Retrieve alert rule definitions in a subscription.
Reference Link ¶

⚶ Changes

{
  "#id": "MetricAlerts_ListBySubscription",
  "$responses": {
    "200": {
      "$properties": {
        "value": {
          "$properties": {
            "properties": [
              {
                "#name": "scopes",
                "Description": {
                  "new": "the list of resource id's that this metric alert is scoped to. You cannot change the scope of a metric rule based on logs.",
                  "old": "the list of resource id's that this metric alert is scoped to."
                }
              }
            ]
          }
        }
      }
    }
  }
}

⚼ Request

GET:  /subscriptions/{subscriptionId}/providers/Microsoft.Insights/metricAlerts
{
subscriptionId: string ,
api-version: string ,
}

⚐ Response (200)

{
value:
[
{
properties:
{
description: string ,
severity: integer ,
enabled: boolean ,
scopes:
[
string ,
]
,
evaluationFrequency: string ,
windowSize: string ,
targetResourceType: string ,
targetResourceRegion: string ,
criteria:
{
odata.type: enum ,
}
,
autoMitigate: boolean ,
actions:
[
{
actionGroupId: string ,
webHookProperties: object ,
}
,
]
,
lastUpdatedTime: string ,
isMigrated: boolean ,
}
,
}
,
]
,
}

⚐ Response (default)

{
error:
{
code: string ,
message: string ,
target: string ,
details:
[
{
code: string ,
message: string ,
target: string ,
additionalInfo:
[
{
type: string ,
info: object ,
}
,
]
,
}
,
]
,
additionalInfo:
[
{
type: string ,
info: object ,
}
,
]
,
}
,
}
MetricAlerts_ListByResourceGroup (updated)
Description Retrieve alert rule definitions in a resource group.
Reference Link ¶

⚶ Changes

{
  "#id": "MetricAlerts_ListByResourceGroup",
  "$responses": {
    "200": {
      "$properties": {
        "value": {
          "$properties": {
            "properties": [
              {
                "#name": "scopes",
                "Description": {
                  "new": "the list of resource id's that this metric alert is scoped to. You cannot change the scope of a metric rule based on logs.",
                  "old": "the list of resource id's that this metric alert is scoped to."
                }
              }
            ]
          }
        }
      }
    }
  }
}

⚼ Request

GET:  /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts
{
subscriptionId: string ,
resourceGroupName: string ,
api-version: string ,
}

⚐ Response (200)

{
value:
[
{
properties:
{
description: string ,
severity: integer ,
enabled: boolean ,
scopes:
[
string ,
]
,
evaluationFrequency: string ,
windowSize: string ,
targetResourceType: string ,
targetResourceRegion: string ,
criteria:
{
odata.type: enum ,
}
,
autoMitigate: boolean ,
actions:
[
{
actionGroupId: string ,
webHookProperties: object ,
}
,
]
,
lastUpdatedTime: string ,
isMigrated: boolean ,
}
,
}
,
]
,
}

⚐ Response (default)

{
error:
{
code: string ,
message: string ,
target: string ,
details:
[
{
code: string ,
message: string ,
target: string ,
additionalInfo:
[
{
type: string ,
info: object ,
}
,
]
,
}
,
]
,
additionalInfo:
[
{
type: string ,
info: object ,
}
,
]
,
}
,
}
MetricAlerts_Get (updated)
Description Retrieve an alert rule definition.
Reference Link ¶

⚶ Changes

{
  "#id": "MetricAlerts_Get",
  "$responses": {
    "200": {
      "$properties": {
        "properties": [
          {
            "#name": "scopes",
            "Description": {
              "new": "the list of resource id's that this metric alert is scoped to. You cannot change the scope of a metric rule based on logs.",
              "old": "the list of resource id's that this metric alert is scoped to."
            }
          }
        ]
      }
    }
  }
}

⚼ Request

GET:  /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts/{ruleName}
{
subscriptionId: string ,
resourceGroupName: string ,
ruleName: string ,
api-version: string ,
}

⚐ Response (200)

{
properties:
{
description: string ,
severity: integer ,
enabled: boolean ,
scopes:
[
string ,
]
,
evaluationFrequency: string ,
windowSize: string ,
targetResourceType: string ,
targetResourceRegion: string ,
criteria:
{
odata.type: enum ,
}
,
autoMitigate: boolean ,
actions:
[
{
actionGroupId: string ,
webHookProperties: object ,
}
,
]
,
lastUpdatedTime: string ,
isMigrated: boolean ,
}
,
}

⚐ Response (default)

{
error:
{
code: string ,
message: string ,
target: string ,
details:
[
{
code: string ,
message: string ,
target: string ,
additionalInfo:
[
{
type: string ,
info: object ,
}
,
]
,
}
,
]
,
additionalInfo:
[
{
type: string ,
info: object ,
}
,
]
,
}
,
}
MetricAlerts_CreateOrUpdate (updated)
Description Create or update an metric alert definition.
Reference Link ¶

⚶ Changes

{
  "#id": "MetricAlerts_CreateOrUpdate",
  "$parameters": {
    "parameters": {
      "$properties": {
        "properties": [
          {
            "#name": "scopes",
            "Description": {
              "new": "the list of resource id's that this metric alert is scoped to. You cannot change the scope of a metric rule based on logs.",
              "old": "the list of resource id's that this metric alert is scoped to."
            }
          }
        ]
      }
    }
  },
  "$responses": {
    "200": {
      "$properties": {
        "properties": [
          {
            "#name": "scopes",
            "Description": {
              "new": "the list of resource id's that this metric alert is scoped to. You cannot change the scope of a metric rule based on logs.",
              "old": "the list of resource id's that this metric alert is scoped to."
            }
          }
        ]
      }
    }
  }
}

⚼ Request

PUT:  /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts/{ruleName}
{
subscriptionId: string ,
resourceGroupName: string ,
ruleName: string ,
api-version: string ,
parameters:
{
properties:
{
description: string ,
severity: integer ,
enabled: boolean ,
scopes:
[
string ,
]
,
evaluationFrequency: string ,
windowSize: string ,
targetResourceType: string ,
targetResourceRegion: string ,
criteria:
{
odata.type: enum ,
}
,
autoMitigate: boolean ,
actions:
[
{
actionGroupId: string ,
webHookProperties: object ,
}
,
]
,
lastUpdatedTime: string ,
isMigrated: boolean ,
}
,
}
,
}

⚐ Response (200)

{
properties:
{
description: string ,
severity: integer ,
enabled: boolean ,
scopes:
[
string ,
]
,
evaluationFrequency: string ,
windowSize: string ,
targetResourceType: string ,
targetResourceRegion: string ,
criteria:
{
odata.type: enum ,
}
,
autoMitigate: boolean ,
actions:
[
{
actionGroupId: string ,
webHookProperties: object ,
}
,
]
,
lastUpdatedTime: string ,
isMigrated: boolean ,
}
,
}

⚐ Response (default)

{
error:
{
code: string ,
message: string ,
target: string ,
details:
[
{
code: string ,
message: string ,
target: string ,
additionalInfo:
[
{
type: string ,
info: object ,
}
,
]
,
}
,
]
,
additionalInfo:
[
{
type: string ,
info: object ,
}
,
]
,
}
,
}
MetricAlerts_Update (updated)
Description Update an metric alert definition.
Reference Link ¶

⚶ Changes

{
  "#id": "MetricAlerts_Update",
  "$responses": {
    "200": {
      "$properties": {
        "properties": [
          {
            "#name": "scopes",
            "Description": {
              "new": "the list of resource id's that this metric alert is scoped to. You cannot change the scope of a metric rule based on logs.",
              "old": "the list of resource id's that this metric alert is scoped to."
            }
          }
        ]
      }
    }
  }
}

⚼ Request

PATCH:  /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts/{ruleName}
{
subscriptionId: string ,
resourceGroupName: string ,
ruleName: string ,
api-version: string ,
parameters:
{
tags: object ,
properties:
{
description: string ,
severity: integer ,
enabled: boolean ,
scopes:
[
string ,
]
,
evaluationFrequency: string ,
windowSize: string ,
targetResourceType: string ,
targetResourceRegion: string ,
criteria:
{
odata.type: enum ,
}
,
autoMitigate: boolean ,
actions:
[
{
actionGroupId: string ,
webHookProperties: object ,
}
,
]
,
lastUpdatedTime: string ,
isMigrated: boolean ,
}
,
}
,
}

⚐ Response (200)

{
properties:
{
description: string ,
severity: integer ,
enabled: boolean ,
scopes:
[
string ,
]
,
evaluationFrequency: string ,
windowSize: string ,
targetResourceType: string ,
targetResourceRegion: string ,
criteria:
{
odata.type: enum ,
}
,
autoMitigate: boolean ,
actions:
[
{
actionGroupId: string ,
webHookProperties: object ,
}
,
]
,
lastUpdatedTime: string ,
isMigrated: boolean ,
}
,
}

⚐ Response (default)

{
error:
{
code: string ,
message: string ,
target: string ,
details:
[
{
code: string ,
message: string ,
target: string ,
additionalInfo:
[
{
type: string ,
info: object ,
}
,
]
,
}
,
]
,
additionalInfo:
[
{
type: string ,
info: object ,
}
,
]
,
}
,
}