Labs - Create Or Update
Create or replace an existing lab. This operation can take a while to complete.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}?api-version=2018-09-15
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
name
|
path | True |
string |
The name of the lab. |
resource
|
path | True |
string |
The name of the resource group. |
subscription
|
path | True |
string |
The subscription ID. |
api-version
|
query | True |
string |
Client API version. |
Request Body
Name | Type | Description |
---|---|---|
location |
string |
The location of the resource. |
properties.announcement |
The properties of any lab announcement associated with this lab |
|
properties.environmentPermission |
The access rights to be granted to the user when provisioning an environment |
|
properties.extendedProperties |
object |
Extended properties of the lab used for experimental features |
properties.labStorageType |
Type of storage used by the lab. It can be either Premium or Standard. Default is Premium. |
|
properties.mandatoryArtifactsResourceIdsLinux |
string[] |
The ordered list of artifact resource IDs that should be applied on all Linux VM creations by default, prior to the artifacts specified by the user. |
properties.mandatoryArtifactsResourceIdsWindows |
string[] |
The ordered list of artifact resource IDs that should be applied on all Windows VM creations by default, prior to the artifacts specified by the user. |
properties.premiumDataDisks |
The setting to enable usage of premium data disks. When its value is 'Enabled', creation of standard or premium data disks is allowed. When its value is 'Disabled', only creation of standard data disks is allowed. |
|
properties.support |
The properties of any lab support message associated with this lab |
|
tags |
object |
The tags of the resource. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
OK |
|
201 Created |
Created |
|
Other Status Codes |
BadRequest |
Security
azure_auth
OAuth2 Implicit Grant
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | Access Microsoft Azure |
Examples
Labs_CreateOrUpdate
Sample request
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/resourceGroupName/providers/Microsoft.DevTestLab/labs/{labName}?api-version=2018-09-15
{
"properties": {
"labStorageType": "{Standard|Premium}"
},
"location": "{location}",
"tags": {
"tagName1": "tagValue1"
}
}
Sample response
{
"properties": {
"labStorageType": "Standard",
"mandatoryArtifactsResourceIdsLinux": [],
"mandatoryArtifactsResourceIdsWindows": [],
"createdDate": "2018-10-01T18:40:48.1739018-07:00",
"premiumDataDisks": "Disabled",
"environmentPermission": "Reader",
"announcement": {
"title": "",
"markdown": "",
"enabled": "Disabled",
"expired": false
},
"support": {
"enabled": "Disabled",
"markdown": ""
},
"provisioningState": "Creating",
"uniqueIdentifier": "{uniqueIdentifier}"
},
"id": "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}",
"name": "{labName}",
"type": "Microsoft.DevTestLab/labs",
"location": "{location}",
"tags": {
"tagName1": "tagValue1"
}
}
{
"properties": {
"labStorageType": "Standard",
"mandatoryArtifactsResourceIdsLinux": [],
"mandatoryArtifactsResourceIdsWindows": [],
"createdDate": "2018-10-01T18:40:48.1739018-07:00",
"premiumDataDisks": "Disabled",
"environmentPermission": "Reader",
"announcement": {
"title": "",
"markdown": "",
"enabled": "Disabled",
"expired": false
},
"support": {
"enabled": "Disabled",
"markdown": ""
},
"provisioningState": "Creating",
"uniqueIdentifier": "{uniqueIdentifier}"
},
"id": "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}",
"name": "{labName}",
"type": "Microsoft.DevTestLab/labs",
"location": "{location}",
"tags": {
"tagName1": "tagValue1"
}
}
Definitions
Name | Description |
---|---|
Cloud |
Error from a REST request. |
Cloud |
Body of an error from a REST request. |
Enable |
The status of the schedule (i.e. Enabled, Disabled) |
Environment |
The access rights to be granted to the user when provisioning an environment |
Lab |
A lab. |
Lab |
Properties of a lab's announcement banner |
Lab |
Properties of a lab's support banner |
Premium |
The setting to enable usage of premium data disks. When its value is 'Enabled', creation of standard or premium data disks is allowed. When its value is 'Disabled', only creation of standard data disks is allowed. |
Storage |
The storage type for the disk (i.e. Standard, Premium). |
CloudError
Error from a REST request.
Name | Type | Description |
---|---|---|
error |
The cloud error that occurred |
CloudErrorBody
Body of an error from a REST request.
Name | Type | Description |
---|---|---|
code |
string |
The error code. |
details |
Inner errors. |
|
message |
string |
The error message. |
target |
string |
The error target. |
EnableStatus
The status of the schedule (i.e. Enabled, Disabled)
Value | Description |
---|---|
Disabled | |
Enabled |
EnvironmentPermission
The access rights to be granted to the user when provisioning an environment
Value | Description |
---|---|
Contributor | |
Reader |
Lab
A lab.
Name | Type | Default value | Description |
---|---|---|---|
id |
string |
The identifier of the resource. |
|
location |
string |
The location of the resource. |
|
name |
string |
The name of the resource. |
|
properties.announcement |
The properties of any lab announcement associated with this lab |
||
properties.artifactsStorageAccount |
string |
The lab's artifact storage account. |
|
properties.createdDate |
string |
The creation date of the lab. |
|
properties.defaultPremiumStorageAccount |
string |
The lab's default premium storage account. |
|
properties.defaultStorageAccount |
string |
The lab's default storage account. |
|
properties.environmentPermission |
The access rights to be granted to the user when provisioning an environment |
||
properties.extendedProperties |
object |
Extended properties of the lab used for experimental features |
|
properties.labStorageType | Premium |
Type of storage used by the lab. It can be either Premium or Standard. Default is Premium. |
|
properties.loadBalancerId |
string |
The load balancer used to for lab VMs that use shared IP address. |
|
properties.mandatoryArtifactsResourceIdsLinux |
string[] |
The ordered list of artifact resource IDs that should be applied on all Linux VM creations by default, prior to the artifacts specified by the user. |
|
properties.mandatoryArtifactsResourceIdsWindows |
string[] |
The ordered list of artifact resource IDs that should be applied on all Windows VM creations by default, prior to the artifacts specified by the user. |
|
properties.networkSecurityGroupId |
string |
The Network Security Group attached to the lab VMs Network interfaces to restrict open ports. |
|
properties.premiumDataDiskStorageAccount |
string |
The lab's premium data disk storage account. |
|
properties.premiumDataDisks |
The setting to enable usage of premium data disks. When its value is 'Enabled', creation of standard or premium data disks is allowed. When its value is 'Disabled', only creation of standard data disks is allowed. |
||
properties.provisioningState |
string |
The provisioning status of the resource. |
|
properties.publicIpId |
string |
The public IP address for the lab's load balancer. |
|
properties.support |
The properties of any lab support message associated with this lab |
||
properties.uniqueIdentifier |
string |
The unique immutable identifier of a resource (Guid). |
|
properties.vaultName |
string |
The lab's Key vault. |
|
properties.vmCreationResourceGroup |
string |
The resource group in which all new lab virtual machines will be created. To let DevTest Labs manage resource group creation, set this value to null. |
|
tags |
object |
The tags of the resource. |
|
type |
string |
The type of the resource. |
LabAnnouncementProperties
Properties of a lab's announcement banner
Name | Type | Description |
---|---|---|
enabled |
Is the lab announcement active/enabled at this time? |
|
expirationDate |
string |
The time at which the announcement expires (null for never) |
expired |
boolean |
Has this announcement expired? |
markdown |
string |
The markdown text (if any) that this lab displays in the UI. If left empty/null, nothing will be shown. |
provisioningState |
string |
The provisioning status of the resource. |
title |
string |
The plain text title for the lab announcement |
uniqueIdentifier |
string |
The unique immutable identifier of a resource (Guid). |
LabSupportProperties
Properties of a lab's support banner
Name | Type | Description |
---|---|---|
enabled |
Is the lab support banner active/enabled at this time? |
|
markdown |
string |
The markdown text (if any) that this lab displays in the UI. If left empty/null, nothing will be shown. |
PremiumDataDisk
The setting to enable usage of premium data disks. When its value is 'Enabled', creation of standard or premium data disks is allowed. When its value is 'Disabled', only creation of standard data disks is allowed.
Value | Description |
---|---|
Disabled | |
Enabled |
StorageType
The storage type for the disk (i.e. Standard, Premium).
Value | Description |
---|---|
Premium | |
Standard | |
StandardSSD |