Arm Templates - Get

Get azure resource manager template.

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

URI Parameters

Name In Required Type Description
artifactSourceName
path True

string

The name of the artifact source.

labName
path True

string

The name of the lab.

name
path True

string

The name of the azure resource manager template.

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=displayName)'

Responses

Name Type Description
200 OK

ArmTemplate

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

ArmTemplates_Get

Sample Request

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

Sample Response

{
  "properties": {
    "displayName": "Template1",
    "publisher": "Microsoft",
    "contents": {
      "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#",
      "contentVersion": "1.0.0.0",
      "parameters": {},
      "variables": {
        "resourceNamePrefix": "[take(uniqueString(resourceGroup().id), 3)]",
        "hostingPlanName": "[toLower(concat(variables('resourceNamePrefix'), '-', take(uniqueString(resourceGroup().id), 6), '-sp'))]",
        "siteName": "[toLower(concat(variables('resourceNamePrefix'), '-', take(uniqueString(resourceGroup().id), 6)))]"
      },
      "resources": []
    },
    "parametersValueFilesInfo": [],
    "enabled": true
  },
  "id": "/subscriptions/{subscriptionId}/resourceGroups/resourceGroupName/providers/Microsoft.DevTestLab/labs/{labName}/artifactSources/{artifactSourceName}/armTemplates/{armTemplateName}",
  "name": "Template1",
  "type": "Microsoft.DevTestLab/labs/artifactSources/armTemplates",
  "location": "{location}",
  "tags": {
    "MyTag": "MyValue"
  }
}

Definitions

Name Description
ArmTemplate

An Azure Resource Manager template.

CloudError

Error from a REST request.

CloudErrorBody

Body of an error from a REST request.

ParametersValueFileInfo

A file containing a set of parameter values for an ARM template.

ArmTemplate

An Azure Resource Manager template.

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

object

The contents of the ARM template.

properties.createdDate

string

The creation date of the armTemplate.

properties.description

string

The description of the ARM template.

properties.displayName

string

The display name of the ARM template.

properties.enabled

boolean

Whether or not ARM template is enabled for use by lab user.

properties.icon

string

The URI to the icon of the ARM template.

properties.parametersValueFilesInfo

ParametersValueFileInfo[]

File name and parameter values information from all azuredeploy.*.parameters.json for the ARM template.

properties.publisher

string

The publisher of the ARM template.

tags

object

The tags of the resource.

type

string

The type of the resource.

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.

ParametersValueFileInfo

A file containing a set of parameter values for an ARM template.

Name Type Description
fileName

string

File name.

parametersValueInfo

object

Contents of the file.