Get-AzResourceGroupDeploymentWhatIfResult

Gets an ARM template What-If result for a deployment at resource group scope.

Syntax

Get-AzResourceGroupDeploymentWhatIfResult
   [-Name <String>]
   -ResourceGroupName <String>
   [-Mode <DeploymentMode>]
   [-ResultFormat <WhatIfResultFormat>]
   [-ExcludeChangeType <String[]>]
   -TemplateFile <String>
   [-SkipTemplateParameterPrompt]
   [-ApiVersion <String>]
   [-Pre]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzResourceGroupDeploymentWhatIfResult
   [-Name <String>]
   -ResourceGroupName <String>
   [-Mode <DeploymentMode>]
   [-ResultFormat <WhatIfResultFormat>]
   [-ExcludeChangeType <String[]>]
   -TemplateParameterObject <Hashtable>
   -TemplateObject <Hashtable>
   [-SkipTemplateParameterPrompt]
   [-ApiVersion <String>]
   [-Pre]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzResourceGroupDeploymentWhatIfResult
   [-Name <String>]
   -ResourceGroupName <String>
   [-Mode <DeploymentMode>]
   [-ResultFormat <WhatIfResultFormat>]
   [-ExcludeChangeType <String[]>]
   -TemplateParameterObject <Hashtable>
   -TemplateFile <String>
   [-SkipTemplateParameterPrompt]
   [-ApiVersion <String>]
   [-Pre]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzResourceGroupDeploymentWhatIfResult
   [-Name <String>]
   -ResourceGroupName <String>
   [-Mode <DeploymentMode>]
   [-ResultFormat <WhatIfResultFormat>]
   [-ExcludeChangeType <String[]>]
   -TemplateParameterObject <Hashtable>
   -TemplateUri <String>
   [-SkipTemplateParameterPrompt]
   [-ApiVersion <String>]
   [-Pre]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzResourceGroupDeploymentWhatIfResult
   [-Name <String>]
   -ResourceGroupName <String>
   [-Mode <DeploymentMode>]
   [-ResultFormat <WhatIfResultFormat>]
   [-ExcludeChangeType <String[]>]
   -TemplateParameterFile <String>
   -TemplateObject <Hashtable>
   [-SkipTemplateParameterPrompt]
   [-ApiVersion <String>]
   [-Pre]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzResourceGroupDeploymentWhatIfResult
   [-Name <String>]
   -ResourceGroupName <String>
   [-Mode <DeploymentMode>]
   [-ResultFormat <WhatIfResultFormat>]
   [-ExcludeChangeType <String[]>]
   -TemplateParameterFile <String>
   -TemplateFile <String>
   [-SkipTemplateParameterPrompt]
   [-ApiVersion <String>]
   [-Pre]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzResourceGroupDeploymentWhatIfResult
   [-Name <String>]
   -ResourceGroupName <String>
   [-Mode <DeploymentMode>]
   [-ResultFormat <WhatIfResultFormat>]
   [-ExcludeChangeType <String[]>]
   -TemplateParameterFile <String>
   -TemplateUri <String>
   [-SkipTemplateParameterPrompt]
   [-ApiVersion <String>]
   [-Pre]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzResourceGroupDeploymentWhatIfResult
   [-Name <String>]
   -ResourceGroupName <String>
   [-Mode <DeploymentMode>]
   [-ResultFormat <WhatIfResultFormat>]
   [-ExcludeChangeType <String[]>]
   -TemplateParameterUri <String>
   -TemplateObject <Hashtable>
   [-SkipTemplateParameterPrompt]
   [-ApiVersion <String>]
   [-Pre]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzResourceGroupDeploymentWhatIfResult
   [-Name <String>]
   -ResourceGroupName <String>
   [-Mode <DeploymentMode>]
   [-ResultFormat <WhatIfResultFormat>]
   [-ExcludeChangeType <String[]>]
   -TemplateParameterUri <String>
   -TemplateFile <String>
   [-SkipTemplateParameterPrompt]
   [-ApiVersion <String>]
   [-Pre]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzResourceGroupDeploymentWhatIfResult
   [-Name <String>]
   -ResourceGroupName <String>
   [-Mode <DeploymentMode>]
   [-ResultFormat <WhatIfResultFormat>]
   [-ExcludeChangeType <String[]>]
   -TemplateParameterUri <String>
   -TemplateUri <String>
   [-SkipTemplateParameterPrompt]
   [-ApiVersion <String>]
   [-Pre]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzResourceGroupDeploymentWhatIfResult
   [-Name <String>]
   -ResourceGroupName <String>
   [-Mode <DeploymentMode>]
   [-ResultFormat <WhatIfResultFormat>]
   [-ExcludeChangeType <String[]>]
   -TemplateObject <Hashtable>
   [-SkipTemplateParameterPrompt]
   [-ApiVersion <String>]
   [-Pre]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzResourceGroupDeploymentWhatIfResult
   [-Name <String>]
   -ResourceGroupName <String>
   [-Mode <DeploymentMode>]
   [-ResultFormat <WhatIfResultFormat>]
   [-ExcludeChangeType <String[]>]
   -TemplateUri <String>
   [-SkipTemplateParameterPrompt]
   [-ApiVersion <String>]
   [-Pre]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

