Update New-NetboxContactAssignment name

This commit is contained in:
Ben Claussen 2023-11-09 11:06:35 -05:00
parent 26cc2b3c0d
commit 8326e3eb29

View file

@ -1,32 +1,50 @@
 #enum NetboxContactAssignmentContentType {
function New-NetboxContactRole { # Circuit = 10
# CircuitProvider = 7
# CircuitProviderAccount = 132
# Device = 19
# Location = 25
# Manufacturer = 29
# PowerPanel = 77
# Rack = 20
# Region = 30
# Site = 18
# SiteGroup = 92
# Tenant = 58
# VirtualizationCluster = 63
# VirtualizationClusterGroup = 64
# VirtualMachine = 61
#}
function New-NetboxContactAssignment {
<# <#
.SYNOPSIS .SYNOPSIS
Create a new contact role in Netbox Create a new contact role assignment in Netbox
.DESCRIPTION .DESCRIPTION
Creates a new contact role object in Netbox Creates a new contact role assignment in Netbox
.PARAMETER Content_Type .PARAMETER Content_Type
A description of the Content_Type parameter. The content type for this assignment.
.PARAMETER Object_Id .PARAMETER Object_Id
A description of the Object_Id parameter. ID of the object to assign.
.PARAMETER Contact .PARAMETER Contact
A description of the Contact parameter. ID of the contact to assign.
.PARAMETER Role .PARAMETER Role
A description of the Role parameter. ID of the contact role to assign.
.PARAMETER Priority .PARAMETER Priority
A description of the Priority parameter. Piority of the contact assignment.
.PARAMETER Raw .PARAMETER Raw
Return the unparsed data from the HTTP request Return the unparsed data from the HTTP request
.EXAMPLE .EXAMPLE
PS C:\> New-NetboxContactAssignment -Name 'Leroy Jenkins' -Email 'leroy.jenkins@example.com' PS C:\> New-NetboxContactAssignment -Content_Type Location -Object_id 10 -Contact 15 -Role 10 -Priority Primary
.NOTES .NOTES
Additional information about the function. Additional information about the function.
@ -40,6 +58,7 @@ function New-NetboxContactRole {
[Parameter(Mandatory = $true, [Parameter(Mandatory = $true,
ValueFromPipelineByPropertyName = $true)] ValueFromPipelineByPropertyName = $true)]
[object]$Content_Type, [object]$Content_Type,
#[NetboxContactAssignmentContentType]$Content_Type,
[Parameter(Mandatory = $true)] [Parameter(Mandatory = $true)]
[uint64]$Object_Id, [uint64]$Object_Id,
@ -61,6 +80,7 @@ function New-NetboxContactRole {
$AllowedContentTypes = @{ $AllowedContentTypes = @{
10 = "circuits.circuit" 10 = "circuits.circuit"
7 = "circuits.provider" 7 = "circuits.provider"
132 = "circuits.provideraccount"
19 = "dcim.device" 19 = "dcim.device"
25 = "dcim.location" 25 = "dcim.location"
29 = "dcim.manufacturer" 29 = "dcim.manufacturer"