Sdílet prostřednictvím


PeeringServiceCollection.CreateOrUpdateAsync Method

Definition

Creates a new peering service or updates an existing peering with the specified name under the given subscription and resource group.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Peering/peeringServices/{peeringServiceName}
  • Operation Id: PeeringServices_CreateOrUpdate
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Peering.PeeringServiceResource>> CreateOrUpdateAsync (Azure.WaitUntil waitUntil, string peeringServiceName, Azure.ResourceManager.Peering.PeeringServiceData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.Peering.PeeringServiceData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Peering.PeeringServiceResource>>
override this.CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.Peering.PeeringServiceData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Peering.PeeringServiceResource>>
Public Overridable Function CreateOrUpdateAsync (waitUntil As WaitUntil, peeringServiceName As String, data As PeeringServiceData, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation(Of PeeringServiceResource))

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.

peeringServiceName
String

The name of the peering service.

data
PeeringServiceData

The properties needed to create or update a peering service.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

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

peeringServiceName or data is null.

Applies to