Sdílet prostřednictvím


Alerts - List For Scope

Získá upozornění pro obor prostředku.

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

Parametry identifikátoru URI

Name V Vyžadováno Typ Description
scope
path True

string

Rozsah výstrahy.

api-version
query True

string

Verze rozhraní API, která se má použít pro tuto operaci.

Odpovědi

Name Typ Description
200 OK

AlertListResult

OK – vrátí pole výstrah.

Other Status Codes

CloudError

Chybová odpověď popisující, proč operace selhala.

Zabezpečení

azure_auth

Tok Azure Active Directory OAuth2

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation zosobnění uživatelského účtu

Příklady

GetAlerts

Sample Request

GET https://management.azure.com/subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleManagementAlerts?api-version=2022-08-01-preview

Sample Response

{
  "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"
    }
  ]
}

Definice

Name Description
Alert

Výstraha.

AlertConfiguration

Konfigurace upozornění.

AlertDefinition

Definice upozornění

AlertIncident

Incident upozornění

AlertListResult

Výsledek operace seznamu výstrah.

CloudError

Chybová odpověď ze služby.

CloudErrorBody

Chybová odpověď ze služby.

SeverityLevel

Úroveň závažnosti výstrahy.

Alert

Výstraha.

Name Typ Description
id

string

ID upozornění.

name

string

Název upozornění.

properties.alertConfiguration

AlertConfiguration

Konfigurace upozornění.

properties.alertDefinition

AlertDefinition

Definice upozornění.

properties.alertIncidents

AlertIncident[]

Incidenty výstrah.

properties.incidentCount

integer

Počet vygenerovaných incidentů výstrahy.

properties.isActive

boolean

False ve výchozím nastavení; true, pokud je výstraha aktivní.

properties.lastModifiedDateTime

string

Datum a čas aktualizace konfigurace upozornění nebo vygenerování nových incidentů.

properties.lastScannedDateTime

string

Datum a čas posledního prověření výstrahy.

properties.scope

string

Obor upozornění.

type

string

Typ výstrahy.

AlertConfiguration

Konfigurace upozornění.

Name Typ Description
id

string

ID konfigurace upozornění.

name

string

Název konfigurace upozornění.

properties.alertConfigurationType

string

Typ konfigurace upozornění.

properties.alertDefinition

AlertDefinition

Definice upozornění.

properties.alertDefinitionId

string

ID definice upozornění.

properties.isEnabled

boolean

True, pokud je výstraha povolená, false zakáže vyhledávání konkrétní výstrahy.

properties.scope

string

Obor upozornění.

type

string

Typ konfigurace upozornění.

AlertDefinition

Definice upozornění

Name Typ Description
id

string

ID definice upozornění.

name

string

Název definice upozornění.

properties.description

string

Popis upozornění

properties.displayName

string

Zobrazovaný název upozornění

properties.howToPrevent

string

Způsoby, jak zabránit upozornění.

properties.isConfigurable

boolean

True, pokud je možné nakonfigurovat konfiguraci upozornění; false, jinak.

properties.isRemediatable

boolean

True, pokud výstraha může být napravena; false, jinak.

properties.mitigationSteps

string

Metody pro zmírnění výstrahy

properties.scope

string

Obor upozornění.

properties.securityImpact

string

Dopad výstrahy na zabezpečení.

properties.severityLevel

SeverityLevel

Úroveň závažnosti výstrahy.

type

string

Typ definice výstrahy.

AlertIncident

Incident upozornění

Name Typ Description
id

string

ID incidentu upozornění.

name

string

Název incidentu upozornění

properties.alertIncidentType

string

Typ incidentu upozornění

type

string

Typ incidentu upozornění

AlertListResult

Výsledek operace seznamu výstrah.

Name Typ Description
nextLink

string

Adresa URL, která se má použít pro získání další sady výsledků.

value

Alert[]

Seznam výstrah

CloudError

Chybová odpověď ze služby.

Name Typ Description
error

CloudErrorBody

Chybová odpověď ze služby.

CloudErrorBody

Chybová odpověď ze služby.

Name Typ Description
code

string

Identifikátor chyby. Kódy jsou invariantní a mají být využívány programově.

message

string

Zpráva popisující chybu, která má být vhodná pro zobrazení v uživatelském rozhraní.

SeverityLevel

Úroveň závažnosti výstrahy.

Name Typ Description
High

string

Low

string

Medium

string