Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
{
"swagger": "2.0",
"info": {
"version": "2023-05-02-preview",
"title": "ContainerApps API Client"
},
"host": "management.azure.com",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/subscriptions/{subscriptionId}/providers/Microsoft.App/locations/{location}/usages": {
"get": {
"tags": [
"Usages"
],
"operationId": "Usages_List",
"description": "Gets, for the specified location, the current resource usage information as well as the limits under the subscription.",
"parameters": [
{
"name": "location",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

location

Just FYI, location can also be used from common types.

"in": "path",
"required": true,
"type": "string",
"description": "The location for which resource usage is queried.",
"pattern": "^[-\\w\\._]+$"
},
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/ListUsagesResult"
}
},
"default": {
"description": "Common error response.",
"schema": {
"$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-examples": {
"List usages": {
"$ref": "./examples/Usages_List.json"
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/usages": {
"get": {
"tags": [
"Usages"
],
"operationId": "ManagedEnvironmentUsages_List",
"description": "Gets the current usage information as well as the limits for environment.",
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter"
},
{
"name": "environmentName",
"in": "path",
"description": "Name of the Environment.",
"required": true,
"type": "string",
"pattern": "^[-\\w\\._]+$"
},
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/ListUsagesResult"
}
},
"default": {
"description": "Common error response.",
"schema": {
"$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-examples": {
"List managed environment usages": {
"$ref": "./examples/ManagedEnvironmentUsages_List.json"
}
}
}
}
},
"definitions": {
"UsageName": {
"type": "object",
"properties": {
"value": {
"type": "string",
"description": "The name of the resource."
},
"localizedValue": {
"type": "string",
"description": "The localized name of the resource."
}
},
"description": "The Usage Names."
},
"Usage": {
"type": "object",
"properties": {
"unit": {
"type": "string",
"description": "An enum describing the unit of usage measurement.",
"enum": [
"Count"
],
"x-ms-enum": {
"name": "UsageUnit",
"modelAsString": false
}
},
"currentValue": {
"type": "integer",
"format": "int32",
"description": "The current usage of the resource."
},
"limit": {
"type": "integer",
"format": "int64",
"description": "The maximum permitted usage of the resource."
},
"name": {
"$ref": "#/definitions/UsageName",
"description": "The name of the type of usage."
}
},
"required": [
"unit",
"currentValue",
"limit",
"name"
],
"description": "Describes Compute Resource Usage."
},
"ListUsagesResult": {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Schema should have a description or title.

"type": "object",
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/Usage"
},
"x-ms-identifiers": [
"name"
],
"description": "The list of compute resource usages."
},
"nextLink": {
"type": "string",
"description": "The URI to fetch the next page of compute resource usage information. Call ListNext() with this to fetch the next page of compute resource usage information."
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"parameters": {
"api-version": "2023-05-02-preview",
"subscriptionId": "subid",
"resourceGroupName": "examplerg",
"environmentName": "jlaw-demo1"
},
"responses": {
"200": {
"body": {
"value": [
{
"currentValue": 5,
"limit": 10,
"name": {
"localizedValue": "Managed Environment Consumption Cores",
"value": "ManagedEnvironmentConsumptionCores"
},
"unit": "Count"
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"parameters": {
"location": "westus",
"api-version": "2023-05-02-preview",
"subscriptionId": "subid"
},
"responses": {
"200": {
"body": {
"value": [
{
"currentValue": 5,
"limit": 10,
"name": {
"localizedValue": "ManagedEnvironmentCount",
"value": "ManagedEnvironmentCount"
},
"unit": "Count"
},
{
"currentValue": 3,
"limit": 20,
"name": {
"localizedValue": "ManagedEnvironmentCores",
"value": "ManagedEnvironmentCores"
},
"unit": "Count"
}
]
}
}
}
}
1 change: 1 addition & 0 deletions specification/app/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ input-file:
- Microsoft.App/preview/2023-05-02-preview/ManagedEnvironmentsStorages.json
- Microsoft.App/preview/2023-05-02-preview/SourceControls.json
- Microsoft.App/preview/2023-05-02-preview/Subscriptions.json
- Microsoft.App/preview/2023-05-02-preview/Usages.json
```
### Tag: package-preview-2023-04

Expand Down