Share via


Environments - Get

Get environment

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labaccounts/{labAccountName}/labs/{labName}/environmentsettings/{environmentSettingName}/environments/{environmentName}?api-version=2018-10-15
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labaccounts/{labAccountName}/labs/{labName}/environmentsettings/{environmentSettingName}/environments/{environmentName}?$expand={$expand}&api-version=2018-10-15

URI Parameters

Name In Required Type Description
environmentName
path True

string

The name of the environment.

environmentSettingName
path True

string

The name of the environment Setting.

labAccountName
path True

string

The name of the lab Account.

labName
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($expand=networkInterface)'

Responses

Name Type Description
200 OK

Environment

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

Definitions

Name Description
CloudError

Error from a REST request.

CloudErrorBody

Body of an error from a REST request.

Environment

Represents an environment instance

LatestOperationResult

Details of the status of an operation.

NetworkInterface

Network details of the environment

ResourceSet

Represents a VM and the setting Id it was created for.

CloudError

Error from a REST request.

Name Type Description
error

CloudErrorBody

Body of an error from a REST request.

CloudErrorBody

Body of an error from a REST request.

Name Type Description
code

string

details

CloudErrorBody[]

Inner errors.

message

string

target

string

Environment

Represents an environment instance

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

string

The name or email address of the user who has claimed the environment

properties.claimedByUserObjectId

string

The AAD object Id of the user who has claimed the environment

properties.claimedByUserPrincipalId

string

The user principal Id of the user who has claimed the environment

properties.isClaimed

boolean

Is the environment claimed or not

properties.lastKnownPowerState

string

Last known power state of the environment

properties.latestOperationResult

LatestOperationResult

The details of the latest operation. ex: status, error

properties.networkInterface

NetworkInterface

Network details of the environment

properties.passwordLastReset

string (date-time)

When the password was last reset on the environment.

properties.provisioningState

string

The provisioning status of the resource.

properties.resourceSets

ResourceSet

The set of a VM and the setting id it was created for

properties.totalUsage

string (duration)

How long the environment has been used by a lab user

properties.uniqueIdentifier

string

The unique immutable identifier of a resource (Guid).

tags

object

The tags of the resource.

type

string

The type of the resource.

LatestOperationResult

Details of the status of an operation.

Name Type Description
errorCode

string

Error code on failure.

errorMessage

string

The error message.

httpMethod

string

The HttpMethod - PUT/POST/DELETE for the operation.

operationUrl

string

The URL to use to check long-running operation status

requestUri

string

Request URI of the operation.

status

string

The current status of the operation.

NetworkInterface

Network details of the environment

Name Type Description
privateIpAddress

string

PrivateIp address of the Compute VM

rdpAuthority

string

Connection information for Windows

sshAuthority

string

Connection information for Linux

username

string

Username of the VM

ResourceSet

Represents a VM and the setting Id it was created for.

Name Type Description
resourceSettingId

string

resourceSettingId for the environment

vmResourceId

string

VM resource Id for the environment