BillingProfileCollection.CreateOrUpdateAsync Method

Definition

Creates or updates a billing profile. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement and Microsoft Partner Agreement. If you are a MCA Individual (Pay-as-you-go) customer, then please use the Azure portal experience to create the billing profile.

  • Request Path: /providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}
  • Operation Id: BillingProfiles_CreateOrUpdate
  • Default Api Version: 2024-04-01
  • Resource: BillingProfileResource
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Billing.BillingProfileResource>> CreateOrUpdateAsync (Azure.WaitUntil waitUntil, string billingProfileName, Azure.ResourceManager.Billing.BillingProfileData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.Billing.BillingProfileData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Billing.BillingProfileResource>>
override this.CreateOrUpdateAsync : Azure.WaitUntil * string * Azure.ResourceManager.Billing.BillingProfileData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Billing.BillingProfileResource>>
Public Overridable Function CreateOrUpdateAsync (waitUntil As WaitUntil, billingProfileName As String, data As BillingProfileData, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ArmOperation(Of BillingProfileResource))

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.

billingProfileName
String

The ID that uniquely identifies a billing profile.

data
BillingProfileData

A billing profile.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

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

billingProfileName or data is null.

Applies to