external help file | Module Name | ms.assetid | online version | schema |
---|---|---|---|---|
Microsoft.Azure.PowerShell.Cmdlets.ResourceManager.dll-Help.xml |
Az.Resources |
0143CE35-3B1D-4829-B880-A5CA25B83883 |
2.0.0 |
Validates a resource group deployment.
Test-AzResourceGroupDeployment -ResourceGroupName <String> [-Mode <DeploymentMode>] [-RollbackToLastDeployment]
[-RollBackDeploymentName <String>] [-QueryString <String>] -TemplateFile <String>
[-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile <IAzureContextContainer>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
Test-AzResourceGroupDeployment -ResourceGroupName <String> [-Mode <DeploymentMode>] [-RollbackToLastDeployment]
[-RollBackDeploymentName <String>] [-QueryString <String>] -TemplateParameterObject <Hashtable>
-TemplateObject <Hashtable> [-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile <IAzureContextContainer>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
Test-AzResourceGroupDeployment -ResourceGroupName <String> [-Mode <DeploymentMode>] [-RollbackToLastDeployment]
[-RollBackDeploymentName <String>] [-QueryString <String>] -TemplateParameterObject <Hashtable>
-TemplateFile <String> [-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile <IAzureContextContainer>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
Test-AzResourceGroupDeployment -ResourceGroupName <String> [-Mode <DeploymentMode>] [-RollbackToLastDeployment]
[-RollBackDeploymentName <String>] [-QueryString <String>] -TemplateParameterObject <Hashtable>
-TemplateUri <String> [-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile <IAzureContextContainer>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
Test-AzResourceGroupDeployment -ResourceGroupName <String> [-Mode <DeploymentMode>] [-RollbackToLastDeployment]
[-RollBackDeploymentName <String>] [-QueryString <String>] -TemplateParameterObject <Hashtable>
-TemplateSpecId <String> [-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile <IAzureContextContainer>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
Test-AzResourceGroupDeployment -ResourceGroupName <String> [-Mode <DeploymentMode>] [-RollbackToLastDeployment]
[-RollBackDeploymentName <String>] [-QueryString <String>] -TemplateParameterFile <String>
-TemplateObject <Hashtable> [-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile <IAzureContextContainer>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
Test-AzResourceGroupDeployment -ResourceGroupName <String> [-Mode <DeploymentMode>] [-RollbackToLastDeployment]
[-RollBackDeploymentName <String>] [-QueryString <String>] -TemplateParameterFile <String>
-TemplateFile <String> [-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile <IAzureContextContainer>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
Test-AzResourceGroupDeployment -ResourceGroupName <String> [-Mode <DeploymentMode>] [-RollbackToLastDeployment]
[-RollBackDeploymentName <String>] [-QueryString <String>] -TemplateParameterFile <String>
-TemplateUri <String> [-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile <IAzureContextContainer>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
Test-AzResourceGroupDeployment -ResourceGroupName <String> [-Mode <DeploymentMode>] [-RollbackToLastDeployment]
[-RollBackDeploymentName <String>] [-QueryString <String>] -TemplateParameterFile <String>
-TemplateSpecId <String> [-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile <IAzureContextContainer>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
Test-AzResourceGroupDeployment -ResourceGroupName <String> [-Mode <DeploymentMode>] [-RollbackToLastDeployment]
[-RollBackDeploymentName <String>] [-QueryString <String>] -TemplateParameterFile <String>
[-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile <IAzureContextContainer>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
Test-AzResourceGroupDeployment -ResourceGroupName <String> [-Mode <DeploymentMode>] [-RollbackToLastDeployment]
[-RollBackDeploymentName <String>] [-QueryString <String>] -TemplateParameterUri <String>
-TemplateObject <Hashtable> [-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile <IAzureContextContainer>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
Test-AzResourceGroupDeployment -ResourceGroupName <String> [-Mode <DeploymentMode>] [-RollbackToLastDeployment]
[-RollBackDeploymentName <String>] [-QueryString <String>] -TemplateParameterUri <String>
-TemplateFile <String> [-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile <IAzureContextContainer>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
Test-AzResourceGroupDeployment -ResourceGroupName <String> [-Mode <DeploymentMode>] [-RollbackToLastDeployment]
[-RollBackDeploymentName <String>] [-QueryString <String>] -TemplateParameterUri <String>
-TemplateUri <String> [-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile <IAzureContextContainer>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
Test-AzResourceGroupDeployment -ResourceGroupName <String> [-Mode <DeploymentMode>] [-RollbackToLastDeployment]
[-RollBackDeploymentName <String>] [-QueryString <String>] -TemplateParameterUri <String>
-TemplateSpecId <String> [-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile <IAzureContextContainer>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
Test-AzResourceGroupDeployment -ResourceGroupName <String> [-Mode <DeploymentMode>] [-RollbackToLastDeployment]
[-RollBackDeploymentName <String>] [-QueryString <String>] -TemplateObject <Hashtable>
[-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile <IAzureContextContainer>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
Test-AzResourceGroupDeployment -ResourceGroupName <String> [-Mode <DeploymentMode>] [-RollbackToLastDeployment]
[-RollBackDeploymentName <String>] [-QueryString <String>] -TemplateUri <String>
[-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile <IAzureContextContainer>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
Test-AzResourceGroupDeployment -ResourceGroupName <String> [-Mode <DeploymentMode>] [-RollbackToLastDeployment]
[-RollBackDeploymentName <String>] [-QueryString <String>] -TemplateSpecId <String>
[-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile <IAzureContextContainer>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
The Test-AzResourceGroupDeployment cmdlet determines whether an Azure resource group deployment template and its parameter values are valid.
$TemplateFileText = [System.IO.File]::ReadAllText("D:\Azure\Templates\EngineeringSite.json")
$TemplateObject = ConvertFrom-Json $TemplateFileText -AsHashtable
Test-AzResourceGroupDeployment -ResourceGroupName "ContosoEngineering" -TemplateObject $TemplateObject -TemplateParameterFile "D:\Azure\Templates\EngSiteParams.json"
This command tests a deployment in the given resource group using the an in-memory hashtable created from the given template file and a parameter file.
Test-AzResourceGroupDeployment -ResourceGroupName testRG01 -TemplateFile "D:\Azure\Templates\sampleDeploymentTemplate.json" -TemplateParameterFile "D:\Azure\Templates\sampleDeploymentTemplateParams.json"
This command tests a deployment in the given resource group and resource using the provided template file and a parameter file.
Test-AzResourceGroupDeployment -ResourceGroupName "myRG1" -TemplateParameterFile "./parameters.bicepparam"
This command validates the deployment at the resource group scope by using a .bicepparam file on disk. The command uses the TemplateParameterFile parameter to specify a .bicepparam file.
The credentials, account, tenant, and subscription used for communication with azure
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Parameter Sets: (All)
Aliases: AzContext, AzureRmContext, AzureCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the deployment mode. The acceptable values for this parameter are:
- Incremental
- Complete
Type: Microsoft.Azure.Management.Resources.Models.DeploymentMode
Parameter Sets: (All)
Aliases:
Accepted values: Incremental, Complete
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Indicates that this cmdlet considers pre-release API versions when it automatically determines which version to use.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
{{ Fill ProgressAction Description }}
Type: System.Management.Automation.ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The query string (for example, a SAS token) to be used with the TemplateUri parameter. Would be used in case of linked templates
Type: System.String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the name of the resource group to test.
Type: System.String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Rollback to the successful deployment with the given name in the resource group, should not be used if -RollbackToLastDeployment is used.
Type: System.String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Rollback to the last successful deployment in the resource group, should not be present if -RollBackDeploymentName is used.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
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: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the full path of a template file. Supported template file type: json and bicep.
Type: System.String
Parameter Sets: ByTemplateFileWithNoParameters, ByTemplateFileAndParameterObject, ByTemplateFileAndParameterFile, ByTemplateFileAndParameterUri
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
A hash table which represents the template.
Type: System.Collections.Hashtable
Parameter Sets: ByTemplateObjectAndParameterObject, ByTemplateObjectAndParameterFile, ByTemplateObjectAndParameterUri, ByTemplateObjectWithNoParameters
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Specifies the full path of a JSON file that contains the names and values of the template parameters.
Type: System.String
Parameter Sets: ByTemplateObjectAndParameterFile, ByTemplateFileAndParameterFile, ByTemplateUriAndParameterFile, ByTemplateSpecResourceIdAndParams, ByParameterFileWithNoTemplate
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Specifies a hash table of template parameter names and values.
Type: System.Collections.Hashtable
Parameter Sets: ByTemplateObjectAndParameterObject, ByTemplateFileAndParameterObject, ByTemplateUriAndParameterObject, ByTemplateSpecResourceIdAndParamsObject
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Specifies the URI of a template parameters file.
Type: System.String
Parameter Sets: ByTemplateObjectAndParameterUri, ByTemplateFileAndParameterUri, ByTemplateUriAndParameterUri, ByTemplateSpecResourceIdAndParamsUri
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Resource ID of the templateSpec to be deployed.
Type: System.String
Parameter Sets: ByTemplateSpecResourceIdAndParamsObject, ByTemplateSpecResourceIdAndParams, ByTemplateSpecResourceIdAndParamsUri, ByTemplateSpecResourceId
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Specifies the URI of a template file.
Type: System.String
Parameter Sets: ByTemplateUriAndParameterObject, ByTemplateUriAndParameterFile, ByTemplateUriAndParameterUri, ByTemplateUriWithNoParameters
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.