Share via


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=2024-10-23

URI Parameters

Name In Required Type Description
automationAccountName
path True

string

The name of the automation account.

resourceGroupName
path True

string

minLength: 1
maxLength: 90
pattern: ^[-\w\._]+$

Name of an Azure Resource group.

sourceControlName
path True

string

The source control name.

sourceControlSyncJobId
path True

string (uuid)

The source control sync job id.

subscriptionId
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

minLength: 0

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

SourceControlSyncJob

Created

Other Status Codes

ErrorResponse

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=2024-10-23

{
  "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
ErrorResponse

Error response of an operation failure

provisioningState

The provisioning state of the job.

SourceControlSyncJob

Definition of the source control sync job.

SourceControlSyncJobCreateParameters

The parameters supplied to the create source control sync job operation.

syncType

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.

Value Description
Completed
Failed
Running

SourceControlSyncJob

Definition of the source control sync job.

Name Type Description
id

string

Resource id.

name

string

Resource name.

properties.creationTime

string (date-time)

The creation time of the job.

properties.endTime

string (date-time)

The end time of the job.

properties.provisioningState

provisioningState

The provisioning state of the job.

properties.sourceControlSyncJobId

string

The source control sync job id.

properties.startTime

string (date-time)

The start time of the job.

properties.syncType

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

minLength: 0

The commit id of the source control sync job. If not syncing to a commitId, enter an empty string.

syncType

The sync type.

Value Description
FullSync
PartialSync