Skip to content

[App Service] Add new commands and infrastructure features: list-skus, list-slots, slot copy, public certs, logging#33066

Open
seligj95 wants to merge 5 commits intoAzure:devfrom
seligj95:fix/23924-13466-26145-small-features
Open

[App Service] Add new commands and infrastructure features: list-skus, list-slots, slot copy, public certs, logging#33066
seligj95 wants to merge 5 commits intoAzure:devfrom
seligj95:fix/23924-13466-26145-small-features

Conversation

@seligj95
Copy link
Contributor

@seligj95 seligj95 commented Mar 26, 2026

Consolidated PR

This PR consolidates the following PRs into a single changeset:

Issues Fixed

Testing

All changes include unit tests via test_webapp_commands_thru_mock.py. Style (azdev style appservice) passes cleanly.

…ting, SKU listing, and slot instance support

- Add 'az appservice plan list-skus' command (preview) to list available SKUs for a plan
- Add 'az appservice plan list-slots' command (preview) to list deployment slots across all apps in a plan
- Add examples to 'az webapp list-instances' showing --slot usage (already implemented)
- Add unit tests for new plan commands

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 26, 2026 14:47
@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Mar 26, 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

Hi @seligj95,
Since the current milestone time is less than 7 days, this pr will be reviewed in the next milestone.

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

azure-client-tools-bot-prd bot commented Mar 26, 2026

⚠️AzureCLI-BreakingChangeTest
⚠️appservice
rule cmd_name rule_message suggest_message
⚠️ 1001 - CmdAdd appservice plan list-skus cmd appservice plan list-skus added
⚠️ 1001 - CmdAdd appservice plan list-slots cmd appservice plan list-slots added
⚠️ 1008 - ParaPropAdd webapp config connection-string list cmd webapp config connection-string list update parameter name: added property id_part=name
⚠️ 1011 - SubgroupAdd webapp config public-cert sub group webapp config public-cert added
⚠️ 1008 - ParaPropAdd webapp create cmd webapp create update parameter container_registry_url: added property options_deprecate_info=[{'target': '--docker-registry-server-url', 'redirect': '--container-registry-url'}]
⚠️ 1010 - ParaPropUpdate webapp create cmd webapp create update parameter container_registry_url: updated property options from ['--container-registry-url'] to ['--container-registry-url', '--docker-registry-server-url']
⚠️ 1001 - CmdAdd webapp deployment slot copy cmd webapp deployment slot copy added
⚠️ 1006 - ParaAdd webapp log config cmd webapp log config added parameter web_server_log_retention
⚠️ 1006 - ParaAdd webapp log config cmd webapp log config added parameter web_server_log_sas_url
⚠️ 1010 - ParaPropUpdate webapp log config cmd webapp log config update parameter web_server_logging: updated property choices from ['filesystem', 'off'] to ['azureblobstorage', 'filesystem', 'off']

@yonzhan
Copy link
Collaborator

yonzhan commented Mar 26, 2026

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

@github-actions
Copy link

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>

Copy link
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

This PR enhances the App Service CLI module by adding new (preview) commands to list selectable SKUs and deployment slots for an existing App Service plan, and by documenting slot usage for az webapp list-instances.

Changes:

  • Added az appservice plan list-skus (preview) to surface available plan SKUs via get_server_farm_skus.
  • Added az appservice plan list-slots (preview) to enumerate apps in a plan and list their deployment slots.
  • Expanded help examples for az webapp list-instances to include --slot usage, and added unit tests for the new plan commands.

Reviewed changes

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

Show a summary per file
File Description
src/azure-cli/azure/cli/command_modules/appservice/commands.py Registers the new appservice plan subcommands (list-skus, list-slots) as preview.
src/azure-cli/azure/cli/command_modules/appservice/custom.py Implements list_plan_skus() and list_plan_slots() backing the new commands.
src/azure-cli/azure/cli/command_modules/appservice/_params.py Adds argument contexts for the new commands’ --name/-n handling.
src/azure-cli/azure/cli/command_modules/appservice/_help.py Adds help entries for the new commands and slot examples for webapp list-instances.
src/azure-cli/azure/cli/command_modules/appservice/tests/latest/test_webapp_commands_thru_mock.py Adds unit tests validating the new custom functions’ behavior under mocks.

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

seligj95 and others added 3 commits March 26, 2026 11:44
…ommand (preview)

Add new command to copy content and configuration from one deployment
slot to another using the REST API slotcopy endpoint. Unlike swap, this
is a one-way operation that overwrites the target slot content.

- Register command with is_preview=True in commands.py
- Add --slot (source) and --target-slot (destination) parameters
- Implementation uses send_raw_request since SDK lacks copy_slot method
- Add help text with examples
- Add unit tests

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… monitoring, logging, and infrastructure improvements

- Azure#30030: Add Application Insights connection string and instrumentation key
  examples to `webapp config appsettings set` help with guidance on enabling
  App Insights monitoring via app settings.

- Azure#10043: Add Azure Blob Storage support for web server logging via
  `--web-server-logging azureblobstorage` with new `--web-server-log-sas-url`
  and `--web-server-log-retention` parameters in `webapp log config`.

- Azure#29147: Add warning message and documentation to `webapp traffic-routing set`
  about potential app restart when updating traffic routing configuration
  (known platform behavior).

- Azure#28987: Add VNet/private endpoint guidance to `webapp config backup create`
  and `webapp config backup restore` help text, documenting requirements for
  backup/restore with storage accounts behind VNets.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… connection-string IDs, docker create params, log help, public certs

- Azure#15647: Enable --ids support for 'az webapp config connection-string list' by
  removing id_part=None override and cleaning up incorrect explicit --ids arg
  with required=True on the connection-string argument context.

- Azure#17674: Add --docker-registry-server-url deprecated alias to 'webapp create'
  container_registry_url param. Also set DOCKER_REGISTRY_SERVER_* app settings
  during Linux container creation (previously only set for Windows containers).

- Azure#29760: Improve --docker-container-logging help text in _params.py and _help.py.
  Clarify 'filesystem' vs 'off' values and add long-summary to 'webapp log config'.

- Azure#12391: Add 'az webapp config public-cert' command group with upload, list,
  show, and delete subcommands for managing public certificates (.cer/.crt) on
  web apps via the PublicCertificate REST API.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@seligj95 seligj95 changed the title [App Service] Fix #23924, #13466, #26145: Add slot listing, SKU listing, and slot instance support [App Service] Fix #23924, #13466, #26145, #16111, #30030, #10043, #29147, #28987, #15647, #17674, #29760, #12391: new commands, infra features, and misc improvements Mar 26, 2026
…, clean tests

- list_plan_slots: derive slot name from slot.id instead of mutating slot.name
- _params.py: use minimal overrides for list-skus/list-slots name arg (id_part=None)
  instead of redundantly redefining what parent appservice plan context provides
- tests: remove unused setUp/self.client, drop unused WebSiteManagementClient import
- tests: add slot.id to mock for realistic resource ID parsing

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@seligj95 seligj95 changed the title [App Service] Fix #23924, #13466, #26145, #16111, #30030, #10043, #29147, #28987, #15647, #17674, #29760, #12391: new commands, infra features, and misc improvements [App Service] Add new commands and infrastructure features: list-skus, list-slots, slot copy, public certs, logging Mar 26, 2026
@yonzhan yonzhan assigned yanzhudd and unassigned zhoxing-ms Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

5 participants