az webapp deployment slot

Manage deployment slots.

Commands

az webapp deployment slot auto-swap Configure slot auto swap.
az webapp deployment slot create Create a slot.
az webapp deployment slot delete Delete a slot.
az webapp deployment slot list List all slots.
az webapp deployment slot swap Swap slots.

az webapp deployment slot auto-swap

Configure slot auto swap.

az webapp deployment slot auto-swap --name
--resource-group
--slot
[--auto-swap-slot]
[--disable]

Required Parameters

--name -n

Name of the webapp.

--resource-group -g

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

--slot -s

The name of the slot.

Optional Parameters

--auto-swap-slot

Target slot to auto swap.

default value: production
--disable

Disable auto swap.

az webapp deployment slot create

Create a slot.

az webapp deployment slot create --name
--resource-group
--slot
[--configuration-source]

Required Parameters

--name -n

Name of the webapp.

--resource-group -g

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

--slot -s

The name of the slot.

Optional Parameters

--configuration-source

Source slot to clone configurations from. Use webapp's name to refer to the production slot.

az webapp deployment slot delete

Delete a slot.

az webapp deployment slot delete --name
--resource-group
--slot

Required Parameters

--name -n

Name of the webapp.

--resource-group -g

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

--slot -s

The name of the slot.

az webapp deployment slot list

List all slots.

az webapp deployment slot list --name
--resource-group

Required Parameters

--name -n

Name of the webapp.

--resource-group -g

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

az webapp deployment slot swap

Swap slots.

az webapp deployment slot swap --name
--resource-group
--slot
[--action {preview, reset, swap}]
[--target-slot]

Examples

Swap a staging slot into production for the specified web app.

az webapp deployment slot swap -g MyResourceGroup -n MyUniqueApp --slot staging --target-slot production

Required Parameters

--name -n

Name of the webapp.

--resource-group -g

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

--slot -s

The name of the slot.

Optional Parameters

--action

Swap types. use 'preview' to apply target slot's settings on the source slot first; use 'swap' to complete it; use 'reset' to reset the swap.

accepted values: preview, reset, swap
default value: swap
--target-slot

Target slot to swap, default to 'production'.