source_controls
Creates, updates, deletes, gets or lists a source_controls
resource.
Overview
Name | source_controls |
Type | Resource |
Id | azure.automation.source_controls |
Fields
- vw_source_controls
- source_controls
Name | Datatype | Description |
---|---|---|
description | text | field from the properties object |
auto_sync | text | field from the properties object |
automationAccountName | text | field from the properties object |
branch | text | field from the properties object |
creation_time | text | field from the properties object |
folder_path | text | field from the properties object |
last_modified_time | text | field from the properties object |
publish_runbook | text | field from the properties object |
repo_url | text | field from the properties object |
resourceGroupName | text | field from the properties object |
sourceControlName | text | field from the properties object |
source_type | text | field from the properties object |
subscriptionId | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
properties | object | Definition of the source control properties |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | automationAccountName, resourceGroupName, sourceControlName, subscriptionId | Retrieve the source control identified by source control name. |
list_by_automation_account | SELECT | automationAccountName, resourceGroupName, subscriptionId | Retrieve a list of source controls. |
create_or_update | INSERT | automationAccountName, resourceGroupName, sourceControlName, subscriptionId, data__properties | Create a source control. |
delete | DELETE | automationAccountName, resourceGroupName, sourceControlName, subscriptionId | Delete the source control. |
update | UPDATE | automationAccountName, resourceGroupName, sourceControlName, subscriptionId | Update a source control. |
SELECT
examples
Retrieve a list of source controls.
- vw_source_controls
- 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 }}';
SELECT
properties
FROM azure.automation.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.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.automation.source_controls (
automationAccountName,
resourceGroupName,
sourceControlName,
subscriptionId,
data__properties,
properties
)
SELECT
'{{ automationAccountName }}',
'{{ resourceGroupName }}',
'{{ sourceControlName }}',
'{{ subscriptionId }}',
'{{ data__properties }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: repoUrl
value: string
- name: branch
value: string
- name: folderPath
value: string
- name: autoSync
value: boolean
- name: publishRunbook
value: boolean
- name: sourceType
value: string
- name: securityToken
value:
- name: accessToken
value: string
- name: refreshToken
value: string
- name: tokenType
value: string
- name: description
value: string
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 }}';