Get Recommendations - List
取得所有建議的清單。
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/recommendations?api-version=2025-07-01-preview
URI 參數
| 名稱 | 位於 | 必要 | 類型 | Description |
|---|---|---|---|---|
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
資源群組的名稱。 名稱不區分大小寫。 |
|
subscription
|
path | True |
string (uuid) |
目標訂用帳戶的標識碼。 此值必須是 UUID。 |
|
workspace
|
path | True |
string minLength: 1maxLength: 90 pattern: ^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$ |
工作區的名稱。 |
|
api-version
|
query | True |
string minLength: 1 |
用於此作業的 API 版本。 |
回應
| 名稱 | 類型 | Description |
|---|---|---|
| 200 OK |
OK |
|
| Other Status Codes |
說明作業為何失敗的錯誤回應。 |
安全性
azure_auth
Azure Active Directory OAuth2 流
類型:
oauth2
Flow:
implicit
授權 URL:
https://login.microsoftonline.com/common/oauth2/authorize
範圍
| 名稱 | Description |
|---|---|
| user_impersonation | 模擬您的用戶帳戶 |
範例
Get Recommendations list.
範例要求
GET https://management.azure.com/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/recommendations?api-version=2025-07-01-preview
範例回覆
{
"value": [
{
"id": "/subscriptions/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/Recommendations/ceea048e-923e-4eeb-8fcb-6cb0c06b101f",
"name": "ceea048e-923e-4eeb-8fcb-6cb0c06b101f",
"type": "Microsoft.SecurityInsights/Recommendations",
"properties": {
"recommendationTypeId": "ThreatIntelligence_Example",
"state": "CompletedBySystem",
"title": "someText",
"description": "someText",
"creationTimeUtc": "2022-02-19T03:09:03.4888396+00:00",
"lastEvaluatedTimeUtc": "2022-02-19T03:09:03.4888396+00:00",
"lastModifiedTimeUtc": "2022-02-19T03:57:31.7964447+00:00",
"suggestions": [
{
"suggestionTypeId": "ThreatIntelligence_Example_Suggestion_Example",
"title": "someText",
"description": "someText",
"action": "someText",
"additionalProperties": {
"someKey": "someValue"
}
}
],
"resourceId": "someId",
"additionalProperties": {
"someKey": "someValue"
}
}
}
]
}
定義
| 名稱 | Description |
|---|---|
|
Cloud |
錯誤回應結構。 |
|
Cloud |
錯誤詳細數據。 |
|
created |
建立資源的身分識別類型。 |
| Recommendation |
推薦物件。 |
|
Recommendation |
建議清單 |
|
Recommended |
應該採取哪些建議來完成建議。 |
| State |
建議的狀態。 |
|
system |
與建立和上次修改資源相關的元數據。 |
CloudError
錯誤回應結構。
| 名稱 | 類型 | Description |
|---|---|---|
| error |
錯誤數據 |
CloudErrorBody
錯誤詳細數據。
| 名稱 | 類型 | Description |
|---|---|---|
| code |
string |
錯誤的識別碼。 程序代碼是不變的,而且是要以程序設計方式取用。 |
| message |
string |
描述錯誤的訊息,適用於在使用者介面中顯示。 |
createdByType
建立資源的身分識別類型。
| 值 | Description |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
Recommendation
推薦物件。
| 名稱 | 類型 | Description |
|---|---|---|
| etag |
string |
Azure 資源的 Etag |
| id |
string (arm-id) |
資源的完整資源標識碼。 例如 “/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}” |
| name |
string |
資源的名稱 |
| properties.additionalProperties |
object |
建議的其他屬性集合。 |
| properties.creationTimeUtc |
string (date-time) |
建立建議時的時間戳 (UTC)。 |
| properties.description |
string |
建議的描述。 |
| properties.lastEvaluatedTimeUtc |
string (date-time) |
上次評估建議時的時間戳 (UTC)。 |
| properties.lastModifiedTimeUtc |
string (date-time) |
上次修改建議時的時間戳 (UTC)。 |
| properties.recommendationTypeId |
string |
建議類型的標識碼。 |
| properties.resourceId |
string |
此建議所參考的資源標識碼。 |
| properties.state |
建議的狀態。 |
|
| properties.suggestions |
要針對此建議採取的建議清單。 |
|
| properties.title |
string |
建議的標題。 |
| systemData |
包含 createdBy 和 modifiedBy 資訊的 Azure Resource Manager 元數據。 |
|
| type |
string |
資源的類型。 例如“Microsoft.Compute/virtualMachines” 或 “Microsoft.Storage/storageAccounts” |
RecommendationList
建議清單
| 名稱 | 類型 | Description |
|---|---|---|
| nextLink |
string |
連結至下一頁的資源。 |
| value |
建議清單 |
RecommendedSuggestion
應該採取哪些建議來完成建議。
| 名稱 | 類型 | Description |
|---|---|---|
| action |
string |
建議的動作。 |
| additionalProperties |
object |
建議的其他屬性集合。 |
| description |
string |
建議的描述。 |
| suggestionTypeId |
string |
建議類型的標識碼。 |
| title |
string |
建議的標題。 |
State
建議的狀態。
| 值 | Description |
|---|---|
| Active |
建議為使用中。 |
| InProgress |
建議正在進行中。 |
| Dismissed |
建議已解除。 |
| CompletedByUser |
使用者已完成建議。 |
| CompletedBySystem |
系統已完成建議。 |
systemData
與建立和上次修改資源相關的元數據。
| 名稱 | 類型 | Description |
|---|---|---|
| createdAt |
string (date-time) |
資源建立的時間戳(UTC)。 |
| createdBy |
string |
建立資源的身分識別。 |
| createdByType |
建立資源的身分識別類型。 |
|
| lastModifiedAt |
string (date-time) |
上次修改的資源時間戳 (UTC) |
| lastModifiedBy |
string |
上次修改資源的身分識別。 |
| lastModifiedByType |
上次修改資源的身分識別類型。 |