Skip to content

Commit

Permalink
Adding Group Quota APIs (#23990)
Browse files Browse the repository at this point in the history
* Adding Group Quota APIs.

* Updated Apis.

* run prettier

* Updates to GroupQuota API.

* Spell check fixes.

* Fix spell check.

* Adding new preview version tag.

* Updating the build configs.

* Fixing file Path.

* Delete file with upper case file name.

* Adding file with lower case.

* Updating the version in the build files.

* Adding pattern to validate parameter.

* run prettier

* Updating Tag

* Updated Readme.md for build.

* Updating the async response and adding default response.

* Adding "x-ms-long-running-operation": true, for Async operations.

* Run prettier.

* Adding "x-ms-error-response": true, to all error responses.

* Adding min, max length limit for sharedQuotaEnity Parameter.

* Removing all errorcodes as per - https://github.com/Azure/azure-openapi-validator/blob/main/docs/no-error-code-responses.md NoErrorCodeResponses

* Fixing Linter errors.

* Revert "Updating the async response and adding default response."

This reverts commit 67ee34c.

* Fix spell

* Fixing Lint Errors.

* Fix ProvisioningStateSpecifiedForLROPut

* Fix LroErrorContent

* Fix ResourceNameRestriction

* Fix Lint Errors

* Fix Lint Errors

* Fix Lint Errors

* Fix Lint Errors - ProvisioningStateSpecifiedForLROPut

* Fix Lint Errors - GetCollectionOnlyHasValueAndNextLink

* Fix Lint Errors - GetCollectionOnlyHasValueAndNextLink

* Fix Lint Errors - ProvisioningStateSpecifiedForLROPut

* Fix Lint Errors - ProvisioningStateSpecifiedForLROPut

* Fix Lint Errors - ProvisioningStateSpecifiedForLROPut

* Fix Lint Errors - GetCollectionOnlyHasValueAndNextLink

* Fix Lint Errors - getCollectionOnlyHasValueAndNextLink

* Fixing ProvisioningStateSpecifiedForLROPut. Change 202 to 201.

* Fixing ProvisioningStateSpecifiedForLROPut. Change 202 to 201.

* Fixing description for 200, 201.

* Update readme.md

* Update for LroPatch202 - Patch response 202.

* Fixing UnSupportedPatchProperties

* Fixing UnSupportedPatchProperties x-ms-mutability

* Making property  x-ms-mutability: read

* Different schema for Path request -  UnSupportedPatchProperties

* Prettier Check

* Prettier Check

* Update default package.

* Moving the properties bellow level.

* Run prettier.

* Changr Operation name to SharedQuotaEntities.

* Adding subscription list for filter and comments to address 1P requirement using CO APIs, not in ARm/3P APIs. seperation of conerns amkes it simple.

* Making filtervalues as array.

* Fixing Linter error.

* Adding SubscriptionList and attributes to SharedQuotaEntity.

* Adding APIs to manage subscription List for SharedQuotaEntity.

* Adding APIs to manage subscription List for SharedQuotaEntity. comments update for Pt vs Patch.

* Fixing comments.

* Schema Fix.

* Updating Patch request body. Make id, name type readonly.

* Fix linter errors.

* Schema Fix.

* Fixng Patch response.

* Spell fix.

* Fixing ProvisioningStateSpecifiedForLROPatch.

* Fixing ProvisioningStateSpecifiedForLROPatch.

* Fixing ProvisioningStateSpecifiedForLROPatch.

* Fixing ProvisioningStateSpecifiedForLROPatch.

* Fixng XmsIdentifierValidation

* Updating operationsId.

* Remove object from properties.

* Adding Id, name, type as top level property.

* Adding "x-ms-identifiers" to attributeList

* Making all objects definition starting with upper case name.

* Fix spelling.

* Fixing Spelling.

* Removing extra comma and spaces.

* Updating SharedQuotaEntity AdditionalAttributes" properties.
Todo: Remove unused objects Filters.

* Fix Typo.

* Remove duplicate attributes.

* Updated based on suggestions.

* spell check

* Updated to new APIs - GroupQuotas

* add json reference

* prettier fix

* Run Prettier.

* Run Prettier.

* Removing Space from NonProduction enum definition.

* spell Fix.

* add example json and fix semantic validation

* spell check

* prettier

* ProvisioningStateSpecifiedForLROPut LintDiff fix

* ProvisioningStateSpecifiedForLROPut LintDiff fix

* replace get for group quota subscriptions

* add back GroupQuotasEntityBase and new provisioning state in OperationStatus

* add properties field to nesting

* adding DisplayName and changes based on review suggestions.

* add 201, remove 204

* camel case rule fix

* BodyTopLevelProperties fix

* NoDuplicatePathsForScopeParameter fix

* fix nesting of provisioningState in properties bag

* create separate GroupQuotaSubscriptionId definition

* prettiern

* Spell Fix.

* change GroupQuotas-Subscriptions apis to return the GroupQuotasEntity modified

* some renaming and fix list reference for SubmittedResourceRequestStatusList

* update operationId and put response for SubscriptionQuota-Allocation

* add ms identifier

* Add comment field to quota request.

* update GroupQuotas example json

* Making GroupQuota package default.

* Using local Error definition for operations Status schema.

* Fix Error Definition Ref.

* Using common paramteres.

* Adding direct ref to common parameters.

* Using common Parameters.

* Refer to common paramteres. Path fix.

* update example json files

* unmark GroupQuotasEntityBase as a resource

* update error object and properties field

* prettier

* change additionalProperties back to properties

* update operationId for documentation grouping

* more specific example fields

* update put/patch request body to match 200 response schema

* upgrade to v5 types

* update GroupQuotaLimits Put/Patch description

* update GroupQuotaLimit Put/Patch body name/description

* update naming/description for SubscriptionQuota-Allocation endpoint payloads

* remove unused error refs and use common type

* remove error field from operation status and unmark allocation requests as resource

* update examples

* test common ProxyResource type inheritance

* update examples and add array identifier field

* use common type for other resources

* update example

* resolve dupe schema

* remove GroupQuotas-Subscriptions endpoints

* remove - in tags for sdk generation

* update 201 response for puts

* add suppressions

* update suppressions

* testing suppression format

* update suppressions

* make GroupQuotaSubscriptionIds as nested resource

* update subscription list example

* address comments, make subscription api long running

* add int format

* add description and remove unused definition

* fix spellcheck

* prettier

* match title and update description

---------

Co-authored-by: Rahul Singh <[email protected]>
Co-authored-by: Vincent Vole <[email protected]>
Co-authored-by: vivole <[email protected]>
  • Loading branch information
4 people authored Aug 23, 2023
1 parent 8181261 commit cb6c27c
Show file tree
Hide file tree
Showing 30 changed files with 2,679 additions and 12 deletions.
1 change: 1 addition & 0 deletions custom-words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1579,6 +1579,7 @@ metricsadvisor
metricsdynamicthreshold
metricstaticthreshold
metrictype
mgid
mgmt
mhsm
mhsmip
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"operationId": "GroupQuotaLimits_Get",
"parameters": {
"mgId": "E7EC67B3-7657-4966-BFFC-41EFD36BAA09",
"resourceProviderScope": "providers/Microsoft.Compute/locations/westus",
"groupQuotaName": "groupquota1",
"resourceName": "cores",
"api-version": "2023-06-01-preview"
},
"responses": {
"200": {
"body": {
"id": "/providers/Microsoft.Management/managementGroups/E7EC67B3-7657-4966-BFFC-41EFD36BAA09/providers/Microsoft.Compute/locations/westus/providers/Microsoft.Quota/groupQuotas/groupquota1/groupQuotaLimits/cores",
"type": "Microsoft.Quota/groupQuotaLimits",
"name": "cores",
"properties": {
"limit": 100,
"comment": "Contoso requires more quota.",
"name": {
"value": "cores",
"localizedValue": "Total Regional vCPUs"
},
"unit": "vCPUs",
"availableLimit": 80,
"assignedToSubscriptions": [
{
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"quotaAllocated": 20
}
],
"provisioningState": "Accepted"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"operationId": "GroupQuotaLimits_List",
"parameters": {
"mgId": "E7EC67B3-7657-4966-BFFC-41EFD36BAA09",
"resourceProviderScope": "providers/Microsoft.Compute/locations/westus",
"groupQuotaName": "groupquota1",
"api-version": "2023-06-01-preview"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "/providers/Microsoft.Management/managementGroups/E7EC67B3-7657-4966-BFFC-41EFD36BAA09/providers/Microsoft.Compute/locations/westus/providers/Microsoft.Quota/groupQuotas/groupquota1/groupQuotaLimits/cores",
"type": "Microsoft.Quota/groupQuotaLimits",
"name": "cores",
"properties": {
"limit": 100,
"comment": "Contoso requires more quota.",
"name": {
"value": "cores",
"localizedValue": "Total Regional vCPUs"
},
"unit": "vCPUs",
"availableLimit": 80,
"assignedToSubscriptions": [
{
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"quotaAllocated": 20
}
],
"provisioningState": "Accepted"
}
}
],
"nextLink": "https://yourLinkHere.com"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"operationId": "GroupQuotaLimits_Update",
"parameters": {
"mgId": "E7EC67B3-7657-4966-BFFC-41EFD36BAA09",
"resourceProviderScope": "providers/Microsoft.Compute/locations/westus",
"groupQuotaName": "groupquota1",
"resourceName": "cores",
"api-version": "2023-06-01-preview",
"groupQuotaRequest": {
"properties": {
"limit": 110,
"comment": "Contoso requires more quota.",
"name": {}
}
}
},
"responses": {
"200": {
"body": {
"id": "/providers/Microsoft.Management/managementGroups/E7EC67B3-7657-4966-BFFC-41EFD36BAA09/providers/Microsoft.Compute/locations/westus/providers/Microsoft.Quota/groupQuotas/groupquota1/groupQuotaLimits/cores",
"type": "Microsoft.Quota/groupQuotaLimits",
"name": "cores",
"properties": {
"limit": 100,
"comment": "Contoso requires more quota.",
"name": {
"value": "cores",
"localizedValue": "Total Regional vCPUs"
},
"unit": "vCPUs",
"availableLimit": 80,
"assignedToSubscriptions": [
{
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"quotaAllocated": 20
}
],
"provisioningState": "Accepted"
}
}
},
"202": {
"headers": {
"location": "https://contoso.com/operationstatus"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"operationId": "GroupQuotaLimits_CreateOrUpdate",
"parameters": {
"mgId": "E7EC67B3-7657-4966-BFFC-41EFD36BAA09",
"resourceProviderScope": "providers/Microsoft.Compute/locations/westus",
"groupQuotaName": "groupquota1",
"resourceName": "cores",
"api-version": "2023-06-01-preview",
"groupQuotaRequest": {
"properties": {
"limit": 110,
"comment": "Contoso requires more quota.",
"name": {}
}
}
},
"responses": {
"200": {
"body": {
"id": "/providers/Microsoft.Management/managementGroups/E7EC67B3-7657-4966-BFFC-41EFD36BAA09/providers/Microsoft.Compute/locations/westus/providers/Microsoft.Quota/groupQuotas/groupquota1/groupQuotaLimits/cores",
"type": "Microsoft.Quota/groupQuotaLimits",
"name": "cores",
"properties": {
"limit": 100,
"comment": "Contoso requires more quota.",
"name": {
"value": "cores",
"localizedValue": "Total Regional vCPUs"
},
"unit": "vCPUs",
"availableLimit": 80,
"assignedToSubscriptions": [
{
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"quotaAllocated": 20
}
],
"provisioningState": "Accepted"
}
}
},
"201": {
"headers": {
"location": "https://contoso.com/operationstatus"
},
"body": {
"id": "/providers/Microsoft.Management/managementGroups/E7EC67B3-7657-4966-BFFC-41EFD36BAA09/providers/Microsoft.Compute/locations/westus/providers/Microsoft.Quota/groupQuotas/groupquota1/groupQuotaLimits/cores",
"type": "Microsoft.Quota/groupQuotaLimits",
"name": "cores",
"properties": {
"provisioningState": "Accepted"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"operationId": "GroupQuotaLimitsRequests_List",
"parameters": {
"mgId": "E7EC67B3-7657-4966-BFFC-41EFD36BAA09",
"resourceProviderScope": "providers/Microsoft.Compute/locations/westus",
"groupQuotaName": "groupquota1",
"requestId": "someId",
"api-version": "2023-06-01-preview"
},
"responses": {
"200": {
"body": {
"requestedResource": {
"resourceName": "cores",
"limits": 110,
"unit": "vCPUs"
},
"status": "Accepted"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"operationId": "GroupQuotaLimitsRequests_List",
"parameters": {
"mgId": "E7EC67B3-7657-4966-BFFC-41EFD36BAA09",
"resourceProviderScope": "providers/Microsoft.Compute/locations/westus",
"groupQuotaName": "groupquota1",
"api-version": "2023-06-01-preview"
},
"responses": {
"200": {
"body": {
"value": [
{
"requestedResource": {
"resourceName": "cores",
"limits": 110,
"unit": "vCPUs"
},
"status": "Accepted"
}
],
"nextLink": "https://yourLinkHere.com"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"operationId": "GroupQuotas_Delete",
"parameters": {
"mgId": "E7EC67B3-7657-4966-BFFC-41EFD36BAA09",
"groupQuotaName": "groupquota1",
"api-version": "2023-06-01-preview"
},
"responses": {
"200": {},
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"operationId": " GroupQuotas_Get",
"parameters": {
"mgId": "E7EC67B3-7657-4966-BFFC-41EFD36BAA09",
"groupQuotaName": "groupquota1",
"api-version": "2023-06-01-preview"
},
"responses": {
"200": {
"body": {
"properties": {
"displayName": "GroupQuota1",
"additionalAttributes": {
"groupId": {
"groupingIdType": "ServiceTreeId",
"value": "yourServiceTreeIdHere"
},
"environment": "Production"
},
"provisioningState": "Accepted"
},
"id": "/providers/Microsoft.Management/managementGroups/E7EC67B3-7657-4966-BFFC-41EFD36BAA09/providers/Microsoft.Quota/groupQuotas/groupquota1",
"type": "Microsoft.Quota/groupQuotas",
"name": "groupquota1"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"operationId": "GroupQuotas_List",
"parameters": {
"mgId": "E7EC67B3-7657-4966-BFFC-41EFD36BAA09",
"api-version": "2023-06-01-preview"
},
"responses": {
"200": {
"body": {
"value": [
{
"properties": {
"displayName": "GroupQuota1",
"additionalAttributes": {
"groupId": {
"groupingIdType": "ServiceTreeId",
"value": "yourServiceTreeIdHere"
},
"environment": "Production"
},
"provisioningState": "Accepted"
},
"id": "/providers/Microsoft.Management/managementGroups/E7EC67B3-7657-4966-BFFC-41EFD36BAA09/providers/Microsoft.Quota/groupQuotas/groupquota1",
"type": "Microsoft.Quota/groupQuotas",
"name": "groupquota1"
}
],
"nextLink": "https://yourLinkHere.com"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"parameters": {
"mgId": "E7EC67B3-7657-4966-BFFC-41EFD36BAA09",
"groupQuotaName": "groupquota1",
"api-version": "2023-06-01-preview",
"GroupQuotasPatchRequestBody": {
"properties": {
"displayName": "GroupQuota1",
"additionalAttributes": {
"groupId": {
"groupingIdType": "ServiceTreeId",
"value": "yourServiceTreeIdHere"
},
"environment": "Production"
}
}
}
},
"responses": {
"200": {
"body": {
"properties": {
"displayName": "GroupQuota1",
"additionalAttributes": {
"groupId": {
"groupingIdType": "ServiceTreeId",
"value": "yourServiceTreeIdHere"
},
"environment": "Production"
},
"provisioningState": "Accepted"
},
"id": "/providers/Microsoft.Management/managementGroups/E7EC67B3-7657-4966-BFFC-41EFD36BAA09/providers/Microsoft.Quota/groupQuotas/groupquota1",
"type": "Microsoft.Quota/groupQuotas",
"name": "groupquota1"
}
},
"202": {
"headers": {
"location": "https://contoso.com/operationstatus"
}
}
}
}
Loading

0 comments on commit cb6c27c

Please sign in to comment.