Skip to main content

artifact_sources

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

Overview

Nameartifact_sources
TypeResource
Idazure.dev_test_labs.artifact_sources

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, name$expand, api-versionGet artifact source.
listselectsubscriptionId, resourceGroupName, labName$expand, $filter, $top, $orderby, api-versionList artifact sources in a given lab.
create_or_updateinsertsubscriptionId, resourceGroupName, labName, name, data__propertiesapi-versionCreate or replace an existing artifact source.
updateupdatesubscriptionId, resourceGroupName, labName, nameapi-versionAllows modifying tags of artifact sources. All other properties will be ignored.
deletedeletesubscriptionId, resourceGroupName, labName, nameapi-versionDelete artifact source.

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
labNamestringThe name of the lab.
namestringThe name of the artifact source.
resourceGroupNamestringThe name of the resource group.
subscriptionIdstringThe subscription ID.
$expandstringSpecify the $expand query. Example: 'properties($select=displayName)'
$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 source.

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

INSERT examples

Create or replace an existing artifact source.

INSERT INTO azure.dev_test_labs.artifact_sources (
data__location,
data__tags,
data__properties,
subscriptionId,
resourceGroupName,
labName,
name,
api-version
)
SELECT
'{{ location }}',
'{{ tags }}',
'{{ properties }}' /* required */,
'{{ subscriptionId }}',
'{{ resourceGroupName }}',
'{{ labName }}',
'{{ name }}',
'{{ api-version }}'
RETURNING
id,
name,
location,
properties,
tags,
type
;

UPDATE examples

Allows modifying tags of artifact sources. All other properties will be ignored.

UPDATE azure.dev_test_labs.artifact_sources
SET
data__tags = '{{ tags }}'
WHERE
subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND labName = '{{ labName }}' --required
AND name = '{{ name }}' --required
AND api-version = '{{ api-version}}'
RETURNING
id,
name,
location,
properties,
tags,
type;

DELETE examples

Delete artifact source.

DELETE FROM azure.dev_test_labs.artifact_sources
WHERE subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND labName = '{{ labName }}' --required
AND name = '{{ name }}' --required
AND api-version = '{{ api-version }}'
;