Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
New-AzWebAppAzureStoragePath
- Module:
- Az.Websites Module
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
Syntax
Default (Default)
New-AzWebAppAzureStoragePath
-Name <String>
-Type <AzureStorageType>
-AccountName <String>
-ShareName <String>
-AccessKey <String>
-MountPath <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[-AcquirePolicyToken]
[-ChangeReference <String>]
[<CommonParameters>]
Description
Creates an object that represent an Azure Storage path to be mounted inside a Web App.
Examples
Example 1
$storagePath1 = New-AzWebAppAzureStoragePath -Name "RemoteStorageAccount1" -AccountName "myaccount" -Type AzureFiles -ShareName "someShareName" -AccessKey "some access key" `
-MountPath "\mounts\myFolderInsideTheContainerWebApp"
$storagePath2 = New-AzWebAppAzureStoragePath -Name "RemoteStorageAccount2" -AccountName "myaccount2" -Type AzureFiles -ShareName "someShareName2" -AccessKey "some access key 2" `
-MountPath "\mounts\myFolderInsideTheContainerWebApp2"
Set-AzWebApp -ResourceGroupName myresourcegroup -Name myapp -AzureStoragePath $storagepath1, $storagePath2
Parameters
-AccessKey
Access key to the Azure Storage account
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-AccountName
Azure Storage account name. e.g.: myfilestorageaccount
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-AcquirePolicyToken
Acquire an Azure Policy token automatically for this resource operation.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-ChangeReference
The change reference resource ID for this resource operation.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | cf |
Parameter sets
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Parameter properties
| Type: | IAzureContextContainer |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
Parameter sets
-MountPath
Path in the container where the share specified by ShareName will be exposed. MountPath must be sub-directory of "\mounts".
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Name
The identifier of the Azure Storage property. Must be unique within the Web App or Slot
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-ShareName
Name of the share to mount to the container
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Type
Type of Azure Storage account. Windows Containers only supports Azure Files
Parameter properties
| Type: | Microsoft.Azure.Management.WebSites.Models.AzureStorageType |
| Default value: | None |
| Accepted values: | AzureFiles, AzureBlob |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | wi |
Parameter sets
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Inputs
None
Outputs
WebAppAzureStoragePath
Azure PowerShell
Feedback
Was this page helpful?
