Düzenle

Aracılığıyla paylaş


Update-AzContainerApp

Patches a Container App using JSON Merge Patch

Syntax

Update-AzContainerApp
      -Name <String>
      -ResourceGroupName <String>
      [-SubscriptionId <String>]
      [-Configuration <IConfiguration>]
      [-ExtendedLocationName <String>]
      [-ExtendedLocationType <String>]
      [-EnableSystemAssignedIdentity <Boolean>]
      [-ManagedBy <String>]
      [-ScaleMaxReplica <Int32>]
      [-ScaleMinReplica <Int32>]
      [-ScaleRule <IScaleRule[]>]
      [-Tag <Hashtable>]
      [-TemplateContainer <IContainer[]>]
      [-TemplateInitContainer <IInitContainer[]>]
      [-TemplateRevisionSuffix <String>]
      [-TemplateServiceBind <IServiceBind[]>]
      [-TemplateTerminationGracePeriodSecond <Int64>]
      [-TemplateVolume <IVolume[]>]
      [-UserAssignedIdentity <String[]>]
      [-WorkloadProfileName <String>]
      [-DefaultProfile <PSObject>]
      [-AsJob]
      [-NoWait]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzContainerApp
      -Name <String>
      -ResourceGroupName <String>
      [-SubscriptionId <String>]
      -JsonFilePath <String>
      [-DefaultProfile <PSObject>]
      [-AsJob]
      [-NoWait]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzContainerApp
      -Name <String>
      -ResourceGroupName <String>
      [-SubscriptionId <String>]
      -JsonString <String>
      [-DefaultProfile <PSObject>]
      [-AsJob]
      [-NoWait]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzContainerApp
      -InputObject <IAppIdentity>
      [-Configuration <IConfiguration>]
      [-ExtendedLocationName <String>]
      [-ExtendedLocationType <String>]
      [-EnableSystemAssignedIdentity <Boolean>]
      [-ManagedBy <String>]
      [-ScaleMaxReplica <Int32>]
      [-ScaleMinReplica <Int32>]
      [-ScaleRule <IScaleRule[]>]
      [-Tag <Hashtable>]
      [-TemplateContainer <IContainer[]>]
      [-TemplateInitContainer <IInitContainer[]>]
      [-TemplateRevisionSuffix <String>]
      [-TemplateServiceBind <IServiceBind[]>]
      [-TemplateTerminationGracePeriodSecond <Int64>]
      [-TemplateVolume <IVolume[]>]
      [-UserAssignedIdentity <String[]>]
      [-WorkloadProfileName <String>]
      [-DefaultProfile <PSObject>]
      [-AsJob]
      [-NoWait]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

Patches a Container App using JSON Merge Patch

Examples

Example 1: Update container app.

$newSecretObject = New-AzContainerAppSecretObject -Name "yourkey" -Value "yourvalue"
$configuration = New-AzContainerAppConfigurationObject -DaprEnabled:$True -DaprAppPort 3000 -DaprAppProtocol "http" -DaprHttpReadBufferSize 30 -DaprHttpMaxRequestSize 10 -DaprLogLevel "debug" -DaprEnableApiLogging:$True -MaxInactiveRevision 10 -ServiceType "redis" -Secret $newSecretObject 

Update-AzContainerApp -ContainerAppName azps-containerapp-1 -ResourceGroupName azps_test_group_app -Configuration $configuration -Tag @{"123"="abc"}

Location Name                ResourceGroupName
-------- ----                -----------------
East US  azps-containerapp-1 azps_test_group_app

Update container app.

Example 2: Update container app.

$secretObject = Get-AzContainerAppSecret -ContainerAppName azps-containerapp-1 -ResourceGroupName azps_test_group_app
$newSecretObject1 = New-AzContainerAppSecretObject -Name "yourkey" -Value "yourvalue"
$newSecretObject2 = New-AzContainerAppSecretObject -Name $secretObject.Name -Value $secretObject.Value -Identity $secretObject.Identity -KeyVaultUrl $secretObject.KeyVaultUrl
$configuration = New-AzContainerAppConfigurationObject -DaprEnabled:$True -DaprAppPort 3000 -DaprAppProtocol "http" -DaprHttpReadBufferSize 30 -DaprHttpMaxRequestSize 10 -DaprLogLevel "debug" -DaprEnableApiLogging:$True -MaxInactiveRevision 10 -ServiceType "redis" -Secret $newSecretObject1,$newSecretObject2

Update-AzContainerApp -ContainerAppName azps-containerapp-1 -ResourceGroupName azps_test_group_app -Configuration $configuration -Tag @{"123"="abc"}

Location Name                ResourceGroupName
-------- ----                -----------------
East US  azps-containerapp-1 azps_test_group_app

Update container app.

Parameters

-AsJob

Run the command as a job

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

-Configuration

Non versioned Container App configuration properties.

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

-EnableSystemAssignedIdentity

Determines whether to enable a system-assigned identity for the resource.

Type:Nullable<T>[Boolean]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ExtendedLocationName

The name of the extended location.

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

-ExtendedLocationType

The type of the extended location.

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

-InputObject

Identity Parameter

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

-JsonFilePath

Path of Json file supplied to the Update operation

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

-JsonString

Json string supplied to the Update operation

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

-ManagedBy

The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment will not delete the resource if it is removed from the template since it is managed by another resource.

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

-Name

Name of the Container App.

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

-NoWait

Run the command asynchronously

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

-ResourceGroupName

The name of the resource group. The name is case insensitive.

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

-ScaleMaxReplica

Optional. Maximum number of container replicas. Defaults to 10 if not set.

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

-ScaleMinReplica

Optional. Minimum number of container replicas.

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

-ScaleRule

Scaling rules.

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

-SubscriptionId

The ID of the target subscription.

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

-TemplateContainer

List of container definitions for the Container App.

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

-TemplateInitContainer

List of specialized containers that run before app containers.

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

-TemplateRevisionSuffix

User friendly suffix that is appended to the revision name

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

-TemplateServiceBind

List of container app services bound to the app

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

-TemplateTerminationGracePeriodSecond

Optional duration in seconds the Container App Instance needs to terminate gracefully. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). If this value is nil, the default grace period will be used instead. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds.

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

-TemplateVolume

List of volume definitions for the Container App.

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

-UserAssignedIdentity

The array of user assigned identities associated with the resource. The elements in array will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.'

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

-WorkloadProfileName

Workload profile name to pin for container app execution.

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

Inputs

IAppIdentity

Outputs

IContainerApp