Share via


VirtualNetworkGatewayConnectionResource.SetSharedKeyAsync Method

Definition

The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey
  • Operation Id: VirtualNetworkGatewayConnections_SetSharedKey
  • Default Api Version: 2024-03-01
  • Resource: VirtualNetworkGatewayConnectionResource
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Network.Models.ConnectionSharedKey>> SetSharedKeyAsync (Azure.WaitUntil waitUntil, Azure.ResourceManager.Network.Models.ConnectionSharedKey connectionSharedKey, System.Threading.CancellationToken cancellationToken = default);
abstract member SetSharedKeyAsync : Azure.WaitUntil * Azure.ResourceManager.Network.Models.ConnectionSharedKey * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Network.Models.ConnectionSharedKey>>
override this.SetSharedKeyAsync : Azure.WaitUntil * Azure.ResourceManager.Network.Models.ConnectionSharedKey * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Network.Models.ConnectionSharedKey>>
Public Overridable Function SetSharedKeyAsync (waitUntil As WaitUntil, connectionSharedKey As ConnectionSharedKey, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation(Of ConnectionSharedKey))

Parameters

waitUntil
WaitUntil

Completed if the method should wait to return until the long-running operation has completed on the service; Started if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.

connectionSharedKey
ConnectionSharedKey

Parameters supplied to the Begin Set Virtual Network Gateway connection Shared key operation throughNetwork resource provider.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

connectionSharedKey is null.

Applies to