Skip to main content

artifacts

Creates, updates, deletes, gets or lists an artifacts resource.

Overview

Nameartifacts
TypeResource
Idazure.dev_test_labs.artifacts

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe identifier of the resource.
namestringThe name of the resource.
locationstringThe location of the resource.
propertiesobjectThe properties of the resource.
tagsobjectThe tags of the resource.
typestringThe type of the resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectsubscriptionId, resourceGroupName, labName, artifactSourceName, name$expand, api-versionGet artifact.
listselectsubscriptionId, resourceGroupName, labName, artifactSourceName$expand, $filter, $top, $orderby, api-versionList artifacts in a given artifact source.
generate_arm_templateexecsubscriptionId, resourceGroupName, labName, artifactSourceName, nameapi-versionGenerates an ARM template for the given artifact, uploads the required files to a storage account, and validates the generated artifact.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
artifactSourceNamestringThe name of the artifact source.
labNamestringThe name of the lab.
namestringThe name of the artifact.
resourceGroupNamestringThe name of the resource group.
subscriptionIdstringThe subscription ID.
$expandstringSpecify the $expand query. Example: 'properties($select=title)'
$filterstringThe filter to apply to the operation. Example: '$filter=contains(name,'myName')
$orderbystringThe ordering expression for the results, using OData notation. Example: '$orderby=name desc'
$topinteger (int32)The maximum number of resources to return from the operation. Example: '$top=10'
api-versionstringClient API version.

SELECT examples

Get artifact.

SELECT
id,
name,
location,
properties,
tags,
type
FROM azure.dev_test_labs.artifacts
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND labName = '{{ labName }}' -- required
AND artifactSourceName = '{{ artifactSourceName }}' -- required
AND name = '{{ name }}' -- required
AND $expand = '{{ $expand }}'
AND api-version = '{{ api-version }}'
;

Lifecycle Methods

Generates an ARM template for the given artifact, uploads the required files to a storage account, and validates the generated artifact.

EXEC azure.dev_test_labs.artifacts.generate_arm_template 
@subscriptionId='{{ subscriptionId }}' --required,
@resourceGroupName='{{ resourceGroupName }}' --required,
@labName='{{ labName }}' --required,
@artifactSourceName='{{ artifactSourceName }}' --required,
@name='{{ name }}' --required,
@api-version='{{ api-version }}'
@@json=
'{
"virtualMachineName": "{{ virtualMachineName }}",
"parameters": "{{ parameters }}",
"location": "{{ location }}",
"fileUploadOptions": "{{ fileUploadOptions }}"
}'
;