Public/Set-GCProcessAutomationTrigger.ps1

<#
.SYNOPSIS
    Updates an existing process automation trigger.

.DESCRIPTION
    Updates the specified process automation trigger in Genesys Cloud.
    Uses the PUT /api/v2/processautomation/triggers/{triggerId} endpoint.

.PARAMETER TriggerId
    The unique identifier of the trigger to update.

.PARAMETER Body
    The updated trigger definition object.

.EXAMPLE
    $trigBody = @{ name = 'Updated Trigger' }
    Set-GCProcessAutomationTrigger -TriggerId 'a1b2c3d4-e5f6-7890-abcd-ef1234567890' -Body $trigBody

.NOTES
    Genesys Cloud API: PUT /api/v2/processautomation/triggers/{triggerId}
#>

function Set-GCProcessAutomationTrigger {
    [CmdletBinding()]
    param(
        [Parameter(Mandatory = $true)]
        [string]$TriggerId,

        [Parameter(Mandatory = $true)]
        [object]$Body
    )

    $endpoint = "processautomation/triggers/$TriggerId"
    return Invoke-GCApiRequest -Endpoint $endpoint -Method PUT -Body $Body
}