WebApp: Add command for copying slots on Azure Web Apps (in preview)
- 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
Assessment
This issue has not been assessed yet.