Edit

Share via


Set-AzResourceGroupDeploymentStack

Sets a new Resource Group scoped Deployment Stack.

Syntax

ByTemplateFileWithNoParameters (Default)

Set-AzResourceGroupDeploymentStack
    [-Name] <String>
    [-ResourceGroupName] <String>
    -ActionOnUnmanage <PSActionOnUnmanage>
    -DenySettingsMode <PSDenySettingsMode>
    -TemplateFile <String>
    [-Description <String>]
    [-DenySettingsExcludedPrincipal <String[]>]
    [-DenySettingsExcludedAction <String[]>]
    [-DenySettingsApplyToChildScopes]
    [-Tag <Hashtable>]
    [-Force]
    [-AsJob]
    [-BypassStackOutOfSyncError]
    [-SkipTemplateParameterPrompt]
    [-QueryString <String>]
    [-Pre]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ByTemplateFileWithParameterFile

Set-AzResourceGroupDeploymentStack
    [-Name] <String>
    [-ResourceGroupName] <String>
    -ActionOnUnmanage <PSActionOnUnmanage>
    -DenySettingsMode <PSDenySettingsMode>
    -TemplateFile <String>
    -TemplateParameterFile <String>
    [-Description <String>]
    [-DenySettingsExcludedPrincipal <String[]>]
    [-DenySettingsExcludedAction <String[]>]
    [-DenySettingsApplyToChildScopes]
    [-Tag <Hashtable>]
    [-Force]
    [-AsJob]
    [-BypassStackOutOfSyncError]
    [-SkipTemplateParameterPrompt]
    [-QueryString <String>]
    [-Pre]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ByTemplateFileWithParameterUri

Set-AzResourceGroupDeploymentStack
    [-Name] <String>
    [-ResourceGroupName] <String>
    -ActionOnUnmanage <PSActionOnUnmanage>
    -DenySettingsMode <PSDenySettingsMode>
    -TemplateFile <String>
    -TemplateParameterUri <String>
    [-Description <String>]
    [-DenySettingsExcludedPrincipal <String[]>]
    [-DenySettingsExcludedAction <String[]>]
    [-DenySettingsApplyToChildScopes]
    [-Tag <Hashtable>]
    [-Force]
    [-AsJob]
    [-BypassStackOutOfSyncError]
    [-SkipTemplateParameterPrompt]
    [-QueryString <String>]
    [-Pre]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ByTemplateFileWithParameterObject

Set-AzResourceGroupDeploymentStack
    [-Name] <String>
    [-ResourceGroupName] <String>
    -ActionOnUnmanage <PSActionOnUnmanage>
    -DenySettingsMode <PSDenySettingsMode>
    -TemplateFile <String>
    -TemplateParameterObject <Hashtable>
    [-Description <String>]
    [-DenySettingsExcludedPrincipal <String[]>]
    [-DenySettingsExcludedAction <String[]>]
    [-DenySettingsApplyToChildScopes]
    [-Tag <Hashtable>]
    [-Force]
    [-AsJob]
    [-BypassStackOutOfSyncError]
    [-SkipTemplateParameterPrompt]
    [-QueryString <String>]
    [-Pre]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ByTemplateUriWithParameterFile

Set-AzResourceGroupDeploymentStack
    [-Name] <String>
    [-ResourceGroupName] <String>
    -ActionOnUnmanage <PSActionOnUnmanage>
    -DenySettingsMode <PSDenySettingsMode>
    -TemplateUri <String>
    -TemplateParameterFile <String>
    [-Description <String>]
    [-DenySettingsExcludedPrincipal <String[]>]
    [-DenySettingsExcludedAction <String[]>]
    [-DenySettingsApplyToChildScopes]
    [-Tag <Hashtable>]
    [-Force]
    [-AsJob]
    [-BypassStackOutOfSyncError]
    [-SkipTemplateParameterPrompt]
    [-QueryString <String>]
    [-Pre]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ByTemplateUriWithParameterUri

Set-AzResourceGroupDeploymentStack
    [-Name] <String>
    [-ResourceGroupName] <String>
    -ActionOnUnmanage <PSActionOnUnmanage>
    -DenySettingsMode <PSDenySettingsMode>
    -TemplateUri <String>
    -TemplateParameterUri <String>
    [-Description <String>]
    [-DenySettingsExcludedPrincipal <String[]>]
    [-DenySettingsExcludedAction <String[]>]
    [-DenySettingsApplyToChildScopes]
    [-Tag <Hashtable>]
    [-Force]
    [-AsJob]
    [-BypassStackOutOfSyncError]
    [-SkipTemplateParameterPrompt]
    [-QueryString <String>]
    [-Pre]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ByTemplateUriWithParameterObject

