Functions/Public/component-registry/Get-vRAComponentRegistryServiceEndpoint.ps1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
function Get-vRAComponentRegistryServiceEndpoint { <# .SYNOPSIS Retrieve a list of endpoints for a service .DESCRIPTION Retrieve a list of endpoints for a service .PARAMETER Id The Id of the service. Specifying the Id of the service will retrieve detailed information. .INPUTS System.String .OUTPUTS System.Management.Automation.PSObject .EXAMPLE Get-vRAComponentRegistryServiceEndpoint .EXAMPLE Get-vRAComponentRegistryService -Id xxxxxxxxxxxxxxxxxxxxxxxx | Get-vRAComponentRegistryServiceEndpoint #> [CmdletBinding()][OutputType('System.Management.Automation.PSObject')] Param ( [parameter(Mandatory=$true, ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true)] [ValidateNotNullOrEmpty()] [String[]]$Id ) Begin { } Process { try { foreach ($ServiceId in $Id) { $URI = "/component-registry/services/$($ServiceId)/endpoints" $Response = Invoke-vRARestMethod -Method GET -URI $URI -Verbose:$VerbosePreference foreach ($Endpoint in $Response.content) { [PSCustomObject] @{ Id = $Endpoint.id CreatedDate = $Endpoint.createdDate LastUpdated = $Endpoint.lastUpdated Url = $Endpoint.url EndPointType = $Endpoint.endpointType ServiceInfoId = $Endpoint.serviceInfoId EndPointAttributes = $Endpoint.endPointAttributes SSlTrusts = $Endpoint.sslTrusts } } } Write-Verbose -Message "Total: $($Response.metadata.totalElements) | Page: $($Response.metadata.number) of $($Response.metadata.totalPages) | Size: $($Response.metadata.size)" } catch [Exception] { throw } } End { } } |