Editar

Compartilhar via


Set-AzWebAppSlot

Modifies an Azure Web App slot.

Syntax

Set-AzWebAppSlot
   [[-AppServicePlan] <String>]
   [[-DefaultDocuments] <String[]>]
   [[-NetFrameworkVersion] <String>]
   [[-PhpVersion] <String>]
   [[-RequestTracingEnabled] <Boolean>]
   [[-HttpLoggingEnabled] <Boolean>]
   [[-DetailedErrorLoggingEnabled] <Boolean>]
   [[-AppSettings] <Hashtable>]
   [[-ConnectionStrings] <Hashtable>]
   [[-HandlerMappings] <System.Collections.Generic.IList`1[Microsoft.Azure.Management.WebSites.Models.HandlerMapping]>]
   [[-ManagedPipelineMode] <String>]
   [[-WebSocketsEnabled] <Boolean>]
   [[-Use32BitWorkerProcess] <Boolean>]
   [-AutoSwapSlotName <String>]
   [-NumberOfWorkers <Int32>]
   [-ContainerImageName <String>]
   [-ContainerRegistryUrl <String>]
   [-ContainerRegistryUser <String>]
   [-ContainerRegistryPassword <SecureString>]
   [-EnableContainerContinuousDeployment <Boolean>]
   [-AsJob]
   [-AssignIdentity <Boolean>]
   [-HttpsOnly <Boolean>]
   [-AzureStoragePath <WebAppAzureStoragePath[]>]
   [-AlwaysOn <Boolean>]
   [-MinTlsVersion <String>]
   [-FtpsState <String>]
   [-HostNames <String[]>]
   [-ResourceGroupName] <String>
   [-Name] <String>
   [-Slot] <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Set-AzWebAppSlot
   [[-AppServicePlan] <String>]
   [[-DefaultDocuments] <String[]>]
   [[-NetFrameworkVersion] <String>]
   [[-PhpVersion] <String>]
   [[-RequestTracingEnabled] <Boolean>]
   [[-HttpLoggingEnabled] <Boolean>]
   [[-DetailedErrorLoggingEnabled] <Boolean>]
   [[-AppSettings] <Hashtable>]
   [[-ConnectionStrings] <Hashtable>]
   [[-HandlerMappings] <System.Collections.Generic.IList`1[Microsoft.Azure.Management.WebSites.Models.HandlerMapping]>]
   [[-ManagedPipelineMode] <String>]
   [[-WebSocketsEnabled] <Boolean>]
   [[-Use32BitWorkerProcess] <Boolean>]
   [-AutoSwapSlotName <String>]
   [-NumberOfWorkers <Int32>]
   [-AsJob]
   [-WebApp] <PSSite>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

The Set-AzWebApp cmdlet sets an Azure Web App Slot.

Examples

Example 1

Set-AzWebAppSlot -ResourceGroupName "Default-Web-WestUS" -Name "ContosoWebApp" -Slot "Slot001" -AppServicePlan "ContosoPlan"

This command changes the appservice plan associated with the Slot001, on the Webapp ContosoWebApp associated with the resource group Default-Web-WestUS. Use the link to learn more about changing the appservice plan and constraints associated with it. https://learn.microsoft.com/azure/app-service/app-service-plan-manage#move-an-app-to-another-app-service-plan

Example 2

Set-AzWebAppSlot -ResourceGroupName "Default-Web-WestUS" -Name "ContosoWebApp" -Slot "Slot001" -HttpLoggingEnabled $true

This command sets HttpLoggingEnabled to true for Slot Slot001 pertaining to Web App ContosoWebApp associated with the resource group Default-Web-WestUS

Example 3

Modifies an Azure Web App slot. (autogenerated)

Set-AzWebAppSlot -AppSettings <Hashtable> -Name 'ContosoWebApp' -ResourceGroupName 'Default-Web-WestUS' -Slot 'Slot001'

Parameters

-AlwaysOn

Ensure web app gets loaded all the time, rather unloaded after been idle.

Type:Boolean
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-AppServicePlan

App Service Plan Name

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

-AppSettings

App Settings HashTable. Existing App Settings will be replaced, removing any settings that are not provided.

Type:Hashtable
Position:10
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-AsJob

Run cmdlet in the background

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

-AssignIdentity

Enable/disable MSI on an existing slot [PREVIEW]

Type:Boolean
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-AutoSwapSlotName

Destination slot name for auto swap

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

-AzureStoragePath

Azure Storage to mount inside a Web App for Container. Use New-AzWebAppAzureStoragePath to create it

Type:WebAppAzureStoragePath[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ConnectionStrings

Connection Strings HashTable. Example: $connStrings = @{ConnectionStringName = @{ Type = "MySql"; Value = "TestValue"}}

Type:Hashtable
Position:11
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ContainerImageName

Container Image Name

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

-ContainerRegistryPassword

Private Container Registry Password

Type:SecureString
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ContainerRegistryUrl

Private Container Registry Server Url

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

-ContainerRegistryUser

Private Container Registry Username

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

-DefaultDocuments

Default Documents String Array

Type:String[]
Position:4
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

-DetailedErrorLoggingEnabled

Detailed Error Logging Enabled Boolean

Type:Boolean
Position:9
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-EnableContainerContinuousDeployment

Enables/Disables container continuous deployment webhook

Type:Boolean
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-FtpsState

Set the Ftps state value for an app. Allowed Values [AllAllowed | Disabled | FtpsOnly].

Type:String
Accepted values:AllAllowed, Disabled, FtpsOnly
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-HandlerMappings

Handler Mappings IList

Type:IList<T>[HandlerMapping]
Position:12
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-HostNames

Custom hostnames associated with web app slot

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-HttpLoggingEnabled

HttpLoggingEnabled Boolean

Type:Boolean
Position:8
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-HttpsOnly

Enable/disable redirecting all traffic to HTTPS on an existing slot

Type:Boolean
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ManagedPipelineMode

Managed Pipeline Mode Name

Type:String
Accepted values:Classic, Integrated
Position:13
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-MinTlsVersion

The minimum version of TLS required for SSL requests. Allowed Values [1.0 | 1.1 | 1.2].

Type:String
Accepted values:1.0, 1.1, 1.2
Position:Named
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

-NetFrameworkVersion

Net Framework Version

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

-NumberOfWorkers

The number of workers to be allocated

Type:Int32
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-PhpVersion

Php Version

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

-RequestTracingEnabled

Request Tracing Enabled Boolean

Type:Boolean
Position:7
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

-Slot

WebApp Slot Name

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

-Use32BitWorkerProcess

Use 32-bit Worker Process Boolean

Type:Boolean
Position:15
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

-WebSocketsEnabled

Web Sockets Enabled Boolean

Type:Boolean
Position:14
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

Int32

String

PSSite

Outputs

PSSite