Set-AzResourceGroupDeploymentStack
    [-Name] <String>
    [-ResourceGroupName] <String>
    -ActionOnUnmanage <PSActionOnUnmanage>
    -DenySettingsMode <PSDenySettingsMode>
    -TemplateUri <String>
    -TemplateParameterObject <Hashtable>
    [-Description <String>]
    [-DenySettingsExcludedPrincipal <String[]>]
    [-DenySettingsExcludedAction <String[]>]
    [-DenySettingsApplyToChildScopes]
    [-Tag <Hashtable>]
    [-Force]
    [-AsJob]
    [-BypassStackOutOfSyncError]
    [-SkipTemplateParameterPrompt]
    [-QueryString <String>]
    [-Pre]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ByTemplateUriWithNoParameters

Set-AzResourceGroupDeploymentStack
    [-Name] <String>
    [-ResourceGroupName] <String>
    -ActionOnUnmanage <PSActionOnUnmanage>
    -DenySettingsMode <PSDenySettingsMode>
    -TemplateUri <String>
    [-Description <String>]
    [-DenySettingsExcludedPrincipal <String[]>]
    [-DenySettingsExcludedAction <String[]>]
    [-DenySettingsApplyToChildScopes]
    [-Tag <Hashtable>]
    [-Force]
    [-AsJob]
    [-BypassStackOutOfSyncError]
    [-SkipTemplateParameterPrompt]
    [-QueryString <String>]
    [-Pre]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ByTemplateSpecWithParameterFile

Set-AzResourceGroupDeploymentStack
    [-Name] <String>
    [-ResourceGroupName] <String>
    -ActionOnUnmanage <PSActionOnUnmanage>
    -DenySettingsMode <PSDenySettingsMode>
    -TemplateSpecId <String>
    -TemplateParameterFile <String>
    [-Description <String>]
    [-DenySettingsExcludedPrincipal <String[]>]
    [-DenySettingsExcludedAction <String[]>]
    [-DenySettingsApplyToChildScopes]
    [-Tag <Hashtable>]
    [-Force]
    [-AsJob]
    [-BypassStackOutOfSyncError]
    [-SkipTemplateParameterPrompt]
    [-QueryString <String>]
    [-Pre]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ByTemplateSpecWithParameterUri

Set-AzResourceGroupDeploymentStack
    [-Name] <String>
    [-ResourceGroupName] <String>
    -ActionOnUnmanage <PSActionOnUnmanage>
    -DenySettingsMode <PSDenySettingsMode>
    -TemplateSpecId <String>
    -TemplateParameterUri <String>
    [-Description <String>]
    [-DenySettingsExcludedPrincipal <String[]>]
    [-DenySettingsExcludedAction <String[]>]
    [-DenySettingsApplyToChildScopes]
    [-Tag <Hashtable>]
    [-Force]
    [-AsJob]
    [-BypassStackOutOfSyncError]
    [-SkipTemplateParameterPrompt]
    [-QueryString <String>]
    [-Pre]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ByTemplateSpecWithParameterObject

Set-AzResourceGroupDeploymentStack
    [-Name] <String>
    [-ResourceGroupName] <String>
    -ActionOnUnmanage <PSActionOnUnmanage>
    -DenySettingsMode <PSDenySettingsMode>
    -TemplateSpecId <String>
    -TemplateParameterObject <Hashtable>
    [-Description <String>]
    [-DenySettingsExcludedPrincipal <String[]>]
    [-DenySettingsExcludedAction <String[]>]
    [-DenySettingsApplyToChildScopes]
    [-Tag <Hashtable>]
    [-Force]
    [-AsJob]
    [-BypassStackOutOfSyncError]
    [-SkipTemplateParameterPrompt]
    [-QueryString <String>]
    [-Pre]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ByTemplateSpecWithNoParameters

Set-AzResourceGroupDeploymentStack
    [-Name] <String>
    [-ResourceGroupName] <String>
    -ActionOnUnmanage <PSActionOnUnmanage>
    -DenySettingsMode <PSDenySettingsMode>
    -TemplateSpecId <String>
    [-Description <String>]
    [-DenySettingsExcludedPrincipal <String[]>]
    [-DenySettingsExcludedAction <String[]>]
    [-DenySettingsApplyToChildScopes]
    [-Tag <Hashtable>]
    [-Force]
    [-AsJob]
    [-BypassStackOutOfSyncError]
    [-SkipTemplateParameterPrompt]
    [-QueryString <String>]
    [-Pre]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ByParameterFileWithNoTemplate

Set-AzResourceGroupDeploymentStack
    [-Name] <String>
    [-ResourceGroupName] <String>
    -ActionOnUnmanage <PSActionOnUnmanage>
    -DenySettingsMode <PSDenySettingsMode>
    -TemplateParameterFile <String>
    [-Description <String>]
    [-DenySettingsExcludedPrincipal <String[]>]
    [-DenySettingsExcludedAction <String[]>]
    [-DenySettingsApplyToChildScopes]
    [-Tag <Hashtable>]
    [-Force]
    [-AsJob]
    [-BypassStackOutOfSyncError]
    [-SkipTemplateParameterPrompt]
    [-QueryString <String>]
    [-Pre]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

