Share via


TrafficManagerProfileCollection.CreateOrUpdateAsync Method

Definition

Create or update a Traffic Manager profile.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}
  • Operation Id: Profiles_CreateOrUpdate
  • Default Api Version: 2022-04-01
  • Resource: TrafficManagerProfileResource
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.TrafficManager.TrafficManagerProfileResource>> CreateOrUpdateAsync (Azure.WaitUntil waitUntil, string profileName, Azure.ResourceManager.TrafficManager.TrafficManagerProfileData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.TrafficManager.TrafficManagerProfileData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.TrafficManager.TrafficManagerProfileResource>>
override this.CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.TrafficManager.TrafficManagerProfileData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.TrafficManager.TrafficManagerProfileResource>>
Public Overridable Function CreateOrUpdateAsync (waitUntil As WaitUntil, profileName As String, data As TrafficManagerProfileData, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation(Of TrafficManagerProfileResource))

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.

profileName
String

The name of the Traffic Manager profile.

data
TrafficManagerProfileData

The Traffic Manager profile parameters supplied to the CreateOrUpdate operation.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

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

profileName or data is null.

Applies to