|
51 | 51 | # If this is provided without anything else, will get permissions for the projectID |
52 | 52 | [Parameter(Mandatory,ValueFromPipelineByPropertyName,ParameterSetName='Project')] |
53 | 53 | [Parameter(ValueFromPipelineByPropertyName,ParameterSetName='Analytics')] |
| 54 | + [Parameter(ValueFromPipelineByPropertyName,ParameterSetName='EndpointID')] |
54 | 55 | [Parameter(Mandatory,ValueFromPipelineByPropertyName,ParameterSetName='AreaPath')] |
55 | 56 | [Parameter(Mandatory,ValueFromPipelineByPropertyName,ParameterSetName='Dashboard')] |
56 | 57 | [Parameter(Mandatory,ValueFromPipelineByPropertyName,ParameterSetName='Tagging')] |
|
121 | 122 | [switch] |
122 | 123 | $Dashboard, |
123 | 124 |
|
| 125 | + |
| 126 | + # If set, will get all service endpoints permissions. |
| 127 | + [Parameter(Mandatory,ValueFromPipelineByPropertyName,ParameterSetName='ServiceEndpoint')] |
| 128 | + [Alias('ServiceEndpoints')] |
| 129 | + [switch] |
| 130 | + $ServiceEndpoint, |
| 131 | + |
| 132 | + # If set, will get endpoint permissions related to a particular endpoint. |
| 133 | + [Parameter(Mandatory,ValueFromPipelineByPropertyName,ParameterSetName='EndpointID')] |
| 134 | + [string] |
| 135 | + $EndpointID, |
| 136 | + |
124 | 137 | # The Build Definition ID |
125 | 138 | [Parameter(Mandatory,ValueFromPipelineByPropertyName,ParameterSetName='BuildDefinition')] |
126 | 139 | [string] |
|
319 | 332 | SecurityToken = "Plan" |
320 | 333 | } + $PSBoundParameters) |
321 | 334 | } |
| 335 | + 'ServiceEndpoint|EndpointID' { |
| 336 | + if ($psCmdlet.ParameterSetName -eq 'ServiceEndpoint') { |
| 337 | + $PSBoundParameters['Recurse'] = $true |
| 338 | + } |
| 339 | + |
| 340 | + if ($EndpointID) { |
| 341 | + $q.Enqueue(@{ |
| 342 | + NamespaceID = '49b48001-ca20-4adc-8111-5b60c903a50c' |
| 343 | + SecurityToken = "endpoints/Collection/$(if ($EndpointID) {$EndpointID})" |
| 344 | + } + $PSBoundParameters) |
| 345 | + } |
| 346 | + $q.Enqueue(@{ |
| 347 | + NamespaceID = '49b48001-ca20-4adc-8111-5b60c903a50c' |
| 348 | + SecurityToken = "endpoints/$(if ($ProjectID) {"$ProjectID/"})$(if ($EndpointID) {$EndpointID})" |
| 349 | + } + $PSBoundParameters) |
| 350 | + } |
322 | 351 | Tagging { |
323 | 352 |
|
324 | 353 | $q.Enqueue(@{ |
|
0 commit comments