Alerts - List For Scope
Obtient des alertes pour une étendue de ressource.
GET https://management.azure.com/{scope}/providers/Microsoft.Authorization/roleManagementAlerts?api-version=2022-08-01-preview
Paramètres URI
Nom | Dans | Obligatoire | Type | Description |
---|---|---|---|---|
scope
|
path | True |
string |
Étendue de l’alerte. |
api-version
|
query | True |
string |
Version de l’API à utiliser pour cette opération. |
Réponses
Nom | Type | Description |
---|---|---|
200 OK |
OK : retourne un tableau d’alertes. |
|
Other Status Codes |
Réponse d’erreur décrivant la raison de l’échec de l’opération. |
Sécurité
azure_auth
Flux OAuth2 Azure Active Directory
Type:
oauth2
Flux:
implicit
URL d’autorisation:
https://login.microsoftonline.com/common/oauth2/authorize
Étendues
Nom | Description |
---|---|
user_impersonation | Emprunter l’identité de votre compte d’utilisateur |
Exemples
GetAlerts
Exemple de requête
GET https://management.azure.com/subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleManagementAlerts?api-version=2022-08-01-preview
Exemple de réponse
{
"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"
}
]
}
Définitions
Nom | Description |
---|---|
Alert |
Alerte. |
Alert |
Configuration des alertes. |
Alert |
Définition d’alerte |
Alert |
Incident d’alerte |
Alert |
Résultat de l’opération de liste d’alerte. |
Cloud |
Réponse d’erreur du service. |
Cloud |
Réponse d’erreur du service. |
Severity |
Niveau de gravité de l’alerte. |
Alert
Alerte.
Nom | Type | Description |
---|---|---|
id |
string |
ID d’alerte. |
name |
string |
Nom de l’alerte. |
properties.alertConfiguration |
Configuration de l’alerte. |
|
properties.alertDefinition |
Définition d'alerte. |
|
properties.alertIncidents |
Incidents d’alerte. |
|
properties.incidentCount |
integer |
Nombre d’incidents générés de l’alerte. |
properties.isActive |
boolean |
False par défaut ; true si l’alerte est active. |
properties.lastModifiedDateTime |
string |
Date à laquelle la configuration de l’alerte a été mise à jour ou de nouveaux incidents ont été générés. |
properties.lastScannedDateTime |
string |
Date d’heure de la dernière analyse de l’alerte. |
properties.scope |
string |
Étendue de l’alerte. |
type |
string |
Type d’alerte. |
AlertConfiguration
Configuration des alertes.
Nom | Type | Description |
---|---|---|
id |
string |
ID de configuration de l’alerte. |
name |
string |
Nom de la configuration de l’alerte. |
properties.alertConfigurationType |
string |
Type de configuration d’alerte. |
properties.alertDefinition |
Définition d'alerte. |
|
properties.alertDefinitionId |
string |
ID de définition d'alerte. |
properties.isEnabled |
boolean |
True si l’alerte est activée, false désactive l’analyse de l’alerte spécifique. |
properties.scope |
string |
Étendue de l’alerte. |
type |
string |
Type de configuration d’alerte. |
AlertDefinition
Définition d’alerte
Nom | Type | Description |
---|---|---|
id |
string |
ID de définition d'alerte. |
name |
string |
Nom de la définition d’alerte. |
properties.description |
string |
Description de l’alerte. |
properties.displayName |
string |
Nom d’affichage de l’alerte. |
properties.howToPrevent |
string |
Moyens d’empêcher l’alerte. |
properties.isConfigurable |
boolean |
True si la configuration de l’alerte peut être configurée ; false, sinon. |
properties.isRemediatable |
boolean |
True si l’alerte peut être corrigée ; false, sinon. |
properties.mitigationSteps |
string |
Méthodes permettant d’atténuer l’alerte. |
properties.scope |
string |
Étendue de l’alerte. |
properties.securityImpact |
string |
Impact sur la sécurité de l’alerte. |
properties.severityLevel |
Niveau de gravité de l’alerte. |
|
type |
string |
Type de définition d’alerte. |
AlertIncident
Incident d’alerte
Nom | Type | Description |
---|---|---|
id |
string |
ID d’incident d’alerte. |
name |
string |
Nom de l’incident d’alerte. |
properties.alertIncidentType |
string |
Type d’incident d’alerte. |
type |
string |
Type d’incident d’alerte. |
AlertListResult
Résultat de l’opération de liste d’alerte.
Nom | Type | Description |
---|---|---|
nextLink |
string |
URL à utiliser pour obtenir l’ensemble de résultats suivant. |
value |
Alert[] |
Liste d'alertes |
CloudError
Réponse d’erreur du service.
Nom | Type | Description |
---|---|---|
error |
Réponse d’erreur du service. |
CloudErrorBody
Réponse d’erreur du service.
Nom | Type | Description |
---|---|---|
code |
string |
Identificateur de l'erreur. Les codes sont invariants et sont destinés à être consommés par programmation. |
message |
string |
Message décrivant l’erreur, destiné à être adapté à l’affichage dans une interface utilisateur. |
SeverityLevel
Niveau de gravité de l’alerte.
Nom | Type | Description |
---|---|---|
High |
string |
|
Low |
string |
|
Medium |
string |