Sdílet prostřednictvím


Alerts - List For Scope

Získá výstrahy 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

minLength: 1

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

Azure Active Directory OAuth2 Flow

Typ: oauth2
Tok: implicit
URL autorizace: https://login.microsoftonline.com/common/oauth2/authorize

Rozsahy

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

Příklady

GetAlerts

Ukázkový požadavek

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

Ukázková odpověď

{
  "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 výstrah

AlertDefinition

Definice výstrahy

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 výstrahy.

name

string

Název výstrahy.

properties.alertConfiguration

AlertConfiguration

Konfigurace výstrahy.

properties.alertDefinition

AlertDefinition

Definice výstrahy.

properties.alertIncidents

AlertIncident[]

Incidenty upozornění.

properties.incidentCount

integer (int32)

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 (date-time)

Datum, kdy se konfigurace výstrahy aktualizovala nebo se vygenerovaly nové incidenty.

properties.lastScannedDateTime

string (date-time)

Datum, kdy byla výstraha naposledy zkontrolována.

properties.scope

string

Obor výstrahy.

type

string

Typ výstrahy.

AlertConfiguration

Konfigurace výstrah

Name Typ Description
id

string

ID konfigurace výstrahy.

name

string

Název konfigurace upozornění.

properties.alertConfigurationType

string

Typ konfigurace výstrahy.

properties.alertDefinition

AlertDefinition

Definice výstrahy.

properties.alertDefinitionId

string

ID definice výstrahy.

properties.isEnabled

boolean

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

properties.scope

string

Obor výstrahy.

type

string

Typ konfigurace výstrahy.

AlertDefinition

Definice výstrahy

Name Typ Description
id

string

ID definice výstrahy.

name

string

Název definice výstrahy.

properties.description

string

Popis výstrahy.

properties.displayName

string

Zobrazovaný název upozornění.

properties.howToPrevent

string

Způsoby, jak výstrahu zabránit.

properties.isConfigurable

boolean

Hodnota True, pokud je možné nakonfigurovat konfiguraci výstrahy; jinak.

properties.isRemediatable

boolean

Hodnota True, pokud lze výstrahu napravit; jinak.

properties.mitigationSteps

string

Metody pro zmírnění výstrahy.

properties.scope

string

Obor výstrahy.

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 výstrahy.

name

string

Název incidentu upozornění.

properties.alertIncidentType

string

Typ incidentu výstrahy.

type

string

Typ incidentu výstrahy.

AlertListResult

Výsledek operace seznamu výstrah.

Name Typ Description
nextLink

string

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

value

Alert[]

Seznam upozornění

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žity 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

Hodnota Description
High
Low
Medium