Source Control Sync Job - Create
Creates the sync job for a source control.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/sourceControls/{sourceControlName}/sourceControlSyncJobs/{sourceControlSyncJobId}?api-version=2019-06-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: |
source
|
path | True |
string |
The source control name. |
source
|
path | True |
string uuid |
The source control sync job id. |
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. |
Request Body
Name | Required | Type | Description |
---|---|---|---|
properties.commitId | True |
string |
The commit id of the source control sync job. If not syncing to a commitId, enter an empty string. |
Responses
Name | Type | Description |
---|---|---|
201 Created |
Created |
|
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
Create or update a source control sync job
Sample Request
PUT https://management.azure.com/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/sourceControls/MySourceControl/sourceControlSyncJobs/ce6fe3e3-9db3-4096-a6b4-82bfb4c10a9a?api-version=2019-06-01
{
"properties": {
"commitId": "9de0980bfb45026a3d97a1b0522d98a9f604226e"
}
}
Sample Response
{
"id": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount33/sourceControls/MySourceControl/sourceControlSyncJobs/ce6fe3e3-9db3-4096-a6b4-82bfb4c10a9a",
"properties": {
"sourceControlSyncJobId": "ce6fe3e3-9db3-4096-a6b4-82bfb4c10a9a",
"creationTime": "2017-03-28T23:14:26.903+00:00",
"provisioningState": "Completed",
"startTime": "2017-03-28T23:14:27.903+00:00",
"endTime": "2017-03-28T23:14:28.903+00:00",
"syncType": "PartialSync"
}
}
Definitions
Name | Description |
---|---|
Error |
Error response of an operation failure |
provisioning |
The provisioning state of the job. |
Source |
Definition of the source control sync job. |
Source |
The parameters supplied to the create source control sync job operation. |
sync |
The sync type. |
ErrorResponse
Error response of an operation failure
Name | Type | Description |
---|---|---|
code |
string |
Error code |
message |
string |
Error message indicating why the operation failed. |
provisioningState
The provisioning state of the job.
Name | Type | Description |
---|---|---|
Completed |
string |
|
Failed |
string |
|
Running |
string |
SourceControlSyncJob
Definition of the source control sync job.
Name | Type | Description |
---|---|---|
id |
string |
Resource id. |
name |
string |
Resource name. |
properties.creationTime |
string |
The creation time of the job. |
properties.endTime |
string |
The end time of the job. |
properties.provisioningState |
The provisioning state of the job. |
|
properties.sourceControlSyncJobId |
string |
The source control sync job id. |
properties.startTime |
string |
The start time of the job. |
properties.syncType |
The sync type. |
|
type |
string |
Resource type. |
SourceControlSyncJobCreateParameters
The parameters supplied to the create source control sync job operation.
Name | Type | Description |
---|---|---|
properties.commitId |
string |
The commit id of the source control sync job. If not syncing to a commitId, enter an empty string. |
syncType
The sync type.
Name | Type | Description |
---|---|---|
FullSync |
string |
|
PartialSync |
string |