CreditSourceCollection.CreateOrUpdate Method

Definition

Create a credit source.

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BillingBenefits/credits/{creditName}/sources/{sourceName}.
  • Operation Id. : CreditSources_Create.
  • Default Api Version. : 2025-12-01-preview.
public virtual Azure.ResourceManager.ArmOperation<Azure.ResourceManager.BillingBenefits.CreditSourceResource> CreateOrUpdate(Azure.WaitUntil waitUntil, string sourceName, Azure.ResourceManager.BillingBenefits.CreditSourceData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.BillingBenefits.CreditSourceData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.BillingBenefits.CreditSourceResource>
override this.CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.BillingBenefits.CreditSourceData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.BillingBenefits.CreditSourceResource>
Public Overridable Function CreateOrUpdate (waitUntil As WaitUntil, sourceName As String, data As CreditSourceData, Optional cancellationToken As CancellationToken = Nothing) As ArmOperation(Of CreditSourceResource)

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.

sourceName
String

Name of the credit source.

data
CreditSourceData

Credit source create request.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

sourceName or data is null.

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

Applies to