指定した仮想ネットワーク内のピアリングを作成または更新します。
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}?api-version=2023-09-01
With optional parameters:
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}?syncRemoteAddressSpace=true&api-version=2023-09-01
URI パラメーター
名前 |
/ |
必須 |
型 |
説明 |
resourceGroupName
|
path |
True
|
string
|
リソース グループの名前。
|
subscriptionId
|
path |
True
|
string
|
Microsoft Azure サブスクリプションを一意に識別するサブスクリプションの資格情報。 サブスクリプション ID は、全ての修理依頼についてURI の一部を生じさせます。
|
virtualNetworkName
|
path |
True
|
string
|
仮想ネットワークの名前。
|
virtualNetworkPeeringName
|
path |
True
|
string
|
ピアリングの名前。
|
api-version
|
query |
True
|
string
|
クライアント API バージョン。
|
syncRemoteAddressSpace
|
query |
|
SyncRemoteAddressSpace
|
パラメーターは、更新後にリモート vNet 上の現在のアドレス空間とピアリングを同期する意図を示します。
|
要求本文
名前 |
型 |
説明 |
id
|
string
|
リソースの ID
|
name
|
string
|
リソース グループ内で一意のリソースの名前。 この名前は、リソースへのアクセスに使用できます。
|
properties.allowForwardedTraffic
|
boolean
|
ローカル仮想ネットワーク内の VM から転送されたトラフィックが、リモート仮想ネットワークで許可または禁止されるかどうか。
|
properties.allowGatewayTransit
|
boolean
|
リモート仮想ネットワークでゲートウェイ リンクを使用して、この仮想ネットワークにリンクできる場合。
|
properties.allowVirtualNetworkAccess
|
boolean
|
ローカル仮想ネットワーク空間内の VM がリモート仮想ネットワーク空間内の VM にアクセスできるかどうか。
|
properties.doNotVerifyRemoteGateways
|
boolean
|
リモート ゲートウェイのプロビジョニング状態を確認する必要がある場合。
|
properties.peeringState
|
VirtualNetworkPeeringState
|
仮想ネットワーク ピアリングの状態。
|
properties.peeringSyncLevel
|
VirtualNetworkPeeringLevel
|
仮想ネットワーク ピアリングのピアリング同期状態。
|
properties.remoteAddressSpace
|
AddressSpace
|
リモート仮想ネットワークとピアリングされたアドレス空間への参照。
|
properties.remoteBgpCommunities
|
VirtualNetworkBgpCommunities
|
リモート仮想ネットワークの Bgp コミュニティへの参照。
|
properties.remoteVirtualNetwork
|
SubResource
|
リモート仮想ネットワークへの参照。 リモート仮想ネットワークは、同じリージョンまたは異なるリージョン (プレビュー) に配置できます。 プレビューへの登録と詳細 () については、こちらを参照してくださいhttps://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-create-peering。
|
properties.remoteVirtualNetworkAddressSpace
|
AddressSpace
|
リモート仮想ネットワークの現在のアドレス空間への参照。
|
properties.useRemoteGateways
|
boolean
|
この仮想ネットワークでリモート ゲートウェイを使用できる場合。 フラグが true に設定され、リモート ピアリングでの allowGatewayTransit も true の場合、仮想ネットワークは転送のためにリモート仮想ネットワークのゲートウェイを使用します。 このフラグを true に設定できるピアリングは 1 つだけです。 仮想ネットワークにゲートウェイが既に存在する場合、このフラグを設定できません。
|
type
|
string
|
リソースの種類。
|
応答
セキュリティ
azure_auth
Azure Active Directory OAuth2 フロー。
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
名前 |
説明 |
user_impersonation
|
ユーザー アカウントの借用
|
例
Create peering
Sample Request
PUT https://management.azure.com/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet1/virtualNetworkPeerings/peer?syncRemoteAddressSpace=true&api-version=2023-09-01
{
"properties": {
"allowVirtualNetworkAccess": true,
"allowForwardedTraffic": true,
"allowGatewayTransit": false,
"useRemoteGateways": false,
"remoteVirtualNetwork": {
"id": "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2"
}
}
}
import com.azure.core.management.SubResource;
import com.azure.resourcemanager.network.fluent.models.VirtualNetworkPeeringInner;
/**
* Samples for VirtualNetworkPeerings CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/network/resource-manager/Microsoft.Network/stable/2023-09-01/examples/VirtualNetworkPeeringCreate.
* json
*/
/**
* Sample code: Create peering.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void createPeering(com.azure.resourcemanager.AzureResourceManager azure) {
azure.networks().manager().serviceClient().getVirtualNetworkPeerings().createOrUpdate("peerTest", "vnet1",
"peer",
new VirtualNetworkPeeringInner().withAllowVirtualNetworkAccess(true).withAllowForwardedTraffic(true)
.withAllowGatewayTransit(false).withUseRemoteGateways(false)
.withRemoteVirtualNetwork(new SubResource().withId(
"/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2")),
null, com.azure.core.util.Context.NONE);
}
/*
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-09-01/examples/
* VirtualNetworkPeeringCreateWithRemoteVirtualNetworkEncryption.json
*/
/**
* Sample code: Create peering with remote virtual network encryption.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void
createPeeringWithRemoteVirtualNetworkEncryption(com.azure.resourcemanager.AzureResourceManager azure) {
azure.networks().manager().serviceClient().getVirtualNetworkPeerings().createOrUpdate("peerTest", "vnet1",
"peer",
new VirtualNetworkPeeringInner().withAllowVirtualNetworkAccess(true).withAllowForwardedTraffic(true)
.withAllowGatewayTransit(false).withUseRemoteGateways(false)
.withRemoteVirtualNetwork(new SubResource().withId(
"/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2")),
null, com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.network import NetworkManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-network
# USAGE
python virtual_network_peering_create.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = NetworkManagementClient(
credential=DefaultAzureCredential(),
subscription_id="subid",
)
response = client.virtual_network_peerings.begin_create_or_update(
resource_group_name="peerTest",
virtual_network_name="vnet1",
virtual_network_peering_name="peer",
virtual_network_peering_parameters={
"properties": {
"allowForwardedTraffic": True,
"allowGatewayTransit": False,
"allowVirtualNetworkAccess": True,
"remoteVirtualNetwork": {
"id": "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2"
},
"useRemoteGateways": False,
}
},
).result()
print(response)
# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-09-01/examples/VirtualNetworkPeeringCreate.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armnetwork_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v5"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/network/resource-manager/Microsoft.Network/stable/2023-09-01/examples/VirtualNetworkPeeringCreate.json
func ExampleVirtualNetworkPeeringsClient_BeginCreateOrUpdate_createPeering() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armnetwork.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewVirtualNetworkPeeringsClient().BeginCreateOrUpdate(ctx, "peerTest", "vnet1", "peer", armnetwork.VirtualNetworkPeering{
Properties: &armnetwork.VirtualNetworkPeeringPropertiesFormat{
AllowForwardedTraffic: to.Ptr(true),
AllowGatewayTransit: to.Ptr(false),
AllowVirtualNetworkAccess: to.Ptr(true),
RemoteVirtualNetwork: &armnetwork.SubResource{
ID: to.Ptr("/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2"),
},
UseRemoteGateways: to.Ptr(false),
},
}, &armnetwork.VirtualNetworkPeeringsClientBeginCreateOrUpdateOptions{SyncRemoteAddressSpace: nil})
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.VirtualNetworkPeering = armnetwork.VirtualNetworkPeering{
// ID: to.Ptr("/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet1/virtualNetworkPeerings/peer"),
// Name: to.Ptr("peer"),
// Properties: &armnetwork.VirtualNetworkPeeringPropertiesFormat{
// AllowForwardedTraffic: to.Ptr(true),
// AllowGatewayTransit: to.Ptr(false),
// AllowVirtualNetworkAccess: to.Ptr(true),
// PeeringState: to.Ptr(armnetwork.VirtualNetworkPeeringStateInitiated),
// PeeringSyncLevel: to.Ptr(armnetwork.VirtualNetworkPeeringLevelFullyInSync),
// ProvisioningState: to.Ptr(armnetwork.ProvisioningStateSucceeded),
// RemoteAddressSpace: &armnetwork.AddressSpace{
// AddressPrefixes: []*string{
// to.Ptr("12.0.0.0/8")},
// },
// RemoteBgpCommunities: &armnetwork.VirtualNetworkBgpCommunities{
// RegionalCommunity: to.Ptr("12076:50004"),
// VirtualNetworkCommunity: to.Ptr("12076:20002"),
// },
// RemoteVirtualNetwork: &armnetwork.SubResource{
// ID: to.Ptr("/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2"),
// },
// RemoteVirtualNetworkAddressSpace: &armnetwork.AddressSpace{
// AddressPrefixes: []*string{
// to.Ptr("12.0.0.0/8")},
// },
// UseRemoteGateways: to.Ptr(false),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { NetworkManagementClient } = require("@azure/arm-network");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Creates or updates a peering in the specified virtual network.
*
* @summary Creates or updates a peering in the specified virtual network.
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-09-01/examples/VirtualNetworkPeeringCreate.json
*/
async function createPeering() {
const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid";
const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest";
const virtualNetworkName = "vnet1";
const virtualNetworkPeeringName = "peer";
const virtualNetworkPeeringParameters = {
allowForwardedTraffic: true,
allowGatewayTransit: false,
allowVirtualNetworkAccess: true,
remoteVirtualNetwork: {
id: "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2",
},
useRemoteGateways: false,
};
const credential = new DefaultAzureCredential();
const client = new NetworkManagementClient(credential, subscriptionId);
const result = await client.virtualNetworkPeerings.beginCreateOrUpdateAndWait(
resourceGroupName,
virtualNetworkName,
virtualNetworkPeeringName,
virtualNetworkPeeringParameters,
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using System;
using System.Threading.Tasks;
using Azure;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager;
using Azure.ResourceManager.Network;
using Azure.ResourceManager.Network.Models;
// Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-09-01/examples/VirtualNetworkPeeringCreate.json
// this example is just showing the usage of "VirtualNetworkPeerings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this VirtualNetworkResource created on azure
// for more information of creating VirtualNetworkResource, please refer to the document of VirtualNetworkResource
string subscriptionId = "subid";
string resourceGroupName = "peerTest";
string virtualNetworkName = "vnet1";
ResourceIdentifier virtualNetworkResourceId = VirtualNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, virtualNetworkName);
VirtualNetworkResource virtualNetwork = client.GetVirtualNetworkResource(virtualNetworkResourceId);
// get the collection of this VirtualNetworkPeeringResource
VirtualNetworkPeeringCollection collection = virtualNetwork.GetVirtualNetworkPeerings();
// invoke the operation
string virtualNetworkPeeringName = "peer";
VirtualNetworkPeeringData data = new VirtualNetworkPeeringData()
{
AllowVirtualNetworkAccess = true,
AllowForwardedTraffic = true,
AllowGatewayTransit = false,
UseRemoteGateways = false,
RemoteVirtualNetworkId = new ResourceIdentifier("/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2"),
};
ArmOperation<VirtualNetworkPeeringResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, virtualNetworkPeeringName, data);
VirtualNetworkPeeringResource result = lro.Value;
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
VirtualNetworkPeeringData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample Response
{
"id": "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet1/virtualNetworkPeerings/peer",
"name": "peer",
"properties": {
"allowVirtualNetworkAccess": true,
"allowForwardedTraffic": true,
"allowGatewayTransit": false,
"useRemoteGateways": false,
"remoteVirtualNetwork": {
"id": "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2"
},
"remoteAddressSpace": {
"addressPrefixes": [
"12.0.0.0/8"
]
},
"remoteVirtualNetworkAddressSpace": {
"addressPrefixes": [
"12.0.0.0/8"
]
},
"remoteBgpCommunities": {
"virtualNetworkCommunity": "12076:20002",
"regionalCommunity": "12076:50004"
},
"peeringState": "Initiated",
"peeringSyncLevel": "FullyInSync",
"provisioningState": "Succeeded"
}
}
{
"id": "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet1/virtualNetworkPeerings/peer",
"name": "peer",
"properties": {
"allowVirtualNetworkAccess": true,
"allowForwardedTraffic": true,
"allowGatewayTransit": false,
"useRemoteGateways": false,
"remoteVirtualNetwork": {
"id": "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2"
},
"remoteAddressSpace": {
"addressPrefixes": [
"12.0.0.0/8"
]
},
"remoteVirtualNetworkAddressSpace": {
"addressPrefixes": [
"12.0.0.0/8"
]
},
"remoteBgpCommunities": {
"virtualNetworkCommunity": "12076:20002",
"regionalCommunity": "12076:50004"
},
"peeringState": "Initiated",
"peeringSyncLevel": "FullyInSync",
"provisioningState": "Succeeded"
}
}
Create peering with remote virtual network encryption
Sample Request
PUT https://management.azure.com/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet1/virtualNetworkPeerings/peer?syncRemoteAddressSpace=true&api-version=2023-09-01
{
"properties": {
"allowVirtualNetworkAccess": true,
"allowForwardedTraffic": true,
"allowGatewayTransit": false,
"useRemoteGateways": false,
"remoteVirtualNetwork": {
"id": "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2"
}
}
}
from azure.identity import DefaultAzureCredential
from azure.mgmt.network import NetworkManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-network
# USAGE
python virtual_network_peering_create_with_remote_virtual_network_encryption.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = NetworkManagementClient(
credential=DefaultAzureCredential(),
subscription_id="subid",
)
response = client.virtual_network_peerings.begin_create_or_update(
resource_group_name="peerTest",
virtual_network_name="vnet1",
virtual_network_peering_name="peer",
virtual_network_peering_parameters={
"properties": {
"allowForwardedTraffic": True,
"allowGatewayTransit": False,
"allowVirtualNetworkAccess": True,
"remoteVirtualNetwork": {
"id": "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2"
},
"useRemoteGateways": False,
}
},
).result()
print(response)
# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-09-01/examples/VirtualNetworkPeeringCreateWithRemoteVirtualNetworkEncryption.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armnetwork_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v5"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/network/resource-manager/Microsoft.Network/stable/2023-09-01/examples/VirtualNetworkPeeringCreateWithRemoteVirtualNetworkEncryption.json
func ExampleVirtualNetworkPeeringsClient_BeginCreateOrUpdate_createPeeringWithRemoteVirtualNetworkEncryption() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armnetwork.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewVirtualNetworkPeeringsClient().BeginCreateOrUpdate(ctx, "peerTest", "vnet1", "peer", armnetwork.VirtualNetworkPeering{
Properties: &armnetwork.VirtualNetworkPeeringPropertiesFormat{
AllowForwardedTraffic: to.Ptr(true),
AllowGatewayTransit: to.Ptr(false),
AllowVirtualNetworkAccess: to.Ptr(true),
RemoteVirtualNetwork: &armnetwork.SubResource{
ID: to.Ptr("/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2"),
},
UseRemoteGateways: to.Ptr(false),
},
}, &armnetwork.VirtualNetworkPeeringsClientBeginCreateOrUpdateOptions{SyncRemoteAddressSpace: nil})
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.VirtualNetworkPeering = armnetwork.VirtualNetworkPeering{
// ID: to.Ptr("/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet1/virtualNetworkPeerings/peer"),
// Name: to.Ptr("peer"),
// Properties: &armnetwork.VirtualNetworkPeeringPropertiesFormat{
// AllowForwardedTraffic: to.Ptr(true),
// AllowGatewayTransit: to.Ptr(false),
// AllowVirtualNetworkAccess: to.Ptr(true),
// PeeringState: to.Ptr(armnetwork.VirtualNetworkPeeringStateInitiated),
// ProvisioningState: to.Ptr(armnetwork.ProvisioningStateSucceeded),
// RemoteAddressSpace: &armnetwork.AddressSpace{
// AddressPrefixes: []*string{
// to.Ptr("12.0.0.0/8")},
// },
// RemoteBgpCommunities: &armnetwork.VirtualNetworkBgpCommunities{
// RegionalCommunity: to.Ptr("12076:50004"),
// VirtualNetworkCommunity: to.Ptr("12076:20002"),
// },
// RemoteVirtualNetwork: &armnetwork.SubResource{
// ID: to.Ptr("/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2"),
// },
// RemoteVirtualNetworkEncryption: &armnetwork.VirtualNetworkEncryption{
// Enabled: to.Ptr(true),
// Enforcement: to.Ptr(armnetwork.VirtualNetworkEncryptionEnforcementAllowUnencrypted),
// },
// UseRemoteGateways: to.Ptr(false),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { NetworkManagementClient } = require("@azure/arm-network");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Creates or updates a peering in the specified virtual network.
*
* @summary Creates or updates a peering in the specified virtual network.
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-09-01/examples/VirtualNetworkPeeringCreateWithRemoteVirtualNetworkEncryption.json
*/
async function createPeeringWithRemoteVirtualNetworkEncryption() {
const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid";
const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest";
const virtualNetworkName = "vnet1";
const virtualNetworkPeeringName = "peer";
const virtualNetworkPeeringParameters = {
allowForwardedTraffic: true,
allowGatewayTransit: false,
allowVirtualNetworkAccess: true,
remoteVirtualNetwork: {
id: "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2",
},
useRemoteGateways: false,
};
const credential = new DefaultAzureCredential();
const client = new NetworkManagementClient(credential, subscriptionId);
const result = await client.virtualNetworkPeerings.beginCreateOrUpdateAndWait(
resourceGroupName,
virtualNetworkName,
virtualNetworkPeeringName,
virtualNetworkPeeringParameters,
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using System;
using System.Threading.Tasks;
using Azure;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager;
using Azure.ResourceManager.Network;
using Azure.ResourceManager.Network.Models;
// Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-09-01/examples/VirtualNetworkPeeringCreateWithRemoteVirtualNetworkEncryption.json
// this example is just showing the usage of "VirtualNetworkPeerings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this VirtualNetworkResource created on azure
// for more information of creating VirtualNetworkResource, please refer to the document of VirtualNetworkResource
string subscriptionId = "subid";
string resourceGroupName = "peerTest";
string virtualNetworkName = "vnet1";
ResourceIdentifier virtualNetworkResourceId = VirtualNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, virtualNetworkName);
VirtualNetworkResource virtualNetwork = client.GetVirtualNetworkResource(virtualNetworkResourceId);
// get the collection of this VirtualNetworkPeeringResource
VirtualNetworkPeeringCollection collection = virtualNetwork.GetVirtualNetworkPeerings();
// invoke the operation
string virtualNetworkPeeringName = "peer";
VirtualNetworkPeeringData data = new VirtualNetworkPeeringData()
{
AllowVirtualNetworkAccess = true,
AllowForwardedTraffic = true,
AllowGatewayTransit = false,
UseRemoteGateways = false,
RemoteVirtualNetworkId = new ResourceIdentifier("/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2"),
};
ArmOperation<VirtualNetworkPeeringResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, virtualNetworkPeeringName, data);
VirtualNetworkPeeringResource result = lro.Value;
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
VirtualNetworkPeeringData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample Response
{
"id": "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet1/virtualNetworkPeerings/peer",
"name": "peer",
"properties": {
"allowVirtualNetworkAccess": true,
"allowForwardedTraffic": true,
"allowGatewayTransit": false,
"useRemoteGateways": false,
"remoteVirtualNetwork": {
"id": "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2"
},
"remoteAddressSpace": {
"addressPrefixes": [
"12.0.0.0/8"
]
},
"remoteBgpCommunities": {
"virtualNetworkCommunity": "12076:20002",
"regionalCommunity": "12076:50004"
},
"remoteVirtualNetworkEncryption": {
"enabled": true,
"enforcement": "AllowUnencrypted"
},
"peeringState": "Initiated",
"provisioningState": "Succeeded"
}
}
{
"id": "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet1/virtualNetworkPeerings/peer",
"name": "peer",
"properties": {
"allowVirtualNetworkAccess": true,
"allowForwardedTraffic": true,
"allowGatewayTransit": false,
"useRemoteGateways": false,
"remoteVirtualNetwork": {
"id": "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2"
},
"remoteAddressSpace": {
"addressPrefixes": [
"12.0.0.0/8"
]
},
"remoteBgpCommunities": {
"virtualNetworkCommunity": "12076:20002",
"regionalCommunity": "12076:50004"
},
"remoteVirtualNetworkEncryption": {
"enabled": true,
"enforcement": "AllowUnencrypted"
},
"peeringState": "Initiated",
"provisioningState": "Succeeded"
}
}
Sync Peering
Sample Request
PUT https://management.azure.com/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet1/virtualNetworkPeerings/peer?syncRemoteAddressSpace=true&api-version=2023-09-01
{
"properties": {
"allowVirtualNetworkAccess": true,
"allowForwardedTraffic": true,
"allowGatewayTransit": false,
"useRemoteGateways": false,
"remoteVirtualNetwork": {
"id": "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2"
}
}
}
import com.azure.core.management.SubResource;
import com.azure.resourcemanager.network.fluent.models.VirtualNetworkPeeringInner;
import com.azure.resourcemanager.network.models.SyncRemoteAddressSpace;
/**
* Samples for VirtualNetworkPeerings CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/network/resource-manager/Microsoft.Network/stable/2023-09-01/examples/VirtualNetworkPeeringSync.
* json
*/
/**
* Sample code: Sync Peering.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void syncPeering(com.azure.resourcemanager.AzureResourceManager azure) {
azure.networks().manager().serviceClient().getVirtualNetworkPeerings().createOrUpdate("peerTest", "vnet1",
"peer",
new VirtualNetworkPeeringInner().withAllowVirtualNetworkAccess(true).withAllowForwardedTraffic(true)
.withAllowGatewayTransit(false).withUseRemoteGateways(false)
.withRemoteVirtualNetwork(new SubResource().withId(
"/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2")),
SyncRemoteAddressSpace.TRUE, com.azure.core.util.Context.NONE);
}
/*
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-09-01/examples/
* VirtualNetworkPeeringCreateWithRemoteVirtualNetworkEncryption.json
*/
/**
* Sample code: Create peering with remote virtual network encryption.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void
createPeeringWithRemoteVirtualNetworkEncryption(com.azure.resourcemanager.AzureResourceManager azure) {
azure.networks().manager().serviceClient().getVirtualNetworkPeerings().createOrUpdate("peerTest", "vnet1",
"peer",
new VirtualNetworkPeeringInner().withAllowVirtualNetworkAccess(true).withAllowForwardedTraffic(true)
.withAllowGatewayTransit(false).withUseRemoteGateways(false)
.withRemoteVirtualNetwork(new SubResource().withId(
"/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2")),
null, com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.network import NetworkManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-network
# USAGE
python virtual_network_peering_sync.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = NetworkManagementClient(
credential=DefaultAzureCredential(),
subscription_id="subid",
)
response = client.virtual_network_peerings.begin_create_or_update(
resource_group_name="peerTest",
virtual_network_name="vnet1",
virtual_network_peering_name="peer",
virtual_network_peering_parameters={
"properties": {
"allowForwardedTraffic": True,
"allowGatewayTransit": False,
"allowVirtualNetworkAccess": True,
"remoteVirtualNetwork": {
"id": "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2"
},
"useRemoteGateways": False,
}
},
).result()
print(response)
# x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-09-01/examples/VirtualNetworkPeeringSync.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armnetwork_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v5"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/network/resource-manager/Microsoft.Network/stable/2023-09-01/examples/VirtualNetworkPeeringSync.json
func ExampleVirtualNetworkPeeringsClient_BeginCreateOrUpdate_syncPeering() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armnetwork.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewVirtualNetworkPeeringsClient().BeginCreateOrUpdate(ctx, "peerTest", "vnet1", "peer", armnetwork.VirtualNetworkPeering{
Properties: &armnetwork.VirtualNetworkPeeringPropertiesFormat{
AllowForwardedTraffic: to.Ptr(true),
AllowGatewayTransit: to.Ptr(false),
AllowVirtualNetworkAccess: to.Ptr(true),
RemoteVirtualNetwork: &armnetwork.SubResource{
ID: to.Ptr("/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2"),
},
UseRemoteGateways: to.Ptr(false),
},
}, &armnetwork.VirtualNetworkPeeringsClientBeginCreateOrUpdateOptions{SyncRemoteAddressSpace: to.Ptr(armnetwork.SyncRemoteAddressSpaceTrue)})
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.VirtualNetworkPeering = armnetwork.VirtualNetworkPeering{
// ID: to.Ptr("/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet1/virtualNetworkPeerings/peer"),
// Name: to.Ptr("peer"),
// Properties: &armnetwork.VirtualNetworkPeeringPropertiesFormat{
// AllowForwardedTraffic: to.Ptr(true),
// AllowGatewayTransit: to.Ptr(false),
// AllowVirtualNetworkAccess: to.Ptr(true),
// PeeringState: to.Ptr(armnetwork.VirtualNetworkPeeringStateInitiated),
// PeeringSyncLevel: to.Ptr(armnetwork.VirtualNetworkPeeringLevelFullyInSync),
// ProvisioningState: to.Ptr(armnetwork.ProvisioningStateSucceeded),
// RemoteAddressSpace: &armnetwork.AddressSpace{
// AddressPrefixes: []*string{
// to.Ptr("12.0.0.0/8")},
// },
// RemoteBgpCommunities: &armnetwork.VirtualNetworkBgpCommunities{
// RegionalCommunity: to.Ptr("12076:50004"),
// VirtualNetworkCommunity: to.Ptr("12076:20002"),
// },
// RemoteVirtualNetwork: &armnetwork.SubResource{
// ID: to.Ptr("/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2"),
// },
// RemoteVirtualNetworkAddressSpace: &armnetwork.AddressSpace{
// AddressPrefixes: []*string{
// to.Ptr("12.0.0.0/8")},
// },
// UseRemoteGateways: to.Ptr(false),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { NetworkManagementClient } = require("@azure/arm-network");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Creates or updates a peering in the specified virtual network.
*
* @summary Creates or updates a peering in the specified virtual network.
* x-ms-original-file: specification/network/resource-manager/Microsoft.Network/stable/2023-09-01/examples/VirtualNetworkPeeringSync.json
*/
async function syncPeering() {
const subscriptionId = process.env["NETWORK_SUBSCRIPTION_ID"] || "subid";
const resourceGroupName = process.env["NETWORK_RESOURCE_GROUP"] || "peerTest";
const virtualNetworkName = "vnet1";
const virtualNetworkPeeringName = "peer";
const syncRemoteAddressSpace = "true";
const virtualNetworkPeeringParameters = {
allowForwardedTraffic: true,
allowGatewayTransit: false,
allowVirtualNetworkAccess: true,
remoteVirtualNetwork: {
id: "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2",
},
useRemoteGateways: false,
};
const options = {
syncRemoteAddressSpace,
};
const credential = new DefaultAzureCredential();
const client = new NetworkManagementClient(credential, subscriptionId);
const result = await client.virtualNetworkPeerings.beginCreateOrUpdateAndWait(
resourceGroupName,
virtualNetworkName,
virtualNetworkPeeringName,
virtualNetworkPeeringParameters,
options,
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using System;
using System.Threading.Tasks;
using Azure;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager;
using Azure.ResourceManager.Network;
using Azure.ResourceManager.Network.Models;
// Generated from example definition: specification/network/resource-manager/Microsoft.Network/stable/2023-09-01/examples/VirtualNetworkPeeringSync.json
// this example is just showing the usage of "VirtualNetworkPeerings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this VirtualNetworkResource created on azure
// for more information of creating VirtualNetworkResource, please refer to the document of VirtualNetworkResource
string subscriptionId = "subid";
string resourceGroupName = "peerTest";
string virtualNetworkName = "vnet1";
ResourceIdentifier virtualNetworkResourceId = VirtualNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, virtualNetworkName);
VirtualNetworkResource virtualNetwork = client.GetVirtualNetworkResource(virtualNetworkResourceId);
// get the collection of this VirtualNetworkPeeringResource
VirtualNetworkPeeringCollection collection = virtualNetwork.GetVirtualNetworkPeerings();
// invoke the operation
string virtualNetworkPeeringName = "peer";
VirtualNetworkPeeringData data = new VirtualNetworkPeeringData()
{
AllowVirtualNetworkAccess = true,
AllowForwardedTraffic = true,
AllowGatewayTransit = false,
UseRemoteGateways = false,
RemoteVirtualNetworkId = new ResourceIdentifier("/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2"),
};
SyncRemoteAddressSpace? syncRemoteAddressSpace = SyncRemoteAddressSpace.True;
ArmOperation<VirtualNetworkPeeringResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, virtualNetworkPeeringName, data, syncRemoteAddressSpace: syncRemoteAddressSpace);
VirtualNetworkPeeringResource result = lro.Value;
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
VirtualNetworkPeeringData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample Response
{
"id": "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet1/virtualNetworkPeerings/peer",
"name": "peer",
"properties": {
"allowVirtualNetworkAccess": true,
"allowForwardedTraffic": true,
"allowGatewayTransit": false,
"useRemoteGateways": false,
"remoteVirtualNetwork": {
"id": "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2"
},
"remoteAddressSpace": {
"addressPrefixes": [
"12.0.0.0/8"
]
},
"remoteVirtualNetworkAddressSpace": {
"addressPrefixes": [
"12.0.0.0/8"
]
},
"remoteBgpCommunities": {
"virtualNetworkCommunity": "12076:20002",
"regionalCommunity": "12076:50004"
},
"peeringState": "Initiated",
"peeringSyncLevel": "FullyInSync",
"provisioningState": "Succeeded"
}
}
{
"id": "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet1/virtualNetworkPeerings/peer",
"name": "peer",
"properties": {
"allowVirtualNetworkAccess": true,
"allowForwardedTraffic": true,
"allowGatewayTransit": false,
"useRemoteGateways": false,
"remoteVirtualNetwork": {
"id": "/subscriptions/subid/resourceGroups/peerTest/providers/Microsoft.Network/virtualNetworks/vnet2"
},
"remoteAddressSpace": {
"addressPrefixes": [
"12.0.0.0/8"
]
},
"remoteVirtualNetworkAddressSpace": {
"addressPrefixes": [
"12.0.0.0/8"
]
},
"remoteBgpCommunities": {
"virtualNetworkCommunity": "12076:20002",
"regionalCommunity": "12076:50004"
},
"peeringState": "Initiated",
"peeringSyncLevel": "FullyInSync",
"provisioningState": "Succeeded"
}
}
定義
AddressSpace
AddressSpace には、仮想ネットワークのサブネットで使用できる IP アドレス範囲の配列が含まれています。
名前 |
型 |
説明 |
addressPrefixes
|
string[]
|
CIDR 表記でこの仮想ネットワーク用に予約されているアドレス ブロックの一覧。
|
CloudError
サービスからのエラー応答。
CloudErrorBody
サービスからのエラー応答。
名前 |
型 |
説明 |
code
|
string
|
エラーの識別子。 コードは不変であり、プログラムによって使用されることを意図しています。
|
details
|
CloudErrorBody[]
|
エラーに関するその他の詳細の一覧。
|
message
|
string
|
ユーザー インターフェイスでの表示に適したエラーを説明するメッセージ。
|
target
|
string
|
特定のエラーのターゲット。 たとえば、エラーが発生したプロパティの名前です。
|
ProvisioningState
現在のプロビジョニング状態。
名前 |
型 |
説明 |
Deleting
|
string
|
|
Failed
|
string
|
|
Succeeded
|
string
|
|
Updating
|
string
|
|
SubResource
別のサブリソースへの参照。
名前 |
型 |
説明 |
id
|
string
|
リソースの ID
|
SyncRemoteAddressSpace
パラメーターは、更新後にリモート vNet 上の現在のアドレス空間とピアリングを同期する意図を示します。
VirtualNetworkBgpCommunities
ExpressRoute 経由で送信された Bgp コミュニティと、この VNET 内のプレフィックスに対応する各ルート。
名前 |
型 |
説明 |
regionalCommunity
|
string
|
仮想ネットワークのリージョンに関連付けられている BGP コミュニティ。
|
virtualNetworkCommunity
|
string
|
仮想ネットワークに関連付けられている BGP コミュニティ。
|
VirtualNetworkEncryption
仮想ネットワークで暗号化が有効になっているかどうか、および暗号化されていない VM が暗号化された VNet で許可されているかどうかを示します。
VirtualNetworkEncryptionEnforcement
暗号化された VNet で暗号化をサポートしていない VM が許可されている場合
名前 |
型 |
説明 |
AllowUnencrypted
|
string
|
|
DropUnencrypted
|
string
|
|
VirtualNetworkPeering
仮想ネットワーク リソース内のピアリング。
名前 |
型 |
説明 |
etag
|
string
|
リソースが更新されるたびに変更される一意の読み取り専用文字列。
|
id
|
string
|
リソースの ID
|
name
|
string
|
リソース グループ内で一意のリソースの名前。 この名前は、リソースへのアクセスに使用できます。
|
properties.allowForwardedTraffic
|
boolean
|
ローカル仮想ネットワーク内の VM から転送されたトラフィックが、リモート仮想ネットワークで許可または禁止されるかどうか。
|
properties.allowGatewayTransit
|
boolean
|
リモート仮想ネットワークでゲートウェイ リンクを使用して、この仮想ネットワークにリンクできる場合。
|
properties.allowVirtualNetworkAccess
|
boolean
|
ローカル仮想ネットワーク空間内の VM がリモート仮想ネットワーク空間内の VM にアクセスできるかどうか。
|
properties.doNotVerifyRemoteGateways
|
boolean
|
リモート ゲートウェイのプロビジョニング状態を確認する必要がある場合。
|
properties.peeringState
|
VirtualNetworkPeeringState
|
仮想ネットワーク ピアリングの状態。
|
properties.peeringSyncLevel
|
VirtualNetworkPeeringLevel
|
仮想ネットワーク ピアリングのピアリング同期状態。
|
properties.provisioningState
|
ProvisioningState
|
仮想ネットワーク ピアリング リソースのプロビジョニング状態。
|
properties.remoteAddressSpace
|
AddressSpace
|
リモート仮想ネットワークとピアリングされたアドレス空間への参照。
|
properties.remoteBgpCommunities
|
VirtualNetworkBgpCommunities
|
リモート仮想ネットワークの Bgp コミュニティへの参照。
|
properties.remoteVirtualNetwork
|
SubResource
|
リモート仮想ネットワークへの参照。 リモート仮想ネットワークは、同じリージョンまたは異なるリージョン (プレビュー) に配置できます。 プレビューへの登録と詳細 () については、こちらを参照してくださいhttps://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-create-peering。
|
properties.remoteVirtualNetworkAddressSpace
|
AddressSpace
|
リモート仮想ネットワークの現在のアドレス空間への参照。
|
properties.remoteVirtualNetworkEncryption
|
VirtualNetworkEncryption
|
リモート仮想ネットワークの暗号化への参照
|
properties.resourceGuid
|
string
|
Virtual Network ピアリング リソースの resourceGuid プロパティ。
|
properties.useRemoteGateways
|
boolean
|
この仮想ネットワークでリモート ゲートウェイを使用できる場合。 フラグが true に設定され、リモート ピアリングでの allowGatewayTransit も true の場合、仮想ネットワークは転送のためにリモート仮想ネットワークのゲートウェイを使用します。 このフラグを true に設定できるピアリングは 1 つだけです。 仮想ネットワークにゲートウェイが既に存在する場合、このフラグを設定できません。
|
type
|
string
|
リソースの種類。
|
VirtualNetworkPeeringLevel
仮想ネットワーク ピアリングのピアリング同期状態。
名前 |
型 |
説明 |
FullyInSync
|
string
|
|
LocalAndRemoteNotInSync
|
string
|
|
LocalNotInSync
|
string
|
|
RemoteNotInSync
|
string
|
|
VirtualNetworkPeeringState
仮想ネットワーク ピアリングの状態。
名前 |
型 |
説明 |
Connected
|
string
|
|
Disconnected
|
string
|
|
Initiated
|
string
|
|