diff --git a/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/Images.json b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/Images.json new file mode 100644 index 000000000000..a4c6db0d8a36 --- /dev/null +++ b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/Images.json @@ -0,0 +1,379 @@ +{ + "swagger": "2.0", + "info": { + "version": "2022-08-01", + "title": "LabServicesClient", + "description": "REST API for managing Azure Lab Services images." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "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/{resourceGroupName}/providers/Microsoft.LabServices/labPlans/{labPlanName}/images": { + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "LabPlans.json#/parameters/LabPlanNameParameter" + }, + { + "in": "query", + "name": "$filter", + "type": "string", + "description": "The filter to apply to the operation." + } + ], + "get": { + "tags": [ + "Image" + ], + "summary": "Gets all images.", + "description": "Gets all images from galleries attached to a lab plan.", + "operationId": "Images_ListByLabPlan", + "responses": { + "200": { + "description": "The request was successful; a list of images is returned", + "schema": { + "$ref": "#/definitions/PagedImages" + } + }, + "default": { + "description": "The default error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "listImages": { + "$ref": "./examples/Images/listImages.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labPlans/{labPlanName}/images/{imageName}": { + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "LabPlans.json#/parameters/LabPlanNameParameter" + }, + { + "$ref": "#/parameters/ImageNameParameter" + } + ], + "get": { + "tags": [ + "Image" + ], + "summary": "Gets an image.", + "description": "Gets an image resource.", + "operationId": "Images_Get", + "responses": { + "200": { + "description": "The request was successful; the image is returned", + "schema": { + "$ref": "#/definitions/Image" + } + }, + "default": { + "description": "The default error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "getImage": { + "$ref": "./examples/Images/getImage.json" + } + } + }, + "put": { + "tags": [ + "Image" + ], + "summary": "Updates an image via PUT.", + "description": "Updates an image resource via PUT. Creating new resources via PUT will not function.", + "operationId": "Images_CreateOrUpdate", + "parameters": [ + { + "in": "body", + "name": "body", + "description": "The request body.", + "required": true, + "schema": { + "$ref": "#/definitions/Image" + } + } + ], + "responses": { + "200": { + "description": "The request was successful; the image is returned", + "schema": { + "$ref": "#/definitions/Image" + } + }, + "default": { + "description": "The default error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "putImage": { + "$ref": "./examples/Images/putImage.json" + } + } + }, + "patch": { + "tags": [ + "Image" + ], + "summary": "Updates an image.", + "description": "Updates an image resource.", + "consumes": [ + "application/json" + ], + "operationId": "Images_Update", + "parameters": [ + { + "in": "body", + "name": "body", + "description": "The request body.", + "required": true, + "schema": { + "$ref": "#/definitions/ImageUpdate" + } + } + ], + "responses": { + "200": { + "description": "The request was successful; the image is returned", + "schema": { + "$ref": "#/definitions/Image" + } + }, + "default": { + "description": "The default error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "patchImage": { + "$ref": "./examples/Images/patchImage.json" + } + } + } + } + }, + "definitions": { + "Image": { + "description": "Lab services virtual machine image", + "type": "object", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "systemData": { + "description": "Metadata pertaining to creation and last modification of the image.", + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData", + "readOnly": true + }, + "properties": { + "description": "Image resource properties", + "$ref": "#/definitions/ImageProperties", + "x-ms-client-flatten": true + } + }, + "required": [ + "properties" + ] + }, + "PagedImages": { + "description": "Paged list of Lab services virtual machine images.", + "type": "object", + "properties": { + "value": { + "description": "The array page of virtual machine images.", + "type": "array", + "items": { + "$ref": "#/definitions/Image" + }, + "readOnly": true + }, + "nextLink": { + "description": "The link to get the next page of image results.", + "type": "string", + "readOnly": true + } + } + }, + "ImageUpdate": { + "description": "Lab services virtual machine image for updates.", + "type": "object", + "properties": { + "properties": { + "description": "Image resource properties", + "$ref": "#/definitions/ImageUpdateProperties", + "x-ms-client-flatten": true + } + } + }, + "ImageUpdateProperties": { + "description": "Properties of an image resource update", + "type": "object", + "properties": { + "enabledState": { + "description": "Is the image enabled", + "default": "Disabled", + "$ref": "LabServices.json#/definitions/enableState" + } + } + }, + "ImageProperties": { + "description": "Properties of an image resource.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ImageUpdateProperties" + } + ], + "properties": { + "provisioningState": { + "description": "Current provisioning state of the image.", + "$ref": "LabServices.json#/definitions/provisioningState", + "readOnly": true + }, + "displayName": { + "description": "The image display name.", + "type": "string", + "readOnly": true + }, + "description": { + "description": "A description of the image.", + "type": "string", + "readOnly": true + }, + "iconUrl": { + "description": "URL of the image icon.", + "type": "string", + "readOnly": true + }, + "author": { + "description": "The image author.", + "type": "string", + "readOnly": true + }, + "osType": { + "description": "The OS Type of the image.", + "$ref": "LabServices.json#/definitions/osType", + "readOnly": true + }, + "plan": { + "description": "The ID of marketplace plan associated with the image (optional).", + "type": "string", + "readOnly": true + }, + "termsStatus": { + "description": "The status of image terms of use (enabled = accepted, disabled = not accepted).", + "$ref": "LabServices.json#/definitions/enableState", + "readOnly": true + }, + "offer": { + "description": "The ID of an offer associated with the image.", + "type": "string", + "readOnly": true + }, + "publisher": { + "description": "The ID of the publisher of the image.", + "type": "string", + "readOnly": true + }, + "sku": { + "description": "The image SKU.", + "type": "string", + "readOnly": true + }, + "version": { + "description": "The image version.", + "type": "string", + "readOnly": true + }, + "sharedGalleryId": { + "description": "The ID for the image in the shared gallery.", + "$ref": "LabServices.json#/definitions/url", + "readOnly": true + }, + "availableRegions": { + "description": "The available regions of the image in the shared gallery.", + "type": "array", + "items": { + "type": "string" + } + }, + "osState": { + "description": "The OS State of the image.", + "$ref": "LabServices.json#/definitions/osState", + "readOnly": true + } + }, + "required": [ + "enabledState" + ] + } + }, + "parameters": { + "ImageNameParameter": { + "name": "imageName", + "in": "path", + "required": true, + "type": "string", + "description": "The image name.", + "pattern": "^[-\\w\\\\._\\\\(\\\\)]+$", + "minLength": 1, + "maxLength": 100, + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/LabPlans.json b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/LabPlans.json new file mode 100644 index 000000000000..31fccb461475 --- /dev/null +++ b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/LabPlans.json @@ -0,0 +1,540 @@ +{ + "swagger": "2.0", + "info": { + "version": "2022-08-01", + "title": "LabServicesClient", + "description": "REST API for managing Azure Lab Services lab plans." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "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" + } + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/providers/Microsoft.LabServices/labPlans": { + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "in": "query", + "name": "$filter", + "type": "string", + "description": "The filter to apply to the operation." + } + ], + "get": { + "tags": [ + "LabPlan" + ], + "summary": "Get all lab plans for a subscription.", + "description": "Returns a list of all lab plans within a subscription", + "operationId": "LabPlans_ListBySubscription", + "responses": { + "200": { + "description": "The request was successful; response contains all Lab Plans for the given subscription.", + "schema": { + "$ref": "#/definitions/PagedLabPlans" + } + }, + "default": { + "description": "The default error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "listLabPlans": { + "$ref": "./examples/LabPlans/listLabPlans.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labPlans": { + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + } + ], + "get": { + "tags": [ + "LabPlan" + ], + "summary": "Get all lab plans for a subscription and resource group.", + "description": "Returns a list of all lab plans for a subscription and resource group.", + "operationId": "LabPlans_ListByResourceGroup", + "responses": { + "200": { + "description": "The request was successful; response contains all Lab Plans for the given subscription.", + "schema": { + "$ref": "#/definitions/PagedLabPlans" + } + }, + "default": { + "description": "The default error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "listResourceGroupLabPlans": { + "$ref": "./examples/LabPlans/listResourceGroupLabPlans.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labPlans/{labPlanName}": { + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/LabPlanNameParameter" + } + ], + "get": { + "tags": [ + "LabPlan" + ], + "summary": "Retrieves a Lab Plan resource.", + "description": "Retrieves the properties of a Lab Plan.", + "operationId": "LabPlans_Get", + "responses": { + "200": { + "description": "The request was successful; response contains the Lab Plan.", + "schema": { + "$ref": "#/definitions/LabPlan" + } + }, + "default": { + "description": "The default error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "getLabPlan": { + "$ref": "./examples/LabPlans/getLabPlan.json" + } + } + }, + "put": { + "tags": [ + "LabPlan" + ], + "summary": "Updates or creates a Lab Plan resource.", + "description": "Operation to create or update a Lab Plan resource.", + "operationId": "LabPlans_CreateOrUpdate", + "parameters": [ + { + "in": "body", + "name": "body", + "description": "The request body.", + "required": true, + "schema": { + "$ref": "#/definitions/LabPlan" + } + } + ], + "responses": { + "200": { + "description": "The update was successful; response contains the Lab Plan.", + "schema": { + "$ref": "#/definitions/LabPlan" + } + }, + "201": { + "description": "The create was successful; response contains the Lab Plan.", + "schema": { + "$ref": "#/definitions/LabPlan" + } + }, + "202": { + "description": "The update was successful and has a long running operation; response contains the Lab Plan.", + "schema": { + "$ref": "#/definitions/LabPlan" + } + }, + "default": { + "description": "The default error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "original-uri" + }, + "x-ms-examples": { + "putLabPlan": { + "$ref": "./examples/LabPlans/putLabPlan.json" + } + } + }, + "patch": { + "tags": [ + "LabPlan" + ], + "summary": "Updates a Lab Plan resource.", + "description": "Operation to update a Lab Plan resource.", + "consumes": [ + "application/json" + ], + "operationId": "LabPlans_Update", + "parameters": [ + { + "in": "body", + "name": "body", + "description": "The request body.", + "required": true, + "schema": { + "$ref": "#/definitions/LabPlanUpdate" + } + } + ], + "responses": { + "200": { + "description": "The update was successful; response contains the Lab Plan.", + "schema": { + "$ref": "#/definitions/LabPlan" + } + }, + "202": { + "description": "The update was successful and has a long running operation; response contains the Lab Plan.", + "schema": { + "$ref": "#/definitions/LabPlan" + } + }, + "default": { + "description": "The default error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-examples": { + "patchLabPlan": { + "$ref": "./examples/LabPlans/patchLabPlan.json" + } + } + }, + "delete": { + "tags": [ + "LabPlan" + ], + "summary": "Deletes a Lab Plan resource.", + "description": "Operation to delete a Lab Plan resource. Deleting a lab plan does not delete labs associated with a lab plan, nor does it delete shared images added to a gallery via the lab plan permission container.", + "operationId": "LabPlans_Delete", + "responses": { + "200": { + "description": "The request was successful." + }, + "202": { + "description": "The request was accepted." + }, + "204": { + "description": "The request has been fulfilled." + }, + "default": { + "description": "The default error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-examples": { + "deleteLabPlan": { + "$ref": "./examples/LabPlans/deleteLabPlan.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labPlans/{labPlanName}/saveImage": { + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/LabPlanNameParameter" + } + ], + "post": { + "tags": [ + "VirtualMachine" + ], + "summary": "Save an image from a lab VM to the attached shared image gallery.", + "description": "Saves an image from a lab VM to the attached shared image gallery.", + "operationId": "LabPlans_SaveImage", + "parameters": [ + { + "in": "body", + "name": "body", + "description": "The request body.", + "required": true, + "schema": { + "$ref": "#/definitions/SaveImageBody" + } + } + ], + "responses": { + "200": { + "description": "The request was successful." + }, + "202": { + "description": "The request was accepted." + }, + "default": { + "description": "The default error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-examples": { + "saveImageVirtualMachine": { + "$ref": "./examples/LabPlans/saveImageVirtualMachine.json" + } + } + } + } + }, + "definitions": { + "LabPlan": { + "description": "Lab Plans act as a permission container for creating labs via labs.azure.com. Additionally, they can provide a set of default configurations that will apply at the time of creating a lab, but these defaults can still be overwritten.", + "type": "object", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/TrackedResource" + } + ], + "properties": { + "systemData": { + "description": "Metadata pertaining to creation and last modification of the lab plan.", + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData", + "readOnly": true + }, + "properties": { + "description": "Lab plan resource properties", + "$ref": "#/definitions/LabPlanProperties", + "x-ms-client-flatten": true + }, + "identity": { + "description": "Managed Identity Information", + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/Identity" + } + }, + "required": [ + "properties" + ] + }, + "PagedLabPlans": { + "description": "Paged list of lab plans.", + "type": "object", + "properties": { + "value": { + "description": "The array page of lab plans.", + "type": "array", + "items": { + "$ref": "#/definitions/LabPlan" + }, + "readOnly": true + }, + "nextLink": { + "description": "The link to get the next page of lab plan results.", + "type": "string", + "readOnly": true + } + } + }, + "LabPlanNetworkProfile": { + "description": "Profile for how to handle networking for Lab Plans.", + "type": "object", + "properties": { + "subnetId": { + "description": "The external subnet resource id", + "$ref": "LabServices.json#/definitions/url" + } + } + }, + "LabPlanUpdate": { + "description": "Contains lab configuration and default settings. This variant is used for PATCH.", + "type": "object", + "allOf": [ + { + "$ref": "LabServices.json#/definitions/TrackedResourceUpdate" + } + ], + "properties": { + "properties": { + "description": "Lab plan resource update properties", + "$ref": "#/definitions/LabPlanUpdateProperties", + "x-ms-client-flatten": true + }, + "identity": { + "description": "Managed Identity Information", + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/Identity" + } + } + }, + "LabPlanUpdateProperties": { + "description": "Lab plan resource properties for updates", + "type": "object", + "properties": { + "defaultConnectionProfile": { + "description": "The default lab connection profile. This can be changed on a lab resource and only provides a default profile.", + "$ref": "LabServices.json#/definitions/ConnectionProfile" + }, + "defaultAutoShutdownProfile": { + "description": "The default lab shutdown profile. This can be changed on a lab resource and only provides a default profile.", + "$ref": "LabServices.json#/definitions/AutoShutdownProfile" + }, + "defaultNetworkProfile": { + "description": "The lab plan network profile. To enforce lab network policies they must be defined here and cannot be changed when there are existing labs associated with this lab plan.", + "$ref": "#/definitions/LabPlanNetworkProfile" + }, + "allowedRegions": { + "description": "The allowed regions for the lab creator to use when creating labs using this lab plan.", + "type": "array", + "items": { + "type": "string" + } + }, + "sharedGalleryId": { + "description": "Resource ID of the Shared Image Gallery attached to this lab plan. When saving a lab template virtual machine image it will be persisted in this gallery. Shared images from the gallery can be made available to use when creating new labs.", + "$ref": "LabServices.json#/definitions/url" + }, + "supportInfo": { + "description": "Support contact information and instructions for users of the lab plan. This information is displayed to lab owners and virtual machine users for all labs in the lab plan.", + "$ref": "#/definitions/SupportInfo" + }, + "linkedLmsInstance": { + "description": "Base Url of the lms instance this lab plan can link lab rosters against.", + "$ref": "LabServices.json#/definitions/url" + } + } + }, + "LabPlanProperties": { + "description": "Lab plan resource properties", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/LabPlanUpdateProperties" + } + ], + "properties": { + "provisioningState": { + "description": "Current provisioning state of the lab plan.", + "$ref": "LabServices.json#/definitions/provisioningState", + "readOnly": true + } + } + }, + "SupportInfo": { + "description": "Support contact information and instructions.", + "type": "object", + "properties": { + "url": { + "description": "Support web address.", + "$ref": "LabServices.json#/definitions/url" + }, + "email": { + "description": "Support contact email address.", + "$ref": "LabServices.json#/definitions/emailAddress" + }, + "phone": { + "description": "Support contact phone number.", + "$ref": "LabServices.json#/definitions/phoneNumber" + }, + "instructions": { + "description": "Support instructions.", + "type": "string" + } + } + }, + "SaveImageBody": { + "description": "Body for the save image POST", + "type": "object", + "properties": { + "name": { + "description": "The name for the image we create.", + "type": "string" + }, + "labVirtualMachineId": { + "description": "The ID of the lab virtual machine you want to save an image from.", + "$ref": "LabServices.json#/definitions/url" + } + } + } + }, + "parameters": { + "LabPlanNameParameter": { + "name": "labPlanName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the lab plan that uniquely identifies it within containing resource group. Used in resource URIs and in UI.", + "minLength": 1, + "maxLength": 100, + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/LabServices.json b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/LabServices.json new file mode 100644 index 000000000000..19f505b76b5c --- /dev/null +++ b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/LabServices.json @@ -0,0 +1,301 @@ +{ + "swagger": "2.0", + "info": { + "version": "2022-08-01", + "title": "LabServicesClient", + "description": "Azure Lab Services REST API.", + "x-ms-code-generation-settings": { + "internalConstructors": true + } + }, + "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": { + "/providers/Microsoft.LabServices/operations": { + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "get": { + "tags": [ + "Operations" + ], + "summary": "Get all operations", + "description": "Returns a list of all operations.", + "operationId": "Operations_List", + "responses": { + "200": { + "description": "The request was successful; response contains all operations.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/OperationListResult" + } + }, + "default": { + "description": "The default error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "listOperations": { + "$ref": "./examples/LabServices/listOperations.json" + } + } + } + } + }, + "definitions": { + "provisioningState": { + "type": "string", + "enum": [ + "Creating", + "Updating", + "Deleting", + "Succeeded", + "Failed", + "Locked" + ], + "description": "Resource provisioning state.", + "x-ms-enum": { + "name": "ProvisioningState", + "modelAsString": false, + "values": [ + { + "value": "Creating", + "description": "Resource is in the process of being created." + }, + { + "value": "Updating", + "description": "New property values are being applied to the resource." + }, + { + "value": "Deleting", + "description": "Resource is in the process of being deleted." + }, + { + "value": "Succeeded", + "description": "Resource is in healthy state after creation or update operation." + }, + { + "value": "Failed", + "description": "Previous operation on the resource has failed leaving resource in unhealthy state." + }, + { + "value": "Locked", + "description": "The resource is locked and changes are currently blocked. This could be due to maintenance or a scheduled operation. The state will go back to succeeded once the locking operation has finished." + } + ] + } + }, + "enableState": { + "type": "string", + "enum": [ + "Enabled", + "Disabled" + ], + "description": "Property enabled state.", + "x-ms-enum": { + "name": "EnableState", + "modelAsString": false + } + }, + "connectionType": { + "type": "string", + "enum": [ + "Public", + "Private", + "None" + ], + "description": "A connection type for access labs and VMs (Public, Private or None).", + "x-ms-enum": { + "name": "ConnectionType", + "modelAsString": false + } + }, + "emailAddress": { + "type": "string", + "minLength": 6, + "maxLength": 254, + "description": "An email address." + }, + "phoneNumber": { + "type": "string", + "minLength": 1, + "maxLength": 31, + "description": "A phone number." + }, + "url": { + "type": "string", + "minLength": 3, + "maxLength": 2000, + "description": "A URL." + }, + "osType": { + "type": "string", + "enum": [ + "Windows", + "Linux" + ], + "description": "The operating system type.", + "x-ms-enum": { + "name": "OsType", + "modelAsString": false + } + }, + "osState": { + "type": "string", + "enum": [ + "Generalized", + "Specialized" + ], + "description": "The operating system state.", + "x-ms-enum": { + "name": "OsState", + "modelAsString": false, + "values": [ + { + "value": "Generalized", + "description": "Image does not contain any machine and user specific information." + }, + { + "value": "Specialized", + "description": "Image contains machine and user specific information." + } + ] + } + }, + "shutdownOnIdleMode": { + "type": "string", + "enum": [ + "None", + "UserAbsence", + "LowUsage" + ], + "description": "Defines whether to shut down VM on idle and the criteria for idle detection.", + "x-ms-enum": { + "name": "shutdownOnIdleMode", + "modelAsString": false, + "values": [ + { + "value": "None", + "description": "The VM won't be shut down when it is idle." + }, + { + "value": "UserAbsence", + "description": "The VM will be considered as idle when there is no keyboard or mouse input." + }, + { + "value": "LowUsage", + "description": "The VM will be considered as idle when user is absent and the resource (CPU and disk) consumption is low." + } + ] + } + }, + "TrackedResourceUpdate": { + "description": "Base tracked resource type for all PATCH updates.", + "type": "object", + "properties": { + "tags": { + "description": "Resource tags.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "AutoShutdownProfile": { + "description": "Profile for how to handle shutting down virtual machines.", + "type": "object", + "properties": { + "shutdownOnDisconnect": { + "description": "Whether shutdown on disconnect is enabled", + "default": "Disabled", + "$ref": "#/definitions/enableState" + }, + "shutdownWhenNotConnected": { + "description": "Whether a VM will get shutdown when it hasn't been connected to after a period of time.", + "default": "Disabled", + "$ref": "#/definitions/enableState" + }, + "shutdownOnIdle": { + "description": "Whether a VM will get shutdown when it has idled for a period of time.", + "default": "None", + "$ref": "#/definitions/shutdownOnIdleMode" + }, + "disconnectDelay": { + "description": "The amount of time a VM will stay running after a user disconnects if this behavior is enabled.", + "type": "string", + "format": "duration" + }, + "noConnectDelay": { + "description": "The amount of time a VM will stay running before it is shutdown if no connection is made and this behavior is enabled.", + "type": "string", + "format": "duration" + }, + "idleDelay": { + "description": "The amount of time a VM will idle before it is shutdown if this behavior is enabled.", + "type": "string", + "format": "duration" + } + } + }, + "ConnectionProfile": { + "description": "Connection profile for how users connect to lab virtual machines.", + "type": "object", + "properties": { + "webSshAccess": { + "description": "The enabled access level for Web Access over SSH.", + "default": "None", + "$ref": "#/definitions/connectionType" + }, + "webRdpAccess": { + "description": "The enabled access level for Web Access over RDP.", + "default": "None", + "$ref": "#/definitions/connectionType" + }, + "clientSshAccess": { + "description": "The enabled access level for Client Access over SSH.", + "default": "None", + "$ref": "#/definitions/connectionType" + }, + "clientRdpAccess": { + "description": "The enabled access level for Client Access over RDP.", + "default": "None", + "$ref": "#/definitions/connectionType" + } + } + } + } +} diff --git a/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/Labs.json b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/Labs.json new file mode 100644 index 000000000000..97f0d8bf9220 --- /dev/null +++ b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/Labs.json @@ -0,0 +1,797 @@ +{ + "swagger": "2.0", + "info": { + "version": "2022-08-01", + "title": "LabServicesClient", + "description": "REST API for managing Azure Lab Services labs." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "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" + } + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/providers/Microsoft.LabServices/labs": { + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "in": "query", + "name": "$filter", + "type": "string", + "description": "The filter to apply to the operation." + } + ], + "get": { + "tags": [ + "Lab" + ], + "summary": "Get all labs for a subscription.", + "description": "Returns a list of all labs for a subscription.", + "operationId": "Labs_ListBySubscription", + "responses": { + "200": { + "description": "The request was successful; response contains all Labs for the given subscription.", + "schema": { + "$ref": "#/definitions/PagedLabs" + } + }, + "default": { + "description": "The default error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "listLabs": { + "$ref": "./examples/Labs/listLabs.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labs": { + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + } + ], + "get": { + "tags": [ + "Lab" + ], + "summary": "Get all labs for a subscription and resource group.", + "description": "Returns a list of all labs in a resource group.", + "operationId": "Labs_ListByResourceGroup", + "responses": { + "200": { + "description": "The request was successful; response contains all Labs for the given subscription and resource group.", + "schema": { + "$ref": "#/definitions/PagedLabs" + } + }, + "default": { + "description": "The default error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "listResourceGroupLabs": { + "$ref": "./examples/Labs/listResourceGroupLabs.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labs/{labName}": { + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/LabNameParameter" + } + ], + "get": { + "tags": [ + "Lab" + ], + "summary": "Get a lab resource.", + "description": "Returns the properties of a lab resource.", + "operationId": "Labs_Get", + "responses": { + "200": { + "description": "The request was successful; response contains the Lab.", + "schema": { + "$ref": "#/definitions/Lab" + } + }, + "default": { + "description": "The default error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "getLab": { + "$ref": "./examples/Labs/getLab.json" + } + } + }, + "put": { + "tags": [ + "Lab" + ], + "summary": "Create or update a lab resource.", + "description": "Operation to create or update a lab resource.", + "operationId": "Labs_CreateOrUpdate", + "parameters": [ + { + "in": "body", + "name": "body", + "description": "The request body.", + "required": true, + "schema": { + "$ref": "#/definitions/Lab" + } + } + ], + "responses": { + "200": { + "description": "The update was successful; response contains the Lab.", + "schema": { + "$ref": "#/definitions/Lab" + } + }, + "201": { + "description": "The create was successful; response contains the Lab.", + "schema": { + "$ref": "#/definitions/Lab" + } + }, + "202": { + "description": "The update was successful and has a long running operation; response contains the Lab.", + "schema": { + "$ref": "#/definitions/Lab" + } + }, + "default": { + "description": "The default error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "original-uri" + }, + "x-ms-examples": { + "putLab": { + "$ref": "./examples/Labs/putLab.json" + } + } + }, + "patch": { + "tags": [ + "Lab" + ], + "summary": "Update a lab resource.", + "description": "Operation to update a lab resource.", + "consumes": [ + "application/json" + ], + "operationId": "Labs_Update", + "parameters": [ + { + "in": "body", + "name": "body", + "description": "The request body.", + "required": true, + "schema": { + "$ref": "#/definitions/LabUpdate" + } + } + ], + "responses": { + "200": { + "description": "The resource was updated; response contains the Lab.", + "schema": { + "$ref": "#/definitions/Lab" + } + }, + "202": { + "description": "The resource was update and has a long running operation; response contains the Lab.", + "schema": { + "$ref": "#/definitions/Lab" + } + }, + "default": { + "description": "The default error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-examples": { + "patchLab": { + "$ref": "./examples/Labs/patchLab.json" + } + } + }, + "delete": { + "tags": [ + "Lab" + ], + "summary": "Deletes a lab resource.", + "description": "Operation to delete a lab resource.", + "operationId": "Labs_Delete", + "responses": { + "200": { + "description": "The request was successful." + }, + "202": { + "description": "The request was accepted." + }, + "204": { + "description": "The request has been fulfilled." + }, + "default": { + "description": "The default error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-examples": { + "deleteLab": { + "$ref": "./examples/Labs/deleteLab.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labs/{labName}/publish": { + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/LabNameParameter" + } + ], + "post": { + "tags": [ + "Lab" + ], + "summary": "Publish or re-publish a lab.", + "description": "Publish or re-publish a lab. This will create or update all lab resources, such as virtual machines.", + "operationId": "Labs_Publish", + "responses": { + "200": { + "description": "The request was successful." + }, + "202": { + "description": "The request was accepted." + }, + "default": { + "description": "The default error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-examples": { + "publishLab": { + "$ref": "./examples/Labs/publishLab.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labs/{labName}/syncGroup": { + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/LabNameParameter" + } + ], + "post": { + "tags": [ + "Lab" + ], + "summary": "Manually sync the lab group.", + "description": "Action used to manually kick off an AAD group sync job.", + "operationId": "Labs_SyncGroup", + "responses": { + "200": { + "description": "The request was successful." + }, + "202": { + "description": "The request was accepted." + }, + "default": { + "description": "The default error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-examples": { + "syncLab": { + "$ref": "./examples/Labs/syncLab.json" + } + } + } + } + }, + "definitions": { + "Lab": { + "description": "The lab resource.", + "type": "object", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/TrackedResource" + } + ], + "properties": { + "systemData": { + "description": "Metadata pertaining to creation and last modification of the lab.", + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData", + "readOnly": true + }, + "properties": { + "description": "Lab resource properties", + "$ref": "#/definitions/LabProperties", + "x-ms-client-flatten": true + } + }, + "required": [ + "properties" + ] + }, + "PagedLabs": { + "description": "Paged list of labs.", + "type": "object", + "properties": { + "value": { + "description": "The array page of lab results.", + "type": "array", + "items": { + "$ref": "#/definitions/Lab" + }, + "readOnly": true + }, + "nextLink": { + "description": "The link to get the next page of image results.", + "type": "string", + "readOnly": true + } + } + }, + "LabNetworkProfile": { + "description": "Profile for how to handle networking for Labs.", + "type": "object", + "properties": { + "subnetId": { + "description": "The external subnet resource id", + "$ref": "LabServices.json#/definitions/url" + }, + "loadBalancerId": { + "description": "The external load balancer resource id", + "$ref": "LabServices.json#/definitions/url" + }, + "publicIpId": { + "description": "The external public IP resource id", + "$ref": "LabServices.json#/definitions/url" + } + } + }, + "LabUpdate": { + "description": "The lab resource for updates.", + "type": "object", + "allOf": [ + { + "$ref": "LabServices.json#/definitions/TrackedResourceUpdate" + } + ], + "properties": { + "properties": { + "description": "Lab resource properties", + "$ref": "#/definitions/LabUpdateProperties", + "x-ms-client-flatten": true + } + } + }, + "LabUpdateProperties": { + "description": "Properties of a lab resource used for updates.", + "type": "object", + "properties": { + "autoShutdownProfile": { + "description": "The resource auto shutdown configuration for the lab. This controls whether actions are taken on resources that are sitting idle.", + "$ref": "LabServices.json#/definitions/AutoShutdownProfile" + }, + "connectionProfile": { + "description": "The connection profile for the lab. This controls settings such as web access to lab resources or whether RDP or SSH ports are open.", + "$ref": "LabServices.json#/definitions/ConnectionProfile" + }, + "virtualMachineProfile": { + "description": "The profile used for creating lab virtual machines.", + "$ref": "#/definitions/VirtualMachineProfile" + }, + "securityProfile": { + "description": "The lab security profile.", + "$ref": "#/definitions/SecurityProfile" + }, + "rosterProfile": { + "description": "The lab user list management profile.", + "$ref": "#/definitions/RosterProfile" + }, + "labPlanId": { + "description": "The ID of the lab plan. Used during resource creation to provide defaults and acts as a permission container when creating a lab via labs.azure.com. Setting a labPlanId on an existing lab provides organization..", + "$ref": "LabServices.json#/definitions/url" + }, + "title": { + "description": "The title of the lab.", + "type": "string", + "minLength": 1, + "maxLength": 120 + }, + "description": { + "description": "The description of the lab.", + "type": "string" + } + } + }, + "LabProperties": { + "description": "Properties of a lab resource.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/LabUpdateProperties" + } + ], + "properties": { + "provisioningState": { + "description": "Current provisioning state of the lab.", + "$ref": "LabServices.json#/definitions/provisioningState", + "readOnly": true + }, + "networkProfile": { + "description": "The network profile for the lab, typically applied via a lab plan. This profile cannot be modified once a lab has been created.", + "$ref": "#/definitions/LabNetworkProfile", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "state": { + "description": "The lab state.", + "$ref": "#/definitions/LabState", + "readOnly": true + } + }, + "required": [ + "autoShutdownProfile", + "connectionProfile", + "securityProfile", + "virtualMachineProfile" + ] + }, + "SecurityProfile": { + "description": "The lab security profile.", + "type": "object", + "properties": { + "registrationCode": { + "description": "The registration code for the lab.", + "type": "string", + "readOnly": true + }, + "openAccess": { + "description": "Whether any user or only specified users can register to a lab.", + "$ref": "LabServices.json#/definitions/enableState" + } + } + }, + "RosterProfile": { + "description": "The lab user list management profile.", + "type": "object", + "properties": { + "activeDirectoryGroupId": { + "description": "The AAD group ID which this lab roster is populated from. Having this set enables AAD sync mode.", + "type": "string" + }, + "ltiContextId": { + "description": "The unique context identifier for the lab in the lms.", + "type": "string" + }, + "lmsInstance": { + "description": "The base URI identifying the lms instance.", + "type": "string" + }, + "ltiClientId": { + "description": "The unique id of the azure lab services tool in the lms.", + "type": "string" + }, + "ltiRosterEndpoint": { + "description": "The uri of the names and roles service endpoint on the lms for the class attached to this lab.", + "type": "string" + } + } + }, + "VirtualMachineProfile": { + "description": "The base virtual machine configuration for a lab.", + "type": "object", + "properties": { + "createOption": { + "description": "Indicates what lab virtual machines are created from.", + "type": "string", + "enum": [ + "Image", + "TemplateVM" + ], + "x-ms-enum": { + "name": "CreateOption", + "modelAsString": false, + "values": [ + { + "value": "Image", + "description": "An image is used to create all lab user virtual machines. When this option is set, no template VM will be created." + }, + { + "value": "TemplateVM", + "description": "A template VM will be used to create all lab user virtual machines." + } + ] + }, + "x-ms-mutability": [ + "read", + "create" + ] + }, + "imageReference": { + "description": "The image configuration for lab virtual machines.", + "$ref": "#/definitions/ImageReference", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "osType": { + "description": "The OS type of the image", + "$ref": "LabServices.json#/definitions/osType", + "readOnly": true + }, + "sku": { + "description": "The SKU for the lab. Defines the type of virtual machines used in the lab.", + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/Sku", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "additionalCapabilities": { + "description": "Additional VM capabilities.", + "$ref": "#/definitions/VirtualMachineAdditionalCapabilities", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "usageQuota": { + "description": "The initial quota alloted to each lab user. Must be a time span between 0 and 9999 hours.", + "type": "string", + "format": "duration" + }, + "useSharedPassword": { + "description": "Enabling this option will use the same password for all user VMs.", + "default": "Disabled", + "$ref": "LabServices.json#/definitions/enableState", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "adminUser": { + "description": "Credentials for the admin user on the VM.", + "$ref": "#/definitions/Credentials" + }, + "nonAdminUser": { + "description": "Credentials for the non-admin user on the VM, if one exists.", + "$ref": "#/definitions/Credentials" + } + }, + "required": [ + "createOption", + "imageReference", + "usageQuota", + "sku", + "adminUser" + ] + }, + "VirtualMachineAdditionalCapabilities": { + "description": "The additional capabilities for a lab VM.", + "type": "object", + "properties": { + "installGpuDrivers": { + "description": "Flag to pre-install dedicated GPU drivers.", + "default": "Disabled", + "$ref": "LabServices.json#/definitions/enableState" + } + } + }, + "Credentials": { + "description": "Credentials for a user on a lab VM.", + "type": "object", + "properties": { + "username": { + "description": "The username to use when signing in to lab VMs.", + "type": "string", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "password": { + "description": "The password for the user. This is required for the TemplateVM createOption.", + "type": "string", + "x-ms-secret": true, + "x-ms-mutability": [ + "create" + ] + } + }, + "required": [ + "username" + ] + }, + "ImageReference": { + "description": "Image reference information. Used in the virtual machine profile.", + "type": "object", + "properties": { + "id": { + "description": "Image resource ID", + "$ref": "LabServices.json#/definitions/url" + }, + "offer": { + "description": "The image offer if applicable.", + "type": "string" + }, + "publisher": { + "description": "The image publisher", + "type": "string" + }, + "sku": { + "description": "The image SKU", + "type": "string" + }, + "version": { + "description": "The image version specified on creation.", + "type": "string" + }, + "exactVersion": { + "description": "The actual version of the image after use.", + "type": "string", + "readOnly": true + } + } + }, + "LabState": { + "type": "string", + "enum": [ + "Draft", + "Publishing", + "Scaling", + "Syncing", + "Published" + ], + "description": "The state of a virtual machine.", + "x-ms-enum": { + "name": "LabState", + "modelAsString": false, + "values": [ + { + "value": "Draft", + "description": "The lab is currently in draft (has not been published)." + }, + { + "value": "Publishing", + "description": "The lab is publishing." + }, + { + "value": "Scaling", + "description": "The lab is scaling." + }, + { + "value": "Syncing", + "description": "The lab is syncing users." + }, + { + "value": "Published", + "description": "The lab has been published." + } + ] + } + } + }, + "parameters": { + "LabNameParameter": { + "name": "labName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the lab that uniquely identifies it within containing lab plan. Used in resource URIs.", + "minLength": 1, + "maxLength": 100, + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/OperationResults.json b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/OperationResults.json new file mode 100644 index 000000000000..8129ba2ca3fc --- /dev/null +++ b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/OperationResults.json @@ -0,0 +1,173 @@ +{ + "swagger": "2.0", + "info": { + "version": "2022-08-01", + "title": "LabServicesClient", + "description": "Azure Lab Services REST API.", + "x-ms-code-generation-settings": { + "internalConstructors": true + } + }, + "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}/providers/Microsoft.LabServices/operationResults/{operationResultId}": { + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/OperationResultId" + } + ], + "get": { + "tags": [ + "OperationResults" + ], + "summary": "Get an azure operation result.", + "description": "Returns an azure operation result.", + "operationId": "OperationResults_Get", + "responses": { + "200": { + "description": "The request was successful; response contains the operation result.", + "schema": { + "$ref": "#/definitions/OperationResult" + } + }, + "204": { + "description": "The request has been fulfilled." + }, + "default": { + "description": "The default error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "getOperationResult": { + "$ref": "./examples/OperationResults/getOperationResult.json" + } + } + } + } + }, + "definitions": { + "OperationResult": { + "description": "A long running operation result", + "type": "object", + "properties": { + "id": { + "readOnly": true, + "type": "string", + "description": "Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + }, + "name": { + "readOnly": true, + "type": "string", + "description": "The name of the resource" + }, + "status": { + "description": "The operation status", + "type": "string", + "enum": [ + "NotStarted", + "InProgress", + "Succeeded", + "Failed", + "Canceled" + ], + "x-ms-enum": { + "name": "OperationStatus", + "modelAsString": false, + "values": [ + { + "value": "NotStarted", + "description": "The operation has been accepted but hasn't started." + }, + { + "value": "InProgress", + "description": "The operation is running" + }, + { + "value": "Succeeded", + "description": "The operation Succeeded" + }, + { + "value": "Failed", + "description": "The operation failed" + }, + { + "value": "Canceled", + "description": "Not supported yet" + } + ] + } + }, + "startTime": { + "description": "Start time", + "type": "string", + "format": "date-time" + }, + "endTime": { + "description": "End time", + "type": "string", + "format": "date-time" + }, + "percentComplete": { + "description": "Percent completion", + "type": "number" + }, + "error": { + "description": "The error for a failure if the operation failed.", + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorDetail" + } + }, + "required": [ + "status" + ] + } + }, + "parameters": { + "OperationResultId": { + "name": "operationResultId", + "in": "path", + "required": true, + "type": "string", + "description": "The operation result ID / name.", + "pattern": "^[-\\w\\\\._\\\\(\\\\)]+$", + "minLength": 1, + "maxLength": 100, + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/Schedules.json b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/Schedules.json new file mode 100644 index 000000000000..e4e35115249c --- /dev/null +++ b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/Schedules.json @@ -0,0 +1,470 @@ +{ + "swagger": "2.0", + "info": { + "version": "2022-08-01", + "title": "LabServicesClient", + "description": "REST API for managing Azure Lab Services schedules." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "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" + } + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labs/{labName}/schedules": { + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "Labs.json#/parameters/LabNameParameter" + }, + { + "in": "query", + "name": "$filter", + "type": "string", + "description": "The filter to apply to the operation." + } + ], + "get": { + "tags": [ + "Schedule" + ], + "summary": "Get all schedules for a lab.", + "description": "Returns a list of all schedules for a lab.", + "operationId": "Schedules_ListByLab", + "responses": { + "200": { + "description": "The request was successful; response contains all schedules for the given lab.", + "schema": { + "$ref": "#/definitions/PagedSchedules" + } + }, + "default": { + "description": "The default error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "getListSchedule": { + "$ref": "./examples/Schedules/listSchedule.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labs/{labName}/schedules/{scheduleName}": { + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "Labs.json#/parameters/LabNameParameter" + }, + { + "$ref": "#/parameters/ScheduleNameParameter" + } + ], + "get": { + "tags": [ + "Schedule" + ], + "summary": "Get a lab Schedule.", + "description": "Returns the properties of a lab Schedule.", + "operationId": "Schedules_Get", + "responses": { + "200": { + "description": "The request was successful; response contains the lab schedule.", + "schema": { + "$ref": "#/definitions/Schedule" + } + }, + "default": { + "description": "The default error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "getSchedule": { + "$ref": "./examples/Schedules/getSchedule.json" + } + } + }, + "put": { + "tags": [ + "Schedule" + ], + "summary": "Create or update a lab schedule.", + "description": "Operation to create or update a lab schedule.", + "operationId": "Schedules_CreateOrUpdate", + "parameters": [ + { + "in": "body", + "name": "body", + "description": "The request body.", + "required": true, + "schema": { + "$ref": "#/definitions/Schedule" + } + } + ], + "responses": { + "200": { + "description": "The schedule was updated; response contains the lab schedule.", + "schema": { + "$ref": "#/definitions/Schedule" + } + }, + "201": { + "description": "The schedule was created; response contains the lab schedule.", + "schema": { + "$ref": "#/definitions/Schedule" + } + }, + "default": { + "description": "The default error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "putSchedule": { + "$ref": "./examples/Schedules/putSchedule.json" + } + } + }, + "patch": { + "tags": [ + "Schedule" + ], + "summary": "Update a lab schedule.", + "description": "Operation to update a lab schedule.", + "consumes": [ + "application/json" + ], + "operationId": "Schedules_Update", + "parameters": [ + { + "in": "body", + "name": "body", + "description": "The request body.", + "required": true, + "schema": { + "$ref": "#/definitions/ScheduleUpdate" + } + } + ], + "responses": { + "200": { + "description": "The schedule was updated; response contains the lab schedule.", + "schema": { + "$ref": "#/definitions/Schedule" + } + }, + "default": { + "description": "The default error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "patchSchedule": { + "$ref": "./examples/Schedules/patchSchedule.json" + } + } + }, + "delete": { + "tags": [ + "Schedule" + ], + "summary": "Deletes a schedule resource.", + "description": "Operation to delete a schedule resource.", + "operationId": "Schedules_Delete", + "responses": { + "200": { + "description": "The request was successful." + }, + "202": { + "description": "The request was accepted." + }, + "204": { + "description": "The request has been fulfilled." + }, + "default": { + "description": "The default error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-examples": { + "deleteSchedule": { + "$ref": "./examples/Schedules/deleteSchedule.json" + } + } + } + } + }, + "definitions": { + "Schedule": { + "description": "Schedule for automatically turning virtual machines in a lab on and off at specified times.", + "type": "object", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "systemData": { + "description": "Metadata pertaining to creation and last modification of the schedule.", + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData", + "readOnly": true + }, + "properties": { + "description": "Schedule resource properties", + "$ref": "#/definitions/ScheduleProperties", + "x-ms-client-flatten": true + } + }, + "required": [ + "properties" + ] + }, + "PagedSchedules": { + "description": "Paged list of schedules.", + "type": "object", + "properties": { + "value": { + "description": "The array page of schedule results.", + "type": "array", + "items": { + "$ref": "#/definitions/Schedule" + }, + "readOnly": true + }, + "nextLink": { + "description": "The link to get the next page of schedule results.", + "type": "string", + "readOnly": true + } + } + }, + "ScheduleUpdate": { + "description": "Schedule for automatically turning virtual machines in a lab on and off at specified times. Used for updates.", + "type": "object", + "properties": { + "properties": { + "description": "Schedule resource properties", + "$ref": "#/definitions/ScheduleUpdateProperties", + "x-ms-client-flatten": true + } + } + }, + "ScheduleUpdateProperties": { + "description": "Schedule resource properties used for updates.", + "type": "object", + "properties": { + "startAt": { + "description": "When lab user virtual machines will be started. Timestamp offsets will be ignored and timeZoneId is used instead.", + "type": "string", + "format": "date-time" + }, + "stopAt": { + "description": "When lab user virtual machines will be stopped. Timestamp offsets will be ignored and timeZoneId is used instead.", + "type": "string", + "format": "date-time" + }, + "recurrencePattern": { + "description": "The recurrence pattern of the scheduled actions.", + "$ref": "#/definitions/RecurrencePattern" + }, + "timeZoneId": { + "description": "The IANA timezone id for the schedule.", + "type": "string", + "maxLength": 50 + }, + "notes": { + "description": "Notes for this schedule.", + "type": "string", + "maxLength": 1000 + } + } + }, + "ScheduleProperties": { + "description": "Schedule resource properties", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ScheduleUpdateProperties" + } + ], + "properties": { + "provisioningState": { + "description": "Current provisioning state of the schedule.", + "$ref": "LabServices.json#/definitions/provisioningState", + "readOnly": true + } + }, + "required": [ + "stopAt", + "timeZoneId" + ] + }, + "RecurrencePattern": { + "description": "Recurrence pattern of a lab schedule.", + "type": "object", + "properties": { + "frequency": { + "description": "The frequency of the recurrence.", + "$ref": "#/definitions/RecurrenceFrequency" + }, + "weekDays": { + "description": "The week days the schedule runs. Used for when the Frequency is set to Weekly.", + "type": "array", + "items": { + "$ref": "#/definitions/WeekDay", + "maxItems": 7 + } + }, + "interval": { + "description": "The interval to invoke the schedule on. For example, interval = 2 and RecurrenceFrequency.Daily will run every 2 days. When no interval is supplied, an interval of 1 is used.", + "type": "integer", + "format": "int32", + "minimum": 1, + "maximum": 365 + }, + "expirationDate": { + "description": "When the recurrence will expire. This date is inclusive.", + "type": "string", + "format": "date-time" + } + }, + "required": [ + "frequency", + "expirationDate" + ] + }, + "WeekDay": { + "type": "string", + "enum": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "description": "Days of the week.", + "x-ms-enum": { + "name": "WeekDay", + "modelAsString": false, + "values": [ + { + "value": "Sunday", + "description": "Schedule will run on Sunday" + }, + { + "value": "Monday", + "description": "Schedule will run on Monday" + }, + { + "value": "Tuesday", + "description": "Schedule will run on Tuesday" + }, + { + "value": "Wednesday", + "description": "Schedule will run on Wednesday" + }, + { + "value": "Thursday", + "description": "Schedule will run on Thursday" + }, + { + "value": "Friday", + "description": "Schedule will run on Friday" + }, + { + "value": "Saturday", + "description": "Schedule will run on Saturday" + } + ] + } + }, + "RecurrenceFrequency": { + "type": "string", + "enum": [ + "Daily", + "Weekly" + ], + "description": "Schedule recurrence frequencies.", + "x-ms-enum": { + "name": "RecurrenceFrequency", + "modelAsString": false, + "values": [ + { + "value": "Daily", + "description": "Schedule will run every days." + }, + { + "value": "Weekly", + "description": "Schedule will run every week on days specified in weekDays." + } + ] + } + } + }, + "parameters": { + "ScheduleNameParameter": { + "name": "scheduleName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the schedule that uniquely identifies it within containing lab. Used in resource URIs.", + "pattern": "^[-\\w\\\\._\\\\(\\\\)]+$", + "minLength": 1, + "maxLength": 100, + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/Skus.json b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/Skus.json new file mode 100644 index 000000000000..39f9b438f128 --- /dev/null +++ b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/Skus.json @@ -0,0 +1,306 @@ +{ + "swagger": "2.0", + "info": { + "version": "2022-08-01", + "title": "LabServicesClient", + "description": "REST API for managing Azure Lab Services resource SKUs." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "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}/providers/Microsoft.LabServices/skus": { + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "in": "query", + "name": "$filter", + "type": "string", + "description": "The filter to apply to the operation." + } + ], + "get": { + "tags": [ + "Skus" + ], + "summary": "Gets the Azure Lab Services resource SKUs.", + "description": "Returns a list of Azure Lab Services resource SKUs.", + "operationId": "Skus_List", + "responses": { + "200": { + "description": "The request was successful; response contains Azure Lab Services resource skus.", + "schema": { + "$ref": "#/definitions/PagedLabServicesSkus" + } + }, + "default": { + "description": "The default error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "listSkus": { + "$ref": "./examples/Skus/listSkus.json" + } + } + } + } + }, + "definitions": { + "LabServicesSku": { + "description": "Azure Lab Services resource SKUs", + "type": "object", + "properties": { + "resourceType": { + "description": "The lab services resource type.", + "type": "string", + "readOnly": true + }, + "name": { + "description": "The name of the SKU.", + "type": "string", + "readOnly": true + }, + "tier": { + "description": "The tier of the SKU.", + "type": "string", + "enum": [ + "Standard", + "Premium" + ], + "x-ms-enum": { + "name": "LabServicesSkuTier", + "modelAsString": true + }, + "readOnly": true + }, + "size": { + "description": "The SKU size.", + "type": "string", + "readOnly": true + }, + "family": { + "description": "The family of the SKU.", + "type": "string", + "readOnly": true + }, + "capacity": { + "$ref": "#/definitions/LabServicesSkuCapacity" + }, + "capabilities": { + "description": "The capabilities of the SKU.", + "type": "array", + "items": { + "$ref": "#/definitions/LabServicesSkuCapabilities" + }, + "x-ms-identifiers": [ + "name" + ], + "readOnly": true + }, + "locations": { + "description": "List of locations that are available for a size.", + "type": "array", + "items": { + "type": "string" + }, + "readOnly": true + }, + "costs": { + "description": "Metadata for retrieving price info of a lab services SKUs.", + "type": "array", + "items": { + "$ref": "#/definitions/LabServicesSkuCost" + }, + "x-ms-identifiers": [], + "readOnly": true + }, + "restrictions": { + "description": "Restrictions of a lab services SKUs.", + "type": "array", + "items": { + "$ref": "#/definitions/LabServicesSkuRestrictions" + }, + "x-ms-identifiers": [], + "readOnly": true + } + } + }, + "PagedLabServicesSkus": { + "description": "Paged list of lab services skus.", + "type": "object", + "properties": { + "value": { + "description": "The array page of sku results.", + "type": "array", + "items": { + "$ref": "#/definitions/LabServicesSku" + }, + "x-ms-identifiers": [], + "readOnly": true + }, + "nextLink": { + "description": "The link to get the next page of sku results.", + "type": "string", + "readOnly": true + } + } + }, + "LabServicesSkuCapabilities": { + "description": "The array of capabilities of a lab services SKU.", + "type": "object", + "properties": { + "name": { + "description": "The name of the capability for a SKU.", + "type": "string", + "readOnly": true + }, + "value": { + "description": "The value of the capability for a SKU.", + "type": "string", + "readOnly": true + } + } + }, + "LabServicesSkuCapacity": { + "description": "The scale out/in options of the SKU.", + "type": "object", + "properties": { + "default": { + "description": "The default capacity for this resource.", + "type": "integer", + "format": "int64", + "readOnly": true + }, + "minimum": { + "description": "The lowest permitted capacity for this resource.", + "type": "integer", + "format": "int64", + "readOnly": true + }, + "maximum": { + "description": "The highest permitted capacity for this resource.", + "type": "integer", + "format": "int64", + "readOnly": true + }, + "scaleType": { + "description": "The localized name of the resource.", + "type": "string", + "enum": [ + "None", + "Manual", + "Automatic" + ], + "x-ms-enum": { + "name": "ScaleType", + "modelAsString": true, + "values": [ + { + "value": "None", + "description": "The capacity is not adjustable in any way." + }, + { + "value": "Manual", + "description": "The user must manually scale this SKU in and out." + }, + { + "value": "Automatic", + "description": "The user is permitted to scale this SKU in and out." + } + ] + }, + "readOnly": true + } + } + }, + "LabServicesSkuCost": { + "description": "The array of costs of a lab services SKU.", + "type": "object", + "properties": { + "meterId": { + "description": "The meter id.", + "type": "string", + "readOnly": true + }, + "quantity": { + "description": "The quantity of units charged.", + "type": "number", + "readOnly": true + }, + "extendedUnit": { + "description": "The extended unit.", + "type": "string", + "readOnly": true + } + } + }, + "LabServicesSkuRestrictions": { + "description": "The restriction details.", + "type": "object", + "properties": { + "type": { + "description": "The type of restriction.", + "type": "string", + "enum": [ + "Location" + ], + "x-ms-enum": { + "name": "RestrictionType", + "modelAsString": true + }, + "readOnly": true + }, + "values": { + "description": "The values of the restriction.", + "type": "array", + "items": { + "type": "string" + }, + "readOnly": true + }, + "reasonCode": { + "description": "The reason for the restriction.", + "type": "string", + "enum": [ + "QuotaId", + "NotAvailableForSubscription" + ], + "x-ms-enum": { + "name": "RestrictionReasonCode", + "modelAsString": true + }, + "readOnly": true + } + } + } + } +} diff --git a/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/Usages.json b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/Usages.json new file mode 100644 index 000000000000..164203f1ff92 --- /dev/null +++ b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/Usages.json @@ -0,0 +1,169 @@ +{ + "swagger": "2.0", + "info": { + "version": "2022-08-01", + "title": "LabServicesClient", + "description": "REST API for managing Azure Lab Services core usages." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "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}/providers/Microsoft.LabServices/locations/{location}/usages": { + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/LocationRouteParameter" + }, + { + "in": "query", + "name": "$filter", + "type": "string", + "description": "The filter to apply to the operation." + } + ], + "get": { + "tags": [ + "Usages" + ], + "summary": "Gets the list of usages.", + "description": "Returns list of usage per SKU family for the specified subscription in the specified region.", + "operationId": "Usages_ListByLocation", + "responses": { + "200": { + "description": "The request was successful; a list of usages is returned", + "schema": { + "$ref": "#/definitions/ListUsagesResult" + } + }, + "default": { + "description": "The default error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "listUsages": { + "$ref": "./examples/Usages/getUsages.json" + } + } + } + } + }, + "definitions": { + "ListUsagesResult": { + "description": "List of Core Usages.", + "type": "object", + "properties": { + "value": { + "description": "The array page of Usages.", + "type": "array", + "items": { + "$ref": "#/definitions/Usage" + } + }, + "nextLink": { + "description": "The link to get the next page of Usage result.", + "type": "string", + "readOnly": true + } + } + }, + "Usage": { + "description": "The core usage details.", + "type": "object", + "properties": { + "currentValue": { + "description": "The current usage.", + "type": "integer", + "format": "int64" + }, + "limit": { + "description": "The limit integer.", + "type": "integer", + "format": "int64" + }, + "unit": { + "description": "The unit details.", + "type": "string", + "enum": [ + "Count" + ], + "x-ms-enum": { + "name": "UsageUnit", + "modelAsString": true + } + }, + "name": { + "description": "The name.", + "$ref": "#/definitions/UsageName" + }, + "id": { + "description": "The fully qualified arm resource id.", + "type": "string" + } + } + }, + "UsageName": { + "description": "The Usage Names.", + "type": "object", + "properties": { + "localizedValue": { + "description": "The localized name of the resource.", + "type": "string" + }, + "skuInstances": { + "description": "The instances of the resource.", + "type": "array", + "items": { + "type": "string" + } + }, + "value": { + "description": "The name of the resource.", + "type": "string" + } + } + } + }, + "parameters": { + "LocationRouteParameter": { + "name": "location", + "in": "path", + "required": true, + "type": "string", + "description": "The location name.", + "pattern": "^[-\\w\\._]+$", + "minLength": 1, + "maxLength": 100, + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/Users.json b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/Users.json new file mode 100644 index 000000000000..5be322bb28d1 --- /dev/null +++ b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/Users.json @@ -0,0 +1,527 @@ +{ + "swagger": "2.0", + "info": { + "version": "2022-08-01", + "title": "LabServicesClient", + "description": "REST API for managing Azure Lab Services users." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "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" + } + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labs/{labName}/users": { + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "Labs.json#/parameters/LabNameParameter" + }, + { + "in": "query", + "name": "$filter", + "type": "string", + "description": "The filter to apply to the operation." + } + ], + "get": { + "tags": [ + "User" + ], + "summary": "Get all users for a lab.", + "description": "Returns a list of all users for a lab.", + "operationId": "Users_ListByLab", + "responses": { + "200": { + "description": "The request was successful; response contains all users for the given lab.", + "schema": { + "$ref": "#/definitions/PagedUsers" + } + }, + "default": { + "description": "The default error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "listUser": { + "$ref": "./examples/Users/listUser.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labs/{labName}/users/{userName}": { + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "Labs.json#/parameters/LabNameParameter" + }, + { + "$ref": "#/parameters/UserNameParameter" + } + ], + "get": { + "tags": [ + "User" + ], + "summary": "Get a lab user.", + "description": "Returns the properties of a lab user.", + "operationId": "Users_Get", + "responses": { + "200": { + "description": "The request was successful; response contains the lab user.", + "schema": { + "$ref": "#/definitions/User" + } + }, + "default": { + "description": "The default error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "getUser": { + "$ref": "./examples/Users/getUser.json" + } + } + }, + "put": { + "tags": [ + "User" + ], + "summary": "Create or update a lab user.", + "description": "Operation to create or update a lab user.", + "operationId": "Users_CreateOrUpdate", + "parameters": [ + { + "in": "body", + "name": "body", + "description": "The request body.", + "required": true, + "schema": { + "$ref": "#/definitions/User" + } + } + ], + "responses": { + "200": { + "description": "The user was updated successfully; response contains the lab user.", + "schema": { + "$ref": "#/definitions/User" + } + }, + "201": { + "description": "The user was created successfully; response contains the lab user.", + "schema": { + "$ref": "#/definitions/User" + } + }, + "202": { + "description": "The user was updated successfully and has a long running operation; response contains the lab user.", + "schema": { + "$ref": "#/definitions/User" + } + }, + "default": { + "description": "The default error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "original-uri" + }, + "x-ms-examples": { + "putUser": { + "$ref": "./examples/Users/putUser.json" + } + } + }, + "patch": { + "tags": [ + "User" + ], + "summary": "Update a lab user.", + "description": "Operation to update a lab user.", + "consumes": [ + "application/json" + ], + "operationId": "Users_Update", + "parameters": [ + { + "in": "body", + "name": "body", + "description": "The request body.", + "required": true, + "schema": { + "$ref": "#/definitions/UserUpdate" + } + } + ], + "responses": { + "200": { + "description": "The user was updated successfully; response contains the lab user.", + "schema": { + "$ref": "#/definitions/User" + } + }, + "202": { + "description": "The user was updated successfully and has a long running operation; response contains the lab user.", + "schema": { + "$ref": "#/definitions/User" + } + }, + "default": { + "description": "The default error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-examples": { + "patchUser": { + "$ref": "./examples/Users/patchUser.json" + } + } + }, + "delete": { + "tags": [ + "User" + ], + "summary": "Deletes a user resource.", + "description": "Operation to delete a user resource.", + "operationId": "Users_Delete", + "responses": { + "200": { + "description": "The request was completed." + }, + "202": { + "description": "The request was accepted." + }, + "204": { + "description": "The request has been fulfilled." + }, + "default": { + "description": "The default error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-examples": { + "deleteUser": { + "$ref": "./examples/Users/deleteUser.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labs/{labName}/users/{userName}/invite": { + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "Labs.json#/parameters/LabNameParameter" + }, + { + "$ref": "#/parameters/UserNameParameter" + } + ], + "post": { + "tags": [ + "User" + ], + "summary": "Invite a user to a lab.", + "description": "Operation to invite a user to a lab.", + "operationId": "Users_Invite", + "parameters": [ + { + "in": "body", + "name": "body", + "description": "The request body.", + "required": true, + "schema": { + "$ref": "#/definitions/InviteBody" + } + } + ], + "responses": { + "200": { + "description": "The request was successful." + }, + "202": { + "description": "The request was accepted." + }, + "default": { + "description": "The default error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-examples": { + "inviteUser": { + "$ref": "./examples/Users/inviteUser.json" + } + } + } + } + }, + "definitions": { + "User": { + "description": "User of a lab that can register for and use virtual machines within the lab.", + "type": "object", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "systemData": { + "description": "Metadata pertaining to creation and last modification of the user resource.", + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData", + "readOnly": true + }, + "properties": { + "description": "User resource properties", + "$ref": "#/definitions/UserProperties", + "x-ms-client-flatten": true + } + }, + "required": [ + "properties" + ] + }, + "PagedUsers": { + "description": "Paged list of users.", + "type": "object", + "properties": { + "value": { + "description": "The array page of user results.", + "type": "array", + "items": { + "$ref": "#/definitions/User" + }, + "readOnly": true + }, + "nextLink": { + "description": "The link to get the next page of image results.", + "type": "string", + "readOnly": true + } + } + }, + "UserUpdate": { + "description": "User of a lab that can register for and use virtual machines within the lab. Used for updates.", + "type": "object", + "properties": { + "properties": { + "description": "User resource properties", + "$ref": "#/definitions/UserUpdateProperties", + "x-ms-client-flatten": true + } + } + }, + "UserUpdateProperties": { + "description": "User resource properties used for updates.", + "type": "object", + "properties": { + "additionalUsageQuota": { + "description": "The amount of usage quota time the user gets in addition to the lab usage quota.", + "type": "string", + "format": "duration" + } + } + }, + "UserProperties": { + "description": "User resource properties", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/UserUpdateProperties" + } + ], + "properties": { + "provisioningState": { + "description": "Current provisioning state of the user resource.", + "$ref": "LabServices.json#/definitions/provisioningState", + "readOnly": true + }, + "displayName": { + "description": "Display name of the user, for example user's full name.", + "type": "string", + "readOnly": true + }, + "email": { + "description": "Email address of the user.", + "$ref": "LabServices.json#/definitions/emailAddress", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "registrationState": { + "description": "State of the user's registration within the lab.", + "$ref": "#/definitions/RegistrationState", + "readOnly": true + }, + "invitationState": { + "description": "State of the invitation message for the user.", + "$ref": "#/definitions/InvitationState", + "readOnly": true + }, + "invitationSent": { + "description": "Date and time when the invitation message was sent to the user.", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "totalUsage": { + "description": "How long the user has used their virtual machines in this lab.", + "type": "string", + "format": "duration", + "readOnly": true + } + }, + "required": [ + "email" + ] + }, + "RegistrationState": { + "type": "string", + "enum": [ + "NotRegistered", + "Registered" + ], + "description": "The user lab registration state.", + "x-ms-enum": { + "name": "RegistrationState", + "modelAsString": false, + "values": [ + { + "value": "Registered", + "description": "User has not yet registered with the lab." + }, + { + "value": "NotRegistered", + "description": "User has registered with the lab." + } + ] + } + }, + "InvitationState": { + "type": "string", + "enum": [ + "NotSent", + "Sending", + "Sent", + "Failed" + ], + "description": "The lab user invitation state.", + "x-ms-enum": { + "name": "InvitationState", + "modelAsString": false, + "values": [ + { + "value": "NotSent", + "description": "The invitation has not been sent." + }, + { + "value": "Sending", + "description": "Currently sending the invitation." + }, + { + "value": "Sent", + "description": "The invitation has been successfully sent." + }, + { + "value": "Failed", + "description": "There was an error while sending the invitation." + } + ] + } + }, + "InviteBody": { + "description": "Body for a user invite request", + "type": "object", + "properties": { + "text": { + "description": "Custom text for the invite email.", + "type": "string" + } + } + } + }, + "parameters": { + "UserNameParameter": { + "name": "userName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the user that uniquely identifies it within containing lab. Used in resource URIs.", + "pattern": "^[-\\w\\\\._\\\\(\\\\)]+$", + "minLength": 1, + "maxLength": 100, + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/VirtualMachines.json b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/VirtualMachines.json new file mode 100644 index 000000000000..4a82118f516f --- /dev/null +++ b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/VirtualMachines.json @@ -0,0 +1,615 @@ +{ + "swagger": "2.0", + "info": { + "version": "2022-08-01", + "title": "LabServicesClient", + "description": "REST API for managing Azure Lab Services virtual machines." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "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" + } + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labs/{labName}/virtualMachines": { + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "Labs.json#/parameters/LabNameParameter" + }, + { + "in": "query", + "name": "$filter", + "type": "string", + "description": "The filter to apply to the operation." + } + ], + "get": { + "tags": [ + "VirtualMachine" + ], + "summary": "Get all virtual machines for a lab.", + "description": "Returns a list of all virtual machines for a lab.", + "operationId": "VirtualMachines_ListByLab", + "responses": { + "200": { + "description": "The request was successful; response contains all virtual machines for the given lab.", + "schema": { + "$ref": "#/definitions/PagedVirtualMachines" + } + }, + "default": { + "description": "The default error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "listVirtualMachine": { + "$ref": "./examples/VirtualMachines/listVirtualMachine.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labs/{labName}/virtualMachines/{virtualMachineName}": { + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "Labs.json#/parameters/LabNameParameter" + }, + { + "$ref": "#/parameters/VirtualMachineNameParameter" + } + ], + "get": { + "tags": [ + "VirtualMachine" + ], + "summary": "Get a lab virtual machine.", + "description": "Returns the properties for a lab virtual machine.", + "operationId": "VirtualMachines_Get", + "responses": { + "200": { + "description": "The request was successful; response contains the lab virtual machine.", + "schema": { + "$ref": "#/definitions/VirtualMachine" + } + }, + "default": { + "description": "The default error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "getVirtualMachine": { + "$ref": "./examples/VirtualMachines/getVirtualMachine.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labs/{labName}/virtualMachines/{virtualMachineName}/start": { + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "Labs.json#/parameters/LabNameParameter" + }, + { + "$ref": "#/parameters/VirtualMachineNameParameter" + } + ], + "post": { + "tags": [ + "VirtualMachine" + ], + "summary": "Start a lab virtual machine.", + "description": "Action to start a lab virtual machine.", + "operationId": "VirtualMachines_Start", + "responses": { + "200": { + "description": "The request was completed." + }, + "202": { + "description": "The request was accepted." + }, + "default": { + "description": "The default error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-examples": { + "startVirtualMachine": { + "$ref": "./examples/VirtualMachines/startVirtualMachine.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labs/{labName}/virtualMachines/{virtualMachineName}/stop": { + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "Labs.json#/parameters/LabNameParameter" + }, + { + "$ref": "#/parameters/VirtualMachineNameParameter" + } + ], + "post": { + "tags": [ + "VirtualMachine" + ], + "summary": "Stop a lab virtual machine.", + "description": "Action to stop a lab virtual machine.", + "operationId": "VirtualMachines_Stop", + "responses": { + "200": { + "description": "The request was completed." + }, + "202": { + "description": "The request was accepted." + }, + "default": { + "description": "The default error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-examples": { + "stopVirtualMachine": { + "$ref": "./examples/VirtualMachines/stopVirtualMachine.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labs/{labName}/virtualMachines/{virtualMachineName}/reimage": { + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "Labs.json#/parameters/LabNameParameter" + }, + { + "$ref": "#/parameters/VirtualMachineNameParameter" + } + ], + "post": { + "tags": [ + "VirtualMachine" + ], + "summary": "Re-image a lab virtual machine.", + "description": "Re-image a lab virtual machine. The virtual machine will be deleted and recreated using the latest published snapshot of the reference environment of the lab.", + "operationId": "VirtualMachines_Reimage", + "responses": { + "200": { + "description": "The request was completed." + }, + "202": { + "description": "The request was accepted." + }, + "default": { + "description": "The default error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-examples": { + "reimageVirtualMachine": { + "$ref": "./examples/VirtualMachines/reimageVirtualMachine.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labs/{labName}/virtualMachines/{virtualMachineName}/redeploy": { + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "Labs.json#/parameters/LabNameParameter" + }, + { + "$ref": "#/parameters/VirtualMachineNameParameter" + } + ], + "post": { + "tags": [ + "VirtualMachine" + ], + "summary": "Redeploy a lab virtual machine to a different compute node. For troubleshooting connectivity.", + "description": "Action to redeploy a lab virtual machine to a different compute node. For troubleshooting connectivity.", + "operationId": "VirtualMachines_Redeploy", + "responses": { + "200": { + "description": "The request was completed." + }, + "202": { + "description": "The request was accepted." + }, + "default": { + "description": "The default error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-examples": { + "redeployVirtualMachine": { + "$ref": "./examples/VirtualMachines/redeployVirtualMachine.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labs/{labName}/virtualMachines/{virtualMachineName}/resetPassword": { + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "Labs.json#/parameters/LabNameParameter" + }, + { + "$ref": "#/parameters/VirtualMachineNameParameter" + } + ], + "post": { + "tags": [ + "VirtualMachine" + ], + "summary": "Reset a lab virtual machine password.", + "description": "Resets a lab virtual machine password.", + "operationId": "VirtualMachines_ResetPassword", + "parameters": [ + { + "in": "body", + "name": "body", + "description": "The request body.", + "required": true, + "schema": { + "$ref": "#/definitions/ResetPasswordBody" + } + } + ], + "responses": { + "200": { + "description": "The request was completed." + }, + "202": { + "description": "The request was accepted." + }, + "default": { + "description": "The default error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-examples": { + "resetPasswordVirtualMachine": { + "$ref": "./examples/VirtualMachines/resetPasswordVirtualMachine.json" + } + } + } + } + }, + "definitions": { + "VirtualMachine": { + "description": "A lab virtual machine resource.", + "type": "object", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "systemData": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData", + "description": "System data of the Lab virtual machine.", + "readOnly": true + }, + "properties": { + "description": "Virtual machine resource properties", + "$ref": "#/definitions/VirtualMachineProperties", + "x-ms-client-flatten": true + } + }, + "required": [ + "properties" + ] + }, + "PagedVirtualMachines": { + "description": "Paged list of lab services virtual machines.", + "type": "object", + "properties": { + "value": { + "description": "The array page of virtual machine results.", + "type": "array", + "items": { + "$ref": "#/definitions/VirtualMachine" + }, + "readOnly": true + }, + "nextLink": { + "description": "The link to get the next page of virtual machine results.", + "type": "string", + "readOnly": true + } + } + }, + "VirtualMachineProperties": { + "description": "Virtual machine resource properties", + "type": "object", + "properties": { + "provisioningState": { + "description": "Current provisioning state of the virtual machine.", + "$ref": "LabServices.json#/definitions/provisioningState", + "readOnly": true + }, + "state": { + "description": "The current state of the virtual machine", + "$ref": "#/definitions/VirtualMachineState", + "readOnly": true + }, + "connectionProfile": { + "description": "Profile for information about connecting to the virtual machine.", + "$ref": "#/definitions/VirtualMachineConnectionProfile", + "readOnly": true + }, + "claimedByUserId": { + "description": "The lab user ID (not the PUID!) of who claimed the virtual machine.", + "type": "string", + "readOnly": true + }, + "vmType": { + "description": "The type of this VM resource", + "$ref": "#/definitions/VirtualMachineType", + "readOnly": true + } + } + }, + "ResetPasswordBody": { + "description": "Body of a reset password request.", + "type": "object", + "properties": { + "username": { + "description": "The user whose password is being reset", + "type": "string", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "password": { + "description": "The password", + "type": "string", + "x-ms-secret": true, + "x-ms-mutability": [ + "create" + ] + } + }, + "required": [ + "username", + "password" + ] + }, + "VirtualMachineState": { + "type": "string", + "enum": [ + "Stopped", + "Starting", + "Running", + "Stopping", + "ResettingPassword", + "Reimaging", + "Redeploying" + ], + "description": "The state of a virtual machine.", + "x-ms-enum": { + "name": "VirtualMachineState", + "modelAsString": false, + "values": [ + { + "value": "Stopped", + "description": "The VM is currently stopped." + }, + { + "value": "Starting", + "description": "The VM is starting." + }, + { + "value": "Running", + "description": "The VM is running." + }, + { + "value": "Stopping", + "description": "The VM is stopping." + }, + { + "value": "ResettingPassword", + "description": "The VM password is being reset." + }, + { + "value": "Reimaging", + "description": "The VM is being reimaged." + }, + { + "value": "Redeploying", + "description": "The VM is being redeployed." + } + ] + } + }, + "VirtualMachineConnectionProfile": { + "description": "The connection information for the virtual machine", + "type": "object", + "properties": { + "privateIpAddress": { + "description": "The private IP address of the virtual machine.", + "type": "string", + "readOnly": true + }, + "sshAuthority": { + "description": "Port and host name separated by semicolon for connecting via SSH protocol to the virtual machine.", + "type": "string", + "readOnly": true + }, + "sshInBrowserUrl": { + "description": "URL for connecting via SSH protocol to the virtual machine in browser.", + "$ref": "LabServices.json#/definitions/url", + "readOnly": true + }, + "rdpAuthority": { + "description": "Port and host name separated by semicolon for connecting via RDP protocol to the virtual machine.", + "type": "string", + "readOnly": true + }, + "rdpInBrowserUrl": { + "description": "URL for connecting via RDP protocol to the virtual machine in browser.", + "$ref": "LabServices.json#/definitions/url", + "readOnly": true + }, + "adminUsername": { + "description": "The username used to log on to the virtual machine as admin.", + "type": "string", + "readOnly": true + }, + "nonAdminUsername": { + "description": "The username used to log on to the virtual machine as non-admin, if one exists.", + "type": "string", + "readOnly": true + } + } + }, + "VirtualMachineType": { + "type": "string", + "enum": [ + "User", + "Template" + ], + "description": "The type of the lab virtual machine.", + "x-ms-enum": { + "name": "VirtualMachineType", + "modelAsString": false, + "values": [ + { + "value": "User", + "description": "A user VM" + }, + { + "value": "Template", + "description": "A template VM" + } + ] + } + } + }, + "parameters": { + "VirtualMachineNameParameter": { + "name": "virtualMachineName", + "in": "path", + "required": true, + "type": "string", + "description": "The ID of the virtual machine that uniquely identifies it within the containing lab. Used in resource URIs.", + "pattern": "^[-\\w\\\\._\\\\(\\\\)]+$", + "minLength": 1, + "maxLength": 100, + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Images/getImage.json b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Images/getImage.json new file mode 100644 index 000000000000..1e3ae9ed7388 --- /dev/null +++ b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Images/getImage.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "api-version": "2022-08-01", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "testrg123", + "labPlanName": "testlabplan", + "imageName": "image1" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labPlans/testlabplan/images/image1", + "name": "image1", + "type": "Microsoft.LabServices/Image", + "systemData": { + "createdBy": "identity123", + "createdByType": "User", + "createdAt": "2020-05-01T10:00:00Z", + "lastModifiedBy": "identity123", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-01T09:12:28Z" + }, + "properties": { + "provisioningState": "Succeeded", + "displayName": "Windows Server 2019 Datacenter", + "description": "A description of the image", + "osType": "Windows", + "offer": "WindowsServer", + "publisher": "Microsoft", + "sku": "2019-Datacenter", + "version": "2019.0.20190410", + "sharedGalleryId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/Providers/Microsoft.Compute/Locations/westus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2019-Datacenter/Versions/2019.0.20190410", + "enabledState": "Enabled" + } + } + } + } +} diff --git a/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Images/listImages.json b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Images/listImages.json new file mode 100644 index 000000000000..427df874d21b --- /dev/null +++ b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Images/listImages.json @@ -0,0 +1,67 @@ +{ + "parameters": { + "api-version": "2022-08-01", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "testrg123", + "labPlanName": "testlabplan" + }, + "responses": { + "200": { + "body": { + "nextLink": null, + "value": [ + { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labPlans/testlabplan/images/image1", + "name": "image1", + "type": "Microsoft.LabServices/Image", + "systemData": { + "createdBy": "identity123", + "createdByType": "User", + "createdAt": "2020-05-01T10:00:00Z", + "lastModifiedBy": "identity123", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-01T09:12:28Z" + }, + "properties": { + "provisioningState": "Succeeded", + "displayName": "Windows Server 2019 Datacenter", + "description": "A description of the image", + "osType": "Windows", + "offer": "WindowsServer", + "publisher": "Microsoft", + "sku": "2019-Datacenter", + "version": "2019.0.20190410", + "sharedGalleryId": null, + "enabledState": "Enabled" + } + }, + { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labPlans/testlabplan/images/image2", + "name": "image2", + "type": "Microsoft.LabServices/Image", + "systemData": { + "createdBy": "identity123", + "createdByType": "User", + "createdAt": "2020-05-01T10:00:00Z", + "lastModifiedBy": "identity123", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-01T09:12:28Z" + }, + "properties": { + "provisioningState": "Succeeded", + "displayName": "A custom image", + "description": "An example custom image response", + "osType": "Windows", + "offer": null, + "publisher": null, + "sku": null, + "version": null, + "sharedGalleryId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Compute/galleries/sig/images/test-1", + "enabledState": "Enabled" + } + } + ] + } + } + } +} diff --git a/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Images/patchImage.json b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Images/patchImage.json new file mode 100644 index 000000000000..920ac042ea90 --- /dev/null +++ b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Images/patchImage.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "api-version": "2022-08-01", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "testrg123", + "labPlanName": "testlabplan", + "imageName": "image1", + "body": { + "properties": { + "enabledState": "Enabled" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labPlans/testlabplan/images/image1", + "name": "image1", + "type": "Microsoft.LabServices/Image", + "systemData": { + "createdBy": "identity123", + "createdByType": "User", + "createdAt": "2020-05-01T10:00:00Z", + "lastModifiedBy": "identity123", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-01T09:12:28Z" + }, + "properties": { + "provisioningState": "Succeeded", + "displayName": "Windows Server 2019 Datacenter", + "description": "A description of the image", + "osType": "Windows", + "offer": "WindowsServer", + "publisher": "Microsoft", + "sku": "2019-Datacenter", + "version": "2019.0.20190410", + "enabledState": "Enabled" + } + } + } + } +} diff --git a/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Images/putImage.json b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Images/putImage.json new file mode 100644 index 000000000000..920ac042ea90 --- /dev/null +++ b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Images/putImage.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "api-version": "2022-08-01", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "testrg123", + "labPlanName": "testlabplan", + "imageName": "image1", + "body": { + "properties": { + "enabledState": "Enabled" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labPlans/testlabplan/images/image1", + "name": "image1", + "type": "Microsoft.LabServices/Image", + "systemData": { + "createdBy": "identity123", + "createdByType": "User", + "createdAt": "2020-05-01T10:00:00Z", + "lastModifiedBy": "identity123", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-01T09:12:28Z" + }, + "properties": { + "provisioningState": "Succeeded", + "displayName": "Windows Server 2019 Datacenter", + "description": "A description of the image", + "osType": "Windows", + "offer": "WindowsServer", + "publisher": "Microsoft", + "sku": "2019-Datacenter", + "version": "2019.0.20190410", + "enabledState": "Enabled" + } + } + } + } +} diff --git a/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/LabPlans/deleteLabPlan.json b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/LabPlans/deleteLabPlan.json new file mode 100644 index 000000000000..5f4361e360fb --- /dev/null +++ b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/LabPlans/deleteLabPlan.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "api-version": "2022-08-01", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "testrg123", + "labPlanName": "testlabplan" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.LabServices/operationresults/a64149d8-84cb-4566-ab8e-b4ee1a074174" + } + }, + "204": {} + } +} diff --git a/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/LabPlans/getLabPlan.json b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/LabPlans/getLabPlan.json new file mode 100644 index 000000000000..4d03e543df29 --- /dev/null +++ b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/LabPlans/getLabPlan.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "api-version": "2022-08-01", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "testrg123", + "labPlanName": "testlabplan" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labPlans/testlabplan", + "name": "testlabplan", + "type": "Microsoft.LabServices/LabPlan", + "location": "westus", + "systemData": { + "createdBy": "identity123", + "createdByType": "User", + "createdAt": "2020-05-01T10:00:00Z", + "lastModifiedBy": "identity123", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-01T09:12:28Z" + }, + "properties": { + "provisioningState": "Succeeded", + "defaultConnectionProfile": { + "webSshAccess": "None", + "webRdpAccess": "None", + "clientSshAccess": "Public", + "clientRdpAccess": "Public" + }, + "defaultAutoShutdownProfile": { + "shutdownOnDisconnect": "Enabled", + "shutdownWhenNotConnected": "Enabled", + "shutdownOnIdle": "UserAbsence", + "disconnectDelay": "PT5M", + "noConnectDelay": "PT5M", + "idleDelay": "PT5M" + }, + "defaultNetworkProfile": { + "subnetId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default" + }, + "sharedGalleryId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Compute/galleries/testsig", + "supportInfo": { + "url": "help.contoso.com", + "email": "help@contoso.com", + "phone": "+1-202-555-0123", + "instructions": "Contact support for help." + } + }, + "identity": { + "type": "SystemAssigned", + "principalId": "a799d834-d3c9-4554-ba5d-3771a995aa6a", + "tenantId": "8c33e124-0581-45e0-84d4-f80d59de7806" + } + } + } + } +} diff --git a/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/LabPlans/listLabPlans.json b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/LabPlans/listLabPlans.json new file mode 100644 index 000000000000..004ac7cf9257 --- /dev/null +++ b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/LabPlans/listLabPlans.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "api-version": "2022-08-01", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345" + }, + "responses": { + "200": { + "body": { + "nextLink": null, + "value": [ + { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labPlans/testlabplan", + "name": "testlabplan", + "type": "Microsoft.LabServices/LabPlan", + "location": "westus", + "systemData": { + "createdBy": "identity123", + "createdByType": "User", + "createdAt": "2020-05-01T10:00:00Z", + "lastModifiedBy": "identity123", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-01T09:12:28Z" + }, + "properties": { + "provisioningState": "Succeeded", + "defaultConnectionProfile": { + "webSshAccess": "None", + "webRdpAccess": "None", + "clientSshAccess": "Public", + "clientRdpAccess": "Public" + }, + "defaultAutoShutdownProfile": { + "shutdownOnDisconnect": "Enabled", + "shutdownWhenNotConnected": "Enabled", + "shutdownOnIdle": "UserAbsence", + "disconnectDelay": "PT5M", + "noConnectDelay": "PT15M", + "idleDelay": "PT15M" + }, + "defaultNetworkProfile": { + "subnetId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default" + }, + "sharedGalleryId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Compute/galleries/testsig", + "supportInfo": { + "url": "help.contoso.com", + "email": "help@contoso.com", + "phone": "+1-202-555-0123", + "instructions": "Contact support for help." + } + }, + "identity": { + "type": "SystemAssigned", + "principalId": "a799d834-d3c9-4554-ba5d-3771a995aa6a", + "tenantId": "8c33e124-0581-45e0-84d4-f80d59de7806" + } + } + ] + } + } + } +} diff --git a/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/LabPlans/listResourceGroupLabPlans.json b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/LabPlans/listResourceGroupLabPlans.json new file mode 100644 index 000000000000..d6159838c7b3 --- /dev/null +++ b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/LabPlans/listResourceGroupLabPlans.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "api-version": "2022-08-01", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "testrg123" + }, + "responses": { + "200": { + "body": { + "nextLink": null, + "value": [ + { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labPlans/testlabplan", + "name": "testlabplan", + "type": "Microsoft.LabServices/LabPlan", + "location": "westus", + "systemData": { + "createdBy": "identity123", + "createdByType": "User", + "createdAt": "2020-05-01T10:00:00Z", + "lastModifiedBy": "identity123", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-01T09:12:28Z" + }, + "properties": { + "provisioningState": "Succeeded", + "defaultConnectionProfile": { + "webSshAccess": "None", + "webRdpAccess": "None", + "clientSshAccess": "Public", + "clientRdpAccess": "Public" + }, + "defaultAutoShutdownProfile": { + "shutdownOnDisconnect": "Enabled", + "shutdownWhenNotConnected": "Enabled", + "shutdownOnIdle": "UserAbsence", + "disconnectDelay": "PT5M", + "noConnectDelay": "PT5M", + "idleDelay": "PT5M" + }, + "defaultNetworkProfile": { + "subnetId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default" + }, + "sharedGalleryId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Compute/galleries/testsig", + "supportInfo": { + "url": "help.contoso.com", + "email": "help@contoso.com", + "phone": "+1-202-555-0123", + "instructions": "Contact support for help." + } + } + } + ] + } + } + } +} diff --git a/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/LabPlans/patchLabPlan.json b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/LabPlans/patchLabPlan.json new file mode 100644 index 000000000000..9e3ed23654cd --- /dev/null +++ b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/LabPlans/patchLabPlan.json @@ -0,0 +1,109 @@ +{ + "parameters": { + "api-version": "2022-08-01", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "testrg123", + "labPlanName": "testlabplan", + "body": { + "properties": { + "defaultConnectionProfile": { + "webSshAccess": "None", + "webRdpAccess": "None", + "clientSshAccess": "Public", + "clientRdpAccess": "Public" + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labPlans/testlabplan", + "name": "testlabplan", + "type": "Microsoft.LabServices/LabPlan", + "location": "westus", + "systemData": { + "createdBy": "identity123", + "createdByType": "User", + "createdAt": "2020-05-01T10:00:00Z", + "lastModifiedBy": "identity123", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-01T09:12:28Z" + }, + "properties": { + "provisioningState": "Succeeded", + "defaultConnectionProfile": { + "webSshAccess": "None", + "webRdpAccess": "None", + "clientSshAccess": "Public", + "clientRdpAccess": "Public" + }, + "defaultAutoShutdownProfile": { + "shutdownOnDisconnect": "Enabled", + "shutdownWhenNotConnected": "Enabled", + "shutdownOnIdle": "UserAbsence", + "disconnectDelay": "PT5M", + "noConnectDelay": "PT5M", + "idleDelay": "PT5M" + }, + "defaultNetworkProfile": { + "subnetId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default" + }, + "sharedGalleryId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Compute/galleries/testsig", + "supportInfo": { + "url": "help.contoso.com", + "email": "help@contoso.com", + "phone": "+1-202-555-0123", + "instructions": "Contact support for help." + } + } + } + }, + "202": { + "body": { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labPlans/testlabplan", + "name": "testlabplan", + "type": "Microsoft.LabServices/LabPlan", + "location": "westus", + "systemData": { + "createdBy": "identity123", + "createdByType": "User", + "createdAt": "2020-05-01T10:00:00Z", + "lastModifiedBy": "identity123", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-01T09:12:28Z" + }, + "properties": { + "provisioningState": "Updating", + "defaultConnectionProfile": { + "webSshAccess": "None", + "webRdpAccess": "None", + "clientSshAccess": "Public", + "clientRdpAccess": "Public" + }, + "defaultAutoShutdownProfile": { + "shutdownOnDisconnect": "Enabled", + "shutdownWhenNotConnected": "Enabled", + "shutdownOnIdle": "UserAbsence", + "disconnectDelay": "PT5M", + "noConnectDelay": "PT5M", + "idleDelay": "PT5M" + }, + "defaultNetworkProfile": { + "subnetId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default" + }, + "sharedGalleryId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Compute/galleries/testsig", + "supportInfo": { + "url": "help.contoso.com", + "email": "help@contoso.com", + "phone": "+1-202-555-0123", + "instructions": "Contact support for help." + } + } + }, + "headers": { + "Location": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.LabServices/operationresults/a64149d8-84cb-4566-ab8e-b4ee1a074174" + } + } + } +} diff --git a/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/LabPlans/putLabPlan.json b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/LabPlans/putLabPlan.json new file mode 100644 index 000000000000..1563dc31ffe0 --- /dev/null +++ b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/LabPlans/putLabPlan.json @@ -0,0 +1,174 @@ +{ + "parameters": { + "api-version": "2022-08-01", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "testrg123", + "labPlanName": "testlabplan", + "body": { + "location": "westus", + "properties": { + "defaultConnectionProfile": { + "webSshAccess": "None", + "webRdpAccess": "None", + "clientSshAccess": "Public", + "clientRdpAccess": "Public" + }, + "defaultAutoShutdownProfile": { + "shutdownOnDisconnect": "Enabled", + "shutdownWhenNotConnected": "Enabled", + "shutdownOnIdle": "UserAbsence", + "disconnectDelay": "PT5M", + "noConnectDelay": "PT5M", + "idleDelay": "PT5M" + }, + "defaultNetworkProfile": { + "subnetId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default" + }, + "sharedGalleryId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Compute/galleries/testsig", + "supportInfo": { + "url": "help.contoso.com", + "email": "help@contoso.com", + "phone": "+1-202-555-0123", + "instructions": "Contact support for help." + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labPlans/testlabplan", + "name": "testlabplan", + "type": "Microsoft.LabServices/LabPlan", + "location": "westus", + "systemData": { + "createdBy": "identity123", + "createdByType": "User", + "createdAt": "2020-05-01T10:00:00Z", + "lastModifiedBy": "identity123", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-01T09:12:28Z" + }, + "properties": { + "provisioningState": "Succeeded", + "defaultConnectionProfile": { + "webSshAccess": "None", + "webRdpAccess": "None", + "clientSshAccess": "Public", + "clientRdpAccess": "Public" + }, + "defaultAutoShutdownProfile": { + "shutdownOnDisconnect": "Enabled", + "shutdownWhenNotConnected": "Enabled", + "shutdownOnIdle": "UserAbsence", + "disconnectDelay": "PT5M", + "noConnectDelay": "PT5M", + "idleDelay": "PT5M" + }, + "defaultNetworkProfile": { + "subnetId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default" + }, + "sharedGalleryId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Compute/galleries/testsig", + "supportInfo": { + "url": "help.contoso.com", + "email": "help@contoso.com", + "phone": "+1-202-555-0123", + "instructions": "Contact support for help." + } + } + } + }, + "201": { + "body": { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labPlans/testlabplan", + "name": "testlabplan", + "type": "Microsoft.LabServices/LabPlan", + "location": "westus", + "systemData": { + "createdBy": "identity123", + "createdByType": "User", + "createdAt": "2020-05-01T10:00:00Z", + "lastModifiedBy": "identity123", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-01T09:12:28Z" + }, + "properties": { + "provisioningState": "Creating", + "defaultConnectionProfile": { + "webSshAccess": "None", + "webRdpAccess": "None", + "clientSshAccess": "Public", + "clientRdpAccess": "Public" + }, + "defaultAutoShutdownProfile": { + "shutdownOnDisconnect": "Enabled", + "shutdownWhenNotConnected": "Enabled", + "shutdownOnIdle": "UserAbsence", + "disconnectDelay": "PT5M", + "noConnectDelay": "PT5M", + "idleDelay": "PT5M" + }, + "defaultNetworkProfile": { + "subnetId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default" + }, + "sharedGalleryId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Compute/galleries/testsig", + "supportInfo": { + "url": "help.contoso.com", + "email": "help@contoso.com", + "phone": "+1-202-555-0123", + "instructions": "Contact support for help." + } + } + }, + "headers": { + "Location": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.LabServices/operationresults/a64149d8-84cb-4566-ab8e-b4ee1a074174" + } + }, + "202": { + "body": { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labPlans/testlabplan", + "name": "testlabplan", + "type": "Microsoft.LabServices/LabPlan", + "location": "westus", + "systemData": { + "createdBy": "identity123", + "createdByType": "User", + "createdAt": "2020-05-01T10:00:00Z", + "lastModifiedBy": "identity123", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-01T09:12:28Z" + }, + "properties": { + "provisioningState": "Updating", + "defaultConnectionProfile": { + "webSshAccess": "None", + "webRdpAccess": "None", + "clientSshAccess": "Public", + "clientRdpAccess": "Public" + }, + "defaultAutoShutdownProfile": { + "shutdownOnDisconnect": "Enabled", + "shutdownWhenNotConnected": "Enabled", + "shutdownOnIdle": "UserAbsence", + "disconnectDelay": "PT5M", + "noConnectDelay": "PT5M", + "idleDelay": "PT5M" + }, + "defaultNetworkProfile": { + "subnetId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default" + }, + "sharedGalleryId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Compute/galleries/testsig", + "supportInfo": { + "url": "help.contoso.com", + "email": "help@contoso.com", + "phone": "+1-202-555-0123", + "instructions": "Contact support for help." + } + } + }, + "headers": { + "Location": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.LabServices/operationresults/a64149d8-84cb-4566-ab8e-b4ee1a074174" + } + } + } +} diff --git a/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/LabPlans/saveImageVirtualMachine.json b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/LabPlans/saveImageVirtualMachine.json new file mode 100644 index 000000000000..2059bf20e8bb --- /dev/null +++ b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/LabPlans/saveImageVirtualMachine.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2022-08-01", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "testrg123", + "labPlanName": "testlabplan", + "body": { + "name": "Test Image", + "labVirtualMachineId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labs/testlab/virtualMachines/template" + } + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.LabServices/operationresults/a64149d8-84cb-4566-ab8e-b4ee1a074174" + } + } + } +} diff --git a/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/LabServices/listOperations.json b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/LabServices/listOperations.json new file mode 100644 index 000000000000..77c2bac8da4d --- /dev/null +++ b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/LabServices/listOperations.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "api-version": "2022-08-01" + }, + "responses": { + "200": { + "body": { + "nextLink": null, + "value": [ + { + "name": "Microsoft.LabServices/labPlans/write", + "isDataAction": false, + "display": { + "provider": "Microsoft Azure Lab Services", + "resource": "Microsoft.LabServices/labPlans", + "operation": "Create or Update Lab Plan", + "description": "Create new or update an existing lab plan." + }, + "origin": "user,system" + } + ] + } + } + } +} diff --git a/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Labs/deleteLab.json b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Labs/deleteLab.json new file mode 100644 index 000000000000..86f7c7387e96 --- /dev/null +++ b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Labs/deleteLab.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "api-version": "2022-08-01", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "testrg123", + "labName": "testlab" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.LabServices/operationresults/a64149d8-84cb-4566-ab8e-b4ee1a074174" + } + }, + "204": {} + } +} diff --git a/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Labs/getLab.json b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Labs/getLab.json new file mode 100644 index 000000000000..6418913349e7 --- /dev/null +++ b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Labs/getLab.json @@ -0,0 +1,76 @@ +{ + "parameters": { + "api-version": "2022-08-01", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "testrg123", + "labName": "testlab" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labs/testlab", + "name": "testlabplan", + "type": "Microsoft.LabServices/Lab", + "location": "westus", + "systemData": { + "createdBy": "identity123", + "createdByType": "User", + "createdAt": "2020-05-01T10:00:00Z", + "lastModifiedBy": "identity123", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-01T09:12:28Z" + }, + "properties": { + "provisioningState": "Succeeded", + "connectionProfile": { + "webSshAccess": "None", + "webRdpAccess": "None", + "clientSshAccess": "Public", + "clientRdpAccess": "Public" + }, + "autoShutdownProfile": { + "shutdownOnDisconnect": "Enabled", + "shutdownWhenNotConnected": "Enabled", + "shutdownOnIdle": "UserAbsence", + "disconnectDelay": "PT5M", + "noConnectDelay": "PT5M", + "idleDelay": "PT5M" + }, + "securityProfile": { + "registrationCode": "fAkEcodE", + "openAccess": "Disabled" + }, + "networkProfile": { + "subnetId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default" + }, + "virtualMachineProfile": { + "createOption": "TemplateVM", + "imageReference": { + "offer": "WindowsServer", + "publisher": "Microsoft", + "sku": "2019-Datacenter", + "version": "2019.0.20190410" + }, + "osType": "Windows", + "sku": { + "name": "Medium", + "capacity": 20 + }, + "additionalCapabilities": { + "installGpuDrivers": "Disabled" + }, + "usageQuota": "PT10H", + "useSharedPassword": "Disabled", + "adminUser": { + "username": "test-user" + } + }, + "title": "Test Lab", + "description": "This is a test lab.", + "labPlanId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labPlans/testlabplan", + "state": "Draft" + } + } + } + } +} diff --git a/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Labs/listLabs.json b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Labs/listLabs.json new file mode 100644 index 000000000000..695ce35e0b70 --- /dev/null +++ b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Labs/listLabs.json @@ -0,0 +1,79 @@ +{ + "parameters": { + "api-version": "2022-08-01", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345" + }, + "responses": { + "200": { + "body": { + "nextLink": null, + "value": [ + { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labs/testlab", + "name": "testlabplan", + "type": "Microsoft.LabServices/Lab", + "location": "westus", + "systemData": { + "createdBy": "identity123", + "createdByType": "User", + "createdAt": "2020-05-01T10:00:00Z", + "lastModifiedBy": "identity123", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-01T09:12:28Z" + }, + "properties": { + "provisioningState": "Succeeded", + "connectionProfile": { + "webSshAccess": "None", + "webRdpAccess": "None", + "clientSshAccess": "Public", + "clientRdpAccess": "Public" + }, + "autoShutdownProfile": { + "shutdownOnDisconnect": "Enabled", + "shutdownWhenNotConnected": "Enabled", + "shutdownOnIdle": "UserAbsence", + "disconnectDelay": "PT5M", + "noConnectDelay": "PT5M", + "idleDelay": "PT5M" + }, + "securityProfile": { + "registrationCode": "fAkEcodE", + "openAccess": "Disabled" + }, + "networkProfile": { + "subnetId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default" + }, + "virtualMachineProfile": { + "createOption": "TemplateVM", + "imageReference": { + "offer": "WindowsServer", + "publisher": "Microsoft", + "sku": "2019-Datacenter", + "version": "2019.0.20190410" + }, + "osType": "Windows", + "sku": { + "name": "Medium", + "capacity": 20 + }, + "additionalCapabilities": { + "installGpuDrivers": "Disabled" + }, + "usageQuota": "PT10H", + "useSharedPassword": "Disabled", + "adminUser": { + "username": "test-user" + } + }, + "title": "Test Lab", + "description": "This is a test lab.", + "labPlanId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labPlans/testlabplan", + "state": "Draft" + } + } + ] + } + } + } +} diff --git a/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Labs/listResourceGroupLabs.json b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Labs/listResourceGroupLabs.json new file mode 100644 index 000000000000..f5664204b566 --- /dev/null +++ b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Labs/listResourceGroupLabs.json @@ -0,0 +1,80 @@ +{ + "parameters": { + "api-version": "2022-08-01", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "testrg123" + }, + "responses": { + "200": { + "body": { + "nextLink": null, + "value": [ + { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labs/testlab", + "name": "testlabplan", + "type": "Microsoft.LabServices/Lab", + "location": "westus", + "systemData": { + "createdBy": "identity123", + "createdByType": "User", + "createdAt": "2020-05-01T10:00:00Z", + "lastModifiedBy": "identity123", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-01T09:12:28Z" + }, + "properties": { + "provisioningState": "Succeeded", + "connectionProfile": { + "webSshAccess": "None", + "webRdpAccess": "None", + "clientSshAccess": "Public", + "clientRdpAccess": "Public" + }, + "autoShutdownProfile": { + "shutdownOnDisconnect": "Enabled", + "shutdownWhenNotConnected": "Enabled", + "shutdownOnIdle": "UserAbsence", + "disconnectDelay": "PT5M", + "noConnectDelay": "PT5M", + "idleDelay": "PT5M" + }, + "securityProfile": { + "registrationCode": "fAkEcodE", + "openAccess": "Disabled" + }, + "networkProfile": { + "subnetId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default" + }, + "virtualMachineProfile": { + "createOption": "TemplateVM", + "imageReference": { + "offer": "WindowsServer", + "publisher": "Microsoft", + "sku": "2019-Datacenter", + "version": "2019.0.20190410" + }, + "osType": "Windows", + "sku": { + "name": "Medium", + "capacity": 20 + }, + "additionalCapabilities": { + "installGpuDrivers": "Disabled" + }, + "usageQuota": "PT10H", + "useSharedPassword": "Disabled", + "adminUser": { + "username": "test-user" + } + }, + "title": "Test Lab", + "description": "This is a test lab.", + "labPlanId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labPlans/testlabplan", + "state": "Draft" + } + } + ] + } + } + } +} diff --git a/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Labs/patchLab.json b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Labs/patchLab.json new file mode 100644 index 000000000000..fe1d64aac7a6 --- /dev/null +++ b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Labs/patchLab.json @@ -0,0 +1,151 @@ +{ + "parameters": { + "api-version": "2022-08-01", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "testrg123", + "labName": "testlab", + "body": { + "properties": { + "securityProfile": { + "openAccess": "Enabled" + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labs/testlab", + "name": "testlabplan", + "type": "Microsoft.LabServices/Lab", + "location": "westus", + "systemData": { + "createdBy": "identity123", + "createdByType": "User", + "createdAt": "2020-05-01T10:00:00Z", + "lastModifiedBy": "identity123", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-01T09:12:28Z" + }, + "properties": { + "provisioningState": "Succeeded", + "connectionProfile": { + "webSshAccess": "None", + "webRdpAccess": "None", + "clientSshAccess": "Public", + "clientRdpAccess": "Public" + }, + "autoShutdownProfile": { + "shutdownOnDisconnect": "Enabled", + "shutdownWhenNotConnected": "Enabled", + "shutdownOnIdle": "UserAbsence", + "disconnectDelay": "PT5M", + "noConnectDelay": "PT5M", + "idleDelay": "PT5M" + }, + "securityProfile": { + "registrationCode": "fAkEcodE", + "openAccess": "Enabled" + }, + "networkProfile": { + "subnetId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/id" + }, + "virtualMachineProfile": { + "createOption": "TemplateVM", + "imageReference": { + "offer": "WindowsServer", + "publisher": "Microsoft", + "sku": "2019-Datacenter", + "version": "2019.0.20190410" + }, + "sku": { + "name": "Medium", + "capacity": 20 + }, + "additionalCapabilities": { + "installGpuDrivers": "Disabled" + }, + "usageQuota": "PT10H", + "useSharedPassword": "Disabled", + "adminUser": { + "username": "test-user" + } + }, + "title": "Test Lab", + "description": "This is a test lab.", + "labPlanId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labPlans/testlabplan", + "state": "Draft" + } + } + }, + "202": { + "body": { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labs/testlab", + "name": "testlabplan", + "type": "Microsoft.LabServices/Lab", + "location": "westus", + "systemData": { + "createdBy": "identity123", + "createdByType": "User", + "createdAt": "2020-05-01T10:00:00Z", + "lastModifiedBy": "identity123", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-01T09:12:28Z" + }, + "properties": { + "provisioningState": "Updating", + "connectionProfile": { + "webSshAccess": "None", + "webRdpAccess": "None", + "clientSshAccess": "Public", + "clientRdpAccess": "Public" + }, + "autoShutdownProfile": { + "shutdownOnDisconnect": "Enabled", + "shutdownWhenNotConnected": "Enabled", + "shutdownOnIdle": "UserAbsence", + "disconnectDelay": "PT5M", + "noConnectDelay": "PT5M", + "idleDelay": "PT5M" + }, + "securityProfile": { + "registrationCode": "fAkEcodE", + "openAccess": "Enabled" + }, + "networkProfile": { + "subnetId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default" + }, + "virtualMachineProfile": { + "createOption": "TemplateVM", + "imageReference": { + "offer": "WindowsServer", + "publisher": "Microsoft", + "sku": "2019-Datacenter", + "version": "2019.0.20190410" + }, + "osType": "Windows", + "sku": { + "name": "Medium", + "capacity": 20 + }, + "additionalCapabilities": { + "installGpuDrivers": "Disabled" + }, + "usageQuota": "PT10H", + "useSharedPassword": "Disabled", + "adminUser": { + "username": "test-user" + } + }, + "title": "Test Lab", + "description": "This is a test lab.", + "labPlanId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labPlans/testlabplan", + "state": "Draft" + } + }, + "headers": { + "Location": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.LabServices/operationresults/a64149d8-84cb-4566-ab8e-b4ee1a074174" + } + } + } +} diff --git a/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Labs/publishLab.json b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Labs/publishLab.json new file mode 100644 index 000000000000..dc92fd0e6a32 --- /dev/null +++ b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Labs/publishLab.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "api-version": "2022-08-01", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "testrg123", + "labName": "testlab" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.LabServices/operationresults/a64149d8-84cb-4566-ab8e-b4ee1a074174" + } + } + } +} diff --git a/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Labs/putLab.json b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Labs/putLab.json new file mode 100644 index 000000000000..99df76bd853c --- /dev/null +++ b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Labs/putLab.json @@ -0,0 +1,263 @@ +{ + "parameters": { + "api-version": "2022-08-01", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "testrg123", + "labName": "testlab", + "body": { + "location": "westus", + "properties": { + "connectionProfile": { + "webSshAccess": "None", + "webRdpAccess": "None", + "clientSshAccess": "Public", + "clientRdpAccess": "Public" + }, + "autoShutdownProfile": { + "shutdownOnDisconnect": "Enabled", + "shutdownWhenNotConnected": "Enabled", + "shutdownOnIdle": "UserAbsence", + "disconnectDelay": "PT5M", + "noConnectDelay": "PT5M", + "idleDelay": "PT5M" + }, + "securityProfile": { + "openAccess": "Disabled" + }, + "networkProfile": { + "subnetId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default" + }, + "virtualMachineProfile": { + "createOption": "TemplateVM", + "imageReference": { + "offer": "WindowsServer", + "publisher": "Microsoft", + "sku": "2019-Datacenter", + "version": "2019.0.20190410" + }, + "sku": { + "name": "Medium" + }, + "additionalCapabilities": { + "installGpuDrivers": "Disabled" + }, + "usageQuota": "PT10H", + "useSharedPassword": "Disabled", + "adminUser": { + "username": "test-user" + } + }, + "title": "Test Lab", + "description": "This is a test lab.", + "labPlanId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labPlans/testlabplan", + "state": "Draft" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labs/testlab", + "name": "testlabplan", + "type": "Microsoft.LabServices/Lab", + "location": "westus", + "systemData": { + "createdBy": "identity123", + "createdByType": "User", + "createdAt": "2020-05-01T10:00:00Z", + "lastModifiedBy": "identity123", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-01T09:12:28Z" + }, + "properties": { + "provisioningState": "Succeeded", + "connectionProfile": { + "webSshAccess": "None", + "webRdpAccess": "None", + "clientSshAccess": "Public", + "clientRdpAccess": "Public" + }, + "autoShutdownProfile": { + "shutdownOnDisconnect": "Enabled", + "shutdownWhenNotConnected": "Enabled", + "shutdownOnIdle": "UserAbsence", + "disconnectDelay": "PT5M", + "noConnectDelay": "PT5M", + "idleDelay": "PT5M" + }, + "securityProfile": { + "registrationCode": "fAkEcodE", + "openAccess": "Disabled" + }, + "networkProfile": { + "subnetId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default" + }, + "virtualMachineProfile": { + "createOption": "TemplateVM", + "imageReference": { + "offer": "WindowsServer", + "publisher": "Microsoft", + "sku": "2019-Datacenter", + "version": "2019.0.20190410" + }, + "osType": "Windows", + "sku": { + "name": "Medium", + "capacity": 20 + }, + "additionalCapabilities": { + "installGpuDrivers": "Disabled" + }, + "usageQuota": "PT10H", + "useSharedPassword": "Disabled", + "adminUser": { + "username": "test-user" + } + }, + "title": "Test Lab", + "description": "This is a test lab.", + "labPlanId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labPlans/testlabplan", + "state": "Draft" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labs/testlab", + "name": "testlabplan", + "type": "Microsoft.LabServices/Lab", + "location": "westus", + "systemData": { + "createdBy": "identity123", + "createdByType": "User", + "createdAt": "2020-05-01T10:00:00Z", + "lastModifiedBy": "identity123", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-01T09:12:28Z" + }, + "properties": { + "provisioningState": "Creating", + "connectionProfile": { + "webSshAccess": "None", + "webRdpAccess": "None", + "clientSshAccess": "Public", + "clientRdpAccess": "Public" + }, + "autoShutdownProfile": { + "shutdownOnDisconnect": "Enabled", + "shutdownWhenNotConnected": "Enabled", + "shutdownOnIdle": "UserAbsence", + "disconnectDelay": "PT5M", + "noConnectDelay": "PT5M", + "idleDelay": "PT5M" + }, + "securityProfile": { + "registrationCode": "fAkEcodE", + "openAccess": "Disabled" + }, + "networkProfile": { + "subnetId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default" + }, + "virtualMachineProfile": { + "createOption": "TemplateVM", + "imageReference": { + "offer": "WindowsServer", + "publisher": "Microsoft", + "sku": "2019-Datacenter", + "version": "2019.0.20190410" + }, + "osType": "Windows", + "sku": { + "name": "Medium", + "capacity": 20 + }, + "additionalCapabilities": { + "installGpuDrivers": "Disabled" + }, + "usageQuota": "PT10H", + "useSharedPassword": "Disabled", + "adminUser": { + "username": "test-user" + } + }, + "title": "Test Lab", + "description": "This is a test lab.", + "labPlanId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labPlans/testlabplan", + "state": "Draft" + } + }, + "headers": { + "Location": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.LabServices/operationresults/a64149d8-84cb-4566-ab8e-b4ee1a074174" + } + }, + "202": { + "body": { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labs/testlab", + "name": "testlabplan", + "type": "Microsoft.LabServices/Lab", + "location": "westus", + "systemData": { + "createdBy": "identity123", + "createdByType": "User", + "createdAt": "2020-05-01T10:00:00Z", + "lastModifiedBy": "identity123", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-01T09:12:28Z" + }, + "properties": { + "provisioningState": "Updating", + "connectionProfile": { + "webSshAccess": "None", + "webRdpAccess": "None", + "clientSshAccess": "Public", + "clientRdpAccess": "Public" + }, + "autoShutdownProfile": { + "shutdownOnDisconnect": "Enabled", + "shutdownWhenNotConnected": "Enabled", + "shutdownOnIdle": "UserAbsence", + "disconnectDelay": "PT5M", + "noConnectDelay": "PT5M", + "idleDelay": "PT5M" + }, + "securityProfile": { + "registrationCode": "fAkEcodE", + "openAccess": "Disabled" + }, + "networkProfile": { + "subnetId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default" + }, + "virtualMachineProfile": { + "createOption": "TemplateVM", + "imageReference": { + "offer": "WindowsServer", + "publisher": "Microsoft", + "sku": "2019-Datacenter", + "version": "2019.0.20190410" + }, + "osType": "Windows", + "sku": { + "name": "Medium", + "capacity": 20 + }, + "additionalCapabilities": { + "installGpuDrivers": "Disabled" + }, + "usageQuota": "PT10H", + "useSharedPassword": "Disabled", + "adminUser": { + "username": "test-user" + } + }, + "title": "Test Lab", + "description": "This is a test lab.", + "labPlanId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labPlans/testlabplan", + "state": "Draft" + } + }, + "headers": { + "Location": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.LabServices/operationresults/a64149d8-84cb-4566-ab8e-b4ee1a074174" + } + } + } +} diff --git a/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Labs/syncLab.json b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Labs/syncLab.json new file mode 100644 index 000000000000..dc92fd0e6a32 --- /dev/null +++ b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Labs/syncLab.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "api-version": "2022-08-01", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "testrg123", + "labName": "testlab" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.LabServices/operationresults/a64149d8-84cb-4566-ab8e-b4ee1a074174" + } + } + } +} diff --git a/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/OperationResults/getOperationResult.json b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/OperationResults/getOperationResult.json new file mode 100644 index 000000000000..450b0198a0dc --- /dev/null +++ b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/OperationResults/getOperationResult.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2022-08-01", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "operationResultId": "a64149d8-84cb-4566-ab8e-b4ee1a074174" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.LabServices/operationresults/a64149d8-84cb-4566-ab8e-b4ee1a074174", + "name": "a64149d8-84cb-4566-ab8e-b4ee1a074174", + "status": "InProgress", + "startTime": "2020-05-01T10:00:00Z" + } + }, + "204": {} + } +} diff --git a/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Schedules/deleteSchedule.json b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Schedules/deleteSchedule.json new file mode 100644 index 000000000000..89d302933dcc --- /dev/null +++ b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Schedules/deleteSchedule.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2022-08-01", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "testrg123", + "labName": "testlab", + "scheduleName": "schedule1" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.LabServices/operationresults/a64149d8-84cb-4566-ab8e-b4ee1a074174" + } + }, + "204": {} + } +} diff --git a/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Schedules/getSchedule.json b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Schedules/getSchedule.json new file mode 100644 index 000000000000..dfe459b0d8cf --- /dev/null +++ b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Schedules/getSchedule.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "api-version": "2022-08-01", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "testrg123", + "labName": "testlab", + "scheduleName": "schedule1" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labs/testlab/schedules/schedule1", + "name": "schedule1", + "type": "Microsoft.LabServices/Schedule", + "systemData": { + "createdBy": "identity123", + "createdByType": "User", + "createdAt": "2020-05-01T10:00:00Z", + "lastModifiedBy": "identity123", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-01T09:12:28Z" + }, + "properties": { + "provisioningState": "Succeeded", + "startAt": "2020-05-26T12:00:00Z", + "stopAt": "2020-05-26T18:00:00Z", + "recurrencePattern": { + "frequency": "Daily", + "interval": 1, + "expirationDate": "2020-08-14T23:59:59Z" + }, + "timeZoneId": "America/Los_Angeles", + "notes": "Schedule 1 for students" + } + } + } + } +} diff --git a/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Schedules/listSchedule.json b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Schedules/listSchedule.json new file mode 100644 index 000000000000..55f55049215b --- /dev/null +++ b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Schedules/listSchedule.json @@ -0,0 +1,73 @@ +{ + "parameters": { + "api-version": "2022-08-01", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "testrg123", + "labName": "testlab" + }, + "responses": { + "200": { + "body": { + "nextLink": null, + "value": [ + { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labs/testlab/schedules/schedule1", + "name": "schedule1", + "type": "Microsoft.LabServices/Schedule", + "systemData": { + "createdBy": "identity123", + "createdByType": "User", + "createdAt": "2020-05-01T10:00:00Z", + "lastModifiedBy": "identity123", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-01T09:12:28Z" + }, + "properties": { + "provisioningState": "Succeeded", + "startAt": "2020-05-26T12:00:00Z", + "stopAt": "2020-05-26T18:00:00Z", + "recurrencePattern": { + "frequency": "Daily", + "interval": 1, + "expirationDate": "2020-08-14T23:59:59Z" + }, + "timeZoneId": "America/Los_Angeles", + "notes": "Schedule 1 for students" + } + }, + { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labs/testlab/schedules/schedule2", + "name": "schedule2", + "type": "Microsoft.LabServices/Schedule", + "systemData": { + "createdBy": "identity123", + "createdByType": "User", + "createdAt": "2020-05-01T10:00:00Z", + "lastModifiedBy": "identity123", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-01T09:12:28Z" + }, + "properties": { + "provisioningState": "Succeeded", + "startAt": "2020-05-26T12:00:00Z", + "stopAt": "2020-05-26T18:00:00Z", + "recurrencePattern": { + "frequency": "Weekly", + "weekDays": [ + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday" + ], + "expirationDate": "2020-08-14T23:59:59Z" + }, + "timeZoneId": "America/Los_Angeles", + "notes": "Schedule 2 for students" + } + } + ] + } + } + } +} diff --git a/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Schedules/patchSchedule.json b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Schedules/patchSchedule.json new file mode 100644 index 000000000000..c079a5c3c9ca --- /dev/null +++ b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Schedules/patchSchedule.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "api-version": "2022-08-01", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "testrg123", + "labName": "testlab", + "scheduleName": "schedule1", + "body": { + "properties": { + "recurrencePattern": { + "frequency": "Daily", + "interval": 2, + "expirationDate": "2020-08-14T23:59:59Z" + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labs/testlab/schedules/schedule1", + "name": "schedule1", + "type": "Microsoft.LabServices/Schedule", + "systemData": { + "createdBy": "identity123", + "createdByType": "User", + "createdAt": "2020-05-01T10:00:00Z", + "lastModifiedBy": "identity123", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-01T09:12:28Z" + }, + "properties": { + "provisioningState": "Succeeded", + "startAt": "2020-05-26T12:00:00Z", + "stopAt": "2020-05-26T18:00:00Z", + "recurrencePattern": { + "frequency": "Daily", + "interval": 2, + "expirationDate": "2020-08-14T23:59:59Z" + }, + "timeZoneId": "America/Los_Angeles", + "notes": "Schedule 1 for students" + } + } + } + } +} diff --git a/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Schedules/putSchedule.json b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Schedules/putSchedule.json new file mode 100644 index 000000000000..187071bae23c --- /dev/null +++ b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Schedules/putSchedule.json @@ -0,0 +1,78 @@ +{ + "parameters": { + "api-version": "2022-08-01", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "testrg123", + "labName": "testlab", + "scheduleName": "schedule1", + "body": { + "properties": { + "startAt": "2020-05-26T12:00:00Z", + "stopAt": "2020-05-26T18:00:00Z", + "recurrencePattern": { + "frequency": "Daily", + "interval": 2, + "expirationDate": "2020-08-14T23:59:59Z" + }, + "timeZoneId": "America/Los_Angeles", + "notes": "Schedule 1 for students" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labs/testlab/schedules/schedule1", + "name": "schedule1", + "type": "Microsoft.LabServices/Schedule", + "systemData": { + "createdBy": "identity123", + "createdByType": "User", + "createdAt": "2020-05-01T10:00:00Z", + "lastModifiedBy": "identity123", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-01T09:12:28Z" + }, + "properties": { + "provisioningState": "Succeeded", + "startAt": "2020-05-26T12:00:00Z", + "stopAt": "2020-05-26T18:00:00Z", + "recurrencePattern": { + "frequency": "Daily", + "interval": 2, + "expirationDate": "2020-08-14T23:59:59Z" + }, + "timeZoneId": "America/Los_Angeles", + "notes": "Schedule 1 for students" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labs/testlab/schedules/schedule1", + "name": "schedule1", + "type": "Microsoft.LabServices/Schedule", + "systemData": { + "createdBy": "identity123", + "createdByType": "User", + "createdAt": "2020-05-01T10:00:00Z", + "lastModifiedBy": "identity123", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-01T09:12:28Z" + }, + "properties": { + "provisioningState": "Succeeded", + "startAt": "2020-05-26T12:00:00Z", + "stopAt": "2020-05-26T18:00:00Z", + "recurrencePattern": { + "frequency": "Daily", + "interval": 2, + "expirationDate": "2020-08-14T23:59:59Z" + }, + "timeZoneId": "America/Los_Angeles", + "notes": "Schedule 1 for students" + } + } + } + } +} diff --git a/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Skus/listSkus.json b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Skus/listSkus.json new file mode 100644 index 000000000000..f9cd5a7f814c --- /dev/null +++ b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Skus/listSkus.json @@ -0,0 +1,271 @@ +{ + "parameters": { + "api-version": "2022-08-01", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345" + }, + "responses": { + "200": { + "body": { + "nextLink": null, + "value": [ + { + "resourceType": "labs", + "name": "Standard_Fv2_2_4GB_64_S_SSD", + "tier": "Standard", + "size": "Fv2_2_4GB_64_S_SSD", + "family": "Fv2", + "locations": [ + "eastus2" + ], + "capacity": { + "minimum": 0, + "maximum": 400, + "default": 1, + "scaleType": "Automatic" + }, + "costs": [ + { + "meterId": "", + "quantity": 20.4, + "extendedUnit": "WindowsHourly" + }, + { + "meterId": "", + "quantity": 20.4, + "extendedUnit": "HybridBenefitHourly" + }, + { + "meterId": "", + "quantity": 0.7, + "extendedUnit": "InactiveHourly" + }, + { + "meterId": "", + "quantity": 20.4, + "extendedUnit": "LinuxHourly" + } + ], + "capabilities": [ + { + "name": "vCPUs", + "value": "2" + }, + { + "name": "MemoryGB", + "value": "4" + }, + { + "name": "StorageGB", + "value": "64" + }, + { + "name": "StorageType", + "value": "StandardSSD" + }, + { + "name": "HyperVGenerations", + "value": "V1,V2" + }, + { + "name": "IsGpu", + "value": "False" + } + ] + }, + { + "resourceType": "labs", + "name": "Standard_Fv2_2_4GB_256_S_SSD", + "tier": "Standard", + "size": "Fv2_2_4GB_256_S_SSD", + "family": "Fv2", + "locations": [ + "eastus2" + ], + "capacity": { + "minimum": 0, + "maximum": 400, + "default": 1, + "scaleType": "Automatic" + }, + "costs": [ + { + "meterId": "", + "quantity": 22.8, + "extendedUnit": "WindowsHourly" + }, + { + "meterId": "", + "quantity": 22.8, + "extendedUnit": "HybridBenefitHourly" + }, + { + "meterId": "", + "quantity": 2.7, + "extendedUnit": "InactiveHourly" + }, + { + "meterId": "", + "quantity": 22.8, + "extendedUnit": "LinuxHourly" + } + ], + "capabilities": [ + { + "name": "vCPUs", + "value": "2" + }, + { + "name": "MemoryGB", + "value": "4" + }, + { + "name": "StorageGB", + "value": "256" + }, + { + "name": "StorageType", + "value": "StandardSSD" + }, + { + "name": "HyperVGenerations", + "value": "V1,V2" + }, + { + "name": "IsGpu", + "value": "False" + } + ] + }, + { + "resourceType": "labs", + "name": "Standard_Dv4_2_8GB_128_S_SSD", + "tier": "Standard", + "size": "Dv4_2_8GB_128_S_SSD", + "family": "Dv4", + "locations": [ + "eastus2" + ], + "capacity": { + "minimum": 0, + "maximum": 400, + "default": 1, + "scaleType": "Automatic" + }, + "costs": [ + { + "meterId": "", + "quantity": 24.2, + "extendedUnit": "WindowsHourly" + }, + { + "meterId": "", + "quantity": 24.2, + "extendedUnit": "HybridBenefitHourly" + }, + { + "meterId": "", + "quantity": 1.4, + "extendedUnit": "InactiveHourly" + }, + { + "meterId": "", + "quantity": 24.2, + "extendedUnit": "LinuxHourly" + } + ], + "capabilities": [ + { + "name": "vCPUs", + "value": "2" + }, + { + "name": "MemoryGB", + "value": "8" + }, + { + "name": "StorageGB", + "value": "128" + }, + { + "name": "StorageType", + "value": "StandardSSD" + }, + { + "name": "HyperVGenerations", + "value": "V1,V2" + }, + { + "name": "IsGpu", + "value": "False" + } + ] + }, + { + "resourceType": "labs", + "name": "Standard_Dv4_2_8GB_256_S_SSD", + "tier": "Standard", + "size": "Dv4_2_8GB_256_S_SSD", + "family": "Dv4", + "locations": [ + "eastus2" + ], + "capacity": { + "minimum": 0, + "maximum": 400, + "default": 1, + "scaleType": "Automatic" + }, + "costs": [ + { + "meterId": "", + "quantity": 25.8, + "extendedUnit": "WindowsHourly" + }, + { + "meterId": "", + "quantity": 25.8, + "extendedUnit": "HybridBenefitHourly" + }, + { + "meterId": "", + "quantity": 2.7, + "extendedUnit": "InactiveHourly" + }, + { + "meterId": "", + "quantity": 25.8, + "extendedUnit": "LinuxHourly" + } + ], + "capabilities": [ + { + "name": "vCPUs", + "value": "2" + }, + { + "name": "MemoryGB", + "value": "8" + }, + { + "name": "StorageGB", + "value": "256" + }, + { + "name": "StorageType", + "value": "StandardSSD" + }, + { + "name": "HyperVGenerations", + "value": "V1,V2" + }, + { + "name": "IsGpu", + "value": "False" + } + ] + } + ] + } + } + } +} diff --git a/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Usages/getUsages.json b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Usages/getUsages.json new file mode 100644 index 000000000000..7ce9487ed6b5 --- /dev/null +++ b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Usages/getUsages.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2022-08-01", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "location": "eastus2" + }, + "responses": { + "200": { + "body": { + "nextLink": null, + "value": [ + { + "currentValue": 10, + "limit": 100, + "unit": "Count", + "name": { + "value": "NCasv3T4" + }, + "id": "" + }, + { + "currentValue": 5, + "limit": 30, + "unit": "Count", + "name": { + "value": "ESv4" + }, + "id": "" + } + ] + } + } + } +} diff --git a/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Users/deleteUser.json b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Users/deleteUser.json new file mode 100644 index 000000000000..b2d5cec0682e --- /dev/null +++ b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Users/deleteUser.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2022-08-01", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "testrg123", + "labName": "testlab", + "userName": "testuser" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.LabServices/operationresults/a64149d8-84cb-4566-ab8e-b4ee1a074174" + } + }, + "204": {} + } +} diff --git a/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Users/getUser.json b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Users/getUser.json new file mode 100644 index 000000000000..319a3e6b719f --- /dev/null +++ b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Users/getUser.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "api-version": "2022-08-01", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "testrg123", + "labName": "testlab", + "userName": "testuser" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labs/testlab/users/testuser", + "name": "default", + "type": "Microsoft.LabServices/User", + "systemData": { + "createdBy": "identity123", + "createdByType": "User", + "createdAt": "2020-05-01T10:00:00Z", + "lastModifiedBy": "identity123", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-01T09:12:28Z" + }, + "properties": { + "provisioningState": "Succeeded", + "displayName": "Test User", + "email": "testuser@contoso.com", + "registrationState": "Registered", + "invitationState": "Sent", + "totalUsage": "PT10H", + "additionalUsageQuota": "PT10H" + } + } + } + } +} diff --git a/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Users/inviteUser.json b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Users/inviteUser.json new file mode 100644 index 000000000000..3c71c8d54faf --- /dev/null +++ b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Users/inviteUser.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "api-version": "2022-08-01", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "testrg123", + "labName": "testlab", + "userName": "testuser", + "body": { + "text": "Invitation to lab testlab" + } + }, + "responses": { + "200": {}, + "202": {} + } +} diff --git a/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Users/listUser.json b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Users/listUser.json new file mode 100644 index 000000000000..c1850f4e23e4 --- /dev/null +++ b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Users/listUser.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "api-version": "2022-08-01", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "testrg123", + "labName": "testlab" + }, + "responses": { + "200": { + "body": { + "nextLink": null, + "value": [ + { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labs/testlab/users/testuser", + "name": "default", + "type": "Microsoft.LabServices/User", + "systemData": { + "createdBy": "identity123", + "createdByType": "User", + "createdAt": "2020-05-01T10:00:00Z", + "lastModifiedBy": "identity123", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-01T09:12:28Z" + }, + "properties": { + "provisioningState": "Succeeded", + "displayName": "Test User", + "email": "testuser@contoso.com", + "registrationState": "Registered", + "invitationState": "Sent", + "totalUsage": "PT10H", + "additionalUsageQuota": "PT10H" + } + } + ] + } + } + } +} diff --git a/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Users/patchUser.json b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Users/patchUser.json new file mode 100644 index 000000000000..5f244b94d1c8 --- /dev/null +++ b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Users/patchUser.json @@ -0,0 +1,67 @@ +{ + "parameters": { + "api-version": "2022-08-01", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "testrg123", + "labName": "testlab", + "userName": "testuser", + "body": { + "properties": { + "additionalUsageQuota": "PT10H" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labs/testlab/users/testuser", + "name": "default", + "type": "Microsoft.LabServices/User", + "systemData": { + "createdBy": "identity123", + "createdByType": "User", + "createdAt": "2020-05-01T10:00:00Z", + "lastModifiedBy": "identity123", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-01T09:12:28Z" + }, + "properties": { + "provisioningState": "Succeeded", + "displayName": "Test User", + "email": "testuser@contoso.com", + "registrationState": "Registered", + "invitationState": "Sent", + "totalUsage": "PT10H", + "additionalUsageQuota": "PT10H" + } + } + }, + "202": { + "body": { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labs/testlab/users/testuser", + "name": "default", + "type": "Microsoft.LabServices/User", + "systemData": { + "createdBy": "identity123", + "createdByType": "User", + "createdAt": "2020-05-01T10:00:00Z", + "lastModifiedBy": "identity123", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-01T09:12:28Z" + }, + "properties": { + "provisioningState": "Updating", + "displayName": "Test User", + "email": "testuser@contoso.com", + "registrationState": "Registered", + "invitationState": "Sent", + "totalUsage": "PT10H", + "additionalUsageQuota": "PT10H" + } + }, + "headers": { + "Location": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.LabServices/operationresults/a64149d8-84cb-4566-ab8e-b4ee1a074174" + } + } + } +} diff --git a/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Users/putUser.json b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Users/putUser.json new file mode 100644 index 000000000000..ab602cb93239 --- /dev/null +++ b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/Users/putUser.json @@ -0,0 +1,95 @@ +{ + "parameters": { + "api-version": "2022-08-01", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "testrg123", + "labName": "testlab", + "userName": "testuser", + "body": { + "properties": { + "additionalUsageQuota": "PT10H", + "email": "testuser@contoso.com" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labs/testlab/users/testuser", + "name": "default", + "type": "Microsoft.LabServices/User", + "systemData": { + "createdBy": "identity123", + "createdByType": "User", + "createdAt": "2020-05-01T10:00:00Z", + "lastModifiedBy": "identity123", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-01T09:12:28Z" + }, + "properties": { + "provisioningState": "Succeeded", + "displayName": "Test User", + "email": "testuser@contoso.com", + "registrationState": "Registered", + "invitationState": "Sent", + "totalUsage": "PT10H", + "additionalUsageQuota": "PT10H" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labs/testlab/users/testuser", + "name": "default", + "type": "Microsoft.LabServices/User", + "systemData": { + "createdBy": "identity123", + "createdByType": "User", + "createdAt": "2020-05-01T10:00:00Z", + "lastModifiedBy": "identity123", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-01T09:12:28Z" + }, + "properties": { + "provisioningState": "Succeeded", + "displayName": "Test User", + "email": "testuser@contoso.com", + "registrationState": "Registered", + "invitationState": "Sent", + "totalUsage": "PT10H", + "additionalUsageQuota": "PT10H" + } + }, + "headers": { + "Location": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.LabServices/operationresults/a64149d8-84cb-4566-ab8e-b4ee1a074174" + } + }, + "202": { + "body": { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labs/testlab/users/testuser", + "name": "default", + "type": "Microsoft.LabServices/User", + "systemData": { + "createdBy": "identity123", + "createdByType": "User", + "createdAt": "2020-05-01T10:00:00Z", + "lastModifiedBy": "identity123", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-01T09:12:28Z" + }, + "properties": { + "provisioningState": "Updating", + "displayName": "Test User", + "email": "testuser@contoso.com", + "registrationState": "Registered", + "invitationState": "Sent", + "totalUsage": "PT10H", + "additionalUsageQuota": "PT10H" + } + }, + "headers": { + "Location": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.LabServices/operationresults/a64149d8-84cb-4566-ab8e-b4ee1a074174" + } + } + } +} diff --git a/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/VirtualMachines/getVirtualMachine.json b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/VirtualMachines/getVirtualMachine.json new file mode 100644 index 000000000000..b81598e4bef5 --- /dev/null +++ b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/VirtualMachines/getVirtualMachine.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "api-version": "2022-08-01", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "testrg123", + "labName": "testlab", + "virtualMachineName": "template" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labs/testlab/virtualMachines/template", + "name": "default", + "type": "Microsoft.LabServices/VirtualMachine", + "systemData": { + "createdBy": "identity123", + "createdByType": "User", + "createdAt": "2020-05-01T10:00:00Z", + "lastModifiedBy": "identity123", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-01T09:12:28Z" + }, + "properties": { + "provisioningState": "Succeeded", + "state": "Running", + "connectionProfile": { + "privateIpAddress": "192.168.2.1", + "sshAuthority": "vm-42.contoso.com:22", + "sshInBrowserUrl": "vm-42.contoso.com", + "rdpAuthority": "vm-42.contoso.com:3389", + "rdpInBrowserUrl": "vm-42.contoso.com", + "adminUsername": "user123" + }, + "claimedByUserId": "testuser567", + "vmType": "Template" + } + } + } + } +} diff --git a/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/VirtualMachines/listVirtualMachine.json b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/VirtualMachines/listVirtualMachine.json new file mode 100644 index 000000000000..8385be4eab0d --- /dev/null +++ b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/VirtualMachines/listVirtualMachine.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "api-version": "2022-08-01", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "testrg123", + "labName": "testlab" + }, + "responses": { + "200": { + "body": { + "nextLink": null, + "value": [ + { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labs/testlab/virtualMachines/template", + "name": "default", + "type": "Microsoft.LabServices/VirtualMachine", + "systemData": { + "createdBy": "identity123", + "createdByType": "User", + "createdAt": "2020-05-01T10:00:00Z", + "lastModifiedBy": "identity123", + "lastModifiedByType": "User", + "lastModifiedAt": "2020-06-01T09:12:28Z" + }, + "properties": { + "provisioningState": "Succeeded", + "state": "Running", + "connectionProfile": { + "privateIpAddress": "192.168.2.1", + "sshAuthority": "vm-42.contoso.com:22", + "sshInBrowserUrl": "vm-42.contoso.com", + "rdpAuthority": "vm-42.contoso.com:3389", + "rdpInBrowserUrl": "vm-42.contoso.com", + "adminUsername": "user123" + }, + "claimedByUserId": "testuser567", + "vmType": "Template" + } + } + ] + } + } + } +} diff --git a/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/VirtualMachines/redeployVirtualMachine.json b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/VirtualMachines/redeployVirtualMachine.json new file mode 100644 index 000000000000..75fb701de144 --- /dev/null +++ b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/VirtualMachines/redeployVirtualMachine.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "api-version": "2022-08-01", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "testrg123", + "labName": "testlab", + "virtualMachineName": "template" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.LabServices/operationresults/a64149d8-84cb-4566-ab8e-b4ee1a074174" + } + } + } +} diff --git a/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/VirtualMachines/reimageVirtualMachine.json b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/VirtualMachines/reimageVirtualMachine.json new file mode 100644 index 000000000000..75fb701de144 --- /dev/null +++ b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/VirtualMachines/reimageVirtualMachine.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "api-version": "2022-08-01", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "testrg123", + "labName": "testlab", + "virtualMachineName": "template" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.LabServices/operationresults/a64149d8-84cb-4566-ab8e-b4ee1a074174" + } + } + } +} diff --git a/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/VirtualMachines/resetPasswordVirtualMachine.json b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/VirtualMachines/resetPasswordVirtualMachine.json new file mode 100644 index 000000000000..300dcc373db2 --- /dev/null +++ b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/VirtualMachines/resetPasswordVirtualMachine.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2022-08-01", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "testrg123", + "labName": "testlab", + "virtualMachineName": "template", + "body": { + "username": "example-username", + "password": "example-password" + } + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.LabServices/operationresults/a64149d8-84cb-4566-ab8e-b4ee1a074174" + } + } + } +} diff --git a/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/VirtualMachines/startVirtualMachine.json b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/VirtualMachines/startVirtualMachine.json new file mode 100644 index 000000000000..75fb701de144 --- /dev/null +++ b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/VirtualMachines/startVirtualMachine.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "api-version": "2022-08-01", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "testrg123", + "labName": "testlab", + "virtualMachineName": "template" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.LabServices/operationresults/a64149d8-84cb-4566-ab8e-b4ee1a074174" + } + } + } +} diff --git a/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/VirtualMachines/stopVirtualMachine.json b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/VirtualMachines/stopVirtualMachine.json new file mode 100644 index 000000000000..75fb701de144 --- /dev/null +++ b/specification/labservices/resource-manager/Microsoft.LabServices/stable/2022-08-01/examples/VirtualMachines/stopVirtualMachine.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "api-version": "2022-08-01", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "testrg123", + "labName": "testlab", + "virtualMachineName": "template" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.LabServices/operationresults/a64149d8-84cb-4566-ab8e-b4ee1a074174" + } + } + } +} diff --git a/specification/labservices/resource-manager/readme.md b/specification/labservices/resource-manager/readme.md index 9cd88e43dc47..5c07c076e637 100644 --- a/specification/labservices/resource-manager/readme.md +++ b/specification/labservices/resource-manager/readme.md @@ -26,15 +26,32 @@ These are the global settings for the LabServices API. ``` yaml openapi-type: arm -tag: package-preview-2021-11 +tag: package-2022-08 ``` +### Tag: package-2022-08 + +These settings apply only when `--tag=package-2022-08` is specified on the command line. + +```yaml $(tag) == 'package-2022-08' +input-file: + - Microsoft.LabServices/stable/2022-08-01/Images.json + - Microsoft.LabServices/stable/2022-08-01/LabPlans.json + - Microsoft.LabServices/stable/2022-08-01/LabServices.json + - Microsoft.LabServices/stable/2022-08-01/Labs.json + - Microsoft.LabServices/stable/2022-08-01/OperationResults.json + - Microsoft.LabServices/stable/2022-08-01/Schedules.json + - Microsoft.LabServices/stable/2022-08-01/Skus.json + - Microsoft.LabServices/stable/2022-08-01/Usages.json + - Microsoft.LabServices/stable/2022-08-01/Users.json + - Microsoft.LabServices/stable/2022-08-01/VirtualMachines.json +``` ### Tag: package-preview-2021-11 These settings apply only when `--tag=package-preview-2021-11` is specified on the command line. -```yaml $(tag) == 'package-preview-2021-11' +``` yaml $(tag) == 'package-preview-2021-11' input-file: - Microsoft.LabServices/preview/2021-11-15-preview/Images.json - Microsoft.LabServices/preview/2021-11-15-preview/LabPlans.json @@ -47,6 +64,7 @@ input-file: - Microsoft.LabServices/preview/2021-11-15-preview/Usages.json - Microsoft.LabServices/preview/2021-11-15-preview/Skus.json ``` + ### Tag: package-preview-2021-10 These settings apply only when `--tag=package-preview-2021-10` is specified on the command line.