Quota.GroupQuotaLocationSettingsCreateOrUpdateViaJsonString Method

Definition

Enables the GroupQuotas enforcement for the resource provider and the location specified. The resource provider will start using the group quotas as the overall quota for the subscriptions included in the GroupQuota. The subscriptions cannot request quota at subscription level since it is now part of an enforced group. The subscriptions share the GroupQuotaLimits assigned to the GroupQuota. If the GroupQuotaLimits is used, then submit a groupQuotaLimit request for the specific resource - provider/location/resource. Once the GroupQuota Enforcement is enabled then, it cannot be deleted or reverted back. To disable GroupQuota Enforcement

  1. Remove all the subscriptions from the groupQuota using the delete API for Subscriptions (Check the example - GroupQuotaSubscriptions_Delete).
  2. Then delete the GroupQuota (Check the example - GroupQuotas_Delete).
public System.Threading.Tasks.Task GroupQuotaLocationSettingsCreateOrUpdateViaJsonString(string managementGroupId, string groupQuotaName, string resourceProviderName, string location, string jsonString, Func<System.Net.Http.HttpResponseMessage,System.Threading.Tasks.Task<Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IGroupQuotasEnforcementStatus>,System.Threading.Tasks.Task> onOk, Func<System.Net.Http.HttpResponseMessage,System.Threading.Tasks.Task<Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IErrorResponse>,System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.ISendAsync sender);
member this.GroupQuotaLocationSettingsCreateOrUpdateViaJsonString : string * string * string * string * string * Func<System.Net.Http.HttpResponseMessage, System.Threading.Tasks.Task<Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IGroupQuotasEnforcementStatus>, System.Threading.Tasks.Task> * Func<System.Net.Http.HttpResponseMessage, System.Threading.Tasks.Task<Microsoft.Azure.PowerShell.Cmdlets.Quota.Models.IErrorResponse>, System.Threading.Tasks.Task> * Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.IEventListener * Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.ISendAsync -> System.Threading.Tasks.Task
Public Function GroupQuotaLocationSettingsCreateOrUpdateViaJsonString (managementGroupId As String, groupQuotaName As String, resourceProviderName As String, location As String, jsonString As String, onOk As Func(Of HttpResponseMessage, Task(Of IGroupQuotasEnforcementStatus), Task), onDefault As Func(Of HttpResponseMessage, Task(Of IErrorResponse), Task), eventListener As IEventListener, sender As ISendAsync) As Task

Parameters

managementGroupId
String

The management group ID.

groupQuotaName
String

The GroupQuota name. The name should be unique for the provided context tenantId/MgId.

resourceProviderName
String

The resource provider name, such as - Microsoft.Compute. Currently only Microsoft.Compute resource provider supports this API.

location
String

The name of the Azure region.

jsonString
String

Json string supplied to the GroupQuotaLocationSettingsCreateOrUpdate operation

onOk
Func<HttpResponseMessage,Task<IGroupQuotasEnforcementStatus>,Task>

a delegate that is called when the remote service returns 200 (OK).

onDefault
Func<HttpResponseMessage,Task<IErrorResponse>,Task>

a delegate that is called when the remote service returns default (any response code not handled elsewhere).

eventListener
IEventListener

an IEventListener instance that will receive events.

sender
ISendAsync

an instance of an Microsoft.Azure.PowerShell.Cmdlets.Quota.Runtime.ISendAsync pipeline to use to make the request.

Returns

A Task that will be complete when handling of the response is completed.

Applies to