az automation source-control sync-job

Note

This reference is part of the automation extension for the Azure CLI (version 2.55.0 or higher). The extension will automatically install the first time you run an az automation source-control sync-job command. Learn more about extensions.

Manage source control sync jobs.

Commands

Name Description Type Status
az automation source-control sync-job create

Create the sync job for a source control.

Extension GA
az automation source-control sync-job list

List a list of source control sync jobs.

Extension GA
az automation source-control sync-job show

Get the source control sync job identified by job id.

Extension GA
az automation source-control sync-job stream

Manage sync job stream.

Extension GA
az automation source-control sync-job stream list

List a list of sync job streams identified by sync job id.

Extension GA
az automation source-control sync-job stream show

Get a sync job stream identified by stream id.

Extension GA
az automation source-control sync-job update

Update the sync job for a source control.

Extension GA

az automation source-control sync-job create

Create the sync job for a source control.

az automation source-control sync-job create --account
                                             --commit-id
                                             --job-id
                                             --resource-group
                                             --source-control-name

Examples

Create source control sync job

az automation source-control sync-job create -g rg --automation-account-name myAutomationAccount --source-control-name sourceControl --job-id abcdef01-2345-6789-9bed-a01234567890 --commit-id ""

Required Parameters

--account --automation-account-name

The name of the automation account.

--commit-id

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

--job-id --name --source-control-sync-job-id -n

The source control sync job id.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--source-control-name

The source control name.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az automation source-control sync-job list

List a list of source control sync jobs.

az automation source-control sync-job list --account
                                           --resource-group
                                           --source-control-name
                                           [--filter]
                                           [--max-items]
                                           [--next-token]

Examples

List sync jobs

az automation source-control sync-job list -g rg --automation-account-name myAutomationAccount --source-control-name sourceControl

Required Parameters

--account --automation-account-name

The name of the automation account.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--source-control-name

The source control name.

Optional Parameters

--filter

The filter to apply on the operation.

--max-items

Total number of items to return in the command's output. If the total number of items available is more than the value specified, a token is provided in the command's output. To resume pagination, provide the token value in --next-token argument of a subsequent command.

--next-token

Token to specify where to start paginating. This is the token value from a previously truncated response.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az automation source-control sync-job show

Get the source control sync job identified by job id.

az automation source-control sync-job show [--account]
                                           [--ids]
                                           [--job-id]
                                           [--resource-group]
                                           [--source-control-name]
                                           [--subscription]

Examples

Get information about the sync job

az automation source-control sync-job show -g rg --automation-account-name myAutomationAccount --source-control-name sourceControl --job-id abcdef01-2345-6789-9bed-a01234567890

Optional Parameters

--account --automation-account-name

The name of the automation account.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--job-id --name --source-control-sync-job-id -n

The source control sync job id.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--source-control-name

The source control name.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az automation source-control sync-job update

Update the sync job for a source control.

az automation source-control sync-job update [--account]
                                             [--add]
                                             [--commit-id]
                                             [--force-string {0, 1, f, false, n, no, t, true, y, yes}]
                                             [--ids]
                                             [--job-id]
                                             [--remove]
                                             [--resource-group]
                                             [--set]
                                             [--source-control-name]
                                             [--subscription]

Examples

Update source control sync job properties

az automation source-control sync-job update -g rg --automation-account-name myAutomationAccount --source-control-name sourceControl --job-id abcdef01-2345-6789-9bed-a01234567890 --commit-id ""

Optional Parameters

--account --automation-account-name

The name of the automation account.

--add

Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>.

--commit-id

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

--force-string

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--job-id --name --source-control-sync-job-id -n

The source control sync job id.

--remove

Remove a property or an element from a list. Example: --remove property.list OR --remove propertyToRemove.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=.

--source-control-name

The source control name.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.