Public/Set-GCAlertingRule.ps1
|
<# .SYNOPSIS Updates an existing alerting rule. .DESCRIPTION Updates the specified alerting rule in Genesys Cloud. Uses the PUT /api/v2/alerting/rules/{ruleId} endpoint. .PARAMETER RuleId The unique identifier of the alerting rule to update. .PARAMETER Body The updated alerting rule definition object. .EXAMPLE $ruleBody = @{ name = 'Updated Alert Rule' } Set-GCAlertingRule -RuleId 'a1b2c3d4-e5f6-7890-abcd-ef1234567890' -Body $ruleBody .NOTES Genesys Cloud API: PUT /api/v2/alerting/rules/{ruleId} #> function Set-GCAlertingRule { [CmdletBinding()] param( [Parameter(Mandatory = $true)] [string]$RuleId, [Parameter(Mandatory = $true)] [object]$Body ) $endpoint = "alerting/rules/$RuleId" return Invoke-GCApiRequest -Endpoint $endpoint -Method PUT -Body $Body } |