Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

az functionapp deployment slot

Manage function app deployment slots.

Commands

Name Description Type Status
az functionapp deployment slot auto-swap

Configure deployment slot auto swap.

Core GA
az functionapp deployment slot create

Create a deployment slot.

Core GA
az functionapp deployment slot delete

Delete a deployment slot.

Core GA
az functionapp deployment slot list

List all deployment slots.

Core GA
az functionapp deployment slot swap

Swap deployment slots for a function app.

Core GA

az functionapp deployment slot auto-swap

Configure deployment slot auto swap.

az functionapp deployment slot auto-swap --slot
 [--acquire-policy-token]
 [--auto-swap-slot]
 [--change-reference]
 [--disable]
 [--ids]
 [--name]
 [--resource-group]
 [--subscription]

Required Parameters

--slot -s

The name of the slot.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--auto-swap-slot

Target slot to auto swap.

Property Value
Default value: production
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--disable

Disable auto swap.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--name -n

Name of the function app.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments

az functionapp deployment slot create

Create a deployment slot.

az functionapp deployment slot create --name
 --resource-group
 --slot
 [--acquire-policy-token]
 [--change-reference]
 [--configuration-source]
 [--deployment-container-image-name]
 [--docker-registry-server-password]
 [--docker-registry-server-user]
 [--https-only {false, true}]
 [--image]
 [--registry-password]
 [--registry-username]

Examples

Create a deployment slot. (autogenerated)

az functionapp deployment slot create --name MyFunctionapp --resource-group MyResourceGroup --slot staging

Required Parameters

--name -n

Name of the function app.

--resource-group -g

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

--slot -s

The name of the slot.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--configuration-source

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

--deployment-container-image-name
Deprecated

Option '--deployment-container-image-name' has been deprecated and will be removed in a future release. Use '--image' instead.

Container image, e.g. publisher/image-name:tag.

--docker-registry-server-password
Deprecated

Option '--docker-registry-server-password' has been deprecated and will be removed in a future release. Use '--registry-password' instead.

The container registry server password.

--docker-registry-server-user
Deprecated

Option '--docker-registry-server-user' has been deprecated and will be removed in a future release. Use '--registry-username' instead.

The container registry server username.

--https-only

Redirect all traffic made to an app using HTTP to HTTPS.

Property Value
Default value: True
Accepted values: false, true
--image -i

Container image, e.g. publisher/image-name:tag.

--registry-password -d

The container registry server password.

--registry-username -u

The container registry server username.

az functionapp deployment slot delete

Delete a deployment slot.

az functionapp deployment slot delete --slot
 [--acquire-policy-token]
 [--change-reference]
 [--ids]
 [--name]
 [--resource-group]
 [--subscription]

Examples

Delete a deployment slot. (autogenerated)

az functionapp deployment slot delete --name MyFunctionapp --resource-group MyResourceGroup --slot staging

Required Parameters

--slot -s

The name of the slot.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--name -n

Name of the function app.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments

az functionapp deployment slot list

List all deployment slots.

az functionapp deployment slot list [--ids]
 [--name]
 [--resource-group]
 [--subscription]

Examples

List all deployment slots. (autogenerated)

az functionapp deployment slot list --name MyFunctionapp --resource-group MyResourceGroup

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--name -n

Name of the function app.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments

az functionapp deployment slot swap

Swap deployment slots for a function app.

az functionapp deployment slot swap --slot
 [--acquire-policy-token]
 [--action {preview, reset, swap}]
 [--change-reference]
 [--ids]
 [--name]
 [--preserve-vnet {false, true}]
 [--resource-group]
 [--subscription]
 [--target-slot]

Examples

Swap a staging slot into production for the MyUniqueApp function app.

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

Required Parameters

--slot -s

The name of the slot.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--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.

Property Value
Default value: swap
Accepted values: preview, reset, swap
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--name -n

Name of the function app.

Property Value
Parameter group: Resource Id Arguments
--preserve-vnet

Preserve Virtual Network to the slot during swap, default to 'true'.

Property Value
Accepted values: false, true
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
--target-slot

Target slot to swap, default to 'production'.


Feedback

Was this page helpful?