Azure / Azure/azure-cli

WebApp: Add command for copying slots on Azure Web Apps (in preview)

Open
#16,111 16 comments 3 reactions 1 assignee Claimed by @tulikac View on GitHub
act-observability-squad App Services app-service-slots feature-request Service Attention triage Web Apps
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

**Is your feature request related to a problem? Please describe.**

No, this is a net-new feature.

**Describe the solution you'd like**

The web apps team has created a new API to *copy* one slot's **content and config** to another slot. This is similar to swapping slots, but the target slot's **content and config** would be replaced with that of the source slot's. The API team would like this to be released as a Preview command initially.

- [API swagger definition](https://docs.microsoft.com/en-us/rest/api/appservice/webapps/copyslotslot)

**Proposed signature**

Generally, the command should follow the format for `az webapp deployment slot swap`. There a couple differences:

- "slot copy" does not support the "preview" action like swap does
- The target slot *cannot* be production

```
PS C:\Users\jafreebe> az webapp deployment slot copy --help

Command
az webapp deployment slot copy: Copy the source slot's content and configuration over the target slot configuration and content. This will overwrite the content in the target slot.
This command is in preview and under development. Reference and support levels:
https://aka.ms/CLI_refstatus
Arguments
--slot -s [Required] : The name of the source slot.
--target-slot [Required] : Target slot to copy onto, default to 'production'.
```

**Additional context**

- [UserVoice](https://feedback.azure.com/forums/169385-web-apps/suggestions/6830040)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.