Bearbeiten

Freigeben über


Update-AzFunctionApp

Updates a function app.

Syntax

Update-AzFunctionApp
      -ResourceGroupName <String>
      -Name <String>
      [-SubscriptionId <String>]
      [-PlanName <String>]
      [-Force]
      [-ApplicationInsightsName <String>]
      [-ApplicationInsightsKey <String>]
      [-Tag <Hashtable>]
      [-IdentityType <ManagedServiceIdentityType>]
      [-IdentityID <String[]>]
      [-DefaultProfile <PSObject>]
      [-NoWait]
      [-AsJob]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzFunctionApp
      [-PlanName <String>]
      [-Force]
      [-ApplicationInsightsName <String>]
      [-ApplicationInsightsKey <String>]
      [-Tag <Hashtable>]
      [-IdentityType <ManagedServiceIdentityType>]
      [-IdentityID <String[]>]
      -InputObject <ISite>
      [-DefaultProfile <PSObject>]
      [-NoWait]
      [-AsJob]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

Updates a function app.

Examples

Example 1: Update function app hosting plan.

Update-AzFunctionApp -Name MyUniqueFunctionAppName -ResourceGroupName MyResourceGroupName -PlanName NewPlanName -Force

This command updates function app hosting plan.

Example 2: Set a SystemAssigned managed identity for a function app.

Update-AzFunctionApp -Name MyUniqueFunctionAppName -ResourceGroupName MyResourceGroupName -IdentityType SystemAssigned -Force

This command sets a SystemAssigned managed identity for a function app.

Example 3: Update function app Application Insights.

Update-AzFunctionApp -Name MyUniqueFunctionAppName -ResourceGroupName MyResourceGroupName -ApplicationInsightsName ApplicationInsightsProjectName -Force

This command updates function app Application Insights.

Example 3: Remove managed identity from a function app.

Update-AzFunctionApp -Name MyUniqueFunctionAppName -ResourceGroupName MyResourceGroupName -IdentityType None -Force

This command removes a managed identity from a function app.

Parameters

-ApplicationInsightsKey

Instrumentation key of App Insights to be added.

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

-ApplicationInsightsName

Name of the existing App Insights project to be added to the function app.

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

-AsJob

Runs the cmdlet as a background job.

Type:SwitchParameter
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

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

-Force

Forces the cmdlet to update the function app without prompting for confirmation.

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

-IdentityID

Specifies the list of user identities associated with the function app. The user identity references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/identities/{identityName}'

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

-IdentityType

Specifies the type of identity used for the function app. The type 'None' will remove any identities from the function app. The acceptable values for this parameter are: - SystemAssigned - UserAssigned - None

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

-InputObject

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

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

-Name

The name of the function app.

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

-NoWait

Starts the operation and returns immediately, before the operation is completed. In order to determine if the operation has successfully been completed, use some other mechanism.

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

-PlanName

The name of the service plan.

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

-ResourceGroupName

The name of the resource group.

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

-SubscriptionId

The Azure subscription ID.

Type:String
Position:Named
Default value:(Get-AzContext).Subscription.Id
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Tag

Resource tags.

Type:Hashtable
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

ISite

Outputs

ISite