共用方式為


Metric Alerts Status - List

請取得警報規則狀態。

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

URI 參數

名稱 位於 必要 類型 Description
resourceGroupName
path True

string

minLength: 1
maxLength: 90

資源群組的名稱。 名稱不區分大小寫。

ruleName
path True

string

規則的名稱。

subscriptionId
path True

string

minLength: 1

目標訂用帳戶的標識碼。

api-version
query True

string

minLength: 1

用於此作業的 API 版本。

回應

名稱 類型 Description
200 OK

MetricAlertStatusCollection

成功申請一份指標警示清單

Other Status Codes

ErrorResponse

錯誤的請求

安全性

azure_auth

Azure Active Directory OAuth2 流

類型: oauth2
Flow: implicit
授權 URL: https://login.microsoftonline.com/common/oauth2/authorize

範圍

名稱 Description
user_impersonation 模擬您的用戶帳戶

範例

Get an alert rule status

範例要求

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

範例回覆

{
  "value": [
    {
      "id": "/subscriptions/009f6022-67ec-423e-9aa7-691182870588/resourceGroups/EastUs/providers/microsoft.insights/metricAlerts/LeoAlert_custom1",
      "name": "cmVzb3VyY2VJZD0vc3Vic2NyaXB0aW9ucy8xNGRkZjBjNS03N2M1LTRiNTMtODRmNi1lMWZhNDNhZDY4ZjcvcmVzb3VyY2VHcm91cHMvZ2lndGVzdC9wcm92aWRlcnMvTWljcm9zb2Z0LkNvbXB1dGUvdmlydHVhbE1hY2hpbmVzL2dpZ3dhZG1l",
      "type": "Microsoft.Insights/metricAlerts/status",
      "properties": {
        "dimensions": {
          "resourceId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme"
        },
        "status": "Healthy",
        "timestamp": "2018-01-17T20:17:25.6293237Z"
      }
    }
  ]
}

定義

名稱 Description
AdditionalInfo

一組具有「類型」和「資訊」屬性的物件陣列。 「info」的結構是服務特定的,並依賴於「類型」字串。

Error
ErrorDetail

描述錯誤回應的細節。

ErrorResponse

描述錯誤回應的格式。

MetricAlertStatus

警報狀態。

MetricAlertStatusCollection

代表警示規則資源的集合。

MetricAlertStatusProperties

警報狀態屬性。

AdditionalInfo

一組具有「類型」和「資訊」屬性的物件陣列。 「info」的結構是服務特定的,並依賴於「類型」字串。

名稱 類型 Description
info

針對特定類型的額外資訊。

type

string

附加資訊的類型。

Error

名稱 類型 Description
additionalInfo

AdditionalInfo[]

一組具有「類型」和「資訊」屬性的物件陣列。 「info」的結構是服務特定的,並依賴於「類型」字串。

code

string

未局域字串,可用於程式化識別錯誤。

details

ErrorDetail[]

其他巢狀錯誤回應資訊對象的陣列,如此合約所述。

message

string

詳細描述錯誤並提供除錯資訊。 如果請求中設定了 Accept-Language,必須在地化到該語言。

target

string

特定錯誤的目標 (例如,發生錯誤的屬性名稱)。

ErrorDetail

描述錯誤回應的細節。

名稱 類型 Description
additionalInfo

AdditionalInfo[]

一組具有「類型」和「資訊」屬性的物件陣列。 「info」的結構是服務特定的,並依賴於「類型」字串。

code

string

未局域字串,可用於程式化識別錯誤。

message

string

詳細描述錯誤並提供除錯資訊。

target

string

特定錯誤的目標 (例如,發生錯誤的屬性名稱)。

ErrorResponse

描述錯誤回應的格式。

名稱 類型 Description
error

Error

MetricAlertStatus

警報狀態。

名稱 類型 Description
id

string

警報規則的手臂識別碼。

name

string

身份名稱。

properties

MetricAlertStatusProperties

警示狀態屬性的指標警示狀態。

type

string

擴充資源類型名稱。

MetricAlertStatusCollection

代表警示規則資源的集合。

名稱 類型 Description
value

MetricAlertStatus[]

警報規則資源的值。

MetricAlertStatusProperties

警報狀態屬性。

名稱 類型 Description
dimensions

object

一個描述尺寸類型的物件。

status

string

狀態值

timestamp

string (date-time)

檢查狀態時的UTC時間。