Class VirtualNetworkPeeringInner
java.lang.Object
com.azure.core.management.SubResource
com.azure.resourcemanager.network.fluent.models.VirtualNetworkPeeringInner
- All Implemented Interfaces:
com.azure.json.JsonSerializable<com.azure.core.management.SubResource>
public final class VirtualNetworkPeeringInner
extends com.azure.core.management.SubResource
Peerings in a virtual network resource.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of VirtualNetworkPeeringInner class. -
Method Summary
Modifier and TypeMethodDescriptionGet the allowForwardedTraffic property: Whether the forwarded traffic from the VMs in the local virtual network will be allowed/disallowed in remote virtual network.Get the allowGatewayTransit property: If gateway links can be used in remote virtual networking to link to this virtual network.Get the allowVirtualNetworkAccess property: Whether the VMs in the local virtual network space would be able to access the VMs in remote virtual network space.Get the doNotVerifyRemoteGateways property: If we need to verify the provisioning state of the remote gateway.Get the enableOnlyIPv6Peering property: Whether only Ipv6 address space is peered for subnet peering.etag()Get the etag property: A unique read-only string that changes whenever the resource is updated.static VirtualNetworkPeeringInnerfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of VirtualNetworkPeeringInner from the JsonReader.Get the localAddressSpace property: The local address space of the local virtual network that is peered.Get the localSubnetNames property: List of local subnet names that are subnet peered with remote virtual network.Get the localVirtualNetworkAddressSpace property: The current local address space of the local virtual network that is peered.name()Get the name property: The name of the resource that is unique within a resource group.Get the peerCompleteVnets property: Whether complete virtual network address space is peered.Get the peeringState property: The status of the virtual network peering.Get the peeringSyncLevel property: The peering sync status of the virtual network peering.Get the provisioningState property: The provisioning state of the virtual network peering resource.Get the remoteAddressSpace property: The reference to the address space peered with the remote virtual network.Get the remoteBgpCommunities property: The reference to the remote virtual network's Bgp Communities.Get the remoteSubnetNames property: List of remote subnet names from remote virtual network that are subnet peered.com.azure.core.management.SubResourceGet the remoteVirtualNetwork property: The reference to the remote virtual network.Get the remoteVirtualNetworkAddressSpace property: The reference to the current address space of the remote virtual network.Get the remoteVirtualNetworkEncryption property: The reference to the remote virtual network's encryption.Get the resourceGuid property: The resourceGuid property of the Virtual Network peering resource.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) type()Get the type property: Resource type.Get the useRemoteGateways property: If remote gateways can be used on this virtual network.voidvalidate()Validates the instance.withAllowForwardedTraffic(Boolean allowForwardedTraffic) Set the allowForwardedTraffic property: Whether the forwarded traffic from the VMs in the local virtual network will be allowed/disallowed in remote virtual network.withAllowGatewayTransit(Boolean allowGatewayTransit) Set the allowGatewayTransit property: If gateway links can be used in remote virtual networking to link to this virtual network.withAllowVirtualNetworkAccess(Boolean allowVirtualNetworkAccess) Set the allowVirtualNetworkAccess property: Whether the VMs in the local virtual network space would be able to access the VMs in remote virtual network space.withDoNotVerifyRemoteGateways(Boolean doNotVerifyRemoteGateways) Set the doNotVerifyRemoteGateways property: If we need to verify the provisioning state of the remote gateway.withEnableOnlyIPv6Peering(Boolean enableOnlyIPv6Peering) Set the enableOnlyIPv6Peering property: Whether only Ipv6 address space is peered for subnet peering.withLocalAddressSpace(AddressSpace localAddressSpace) Set the localAddressSpace property: The local address space of the local virtual network that is peered.withLocalSubnetNames(List<String> localSubnetNames) Set the localSubnetNames property: List of local subnet names that are subnet peered with remote virtual network.withLocalVirtualNetworkAddressSpace(AddressSpace localVirtualNetworkAddressSpace) Set the localVirtualNetworkAddressSpace property: The current local address space of the local virtual network that is peered.Set the name property: The name of the resource that is unique within a resource group.withPeerCompleteVnets(Boolean peerCompleteVnets) Set the peerCompleteVnets property: Whether complete virtual network address space is peered.withPeeringState(VirtualNetworkPeeringState peeringState) Set the peeringState property: The status of the virtual network peering.withPeeringSyncLevel(VirtualNetworkPeeringLevel peeringSyncLevel) Set the peeringSyncLevel property: The peering sync status of the virtual network peering.withRemoteAddressSpace(AddressSpace remoteAddressSpace) Set the remoteAddressSpace property: The reference to the address space peered with the remote virtual network.withRemoteBgpCommunities(VirtualNetworkBgpCommunities remoteBgpCommunities) Set the remoteBgpCommunities property: The reference to the remote virtual network's Bgp Communities.withRemoteSubnetNames(List<String> remoteSubnetNames) Set the remoteSubnetNames property: List of remote subnet names from remote virtual network that are subnet peered.withRemoteVirtualNetwork(com.azure.core.management.SubResource remoteVirtualNetwork) Set the remoteVirtualNetwork property: The reference to the remote virtual network.withRemoteVirtualNetworkAddressSpace(AddressSpace remoteVirtualNetworkAddressSpace) Set the remoteVirtualNetworkAddressSpace property: The reference to the current address space of the remote virtual network.Set the type property: Resource type.withUseRemoteGateways(Boolean useRemoteGateways) Set the useRemoteGateways property: If remote gateways can be used on this virtual network.Methods inherited from class com.azure.core.management.SubResource
idMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
VirtualNetworkPeeringInner
public VirtualNetworkPeeringInner()Creates an instance of VirtualNetworkPeeringInner class.
-
-
Method Details
-
name
Get the name property: The name of the resource that is unique within a resource group. This name can be used to access the resource.- Returns:
- the name value.
-
withName
Set the name property: The name of the resource that is unique within a resource group. This name can be used to access the resource.- Parameters:
name- the name value to set.- Returns:
- the VirtualNetworkPeeringInner object itself.
-
etag
Get the etag property: A unique read-only string that changes whenever the resource is updated.- Returns:
- the etag value.
-
type
Get the type property: Resource type.- Returns:
- the type value.
-
withType
Set the type property: Resource type.- Parameters:
type- the type value to set.- Returns:
- the VirtualNetworkPeeringInner object itself.
-
withId
- Overrides:
withIdin classcom.azure.core.management.SubResource
-
allowVirtualNetworkAccess
Get the allowVirtualNetworkAccess property: Whether the VMs in the local virtual network space would be able to access the VMs in remote virtual network space.- Returns:
- the allowVirtualNetworkAccess value.
-
withAllowVirtualNetworkAccess
Set the allowVirtualNetworkAccess property: Whether the VMs in the local virtual network space would be able to access the VMs in remote virtual network space.- Parameters:
allowVirtualNetworkAccess- the allowVirtualNetworkAccess value to set.- Returns:
- the VirtualNetworkPeeringInner object itself.
-
allowForwardedTraffic
Get the allowForwardedTraffic property: Whether the forwarded traffic from the VMs in the local virtual network will be allowed/disallowed in remote virtual network.- Returns:
- the allowForwardedTraffic value.
-
withAllowForwardedTraffic
Set the allowForwardedTraffic property: Whether the forwarded traffic from the VMs in the local virtual network will be allowed/disallowed in remote virtual network.- Parameters:
allowForwardedTraffic- the allowForwardedTraffic value to set.- Returns:
- the VirtualNetworkPeeringInner object itself.
-
allowGatewayTransit
Get the allowGatewayTransit property: If gateway links can be used in remote virtual networking to link to this virtual network.- Returns:
- the allowGatewayTransit value.
-
withAllowGatewayTransit
Set the allowGatewayTransit property: If gateway links can be used in remote virtual networking to link to this virtual network.- Parameters:
allowGatewayTransit- the allowGatewayTransit value to set.- Returns:
- the VirtualNetworkPeeringInner object itself.
-
useRemoteGateways
Get the useRemoteGateways property: If remote gateways can be used on this virtual network. If the flag is set to true, and allowGatewayTransit on remote peering is also true, virtual network will use gateways of remote virtual network for transit. Only one peering can have this flag set to true. This flag cannot be set if virtual network already has a gateway.- Returns:
- the useRemoteGateways value.
-
withUseRemoteGateways
Set the useRemoteGateways property: If remote gateways can be used on this virtual network. If the flag is set to true, and allowGatewayTransit on remote peering is also true, virtual network will use gateways of remote virtual network for transit. Only one peering can have this flag set to true. This flag cannot be set if virtual network already has a gateway.- Parameters:
useRemoteGateways- the useRemoteGateways value to set.- Returns:
- the VirtualNetworkPeeringInner object itself.
-
remoteVirtualNetwork
public com.azure.core.management.SubResource remoteVirtualNetwork()Get the remoteVirtualNetwork property: The reference to the remote virtual network. The remote virtual network can be in the same or different region (preview). See here to register for the preview and learn more (https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-create-peering).- Returns:
- the remoteVirtualNetwork value.
-
withRemoteVirtualNetwork
public VirtualNetworkPeeringInner withRemoteVirtualNetwork(com.azure.core.management.SubResource remoteVirtualNetwork) Set the remoteVirtualNetwork property: The reference to the remote virtual network. The remote virtual network can be in the same or different region (preview). See here to register for the preview and learn more (https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-create-peering).- Parameters:
remoteVirtualNetwork- the remoteVirtualNetwork value to set.- Returns:
- the VirtualNetworkPeeringInner object itself.
-
localAddressSpace
Get the localAddressSpace property: The local address space of the local virtual network that is peered.- Returns:
- the localAddressSpace value.
-
withLocalAddressSpace
Set the localAddressSpace property: The local address space of the local virtual network that is peered.- Parameters:
localAddressSpace- the localAddressSpace value to set.- Returns:
- the VirtualNetworkPeeringInner object itself.
-
localVirtualNetworkAddressSpace
Get the localVirtualNetworkAddressSpace property: The current local address space of the local virtual network that is peered.- Returns:
- the localVirtualNetworkAddressSpace value.
-
withLocalVirtualNetworkAddressSpace
public VirtualNetworkPeeringInner withLocalVirtualNetworkAddressSpace(AddressSpace localVirtualNetworkAddressSpace) Set the localVirtualNetworkAddressSpace property: The current local address space of the local virtual network that is peered.- Parameters:
localVirtualNetworkAddressSpace- the localVirtualNetworkAddressSpace value to set.- Returns:
- the VirtualNetworkPeeringInner object itself.
-
remoteAddressSpace
Get the remoteAddressSpace property: The reference to the address space peered with the remote virtual network.- Returns:
- the remoteAddressSpace value.
-
withRemoteAddressSpace
Set the remoteAddressSpace property: The reference to the address space peered with the remote virtual network.- Parameters:
remoteAddressSpace- the remoteAddressSpace value to set.- Returns:
- the VirtualNetworkPeeringInner object itself.
-
remoteVirtualNetworkAddressSpace
Get the remoteVirtualNetworkAddressSpace property: The reference to the current address space of the remote virtual network.- Returns:
- the remoteVirtualNetworkAddressSpace value.
-
withRemoteVirtualNetworkAddressSpace
public VirtualNetworkPeeringInner withRemoteVirtualNetworkAddressSpace(AddressSpace remoteVirtualNetworkAddressSpace) Set the remoteVirtualNetworkAddressSpace property: The reference to the current address space of the remote virtual network.- Parameters:
remoteVirtualNetworkAddressSpace- the remoteVirtualNetworkAddressSpace value to set.- Returns:
- the VirtualNetworkPeeringInner object itself.
-
remoteBgpCommunities
Get the remoteBgpCommunities property: The reference to the remote virtual network's Bgp Communities.- Returns:
- the remoteBgpCommunities value.
-
withRemoteBgpCommunities
public VirtualNetworkPeeringInner withRemoteBgpCommunities(VirtualNetworkBgpCommunities remoteBgpCommunities) Set the remoteBgpCommunities property: The reference to the remote virtual network's Bgp Communities.- Parameters:
remoteBgpCommunities- the remoteBgpCommunities value to set.- Returns:
- the VirtualNetworkPeeringInner object itself.
-
remoteVirtualNetworkEncryption
Get the remoteVirtualNetworkEncryption property: The reference to the remote virtual network's encryption.- Returns:
- the remoteVirtualNetworkEncryption value.
-
peeringState
Get the peeringState property: The status of the virtual network peering.- Returns:
- the peeringState value.
-
withPeeringState
Set the peeringState property: The status of the virtual network peering.- Parameters:
peeringState- the peeringState value to set.- Returns:
- the VirtualNetworkPeeringInner object itself.
-
peeringSyncLevel
Get the peeringSyncLevel property: The peering sync status of the virtual network peering.- Returns:
- the peeringSyncLevel value.
-
withPeeringSyncLevel
Set the peeringSyncLevel property: The peering sync status of the virtual network peering.- Parameters:
peeringSyncLevel- the peeringSyncLevel value to set.- Returns:
- the VirtualNetworkPeeringInner object itself.
-
provisioningState
Get the provisioningState property: The provisioning state of the virtual network peering resource.- Returns:
- the provisioningState value.
-
doNotVerifyRemoteGateways
Get the doNotVerifyRemoteGateways property: If we need to verify the provisioning state of the remote gateway.- Returns:
- the doNotVerifyRemoteGateways value.
-
withDoNotVerifyRemoteGateways
Set the doNotVerifyRemoteGateways property: If we need to verify the provisioning state of the remote gateway.- Parameters:
doNotVerifyRemoteGateways- the doNotVerifyRemoteGateways value to set.- Returns:
- the VirtualNetworkPeeringInner object itself.
-
resourceGuid
Get the resourceGuid property: The resourceGuid property of the Virtual Network peering resource.- Returns:
- the resourceGuid value.
-
peerCompleteVnets
Get the peerCompleteVnets property: Whether complete virtual network address space is peered.- Returns:
- the peerCompleteVnets value.
-
withPeerCompleteVnets
Set the peerCompleteVnets property: Whether complete virtual network address space is peered.- Parameters:
peerCompleteVnets- the peerCompleteVnets value to set.- Returns:
- the VirtualNetworkPeeringInner object itself.
-
enableOnlyIPv6Peering
Get the enableOnlyIPv6Peering property: Whether only Ipv6 address space is peered for subnet peering.- Returns:
- the enableOnlyIPv6Peering value.
-
withEnableOnlyIPv6Peering
Set the enableOnlyIPv6Peering property: Whether only Ipv6 address space is peered for subnet peering.- Parameters:
enableOnlyIPv6Peering- the enableOnlyIPv6Peering value to set.- Returns:
- the VirtualNetworkPeeringInner object itself.
-
localSubnetNames
Get the localSubnetNames property: List of local subnet names that are subnet peered with remote virtual network.- Returns:
- the localSubnetNames value.
-
withLocalSubnetNames
Set the localSubnetNames property: List of local subnet names that are subnet peered with remote virtual network.- Parameters:
localSubnetNames- the localSubnetNames value to set.- Returns:
- the VirtualNetworkPeeringInner object itself.
-
remoteSubnetNames
Get the remoteSubnetNames property: List of remote subnet names from remote virtual network that are subnet peered.- Returns:
- the remoteSubnetNames value.
-
withRemoteSubnetNames
Set the remoteSubnetNames property: List of remote subnet names from remote virtual network that are subnet peered.- Parameters:
remoteSubnetNames- the remoteSubnetNames value to set.- Returns:
- the VirtualNetworkPeeringInner object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<com.azure.core.management.SubResource>- Overrides:
toJsonin classcom.azure.core.management.SubResource- Throws:
IOException
-
fromJson
public static VirtualNetworkPeeringInner fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of VirtualNetworkPeeringInner from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of VirtualNetworkPeeringInner if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IOException- If an error occurs while reading the VirtualNetworkPeeringInner.
-