Compartilhar via


Alerts - List For Scope

Obtém alertas para um escopo de recurso.

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

Parâmetros de URI

Nome Em Obrigatório Tipo Description
scope
path True

string

O escopo do alerta.

api-version
query True

string

A versão da API a ser usada para esta operação.

Respostas

Nome Tipo Description
200 OK

AlertListResult

OK – retorna uma matriz de alertas.

Other Status Codes

CloudError

Resposta de erro que descreve por que a operação falhou.

Segurança

azure_auth

Fluxo do OAuth2 do Azure Active Directory

Tipo: oauth2
Flow: implicit
URL de Autorização: https://login.microsoftonline.com/common/oauth2/authorize

Escopos

Nome Description
user_impersonation representar sua conta de usuário

Exemplos

GetAlerts

Solicitação de exemplo

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

Resposta de exemplo

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

Definições

Nome Description
Alert

O alerta.

AlertConfiguration

Configuração de alerta.

AlertDefinition

Definição do alerta

AlertIncident

Incidente de alerta

AlertListResult

Resultado da operação da lista de alertas.

CloudError

Uma resposta de erro do serviço.

CloudErrorBody

Uma resposta de erro do serviço.

SeverityLevel

Nível de severidade do alerta.

Alert

O alerta.

Nome Tipo Description
id

string

A ID do alerta.

name

string

O nome do alerta.

properties.alertConfiguration

AlertConfiguration

A configuração do alerta.

properties.alertDefinition

AlertDefinition

A definição de alerta.

properties.alertIncidents

AlertIncident[]

Os incidentes de alerta.

properties.incidentCount

integer

O número de incidentes gerados do alerta.

properties.isActive

boolean

False por padrão; true se o alerta estiver ativo.

properties.lastModifiedDateTime

string

A data e hora em que a configuração do alerta foi atualizada ou novos incidentes foram gerados.

properties.lastScannedDateTime

string

A data e hora em que o alerta foi verificado pela última vez.

properties.scope

string

O escopo do alerta.

type

string

O tipo de alerta.

AlertConfiguration

Configuração de alerta.

Nome Tipo Description
id

string

A ID de configuração do alerta.

name

string

O nome da configuração do alerta.

properties.alertConfigurationType

string

O tipo de configuração de alerta.

properties.alertDefinition

AlertDefinition

A definição de alerta.

properties.alertDefinitionId

string

A ID de definição de alerta.

properties.isEnabled

boolean

True se o alerta estiver habilitado, false desabilitará a verificação do alerta específico.

properties.scope

string

O escopo do alerta.

type

string

O tipo de configuração de alerta.

AlertDefinition

Definição do alerta

Nome Tipo Description
id

string

A ID de definição de alerta.

name

string

O nome da definição de alerta.

properties.description

string

Descrição do alerta.

properties.displayName

string

O nome de exibição do alerta.

properties.howToPrevent

string

As maneiras de evitar o alerta.

properties.isConfigurable

boolean

True se a configuração de alerta puder ser configurada; false, caso contrário.

properties.isRemediatable

boolean

True se o alerta puder ser corrigido; false, caso contrário.

properties.mitigationSteps

string

Os métodos para atenuar o alerta.

properties.scope

string

O escopo do alerta.

properties.securityImpact

string

Impacto de segurança do alerta.

properties.severityLevel

SeverityLevel

Nível de severidade do alerta.

type

string

O tipo de definição de alerta.

AlertIncident

Incidente de alerta

Nome Tipo Description
id

string

A ID do incidente de alerta.

name

string

O nome do incidente de alerta.

properties.alertIncidentType

string

O tipo de incidente de alerta.

type

string

O tipo de incidente de alerta.

AlertListResult

Resultado da operação da lista de alertas.

Nome Tipo Description
nextLink

string

A URL a ser usada para obter o próximo conjunto de resultados.

value

Alert[]

Lista de alertas

CloudError

Uma resposta de erro do serviço.

Nome Tipo Description
error

CloudErrorBody

Uma resposta de erro do serviço.

CloudErrorBody

Uma resposta de erro do serviço.

Nome Tipo Description
code

string

Um identificador para o erro. Os códigos são invariáveis e devem ser consumidos programaticamente.

message

string

Uma mensagem que descreve o erro, destinada a ser adequada para exibição em uma interface do usuário.

SeverityLevel

Nível de severidade do alerta.

Nome Tipo Description
High

string

Low

string

Medium

string