tcm/Get-TCMSetVersionDeployment.ps1
function Get-TCMSetVersionDeployment { Param( [Parameter(Mandatory=$true)] [string] $SetID, [Parameter(Mandatory=$true)] [string] $Version, [Parameter(Mandatory=$false)] [string] $EdgeRCFile = '~\.edgerc', [Parameter(Mandatory=$false)] [string] $Section = 'default', [Parameter(Mandatory=$false)] [string] $AccountSwitchKey ) if($AccountSwitchKey){ throw "TCM API does not support account switching. Sorry" } $AdditionalHeaders = @{ 'accept' = 'application/prs.akamai.trust-chain-manager-api.set.v1+json' } $Path = "/trust-chain-manager/v1/sets/$SetID/deployments/version/$Version" try { $Result = Invoke-AkamaiRestMethod -Method GET -Path $Path -AdditionalHeaders $AdditionalHeaders -EdgeRCFile $EdgeRCFile -Section $Section return $Result } catch { throw $_.Exception } } |