Update-AzStaticWebApp
Description for Creates a new static site in an existing resource group, or updates an existing static site.
Note
This is the previous version of our documentation. Please consult the most recent version for up-to-date information.
Syntax
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>]
[-Confirm]
[-WhatIf]
[<CommonParameters>]
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>]
[-Confirm]
[-WhatIf]
[<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
PS C:\> 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
PS C:\> 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
<code>false</code> if config file is locked for this static web app; otherwise, <code>true</code>.
| Type: | SwitchParameter |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
A custom command to run during deployment of the Azure Functions API application.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The path to the api code within the repository.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Deprecated: The path of the app artifacts after building (deprecated in favor of OutputLocation)
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
A custom command to run during deployment of the static content application.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The path to the app code within the repository.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The target branch in the repository.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
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 |
The credentials, account, tenant, and subscription used for communication with Azure.
| Type: | PSObject |
| Aliases: | AzureRMContext, AzureCredential |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Description of the newly generated repository.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Whether or not the newly generated repository is a private repository. Defaults to false (i.e. public).
| Type: | SwitchParameter |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Name of the newly generated repository.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Owner of the newly generated repository.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Github Action secret name override.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
| Type: | IWebsitesIdentity |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Kind of resource.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Name of the static site to create or update.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The output path of the app after building.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
A user's github repository token. This is used to setup the Github Actions workflow file and API secrets.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
URL for the repository of the static site.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Name of the resource group to which the resource belongs.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Skip Github Action workflow generation.
| Type: | SwitchParameter |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
State indicating whether staging environments are allowed or not allowed for a static web app.
| Type: | StagingEnvironmentPolicy |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).
| Type: | String |
| Position: | Named |
| Default value: | (Get-AzContext).Subscription.Id |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
URL of the template repository. The newly generated repository will be based on this one.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
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
Outputs
Notes
ALIASES
COMPLEX PARAMETER PROPERTIES
To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
INPUTOBJECT : Identity Parameter
[Authprovider <String>]: The auth provider for the users.[DomainName <String>]: The custom domain name.[EnvironmentName <String>]: The stage site identifier.[FunctionAppName <String>]: Name of the function app registered with the static site build.[Id <String>]: Resource identity path[Location <String>]: Location where you plan to create the static site.[Name <String>]: Name of the static site.[PrivateEndpointConnectionName <String>]: Name of the private endpoint connection.[ResourceGroupName <String>]: Name of the resource group to which the resource belongs.[SubscriptionId <String>]: Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).[Userid <String>]: The user id of the user.