Update a resource group scoped deployment stack.

Examples

Example 1: Update the stack MyRGStack in the Resource Group MyResourceGroup

Set-AzResourceGroupDeploymentStack -Name MyRGStack -ResourceGroupName MyResourceGroup -TemplateFile myTemplate.json -DenySettingsMode DenyDelete

Update a resource group scoped deployment stack named 'MyRGStack' in management group 'MyResourceGroup,' with deny settings being DenyDelete.

Example 2: Use a .bicepparam file to create a stack

Set-AzResourceGroupDeploymentStack -Name MyRGStack -ResourceGroupName MyResourceGroup -DenySettingsMode DenyDelete -TemplateParameterFile "./parameters.bicepparam"

This command updates a stack at the resource group scope by using a .bicepparam file on disk.

Parameters

-ActionOnUnmanage

Action to take on resources that become unmanaged on deletion or update of the deployment stack. Possible values include: 'detachAll' (do not delete any unmanaged resources), 'deleteResources' (delete all unmanaged resources that are not RGs or MGs), and 'deleteAll' (delete every unmanaged resource).

Parameter properties

Type:PSActionOnUnmanage
Default value:None
Accepted values:DetachAll, DeleteResources, DeleteAll
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-AsJob

Run cmdlet in the background.

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

-BypassStackOutOfSyncError

Bypass errors for the stack being out of sync when running the operation. If the stack is out of sync and this parameter is not set, the operation will fail. Only include this parameter if instructed to do so on a failed stack operation.

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

-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 credentials, account, tenant, and subscription used for communication with Azure.

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, 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

-DenySettingsApplyToChildScopes

Apply to child scopes.

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

-DenySettingsExcludedAction

List of role-based management operations that are excluded from the denySettings. Up to 200 actions are permitted.

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

-DenySettingsExcludedPrincipal

List of AAD principal IDs excluded from the lock. Up to 5 principals are permitted.

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

-DenySettingsMode

Mode for DenySettings. Possible values include: 'denyDelete', 'denyWriteAndDelete', and 'none'.

Parameter properties

Type:PSDenySettingsMode
Default value:None
Accepted values:None, DenyDelete, DenyWriteAndDelete
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Description

Description for the stack

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:True
Value from remaining arguments:False

-Force

Do not ask for confirmation when overwriting an existing stack.

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

-Name

The name of the deploymentStack to create.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:StackName

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-Pre

When set, indicates that the cmdlet should use pre-release API versions when automatically determining which version to use.

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

-QueryString

The query string (for example, a SAS token) to be used with the TemplateUri parameter. Would be used in case of linked templates

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

The name of the ResourceGroup to be used.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-SkipTemplateParameterPrompt

Skips the PowerShell dynamic parameter processing that checks if the provided template parameter contains all necessary parameters used by the template. This check would prompt the user to provide a value for the missing parameters, but providing the -SkipTemplateParameterPrompt will ignore this prompt and error out immediately if a parameter was found not to be bound in the template. For non-interactive scripts, -SkipTemplateParameterPrompt can be provided to provide a better error message in the case where not all required parameters are satisfied.

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

-Tag

The tags to put on the deployment.

Parameter properties

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

-TemplateFile

TemplateFile to be used to create the stack.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByTemplateFileWithNoParameters
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False
ByTemplateFileWithParameterFile
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False
ByTemplateFileWithParameterUri
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False
ByTemplateFileWithParameterObject
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-TemplateParameterFile

Parameter file to use for the template.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByTemplateFileWithParameterFile
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False
ByTemplateUriWithParameterFile
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False
ByTemplateSpecWithParameterFile
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False
ByParameterFileWithNoTemplate
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-TemplateParameterObject

A hash table which represents the parameters.

Parameter properties

Type:Hashtable
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByTemplateFileWithParameterObject
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False
ByTemplateUriWithParameterObject
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False
ByTemplateSpecWithParameterObject
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-TemplateParameterUri

Location of the Parameter file to use for the template.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByTemplateFileWithParameterUri
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False
ByTemplateUriWithParameterUri
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False
ByTemplateSpecWithParameterUri
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-TemplateSpecId

ResourceId of the TemplateSpec to be used to create the stack.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByTemplateSpecWithParameterFile
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False
ByTemplateSpecWithParameterUri
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False
ByTemplateSpecWithParameterObject
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False
ByTemplateSpecWithNoParameters
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-TemplateUri

Location of the Template to be used to create the stack.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByTemplateUriWithParameterFile
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False
ByTemplateUriWithParameterUri
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False
ByTemplateUriWithParameterObject
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False
ByTemplateUriWithNoParameters
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
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.

Inputs

String

Hashtable

Outputs

PSDeploymentStack