From 2482ad85501e5229e957a7db2d759cf132b05b83 Mon Sep 17 00:00:00 2001 From: Samir Solanki Date: Sun, 7 Feb 2021 23:12:24 -0800 Subject: [PATCH] APIM SKUs API (#12752) * apim skus api * zonedetails * renames * readonly --- .../preview/2020-06-01-preview/apimskus.json | 371 ++++++++++++++++++ .../examples/ApiManagementListSku.json | 224 +++++++++++ .../apimanagement/resource-manager/readme.md | 1 + 3 files changed, 596 insertions(+) create mode 100644 specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/apimskus.json create mode 100644 specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementListSku.json diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/apimskus.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/apimskus.json new file mode 100644 index 000000000000..7b5cc9ec212a --- /dev/null +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/apimskus.json @@ -0,0 +1,371 @@ +{ + "swagger": "2.0", + "info": { + "title": "ApiManagementClient", + "description": "SKUs available for Microsoft.ApiManagement", + "version": "2020-06-01-preview" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow.", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/skus": { + "get": { + "tags": [ + "Skus" + ], + "operationId": "ApiManagementSkus_List", + "description": "Gets the list of Microsoft.ApiManagement SKUs available for your Subscription.", + "x-ms-examples": { + "Lists all available Resource SKUs": { + "$ref": "./examples/ApiManagementListSku.json" + } + }, + "parameters": [ + { + "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ApiManagementSkusResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./apimanagement.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { + "ApiManagementSkuCapacity": { + "properties": { + "minimum": { + "type": "integer", + "readOnly": true, + "format": "int32", + "description": "The minimum capacity." + }, + "maximum": { + "type": "integer", + "readOnly": true, + "format": "int32", + "description": "The maximum capacity that can be set." + }, + "default": { + "type": "integer", + "readOnly": true, + "format": "int32", + "description": "The default capacity." + }, + "scaleType": { + "type": "string", + "readOnly": true, + "description": "The scale type applicable to the sku.", + "enum": [ + "Automatic", + "Manual", + "None" + ], + "x-ms-enum": { + "name": "ApiManagementSkuCapacityScaleType", + "modelAsString": false + } + } + }, + "description": "Describes scaling information of a SKU." + }, + "ApiManagementSkuCosts": { + "properties": { + "meterID": { + "type": "string", + "readOnly": true, + "description": "Used for querying price from commerce." + }, + "quantity": { + "type": "integer", + "readOnly": true, + "format": "int64", + "description": "The multiplier is needed to extend the base metered cost." + }, + "extendedUnit": { + "type": "string", + "readOnly": true, + "description": "An invariant to show the extended unit." + } + }, + "description": "Describes metadata for retrieving price info." + }, + "ApiManagementSkuCapabilities": { + "properties": { + "name": { + "type": "string", + "readOnly": true, + "description": "An invariant to describe the feature." + }, + "value": { + "type": "string", + "readOnly": true, + "description": "An invariant if the feature is measured by quantity." + } + }, + "description": "Describes The SKU capabilities object." + }, + "ApiManagementSkuZoneDetails": { + "properties": { + "name": { + "type": "array", + "readOnly": true, + "items": { + "type": "string" + }, + "description": "The set of zones that the SKU is available in with the specified capabilities." + }, + "capabilities": { + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/ApiManagementSkuCapabilities" + }, + "description": "A list of capabilities that are available for the SKU in the specified list of zones." + } + }, + "description": "Describes The zonal capabilities of a SKU." + }, + "ApiManagementSkuRestrictions": { + "properties": { + "type": { + "type": "string", + "readOnly": true, + "description": "The type of restrictions.", + "enum": [ + "Location", + "Zone" + ], + "x-ms-enum": { + "name": "ApiManagementSkuRestrictionsType", + "modelAsString": false + } + }, + "values": { + "type": "array", + "readOnly": true, + "items": { + "type": "string" + }, + "description": "The value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted." + }, + "restrictionInfo": { + "$ref": "#/definitions/ApiManagementSkuRestrictionInfo", + "readOnly": true, + "description": "The information about the restriction where the SKU cannot be used." + }, + "reasonCode": { + "type": "string", + "readOnly": true, + "description": "The reason for restriction.", + "enum": [ + "QuotaId", + "NotAvailableForSubscription" + ], + "x-ms-enum": { + "name": "ApiManagementSkuRestrictionsReasonCode", + "modelAsString": false + } + } + }, + "description": "Describes scaling information of a SKU." + }, + "ApiManagementSku": { + "properties": { + "resourceType": { + "readOnly": true, + "type": "string", + "description": "The type of resource the SKU applies to." + }, + "name": { + "readOnly": true, + "type": "string", + "description": "The name of SKU." + }, + "tier": { + "readOnly": true, + "type": "string", + "description": "Specifies the tier of virtual machines in a scale set.

Possible Values:

**Standard**

**Basic**" + }, + "size": { + "readOnly": true, + "type": "string", + "description": "The Size of the SKU." + }, + "family": { + "readOnly": true, + "type": "string", + "description": "The Family of this particular SKU." + }, + "kind": { + "readOnly": true, + "type": "string", + "description": "The Kind of resources that are supported in this SKU." + }, + "capacity": { + "$ref": "#/definitions/ApiManagementSkuCapacity", + "readOnly": true, + "description": "Specifies the number of virtual machines in the scale set." + }, + "locations": { + "type": "array", + "readOnly": true, + "items": { + "type": "string" + }, + "description": "The set of locations that the SKU is available." + }, + "locationInfo": { + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/ApiManagementSkuLocationInfo" + }, + "description": "A list of locations and availability zones in those locations where the SKU is available." + }, + "apiVersions": { + "type": "array", + "readOnly": true, + "items": { + "type": "string" + }, + "description": "The api versions that support this SKU." + }, + "costs": { + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/ApiManagementSkuCosts" + }, + "description": "Metadata for retrieving price info." + }, + "capabilities": { + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/ApiManagementSkuCapabilities" + }, + "description": "A name value pair to describe the capability." + }, + "restrictions": { + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/ApiManagementSkuRestrictions" + }, + "description": "The restrictions because of which SKU cannot be used. This is empty if there are no restrictions." + } + }, + "description": "Describes an available ApiManagement SKU." + }, + "ApiManagementSkuLocationInfo": { + "properties": { + "location": { + "readOnly": true, + "type": "string", + "description": "Location of the SKU" + }, + "zones": { + "readOnly": true, + "type": "array", + "items": { + "type": "string" + }, + "description": "List of availability zones where the SKU is supported." + }, + "zoneDetails": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/ApiManagementSkuZoneDetails" + }, + "description": "Details of capabilities available to a SKU in specific zones." + } + } + }, + "ApiManagementSkuRestrictionInfo": { + "properties": { + "locations": { + "readOnly": true, + "type": "array", + "items": { + "type": "string" + }, + "description": "Locations where the SKU is restricted" + }, + "zones": { + "readOnly": true, + "type": "array", + "items": { + "type": "string" + }, + "description": "List of availability zones where the SKU is restricted." + } + } + }, + "ApiManagementSkusResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/ApiManagementSku" + }, + "description": "The list of skus available for the subscription." + }, + "nextLink": { + "type": "string", + "readOnly": true, + "description": "The URI to fetch the next page of Resource Skus. Call ListNext() with this URI to fetch the next page of Resource Skus" + } + }, + "required": [ + "value" + ], + "description": "The List Resource Skus operation response." + } + }, + "parameters": {} +} diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementListSku.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementListSku.json new file mode 100644 index 000000000000..bdb919280922 --- /dev/null +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2020-06-01-preview/examples/ApiManagementListSku.json @@ -0,0 +1,224 @@ +{ + "parameters": { + "api-version": "2020-06-01-preview", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "resourceType": "service", + "name": "Developer", + "locations": [ + "centralindia" + ], + "locationInfo": [ + { + "location": "centralindia", + "zones": [], + "zoneDetails": [] + } + ], + "capacity": { + "minimum": 1, + "maximum": 1, + "default": 1, + "scaleType": "None" + }, + "restrictions": [] + }, + { + "resourceType": "service", + "name": "Standard", + "locations": [ + "centralindia" + ], + "locationInfo": [ + { + "location": "centralindia", + "zones": [], + "zoneDetails": [] + } + ], + "capacity": { + "minimum": 1, + "maximum": 4, + "default": 1, + "scaleType": "Automatic" + }, + "restrictions": [] + }, + { + "resourceType": "service", + "name": "Premium", + "locations": [ + "centralindia" + ], + "locationInfo": [ + { + "location": "centralindia", + "zones": [], + "zoneDetails": [] + } + ], + "capacity": { + "minimum": 1, + "maximum": 10, + "default": 1, + "scaleType": "Automatic" + }, + "restrictions": [] + }, + { + "resourceType": "service", + "name": "Basic", + "locations": [ + "centralindia" + ], + "locationInfo": [ + { + "location": "centralindia", + "zones": [], + "zoneDetails": [] + } + ], + "capacity": { + "minimum": 1, + "maximum": 2, + "default": 1, + "scaleType": "Manual" + }, + "restrictions": [] + }, + { + "resourceType": "service", + "name": "Consumption", + "locations": [ + "centralindia" + ], + "locationInfo": [ + { + "location": "centralindia", + "zones": [], + "zoneDetails": [] + } + ], + "capacity": { + "minimum": 0, + "maximum": 0, + "default": 0, + "scaleType": "None" + }, + "restrictions": [] + }, + { + "resourceType": "service", + "name": "Developer", + "locations": [ + "uaenorth" + ], + "locationInfo": [ + { + "location": "uaenorth", + "zones": [], + "zoneDetails": [] + } + ], + "capacity": { + "minimum": 1, + "maximum": 1, + "default": 1, + "scaleType": "None" + }, + "restrictions": [] + }, + { + "resourceType": "service", + "name": "Standard", + "locations": [ + "uaenorth" + ], + "locationInfo": [ + { + "location": "uaenorth", + "zones": [], + "zoneDetails": [] + } + ], + "capacity": { + "minimum": 1, + "maximum": 4, + "default": 1, + "scaleType": "Automatic" + }, + "restrictions": [] + }, + { + "resourceType": "service", + "name": "Premium", + "locations": [ + "uaenorth" + ], + "locationInfo": [ + { + "location": "uaenorth", + "zones": [], + "zoneDetails": [] + } + ], + "capacity": { + "minimum": 1, + "maximum": 10, + "default": 1, + "scaleType": "Automatic" + }, + "restrictions": [] + }, + { + "resourceType": "service", + "name": "Basic", + "locations": [ + "uaenorth" + ], + "locationInfo": [ + { + "location": "uaenorth", + "zones": [], + "zoneDetails": [] + } + ], + "capacity": { + "minimum": 1, + "maximum": 2, + "default": 1, + "scaleType": "Manual" + }, + "restrictions": [] + }, + { + "resourceType": "service", + "name": "Developer", + "locations": [ + "australiacentral" + ], + "locationInfo": [ + { + "location": "australiacentral", + "zones": [], + "zoneDetails": [] + } + ], + "capacity": { + "minimum": 1, + "maximum": 1, + "default": 1, + "scaleType": "None" + }, + "restrictions": [] + } + ] + } + } + } +} diff --git a/specification/apimanagement/resource-manager/readme.md b/specification/apimanagement/resource-manager/readme.md index 083fc7ffe665..dac51eb9c580 100644 --- a/specification/apimanagement/resource-manager/readme.md +++ b/specification/apimanagement/resource-manager/readme.md @@ -70,6 +70,7 @@ input-file: - Microsoft.ApiManagement/preview/2020-06-01-preview/apimregions.json - Microsoft.ApiManagement/preview/2020-06-01-preview/apimreports.json - Microsoft.ApiManagement/preview/2020-06-01-preview/apimsettings.json + - Microsoft.ApiManagement/preview/2020-06-01-preview/apimskus.json - Microsoft.ApiManagement/preview/2020-06-01-preview/apimsubscriptions.json - Microsoft.ApiManagement/preview/2020-06-01-preview/apimtagresources.json - Microsoft.ApiManagement/preview/2020-06-01-preview/apimtags.json