你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

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-05-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