Source Control - List By Automation Account
Retrieve a list of source controls.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/sourceControls?api-version=2023-11-01
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/sourceControls?$filter={$filter}&api-version=2023-11-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
automation
|
path | True |
string |
The name of the automation account. |
resource
|
path | True |
string |
Name of an Azure Resource group. Regex pattern: |
subscription
|
path | True |
string |
Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. |
api-version
|
query | True |
string |
Client Api Version. |
$filter
|
query |
string |
The filter to apply on the operation. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
OK |
|
Other Status Codes |
Automation error response describing why the operation failed. |
Security
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
List sourceControls
Sample Request
GET https://management.azure.com/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/sourceControls?api-version=2023-11-01
Sample Response
{
"value": [
{
"id": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/sourcecontrols/sampleSourceControl1",
"name": "sampleSourceControl1",
"properties": {
"creationTime": "2017-03-28T22:59:00.937+00:00",
"lastModifiedTime": "2017-03-28T22:59:00.937+00:00",
"repoUrl": "https://github.com/SampleUserRepro/PowerShell-1",
"branch": "master",
"folderPath": "/sampleFolder/sampleFolder2",
"autoSync": true,
"publishRunbook": true,
"sourceType": "GitHub",
"description": "my description"
}
},
{
"id": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/sourcecontrols/sampleSourceControl2",
"name": "sampleSourceControl2",
"properties": {
"creationTime": "2017-03-28T22:59:00.937+00:00",
"lastModifiedTime": "2017-03-28T22:59:00.937+00:00",
"repoUrl": "https://github.com/SampleUserRepro/PowerShell-2",
"branch": "master",
"folderPath": "/sampleFolder/sampleFolder2",
"autoSync": true,
"publishRunbook": true,
"sourceType": "GitHub",
"description": "my description"
}
},
{
"id": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/sourcecontrols/sampleSourceControl3",
"name": "sampleSourceControl3",
"properties": {
"creationTime": "2017-03-28T22:59:00.937+00:00",
"lastModifiedTime": "2017-03-28T22:59:00.937+00:00",
"repoUrl": "https://github.com/SampleUserRepro/PowerShell-3",
"branch": "master",
"folderPath": "/sampleFolder/sampleFolder2",
"autoSync": true,
"publishRunbook": true,
"sourceType": "GitHub",
"description": "my description"
}
},
{
"id": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/sourcecontrols/sampleSourceControl4",
"name": "sampleSourceControl4",
"properties": {
"creationTime": "2017-03-28T22:59:00.937+00:00",
"lastModifiedTime": "2017-03-28T22:59:00.937+00:00",
"repoUrl": "https://github.com/SampleUserRepro/PowerShell-4",
"branch": "master",
"folderPath": "/sampleFolder/sampleFolder2",
"autoSync": true,
"publishRunbook": true,
"sourceType": "GitHub",
"description": "my description"
}
},
{
"id": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/sampleAccount9/sourcecontrols/sampleSourceControl5",
"name": "sampleSourceControl5",
"properties": {
"creationTime": "2017-03-28T22:59:00.937+00:00",
"lastModifiedTime": "2017-03-28T22:59:00.937+00:00",
"repoUrl": "https://github.com/SampleUserRepro/PowerShell-5",
"branch": "master",
"folderPath": "/sampleFolder/sampleFolder2",
"autoSync": true,
"publishRunbook": true,
"sourceType": "GitHub",
"description": "my description"
}
}
]
}
Definitions
Name | Description |
---|---|
Error |
Error response of an operation failure |
Source |
Definition of the source control. |
Source |
The response model for the list source controls operation. |
source |
The source type. Must be one of VsoGit, VsoTfvc, GitHub. |
ErrorResponse
Error response of an operation failure
Name | Type | Description |
---|---|---|
code |
string |
Error code |
message |
string |
Error message indicating why the operation failed. |
SourceControl
Definition of the source control.
Name | Type | Description |
---|---|---|
id |
string |
Fully qualified resource Id for the resource |
name |
string |
The name of the resource |
properties.autoSync |
boolean |
The auto sync of the source control. Default is false. |
properties.branch |
string |
The repo branch of the source control. Include branch as empty string for VsoTfvc. |
properties.creationTime |
string |
The creation time. |
properties.description |
string |
The description. |
properties.folderPath |
string |
The folder path of the source control. |
properties.lastModifiedTime |
string |
The last modified time. |
properties.publishRunbook |
boolean |
The auto publish of the source control. Default is true. |
properties.repoUrl |
string |
The repo url of the source control. |
properties.sourceType |
The source type. Must be one of VsoGit, VsoTfvc, GitHub. |
|
type |
string |
The type of the resource. |
SourceControlListResult
The response model for the list source controls operation.
Name | Type | Description |
---|---|---|
nextLink |
string |
The next link. |
value |
The list of source controls. |
sourceType
The source type. Must be one of VsoGit, VsoTfvc, GitHub.
Name | Type | Description |
---|---|---|
GitHub |
string |
|
VsoGit |
string |
|
VsoTfvc |
string |