Skip to content

{AppConfig} az appconfig kv: Add snapshot reference support#33278

Open
ChristineWanjau wants to merge 10 commits intoAzure:devfrom
ChristineWanjau:cwanjau/snapshotReferences
Open

{AppConfig} az appconfig kv: Add snapshot reference support#33278
ChristineWanjau wants to merge 10 commits intoAzure:devfrom
ChristineWanjau:cwanjau/snapshotReferences

Conversation

@ChristineWanjau
Copy link
Copy Markdown
Contributor

@ChristineWanjau ChristineWanjau commented Apr 28, 2026

Related command

az appconfig kv set-snapshot-reference (new)
az appconfig kv list --resolve-snapshot-references (new flag)

Description

New command — az appconfig kv set-snapshot-reference

Creates or updates a snapshot reference key-value at the given key (and optional label) pointing at a snapshot by name.

New flag — az appconfig kv list --resolve-snapshot-references

When set, every snapshot reference returned by the list is replaced in sequence by the key-values of the snapshot it points to. Non-reference key-values pass through unchanged.

Testing Guide

History Notes

[App Config] az appconfig kv set-snapshot-reference: Add support to create a snapshot reference key-value
[App Config] az appconfig kv list: Add support to list key-values from a snapshot reference


This checklist is used to make sure that common guidelines for a pull request are followed.

@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd Bot commented Apr 28, 2026

️✔️AzureCLI-FullTest
️✔️acr
️✔️latest
️✔️3.12
️✔️3.13
️✔️acs
️✔️latest
️✔️3.12
️✔️3.13
️✔️advisor
️✔️latest
️✔️3.12
️✔️3.13
️✔️ams
️✔️latest
️✔️3.12
️✔️3.13
️✔️apim
️✔️latest
️✔️3.12
️✔️3.13
️✔️appconfig
️✔️latest
️✔️3.12
️✔️3.13
️✔️appservice
️✔️latest
️✔️3.12
️✔️3.13
️✔️aro
️✔️latest
️✔️3.12
️✔️3.13
️✔️backup
️✔️latest
️✔️3.12
️✔️3.13
️✔️batch
️✔️latest
️✔️3.12
️✔️3.13
️✔️batchai
️✔️latest
️✔️3.12
️✔️3.13
️✔️billing
️✔️latest
️✔️3.12
️✔️3.13
️✔️botservice
️✔️latest
️✔️3.12
️✔️3.13
️✔️cdn
️✔️latest
️✔️3.12
️✔️3.13
️✔️cloud
️✔️latest
️✔️3.12
️✔️3.13
️✔️cognitiveservices
️✔️latest
️✔️3.12
️✔️3.13
️✔️compute_recommender
️✔️latest
️✔️3.12
️✔️3.13
️✔️computefleet
️✔️latest
️✔️3.12
️✔️3.13
️✔️config
️✔️latest
️✔️3.12
️✔️3.13
️✔️configure
️✔️latest
️✔️3.12
️✔️3.13
️✔️consumption
️✔️latest
️✔️3.12
️✔️3.13
️✔️container
️✔️latest
️✔️3.12
️✔️3.13
️✔️containerapp
️✔️latest
️✔️3.12
️✔️3.13
️✔️core
️✔️latest
️✔️3.12
️✔️3.13
️✔️cosmosdb
️✔️latest
️✔️3.12
️✔️3.13
️✔️databoxedge
️✔️latest
️✔️3.12
️✔️3.13
️✔️dls
️✔️latest
️✔️3.12
️✔️3.13
️✔️dms
️✔️latest
️✔️3.12
️✔️3.13
️✔️eventgrid
️✔️latest
️✔️3.12
️✔️3.13
️✔️eventhubs
️✔️latest
️✔️3.12
️✔️3.13
️✔️feedback
️✔️latest
️✔️3.12
️✔️3.13
️✔️find
️✔️latest
️✔️3.12
️✔️3.13
️✔️hdinsight
️✔️latest
️✔️3.12
️✔️3.13
️✔️identity
️✔️latest
️✔️3.12
️✔️3.13
️✔️iot
️✔️latest
️✔️3.12
️✔️3.13
️✔️keyvault
️✔️latest
️✔️3.12
️✔️3.13
️✔️lab
️✔️latest
️✔️3.12
️✔️3.13
️✔️managedservices
️✔️latest
️✔️3.12
️✔️3.13
️✔️maps
️✔️latest
️✔️3.12
️✔️3.13
️✔️marketplaceordering
️✔️latest
️✔️3.12
️✔️3.13
️✔️monitor
️✔️latest
️✔️3.12
️✔️3.13
️✔️mysql
️✔️latest
️✔️3.12
️✔️3.13
️✔️netappfiles
️✔️latest
️✔️3.12
️✔️3.13
️✔️network
️✔️latest
️✔️3.12
️✔️3.13
️✔️policyinsights
️✔️latest
️✔️3.12
️✔️3.13
️✔️postgresql
️✔️latest
️✔️3.12
️✔️3.13
️✔️privatedns
️✔️latest
️✔️3.12
️✔️3.13
️✔️profile
️✔️latest
️✔️3.12
️✔️3.13
️✔️rdbms
️✔️latest
️✔️3.12
️✔️3.13
️✔️redis
️✔️latest
️✔️3.12
️✔️3.13
️✔️relay
️✔️latest
️✔️3.12
️✔️3.13
️✔️resource
️✔️latest
️✔️3.12
️✔️3.13
️✔️role
️✔️latest
️✔️3.12
️✔️3.13
️✔️search
️✔️latest
️✔️3.12
️✔️3.13
️✔️security
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicebus
️✔️latest
️✔️3.12
️✔️3.13
️✔️serviceconnector
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicefabric
️✔️latest
️✔️3.12
️✔️3.13
️✔️signalr
️✔️latest
️✔️3.12
️✔️3.13
️✔️sql
️✔️latest
️✔️3.12
️✔️3.13
️✔️sqlvm
️✔️latest
️✔️3.12
️✔️3.13
️✔️storage
️✔️latest
️✔️3.12
️✔️3.13
️✔️synapse
️✔️latest
️✔️3.12
️✔️3.13
️✔️telemetry
️✔️latest
️✔️3.12
️✔️3.13
️✔️util
️✔️latest
️✔️3.12
️✔️3.13
️✔️vm
️✔️latest
️✔️3.12
️✔️3.13

