From 7847cfdc88ed8b468742ed43e3fcd82890c9b44c Mon Sep 17 00:00:00 2001 From: wmbt96 <80877904+wmbt96@users.noreply.github.com> Date: Thu, 1 Apr 2021 02:12:39 -0700 Subject: [PATCH] User/wmbt96/azsadmin apiconsistency features quotas (#13559) * Adding API spec for 2021-01-01 Quotas for GPU VMs * Adding API spec for 2020-11-01 Features * Fixing path parameter 'location' * Fixing 'locationName' in Quotas spec * Fixing 'location' in Features * Fixing Features oav validate-spec errors * Updating readme.md and fixing validator warnings * Fixing 'locationName' in Quota examples * Added missing newline at end of files * Adding ddagpu to custom words * Fixing Enum Mismatch * Fixing ModelValidation Errors * Fixing LintDiff by adding default error responses * Fixed 'partitionedGpuCount' in Create example * Amending default error schema * Adhering to default error response schema * Adding 2020-11-01 Features to stable folder and updating readme * Copying Compute.json and updating Features' references * Moving Quotas 2021-01-01 to stable and making copy of Compute.json * Updating readme with stable paths * Adding references to Compute.json copies in readme * Using single Compute.json copy * Adding param & definition references within specs Co-authored-by: Miguel Concha Vazquez --- custom-words.txt | 1 + .../stable/2020-11-01/Features.json | 473 ++++++++++++++++++ .../2020-11-01/examples/Features/Disable.json | 14 + .../2020-11-01/examples/Features/Enable.json | 14 + .../2020-11-01/examples/Features/Get.json | 27 + .../2020-11-01/examples/Features/List.json | 30 ++ .../2020-11-01/examples/Features/Update.json | 14 + .../stable/2021-01-01/Quotas.json | 356 +++++++++++++ .../2021-01-01/examples/Quotas/Create.json | 40 ++ .../2021-01-01/examples/Quotas/Delete.json | 11 + .../2021-01-01/examples/Quotas/Get.json | 28 ++ .../2021-01-01/examples/Quotas/List.json | 31 ++ .../resource-manager/compute/readme.md | 14 +- 13 files changed, 1047 insertions(+), 6 deletions(-) create mode 100644 specification/azsadmin/resource-manager/compute/Microsoft.Compute.Admin/stable/2020-11-01/Features.json create mode 100644 specification/azsadmin/resource-manager/compute/Microsoft.Compute.Admin/stable/2020-11-01/examples/Features/Disable.json create mode 100644 specification/azsadmin/resource-manager/compute/Microsoft.Compute.Admin/stable/2020-11-01/examples/Features/Enable.json create mode 100644 specification/azsadmin/resource-manager/compute/Microsoft.Compute.Admin/stable/2020-11-01/examples/Features/Get.json create mode 100644 specification/azsadmin/resource-manager/compute/Microsoft.Compute.Admin/stable/2020-11-01/examples/Features/List.json create mode 100644 specification/azsadmin/resource-manager/compute/Microsoft.Compute.Admin/stable/2020-11-01/examples/Features/Update.json create mode 100644 specification/azsadmin/resource-manager/compute/Microsoft.Compute.Admin/stable/2021-01-01/Quotas.json create mode 100644 specification/azsadmin/resource-manager/compute/Microsoft.Compute.Admin/stable/2021-01-01/examples/Quotas/Create.json create mode 100644 specification/azsadmin/resource-manager/compute/Microsoft.Compute.Admin/stable/2021-01-01/examples/Quotas/Delete.json create mode 100644 specification/azsadmin/resource-manager/compute/Microsoft.Compute.Admin/stable/2021-01-01/examples/Quotas/Get.json create mode 100644 specification/azsadmin/resource-manager/compute/Microsoft.Compute.Admin/stable/2021-01-01/examples/Quotas/List.json diff --git a/custom-words.txt b/custom-words.txt index 9ae7bce639f6..ab09d8934d1a 100644 --- a/custom-words.txt +++ b/custom-words.txt @@ -476,6 +476,7 @@ datetimeoffset datetimes DBFS DCOS +ddagpu Ddos DDTHH deadletter diff --git a/specification/azsadmin/resource-manager/compute/Microsoft.Compute.Admin/stable/2020-11-01/Features.json b/specification/azsadmin/resource-manager/compute/Microsoft.Compute.Admin/stable/2020-11-01/Features.json new file mode 100644 index 000000000000..08e49c717a68 --- /dev/null +++ b/specification/azsadmin/resource-manager/compute/Microsoft.Compute.Admin/stable/2020-11-01/Features.json @@ -0,0 +1,473 @@ +{ + "swagger": "2.0", + "info": { + "version": "2020-11-01", + "title": "Compute Admin Client" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "paths": { + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute.Admin/locations/{location}/features/{featureName}": { + "get": { + "x-ms-examples": { + "Get an existing feature.": { + "$ref": "examples/Features/Get.json" + } + }, + "tags": [ + "Features" + ], + "summary": "Returns the requested feature.", + "description": "Get an existing feature.", + "operationId": "Features_Get", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "Features.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "Features.json#/parameters/LocationParameter" + }, + { + "$ref": "Features.json#/parameters/FeatureParameter" + }, + { + "$ref": "Features.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "Features.json#/definitions/Feature" + } + }, + "default": { + "description": "Default error response.", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute.Admin/locations/{location}/features": { + "get": { + "x-ms-examples": { + "Get a list of existing features.": { + "$ref": "examples/Features/List.json" + } + }, + "tags": [ + "Features" + ], + "summary": "Lists all features.", + "description": "Get a list of existing features.", + "operationId": "Features_List", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "Features.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "Features.json#/parameters/LocationParameter" + }, + { + "$ref": "Features.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "Features.json#/definitions/FeatureList" + } + }, + "default": { + "description": "Default error response.", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute.Admin/locations/{location}/features/{featureName}/updateGlobalFeatureSettings": { + "post": { + "x-ms-examples": { + "Update the feature settings.": { + "$ref": "examples/Features/Update.json" + } + }, + "tags": [ + "Features" + ], + "summary": "Updates the global feature settings.", + "description": "Update the feature settings.", + "operationId": "UpdateGlobalFeatureSettings", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "Features.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "Features.json#/parameters/LocationParameter" + }, + { + "$ref": "Features.json#/parameters/FeatureParameter" + }, + { + "$ref": "Features.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "Features.json#/parameters/GlobalFeatureSettingsParameter" + } + ], + "responses": { + "200": { + "description": "OK" + }, + "default": { + "description": "Default error response.", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute.Admin/locations/{location}/features/{featureName}/enableTenantSubscriptionFeature": { + "post": { + "x-ms-examples": { + "Enable the tenant subscription feature.": { + "$ref": "examples/Features/Enable.json" + } + }, + "tags": [ + "Features" + ], + "summary": "Enables the requested feature in the tenant subscription.", + "description": "Enable the tenant subscription feature.", + "operationId": "EnableTenantSubscriptionFeature", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "Features.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "Features.json#/parameters/LocationParameter" + }, + { + "$ref": "Features.json#/parameters/FeatureParameter" + }, + { + "$ref": "Features.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "Features.json#/parameters/TenantSubscriptionFeatureSettingsParameter" + } + ], + "responses": { + "200": { + "description": "OK" + }, + "default": { + "description": "Default error response.", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute.Admin/locations/{location}/features/{featureName}/disableTenantSubscriptionFeature": { + "post": { + "x-ms-examples": { + "Disable the tenant subscription feature.": { + "$ref": "examples/Features/Disable.json" + } + }, + "tags": [ + "Features" + ], + "summary": "Disables the requested feature in the tenant subscription.", + "description": "Disable the tenant subscription feature.", + "operationId": "DisableTenantSubscriptionFeature", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "Features.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "Features.json#/parameters/LocationParameter" + }, + { + "$ref": "Features.json#/parameters/FeatureParameter" + }, + { + "$ref": "Features.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "Features.json#/parameters/TenantSubscriptionFeatureSettingsParameter" + } + ], + "responses": { + "200": { + "description": "OK" + }, + "default": { + "description": "Default error response.", + "schema": { + "$ref": "#/definitions/ErrorDetails" + } + } + } + } + } + }, + "definitions": { + "Feature": { + "description": "Subscription features that can be toggled.", + "type": "object", + "properties": { + "properties": { + "description": "Feature properties.", + "x-ms-client-flatten": true, + "$ref": "#/definitions/FeatureProperties" + } + }, + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ] + }, + "FeatureProperties": { + "description": "Properties of features.", + "type": "object", + "properties": { + "featureName": { + "description": "The name of the feature.", + "type": "string" + }, + "globalFeatureSettings": { + "description": "Higher-priority global feature flags.", + "$ref": "#/definitions/GlobalFeatureSettings" + }, + "enabledTenantSubscriptionIds": { + "description": "List of subscription identifiers which have the feature enabled.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "GlobalFeatureSettings": { + "description": "Higher-priority global feature flags.", + "type": "object", + "properties": { + "globalFeatureState": { + "description": "The state of the global feature.", + "$ref": "#/definitions/GlobalFeatureState" + } + } + }, + "GlobalFeatureState": { + "description": "The state of the global feature.", + "enum": [ + "TenantSubscriptionLevel", + "Enabled", + "Disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "GlobalFeatureState" + } + }, + "FeatureList": { + "type": "object", + "description": "List features.", + "properties": { + "value": { + "description": "List of features.", + "type": "array", + "items": { + "$ref": "Features.json#/definitions/Feature" + } + }, + "nextLink": { + "description": "URI to the next page.", + "type": "string" + } + } + }, + "TenantSubscriptionFeatureSettings": { + "type": "object", + "description": "The feature settings for the tenant subscription.", + "properties": { + "tenantSubscriptionId": { + "description": "The tenant subscription identifier.", + "type": "string" + } + } + }, + "ErrorDetails": { + "description": "Error details.", + "type": "object", + "properties": { + "error": { + "description": "Object containing error details.", + "$ref": "#/definitions/ErrorDetailsInternal" + } + } + }, + "ErrorDetailsInternal": { + "description": "Error details.", + "type": "object", + "properties": { + "code": { + "description": "The error code.", + "type": "string", + "readOnly": true + }, + "message": { + "description": "The error message.", + "type": "string", + "readOnly": true + }, + "target": { + "description": "The target of the particular error.", + "type": "string", + "readOnly": true + } + } + }, + "Resource": { + "description": "Base resource object.", + "type": "object", + "properties": { + "id": { + "readOnly": true, + "description": "ID of the resource.", + "type": "string" + }, + "name": { + "readOnly": true, + "description": "Name of the resource.", + "type": "string" + }, + "type": { + "readOnly": true, + "description": "Type of Resource.", + "type": "string" + }, + "location": { + "description": "Location of the resource.", + "type": "string" + } + }, + "x-ms-azure-resource": true + } + }, + "parameters": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "description": "Subscription credentials that uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + "required": true, + "type": "string" + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "description": "Client API Version.", + "required": true, + "type": "string" + }, + "LocationParameter": { + "description": "Location of the resource.", + "name": "location", + "in": "path", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "FeatureParameter": { + "description": "Name of the feature.", + "name": "featureName", + "type": "string", + "required": true, + "in": "path", + "x-ms-parameter-location": "method" + }, + "GlobalFeatureSettingsParameter": { + "description": "The global feature state to update.", + "name": "globalFeatureSettings", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/GlobalFeatureSettings" + }, + "x-ms-parameter-location": "method" + }, + "TenantSubscriptionFeatureSettingsParameter": { + "description": "The tenant subscription feature settings to enable or disable.", + "name": "tenantSubscriptionFeatureSettings", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/TenantSubscriptionFeatureSettings" + }, + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Authorization uses an Azure Active Directory OAuth2 flow.", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ] +} diff --git a/specification/azsadmin/resource-manager/compute/Microsoft.Compute.Admin/stable/2020-11-01/examples/Features/Disable.json b/specification/azsadmin/resource-manager/compute/Microsoft.Compute.Admin/stable/2020-11-01/examples/Features/Disable.json new file mode 100644 index 000000000000..dd161ae01d81 --- /dev/null +++ b/specification/azsadmin/resource-manager/compute/Microsoft.Compute.Admin/stable/2020-11-01/examples/Features/Disable.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "location": "local", + "featureName": "imds", + "api-version": "2020-11-01", + "tenantSubscriptionFeatureSettings": { + "tenantSubscriptionId": "e4e827e5-2e03-4e00-b25a-99fc845eeb43" + } + }, + "responses": { + "200": {} + } +} diff --git a/specification/azsadmin/resource-manager/compute/Microsoft.Compute.Admin/stable/2020-11-01/examples/Features/Enable.json b/specification/azsadmin/resource-manager/compute/Microsoft.Compute.Admin/stable/2020-11-01/examples/Features/Enable.json new file mode 100644 index 000000000000..dd161ae01d81 --- /dev/null +++ b/specification/azsadmin/resource-manager/compute/Microsoft.Compute.Admin/stable/2020-11-01/examples/Features/Enable.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "location": "local", + "featureName": "imds", + "api-version": "2020-11-01", + "tenantSubscriptionFeatureSettings": { + "tenantSubscriptionId": "e4e827e5-2e03-4e00-b25a-99fc845eeb43" + } + }, + "responses": { + "200": {} + } +} diff --git a/specification/azsadmin/resource-manager/compute/Microsoft.Compute.Admin/stable/2020-11-01/examples/Features/Get.json b/specification/azsadmin/resource-manager/compute/Microsoft.Compute.Admin/stable/2020-11-01/examples/Features/Get.json new file mode 100644 index 000000000000..b062e3a4d7a8 --- /dev/null +++ b/specification/azsadmin/resource-manager/compute/Microsoft.Compute.Admin/stable/2020-11-01/examples/Features/Get.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "location": "local", + "featureName": "imds", + "api-version": "2020-11-01" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Compute.Admin/locations/local/features/imds", + "name": "imds", + "type": "Microsoft.Compute.Admin/locations/features", + "location": "local", + "properties": { + "enabledTenantSubscriptionIds": [ + "ad8f911f-ef2a-4c0e-ab84-63116c955940" + ], + "featureName": "imds", + "globalFeatureSettings": { + "globalFeatureState": "Enabled" + } + } + } + } + } +} diff --git a/specification/azsadmin/resource-manager/compute/Microsoft.Compute.Admin/stable/2020-11-01/examples/Features/List.json b/specification/azsadmin/resource-manager/compute/Microsoft.Compute.Admin/stable/2020-11-01/examples/Features/List.json new file mode 100644 index 000000000000..996addc9470c --- /dev/null +++ b/specification/azsadmin/resource-manager/compute/Microsoft.Compute.Admin/stable/2020-11-01/examples/Features/List.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "location": "local", + "api-version": "2021-01-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Compute.Admin/locations/local/features/imds", + "name": "imds", + "type": "Microsoft.Compute.Admin/locations/features", + "location": "local", + "properties": { + "enabledTenantSubscriptionIds": [ + "ad8f911f-ef2a-4c0e-ab84-63116c955940" + ], + "featureName": "imds", + "globalFeatureSettings": { + "globalFeatureState": "Enabled" + } + } + } + ] + } + } + } +} diff --git a/specification/azsadmin/resource-manager/compute/Microsoft.Compute.Admin/stable/2020-11-01/examples/Features/Update.json b/specification/azsadmin/resource-manager/compute/Microsoft.Compute.Admin/stable/2020-11-01/examples/Features/Update.json new file mode 100644 index 000000000000..2f7539a18eec --- /dev/null +++ b/specification/azsadmin/resource-manager/compute/Microsoft.Compute.Admin/stable/2020-11-01/examples/Features/Update.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "location": "local", + "featureName": "imds", + "api-version": "2020-11-01", + "globalFeatureSettings": { + "globalFeatureState": "Enabled" + } + }, + "responses": { + "200": {} + } +} diff --git a/specification/azsadmin/resource-manager/compute/Microsoft.Compute.Admin/stable/2021-01-01/Quotas.json b/specification/azsadmin/resource-manager/compute/Microsoft.Compute.Admin/stable/2021-01-01/Quotas.json new file mode 100644 index 000000000000..34ec689cfc5e --- /dev/null +++ b/specification/azsadmin/resource-manager/compute/Microsoft.Compute.Admin/stable/2021-01-01/Quotas.json @@ -0,0 +1,356 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-01-01", + "title": "Compute Admin Client" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "paths": { + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute.Admin/locations/{location}/quotas/{quotaName}": { + "get": { + "x-ms-examples": { + "Get an existing Compute Quota.": { + "$ref": "examples/Quotas/Get.json" + } + }, + "tags": [ + "Quotas" + ], + "summary": "Returns the requested Compute quota.", + "description": "Get an existing Compute Quota.", + "operationId": "Quotas_Get", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "Quotas.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "Quotas.json#/parameters/LocationParameter" + }, + { + "$ref": "Quotas.json#/parameters/QuotaParameter" + }, + { + "$ref": "Quotas.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "Quotas.json#/definitions/Quota" + } + } + } + }, + "put": { + "x-ms-examples": { + "Creates or Updates a Compute Quota.": { + "$ref": "examples/Quotas/Create.json" + } + }, + "tags": [ + "Quotas" + ], + "description": "Creates or Updates a Compute Quota with the provided quota parameters.", + "summary": "Creates or Updates a Compute Quota.", + "operationId": "Quotas_CreateOrUpdate", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "Quotas.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "Quotas.json#/parameters/LocationParameter" + }, + { + "$ref": "Quotas.json#/parameters/QuotaParameter" + }, + { + "$ref": "Quotas.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "Quotas.json#/parameters/NewQuotaParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "Quotas.json#/definitions/Quota" + } + } + } + }, + "delete": { + "x-ms-examples": { + "Deletes specified Compute quota.": { + "$ref": "examples/Quotas/Delete.json" + } + }, + "tags": [ + "Quotas" + ], + "summary": "Deletes specified Compute quota", + "description": "Delete an existing Compute quota.", + "operationId": "Quotas_Delete", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "Quotas.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "Quotas.json#/parameters/LocationParameter" + }, + { + "$ref": "Quotas.json#/parameters/QuotaParameter" + }, + { + "$ref": "Quotas.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute.Admin/locations/{location}/quotas": { + "get": { + "x-ms-examples": { + "Get a list of existing Compute quotas.": { + "$ref": "examples/Quotas/List.json" + } + }, + "tags": [ + "Quotas" + ], + "summary": "Lists all Compute quotas.", + "description": "Get a list of existing Compute quotas.", + "operationId": "Quotas_List", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "Quotas.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "Quotas.json#/parameters/LocationParameter" + }, + { + "$ref": "Quotas.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "Quotas.json#/definitions/QuotaList" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + } + }, + "definitions": { + "Quota": { + "description": "Holds Compute quota information used to control resource allocation.", + "type": "object", + "properties": { + "properties": { + "description": "Compute Quota properties.", + "x-ms-client-flatten": true, + "$ref": "#/definitions/QuotaProperties" + } + }, + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ] + }, + "QuotaProperties": { + "description": "Properties for a Compute Quota", + "type": "object", + "properties": { + "availabilitySetCount": { + "description": "Maximum number of availability sets allowed.", + "format": "int32", + "type": "integer", + "minimum": 0 + }, + "coresLimit": { + "description": "Maximum number of cores allowed.", + "format": "int32", + "type": "integer", + "minimum": 0 + }, + "virtualMachineCount": { + "description": "Maximum number of virtual machines allowed.", + "format": "int32", + "type": "integer", + "minimum": 0 + }, + "vmScaleSetCount": { + "description": "Maximum number of scale sets allowed.", + "format": "int32", + "type": "integer", + "minimum": 0 + }, + "maxAllocationStandardManagedDisksAndSnapshots": { + "description": "Maximum number of managed disks and snapshots of type standard allowed.", + "format": "int32", + "type": "integer", + "minimum": 0 + }, + "maxAllocationPremiumManagedDisksAndSnapshots": { + "description": "Maximum number of managed disks and snapshots of type premium allowed.", + "format": "int32", + "type": "integer", + "minimum": 0 + }, + "ddagpuCount": { + "description": "Maximum number of dda gpus allowed.", + "format": "int32", + "type": "integer", + "minimum": 0 + }, + "partitionedGpuCount": { + "description": "Maximum number of partitioned gpus allowed.", + "format": "int32", + "type": "integer", + "minimum": 0 + } + } + }, + "QuotaList": { + "description": "List of Compute quotas", + "type": "object", + "properties": { + "nextLink": { + "description": "URI to the next page.", + "type": "string" + }, + "value": { + "description": "List of Compute quotas", + "type": "array", + "items": { + "$ref": "Quotas.json#/definitions/Quota" + } + } + } + }, + "Resource": { + "description": "Base resource object.", + "type": "object", + "properties": { + "id": { + "readOnly": true, + "description": "ID of the resource.", + "type": "string" + }, + "name": { + "readOnly": true, + "description": "Name of the resource.", + "type": "string" + }, + "type": { + "readOnly": true, + "description": "Type of Resource.", + "type": "string" + }, + "location": { + "description": "Location of the resource.", + "type": "string" + } + }, + "x-ms-azure-resource": true + } + }, + "parameters": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "description": "Subscription credentials that uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + "required": true, + "type": "string" + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "description": "Client API Version.", + "required": true, + "type": "string" + }, + "LocationParameter": { + "description": "Location of the resource.", + "name": "location", + "in": "path", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "QuotaParameter": { + "description": "Name of the quota.", + "name": "quotaName", + "type": "string", + "required": true, + "in": "path", + "x-ms-parameter-location": "method" + }, + "NewQuotaParameter": { + "description": "New quota to create.", + "name": "newQuota", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Quota" + }, + "x-ms-parameter-location": "method" + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Authorization uses an Azure Active Directory OAuth2 flow.", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ] +} diff --git a/specification/azsadmin/resource-manager/compute/Microsoft.Compute.Admin/stable/2021-01-01/examples/Quotas/Create.json b/specification/azsadmin/resource-manager/compute/Microsoft.Compute.Admin/stable/2021-01-01/examples/Quotas/Create.json new file mode 100644 index 000000000000..868be64d2a34 --- /dev/null +++ b/specification/azsadmin/resource-manager/compute/Microsoft.Compute.Admin/stable/2021-01-01/examples/Quotas/Create.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "location": "local", + "quotaName": "testQuotaCreateUpdateDelete", + "api-version": "2021-01-01", + "newQuota": { + "properties": { + "availabilitySetCount": 2, + "coresLimit": 2, + "virtualMachineCount": 2, + "vmScaleSetCount": 2, + "maxAllocationStandardManagedDisksAndSnapshots": 1024, + "maxAllocationPremiumManagedDisksAndSnapshots": 1024, + "ddagpuCount": 6, + "partitionedGpuCount": 0 + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/8158498d-27b1-4ccf-9aa1-de0f925731e6/providers/Microsoft.Compute.Admin/locations/local/quotas/testQuotaCreateUpdateDelete", + "name": "testQuotaCreateUpdateDelete", + "type": "Microsoft.Compute.Admin/quotas", + "location": "local", + "properties": { + "virtualMachineCount": 2, + "coresLimit": 2, + "availabilitySetCount": 2, + "vmScaleSetCount": 2, + "maxAllocationStandardManagedDisksAndSnapshots": 1024, + "maxAllocationPremiumManagedDisksAndSnapshots": 1024, + "ddagpuCount": 6, + "partitionedGpuCount": 0 + } + } + } + } +} diff --git a/specification/azsadmin/resource-manager/compute/Microsoft.Compute.Admin/stable/2021-01-01/examples/Quotas/Delete.json b/specification/azsadmin/resource-manager/compute/Microsoft.Compute.Admin/stable/2021-01-01/examples/Quotas/Delete.json new file mode 100644 index 000000000000..10651bebf525 --- /dev/null +++ b/specification/azsadmin/resource-manager/compute/Microsoft.Compute.Admin/stable/2021-01-01/examples/Quotas/Delete.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "location": "local", + "quotaName": "testQuotaCreateUpdateDelete", + "api-version": "2021-01-01" + }, + "responses": { + "200": {} + } +} diff --git a/specification/azsadmin/resource-manager/compute/Microsoft.Compute.Admin/stable/2021-01-01/examples/Quotas/Get.json b/specification/azsadmin/resource-manager/compute/Microsoft.Compute.Admin/stable/2021-01-01/examples/Quotas/Get.json new file mode 100644 index 000000000000..703136201c69 --- /dev/null +++ b/specification/azsadmin/resource-manager/compute/Microsoft.Compute.Admin/stable/2021-01-01/examples/Quotas/Get.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "location": "local", + "quotaName": "testQuotaCreateUpdateDelete", + "api-version": "2021-01-01" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/8158498d-27b1-4ccf-9aa1-de0f925731e6/providers/Microsoft.Compute.Admin/locations/local/quotas/testQuotaCreateUpdateDelete", + "name": "testQuotaCreateUpdateDelete", + "type": "Microsoft.Compute.Admin/quotas", + "location": "local", + "properties": { + "virtualMachineCount": 1, + "coresLimit": 1, + "availabilitySetCount": 1, + "vmScaleSetCount": 1, + "maxAllocationStandardManagedDisksAndSnapshots": 1024, + "maxAllocationPremiumManagedDisksAndSnapshots": 1024, + "ddagpuCount": 6, + "partitionedGpuCount": 0 + } + } + } + } +} diff --git a/specification/azsadmin/resource-manager/compute/Microsoft.Compute.Admin/stable/2021-01-01/examples/Quotas/List.json b/specification/azsadmin/resource-manager/compute/Microsoft.Compute.Admin/stable/2021-01-01/examples/Quotas/List.json new file mode 100644 index 000000000000..0af3abbcb658 --- /dev/null +++ b/specification/azsadmin/resource-manager/compute/Microsoft.Compute.Admin/stable/2021-01-01/examples/Quotas/List.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "location": "local", + "api-version": "2021-01-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/8158498d-27b1-4ccf-9aa1-de0f925731e6/providers/Microsoft.Compute.Admin/locations/local/quotas/Default Quota", + "name": "Default Quota", + "type": "Microsoft.Compute.Admin/quotas", + "location": "local", + "properties": { + "virtualMachineCount": 20, + "coresLimit": 50, + "availabilitySetCount": 10, + "vmScaleSetCount": 20, + "maxAllocationStandardManagedDisksAndSnapshots": 1024, + "maxAllocationPremiumManagedDisksAndSnapshots": 1024, + "ddagpuCount": 6, + "partitionedGpuCount": 0 + } + } + ] + } + } + } +} diff --git a/specification/azsadmin/resource-manager/compute/readme.md b/specification/azsadmin/resource-manager/compute/readme.md index 6e2d95dd3738..dfbaaaa82be7 100644 --- a/specification/azsadmin/resource-manager/compute/readme.md +++ b/specification/azsadmin/resource-manager/compute/readme.md @@ -24,21 +24,22 @@ These are the global settings for the Compute API. title: ComputeAdminClient description: Compute Admin Client openapi-type: arm -tag: package-2018-02-09 +tag: package-2021-01-01 ``` -### Tag: package-2018-02-09 +### Tag: package-2021-01-01 -These settings apply only when `--tag=package-2018-02-09` is specified on the command line. +These settings apply only when `--tag=package-2021-01-01` is specified on the command line. -``` yaml $(tag) == 'package-2018-02-09' +``` yaml $(tag) == 'package-2021-01-01' input-file: - Microsoft.Compute.Admin/preview/2015-12-01-preview/Compute.json - Microsoft.Compute.Admin/preview/2015-12-01-preview/PlatformImages.json - - Microsoft.Compute.Admin/preview/2018-02-09/Quotas.json - Microsoft.Compute.Admin/preview/2015-12-01-preview/VMExtensions.json - Microsoft.Compute.Admin/preview/2018-07-30-preview/Disks.json - Microsoft.Compute.Admin/preview/2018-07-30-preview/DiskMigrationJobs.json + - Microsoft.Compute.Admin/stable/2020-11-01/Features.json + - Microsoft.Compute.Admin/stable/2021-01-01/Quotas.json ``` --- @@ -64,10 +65,11 @@ csharp: input-file: - Microsoft.Compute.Admin/preview/2015-12-01-preview/Compute.json - Microsoft.Compute.Admin/preview/2015-12-01-preview/PlatformImages.json - - Microsoft.Compute.Admin/preview/2018-02-09/Quotas.json - Microsoft.Compute.Admin/preview/2015-12-01-preview/VMExtensions.json - Microsoft.Compute.Admin/preview/2018-07-30-preview/Disks.json - Microsoft.Compute.Admin/preview/2018-07-30-preview/DiskMigrationJobs.json + - Microsoft.Compute.Admin/stable/2020-11-01/Features.json + - Microsoft.Compute.Admin/stable/2021-01-01/Quotas.json ``` ## Multi-API/Profile support for AutoRest v3 generators