Skip to content

Commit cb6c27c

Browse files
rahuls-microsoftRahulStation99AIvivole
authored
Adding Group Quota APIs (#23990)
* 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]>
1 parent 8181261 commit cb6c27c

30 files changed

+2679
-12
lines changed

custom-words.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1579,6 +1579,7 @@ metricsadvisor
15791579
metricsdynamicthreshold
15801580
metricstaticthreshold
15811581
metrictype
1582+
mgid
15821583
mgmt
15831584
mhsm
15841585
mhsmip
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"operationId": "GroupQuotaLimits_Get",
3+
"parameters": {
4+
"mgId": "E7EC67B3-7657-4966-BFFC-41EFD36BAA09",
5+
"resourceProviderScope": "providers/Microsoft.Compute/locations/westus",
6+
"groupQuotaName": "groupquota1",
7+
"resourceName": "cores",
8+
"api-version": "2023-06-01-preview"
9+
},
10+
"responses": {
11+
"200": {
12+
"body": {
13+
"id": "/providers/Microsoft.Management/managementGroups/E7EC67B3-7657-4966-BFFC-41EFD36BAA09/providers/Microsoft.Compute/locations/westus/providers/Microsoft.Quota/groupQuotas/groupquota1/groupQuotaLimits/cores",
14+
"type": "Microsoft.Quota/groupQuotaLimits",
15+
"name": "cores",
16+
"properties": {
17+
"limit": 100,
18+
"comment": "Contoso requires more quota.",
19+
"name": {
20+
"value": "cores",
21+
"localizedValue": "Total Regional vCPUs"
22+
},
23+
"unit": "vCPUs",
24+
"availableLimit": 80,
25+
"assignedToSubscriptions": [
26+
{
27+
"subscriptionId": "00000000-0000-0000-0000-000000000000",
28+
"quotaAllocated": 20
29+
}
30+
],
31+
"provisioningState": "Accepted"
32+
}
33+
}
34+
}
35+
}
36+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"operationId": "GroupQuotaLimits_List",
3+
"parameters": {
4+
"mgId": "E7EC67B3-7657-4966-BFFC-41EFD36BAA09",
5+
"resourceProviderScope": "providers/Microsoft.Compute/locations/westus",
6+
"groupQuotaName": "groupquota1",
7+
"api-version": "2023-06-01-preview"
8+
},
9+
"responses": {
10+
"200": {
11+
"body": {
12+
"value": [
13+
{
14+
"id": "/providers/Microsoft.Management/managementGroups/E7EC67B3-7657-4966-BFFC-41EFD36BAA09/providers/Microsoft.Compute/locations/westus/providers/Microsoft.Quota/groupQuotas/groupquota1/groupQuotaLimits/cores",
15+
"type": "Microsoft.Quota/groupQuotaLimits",
16+
"name": "cores",
17+
"properties": {
18+
"limit": 100,
19+
"comment": "Contoso requires more quota.",
20+
"name": {
21+
"value": "cores",
22+
"localizedValue": "Total Regional vCPUs"
23+
},
24+
"unit": "vCPUs",
25+
"availableLimit": 80,
26+
"assignedToSubscriptions": [
27+
{
28+
"subscriptionId": "00000000-0000-0000-0000-000000000000",
29+
"quotaAllocated": 20
30+
}
31+
],
32+
"provisioningState": "Accepted"
33+
}
34+
}
35+
],
36+
"nextLink": "https://yourLinkHere.com"
37+
}
38+
}
39+
}
40+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"operationId": "GroupQuotaLimits_Update",
3+
"parameters": {
4+
"mgId": "E7EC67B3-7657-4966-BFFC-41EFD36BAA09",
5+
"resourceProviderScope": "providers/Microsoft.Compute/locations/westus",
6+
"groupQuotaName": "groupquota1",
7+
"resourceName": "cores",
8+
"api-version": "2023-06-01-preview",
9+
"groupQuotaRequest": {
10+
"properties": {
11+
"limit": 110,
12+
"comment": "Contoso requires more quota.",
13+
"name": {}
14+
}
15+
}
16+
},
17+
"responses": {
18+
"200": {
19+
"body": {
20+
"id": "/providers/Microsoft.Management/managementGroups/E7EC67B3-7657-4966-BFFC-41EFD36BAA09/providers/Microsoft.Compute/locations/westus/providers/Microsoft.Quota/groupQuotas/groupquota1/groupQuotaLimits/cores",
21+
"type": "Microsoft.Quota/groupQuotaLimits",
22+
"name": "cores",
23+
"properties": {
24+
"limit": 100,
25+
"comment": "Contoso requires more quota.",
26+
"name": {
27+
"value": "cores",
28+
"localizedValue": "Total Regional vCPUs"
29+
},
30+
"unit": "vCPUs",
31+
"availableLimit": 80,
32+
"assignedToSubscriptions": [
33+
{
34+
"subscriptionId": "00000000-0000-0000-0000-000000000000",
35+
"quotaAllocated": 20
36+
}
37+
],
38+
"provisioningState": "Accepted"
39+
}
40+
}
41+
},
42+
"202": {
43+
"headers": {
44+
"location": "https://contoso.com/operationstatus"
45+
}
46+
}
47+
}
48+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{
2+
"operationId": "GroupQuotaLimits_CreateOrUpdate",
3+
"parameters": {
4+
"mgId": "E7EC67B3-7657-4966-BFFC-41EFD36BAA09",
5+
"resourceProviderScope": "providers/Microsoft.Compute/locations/westus",
6+
"groupQuotaName": "groupquota1",
7+
"resourceName": "cores",
8+
"api-version": "2023-06-01-preview",
9+
"groupQuotaRequest": {
10+
"properties": {
11+
"limit": 110,
12+
"comment": "Contoso requires more quota.",
13+
"name": {}
14+
}
15+
}
16+
},
17+
"responses": {
18+
"200": {
19+
"body": {
20+
"id": "/providers/Microsoft.Management/managementGroups/E7EC67B3-7657-4966-BFFC-41EFD36BAA09/providers/Microsoft.Compute/locations/westus/providers/Microsoft.Quota/groupQuotas/groupquota1/groupQuotaLimits/cores",
21+
"type": "Microsoft.Quota/groupQuotaLimits",
22+
"name": "cores",
23+
"properties": {
24+
"limit": 100,
25+
"comment": "Contoso requires more quota.",
26+
"name": {
27+
"value": "cores",
28+
"localizedValue": "Total Regional vCPUs"
29+
},
30+
"unit": "vCPUs",
31+
"availableLimit": 80,
32+
"assignedToSubscriptions": [
33+
{
34+
"subscriptionId": "00000000-0000-0000-0000-000000000000",
35+
"quotaAllocated": 20
36+
}
37+
],
38+
"provisioningState": "Accepted"
39+
}
40+
}
41+
},
42+
"201": {
43+
"headers": {
44+
"location": "https://contoso.com/operationstatus"
45+
},
46+
"body": {
47+
"id": "/providers/Microsoft.Management/managementGroups/E7EC67B3-7657-4966-BFFC-41EFD36BAA09/providers/Microsoft.Compute/locations/westus/providers/Microsoft.Quota/groupQuotas/groupquota1/groupQuotaLimits/cores",
48+
"type": "Microsoft.Quota/groupQuotaLimits",
49+
"name": "cores",
50+
"properties": {
51+
"provisioningState": "Accepted"
52+
}
53+
}
54+
}
55+
}
56+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"operationId": "GroupQuotaLimitsRequests_List",
3+
"parameters": {
4+
"mgId": "E7EC67B3-7657-4966-BFFC-41EFD36BAA09",
5+
"resourceProviderScope": "providers/Microsoft.Compute/locations/westus",
6+
"groupQuotaName": "groupquota1",
7+
"requestId": "someId",
8+
"api-version": "2023-06-01-preview"
9+
},
10+
"responses": {
11+
"200": {
12+
"body": {
13+
"requestedResource": {
14+
"resourceName": "cores",
15+
"limits": 110,
16+
"unit": "vCPUs"
17+
},
18+
"status": "Accepted"
19+
}
20+
}
21+
}
22+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"operationId": "GroupQuotaLimitsRequests_List",
3+
"parameters": {
4+
"mgId": "E7EC67B3-7657-4966-BFFC-41EFD36BAA09",
5+
"resourceProviderScope": "providers/Microsoft.Compute/locations/westus",
6+
"groupQuotaName": "groupquota1",
7+
"api-version": "2023-06-01-preview"
8+
},
9+
"responses": {
10+
"200": {
11+
"body": {
12+
"value": [
13+
{
14+
"requestedResource": {
15+
"resourceName": "cores",
16+
"limits": 110,
17+
"unit": "vCPUs"
18+
},
19+
"status": "Accepted"
20+
}
21+
],
22+
"nextLink": "https://yourLinkHere.com"
23+
}
24+
}
25+
}
26+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"operationId": "GroupQuotas_Delete",
3+
"parameters": {
4+
"mgId": "E7EC67B3-7657-4966-BFFC-41EFD36BAA09",
5+
"groupQuotaName": "groupquota1",
6+
"api-version": "2023-06-01-preview"
7+
},
8+
"responses": {
9+
"200": {},
10+
"204": {}
11+
}
12+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"operationId": " GroupQuotas_Get",
3+
"parameters": {
4+
"mgId": "E7EC67B3-7657-4966-BFFC-41EFD36BAA09",
5+
"groupQuotaName": "groupquota1",
6+
"api-version": "2023-06-01-preview"
7+
},
8+
"responses": {
9+
"200": {
10+
"body": {
11+
"properties": {
12+
"displayName": "GroupQuota1",
13+
"additionalAttributes": {
14+
"groupId": {
15+
"groupingIdType": "ServiceTreeId",
16+
"value": "yourServiceTreeIdHere"
17+
},
18+
"environment": "Production"
19+
},
20+
"provisioningState": "Accepted"
21+
},
22+
"id": "/providers/Microsoft.Management/managementGroups/E7EC67B3-7657-4966-BFFC-41EFD36BAA09/providers/Microsoft.Quota/groupQuotas/groupquota1",
23+
"type": "Microsoft.Quota/groupQuotas",
24+
"name": "groupquota1"
25+
}
26+
}
27+
}
28+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"operationId": "GroupQuotas_List",
3+
"parameters": {
4+
"mgId": "E7EC67B3-7657-4966-BFFC-41EFD36BAA09",
5+
"api-version": "2023-06-01-preview"
6+
},
7+
"responses": {
8+
"200": {
9+
"body": {
10+
"value": [
11+
{
12+
"properties": {
13+
"displayName": "GroupQuota1",
14+
"additionalAttributes": {
15+
"groupId": {
16+
"groupingIdType": "ServiceTreeId",
17+
"value": "yourServiceTreeIdHere"
18+
},
19+
"environment": "Production"
20+
},
21+
"provisioningState": "Accepted"
22+
},
23+
"id": "/providers/Microsoft.Management/managementGroups/E7EC67B3-7657-4966-BFFC-41EFD36BAA09/providers/Microsoft.Quota/groupQuotas/groupquota1",
24+
"type": "Microsoft.Quota/groupQuotas",
25+
"name": "groupquota1"
26+
}
27+
],
28+
"nextLink": "https://yourLinkHere.com"
29+
}
30+
}
31+
}
32+
}

0 commit comments

Comments
 (0)