다음을 통해 공유


ConsumptionBudgetCollection.CreateOrUpdate Method

Definition

The operation to create or update a budget. You can optionally provide an eTag if desired as a form of concurrency control. To obtain the latest eTag for a given budget, perform a get operation prior to your put operation.

  • Request Path: /{scope}/providers/Microsoft.Consumption/budgets/{budgetName}
  • Operation Id: Budgets_CreateOrUpdate
public virtual Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Consumption.ConsumptionBudgetResource> CreateOrUpdate (Azure.WaitUntil waitUntil, string budgetName, Azure.ResourceManager.Consumption.ConsumptionBudgetData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.Consumption.ConsumptionBudgetData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Consumption.ConsumptionBudgetResource>
override this.CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.Consumption.ConsumptionBudgetData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Consumption.ConsumptionBudgetResource>
Public Overridable Function CreateOrUpdate (waitUntil As WaitUntil, budgetName As String, data As ConsumptionBudgetData, Optional cancellationToken As CancellationToken = Nothing) As ArmOperation(Of ConsumptionBudgetResource)

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.

budgetName
String

Budget Name.

data
ConsumptionBudgetData

Parameters supplied to the Create Budget operation.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

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

budgetName or data is null.

Applies to