Skip to content

Commit

Permalink
Rest api 6.* support
Browse files Browse the repository at this point in the history
  • Loading branch information
mdejulia authored and mdejulia committed Aug 17, 2020
1 parent 759bdb5 commit 22716b9
Show file tree
Hide file tree
Showing 12 changed files with 1 addition and 45 deletions.
2 changes: 1 addition & 1 deletion AzurePipelinesPS/Private/Set-APUri.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ function Set-APUri

process
{
If ($ApiVersion -match '5.*' -and ($Instance.Host -eq 'dev.azure.com' -or $Instance.Host -like '*.visualstudio.com'))
If (($ApiVersion -match '5.*' -or $ApiVersion -match '6.*') -and ($Instance.Host -eq 'dev.azure.com' -or $Instance.Host -like '*.visualstudio.com'))
{
# Api endpoint matches release
If ($ApiEndpoint -match 'release')
Expand Down
4 changes: 0 additions & 4 deletions AzurePipelinesPS/Public/Add-APGroupMembership.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,6 @@ function Add-APGroupMembership

process
{
If ($ApiVersion -notmatch '5.*')
{
Write-Error "[$($MyInvocation.MyCommand.Name)]: Groups are not supported in api versions earlier the 5.0." -ErrorAction 'Stop'
}
$apiEndpoint = (Get-APApiEndpoint -ApiType 'graph-containerDescriptor') -f $SubjectDescriptor, $ContainerDescriptor
$setAPUriSplat = @{
Collection = $Collection
Expand Down
4 changes: 0 additions & 4 deletions AzurePipelinesPS/Public/Get-APDescriptor.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,6 @@ function Get-APDescriptor

process
{
If ($ApiVersion -notmatch '5.*')
{
Write-Error "[$($MyInvocation.MyCommand.Name)]: Groups are not supported in api versions earlier the 5.0." -ErrorAction 'Stop'
}
$apiEndpoint = (Get-APApiEndpoint -ApiType 'graph-descriptorStorageKey') -f $StorageKey
$queryParameters = Set-APQueryParameters -InputObject $PSBoundParameters
$setAPUriSplat = @{
Expand Down
4 changes: 0 additions & 4 deletions AzurePipelinesPS/Public/Get-APGroup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,6 @@ function Get-APGroup

process
{
If ($ApiVersion -notmatch '5.*')
{
Write-Error "[$($MyInvocation.MyCommand.Name)]: Groups are not supported in api versions earlier the 5.0." -ErrorAction 'Stop'
}
$apiEndpoint = (Get-APApiEndpoint -ApiType 'graph-groupId') -f $GroupDescriptor
$queryParameters = Set-APQueryParameters -InputObject $PSBoundParameters
$setAPUriSplat = @{
Expand Down
4 changes: 0 additions & 4 deletions AzurePipelinesPS/Public/Get-APGroupEntitlementsList.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,6 @@ function Get-APGroupEntitlementsList

process
{
If ($ApiVersion -notmatch '5.*')
{
Write-Error "[$($MyInvocation.MyCommand.Name)]: Groups are not supported in api versions earlier the 5.0." -ErrorAction 'Stop'
}
$apiEndpoint = Get-APApiEndpoint -ApiType 'groupentitlements-entitlements'
$setAPUriSplat = @{
Collection = $Collection
Expand Down
4 changes: 0 additions & 4 deletions AzurePipelinesPS/Public/Get-APGroupList.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,6 @@ function Get-APGroupList

process
{
If ($ApiVersion -notmatch '5.*')
{
Write-Error "[$($MyInvocation.MyCommand.Name)]: Groups are not supported in api versions earlier the 5.0." -ErrorAction 'Stop'
}
$apiEndpoint = Get-APApiEndpoint -ApiType 'graph-groups'
$queryParameters = Set-APQueryParameters -InputObject $PSBoundParameters
$setAPUriSplat = @{
Expand Down
4 changes: 0 additions & 4 deletions AzurePipelinesPS/Public/Get-APGroupMembership.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,6 @@ function Get-APGroupMembership

process
{
If ($ApiVersion -notmatch '5.*')
{
Write-Error "[$($MyInvocation.MyCommand.Name)]: Groups are not supported in api versions earlier the 5.0." -ErrorAction 'Stop'
}
$apiEndpoint = (Get-APApiEndpoint -ApiType 'graph-containerDescriptor') -f $SubjectDescriptor, $ContainerDescriptor
$queryParameters = Set-APQueryParameters -InputObject $PSBoundParameters
$setAPUriSplat = @{
Expand Down
4 changes: 0 additions & 4 deletions AzurePipelinesPS/Public/Get-APGroupMembershipList.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,6 @@ function Get-APGroupMembershipList

process
{
If ($ApiVersion -notmatch '5.*')
{
Write-Error "[$($MyInvocation.MyCommand.Name)]: Groups are not supported in api versions earlier the 5.0." -ErrorAction 'Stop'
}
$apiEndpoint = (Get-APApiEndpoint -ApiType 'graph-memberships') -f $SubjectDescriptor
$queryParameters = Set-APQueryParameters -InputObject $PSBoundParameters
$setAPUriSplat = @{
Expand Down
4 changes: 0 additions & 4 deletions AzurePipelinesPS/Public/Get-APStorageKey.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,6 @@ function Get-APStorageKey

process
{
If ($ApiVersion -notmatch '5.*')
{
Write-Error "[$($MyInvocation.MyCommand.Name)]: User list is not supported in api versions earlier the 5.0." -ErrorAction 'Stop'
}
$apiEndpoint = (Get-APApiEndpoint -ApiType 'graph-storagekeys') -f $SubjectDescriptor
$setAPUriSplat = @{
Collection = $Collection
Expand Down
4 changes: 0 additions & 4 deletions AzurePipelinesPS/Public/Get-APUser.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,6 @@ function Get-APUser

process
{
If ($ApiVersion -notmatch '5.*')
{
Write-Error "[$($MyInvocation.MyCommand.Name)]: User list is not supported in api versions earlier the 5.0." -ErrorAction 'Stop'
}
$apiEndpoint = (Get-APApiEndpoint -ApiType 'graph-userId') -f $UserDescriptor
$queryParameters = Set-APQueryParameters -InputObject $PSBoundParameters
$setAPUriSplat = @{
Expand Down
4 changes: 0 additions & 4 deletions AzurePipelinesPS/Public/Get-APUserList.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,6 @@ function Get-APUserList

process
{
If ($ApiVersion -notmatch '5.*')
{
Write-Error "[$($MyInvocation.MyCommand.Name)]: User list is not supported in api versions earlier the 5.0." -ErrorAction 'Stop'
}
$apiEndpoint = Get-APApiEndpoint -ApiType 'graph-users'
$queryParameters = Set-APQueryParameters -InputObject $PSBoundParameters
$setAPUriSplat = @{
Expand Down
4 changes: 0 additions & 4 deletions AzurePipelinesPS/Public/Remove-APGroupMembership.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,6 @@ function Remove-APGroupMembership

process
{
If ($ApiVersion -notmatch '5.*')
{
Write-Error "[$($MyInvocation.MyCommand.Name)]: Groups are not supported in api versions earlier the 5.0." -ErrorAction 'Stop'
}
$apiEndpoint = (Get-APApiEndpoint -ApiType 'graph-containerDescriptor') -f $SubjectDescriptor, $ContainerDescriptor
$setAPUriSplat = @{
Collection = $Collection
Expand Down

0 comments on commit 22716b9

Please sign in to comment.