artifacts
Creates, updates, deletes, gets or lists an artifacts resource.
Overview
| Name | artifacts |
| Type | Resource |
| Id | azure.dev_test_labs.artifacts |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
id | string | The identifier of the resource. |
name | string | The name of the resource. |
createdDate | string (date-time) | The artifact's creation date. |
description | string | The artifact's description. |
filePath | string | The file path to the artifact. |
icon | string | The URI to the artifact icon. |
location | string | The location of the resource. |
parameters | object | The artifact's parameters. |
publisher | string | The artifact's publisher. |
tags | object | The tags of the resource. |
targetOsType | string | The artifact's target OS. |
title | string | The artifact's title. |
type | string | The type of the resource. |
| Name | Datatype | Description |
|---|---|---|
id | string | The identifier of the resource. |
name | string | The name of the resource. |
createdDate | string (date-time) | The artifact's creation date. |
description | string | The artifact's description. |
filePath | string | The file path to the artifact. |
icon | string | The URI to the artifact icon. |
location | string | The location of the resource. |
parameters | object | The artifact's parameters. |
publisher | string | The artifact's publisher. |
tags | object | The tags of the resource. |
targetOsType | string | The artifact's target OS. |
title | string | The artifact's title. |
type | string | The type of the resource. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, lab_name, artifact_source_name, name, subscription_id | $expand | Get artifact. |
list | select | resource_group_name, lab_name, artifact_source_name, subscription_id | $expand, $filter, $top, $orderby | List artifacts in a given artifact source. |
generate_arm_template | exec | resource_group_name, lab_name, artifact_source_name, name, subscription_id | Generates 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.
| Name | Datatype | Description |
|---|---|---|
artifact_source_name | string | The name of the artifact source. Required. |
lab_name | string | The name of the lab. Required. |
name | string | The name of the artifact. Required. |
resource_group_name | string | The name of the resource group. Required. |
subscription_id | string | |
$expand | string | Specify the $expand query. Example: 'properties($select=title)'. Default value is None. |
$filter | string | The filter to apply to the operation. Example: '$filter=contains(name,'myName'). Default value is None. |
$orderby | string | The ordering expression for the results, using OData notation. Example: '$orderby=name desc'. Default value is None. |
$top | integer | The maximum number of resources to return from the operation. Example: '$top=10'. Default value is None. |
SELECT examples
- get
- list
Get artifact.
SELECT
id,
name,
createdDate,
description,
filePath,
icon,
location,
parameters,
publisher,
tags,
targetOsType,
title,
type
FROM azure.dev_test_labs.artifacts
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND lab_name = '{{ lab_name }}' -- required
AND artifact_source_name = '{{ artifact_source_name }}' -- required
AND name = '{{ name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND $expand = '{{ $expand }}'
;
List artifacts in a given artifact source.
SELECT
id,
name,
createdDate,
description,
filePath,
icon,
location,
parameters,
publisher,
tags,
targetOsType,
title,
type
FROM azure.dev_test_labs.artifacts
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND lab_name = '{{ lab_name }}' -- required
AND artifact_source_name = '{{ artifact_source_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND $expand = '{{ $expand }}'
AND $filter = '{{ $filter }}'
AND $top = '{{ $top }}'
AND $orderby = '{{ $orderby }}'
;
Lifecycle Methods
- generate_arm_template
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
@resource_group_name='{{ resource_group_name }}' --required,
@lab_name='{{ lab_name }}' --required,
@artifact_source_name='{{ artifact_source_name }}' --required,
@name='{{ name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"virtualMachineName": "{{ virtualMachineName }}",
"parameters": "{{ parameters }}",
"location": "{{ location }}",
"fileUploadOptions": "{{ fileUploadOptions }}"
}'
;