共用方式為


PublicIPPrefixCollection.CreateOrUpdateAsync Method

Definition

Creates or updates a static or dynamic public IP prefix.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}
  • Operation Id: PublicIPPrefixes_CreateOrUpdate
  • Default Api Version: 2024-03-01
  • Resource: PublicIPPrefixResource
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Network.PublicIPPrefixResource>> CreateOrUpdateAsync (Azure.WaitUntil waitUntil, string publicIPPrefixName, Azure.ResourceManager.Network.PublicIPPrefixData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.Network.PublicIPPrefixData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Network.PublicIPPrefixResource>>
override this.CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.Network.PublicIPPrefixData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Network.PublicIPPrefixResource>>
Public Overridable Function CreateOrUpdateAsync (waitUntil As WaitUntil, publicIPPrefixName As String, data As PublicIPPrefixData, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation(Of PublicIPPrefixResource))

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.

publicIPPrefixName
String

The name of the public IP prefix.

data
PublicIPPrefixData

Parameters supplied to the create or update public IP prefix operation.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

publicIPPrefixName is an empty string, and was expected to be non-empty.

publicIPPrefixName or data is null.

Applies to