Skip to main content

source_control

Creates, updates, deletes, gets or lists a source_control resource.

Overview

Namesource_control
TypeResource
Idazure.automation.source_control

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
autoSyncbooleanThe auto sync of the source control. Default is false.
branchstringThe repo branch of the source control. Include branch as empty string for VsoTfvc.
creationTimestring (date-time)The creation time.
descriptionstringThe description.
folderPathstringThe folder path of the source control.
lastModifiedTimestring (date-time)The last modified time.
publishRunbookbooleanThe auto publish of the source control. Default is true.
repoUrlstringThe repo url of the source control.
sourceTypestringThe source type. Must be one of VsoGit, VsoTfvc, GitHub. Known values are: "VsoGit", "VsoTfvc", and "GitHub". (VsoGit, VsoTfvc, GitHub)
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, automation_account_name, source_control_name, subscription_idRetrieve the source control identified by source control name.
list_by_automation_accountselectresource_group_name, automation_account_name, subscription_id$filterRetrieve a list of source controls.
create_or_updateinsertresource_group_name, automation_account_name, source_control_name, subscription_id, propertiesCreate a source control.
updateupdateresource_group_name, automation_account_name, source_control_name, subscription_idUpdate a source control.
create_or_updatereplaceresource_group_name, automation_account_name, source_control_name, subscription_id, propertiesCreate a source control.
deletedeleteresource_group_name, automation_account_name, source_control_name, subscription_idDelete the source control.

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
automation_account_namestringThe name of the automation account. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
source_control_namestringThe name of source control. Required.
subscription_idstring
$filterstringThe filter to apply on the operation. Default value is None.

SELECT examples

Retrieve the source control identified by source control name.

SELECT
id,
name,
autoSync,
branch,
creationTime,
description,
folderPath,
lastModifiedTime,
publishRunbook,
repoUrl,
sourceType,
systemData,
type
FROM azure.automation.source_control
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND automation_account_name = '{{ automation_account_name }}' -- required
AND source_control_name = '{{ source_control_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Create a source control.

INSERT INTO azure.automation.source_control (
properties,
resource_group_name,
automation_account_name,
source_control_name,
subscription_id
)
SELECT
'{{ properties }}' /* required */,
'{{ resource_group_name }}',
'{{ automation_account_name }}',
'{{ source_control_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;

UPDATE examples

Update a source control.

UPDATE azure.automation.source_control
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND automation_account_name = '{{ automation_account_name }}' --required
AND source_control_name = '{{ source_control_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;

REPLACE examples

Create a source control.

REPLACE azure.automation.source_control
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND automation_account_name = '{{ automation_account_name }}' --required
AND source_control_name = '{{ source_control_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND properties = '{{ properties }}' --required
RETURNING
id,
name,
properties,
systemData,
type;

DELETE examples

Delete the source control.

DELETE FROM azure.automation.source_control
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND automation_account_name = '{{ automation_account_name }}' --required
AND source_control_name = '{{ source_control_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;