functions/generated/TestPlan/Get-AdsTestplanVariable.ps1
function Get-AdsTestplanVariable { <# .SYNOPSIS .DESCRIPTION Get a list of test variables. .PARAMETER Organization The name of the Azure DevOps organization. .PARAMETER ContinuationToken If the list of variables returned is not complete, a continuation token to query next batch of variables is included in the response header as "x-ms-continuationtoken". Omit this parameter to get the first batch of test variables. .PARAMETER TestVariableId ID of the test variable to get. .PARAMETER Project Project ID or project name .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-AdsTestplanVariable -Organization $organization -TestVariableId $testvariableid -Project $project -ApiVersion $apiversion Get a test variable by its ID. .EXAMPLE PS C:\> Get-AdsTestplanVariable -Organization $organization -Project $project -ApiVersion $apiversion Get a list of test variables. .LINK <unknown> #> [CmdletBinding(DefaultParameterSetName = 'default')] param ( [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')] [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Variables_Get')] [string] $Organization, [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')] [string] $ContinuationToken, [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Variables_Get')] [string] $TestVariableId, [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')] [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Variables_Get')] [string] $Project, [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')] [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Variables_Get')] [string] $ApiVersion ) process { $__mapping = @{ 'ContinuationToken' = 'continuationToken' 'ApiVersion' = 'api-version' } $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ContinuationToken','ApiVersion') -Mapping $__mapping $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping $__path = 'https://dev.azure.com/{organization}/{project}/_apis/testplan/variables' -Replace '{organization}',$Organization -Replace '{project}',$Project if ($TestVariableId) { $__path += "/$TestVariableId" } Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header } } |