Get-AzDeploymentOperation
Get the individual operations of a subscription scoped deployment.
Syntax
List (Default)
Get-AzDeploymentOperation
-DeploymentName <string>
[-SubscriptionId <string>]
[-Profile <string>]
[<CommonParameters>]
Get
Get-AzDeploymentOperation
-DeploymentName <string>
-OperationIds <string[]>
[-SubscriptionId <string>]
[-Profile <string>]
[<CommonParameters>]
DeploymentObject
Get-AzDeploymentOperation
-DeploymentObject <psobject>
[-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.
Pipe a deployment object, or pass it to -DeploymentObject, to list every operation of the deployment it names.
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 subscription scoped deployment scenario-deployment.
Get-AzDeploymentOperation -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-AzDeploymentOperation -DeploymentName scenario-deployment -OperationIds 38241FA9B6B8DAE1, 08584103205698517279
List the operations of a piped deployment
Pipe an object that names the deployment. The deployment name is read from its DeploymentName or Name property, and the subscription is the active profile's subscription.
$deployment = [pscustomobject]@{ Name = 'scenario-deployment' }
$deployment | Get-AzDeploymentOperation
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 |
-DeploymentObject
A deployment object, usually piped, whose DeploymentName or Name property names the subscription scoped deployment whose operations are listed. The active profile's subscription is used. Cannot be combined with -OperationIds or -SubscriptionId.
Parameter properties
| Type: | PSObject |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
DeploymentObject
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | True |
| Value from pipeline by property name: | False |
| 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 |
-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 deployment name can be supplied from the pipeline by property name.
PSObject
A deployment object can be piped to -DeploymentObject; the cmdlet lists every operation of the deployment it names.
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.