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
subscriptionId
path True
  • string

The subscription ID.

resourceGroupName
path True
  • string

The name of the resource group.

name
path True
  • string

The name of the lab.

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/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.DevTestLab/labs/{devtestlab-name}?api-version=2018-09-15
{
  "properties": {
    "labStorageType": "{Standard|Premium}"
  },
  "location": "{azure-location}",
  "tags": {
    "MyTag": "MyValue"
  }
}

Sample Response

{
  "properties": {
    "labStorageType": "Standard",
    "mandatoryArtifactsResourceIdsLinux": [],
    "mandatoryArtifactsResourceIdsWindows": [],
    "createdDate": "2018-10-02T01:40:48.1739018+00:00",
    "premiumDataDisks": "Disabled",
    "environmentPermission": "Reader",
    "announcement": {
      "title": "",
      "markdown": "",
      "enabled": "Disabled",
      "expired": false
    },
    "support": {
      "enabled": "Disabled",
      "markdown": ""
    },
    "provisioningState": "Creating",
    "uniqueIdentifier": "{unique-identifier}"
  },
  "id": "/subscriptions/{subscription-id}/resourcegroups/myResourceGroup/providers/microsoft.devtestlab/labs/{devtestlab-name}",
  "name": "{devtestlab-name}",
  "type": "Microsoft.DevTestLab/labs",
  "location": "{azure-location}",
  "tags": {
    "MyTag": "MyValue"
  }
}
{
  "properties": {
    "labStorageType": "Standard",
    "mandatoryArtifactsResourceIdsLinux": [],
    "mandatoryArtifactsResourceIdsWindows": [],
    "createdDate": "2018-10-02T01:40:48.1739018+00:00",
    "premiumDataDisks": "Disabled",
    "environmentPermission": "Reader",
    "announcement": {
      "title": "",
      "markdown": "",
      "enabled": "Disabled",
      "expired": false
    },
    "support": {
      "enabled": "Disabled",
      "markdown": ""
    },
    "provisioningState": "Creating",
    "uniqueIdentifier": "{unique-identifier}"
  },
  "id": "/subscriptions/{subscription-id}/resourcegroups/myResourceGroup/providers/microsoft.devtestlab/labs/{devtestlab-name}",
  "name": "{devtestlab-name}",
  "type": "Microsoft.DevTestLab/labs",
  "location": "{azure-location}",
  "tags": {
    "MyTag": "MyValue"
  }
}

Definitions

CloudError

Error from a REST request.

CloudErrorBody

Body of an error from a REST request.

EnableStatus

The status of the schedule (i.e. Enabled, Disabled)

EnvironmentPermission

The access rights to be granted to the user when provisioning an environment

Lab

A lab.

LabAnnouncementProperties

Properties of a lab's announcement banner

LabSupportProperties

Properties of a lab's support banner

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.

StorageType

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)

Name Type Description
Disabled
  • string
Enabled
  • string

EnvironmentPermission

The access rights to be granted to the user when provisioning an environment

Name Type Description
Contributor
  • string
Reader
  • string

Lab

A lab.

Name Type 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

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 lab virtual machines will be created in.

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.

Name Type Description
Disabled
  • string
Enabled
  • string

StorageType

The storage type for the disk (i.e. Standard, Premium).

Name Type Description
Premium
  • string
Standard
  • string