The Get-AzResourceGroupDeploymentWhatIfResult cmdlet gets the ARM template What-If result for a template deployment at the specified resource group scope. It returns a list of changes indicating what resources will be updated if the deployment is applied without making any changes to real resources. To specify the format for the returning result, use the ResultFormat parameter.

Examples

Example 1: Get a What-If result at resource group scope

PS C:\> Get-AzResourceGroupDeploymentWhatIfResult `
    -DeploymentName "deploy-01" `
    -ResourceGroupName "myRG1" `
    -TemplateFile "D:\Azure\Templates\ServiceTemplate.json" `
    -TemplateParameterFile "D:\Azure\Templates\ServiceParameters.json" `
    -ResultFormat "FullResourcePayloads"

This command gets a What-If result at the specified resource group scope by using a custom template file and a parameter file on disk. The command uses the ResourceGroupName parameter to specify a resource group where the template will be deployed. The command uses the TemplateFile parameter to specify a template file. The command uses the TemplateParameterFile parameter to specify a template parameter file. The command uses the ResultFormat parameter to set the What-If result to include full resource payloads.

Example 2: Get a What-If result at resource group scope with ResourceIdOnly

PS C:\> Get-AzResourceGroupDeploymentWhatIfResult `
    -DeploymentName "deploy-01" `
    -ResourceGroupName "myRG1" `
    -TemplateFile "D:\Azure\Templates\ServiceTemplate.json" `
    -TemplateParameterFile "D:\Azure\Templates\ServiceParameters.json" `
    -ResultFormat "ResourceIdOnly"

This command gets a What-If result at the specified resource group scope by using a custom template file and a parameter file on disk. The command uses the ResourceGroupName parameter to specify a resource group where the template will be deployed. The command uses the TemplateFile parameter to specify a template file. The command uses the TemplateParameterFile parameter to specify a template parameter file. The command uses the ResultFormat parameter to set the What-If result to only contain resource IDs.

Parameters

-ApiVersion

When set, indicates the version of the resource provider API to use. If not specified, the API version is automatically determined as the latest available.

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

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

Type:Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ExcludeChangeType

Comma-separated resource change types to be excluded from What-If results.

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

The deployment mode.

Type:DeploymentMode
Accepted values:Incremental, Complete
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-Name

The name of the deployment it's going to create. If not specified, defaults to the template file name when a template file is provided; defaults to the current time when a template object is provided, e.g. "20131223140835".

Type:String
Aliases:DeploymentName
Position:Named
Default value:None
Accept pipeline input:True
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
Accept pipeline input:False
Accept wildcard characters:False
-ResourceGroupName

The resource group name.

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

The What-If result format.

Type:WhatIfResultFormat
Accepted values:ResourceIdOnly, FullResourcePayloads
Position:Named
Default value:None
Accept pipeline input:False
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
Accept pipeline input:False
Accept wildcard characters:False
-TemplateFile

Local path to the template file.

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

A hash table which represents the template.

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

A file that has the template parameters.

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

A hash table which represents the parameters.

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

Uri to the template parameter file.

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

Uri to the template file.

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

Inputs

String

DeploymentMode

Hashtable

Outputs

Microsoft.Azure.Commands.ResourceManager.Cmdlets.SdkModels.Deployments.PSWhatIfOperationResult