@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd Bot commented Apr 28, 2026

⚠️AzureCLI-BreakingChangeTest
⚠️appconfig
rule cmd_name rule_message suggest_message
⚠️ 1006 - ParaAdd appconfig kv list cmd appconfig kv list added parameter resolve_snapshot_references
⚠️ 1001 - CmdAdd appconfig kv set-snapshot-reference cmd appconfig kv set-snapshot-reference added

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented Apr 28, 2026

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions
Copy link
Copy Markdown

The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR.

Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

@ChristineWanjau ChristineWanjau changed the title [AppConfig]az appconfig kv: Add snapshot reference support [AppConfig] az appconfig kv: Add snapshot reference support Apr 28, 2026
@ChristineWanjau ChristineWanjau marked this pull request as ready for review April 28, 2026 09:46
Copilot AI review requested due to automatic review settings April 28, 2026 09:46
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Azure App Configuration snapshot reference support to az appconfig kv by introducing a new command to create/update snapshot reference key-values and a new list flag to expand references into the snapshot’s key-values.

Changes:

  • Add az appconfig kv set-snapshot-reference to write snapshot reference key-values with the appropriate content type/value format.
  • Add az appconfig kv list --resolve-snapshot-references to expand snapshot references into the referenced snapshot’s key-values (in sequence).
  • Add constants, CLI params/validators/help text, and scenario tests for the new behaviors.

Reviewed changes

Copilot reviewed 7 out of 10 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/azure-cli/azure/cli/command_modules/appconfig/tests/latest/test_appconfig_snapshot_reference_commands.py Adds scenario coverage for setting snapshot references and listing with reference resolution.
src/azure-cli/azure/cli/command_modules/appconfig/keyvalue.py Implements set_snapshot_reference and snapshot-reference expansion in kv list.
src/azure-cli/azure/cli/command_modules/appconfig/commands.py Registers the new appconfig kv set-snapshot-reference command.
src/azure-cli/azure/cli/command_modules/appconfig/_validators.py Adds validation for --snapshot-name.
src/azure-cli/azure/cli/command_modules/appconfig/_params.py Wires new command arguments and the --resolve-snapshot-references flag.
src/azure-cli/azure/cli/command_modules/appconfig/_help.py Documents the new command and list flag with examples.
src/azure-cli/azure/cli/command_modules/appconfig/_constants.py Introduces snapshot reference constants (content type + JSON key).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/azure-cli/azure/cli/command_modules/appconfig/keyvalue.py
Comment thread src/azure-cli/azure/cli/command_modules/appconfig/keyvalue.py
Comment thread src/azure-cli/azure/cli/command_modules/appconfig/keyvalue.py Outdated
Comment thread src/azure-cli/azure/cli/command_modules/appconfig/_params.py Outdated
Comment thread src/azure-cli/azure/cli/command_modules/appconfig/_validators.py
@yonzhan yonzhan assigned yanzhudd and unassigned zhoxing-ms Apr 28, 2026
- name: Set a snapshot reference with label MyLabel.
text: az appconfig kv set-snapshot-reference -n MyAppConfiguration --key MySnapshotRef --label MyLabel --snapshot-name MySnapshot
- name: Set a snapshot reference using login-based authentication.
text: az appconfig kv set-snapshot-reference --endpoint https://myappconfiguration.azconfig.io --key MySnapshotRef --snapshot-name MySnapshot --auth-mode login
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets use contoso as the store name for any examples containing endpoint URL

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, updated

Comment thread src/azure-cli/azure/cli/command_modules/appconfig/_help.py Outdated
Co-authored-by: Matthew Metcalf <mrm9084@gmail.com>
Comment thread src/azure-cli/azure/cli/command_modules/appconfig/_help.py Outdated
Comment thread src/azure-cli/azure/cli/command_modules/appconfig/keyvalue.py
Co-authored-by: Jimmy Campbell <jimmyca@microsoft.com>
@ChristineWanjau
Copy link
Copy Markdown
Contributor Author

@VeryEarly @yanzhudd this PR is ready to merge

@yanzhudd yanzhudd changed the title [AppConfig] az appconfig kv: Add snapshot reference support {AppConfig} az appconfig kv: Add snapshot reference support May 6, 2026
@microsoft-github-policy-service
Copy link
Copy Markdown
Contributor

🔔 Routing this PR to @act-observability-squad.

@microsoft-github-policy-service
Copy link
Copy Markdown
Contributor

🔔 Routing this PR to @act-codegen-extensibility-squad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants