New-AzWebAppAzureStoragePath

Creates an object that represents an Azure Storage path to be mounted in a Web App. It is meant to be used as a parameter (-AzureStoragePath) to Set-AzWebApp and Set-AzWebAppSlot

Note

This is the previous version of our documentation. Please consult the most recent version for up-to-date information.

Syntax

New-AzWebAppAzureStoragePath
   -Name <String>
   -Type <AzureStorageType>
   -AccountName <String>
   -ShareName <String>
   -AccessKey <String>
   -MountPath <String>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Creates an object that represent an Azure Storage path to be mounted inside a Web App.

Examples

Example 1

PS C:\> $storagePath1 = New-AzWebAppAzureStoragePath -Name "RemoteStorageAccount1" -AccountName "myaccount.files.core.windows.net" -Type AzureFiles -ShareName "someShareName" -AccessKey "some access key"
-MountPath "C:\myFolderInsideTheContainerWebApp" 

PS C:\> $storagePath2 = New-AzWebAppAzureStoragePath -Name "RemoteStorageAccount2" -AccountName "myaccount2.files.core.windows.net" -Type AzureFiles -ShareName "someShareName2" -AccessKey "some access key 2"
-MountPath "C:\myFolderInsideTheContainerWebApp2" 

PS C:\> Set-AzWebApp -ResourceGroup myresourcegroup -Name myapp -AzureStoragePath $storagepath1, $storagePath2

Parameters

-AccessKey

Access key to the Azure Storage account

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

Azure Storage account name. E.g.: myfilestorageaccount.file.core.windows.net

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

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
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
Accept pipeline input:False
Accept wildcard characters:False
-MountPath

Path in the container where the share specified by ShareName will be exposed

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

The identifier of the Azure Storage property. Must be unique within the Web App or Slot

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

Name of the share to mount to the container

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

Type of Azure Storage account. Windows Containers only supports Azure Files

Type:AzureStorageType
Accepted values:AzureFiles, AzureBlob
Position:Named
Default value:None
Accept pipeline input:False
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
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

WebAppAzureStoragePath