Added Add-NetboxDCIMFrontPort function

This commit is contained in:
sheffsix 2023-03-14 11:55:54 +00:00
parent 6bd7acab49
commit 36b20f0d28

View file

@ -0,0 +1,44 @@

function Add-NetboxDCIMFrontPort
{
[CmdletBinding()]
[OutputType([pscustomobject])]
param
(
[Parameter(Mandatory = $true)]
[uint16]$Device,
[uint16]$Module,
[Parameter(Mandatory = $true)]
[string]$Name,
[string]$Label,
[Parameter(Mandatory = $true)]
[string]$Type,
[ValidatePattern('^[0-9a-f]{6}$')]
[string]$Color,
[Parameter(Mandatory = $true)]
[uint16]$Rear_Port,
[uint16]$Rear_Port_Position,
[string]$Description,
[bool]$Mark_Connected,
[uint16[]]$Tags
)
$Segments = [System.Collections.ArrayList]::new(@('dcim', 'front-ports'))
$URIComponents = BuildURIComponents -URISegments $Segments.Clone() -ParametersDictionary $PSBoundParameters
$URI = BuildNewURI -Segments $URIComponents.Segments
InvokeNetboxRequest -URI $URI -Body $URIComponents.Parameters -Method POST
}