diff --git a/specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/account.json b/specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/account.json index 5c14fc50ad18..85ec7bf65ce5 100644 --- a/specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/account.json +++ b/specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/account.json @@ -1148,6 +1148,44 @@ } } } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.DataLakeStore/locations/{location}/usages": { + "get": { + "tags": [ + "LocationUsage" + ], + "operationId": "Locations_GetUsage", + "description": "Gets the current usage count and the limit for the resources of the location under the subscription.", + "x-ms-examples": { + "UsageList": { "$ref": "./examples/Locations_GetUsage.json"} + }, + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "name": "location", + "in": "path", + "required": true, + "type": "string", + "description": "The resource location without whitespace." + } + ], + "responses": { + "200": { + "description": "OK -- current usage count and limit retrieved and returned successfully.", + "schema": { + "$ref": "#/definitions/UsageListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } }, "/subscriptions/{subscriptionId}/providers/Microsoft.DataLakeStore/locations/{location}/checkNameAvailability": { "post": { @@ -1844,7 +1882,78 @@ }, "description": "Subscription-level properties and limits for Data Lake Store." }, - "NameAvailabilityInformation": { + "UsageName": { + "properties": { + "value": { + "readOnly": true, + "type": "string", + "description": "Gets a string describing the resource name." + }, + "localizedValue": { + "readOnly": true, + "type": "string", + "description": "Gets a localized string describing the resource name." + } + }, + "description": "The usage names that can be used." + }, + "Usage": { + "properties": { + "unit": { + "readOnly": true, + "type": "string", + "description": "Gets the unit of measurement.", + "enum": [ + "Count", + "Bytes", + "Seconds", + "Percent", + "CountsPerSecond", + "BytesPerSecond" + ], + "x-ms-enum": { + "name": "UsageUnit", + "modelAsString": false + } + }, + "id": { + "readOnly": true, + "type": "string", + "description": "Resource identifier." + }, + "currentValue": { + "readOnly": true, + "type": "integer", + "format": "int32", + "description": "Gets the current count of the allocated resources in the subscription." + }, + "limit": { + "readOnly": true, + "type": "integer", + "format": "int32", + "description": "Gets the maximum count of the resources that can be allocated in the subscription." + }, + "name": { + "$ref": "#/definitions/UsageName", + "readOnly": true, + "description": "Gets the name of the type of usage." + } + }, + "description": "Describes the Resource Usage." + }, + "UsageListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Usage" + }, + "description": "Gets or sets the list of Storage Resource Usages." + } + }, + "description": "The response from the List Usages operation." + }, + "NameAvailabilityInformation": { "properties": { "nameAvailable": { "readOnly": true, diff --git a/specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/Locations_GetUsage.json b/specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/Locations_GetUsage.json new file mode 100644 index 000000000000..9b75317a0aba --- /dev/null +++ b/specification/datalake-store/resource-manager/Microsoft.DataLakeStore/stable/2016-11-01/examples/Locations_GetUsage.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "location": "WestUS", + "api-version": "2016-11-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "unit": "Count", + "id": "/subscriptions/0f936178-0d48-4777-a7ab-47860b604941/providers/Microsoft.DataLakeStore/locations/WestUS/usages/DataLakeStoreAccounts", + "currentValue": 69, + "limit": -1, + "name": { + "value": "DataLakeStoreAccounts", + "localizedValue": "Data Lake Store Accounts" + } + } + ] + } + } + } +} \ No newline at end of file