Skip to main content

source_controls

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

Overview

Namesource_controls
TypeResource
Idazure.automation.source_controls

Fields

NameDatatypeDescription
descriptiontextfield from the properties object
auto_synctextfield from the properties object
automationAccountNametextfield from the properties object
branchtextfield from the properties object
creation_timetextfield from the properties object
folder_pathtextfield from the properties object
last_modified_timetextfield from the properties object
publish_runbooktextfield from the properties object
repo_urltextfield from the properties object
resourceGroupNametextfield from the properties object
sourceControlNametextfield from the properties object
source_typetextfield from the properties object
subscriptionIdtextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTautomationAccountName, resourceGroupName, sourceControlName, subscriptionIdRetrieve the source control identified by source control name.
list_by_automation_accountSELECTautomationAccountName, resourceGroupName, subscriptionIdRetrieve a list of source controls.
create_or_updateINSERTautomationAccountName, resourceGroupName, sourceControlName, subscriptionId, data__propertiesCreate a source control.
deleteDELETEautomationAccountName, resourceGroupName, sourceControlName, subscriptionIdDelete the source control.
updateUPDATEautomationAccountName, resourceGroupName, sourceControlName, subscriptionIdUpdate a source control.

SELECT examples

Retrieve a list of source controls.

SELECT
description,
auto_sync,
automationAccountName,
branch,
creation_time,
folder_path,
last_modified_time,
publish_runbook,
repo_url,
resourceGroupName,
sourceControlName,
source_type,
subscriptionId
FROM azure.automation.vw_source_controls
WHERE automationAccountName = '{{ automationAccountName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new source_controls resource.

/*+ create */
INSERT INTO azure.automation.source_controls (
automationAccountName,
resourceGroupName,
sourceControlName,
subscriptionId,
data__properties,
properties
)
SELECT
'{{ automationAccountName }}',
'{{ resourceGroupName }}',
'{{ sourceControlName }}',
'{{ subscriptionId }}',
'{{ data__properties }}',
'{{ properties }}'
;

UPDATE example

Updates a source_controls resource.

/*+ update */
UPDATE azure.automation.source_controls
SET
properties = '{{ properties }}'
WHERE
automationAccountName = '{{ automationAccountName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND sourceControlName = '{{ sourceControlName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified source_controls resource.

/*+ delete */
DELETE FROM azure.automation.source_controls
WHERE automationAccountName = '{{ automationAccountName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND sourceControlName = '{{ sourceControlName }}'
AND subscriptionId = '{{ subscriptionId }}';