Environments - List

List environments in a given user profile.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/environments?api-version=2018-09-15
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/environments?$expand={$expand}&$filter={$filter}&$top={$top}&$orderby={$orderby}&api-version=2018-09-15

URI Parameters

Name In Required Type Description
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.

userName
path True

string

The name of the user profile.

api-version
query True

string

Client API version.

$expand
query

string

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

$filter
query

string

The filter to apply to the operation. Example: '$filter=contains(name,'myName')

$orderby
query

string

The ordering expression for the results, using OData notation. Example: '$orderby=name desc'

$top
query

integer

int32

The maximum number of resources to return from the operation. Example: '$top=10'

Responses

Name Type Description
200 OK

DtlEnvironmentList

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

Environments_List

Sample Request

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

Sample Response

{
  "value": [
    {
      "id": "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}/users/{uniqueIdentifier}/environments/{environmentName}",
      "name": "{environmentName}",
      "type": "Microsoft.DevTestLab/labs/users/environments",
      "location": "{location}",
      "properties": {
        "deploymentProperties": {
          "armTemplateId": "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}/artifactSources/{artifactSourceName}/armTemplates/{armTemplateName}"
        },
        "createdByUser": "user@contoso.com",
        "provisioningState": "Succeeded",
        "uniqueIdentifier": "{uniqueIdentifier}"
      },
      "tags": {
        "tagName1": "tagValue1"
      }
    }
  ]
}

Definitions

Name Description
ArmTemplateParameterProperties

Properties of an Azure Resource Manager template parameter.

CloudError

Error from a REST request.

CloudErrorBody

Body of an error from a REST request.

DtlEnvironment

An environment, which is essentially an ARM template deployment.

DtlEnvironmentList

The response of a list operation.

EnvironmentDeploymentProperties

Properties of an environment deployment.

ArmTemplateParameterProperties

Properties of an Azure Resource Manager template parameter.

Name Type Description
name

string

The name of the template parameter.

value

string

The value of the template parameter.

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.

DtlEnvironment

An environment, which is essentially an ARM template deployment.

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

string

The display name of the Azure Resource Manager template that produced the environment.

properties.createdByUser

string

The creator of the environment.

properties.deploymentProperties

EnvironmentDeploymentProperties

The deployment properties of the environment.

properties.provisioningState

string

The provisioning status of the resource.

properties.resourceGroupId

string

The identifier of the resource group containing the environment's resources.

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.

DtlEnvironmentList

The response of a list operation.

Name Type Description
nextLink

string

Link for next set of results.

value

DtlEnvironment[]

Results of the list operation.

EnvironmentDeploymentProperties

Properties of an environment deployment.

Name Type Description
armTemplateId

string

The Azure Resource Manager template's identifier.

parameters

ArmTemplateParameterProperties[]

The parameters of the Azure Resource Manager template.