Edit

Get-AzResourceGroupDeploymentOperation

Get the individual operations of a resource group scoped deployment.

Syntax

List (Default)

Get-AzResourceGroupDeploymentOperation
    -ResourceGroupName <string>
    -DeploymentName <string>
    [-SubscriptionId <string>]
    [-Profile <string>]
    [<CommonParameters>]

Get

Get-AzResourceGroupDeploymentOperation
    -ResourceGroupName <string>
    -DeploymentName <string>
    -OperationIds <string[]>
    [-SubscriptionId <string>]
    [-Profile <string>]
    [<CommonParameters>]

Description

A deployment operation records one resource action taken during a deployment. Each operation is returned with its id, provisioning state, status code, the error the resource provider reported rendered as text, and the id of the resource it targeted. Omit -OperationIds to list every operation of the deployment; supply one or more ids to fetch just those. This is the primary way to find the specific resource that caused a deployment to fail.

Examples

List the operations of a deployment

Return every operation recorded for the deployment scenario-deployment in resource group myrg.

Get-AzResourceGroupDeploymentOperation -ResourceGroupName myrg -DeploymentName scenario-deployment

Get specific operations by id

Fetch two operations by id. Each id is retrieved individually and the results are returned as one array.

Get-AzResourceGroupDeploymentOperation -ResourceGroupName myrg -DeploymentName scenario-deployment -OperationIds 38241FA9B6B8DAE1, 08584103205698517279

Parameters

-DeploymentName

The deployment name.

Parameter properties

Type:String
Supports wildcards:False
DontShow:False
Aliases:Name

Parameter sets

Get
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False
List
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-OperationIds

One or more deployment operation Ids to get. Omit to list every operation of the deployment.

Parameter properties

Type:

String[]

Supports wildcards:False
DontShow:False
Aliases:OperationId

Parameter sets

Get
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Profile

Name of a saved profile to use for this call instead of the currently-active one. Manage profiles with Set-AzProfile / Get-AzProfile.

Parameter properties

Type:String
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 resource group that contains the deployment.

Parameter properties

Type:String
Supports wildcards:False
DontShow:False

Parameter sets

Get
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False
List
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-SubscriptionId

Azure Subscription Id. Defaults to the active profile's subscription.

Parameter properties

Type:String
Supports wildcards:False
DontShow:False

Parameter sets

Get
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
List
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

The resource group name and deployment name can be supplied from the pipeline by property name.

Outputs

Microsoft.Azure.Azclips.Extensions.Resources.Models.PSDeploymentOperation

One object per matching operation — one per requested id when -OperationIds is supplied, every operation of the deployment otherwise. Each object carries only Id, OperationId, ProvisioningState, StatusCode, StatusMessage, and TargetResource. StatusMessage renders the error the resource provider reported as text, with one indented line per error detail, and is empty when the operation reported no error. TargetResource is the resource id of the resource the operation targeted.