NetboxPS/Functions/DCIM/Interfaces/Get-NetboxDCIMInterface.ps1

63 lines
1.5 KiB
PowerShell
Raw Normal View History

<#
2020-03-23 12:18:01 -04:00
.NOTES
===========================================================================
Created with: SAPIEN Technologies, Inc., PowerShell Studio 2020 v5.7.172
Created on: 3/23/2020 12:09
Created by: Claussen
Organization: NEOnet
Filename: Get-NetboxDCIMInterface.ps1
===========================================================================
.DESCRIPTION
A description of the file.
#>
function Get-NetboxDCIMInterface {
[CmdletBinding()]
[OutputType([pscustomobject])]
param
(
[uint16]$Limit,
2020-03-23 12:18:01 -04:00
[uint16]$Offset,
2020-03-23 12:18:01 -04:00
[Parameter(ValueFromPipelineByPropertyName = $true)]
[uint16]$Id,
2020-03-23 12:18:01 -04:00
[uint16]$Name,
2020-03-23 12:18:01 -04:00
[object]$Form_Factor,
2020-03-23 12:18:01 -04:00
[bool]$Enabled,
2020-03-23 12:18:01 -04:00
[uint16]$MTU,
2020-03-23 12:18:01 -04:00
[bool]$MGMT_Only,
2020-03-23 12:18:01 -04:00
[string]$Device,
2020-03-23 12:18:01 -04:00
[uint16]$Device_Id,
2020-03-23 12:18:01 -04:00
[uint16]$Type,
2020-03-23 12:18:01 -04:00
[uint16]$LAG_Id,
2020-03-23 12:18:01 -04:00
[string]$MAC_Address,
2020-03-23 12:18:01 -04:00
[switch]$Raw
)
process {
if ($null -ne $Form_Factor) {
$PSBoundParameters.Form_Factor = ValidateDCIMChoice -ProvidedValue $Form_Factor -InterfaceFormFactor
}
$Segments = [System.Collections.ArrayList]::new(@('dcim', 'interfaces'))
$URIComponents = BuildURIComponents -URISegments $Segments.Clone() -ParametersDictionary $PSBoundParameters
$URI = BuildNewURI -Segments $URIComponents.Segments -Parameters $URIComponents.Parameters
InvokeNetboxRequest -URI $URI -Raw:$Raw
2020-03-23 12:18:01 -04:00
}
}