共用方式為


CurrentQuotaLimitBaseCollection.CreateOrUpdate Method

Definition

Create or update the quota limit for the specified resource with the requested value. To update the quota, follow these steps:

  1. Use the GET operation for quotas and usages to determine how much quota remains for the specific resource and to calculate the new quota limit. These steps are detailed in this example.
  2. Use this PUT operation to update the quota limit. Please check the URI in location header for the detailed status of the request.
  • Request Path: /{scope}/providers/Microsoft.Quota/quotas/{resourceName}
  • Operation Id: Quota_CreateOrUpdate
  • Default Api Version: 2023-06-01-preview
  • Resource: CurrentQuotaLimitBaseResource
public virtual Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Quota.CurrentQuotaLimitBaseResource> CreateOrUpdate (Azure.WaitUntil waitUntil, string resourceName, Azure.ResourceManager.Quota.CurrentQuotaLimitBaseData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.Quota.CurrentQuotaLimitBaseData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Quota.CurrentQuotaLimitBaseResource>
override this.CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.Quota.CurrentQuotaLimitBaseData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Quota.CurrentQuotaLimitBaseResource>
Public Overridable Function CreateOrUpdate (waitUntil As WaitUntil, resourceName As String, data As CurrentQuotaLimitBaseData, Optional cancellationToken As CancellationToken = Nothing) As ArmOperation(Of CurrentQuotaLimitBaseResource)

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.

resourceName
String

Resource name for a given resource provider. For example:

  • SKU name for Microsoft.Compute
  • SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
data
CurrentQuotaLimitBaseData

Quota request payload.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

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

resourceName or data is null.

Applies to