source_control
Creates, updates, deletes, gets or lists a source_control resource.
Overview
| Name | source_control |
| Type | Resource |
| Id | azure.automation.source_control |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_automation_account
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
autoSync | boolean | The auto sync of the source control. Default is false. |
branch | string | The repo branch of the source control. Include branch as empty string for VsoTfvc. |
creationTime | string (date-time) | The creation time. |
description | string | The description. |
folderPath | string | The folder path of the source control. |
lastModifiedTime | string (date-time) | The last modified time. |
publishRunbook | boolean | The auto publish of the source control. Default is true. |
repoUrl | string | The repo url of the source control. |
sourceType | string | The source type. Must be one of VsoGit, VsoTfvc, GitHub. Known values are: "VsoGit", "VsoTfvc", and "GitHub". (VsoGit, VsoTfvc, GitHub) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
autoSync | boolean | The auto sync of the source control. Default is false. |
branch | string | The repo branch of the source control. Include branch as empty string for VsoTfvc. |
creationTime | string (date-time) | The creation time. |
description | string | The description. |
folderPath | string | The folder path of the source control. |
lastModifiedTime | string (date-time) | The last modified time. |
publishRunbook | boolean | The auto publish of the source control. Default is true. |
repoUrl | string | The repo url of the source control. |
sourceType | string | The source type. Must be one of VsoGit, VsoTfvc, GitHub. Known values are: "VsoGit", "VsoTfvc", and "GitHub". (VsoGit, VsoTfvc, GitHub) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, automation_account_name, source_control_name, subscription_id | Retrieve the source control identified by source control name. | |
list_by_automation_account | select | resource_group_name, automation_account_name, subscription_id | $filter | Retrieve a list of source controls. |
create_or_update | insert | resource_group_name, automation_account_name, source_control_name, subscription_id, properties | Create a source control. | |
update | update | resource_group_name, automation_account_name, source_control_name, subscription_id | Update a source control. | |
create_or_update | replace | resource_group_name, automation_account_name, source_control_name, subscription_id, properties | Create a source control. | |
delete | delete | resource_group_name, automation_account_name, source_control_name, subscription_id | Delete 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.
| Name | Datatype | Description |
|---|---|---|
automation_account_name | string | The name of the automation account. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
source_control_name | string | The name of source control. Required. |
subscription_id | string | |
$filter | string | The filter to apply on the operation. Default value is None. |
SELECT examples
- get
- list_by_automation_account
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
;
Retrieve a list of source controls.
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 subscription_id = '{{ subscription_id }}' -- required
AND $filter = '{{ $filter }}'
;
INSERT examples
- create_or_update
- Manifest
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
;
# Description fields are for documentation purposes
- name: source_control
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the source_control resource.
- name: automation_account_name
value: "{{ automation_account_name }}"
description: Required parameter for the source_control resource.
- name: source_control_name
value: "{{ source_control_name }}"
description: Required parameter for the source_control resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the source_control resource.
- name: properties
description: |
The properties of the source control. Required.
value:
repoUrl: "{{ repoUrl }}"
branch: "{{ branch }}"
folderPath: "{{ folderPath }}"
autoSync: {{ autoSync }}
publishRunbook: {{ publishRunbook }}
sourceType: "{{ sourceType }}"
securityToken:
accessToken: "{{ accessToken }}"
refreshToken: "{{ refreshToken }}"
tokenType: "{{ tokenType }}"
description: "{{ description }}"
UPDATE examples
- update
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_or_update
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
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
;