Labs - Get

Get lab.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}?api-version=2018-09-15
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}?$expand={$expand}&api-version=2018-09-15

URI Parameters

Name In Required Type Description
name
path True

string

The name of the lab.

resourceGroupName
path True

string

The name of the resource group.

subscriptionId
path True

string

The subscription ID.

api-version
query True

string

Client API version.

$expand
query

string

Specify the $expand query. Example: 'properties($select=defaultStorageAccount)'

Responses

Name Type Description
200 OK

Lab

OK

Other Status Codes

CloudError

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_Get

Sample Request

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/resourceGroupName/providers/Microsoft.DevTestLab/labs/{labName}?api-version=2018-09-15

Sample Response

{
  "properties": {
    "defaultStorageAccount": "/subscriptions/{subscriptionId}/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/{storageAccountName}",
    "defaultPremiumStorageAccount": "/subscriptions/{subscriptionId}/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/{storageAccountName}",
    "artifactsStorageAccount": "/subscriptions/{subscriptionId}/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/{storageAccountName}",
    "premiumDataDiskStorageAccount": "/subscriptions/{subscriptionId}/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/{storageAccountName}",
    "vaultName": "/subscriptions/{subscriptionId}/resourceGroups/resourceGroupName/providers/Microsoft.KeyVault/vaults/{keyVaultName}",
    "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": "Succeeded",
    "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
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

CloudErrorBody

The cloud error that occurred

CloudErrorBody

Body of an error from a REST request.

Name Type Description
code

string

The error code.

details

CloudErrorBody[]

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

LabAnnouncementProperties

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

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

StorageType

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

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.

properties.provisioningState

string

The provisioning status of the resource.

properties.publicIpId

string

The public IP address for the lab's load balancer.

properties.support

LabSupportProperties

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

EnableStatus

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

EnableStatus

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

StandardSSD

string