GatewayOperationsExtensions.GetSharedKey Method

Retrieves the shared key on the Virtual Network Gateway.

Namespace: Microsoft.WindowsAzure.Management.VirtualNetworks
Assembly: Microsoft.WindowsAzure.Management.VirtualNetworks (in Microsoft.WindowsAzure.Management.VirtualNetworks.dll)

Dim operations As IGatewayOperations
Dim virtualNetworkName As String
Dim localNetworkName As String
Dim returnValue As GatewayGetSharedKeyResponse

returnValue = GatewayOperationsExtensions.GetSharedKey(operations, virtualNetworkName, localNetworkName)

public static GatewayGetSharedKeyResponse GetSharedKey (
	IGatewayOperations operations,
	string virtualNetworkName,
	string localNetworkName
/** @attribute ExtensionAttribute() */ 
public static GatewayGetSharedKeyResponse GetSharedKey (
	IGatewayOperations operations, 
	String virtualNetworkName, 
	String localNetworkName
public static function GetSharedKey (
	operations : IGatewayOperations, 
	virtualNetworkName : String, 
	localNetworkName : String
) : GatewayGetSharedKeyResponse



The IGatewayOperations object that specifies the Virtual Network Gateway operations.


The name of the Virtual Network.


The name of the local network.

Return Value

An GatewayGetSharedKeyResponse object that contains the shared key.

For more information about retrieving the shared key, see Get Virtual Network Gateway Shared Key

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

Windows Vista, Windows 7, Windows Server 2008, Windows 8.1, Windows Server 2012 R2, Windows 8 and Windows Server 2012

Target Platforms