편집

다음을 통해 공유


Switch-AzWebAppSlot

Swap two slots within a Web App

Syntax

Switch-AzWebAppSlot
      [-SourceSlotName] <String>
      [[-DestinationSlotName] <String>]
      [[-SwapWithPreviewAction] <SwapWithPreviewAction>]
      [[-PreserveVnet] <Boolean>]
      [-ResourceGroupName] <String>
      [-Name] <String>
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Switch-AzWebAppSlot
      [-SourceSlotName] <String>
      [[-DestinationSlotName] <String>]
      [[-SwapWithPreviewAction] <SwapWithPreviewAction>]
      [[-PreserveVnet] <Boolean>]
      [-WebApp] <PSSite>
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

The Switch-AzWebAppSlot cmdlet switches two slots associated with an Azure Web App.

Examples

Example 1

Switch-AzWebAppSlot -SourceSlotName "sourceslot" -DestinationSlotName "destinationslot" -ResourceGroupName "Default-Web-WestUS" -Name "ContosoWebApp"

This command will switch slot "sourceslot" with slot "destinationslot" on the Web App ContosoWebApp in the resource group Default-Web-WestUS.

Note

Use "production" as the slot name when the either the source or destination slot is intended to be the production slot.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DestinationSlotName

Destination Slot Name

Type:String
Position:1
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

WebApp Name

Type:String
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-PreserveVnet

Preserve Vnet Boolean

Type:Nullable<T>[Boolean]
Position:3
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

Resource Group Name

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-SourceSlotName

Source Slot Name

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-SwapWithPreviewAction

Swap With Preview Action

Type:Nullable<T>[SwapWithPreviewAction]
Accepted values:ApplySlotConfig, CompleteSlotSwap, ResetSlotSwap
Position:2
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WebApp

WebApp Object

Type:PSSite
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

String

PSSite

Outputs

Void