Espace de noms : microsoft.graph.deviceManagement
Importante
Les API sous la version /beta
dans Microsoft Graph sont susceptibles d’être modifiées. L’utilisation de ces API dans des applications de production n’est pas prise en charge. Pour déterminer si une API est disponible dans v1.0, utilisez le sélecteur Version .
Créez un objet alertRule .
Cette API est disponible dans les déploiements de cloud national suivants.
Service global |
Gouvernement des États-Unis L4 |
Us Government L5 (DOD) |
Chine gérée par 21Vianet |
✅ |
✅ |
✅ |
❌ |
Autorisations
Choisissez l’autorisation ou les autorisations marquées comme moins privilégiées pour cette API. Utilisez une autorisation ou des autorisations privilégiées plus élevées uniquement si votre application en a besoin. Pour plus d’informations sur les autorisations déléguées et d’application, consultez Types d’autorisations. Pour en savoir plus sur ces autorisations, consultez les informations de référence sur les autorisations.
Type d’autorisation |
Autorisations avec privilèges minimum |
Autorisations privilégiées plus élevées |
Déléguée (compte professionnel ou scolaire) |
CloudPC.ReadWrite.All |
Non disponible. |
Déléguée (compte Microsoft personnel) |
Non prise en charge. |
Non prise en charge. |
Application |
Non prise en charge. |
Non prise en charge. |
Requête HTTP
POST /deviceManagement/monitoring/alertRules
Corps de la demande
Dans le corps de la demande, fournissez uniquement les valeurs des propriétés à mettre à jour. Les propriétés existantes qui ne sont pas incluses dans le corps de la demande conservent leurs valeurs précédentes ou sont recalculées en fonction des modifications apportées à d’autres valeurs de propriété.
Le tableau suivant spécifie les propriétés qui peuvent être mises à jour.
Propriété |
Type |
Description |
alertRuleTemplate |
microsoft.graph.deviceManagement.alertRuleTemplate |
Modèle de règle de l’événement d’alerte. Les valeurs possibles sont cloudPcProvisionScenario , cloudPcImageUploadScenario , cloudPcOnPremiseNetworkConnectionCheckScenario , cloudPcInGracePeriodScenario , cloudPcFrontlineInsufficientLicensesScenario , cloudPcInaccessibleScenario . Utilisez l’en-tête Prefer: include-unknown-enum-members de requête pour obtenir les valeurs suivantes de cette énumération évolutive : cloudPcInGracePeriodScenario . |
description |
String |
Description de la règle. |
displayName |
String |
Nom d’affichage de la règle. |
activé |
Boolean |
Status de la règle qui indique si la règle est activée ou désactivée. Si true la valeur est , la règle est activée ; sinon, la règle est désactivée. |
isSystemRule |
Boolean |
Valeur qui indique si la règle est une règle système. Si true la valeur est , la règle est une règle système ; sinon, il s’agit d’une règle personnalisée définie et peut être modifiée. Seules quelques propriétés peuvent être modifiées sur des règles système intégrées. |
notificationChannels |
collection microsoft.graph.deviceManagement.notificationChannel |
Canaux de notification de la règle sélectionnée par l’utilisateur. |
Sévérité |
microsoft.graph.deviceManagement.ruleSeverityType |
Gravité de la règle. Les valeurs possibles sont : unknown , informational , warning , critical , unknownFutureValue . |
seuil |
microsoft.graph.deviceManagement.ruleThreshold |
Seuil de la règle. Cette propriété est déconseillée. Utilisez conditions à la place. |
conditions |
collection microsoft.graph.deviceManagement.ruleCondition |
Conditions de la règle. Les conditions déterminent quand envoyer une alerte. Par exemple, vous pouvez définir une condition afin qu’une alerte soit envoyée lorsque six PC cloud ou plus ne parviennent pas à provisionner. |
Réponse
Si elle réussit, cette méthode renvoie un 201 Created
code de réponse et un objet microsoft.graph.deviceManagement.alertRule dans le corps de la réponse.
Exemple
Demande
L’exemple suivant illustre une demande.
POST https://graph.microsoft.com/beta/deviceManagement/monitoring/alertRules
Content-Type: application/json
{
"id": "215c55cc-b1c9-4d36-a870-be5778101714",
"displayName": "Azure network connection failure impacting Cloud PCs",
"severity": "informational",
"isSystemRule": true,
"description": "Azure network connection checks have failed and is potentially impacting existing Cloud PCs and blocking the provisioning of new Cloud PCs",
"enabled": true,
"alertRuleTemplate": "cloudPcOnPremiseNetworkConnectionCheckScenario",
"threshold": {
"aggregation": "count",
"operator": "greaterOrEqual",
"target": 90
},
"conditions": [
{
"relationshipType": "or",
"conditionCategory": "azureNetworkConnectionCheckFailures",
"aggregation": "count",
"operator": "greaterOrEqual",
"thresholdValue": "90"
}
],
"notificationChannels": [
{
"notificationChannelType": "portal",
"notificationReceivers": []
},
{
"notificationChannelType": "email",
"notificationReceivers": [
{
"locale": "en-us",
"contactInformation": "serena.davis@contoso.com"
}
]
}
]
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models.DeviceManagement;
var requestBody = new AlertRule
{
Id = "215c55cc-b1c9-4d36-a870-be5778101714",
DisplayName = "Azure network connection failure impacting Cloud PCs",
Severity = RuleSeverityType.Informational,
IsSystemRule = true,
Description = "Azure network connection checks have failed and is potentially impacting existing Cloud PCs and blocking the provisioning of new Cloud PCs",
Enabled = true,
AlertRuleTemplate = AlertRuleTemplate.CloudPcOnPremiseNetworkConnectionCheckScenario,
Threshold = new RuleThreshold
{
Aggregation = AggregationType.Count,
Operator = OperatorType.GreaterOrEqual,
Target = 90,
},
Conditions = new List<RuleCondition>
{
new RuleCondition
{
RelationshipType = RelationshipType.Or,
ConditionCategory = ConditionCategory.AzureNetworkConnectionCheckFailures,
Aggregation = AggregationType.Count,
Operator = OperatorType.GreaterOrEqual,
ThresholdValue = "90",
},
},
NotificationChannels = new List<NotificationChannel>
{
new NotificationChannel
{
NotificationChannelType = NotificationChannelType.Portal,
NotificationReceivers = new List<NotificationReceiver>
{
},
},
new NotificationChannel
{
NotificationChannelType = NotificationChannelType.Email,
NotificationReceivers = new List<NotificationReceiver>
{
new NotificationReceiver
{
Locale = "en-us",
ContactInformation = "serena.davis@contoso.com",
},
},
},
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.DeviceManagement.Monitoring.AlertRules.PostAsync(requestBody);
mgc-beta device-management monitoring alert-rules create --body '{\
"id": "215c55cc-b1c9-4d36-a870-be5778101714",\
"displayName": "Azure network connection failure impacting Cloud PCs",\
"severity": "informational",\
"isSystemRule": true,\
"description": "Azure network connection checks have failed and is potentially impacting existing Cloud PCs and blocking the provisioning of new Cloud PCs",\
"enabled": true,\
"alertRuleTemplate": "cloudPcOnPremiseNetworkConnectionCheckScenario",\
"threshold": {\
"aggregation": "count",\
"operator": "greaterOrEqual",\
"target": 90\
},\
"conditions": [\
{\
"relationshipType": "or",\
"conditionCategory": "azureNetworkConnectionCheckFailures",\
"aggregation": "count",\
"operator": "greaterOrEqual",\
"thresholdValue": "90"\
}\
],\
"notificationChannels": [\
{\
"notificationChannelType": "portal",\
"notificationReceivers": []\
},\
{\
"notificationChannelType": "email",\
"notificationReceivers": [\
{\
"locale": "en-us",\
"contactInformation": "serena.davis@contoso.com"\
}\
]\
}\
]\
}\
'
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
graphmodelsdevicemanagement "github.com/microsoftgraph/msgraph-beta-sdk-go/models/devicemanagement"
//other-imports
)
requestBody := graphmodelsdevicemanagement.NewAlertRule()
id := "215c55cc-b1c9-4d36-a870-be5778101714"
requestBody.SetId(&id)
displayName := "Azure network connection failure impacting Cloud PCs"
requestBody.SetDisplayName(&displayName)
severity := graphmodels.INFORMATIONAL_RULESEVERITYTYPE
requestBody.SetSeverity(&severity)
isSystemRule := true
requestBody.SetIsSystemRule(&isSystemRule)
description := "Azure network connection checks have failed and is potentially impacting existing Cloud PCs and blocking the provisioning of new Cloud PCs"
requestBody.SetDescription(&description)
enabled := true
requestBody.SetEnabled(&enabled)
alertRuleTemplate := graphmodels.CLOUDPCONPREMISENETWORKCONNECTIONCHECKSCENARIO_ALERTRULETEMPLATE
requestBody.SetAlertRuleTemplate(&alertRuleTemplate)
threshold := graphmodelsdevicemanagement.NewRuleThreshold()
aggregation := graphmodels.COUNT_AGGREGATIONTYPE
threshold.SetAggregation(&aggregation)
operator := graphmodels.GREATEROREQUAL_OPERATORTYPE
threshold.SetOperator(&operator)
target := int32(90)
threshold.SetTarget(&target)
requestBody.SetThreshold(threshold)
ruleCondition := graphmodelsdevicemanagement.NewRuleCondition()
relationshipType := graphmodels.OR_RELATIONSHIPTYPE
ruleCondition.SetRelationshipType(&relationshipType)
conditionCategory := graphmodels.AZURENETWORKCONNECTIONCHECKFAILURES_CONDITIONCATEGORY
ruleCondition.SetConditionCategory(&conditionCategory)
aggregation := graphmodels.COUNT_AGGREGATIONTYPE
ruleCondition.SetAggregation(&aggregation)
operator := graphmodels.GREATEROREQUAL_OPERATORTYPE
ruleCondition.SetOperator(&operator)
thresholdValue := "90"
ruleCondition.SetThresholdValue(&thresholdValue)
conditions := []graphmodelsdevicemanagement.RuleConditionable {
ruleCondition,
}
requestBody.SetConditions(conditions)
notificationChannel := graphmodelsdevicemanagement.NewNotificationChannel()
notificationChannelType := graphmodels.PORTAL_NOTIFICATIONCHANNELTYPE
notificationChannel.SetNotificationChannelType(¬ificationChannelType)
notificationReceivers := []graphmodelsdevicemanagement.NotificationReceiverable {
}
notificationChannel.SetNotificationReceivers(notificationReceivers)
notificationChannel1 := graphmodelsdevicemanagement.NewNotificationChannel()
notificationChannelType := graphmodels.EMAIL_NOTIFICATIONCHANNELTYPE
notificationChannel1.SetNotificationChannelType(¬ificationChannelType)
notificationReceiver := graphmodelsdevicemanagement.NewNotificationReceiver()
locale := "en-us"
notificationReceiver.SetLocale(&locale)
contactInformation := "serena.davis@contoso.com"
notificationReceiver.SetContactInformation(&contactInformation)
notificationReceivers := []graphmodelsdevicemanagement.NotificationReceiverable {
notificationReceiver,
}
notificationChannel1.SetNotificationReceivers(notificationReceivers)
notificationChannels := []graphmodelsdevicemanagement.NotificationChannelable {
notificationChannel,
notificationChannel1,
}
requestBody.SetNotificationChannels(notificationChannels)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
alertRules, err := graphClient.DeviceManagement().Monitoring().AlertRules().Post(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.beta.models.devicemanagement.AlertRule alertRule = new com.microsoft.graph.beta.models.devicemanagement.AlertRule();
alertRule.setId("215c55cc-b1c9-4d36-a870-be5778101714");
alertRule.setDisplayName("Azure network connection failure impacting Cloud PCs");
alertRule.setSeverity(com.microsoft.graph.beta.models.devicemanagement.RuleSeverityType.Informational);
alertRule.setIsSystemRule(true);
alertRule.setDescription("Azure network connection checks have failed and is potentially impacting existing Cloud PCs and blocking the provisioning of new Cloud PCs");
alertRule.setEnabled(true);
alertRule.setAlertRuleTemplate(com.microsoft.graph.beta.models.devicemanagement.AlertRuleTemplate.CloudPcOnPremiseNetworkConnectionCheckScenario);
com.microsoft.graph.beta.models.devicemanagement.RuleThreshold threshold = new com.microsoft.graph.beta.models.devicemanagement.RuleThreshold();
threshold.setAggregation(com.microsoft.graph.beta.models.devicemanagement.AggregationType.Count);
threshold.setOperator(com.microsoft.graph.beta.models.devicemanagement.OperatorType.GreaterOrEqual);
threshold.setTarget(90);
alertRule.setThreshold(threshold);
LinkedList<com.microsoft.graph.beta.models.devicemanagement.RuleCondition> conditions = new LinkedList<com.microsoft.graph.beta.models.devicemanagement.RuleCondition>();
com.microsoft.graph.beta.models.devicemanagement.RuleCondition ruleCondition = new com.microsoft.graph.beta.models.devicemanagement.RuleCondition();
ruleCondition.setRelationshipType(com.microsoft.graph.beta.models.devicemanagement.RelationshipType.Or);
ruleCondition.setConditionCategory(com.microsoft.graph.beta.models.devicemanagement.ConditionCategory.AzureNetworkConnectionCheckFailures);
ruleCondition.setAggregation(com.microsoft.graph.beta.models.devicemanagement.AggregationType.Count);
ruleCondition.setOperator(com.microsoft.graph.beta.models.devicemanagement.OperatorType.GreaterOrEqual);
ruleCondition.setThresholdValue("90");
conditions.add(ruleCondition);
alertRule.setConditions(conditions);
LinkedList<com.microsoft.graph.beta.models.devicemanagement.NotificationChannel> notificationChannels = new LinkedList<com.microsoft.graph.beta.models.devicemanagement.NotificationChannel>();
com.microsoft.graph.beta.models.devicemanagement.NotificationChannel notificationChannel = new com.microsoft.graph.beta.models.devicemanagement.NotificationChannel();
notificationChannel.setNotificationChannelType(com.microsoft.graph.beta.models.devicemanagement.NotificationChannelType.Portal);
LinkedList<com.microsoft.graph.beta.models.devicemanagement.NotificationReceiver> notificationReceivers = new LinkedList<com.microsoft.graph.beta.models.devicemanagement.NotificationReceiver>();
notificationChannel.setNotificationReceivers(notificationReceivers);
notificationChannels.add(notificationChannel);
com.microsoft.graph.beta.models.devicemanagement.NotificationChannel notificationChannel1 = new com.microsoft.graph.beta.models.devicemanagement.NotificationChannel();
notificationChannel1.setNotificationChannelType(com.microsoft.graph.beta.models.devicemanagement.NotificationChannelType.Email);
LinkedList<com.microsoft.graph.beta.models.devicemanagement.NotificationReceiver> notificationReceivers1 = new LinkedList<com.microsoft.graph.beta.models.devicemanagement.NotificationReceiver>();
com.microsoft.graph.beta.models.devicemanagement.NotificationReceiver notificationReceiver = new com.microsoft.graph.beta.models.devicemanagement.NotificationReceiver();
notificationReceiver.setLocale("en-us");
notificationReceiver.setContactInformation("serena.davis@contoso.com");
notificationReceivers1.add(notificationReceiver);
notificationChannel1.setNotificationReceivers(notificationReceivers1);
notificationChannels.add(notificationChannel1);
alertRule.setNotificationChannels(notificationChannels);
com.microsoft.graph.models.devicemanagement.AlertRule result = graphClient.deviceManagement().monitoring().alertRules().post(alertRule);
const options = {
authProvider,
};
const client = Client.init(options);
const alertRule = {
id: '215c55cc-b1c9-4d36-a870-be5778101714',
displayName: 'Azure network connection failure impacting Cloud PCs',
severity: 'informational',
isSystemRule: true,
description: 'Azure network connection checks have failed and is potentially impacting existing Cloud PCs and blocking the provisioning of new Cloud PCs',
enabled: true,
alertRuleTemplate: 'cloudPcOnPremiseNetworkConnectionCheckScenario',
threshold: {
aggregation: 'count',
operator: 'greaterOrEqual',
target: 90
},
conditions: [
{
relationshipType: 'or',
conditionCategory: 'azureNetworkConnectionCheckFailures',
aggregation: 'count',
operator: 'greaterOrEqual',
thresholdValue: '90'
}
],
notificationChannels: [
{
notificationChannelType: 'portal',
notificationReceivers: []
},
{
notificationChannelType: 'email',
notificationReceivers: [
{
locale: 'en-us',
contactInformation: 'serena.davis@contoso.com'
}
]
}
]
};
await client.api('/deviceManagement/monitoring/alertRules')
.version('beta')
.post(alertRule);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Models\DeviceManagement\AlertRule;
use Microsoft\Graph\Beta\Generated\Models\DeviceManagement\RuleSeverityType;
use Microsoft\Graph\Beta\Generated\Models\DeviceManagement\AlertRuleTemplate;
use Microsoft\Graph\Beta\Generated\Models\DeviceManagement\RuleThreshold;
use Microsoft\Graph\Beta\Generated\Models\DeviceManagement\AggregationType;
use Microsoft\Graph\Beta\Generated\Models\DeviceManagement\OperatorType;
use Microsoft\Graph\Beta\Generated\Models\DeviceManagement\RuleCondition;
use Microsoft\Graph\Beta\Generated\Models\DeviceManagement\RelationshipType;
use Microsoft\Graph\Beta\Generated\Models\DeviceManagement\ConditionCategory;
use Microsoft\Graph\Beta\Generated\Models\DeviceManagement\NotificationChannel;
use Microsoft\Graph\Beta\Generated\Models\DeviceManagement\NotificationChannelType;
use Microsoft\Graph\Beta\Generated\Models\DeviceManagement\NotificationReceiver;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new AlertRule();
$requestBody->setId('215c55cc-b1c9-4d36-a870-be5778101714');
$requestBody->setDisplayName('Azure network connection failure impacting Cloud PCs');
$requestBody->setSeverity(new RuleSeverityType('informational'));
$requestBody->setIsSystemRule(true);
$requestBody->setDescription('Azure network connection checks have failed and is potentially impacting existing Cloud PCs and blocking the provisioning of new Cloud PCs');
$requestBody->setEnabled(true);
$requestBody->setAlertRuleTemplate(new AlertRuleTemplate('cloudPcOnPremiseNetworkConnectionCheckScenario'));
$threshold = new RuleThreshold();
$threshold->setAggregation(new AggregationType('count'));
$threshold->setOperator(new OperatorType('greaterOrEqual'));
$threshold->setTarget(90);
$requestBody->setThreshold($threshold);
$conditionsRuleCondition1 = new RuleCondition();
$conditionsRuleCondition1->setRelationshipType(new RelationshipType('or'));
$conditionsRuleCondition1->setConditionCategory(new ConditionCategory('azureNetworkConnectionCheckFailures'));
$conditionsRuleCondition1->setAggregation(new AggregationType('count'));
$conditionsRuleCondition1->setOperator(new OperatorType('greaterOrEqual'));
$conditionsRuleCondition1->setThresholdValue('90');
$conditionsArray []= $conditionsRuleCondition1;
$requestBody->setConditions($conditionsArray);
$notificationChannelsNotificationChannel1 = new NotificationChannel();
$notificationChannelsNotificationChannel1->setNotificationChannelType(new NotificationChannelType('portal'));
$notificationChannelsNotificationChannel1->setNotificationReceivers([]);
$notificationChannelsArray []= $notificationChannelsNotificationChannel1;
$notificationChannelsNotificationChannel2 = new NotificationChannel();
$notificationChannelsNotificationChannel2->setNotificationChannelType(new NotificationChannelType('email'));
$notificationReceiversNotificationReceiver1 = new NotificationReceiver();
$notificationReceiversNotificationReceiver1->setLocale('en-us');
$notificationReceiversNotificationReceiver1->setContactInformation('serena.davis@contoso.com');
$notificationReceiversArray []= $notificationReceiversNotificationReceiver1;
$notificationChannelsNotificationChannel2->setNotificationReceivers($notificationReceiversArray);
$notificationChannelsArray []= $notificationChannelsNotificationChannel2;
$requestBody->setNotificationChannels($notificationChannelsArray);
$result = $graphServiceClient->deviceManagement()->monitoring()->alertRules()->post($requestBody)->wait();
Import-Module Microsoft.Graph.Beta.DeviceManagement
$params = @{
id = "215c55cc-b1c9-4d36-a870-be5778101714"
displayName = "Azure network connection failure impacting Cloud PCs"
severity = "informational"
isSystemRule = $true
description = "Azure network connection checks have failed and is potentially impacting existing Cloud PCs and blocking the provisioning of new Cloud PCs"
enabled = $true
alertRuleTemplate = "cloudPcOnPremiseNetworkConnectionCheckScenario"
threshold = @{
aggregation = "count"
operator = "greaterOrEqual"
target = 90
}
conditions = @(
@{
relationshipType = "or"
conditionCategory = "azureNetworkConnectionCheckFailures"
aggregation = "count"
operator = "greaterOrEqual"
thresholdValue = "90"
}
)
notificationChannels = @(
@{
notificationChannelType = "portal"
notificationReceivers = @(
)
}
@{
notificationChannelType = "email"
notificationReceivers = @(
@{
locale = "en-us"
contactInformation = "serena.davis@contoso.com"
}
)
}
)
}
New-MgBetaDeviceManagementMonitoringAlertRule -BodyParameter $params
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.models.device_management.alert_rule import AlertRule
from msgraph_beta.generated.models.rule_severity_type import RuleSeverityType
from msgraph_beta.generated.models.alert_rule_template import AlertRuleTemplate
from msgraph_beta.generated.models.device_management.rule_threshold import RuleThreshold
from msgraph_beta.generated.models.aggregation_type import AggregationType
from msgraph_beta.generated.models.operator_type import OperatorType
from msgraph_beta.generated.models.device_management.rule_condition import RuleCondition
from msgraph_beta.generated.models.relationship_type import RelationshipType
from msgraph_beta.generated.models.condition_category import ConditionCategory
from msgraph_beta.generated.models.device_management.notification_channel import NotificationChannel
from msgraph_beta.generated.models.notification_channel_type import NotificationChannelType
from msgraph_beta.generated.models.device_management.notification_receiver import NotificationReceiver
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = AlertRule(
id = "215c55cc-b1c9-4d36-a870-be5778101714",
display_name = "Azure network connection failure impacting Cloud PCs",
severity = RuleSeverityType.Informational,
is_system_rule = True,
description = "Azure network connection checks have failed and is potentially impacting existing Cloud PCs and blocking the provisioning of new Cloud PCs",
enabled = True,
alert_rule_template = AlertRuleTemplate.CloudPcOnPremiseNetworkConnectionCheckScenario,
threshold = RuleThreshold(
aggregation = AggregationType.Count,
operator = OperatorType.GreaterOrEqual,
target = 90,
),
conditions = [
RuleCondition(
relationship_type = RelationshipType.Or,
condition_category = ConditionCategory.AzureNetworkConnectionCheckFailures,
aggregation = AggregationType.Count,
operator = OperatorType.GreaterOrEqual,
threshold_value = "90",
),
],
notification_channels = [
NotificationChannel(
notification_channel_type = NotificationChannelType.Portal,
notification_receivers = [
],
),
NotificationChannel(
notification_channel_type = NotificationChannelType.Email,
notification_receivers = [
NotificationReceiver(
locale = "en-us",
contact_information = "serena.davis@contoso.com",
),
],
),
],
)
result = await graph_client.device_management.monitoring.alert_rules.post(request_body)
Réponse
L’exemple suivant illustre la réponse.
HTTP/1.1 201 CREATED
Content-Type: application/json
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#deviceManagement/monitoring/alertRules/$entity",
"id": "215c55cc-b1c9-4d36-a870-be5778101714",
"displayName": "Azure network connection failure impacting Cloud PCs",
"severity": "informational",
"isSystemRule": true,
"description": "Azure network connection checks have failed and is potentially impacting existing Cloud PCs and blocking the provisioning of new Cloud PCs",
"enabled": true,
"alertRuleTemplate": "cloudPcOnPremiseNetworkConnectionCheckScenario",
"threshold": {
"aggregation": "count",
"operator": "greaterOrEqual",
"target": 90
},
"conditions": [
{
"relationshipType": "or",
"conditionCategory": "azureNetworkConnectionCheckFailures",
"aggregation": "count",
"operator": "greaterOrEqual",
"thresholdValue": "90"
}
],
"notificationChannels": [
{
"notificationChannelType": "portal",
"notificationReceivers": []
},
{
"notificationChannelType": "email",
"notificationReceivers": [
{
"locale": "en-us",
"contactInformation": "serena.davis@contoso.com"
}
]
}
]
}