From 94983547ad4946b1944549f7b03005b2c9524f9e Mon Sep 17 00:00:00 2001 From: sabherwalshruti <87324218+sabherwalshruti@users.noreply.github.com> Date: Wed, 22 Sep 2021 08:24:01 +0530 Subject: [PATCH] Create a new resource workload for hpcworkbench resource provider (#4625) * Added new resource workload * Updated consortium tags and definitions * Resolved pr comments * Updated sku definition * updated workload properties * fixed validation error * Fixed consortium properties * Added cli access type in consortium * fixed consortium.json * Resolved comments * Fixed validation error * Removed location from examples * fixed model validation error * Removed List by ResourceGroup and List by Subscription for workload --- .../2021-03-01-preview/consortium.json | 209 +++++++- .../examples/WorkloadCreateOrUpdate.json | 45 ++ .../examples/WorkloadDelete.json | 16 + .../examples/WorkloadGet.json | 24 + .../examples/WorkloadList.json | 37 ++ .../examples/WorkloadPatch.json | 24 + .../2021-03-01-preview/hpcworkbench.json | 182 +------ .../preview/2021-03-01-preview/workload.json | 462 ++++++++++++++++++ .../hpcworkbench/resource-manager/readme.md | 1 + 9 files changed, 815 insertions(+), 185 deletions(-) create mode 100644 specification/hpcworkbench/resource-manager/Microsoft.HpcWorkbench/preview/2021-03-01-preview/examples/WorkloadCreateOrUpdate.json create mode 100644 specification/hpcworkbench/resource-manager/Microsoft.HpcWorkbench/preview/2021-03-01-preview/examples/WorkloadDelete.json create mode 100644 specification/hpcworkbench/resource-manager/Microsoft.HpcWorkbench/preview/2021-03-01-preview/examples/WorkloadGet.json create mode 100644 specification/hpcworkbench/resource-manager/Microsoft.HpcWorkbench/preview/2021-03-01-preview/examples/WorkloadList.json create mode 100644 specification/hpcworkbench/resource-manager/Microsoft.HpcWorkbench/preview/2021-03-01-preview/examples/WorkloadPatch.json create mode 100644 specification/hpcworkbench/resource-manager/Microsoft.HpcWorkbench/preview/2021-03-01-preview/workload.json diff --git a/specification/hpcworkbench/resource-manager/Microsoft.HpcWorkbench/preview/2021-03-01-preview/consortium.json b/specification/hpcworkbench/resource-manager/Microsoft.HpcWorkbench/preview/2021-03-01-preview/consortium.json index c695f9b091ca..f700539294f4 100644 --- a/specification/hpcworkbench/resource-manager/Microsoft.HpcWorkbench/preview/2021-03-01-preview/consortium.json +++ b/specification/hpcworkbench/resource-manager/Microsoft.HpcWorkbench/preview/2021-03-01-preview/consortium.json @@ -80,7 +80,7 @@ "in": "body", "description": "Parameters supplied to the create or update consortium operation.", "schema": { - "$ref": "./hpcworkbench.json#/definitions/Consortium" + "$ref": "#/definitions/Consortium" } } ], @@ -88,13 +88,13 @@ "200": { "description": "Update successful. The operation returns the resulting Consortium resource.", "schema": { - "$ref": "./hpcworkbench.json#/definitions/Consortium" + "$ref": "#/definitions/Consortium" } }, "201": { "description": "Create successful. The operation returns the resulting Consortium resource.", "schema": { - "$ref": "./hpcworkbench.json#/definitions/Consortium" + "$ref": "#/definitions/Consortium" } }, "default": { @@ -168,7 +168,7 @@ "in": "body", "description": "Parameters supplied to the create or update consortium operation.", "schema": { - "$ref": "./hpcworkbench.json#/definitions/Consortium" + "$ref": "#/definitions/Consortium" } } ], @@ -176,13 +176,13 @@ "200": { "description": "Update successful. The operation returns the resulting Consortium resource.", "schema": { - "$ref": "./hpcworkbench.json#/definitions/Consortium" + "$ref": "#/definitions/Consortium" } }, "201": { "description": "Create successful. The operation returns the resulting Consortium resource.", "schema": { - "$ref": "./hpcworkbench.json#/definitions/Consortium" + "$ref": "#/definitions/Consortium" } }, "default": { @@ -248,7 +248,7 @@ "200": { "description": "Request is successful. The operation returns the specified consortium.", "schema": { - "$ref": "./hpcworkbench.json#/definitions/Consortium" + "$ref": "#/definitions/Consortium" } }, "default": { @@ -314,7 +314,7 @@ "200": { "description": "The operation is completed successfully", "schema": { - "$ref": "./hpcworkbench.json#/definitions/Consortium" + "$ref": "#/definitions/Consortium" } }, "204": { @@ -378,7 +378,7 @@ "200": { "description": "Request is successful. The operation returns the list of all consortiums", "schema": { - "$ref": "./hpcworkbench.json#/definitions/ConsortiumPageableList" + "$ref": "#/definitions/ConsortiumPageableList" } }, "default": { @@ -435,7 +435,7 @@ "200": { "description": "Request is successful. The operation returns the list of all consortiums", "schema": { - "$ref": "./hpcworkbench.json#/definitions/ConsortiumPageableList" + "$ref": "#/definitions/ConsortiumPageableList" } }, "default": { @@ -485,7 +485,7 @@ "200": { "description": "Request is successful. The operation returns the list of all consortiums", "schema": { - "$ref": "./hpcworkbench.json#/definitions/ConsortiumPageableList" + "$ref": "#/definitions/ConsortiumPageableList" } }, "default": { @@ -513,5 +513,192 @@ } } } + }, + "definitions": { + "RemoteDesktop": { + "type": "object", + "description": "Remote Desktop properties.", + "properties": { + "etx": { + "$ref": "#/definitions/Etx", + "description": "The etx object." + } + } + }, + "Etx": { + "type": "object", + "properties": { + "connectionNodeCount": { + "type": "integer", + "format": "int32", + "description": "The connection node count." + }, + "licenseActivated": { + "description": "The license activated.", + "type": "boolean" + } + }, + "description": "Etx properties." + }, + "AccessConfiguration": { + "type": "object", + "description": "Access configuration properties.", + "properties": { + "accessType": { + "description": "Gets or sets the AccessType.", + "type": "string", + "readOnly": true, + "enum": [ + "CLI", + "GUI" + ], + "x-ms-enum": { + "name": "AccessType", + "modelAsString": true + } + }, + "gatewayType": { + "description": "Gets or sets the GatewayType.", + "type": "string", + "readOnly": true, + "enum": [ + "ExpressRoute", + "None", + "Vpn" + ], + "x-ms-enum": { + "name": "GatewayType", + "modelAsString": true + } + }, + "gatewayVnetId": { + "type": "string", + "description": "Gets or sets the GatewayVnetId." + }, + "accessUrl": { + "type": "string", + "description": "Gets or sets the AccessUrl." + }, + "ipAddress": { + "type": "string", + "description": "Gets or sets the IpAddress." + } + } + }, + "ConsortiumPageableList": { + "description": "Microsoft.Sdw.Core.ResourceMetadata.PageableList implementation specific to pageable lists of Microsoft.Sdw.Core.ResourceMetadata.AzureResource`1.", + "type": "object", + "properties": { + "nextLink": { + "description": "Gets or sets the URL (link) to the next result set.", + "type": "string" + }, + "value": { + "description": "Gets or sets the values to emit from this list.", + "type": "array", + "items": { + "$ref": "#/definitions/Consortium" + } + } + } + }, + "ConsortiumPropertiesFormat": { + "type": "object", + "properties": { + "sku": { + "description": "Gets or sets the SKU.", + "type": "string" + }, + "kind": { + "description": "Gets or sets the Kind.", + "type": "string" + }, + "managedBy": { + "description": "Gets or sets the Managed By value.", + "type": "string" + }, + "zones": { + "description": "Gets or sets the Zones.", + "type": "array", + "items": { + "type": "string" + } + }, + "plan": { + "description": "Gets or sets the Plan.", + "type": "object", + "additionalProperties": {} + }, + "identity": { + "description": "Gets or sets the Identity.", + "type": "object", + "additionalProperties": {} + }, + "vmSize": { + "description": "Gets or sets the VmSize.", + "type": "string" + }, + "allowedPublicIps": { + "description": "Gets or sets the AllowedPublicIps.", + "type": "array", + "items": { + "type": "string" + } + }, + "userInterfaceMode": { + "description": "Gets or sets the UserInterfaceMode.", + "type": "string" + }, + "accessType": { + "description": "Gets or sets the Access Type.", + "type": "string", + "readOnly": true, + "enum": [ + "CLI", + "GUI" + ], + "x-ms-enum": { + "name": "AccessType", + "modelAsString": true + } + }, + "accessConfigurations": { + "type": "object", + "items": { + "$ref": "#/definitions/AccessConfiguration" + }, + "description": "Gets or sets the Access Configuration." + }, + "remoteDesktop": { + "type": "object", + "items": { + "$ref": "#/definitions/RemoteDesktop" + }, + "description": "Gets or sets the Remote Desktop." + }, + "provisioningState": { + "$ref": "./hpcworkbench.json#/definitions/ProvisioningState", + "description": "Gets the status of the consortium at the time the operation was called" + } + }, + "description": "Consortium properties." + }, + "Consortium": { + "description": "Consortium resource", + "type": "object", + "x-ms-azure-resource": true, + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ConsortiumPropertiesFormat", + "description": "Consortium properties." + } + }, + "allOf": [ + { + "$ref": "./hpcworkbench.json#/definitions/Resource" + } + ] + } } } diff --git a/specification/hpcworkbench/resource-manager/Microsoft.HpcWorkbench/preview/2021-03-01-preview/examples/WorkloadCreateOrUpdate.json b/specification/hpcworkbench/resource-manager/Microsoft.HpcWorkbench/preview/2021-03-01-preview/examples/WorkloadCreateOrUpdate.json new file mode 100644 index 000000000000..a33ae0468b2d --- /dev/null +++ b/specification/hpcworkbench/resource-manager/Microsoft.HpcWorkbench/preview/2021-03-01-preview/examples/WorkloadCreateOrUpdate.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "subscriptionId": "d9f252e3-8046-4707-bfbd-e5b9e6011e07", + "resourceGroup": "resourceGroup", + "api-version": "2021-03-01-preview", + "instanceName": "test-instance", + "chamberName": "test-chamber", + "workloadName": "test-workload", + "workload": { + "properties": { + "location": "Central US", + "properties": { + "vmSize": "Standard_HC44rs", + "edaType": "Common" + } + } + } + }, + "responses": { + "200": { + "body": { + "name": "test-workload", + "id": "/subscriptions/d9f252e3-8046-4707-bfbd-e5b9e6011e07/resourceGroups/resourceGroup/providers/Microsoft.HpcWorkbench/instances/test-instance/chambers/test-chamber/workloads/test-workload", + "type": "Microsoft.HpcWorkbench/instances/chambers/workloads", + "properties": { + "provisioningState": "Succeeded", + "vmSize": "Standard_D4d_v4", + "edaType": "Common" + } + } + }, + "201": { + "body": { + "name": "test-workload", + "id": "/subscriptions/d9f252e3-8046-4707-bfbd-e5b9e6011e07/resourceGroups/resourceGroup/providers/Microsoft.HpcWorkbench/instances/test-instance/chambers/test-chamber/workloads/test-workload", + "type": "Microsoft.HpcWorkbench/instances/chambers/workloads", + "properties": { + "provisioningState": "Succeeded", + "vmSize": "Standard_D4d_v4", + "edaType": "Common" + } + } + } + } +} diff --git a/specification/hpcworkbench/resource-manager/Microsoft.HpcWorkbench/preview/2021-03-01-preview/examples/WorkloadDelete.json b/specification/hpcworkbench/resource-manager/Microsoft.HpcWorkbench/preview/2021-03-01-preview/examples/WorkloadDelete.json new file mode 100644 index 000000000000..8409e384ed86 --- /dev/null +++ b/specification/hpcworkbench/resource-manager/Microsoft.HpcWorkbench/preview/2021-03-01-preview/examples/WorkloadDelete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "subscriptionId": "d9f252e3-8046-4707-bfbd-e5b9e6011e07", + "resourceGroup": "resourceGroup", + "api-version": "2021-03-01-preview", + "instanceName": "test-instance", + "chamberName": "test-chamber", + "workloadName": "test-workload" + }, + "responses": { + "200": { + "body": {} + }, + "204": {} + } +} diff --git a/specification/hpcworkbench/resource-manager/Microsoft.HpcWorkbench/preview/2021-03-01-preview/examples/WorkloadGet.json b/specification/hpcworkbench/resource-manager/Microsoft.HpcWorkbench/preview/2021-03-01-preview/examples/WorkloadGet.json new file mode 100644 index 000000000000..93973db22826 --- /dev/null +++ b/specification/hpcworkbench/resource-manager/Microsoft.HpcWorkbench/preview/2021-03-01-preview/examples/WorkloadGet.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "subscriptionId": "d9f252e3-8046-4707-bfbd-e5b9e6011e07", + "resourceGroup": "resourceGroup", + "api-version": "2021-03-01-preview", + "instanceName": "test-instance", + "chamberName": "test-chamber", + "workloadName": "test-workload" + }, + "responses": { + "200": { + "body": { + "name": "test-workload", + "id": "/subscriptions/d9f252e3-8046-4707-bfbd-e5b9e6011e07/resourceGroups/resourceGroup/providers/Microsoft.HpcWorkbench/instances/test-instance/chambers/test-chamber/workloads/test-workload", + "type": "Microsoft.HpcWorkbench/instances/chambers/workloads", + "properties": { + "provisioningState": "Succeeded", + "vmSize": "Standard_D4d_v4", + "edaType": "Common" + } + } + } + } +} diff --git a/specification/hpcworkbench/resource-manager/Microsoft.HpcWorkbench/preview/2021-03-01-preview/examples/WorkloadList.json b/specification/hpcworkbench/resource-manager/Microsoft.HpcWorkbench/preview/2021-03-01-preview/examples/WorkloadList.json new file mode 100644 index 000000000000..edf8bad3bc9e --- /dev/null +++ b/specification/hpcworkbench/resource-manager/Microsoft.HpcWorkbench/preview/2021-03-01-preview/examples/WorkloadList.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "subscriptionId": "d9f252e3-8046-4707-bfbd-e5b9e6011e07", + "resourceGroup": "resourceGroup", + "api-version": "2021-03-01-preview", + "instanceName": "test-instance", + "chamberName": "test-chamber" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "test-workload1", + "id": "/subscriptions/d9f252e3-8046-4707-bfbd-e5b9e6011e07/resourceGroups/rg1/providers/Microsoft.HpcWorkbench/instances/test-instance1/chambers/test-chamber1/workloads/test-workload1", + "type": "Microsoft.HpcWorkbench/instances/chambers/workloads", + "properties": { + "provisioningState": "Succeeded", + "vmSize": "Standard_D4d_v4", + "edaType": "Common" + } + }, + { + "name": "test-workload2", + "id": "/subscriptions/d9f252e3-8046-4707-bfbd-e5b9e6011e07/resourceGroups/rg2/providers/Microsoft.HpcWorkbench/instances/test-instance2/chambers/test-chamber2/workloads/test-workload2", + "type": "Microsoft.HpcWorkbench/instances/chambers/workloads", + "properties": { + "provisioningState": "Succeeded", + "vmSize": "Standard_D4d_v4", + "edaType": "Common" + } + } + ] + } + } + } +} diff --git a/specification/hpcworkbench/resource-manager/Microsoft.HpcWorkbench/preview/2021-03-01-preview/examples/WorkloadPatch.json b/specification/hpcworkbench/resource-manager/Microsoft.HpcWorkbench/preview/2021-03-01-preview/examples/WorkloadPatch.json new file mode 100644 index 000000000000..d9a2d8c55362 --- /dev/null +++ b/specification/hpcworkbench/resource-manager/Microsoft.HpcWorkbench/preview/2021-03-01-preview/examples/WorkloadPatch.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "api-version": "2021-03-01-preview", + "subscriptionId": "d9f252e3-8046-4707-bfbd-e5b9e6011e07", + "resourceGroup": "rg1", + "instanceName": "test-instance", + "chamberName": "test-chamber", + "workloadName": "test-workload" + }, + "responses": { + "200": { + "body": { + "name": "test-workload", + "id": "/subscriptions/d9f252e3-8046-4707-bfbd-e5b9e6011e07/resourceGroups/resourceGroup/providers/Microsoft.HpcWorkbench/instances/test-instance/chambers/test-chamber/workloads/test-workload", + "type": "Microsoft.HpcWorkbench/instances/chambers/workloads", + "properties": { + "provisioningState": "Succeeded", + "vmSize": "Standard_D4d_v4", + "edaType": "Common" + } + } + } + } +} diff --git a/specification/hpcworkbench/resource-manager/Microsoft.HpcWorkbench/preview/2021-03-01-preview/hpcworkbench.json b/specification/hpcworkbench/resource-manager/Microsoft.HpcWorkbench/preview/2021-03-01-preview/hpcworkbench.json index 2249270ef2f1..d0d7dbef9bf7 100644 --- a/specification/hpcworkbench/resource-manager/Microsoft.HpcWorkbench/preview/2021-03-01-preview/hpcworkbench.json +++ b/specification/hpcworkbench/resource-manager/Microsoft.HpcWorkbench/preview/2021-03-01-preview/hpcworkbench.json @@ -602,190 +602,24 @@ ], "description": "Instance resource" }, - "RemoteDesktop": { + "Sku": { "type": "object", - "description": "Remote Desktop properties.", "properties": { - "etx": { - "$ref": "#/definitions/Etx", - "description": "The etx object." - } - } - }, - "Etx": { - "type": "object", - "properties": { - "connectionNodeCount": { - "type": "integer", - "format": "int32", - "description": "The connection node count." - }, - "licenseActivated": { - "description": "The license activated.", - "type": "boolean" - } - }, - "description": "Etx properties." - }, - "AccessConfiguration": { - "type": "object", - "description": "Access configuration properties.", - "properties": { - "accessType": { - "description": "Gets or sets the AccessType.", - "type": "string", - "readOnly": true, - "enum": [ - "CLI", - "GUI" - ], - "x-ms-enum": { - "name": "AccessType", - "modelAsString": true - } - }, - "gatewayType": { - "description": "Gets or sets the GatewayType.", - "type": "string", - "readOnly": true, - "enum": [ - "ExpressRoute", - "None", - "Vpn" - ], - "x-ms-enum": { - "name": "GatewayType", - "modelAsString": true - } - }, - "gatewayVnetId": { - "type": "string", - "description": "Gets or sets the GatewayVnetId." - }, - "accessUrl": { - "type": "string", - "description": "Gets or sets the AccessUrl." - }, - "ipAddress": { - "type": "string", - "description": "Gets or sets the IpAddress." - } - } - }, - "ConsortiumPageableList": { - "description": "Microsoft.Sdw.Core.ResourceMetadata.PageableList implementation specific to pageable lists of Microsoft.Sdw.Core.ResourceMetadata.AzureResource`1.", - "type": "object", - "properties": { - "nextLink": { - "description": "Gets or sets the URL (link) to the next result set.", - "type": "string" - }, - "value": { - "description": "Gets or sets the values to emit from this list.", - "type": "array", - "items": { - "$ref": "#/definitions/Consortium" - } - } - } - }, - "ConsortiumPropertiesFormat": { - "type": "object", - "properties": { - "sku": { - "description": "Gets or sets the SKU.", - "type": "string" - }, - "kind": { - "description": "Gets or sets the Kind.", - "type": "string" - }, - "managedBy": { - "description": "Gets or sets the Managed By value.", - "type": "string" - }, - "zones": { - "description": "Gets or sets the Zones.", - "type": "array", - "items": { - "type": "string" - } - }, - "plan": { - "description": "Gets or sets the Plan.", - "type": "object", - "additionalProperties": {} - }, - "identity": { - "description": "Gets or sets the Identity.", - "type": "object", - "additionalProperties": {} - }, - "vmSize": { - "description": "Gets or sets the VmSize.", - "type": "string" - }, - "allowedPublicIps": { - "description": "Gets or sets the AllowedPublicIps.", - "type": "array", - "items": { - "type": "string" - } - }, - "userInterfaceMode": { - "description": "Gets or sets the UserInterfaceMode.", - "type": "string" - }, - "accessType": { - "description": "Gets or sets the Access Type.", + "name": { "type": "string", - "readOnly": true, + "description": "Name of SKU.", "enum": [ - "CLI", - "GUI" + "Basic", + "Standard", + "Premium" ], "x-ms-enum": { - "name": "AccessType", + "name": "SkuName", "modelAsString": true } - }, - "accessConfigurations": { - "type": "object", - "items": { - "$ref": "#/definitions/AccessConfiguration" - }, - "description": "Gets or sets the Access Configuration." - }, - "remoteDesktop": { - "type": "object", - "items": { - "$ref": "#/definitions/RemoteDesktop" - }, - "description": "Gets or sets the Remote Desktop." - }, - "provisioningState": { - "$ref": "#/definitions/ProvisioningState", - "description": "Gets the status of the consortium at the time the operation was called" } }, - "description": "Consortium properties." - }, - "Consortium": { - "description": "Consortium resource", - "type": "object", - "x-ms-azure-resource": true, - "properties": { - "properties": { - "x-ms-client-flatten": true, - "$ref": "#/definitions/ConsortiumPropertiesFormat", - "description": "Consortium properties." - } - }, - "allOf": [ - { - "$ref": "#/definitions/Resource" - } - ] + "description": "The resource model definition representing SKU." } } } diff --git a/specification/hpcworkbench/resource-manager/Microsoft.HpcWorkbench/preview/2021-03-01-preview/workload.json b/specification/hpcworkbench/resource-manager/Microsoft.HpcWorkbench/preview/2021-03-01-preview/workload.json new file mode 100644 index 000000000000..f76be04dac5b --- /dev/null +++ b/specification/hpcworkbench/resource-manager/Microsoft.HpcWorkbench/preview/2021-03-01-preview/workload.json @@ -0,0 +1,462 @@ +{ + "swagger": "2.0", + "info": { + "title": "Microsoft.HpcWorkbench", + "description": "Microsoft.HpcWorkbench resource provider OpenAPI Spec", + "version": "2021-03-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}/resourceGroups/{resourceGroup}/providers/Microsoft.HpcWorkbench/instances/{instanceName}/chambers/{chamberName}/workloads/{workloadName}": { + "put": { + "tags": [ + "Workloads_CreateOrUpdate" + ], + "operationId": "Workloads_CreateOrUpdate", + "description": "Creates or updates the specified workload.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "name": "resourceGroup", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "instanceName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the instance." + }, + { + "name": "chamberName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the chamber." + }, + { + "name": "workloadName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the workload." + }, + { + "name": "parameters", + "in": "body", + "description": "Parameters supplied to the create or update workload operation.", + "schema": { + "$ref": "#/definitions/Workload" + } + } + ], + "responses": { + "200": { + "description": "Update successful. The operation returns the resulting workload resource.", + "schema": { + "$ref": "#/definitions/Workload" + } + }, + "201": { + "description": "Create successful. The operation returns the resulting workload resource.", + "schema": { + "$ref": "#/definitions/Workload" + } + }, + "default": { + "description": "Default Error Response", + "schema": { + "$ref": "./hpcworkbench.json#/definitions/ErrorResponse" + }, + "x-ms-error-response": true + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-examples": { + "Create Workload": { + "$ref": "./examples/WorkloadCreateOrUpdate.json" + } + } + }, + "patch": { + "tags": [ + "Workloads_Update" + ], + "operationId": "Workloads_Update", + "description": "Updates the specified workload.", + "consumes": [ + "application/merge-patch+json", + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "name": "resourceGroup", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "instanceName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the instance." + }, + { + "name": "chamberName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the chamber." + }, + { + "name": "workloadName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the workload." + }, + { + "name": "parameters", + "in": "body", + "description": "Parameters supplied to the create or update workload operation.", + "schema": { + "$ref": "#/definitions/Workload" + } + } + ], + "responses": { + "200": { + "description": "Update successful. The operation returns the resulting workload resource.", + "schema": { + "$ref": "#/definitions/Workload" + } + }, + "default": { + "description": "Default Error Response", + "schema": { + "$ref": "./hpcworkbench.json#/definitions/ErrorResponse" + }, + "x-ms-error-response": true + } + }, + "x-ms-examples": { + "Update workload": { + "$ref": "./examples/WorkloadPatch.json" + } + } + }, + "get": { + "tags": [ + "Workloads_Get" + ], + "operationId": "Workloads_Get", + "description": "Gets information about the specified workload.", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "name": "resourceGroup", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "instanceName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the instance." + }, + { + "name": "chamberName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the chamber." + }, + { + "name": "workloadName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the workload." + } + ], + "responses": { + "200": { + "description": "Request is successful. The operation returns the specified workload.", + "schema": { + "$ref": "#/definitions/Workload" + } + }, + "default": { + "description": "Default Error Response", + "schema": { + "$ref": "./hpcworkbench.json#/definitions/ErrorResponse" + }, + "x-ms-error-response": true + } + }, + "x-ms-examples": { + "Get Workload": { + "$ref": "./examples/WorkloadGet.json" + } + } + }, + "delete": { + "tags": [ + "Workloads_Delete" + ], + "operationId": "Workloads_Delete", + "description": "Deletes the specified workload.", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "name": "resourceGroup", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "instanceName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the instance." + }, + { + "name": "chamberName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the chamber." + }, + { + "name": "workloadName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the workload." + } + ], + "responses": { + "200": { + "description": "The operation is completed successfully", + "schema": { + "$ref": "#/definitions/Workload" + } + }, + "204": { + "description": "Request is successful. Resource with the specified name does not exist." + }, + "default": { + "description": "Default Error Response", + "schema": { + "$ref": "./hpcworkbench.json#/definitions/ErrorResponse" + }, + "x-ms-error-response": true + } + }, + "x-ms-examples": { + "Delete Workload": { + "$ref": "./examples/WorkloadDelete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.HpcWorkbench/instances/{instanceName}/chambers/{chamberName}/workloads": { + "get": { + "tags": [ + "Workloads_List" + ], + "operationId": "Workloads_List", + "description": "Lists all workloads.", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "name": "resourceGroup", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "instanceName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the instance." + }, + { + "name": "chamberName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the chamber." + } + ], + "responses": { + "200": { + "description": "Request is successful. The operation returns the list of all workloads", + "schema": { + "$ref": "#/definitions/WorkloadPageableList" + } + }, + "default": { + "description": "Default Error Response", + "schema": { + "$ref": "./hpcworkbench.json#/definitions/ErrorResponse" + }, + "x-ms-error-response": true + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List all workloads": { + "$ref": "./examples/WorkloadList.json" + } + } + } + } + }, + "definitions": { + "WorkloadPageableList": { + "description": "Microsoft.Sdw.Core.ResourceMetadata.PageableList implementation specific to pageable lists of Microsoft.Sdw.Core.ResourceMetadata.AzureResource`1.", + "type": "object", + "properties": { + "nextLink": { + "description": "Gets or sets the URL (link) to the next result set.", + "type": "string" + }, + "value": { + "description": "Gets or sets the values to emit from this list.", + "type": "array", + "items": { + "$ref": "#/definitions/Workload" + } + } + } + }, + "WorkloadPropertiesFormat": { + "description": "Workload properties.", + "type": "object", + "properties": { + "provisioningState": { + "$ref": "./hpcworkbench.json#/definitions/ProvisioningState", + "description": "Gets the status of the workload at the time the operation was called" + }, + "vmSize": { + "description": "Gets or sets the VmSize.", + "type": "string" + }, + "edaType": { + "description": "Gets or sets the edaType.", + "type": "string" + }, + "status": { + "description": "Gets or sets the status.", + "type": "string" + } + } + }, + "Workload": { + "description": "Workload resource", + "type": "object", + "x-ms-azure-resource": true, + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/WorkloadPropertiesFormat", + "description": "Workload properties." + } + }, + "allOf": [ + { + "$ref": "./hpcworkbench.json#/definitions/Resource" + } + ] + } + } +} diff --git a/specification/hpcworkbench/resource-manager/readme.md b/specification/hpcworkbench/resource-manager/readme.md index ddc84d975e53..032d60de2605 100644 --- a/specification/hpcworkbench/resource-manager/readme.md +++ b/specification/hpcworkbench/resource-manager/readme.md @@ -38,6 +38,7 @@ These settings apply only when `--tag=package-2021-03-01-preview` is specified o input-file: - Microsoft.HpcWorkbench/preview/2021-03-01-preview/hpcworkbench.json - Microsoft.HpcWorkbench/preview/2021-03-01-preview/consortium.json + - Microsoft.HpcWorkbench/preview/2021-03-01-preview/workload.json ``` ---