{ "swagger": "2.0", "info": { "title": "SqlManagementClient", "version": "2025-01-01", "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities.", "x-typespec-generated": [ { "emitter": "@azure-tools/typespec-autorest" } ] }, "schemes": [ "https" ], "host": "management.azure.com", "produces": [ "application/json" ], "consumes": [ "application/json" ], "security": [ { "azure_auth": [ "user_impersonation" ] } ], "securityDefinitions": { "azure_auth": { "type": "oauth2", "description": "Azure Active Directory OAuth2 Flow.", "flow": "implicit", "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", "scopes": { "user_impersonation": "impersonate your user account" } } }, "tags": [ { "name": "SubscriptionUsages" } ], "paths": { "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/usages": { "get": { "operationId": "SubscriptionUsages_ListByLocation", "tags": [ "SubscriptionUsages" ], "description": "Gets all subscription usage metrics in a given location.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "name": "locationName", "in": "path", "description": "The name of the region where the resource is located.", "required": true, "type": "string" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/SubscriptionUsageListResult" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "List subscription usages in the given location.": { "$ref": "./examples/SubscriptionUsageListByLocation.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/usages/{usageName}": { "get": { "operationId": "SubscriptionUsages_Get", "tags": [ "SubscriptionUsages" ], "description": "Gets a subscription usage metric.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "name": "locationName", "in": "path", "description": "The name of the region where the resource is located.", "required": true, "type": "string" }, { "name": "usageName", "in": "path", "description": "Name of usage metric to return.", "required": true, "type": "string" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/SubscriptionUsage" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Get specific subscription usage in the given location.": { "$ref": "./examples/SubscriptionUsageGet.json" } } } } }, "definitions": { "SubscriptionUsage": { "type": "object", "description": "Usage Metric of a Subscription in a Location.", "properties": { "properties": { "$ref": "#/definitions/SubscriptionUsageProperties", "description": "Resource properties.", "x-ms-client-flatten": true } }, "allOf": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" } ] }, "SubscriptionUsageListResult": { "type": "object", "description": "The response of a SubscriptionUsage list operation.", "properties": { "value": { "type": "array", "description": "The SubscriptionUsage items on this page", "items": { "$ref": "#/definitions/SubscriptionUsage" } }, "nextLink": { "type": "string", "format": "uri", "description": "The link to the next page of items" } }, "required": [ "value" ] }, "SubscriptionUsageProperties": { "type": "object", "description": "Properties of a subscription usage.", "properties": { "displayName": { "type": "string", "description": "User-readable name of the metric.", "readOnly": true }, "currentValue": { "type": "number", "format": "double", "description": "Current value of the metric.", "readOnly": true }, "limit": { "type": "number", "format": "double", "description": "Boundary value of the metric.", "readOnly": true }, "unit": { "type": "string", "description": "Unit of the metric.", "readOnly": true } } } }, "parameters": {} }