skipDnsLookupState 标志是一个布尔值,用于确定是否应在客户端执行 DNS 查找。 如果启用此标志 (true) ,则会跳过 DNS 查找,并使用客户端解析的目标 IP 地址将Microsoft 365 (M365) 流量直接转发到 Front Door。 可能的值为: enabled、 disabled。 必填。
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models.Networkaccess;
var requestBody = new ForwardingOptions
{
SkipDnsLookupState = Status.Disabled,
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.NetworkAccess.Settings.ForwardingOptions.PatchAsync(requestBody);
// 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"
graphmodelsnetworkaccess "github.com/microsoftgraph/msgraph-beta-sdk-go/models/networkaccess"
//other-imports
)
requestBody := graphmodelsnetworkaccess.NewForwardingOptions()
skipDnsLookupState := graphmodels.DISABLED_STATUS
requestBody.SetSkipDnsLookupState(&skipDnsLookupState)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
forwardingOptions, err := graphClient.NetworkAccess().Settings().ForwardingOptions().Patch(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.networkaccess.ForwardingOptions forwardingOptions = new com.microsoft.graph.beta.models.networkaccess.ForwardingOptions();
forwardingOptions.setSkipDnsLookupState(com.microsoft.graph.beta.models.networkaccess.Status.Disabled);
com.microsoft.graph.models.networkaccess.ForwardingOptions result = graphClient.networkAccess().settings().forwardingOptions().patch(forwardingOptions);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Models\Networkaccess\ForwardingOptions;
use Microsoft\Graph\Beta\Generated\Models\Networkaccess\Status;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new ForwardingOptions();
$requestBody->setSkipDnsLookupState(new Status('disabled'));
$result = $graphServiceClient->networkAccess()->settings()->forwardingOptions()->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.forwarding_options import ForwardingOptions
from msgraph_beta.generated.models.status import Status
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = ForwardingOptions(
skip_dns_lookup_state = Status.Disabled,
)
result = await graph_client.network_access.settings.forwarding_options.patch(request_body)