Public/Set-GCOutboundCampaign.ps1

<#
.SYNOPSIS
    Updates an existing outbound campaign in Genesys Cloud.

.DESCRIPTION
    Updates an outbound campaign by its unique identifier using the Genesys Cloud API.
    API Endpoint: PUT /api/v2/outbound/campaigns/{campaignId}

.PARAMETER CampaignId
    The unique identifier of the campaign to update.

.PARAMETER Body
    The updated campaign definition object.

.EXAMPLE
    $campaignBody = @{ name = 'Updated Campaign'; campaignStatus = 'on' }
    Set-GCOutboundCampaign -CampaignId 'aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee' -Body $campaignBody
    Updates the specified outbound campaign.

.NOTES
    Genesys Cloud API: PUT /api/v2/outbound/campaigns/{campaignId}
#>

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

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

    $endpoint = "outbound/campaigns/$CampaignId"
    return Invoke-GCApiRequest -Endpoint $endpoint -Method PUT -Body $Body
}