Alerts - List For Scope
取得資源範圍的警示。
GET https://management.azure.com/{scope}/providers/Microsoft.Authorization/roleManagementAlerts?api-version=2022-08-01-preview
URI 參數
名稱 | 位於 | 必要 | 類型 | Description |
---|---|---|---|---|
scope
|
path | True |
string |
警示的範圍。 |
api-version
|
query | True |
string |
用於此作業的 API 版本。 |
回應
名稱 | 類型 | Description |
---|---|---|
200 OK |
確定 - 傳回警示陣列。 |
|
Other Status Codes |
描述作業失敗原因的錯誤回應。 |
安全性
azure_auth
Azure Active Directory OAuth2 Flow
類型:
oauth2
Flow:
implicit
授權 URL:
https://login.microsoftonline.com/common/oauth2/authorize
範圍
名稱 | Description |
---|---|
user_impersonation | 模擬您的用戶帳戶 |
範例
GetAlerts
範例要求
GET https://management.azure.com/subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleManagementAlerts?api-version=2022-08-01-preview
範例回覆
{
"value": [
{
"properties": {
"scope": "subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f",
"incidentCount": 1,
"lastModifiedDateTime": "2022-04-05T03:04:06.467+00:00",
"lastScannedDateTime": "2022-04-06T18:25:00.38+00:00",
"isActive": true,
"alertDefinition": {
"properties": {
"displayName": "Too many permanent owners assigned to a resource",
"scope": "subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f",
"description": "The number of users set to never expire is too high. To enhance the security of your resources, we recommend requiring activation for role use. Take a moment to review the list of users, and suggested changes here.",
"severityLevel": "Medium",
"securityImpact": "Providing users permanent access in a role may leave resources vulnerable to accidental or malicious activity.",
"mitigationSteps": "To mitigate this issue, require the user to activate the role before use.",
"howToPrevent": "Enable “Activation Required” in the role settings menu. This will ensure newly added users must activate their role.",
"isRemediatable": true,
"isConfigurable": true
},
"name": "TooManyPermanentOwnersAssignedToResource",
"id": "/subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleManagementAlertDefinitions/TooManyPermanentOwnersAssignedToResource",
"type": "Microsoft.Authorization/roleManagementAlertDefinitions"
},
"alertIncidents": [
{
"properties": {
"alertIncidentType": "TooManyPermanentOwnersAssignedToResourceAlertIncident",
"assigneeName": "testUser",
"assigneeType": "User"
},
"name": "a9f38501-74ec-43ea-8663-6c538602150d",
"type": "Microsoft.Authorization/roleManagementAlerts/alertIncidents",
"id": "/subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleManagementAlerts/TooManyPermanentOwnersAssignedToResource/alertIncidents/a9f38501-74ec-43ea-8663-6c538602150d"
}
],
"alertConfiguration": {
"properties": {
"alertConfigurationType": "TooManyPermanentOwnersAssignedToResourceAlertConfiguration",
"alertDefinitionId": "TooManyPermanentOwnersAssignedToResource",
"scope": "subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f",
"isEnabled": true,
"thresholdNumberOfPermanentOwners": 10,
"thresholdPercentageOfPermanentOwnersOutOfAllOwners": 10
},
"name": "TooManyPermanentOwnersAssignedToResource",
"id": "/subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleManagementAlertConfigurations/TooManyPermanentOwnersAssignedToResource",
"type": "Microsoft.Authorization/roleManagementAlertConfigurations"
}
},
"name": "TooManyPermanentOwnersAssignedToResource",
"id": "/subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleManagementAlerts/TooManyPermanentOwnersAssignedToResource",
"type": "Microsoft.Authorization/roleManagementAlerts"
},
{
"properties": {
"scope": "subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f",
"incidentCount": 1,
"lastModifiedDateTime": "2022-04-05T03:04:06.467+00:00",
"lastScannedDateTime": "2022-04-06T18:25:00.38+00:00",
"isActive": true,
"alertDefinition": {
"properties": {
"displayName": "Too many owners assigned to a resource",
"scope": "subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f",
"description": "The number of users with the Owner role is too high. We recommend assigning these individuals to less privileged roles or roles more suitable to their daily needs. Take a moment to review the current assignments, and suggested changes here.",
"severityLevel": "Medium",
"securityImpact": "As the number of users with the owner role increases, so does the potential for malicious or mistaken actions affecting your resource.",
"mitigationSteps": "To mitigate this issue, reduce the number of users in the Owner role. Review the list of users in the list, and reassign them to a less privileged role such as Contributor.",
"howToPrevent": "Choose a role that provides the fewest privileges necessary for a user or group to complete their tasks.",
"isRemediatable": true,
"isConfigurable": true
},
"name": "TooManyOwnersAssignedToResource",
"id": "/subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleManagementAlertDefinitions/TooManyOwnersAssignedToResource",
"type": "Microsoft.Authorization/roleManagementAlertDefinitions"
},
"alertIncidents": [
{
"properties": {
"alertIncidentType": "TooManyOwnersAssignedToResourceAlertIncident",
"assigneeName": "testUser",
"assigneeType": "User"
},
"name": "a9f38501-74ec-43ea-8663-6c538602150d",
"type": "Microsoft.Authorization/roleManagementAlerts/alertIncidents",
"id": "/subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleManagementAlerts/TooManyOwnersAssignedToResource/alertIncidents/a9f38501-74ec-43ea-8663-6c538602150d"
}
],
"alertConfiguration": {
"properties": {
"alertConfigurationType": "TooManyOwnersAssignedToResourceAlertConfiguration",
"alertDefinitionId": "TooManyOwnersAssignedToResource",
"scope": "subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f",
"isEnabled": true,
"thresholdNumberOfOwners": 2,
"thresholdPercentageOfOwnersOutOfAllRoleMembers": 3
},
"name": "TooManyOwnersAssignedToResource",
"id": "/subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleManagementAlertConfigurations/TooManyOwnersAssignedToResource",
"type": "Microsoft.Authorization/roleManagementAlertConfigurations"
}
},
"name": "TooManyOwnersAssignedToResource",
"id": "/subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleManagementAlerts/TooManyOwnersAssignedToResource",
"type": "Microsoft.Authorization/roleManagementAlerts"
}
]
}
定義
名稱 | Description |
---|---|
Alert |
警示。 |
Alert |
警示設定。 |
Alert |
警示定義 |
Alert |
警示事件 |
Alert |
警示清單作業結果。 |
Cloud |
來自服務的錯誤回應。 |
Cloud |
來自服務的錯誤回應。 |
Severity |
警示的嚴重性層級。 |
Alert
警示。
名稱 | 類型 | Description |
---|---|---|
id |
string |
警示識別碼。 |
name |
string |
警示名稱。 |
properties.alertConfiguration |
警示組態。 |
|
properties.alertDefinition |
警示定義。 |
|
properties.alertIncidents |
警示事件。 |
|
properties.incidentCount |
integer |
警示產生的事件數目。 |
properties.isActive |
boolean |
默認為 False;如果警示為作用中,則為 true。 |
properties.lastModifiedDateTime |
string |
警示設定更新或產生新事件的日期時間。 |
properties.lastScannedDateTime |
string |
上次掃描警示的日期時間。 |
properties.scope |
string |
警示範圍。 |
type |
string |
警示類型。 |
AlertConfiguration
警示設定。
名稱 | 類型 | Description |
---|---|---|
id |
string |
警示組態標識碼。 |
name |
string |
警示組態名稱。 |
properties.alertConfigurationType |
string |
警示組態類型。 |
properties.alertDefinition |
警示定義。 |
|
properties.alertDefinitionId |
string |
警示定義識別碼。 |
properties.isEnabled |
boolean |
如果啟用警示,則為 True,false 會停用特定警示的掃描。 |
properties.scope |
string |
警示範圍。 |
type |
string |
警示組態類型。 |
AlertDefinition
警示定義
名稱 | 類型 | Description |
---|---|---|
id |
string |
警示定義識別碼。 |
name |
string |
警示定義名稱。 |
properties.description |
string |
警示描述。 |
properties.displayName |
string |
警示顯示名稱。 |
properties.howToPrevent |
string |
防止警示的方式。 |
properties.isConfigurable |
boolean |
如果可以設定警示組態,則為 True;false,否則為 。 |
properties.isRemediatable |
boolean |
如果可以補救警示,則為 True;false,否則為 。 |
properties.mitigationSteps |
string |
減輕警示的方法。 |
properties.scope |
string |
警示範圍。 |
properties.securityImpact |
string |
警示的安全性影響。 |
properties.severityLevel |
警示的嚴重性層級。 |
|
type |
string |
警示定義類型。 |
AlertIncident
警示事件
名稱 | 類型 | Description |
---|---|---|
id |
string |
警示事件標識碼。 |
name |
string |
警示事件名稱。 |
properties.alertIncidentType |
string |
警示事件類型。 |
type |
string |
警示事件類型。 |
AlertListResult
警示清單作業結果。
名稱 | 類型 | Description |
---|---|---|
nextLink |
string |
用於取得下一組結果的 URL。 |
value |
Alert[] |
警示清單 |
CloudError
來自服務的錯誤回應。
名稱 | 類型 | Description |
---|---|---|
error |
來自服務的錯誤回應。 |
CloudErrorBody
來自服務的錯誤回應。
名稱 | 類型 | Description |
---|---|---|
code |
string |
錯誤的識別碼。 程式碼不變,且要以程式設計方式使用。 |
message |
string |
描述錯誤的訊息,適用於在使用者介面中顯示。 |
SeverityLevel
警示的嚴重性層級。
名稱 | 類型 | Description |
---|---|---|
High |
string |
|
Low |
string |
|
Medium |
string |