Update-AzStaticWebApp
Description for Creates a new static site in an existing resource group, or updates an existing static site.
Syntax
UpdateExpanded (Default)
Update-AzStaticWebApp
-Name <String>
-ResourceGroupName <String>
[-SubscriptionId <String>]
[-AllowConfigFileUpdate]
[-ApiBuildCommand <String>]
[-ApiLocation <String>]
[-AppArtifactLocation <String>]
[-AppBuildCommand <String>]
[-AppLocation <String>]
[-Branch <String>]
[-ForkRepositoryDescription <String>]
[-ForkRepositoryIsPrivate]
[-ForkRepositoryName <String>]
[-ForkRepositoryOwner <String>]
[-GithubActionSecretNameOverride <String>]
[-Kind <String>]
[-OutputLocation <String>]
[-RepositoryToken <String>]
[-RepositoryUrl <String>]
[-SkipGithubActionWorkflowGeneration]
[-StagingEnvironmentPolicy <StagingEnvironmentPolicy>]
[-TemplateRepositoryUrl <String>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
UpdateViaIdentityExpanded
Update-AzStaticWebApp
-InputObject <IWebsitesIdentity>
[-AllowConfigFileUpdate]
[-ApiBuildCommand <String>]
[-ApiLocation <String>]
[-AppArtifactLocation <String>]
[-AppBuildCommand <String>]
[-AppLocation <String>]
[-Branch <String>]
[-ForkRepositoryDescription <String>]
[-ForkRepositoryIsPrivate]
[-ForkRepositoryName <String>]
[-ForkRepositoryOwner <String>]
[-GithubActionSecretNameOverride <String>]
[-Kind <String>]
[-OutputLocation <String>]
[-RepositoryToken <String>]
[-RepositoryUrl <String>]
[-SkipGithubActionWorkflowGeneration]
[-StagingEnvironmentPolicy <StagingEnvironmentPolicy>]
[-TemplateRepositoryUrl <String>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Description for Creates a new static site in an existing resource group, or updates an existing static site.
Examples
Example 1: Update a static site
Update-AzStaticWebApp -ResourceGroupName 'resourceGroup' -Name 'staticweb00'
Kind Location Name Type
---- -------- ---- ----
Central US staticweb00 Microsoft.Web/staticSites
This command updates a static site.
Example 2: Update a static site by pipeline
Get-AzStaticWebApp -ResourceGroupName 'resourceGroup' -Name 'staticweb00' | Update-AzStaticWebApp
Kind Location Name Type
---- -------- ---- ----
Central US staticweb00 Microsoft.Web/staticSites
This command updates a static site by pipeline.
Parameters
-AllowConfigFileUpdate
<code>false</code> if config file is locked for this static web app; otherwise, <code>true</code>.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ApiBuildCommand
A custom command to run during deployment of the Azure Functions API application.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ApiLocation
The path to the api code within the repository.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-AppArtifactLocation
Deprecated: The path of the app artifacts after building (deprecated in favor of OutputLocation)
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-AppBuildCommand
A custom command to run during deployment of the static content application.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-AppLocation
The path to the app code within the repository.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Branch
The target branch in the repository.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-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
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DefaultProfile
The DefaultProfile parameter is not functional.
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
Parameter properties
Type: PSObject
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzureRMContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ForkRepositoryDescription
Description of the newly generated repository.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ForkRepositoryIsPrivate
Whether or not the newly generated repository is a private repository.
Defaults to false (i.e.
public).
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ForkRepositoryName
Name of the newly generated repository.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ForkRepositoryOwner
Owner of the newly generated repository.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-GithubActionSecretNameOverride
Github Action secret name override.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
Identity Parameter
To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
UpdateViaIdentityExpanded
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-Kind
Kind of resource.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Name
Name of the static site to create or update.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
UpdateExpanded
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-OutputLocation
The output path of the app after building.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-RepositoryToken
A user's github repository token.
This is used to setup the Github Actions workflow file and API secrets.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-RepositoryUrl
URL for the repository of the static site.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceGroupName
Name of the resource group to which the resource belongs.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
UpdateExpanded
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-SkipGithubActionWorkflowGeneration
Skip Github Action workflow generation.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-StagingEnvironmentPolicy
State indicating whether staging environments are allowed or not allowed for a static web app.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-SubscriptionId
Your Azure subscription ID.
This is a GUID-formatted string (e.g.
00000000-0000-0000-0000-000000000000).
Parameter properties
Type: String
Default value: (Get-AzContext).Subscription.Id
Supports wildcards: False
DontShow: False
Parameter sets
UpdateExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-TemplateRepositoryUrl
URL of the template repository.
The newly generated repository will be based on this one.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-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
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
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 .
Outputs