@@ -7,8 +7,8 @@ function New-NBContactAssignment {
77 . DESCRIPTION
88 Creates a new contact role assignment in Netbox
99
10- . PARAMETER Content_Type
11- The content type for this assignment.
10+ . PARAMETER Object_Type
11+ The type of the object for this assignment.
1212
1313 . PARAMETER Object_Id
1414 ID of the object to assign.
@@ -26,10 +26,10 @@ function New-NBContactAssignment {
2626 Return the unparsed data from the HTTP request
2727
2828 . EXAMPLE
29- PS C:\> New-NBContactAssignment -Content_Type 'dcim.location' -Object_id 10 -Contact 15 -Role 10 -Priority 'Primary'
29+ PS C:\> New-NBContactAssignment -Object_Type 'dcim.location' -Object_Id 10 -Contact 15 -Role 10 -Priority 'Primary'
3030
3131 . NOTES
32- Valid content types: https://docs.netbox.dev/en/stable/features/contacts/#contacts_1
32+ Valid object types: https://docs.netbox.dev/en/stable/features/contacts/#contacts_1
3333#>
3434
3535 [CmdletBinding (ConfirmImpact = ' Low' ,
@@ -40,7 +40,8 @@ function New-NBContactAssignment {
4040 [Parameter (Mandatory = $true ,
4141 ValueFromPipelineByPropertyName = $true )]
4242 [ValidateSet (' circuits.circuit' , ' circuits.provider' , ' circuits.provideraccount' , ' dcim.device' , ' dcim.location' , ' dcim.manufacturer' , ' dcim.powerpanel' , ' dcim.rack' , ' dcim.region' , ' dcim.site' , ' dcim.sitegroup' , ' tenancy.tenant' , ' virtualization.cluster' , ' virtualization.clustergroup' , ' virtualization.virtualmachine' , IgnoreCase = $true )]
43- [string ]$Content_Type ,
43+ [Alias (' Content_Type' )]
44+ [string ]$Object_Type ,
4445
4546 [Parameter (Mandatory = $true )]
4647 [uint64 ]$Object_Id ,
@@ -68,7 +69,7 @@ function New-NBContactAssignment {
6869
6970 $URI = BuildNewURI - Segments $URIComponents.Segments
7071
71- if ($PSCmdlet.ShouldProcess ($Content_Type , ' Create new contact assignment' )) {
72+ if ($PSCmdlet.ShouldProcess ($Object_Type , ' Create new contact assignment' )) {
7273 InvokeNetboxRequest - URI $URI - Method POST - Body $URIComponents.Parameters - Raw:$Raw
7374 }
7475 }
0 commit comments