az apr repository

Note

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

This command group is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Manage repositories within an APR registry.

Commands

Name Description Type Status
az apr repository create

Create a new repository (apt, yum, or file) within a registry.

Extension Preview
az apr repository delete

Delete a repository and its contents.

Extension Preview
az apr repository list

List repositories in a registry.

Extension Preview
az apr repository package

Manage the packages contained in a repository.

Extension Preview
az apr repository package add

Add packages to a repository.

Extension Preview
az apr repository package remove

Remove packages from a repository.

Extension Preview
az apr repository publish

Publish repository metadata (regenerate, sign, push to CDN).

Extension Preview
az apr repository release

Manage the apt releases (dists) of a repository.

Extension Preview
az apr repository release component

Manage the components of an apt release.

Extension Preview
az apr repository release component create

Create a release component.

Extension Preview
az apr repository release component delete

Delete a release component.

Extension Preview
az apr repository release component list

List the components of a release.

Extension Preview
az apr repository release create

Create a release.

Extension Preview
az apr repository release delete

Delete a release.

Extension Preview
az apr repository release list

List releases.

Extension Preview
az apr repository show

Show repository details.

Extension Preview
az apr repository sync

Sync packages from an upstream remote into this repository.

Extension Preview
az apr repository update

Update repository configuration.

Extension Preview

az apr repository create

Preview

Command group 'apr repository' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Create a new repository (apt, yum, or file) within a registry.

az apr repository create --name
                         --registry
                         --type {apt, file, yum}
                         [--acquire-policy-token]
                         [--change-reference]
                         [--resource-group]
                         [--retain-all]
                         [--retain-versions]

Examples

Create an apt repository.

az apr repository create -g myrg -r myregistry -n myrepo --type apt

Create a repository that keeps the last 10 versions.

az apr repository create -g myrg -r myregistry -n myrepo --type apt --retain-versions 10

Create a repository that keeps every version.

az apr repository create -g myrg -r myregistry -n myrepo --type apt --retain-all

Required Parameters

--name -n

Name or ID of the repository.

--registry -r

Name of the parent APR registry.

--type

Repository type.

Property Value
Accepted values: apt, file, yum

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--resource-group -g

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

--retain-all

Keep every repository version. Mutually exclusive with --retain-versions.

Property Value
Default value: False
--retain-versions

Number of repository versions to keep; older ones are pruned. Defaults to 5.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False

az apr repository delete

Preview

Command group 'apr repository' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Delete a repository and its contents.

az apr repository delete --name
                         --registry
                         [--acquire-policy-token]
                         [--change-reference]
                         [--no-wait]
                         [--resource-group]
                         [--yes]

Examples

Delete a repository by name.

az apr repository delete -g myrg -r myregistry -n myrepo

Required Parameters

--name -n

Name or ID of the repository.

--registry -r

Name of the parent APR registry.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--no-wait

Do not wait for the long-running operation to finish.

Property Value
Default value: False
--resource-group -g

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

--yes -y

Do not prompt for confirmation.

Property Value
Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False

az apr repository list

Preview

Command group 'apr repository' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

List repositories in a registry.

az apr repository list --registry
                       [--limit]
                       [--resource-group]

Examples

List all repositories in a registry.

az apr repository list -g myrg -r myregistry

Required Parameters

--registry -r

Name of the parent APR registry.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--limit

Max number of repositories to return. Omit to return all.

--resource-group -g

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False

az apr repository publish

Preview

Command group 'apr repository' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Publish repository metadata (regenerate, sign, push to CDN).

az apr repository publish --name
                          --registry
                          [--acquire-policy-token]
                          [--change-reference]
                          [--force]
                          [--no-wait]
                          [--resource-group]

Examples

Publish a repository.

az apr repository publish -g myrg -r myregistry -n myrepo

Publish even when no changes are detected.

az apr repository publish -g myrg -r myregistry -n myrepo --force

Required Parameters

--name -n

Name or ID of the repository.

--registry -r

Name of the parent APR registry.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--force

Publish even if no changes are detected.

Property Value
Default value: False
--no-wait

Do not wait for the long-running operation to finish.

Property Value
Default value: False
--resource-group -g

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False

az apr repository show

Preview

Command group 'apr repository' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Show repository details.

az apr repository show --name
                       --registry
                       [--resource-group]

Examples

Show a repository by name.

az apr repository show -g myrg -r myregistry -n myrepo

Required Parameters

--name -n

Name or ID of the repository.

--registry -r

Name of the parent APR registry.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--resource-group -g

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False

az apr repository sync

Preview

Command group 'apr repository' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Sync packages from an upstream remote into this repository.

az apr repository sync --name
                       --registry
                       [--acquire-policy-token]
                       [--change-reference]
                       [--confirm]
                       [--no-wait]
                       [--resource-group]
                       [--sync-mode {additive, mirror}]
                       [--yes]

Examples

Sync a repository from its bound remote.

az apr repository sync -g myrg -r myregistry -n myrepo

Add upstream content without removing existing packages.

az apr repository sync -g myrg -r myregistry -n myrepo --sync-mode additive

Make the repository match the remote, removing anything not upstream.

az apr repository sync -g myrg -r myregistry -n myrepo --sync-mode mirror

Required Parameters

--name -n

Name or ID of the repository.

--registry -r

Name of the parent APR registry.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--confirm

Confirm a destructive mirror sync without prompting.

Property Value
Default value: False
--no-wait

Do not wait for the long-running operation to finish.

Property Value
Default value: False
--resource-group -g

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

--sync-mode

How upstream content is applied to the repository. additive (the default) only adds; mirror also removes anything not upstream.

Property Value
Accepted values: additive, mirror
--yes -y

Do not prompt for confirmation.

Property Value
Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False

az apr repository update

Preview

Command group 'apr repository' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Update repository configuration.

az apr repository update --name
                         --registry
                         [--acquire-policy-token]
                         [--change-reference]
                         [--no-wait]
                         [--remote]
                         [--resource-group]
                         [--retain-all]
                         [--retain-versions]

Examples

Bind a repository to a remote it syncs from.

az apr repository update -g myrg -r myregistry -n myrepo --remote myremote

Unset the remote.

az apr repository update -g myrg -r myregistry -n myrepo --remote ""

Change how many versions the repository keeps.

az apr repository update -g myrg -r myregistry -n myrepo --retain-versions 3

Keep every version.

az apr repository update -g myrg -r myregistry -n myrepo --retain-all

Required Parameters

--name -n

Name or ID of the repository.

--registry -r

Name of the parent APR registry.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--no-wait

Do not wait for the long-running operation to finish.

Property Value
Default value: False
--remote

Name or ID of the remote this repository syncs from. Empty string unsets it.

--resource-group -g

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

--retain-all

Keep every repository version. Mutually exclusive with --retain-versions.

Property Value
Default value: False
--retain-versions

Number of repository versions to keep; older ones are pruned. Omit to leave unchanged.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False