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.
armTemplateFolderPathstringThe folder containing Azure Resource Manager templates.
branchRefstringThe artifact source's branch reference.
createdDatestring (date-time)The artifact source's creation date.
displayNamestringThe artifact source's display name.
folderPathstringThe folder containing artifacts.
locationstringThe location of the resource.
provisioningStatestringThe provisioning status of the resource.
securityTokenstringThe security token to authenticate to the artifact source.
sourceTypestringThe artifact source's type. Known values are: "VsoGit", "GitHub", and "StorageAccount".
statusstringIndicates if the artifact source is enabled (values: Enabled, Disabled). Known values are: "Enabled" and "Disabled".
tagsobjectThe tags of the resource.
typestringThe type of the resource.
uniqueIdentifierstringThe unique immutable identifier of a resource (Guid).
uristringThe artifact source's URI.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, lab_name, name, subscription_id$expandGet artifact source.
listselectresource_group_name, lab_name, subscription_id$expand, $filter, $top, $orderbyList artifact sources in a given lab.
create_or_updateinsertresource_group_name, lab_name, name, subscription_idCreate or replace an existing artifact source.
updateupdateresource_group_name, lab_name, name, subscription_idAllows modifying tags of artifact sources. All other properties will be ignored.
create_or_updatereplaceresource_group_name, lab_name, name, subscription_idCreate or replace an existing artifact source.
deletedeleteresource_group_name, lab_name, name, subscription_idDelete 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
lab_namestringThe name of the lab. Required.
namestringThe name of the artifact source. Required.
resource_group_namestringThe name of the resource group. Required.
subscription_idstring
$expandstringSpecify the $expand query. Example: 'properties($select=displayName)'. Default value is None.
$filterstringThe filter to apply to the operation. Example: '$filter=contains(name,'myName'). Default value is None.
$orderbystringThe ordering expression for the results, using OData notation. Example: '$orderby=name desc'. Default value is None.
$topintegerThe maximum number of resources to return from the operation. Example: '$top=10'. Default value is None.

SELECT examples

Get artifact source.

SELECT
id,
name,
armTemplateFolderPath,
branchRef,
createdDate,
displayName,
folderPath,
location,
provisioningState,
securityToken,
sourceType,
status,
tags,
type,
uniqueIdentifier,
uri
FROM azure.dev_test_labs.artifact_sources
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND lab_name = '{{ lab_name }}' -- required
AND name = '{{ name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND $expand = '{{ $expand }}'
;

INSERT examples

Create or replace an existing artifact source.

INSERT INTO azure.dev_test_labs.artifact_sources (
location,
tags,
properties,
resource_group_name,
lab_name,
name,
subscription_id
)
SELECT
'{{ location }}',
'{{ tags }}',
'{{ properties }}',
'{{ resource_group_name }}',
'{{ lab_name }}',
'{{ name }}',
'{{ subscription_id }}'
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
-- No updatable properties
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND lab_name = '{{ lab_name }}' --required
AND name = '{{ name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
location,
properties,
tags,
type;

REPLACE examples

Create or replace an existing artifact source.

REPLACE azure.dev_test_labs.artifact_sources
SET
location = '{{ location }}',
tags = '{{ tags }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND lab_name = '{{ lab_name }}' --required
AND name = '{{ name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
location,
properties,
tags,
type;

DELETE examples

Delete artifact source.

DELETE FROM azure.dev_test_labs.artifact_sources
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND lab_name = '{{ lab_name }}' --required
AND name = '{{ name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;