Namespace: microsoft.graph.networkaccess
Wichtig
Die APIs unter der /beta Version in Microsoft Graph können sich ändern. Die Verwendung dieser APIs in Produktionsanwendungen wird nicht unterstützt. Um festzustellen, ob eine API in v1.0 verfügbar ist, verwenden Sie die Version Selektor.
Aktualisieren sie die Eigenschaften eines tlsInspectionRule-Objekts .
Diese API ist in den folgenden nationalen Cloudbereitstellungen verfügbar.
| Weltweiter Service |
US Government L4 |
US Government L5 (DOD) |
China, betrieben von 21Vianet |
| ✅ |
❌ |
❌ |
❌ |
Berechtigungen
Wählen Sie die Berechtigungen aus, die für diese API als am wenigsten privilegiert markiert sind. Verwenden Sie eine höhere Berechtigung oder Berechtigungen nur, wenn Ihre App dies erfordert. Ausführliche Informationen zu delegierten Berechtigungen und Anwendungsberechtigungen finden Sie unter Berechtigungstypen. Weitere Informationen zu diesen Berechtigungen finden Sie in der Berechtigungsreferenz.
| Berechtigungstyp |
Berechtigungen mit den geringsten Berechtigungen |
Berechtigungen mit höheren Berechtigungen |
| Delegiert (Geschäfts-, Schul- oder Unikonto) |
NetworkAccess.ReadWrite.All |
Nicht verfügbar. |
| Delegiert (persönliches Microsoft-Konto) |
Nicht unterstützt |
Nicht unterstützt |
| Application |
NetworkAccess.ReadWrite.All |
Nicht verfügbar. |
Wichtig
In delegierten Szenarien mit Geschäfts-, Schul- oder Unikonten muss dem angemeldeten Benutzer eine unterstützte Microsoft Entra Rolle oder eine benutzerdefinierte Rolle mit einer unterstützten Rollenberechtigung zugewiesen werden. Die folgenden Rollen mit den geringsten Berechtigungen werden für diesen Vorgang unterstützt.
- Globaler Administrator für sicheren Zugriff
- Sicherheitsadministrator
HTTP-Anforderung
PATCH /networkAccess/tlsInspectionPolicies/{tlsInspectionPolicyId}/policyRules/{tlsInspectionRuleId}
Anforderungstext
Geben Sie im Anforderungstext nur die Werte für zu aktualisierende Eigenschaften an. Vorhandene Eigenschaften, die nicht im Anforderungstext enthalten sind, behalten ihre vorherigen Werte bei oder werden basierend auf Änderungen an anderen Eigenschaftswerten neu berechnet.
In der folgenden Tabelle sind die Eigenschaften angegeben, die aktualisiert werden können.
| Eigenschaft |
Typ |
Beschreibung |
| Aktion |
microsoft.graph.networkaccess.tlsInspectionAction |
Die Aktion, die ausgeführt werden soll, wenn der Datenverkehr dieser Regel entspricht. Die möglichen Werte sind: bypass, inspect. |
| description |
Zeichenfolge |
Optionale Beschreibung, die den Zweck der Regel erläutert. |
| matchingConditions |
microsoft.graph.networkaccess.tlsInspectionMatchingConditions |
Die Bedingungen, die bestimmen, wann diese Regel auf den Datenverkehr angewendet werden soll. |
| name |
Zeichenfolge |
Der Anzeigename der Regel. |
| priority |
Int64 |
Die Priorität der Regel. Regeln werden in aufsteigender Reihenfolge der Priorität ausgewertet. Niedrigere Zahlen weisen auf eine höhere Priorität hin. |
| settings |
microsoft.graph.networkaccess.tlsInspectionRuleSettings |
Zusätzliche Einstellungen, die das Verhalten der Regel konfigurieren. |
Antwort
Wenn die Methode erfolgreich verläuft, wird der Antwortcode 204 No Content zurückgegeben.
Beispiele
Anforderung
Das folgende Beispiel zeigt eine Anfrage.
PATCH https://graph.microsoft.com/beta/networkAccess/tlsInspectionPolicies/b712c469-e7cd-e7cb-738f-94b199570b0d/policyRules/ecf99dcc-6575-4d01-83dc-3fa5a940c76b
Content-Type: application/json
{
"name": "Contoso TLS Rule 1 - Updated",
"priority": 200,
"description": "My TLS rule - Updated",
"action": "bypass",
"settings": {
"status": "disabled"
},
"matchingConditions": {
"destinations": [
{
"@odata.type": "#microsoft.graph.networkaccess.tlsInspectionFqdnDestination",
"values": [
"www.contoso.test-updated.com",
"*.contoso.org"
]
}
]
}
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models.Networkaccess;
using Microsoft.Kiota.Abstractions.Serialization;
var requestBody = new PolicyRule
{
Name = "Contoso TLS Rule 1 - Updated",
AdditionalData = new Dictionary<string, object>
{
{
"priority" , 200
},
{
"description" , "My TLS rule - Updated"
},
{
"action" , "bypass"
},
{
"settings" , new UntypedObject(new Dictionary<string, UntypedNode>
{
{
"status", new UntypedString("disabled")
},
})
},
{
"matchingConditions" , new UntypedObject(new Dictionary<string, UntypedNode>
{
{
"destinations", new UntypedArray(new List<UntypedNode>
{
new UntypedObject(new Dictionary<string, UntypedNode>
{
{
"@odata.type", new UntypedString("#microsoft.graph.networkaccess.tlsInspectionFqdnDestination")
},
{
"values", new UntypedArray(new List<UntypedNode>
{
new UntypedString("www.contoso.test-updated.com"),
new UntypedString("*.contoso.org"),
})
},
}),
})
},
})
},
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.NetworkAccess.TlsInspectionPolicies["{tlsInspectionPolicy-id}"].PolicyRules["{policyRule-id}"].PatchAsync(requestBody);
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.beta.models.networkaccess.PolicyRule policyRule = new com.microsoft.graph.beta.models.networkaccess.PolicyRule();
policyRule.setName("Contoso TLS Rule 1 - Updated");
HashMap<String, Object> additionalData = new HashMap<String, Object>();
additionalData.put("priority", 200);
additionalData.put("description", "My TLS rule - Updated");
additionalData.put("action", "bypass");
settings = new ();
settings.setStatus("disabled");
additionalData.put("settings", settings);
matchingConditions = new ();
LinkedList<Object> destinations = new LinkedList<Object>();
property = new ();
property.setOdataType("#microsoft.graph.networkaccess.tlsInspectionFqdnDestination");
LinkedList<String> values = new LinkedList<String>();
values.add("www.contoso.test-updated.com");
values.add("*.contoso.org");
property.setValues(values);
destinations.add(property);
matchingConditions.setDestinations(destinations);
additionalData.put("matchingConditions", matchingConditions);
policyRule.setAdditionalData(additionalData);
com.microsoft.graph.models.networkaccess.PolicyRule result = graphClient.networkAccess().tlsInspectionPolicies().byTlsInspectionPolicyId("{tlsInspectionPolicy-id}").policyRules().byPolicyRuleId("{policyRule-id}").patch(policyRule);
const options = {
authProvider,
};
const client = Client.init(options);
const policyRule = {
name: 'Contoso TLS Rule 1 - Updated',
priority: 200,
description: 'My TLS rule - Updated',
action: 'bypass',
settings: {
status: 'disabled'
},
matchingConditions: {
destinations: [
{
'@odata.type': '#microsoft.graph.networkaccess.tlsInspectionFqdnDestination',
values: [
'www.contoso.test-updated.com',
'*.contoso.org'
]
}
]
}
};
await client.api('/networkAccess/tlsInspectionPolicies/b712c469-e7cd-e7cb-738f-94b199570b0d/policyRules/ecf99dcc-6575-4d01-83dc-3fa5a940c76b')
.version('beta')
.update(policyRule);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Models\Networkaccess\PolicyRule;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new PolicyRule();
$requestBody->setName('Contoso TLS Rule 1 - Updated');
$additionalData = [
'priority' => 200,
'description' => 'My TLS rule - Updated',
'action' => 'bypass',
'settings' => [
'status' => 'disabled',
],
'matchingConditions' => [
'destinations' => [
[
'@odata.type' => '#microsoft.graph.networkaccess.tlsInspectionFqdnDestination',
'values' => [
'www.contoso.test-updated.com', '*.contoso.org', ],
],
],
],
];
$requestBody->setAdditionalData($additionalData);
$result = $graphServiceClient->networkAccess()->tlsInspectionPolicies()->byTlsInspectionPolicyId('tlsInspectionPolicy-id')->policyRules()->byPolicyRuleId('policyRule-id')->patch($requestBody)->wait();
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.models.networkaccess.policy_rule import PolicyRule
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = PolicyRule(
name = "Contoso TLS Rule 1 - Updated",
additional_data = {
"priority" : 200,
"description" : "My TLS rule - Updated",
"action" : "bypass",
"settings" : {
"status" : "disabled",
},
"matching_conditions" : {
"destinations" : [
{
"@odata_type" : "#microsoft.graph.networkaccess.tlsInspectionFqdnDestination",
"values" : [
"www.contoso.test-updated.com",
"*.contoso.org",
],
},
],
},
}
)
result = await graph_client.network_access.tls_inspection_policies.by_tls_inspection_policy_id('tlsInspectionPolicy-id').policy_rules.by_policy_rule_id('policyRule-id').patch(request_body)
Antwort
Das folgende Beispiel zeigt die Antwort.
HTTP/1.1 204 No Content