diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/ManagedEnvironments.json b/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/ManagedEnvironments.json index 0a0ab91dc88b..da31aaecf87a 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/ManagedEnvironments.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/ManagedEnvironments.json @@ -677,10 +677,6 @@ "$ref": "#/definitions/EnvironmentAuthToken" } }, - "404": { - "description": "Not found.", - "x-ms-error-response": true - }, "default": { "description": "Error response.", "schema": { @@ -694,6 +690,56 @@ } } } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/workloadProfileStates": { + "get": { + "tags": [ + "ManagedEnvironments" + ], + "summary": "Get all workload Profile States for a Premium Managed Environment..", + "description": "Get all workload Profile States for a Premium Managed Environment.", + "operationId": "ManagedEnvironments_ListWorkloadProfileStates", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "environmentName", + "in": "path", + "description": "Name of the Managed Environment.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/workloadProfileStatesCollection" + } + }, + "default": { + "description": "Common error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List environments by subscription": { + "$ref": "./examples/ManagedEnvironments_ListWorkloadProfileStates.json" + } + } + } } }, "definitions": { @@ -1025,6 +1071,59 @@ "required": [ "name" ] + }, + "workloadProfileStates": { + "description": "Collection of all the workload Profile States for a Premium Managed Environment..", + "type": "object", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "description": "Workload Profile resource specific properties.", + "type": "object", + "properties": { + "minimumCount": { + "type": "integer", + "format": "int32", + "description": "Minimum count of instances." + }, + "maximumCount": { + "type": "integer", + "format": "int32", + "description": "Maximum count of nodes." + }, + "currentCount": { + "type": "integer", + "format": "int32", + "description": "Current count of nodes." + } + } + } + } + }, + "workloadProfileStatesCollection": { + "description": "Collection of workloadProfileStates", + "required": [ + "value" + ], + "type": "object", + "properties": { + "value": { + "description": "Collection of resources.", + "type": "array", + "items": { + "$ref": "#/definitions/workloadProfileStates" + } + }, + "nextLink": { + "description": "Link to next page of resources.", + "type": "string", + "readOnly": true + } + } } }, "securityDefinitions": { diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_ListWorkloadProfileStates.json b/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_ListWorkloadProfileStates.json new file mode 100644 index 000000000000..d6589646e8c1 --- /dev/null +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_ListWorkloadProfileStates.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "subscriptionId": "8efdecc5-919e-44eb-b179-915dca89ebf9", + "resourceGroupName": "examplerg", + "environmentName": "jlaw-demo1", + "api-version": "2022-06-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/55f240e3-3d66-44f6-8358-4e4f3d7a2e51/providers/Microsoft.App/workloadProfileStates/GP1", + "name": "GP1", + "type": "/providers/Microsoft.App/workloadProfileStates", + "properties": { + "minimumCount": 3, + "maximumCount": 10, + "currentCount": 3 + } + }, + { + "id": "/subscriptions/55f240e3-3d66-44f6-8358-4e4f3d7a2e51/providers/Microsoft.App/workloadProfileStates/MO3", + "name": "MO3", + "type": "/providers/Microsoft.App/workloadProfileStates", + "properties": { + "minimumCount": 0, + "maximumCount": 2, + "currentCount": 0 + } + } + ] + } + } + } +}