編輯

共用方式為


Update-AzStaticWebApp

Description for Creates a new static site in an existing resource group, or updates an existing static site.

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>]
      [-WhatIf]
      [-Confirm]
      [<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>]
      [-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>.

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

-ApiBuildCommand

A custom command to run during deployment of the Azure Functions API application.

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

-ApiLocation

The path to the api code within the repository.

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

-AppArtifactLocation

Deprecated: The path of the app artifacts after building (deprecated in favor of OutputLocation)

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

-AppBuildCommand

A custom command to run during deployment of the static content application.

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

-AppLocation

The path to the app code within the repository.

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

-Branch

The target branch in the repository.

Type:String
Position:Named
Default value:None
Required:False
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
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.

Type:PSObject
Aliases:AzureRMContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ForkRepositoryDescription

Description of the newly generated repository.

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

-ForkRepositoryIsPrivate

Whether or not the newly generated repository is a private repository. Defaults to false (i.e. public).

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

-ForkRepositoryName

Name of the newly generated repository.

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

-ForkRepositoryOwner

Owner of the newly generated repository.

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

-GithubActionSecretNameOverride

Github Action secret name override.

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

-InputObject

Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table.

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

-Kind

Kind of resource.

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

-Name

Name of the static site to create or update.

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

-OutputLocation

The output path of the app after building.

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

-RepositoryToken

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
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-RepositoryUrl

URL for the repository of the static site.

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

-ResourceGroupName

Name of the resource group to which the resource belongs.

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

-SkipGithubActionWorkflowGeneration

Skip Github Action workflow generation.

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

-StagingEnvironmentPolicy

State indicating whether staging environments are allowed or not allowed for a static web app.

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

-SubscriptionId

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
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-TemplateRepositoryUrl

URL of the template repository. The newly generated repository will be based on this one.

Type:String
Position:Named
Default value:None
Required:False
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
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

IWebsitesIdentity

Outputs

IStaticSiteArmResource