Share via


VpnLinkConnectionSharedKeyResource.CreateOrUpdateAsync Method

Definition

Sets or auto generates the shared key based on the user input. If users give a shared key value, it does the set operation. If key length is given, the operation creates a random key of the pre-defined length.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}/sharedKeys/default
  • Operation Id: VpnLinkConnections_SetOrInitDefaultSharedKey
  • Default Api Version: 2024-03-01
  • Resource: VpnLinkConnectionSharedKeyResource
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Network.VpnLinkConnectionSharedKeyResource>> CreateOrUpdateAsync (Azure.WaitUntil waitUntil, Azure.ResourceManager.Network.VpnLinkConnectionSharedKeyData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateAsync : Azure.WaitUntil * Azure.ResourceManager.Network.VpnLinkConnectionSharedKeyData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Network.VpnLinkConnectionSharedKeyResource>>
override this.CreateOrUpdateAsync : Azure.WaitUntil * Azure.ResourceManager.Network.VpnLinkConnectionSharedKeyData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Network.VpnLinkConnectionSharedKeyResource>>
Public Overridable Function CreateOrUpdateAsync (waitUntil As WaitUntil, data As VpnLinkConnectionSharedKeyData, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation(Of VpnLinkConnectionSharedKeyResource))

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.

data
VpnLinkConnectionSharedKeyData

Parameters supplied to set or auto generate the shared key for the vpn link connection.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

data is null.

Applies to