New-NBEventRule
Since
v4.4.10.0
SYNOPSIS
Creates a new event rule in Netbox.
SYNTAX
New-NBEventRule [-Name] <String> [[-Description] <String>] [[-Enabled] <Boolean>] [-Object_Types] <String[]>
[[-Type_Create] <Boolean>] [[-Type_Update] <Boolean>] [[-Type_Delete] <Boolean>] [[-Type_Job_Start] <Boolean>]
[[-Type_Job_End] <Boolean>] [-Action_Type] <String> [[-Action_Object_Type] <String>]
[[-Action_Object_Id] <UInt64>] [[-Conditions] <Object>] [[-Custom_Fields] <Hashtable>] [[-Tags] <Object[]>]
[-Raw] [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
DESCRIPTION
Creates a new event rule in Netbox Extras module.
EXAMPLES
EXAMPLE 1
New-NBEventRule -Name "Notify on device create" -Object_Types @("dcim.device") -Type_Create $true -Action_Type "webhook" -Action_Object_Id 1
PARAMETERS
-Name
Name of the event rule.
```yaml Type: String Parameter Sets: (All) Aliases:
Required: True Position: 1 Default value: None Accept pipeline input: False Accept wildcard characters: False ```
-Description
Description of the event rule.
```yaml Type: String Parameter Sets: (All) Aliases:
Required: False Position: 2 Default value: None Accept pipeline input: False Accept wildcard characters: False ```
-Enabled
Whether the event rule is enabled.
```yaml Type: Boolean Parameter Sets: (All) Aliases:
Required: False Position: 3 Default value: False Accept pipeline input: False Accept wildcard characters: False ```
-Object_Types
Object types this rule applies to.
```yaml Type: String[] Parameter Sets: (All) Aliases:
Required: True Position: 4 Default value: None Accept pipeline input: False Accept wildcard characters: False ```
-Type_Create
Trigger on create events.
```yaml Type: Boolean Parameter Sets: (All) Aliases:
Required: False Position: 5 Default value: False Accept pipeline input: False Accept wildcard characters: False ```
-Type_Update
Trigger on update events.
```yaml Type: Boolean Parameter Sets: (All) Aliases:
Required: False Position: 6 Default value: False Accept pipeline input: False Accept wildcard characters: False ```
-Type_Delete
Trigger on delete events.
```yaml Type: Boolean Parameter Sets: (All) Aliases:
Required: False Position: 7 Default value: False Accept pipeline input: False Accept wildcard characters: False ```
-Type_Job_Start
Trigger on job start events.
```yaml Type: Boolean Parameter Sets: (All) Aliases:
Required: False Position: 8 Default value: False Accept pipeline input: False Accept wildcard characters: False ```
-Type_Job_End
Trigger on job end events.
```yaml Type: Boolean Parameter Sets: (All) Aliases:
Required: False Position: 9 Default value: False Accept pipeline input: False Accept wildcard characters: False ```
-Action_Type
Action type (webhook, script).
```yaml Type: String Parameter Sets: (All) Aliases:
Required: True Position: 10 Default value: None Accept pipeline input: False Accept wildcard characters: False ```
-Action_Object_Type
Action object type.
```yaml Type: String Parameter Sets: (All) Aliases:
Required: False Position: 11 Default value: None Accept pipeline input: False Accept wildcard characters: False ```
-Action_Object_Id
Action object ID.
```yaml Type: UInt64 Parameter Sets: (All) Aliases:
Required: False Position: 12 Default value: 0 Accept pipeline input: False Accept wildcard characters: False ```
-Conditions
Conditions (JSON logic).
```yaml Type: Object Parameter Sets: (All) Aliases:
Required: False Position: 13 Default value: None Accept pipeline input: False Accept wildcard characters: False ```
-Custom_Fields
Custom fields hashtable.
```yaml Type: Hashtable Parameter Sets: (All) Aliases:
Required: False Position: 14 Default value: None Accept pipeline input: False Accept wildcard characters: False ```
-Tags
{{ Fill Tags Description }}
```yaml Type: Object[] Parameter Sets: (All) Aliases:
Required: False Position: 15 Default value: None Accept pipeline input: False Accept wildcard characters: False ```
-Raw
Return the raw API response.
```yaml Type: SwitchParameter Parameter Sets: (All) Aliases:
Required: False Position: Named Default value: False Accept pipeline input: False Accept wildcard characters: False ```
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
```yaml Type: SwitchParameter Parameter Sets: (All) Aliases: wi
Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ```
-Confirm
Prompts you for confirmation before running the cmdlet.
```yaml Type: SwitchParameter Parameter Sets: (All) Aliases: cf
Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ```
-ProgressAction
{{ Fill ProgressAction Description }}
```yaml Type: ActionPreference Parameter Sets: (All) Aliases: proga
Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ```
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS
OUTPUTS
System.Management.Automation.PSObject
NOTES
AddedInVersion: v4.4.10.0