functions/generated/Pipelines/Get-AdsPipelineRunArtifact.ps1
function Get-AdsPipelineRunArtifact { <# .SYNOPSIS .DESCRIPTION Get a specific artifact from a pipeline run .PARAMETER Expand Expand options. Default is None. .PARAMETER ArtifactName Name of the artifact. .PARAMETER PipelineId ID of the pipeline. .PARAMETER RunId ID of the run of that pipeline. .PARAMETER Project Project ID or project name .PARAMETER Organization The name of the Azure DevOps organization. .PARAMETER ApiVersion Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api. .EXAMPLE PS C:\> Get-AdsPipelineRunArtifact -ArtifactName $artifactname -PipelineId $pipelineid -RunId $runid -Project $project -Organization $organization -ApiVersion $apiversion Get a specific artifact from a pipeline run .LINK <unknown> #> [CmdletBinding(DefaultParameterSetName = 'default')] param ( [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')] [string] $Expand, [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')] [string] $ArtifactName, [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')] [string] $PipelineId, [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')] [string] $RunId, [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')] [string] $Project, [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')] [string] $Organization, [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')] [string] $ApiVersion ) process { $__mapping = @{ 'Expand' = '$expand' 'ArtifactName' = 'artifactName' 'ApiVersion' = 'api-version' } $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Expand','ArtifactName','ApiVersion') -Mapping $__mapping $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping $__path = 'https://dev.azure.com/{organization}/{project}/_apis/pipelines/{pipelineId}/runs/{runId}/artifacts' -Replace '{pipelineId}',$PipelineId -Replace '{runId}',$RunId -Replace '{project}',$Project -Replace '{organization}',$Organization Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header } } |