Upravit

Sdílet prostřednictvím


Test-AzResourceGroupDeploymentStack

Validates a resource group scoped deployment stack.

Syntax

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

Description

Validates a resource group scoped deployment stack.

Examples

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

Test-AzResourceGroupDeploymentStack -Name MyRGStack -ResourceGroupName MyResourceGroup -TemplateFile myTemplate.json -DenySettingsMode DenyDelete -ActionOnUnmanage DetachAll

Validates a resource group scoped deployment stack named 'MyRGStack' in resource group 'MyResourceGroup,' with deny settings being DenyDelete and ActionOnUnmanage DetachAll.

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).

Type:PSActionOnUnmanage
Accepted values:DetachAll, DeleteResources, DeleteAll
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-AsJob

Run cmdlet in the background.

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

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

The credentials, account, tenant, and subscription used for communication with Azure.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DenySettingsApplyToChildScopes

Apply to child scopes.

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

-DenySettingsExcludedAction

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

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

-DenySettingsExcludedPrincipal

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

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

-DenySettingsMode

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

Type:PSDenySettingsMode
Accepted values:None, DenyDelete, DenyWriteAndDelete
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Description

Description for the stack.

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

-Force

Do not ask for confirmation when overwriting an existing stack.

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

-Name

The name of the DeploymentStack to create.

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

-PassThru

If set, a boolean will be returned with value dependent on cmdlet success.

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

-Pre

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

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

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

-ResourceGroupName

The name of the ResourceGroup to be used.

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

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

-Tag

The tags to put on the deployment.

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

-TemplateFile

TemplateFile to be used to create the stack.

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

-TemplateParameterFile

Parameter file to use for the template.

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

-TemplateParameterObject

A hash table which represents the parameters.

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

-TemplateParameterUri

Location of the Parameter file to use for the template.

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

-TemplateSpecId

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

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

-TemplateUri

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

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

String

Hashtable

Outputs

Boolean