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 minLength: 1maxLength: 90 |
The name of the resource group. The name is case insensitive. |
subscription
|
path | True |
string minLength: 1 |
The ID of the target subscription. |
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
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 |
Resource 'Lab' update operation succeeded |
|
201 Created |
Resource 'Lab' create operation succeeded Headers
|
|
Other Status Codes |
An unexpected error response. |
Security
azure_auth
Azure Active Directory OAuth2 Flow.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
Labs_CreateOrUpdate
Sample request
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/resourceGroupName/providers/Microsoft.DevTestLab/labs/{labName}?api-version=2018-09-15
{
"location": "{location}",
"properties": {
"labStorageType": "{Standard|Premium}"
},
"tags": {
"tagName1": "tagValue1"
}
}
Sample response
{
"name": "{labName}",
"type": "Microsoft.DevTestLab/labs",
"id": "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}",
"location": "{location}",
"properties": {
"announcement": {
"enabled": "Disabled",
"expired": false,
"markdown": "",
"title": ""
},
"createdDate": "2018-10-01T18:40:48.1739018-07:00",
"environmentPermission": "Reader",
"labStorageType": "Standard",
"mandatoryArtifactsResourceIdsLinux": [],
"mandatoryArtifactsResourceIdsWindows": [],
"premiumDataDisks": "Disabled",
"provisioningState": "Creating",
"support": {
"enabled": "Disabled",
"markdown": ""
},
"uniqueIdentifier": "{uniqueIdentifier}"
},
"tags": {
"tagName1": "tagValue1"
}
}
{
"name": "{labName}",
"type": "Microsoft.DevTestLab/labs",
"id": "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}",
"location": "{location}",
"properties": {
"announcement": {
"enabled": "Disabled",
"expired": false,
"markdown": "",
"title": ""
},
"createdDate": "2018-10-01T18:40:48.1739018-07:00",
"environmentPermission": "Reader",
"labStorageType": "Standard",
"mandatoryArtifactsResourceIdsLinux": [],
"mandatoryArtifactsResourceIdsWindows": [],
"premiumDataDisks": "Disabled",
"provisioningState": "Creating",
"support": {
"enabled": "Disabled",
"markdown": ""
},
"uniqueIdentifier": "{uniqueIdentifier}"
},
"tags": {
"tagName1": "tagValue1"
}
}
Definitions
Name | Description |
---|---|
Enable |
Indicates if the artifact source is enabled (values: Enabled, Disabled). |
Environment |
The access rights to be granted to the user when provisioning an environment |
Error |
The resource management error additional info. |
Error |
The error detail. |
Error |
Error response |
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). |
EnableStatus
Indicates if the artifact source is enabled (values: Enabled, Disabled).
Value | Description |
---|---|
Enabled | |
Disabled |
EnvironmentPermission
The access rights to be granted to the user when provisioning an environment
Value | Description |
---|---|
Reader | |
Contributor |
ErrorAdditionalInfo
The resource management error additional info.
Name | Type | Description |
---|---|---|
info |
object |
The additional info. |
type |
string |
The additional info type. |
ErrorDetail
The error detail.
Name | Type | Description |
---|---|---|
additionalInfo |
The error additional info. |
|
code |
string |
The error code. |
details |
The error details. |
|
message |
string |
The error message. |
target |
string |
The error target. |
ErrorResponse
Error response
Name | Type | Description |
---|---|---|
error |
The error object. |
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 (date-time) |
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 (date-time) |
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 |
---|---|
Standard | |
Premium | |
StandardSSD |