Поделиться через


Alerts - List For Scope

Возвращает оповещения для области ресурсов.

GET https://management.azure.com/{scope}/providers/Microsoft.Authorization/roleManagementAlerts?api-version=2022-08-01-preview

Параметры URI

Имя В Обязательно Тип Описание
scope
path True

string

Область оповещения.

api-version
query True

string

minLength: 1

Версия API, используемая для этой операции.

Ответы

Имя Тип Описание
200 OK

AlertListResult

ОК. Возвращает массив оповещений.

Other Status Codes

CloudError

Ответ на ошибку, описывающий причину сбоя операции.

Безопасность

azure_auth

Поток OAuth2 Azure Active Directory

Тип: oauth2
Flow: implicit
URL-адрес авторизации: https://login.microsoftonline.com/common/oauth2/authorize

Области

Имя Описание
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"
    }
  ]
}

Определения

Имя Описание
Alert

Оповещение.

AlertConfiguration

Конфигурация оповещений.

AlertDefinition

Определение оповещений

AlertIncident

Инцидент оповещений

AlertListResult

Результат операции списка оповещений.

CloudError

Ответ на ошибку службы.

CloudErrorBody

Ответ на ошибку службы.

SeverityLevel

Уровень серьезности оповещения.

Alert

Оповещение.

Имя Тип Описание
id

string

Идентификатор оповещения.

name

string

Имя оповещения.

properties.alertConfiguration

AlertConfiguration

Конфигурация оповещения.

properties.alertDefinition

AlertDefinition

Определение оповещения.

properties.alertIncidents

AlertIncident[]

Инциденты оповещений.

properties.incidentCount

integer (int32)

Количество созданных инцидентов оповещения.

properties.isActive

boolean

False по умолчанию; Значение true, если оповещение активно.

properties.lastModifiedDateTime

string (date-time)

Дата обновления конфигурации оповещения или создание новых инцидентов.

properties.lastScannedDateTime

string (date-time)

Дата последнего сканирования оповещения.

properties.scope

string

Область оповещения.

type

string

Тип оповещения.

AlertConfiguration

Конфигурация оповещений.

Имя Тип Описание
id

string

Идентификатор конфигурации оповещения.

name

string

Имя конфигурации оповещения.

properties.alertConfigurationType

string

Тип конфигурации оповещения.

properties.alertDefinition

AlertDefinition

Определение оповещения.

properties.alertDefinitionId

string

Идентификатор определения оповещения.

properties.isEnabled

boolean

Значение True, если оповещение включено, false отключит сканирование для конкретного оповещения.

properties.scope

string

Область оповещения.

type

string

Тип конфигурации оповещения.

AlertDefinition

Определение оповещений

Имя Тип Описание
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

SeverityLevel

Уровень серьезности оповещения.

type

string

Тип определения оповещения.

AlertIncident

Инцидент оповещений

Имя Тип Описание
id

string

Идентификатор инцидента оповещения.

name

string

Имя инцидента оповещения.

properties.alertIncidentType

string

Тип инцидента оповещения.

type

string

Тип инцидента оповещения.

AlertListResult

Результат операции списка оповещений.

Имя Тип Описание
nextLink

string

URL-адрес, используемый для получения следующего набора результатов.

value

Alert[]

Список оповещений

CloudError

Ответ на ошибку службы.

Имя Тип Описание
error

CloudErrorBody

Ответ на ошибку службы.

CloudErrorBody

Ответ на ошибку службы.

Имя Тип Описание
code

string

Идентификатор ошибки. Коды являются инвариантными и предназначены для программного использования.

message

string

Сообщение, описывающее ошибку, предназначенное для отображения в пользовательском интерфейсе.

SeverityLevel

Уровень серьезности оповещения.

Значение Описание
Low
Medium
High