Public/Set-GCPresenceDefinition.ps1
|
<# .SYNOPSIS Updates an existing presence definition in Genesys Cloud. .DESCRIPTION Replaces the configuration of a specific presence definition using a PUT request. API Endpoint: PUT /api/v2/presence/definitions/{definitionId} .PARAMETER DefinitionId The unique identifier of the presence definition to update. .PARAMETER Body The request body containing the presence definition properties. Accepts a hashtable or JSON string. .EXAMPLE Set-GCPresenceDefinition -DefinitionId '12345678-1234-1234-1234-123456789012' -Body @{ languageLabels = @{ en_US = 'Updated Label' }; systemPresence = 'Away' } Updates the specified presence definition. .NOTES Genesys Cloud API: PUT /api/v2/presence/definitions/{definitionId} #> function Set-GCPresenceDefinition { [CmdletBinding()] param( [Parameter(Mandatory = $true)] [string]$DefinitionId, [Parameter(Mandatory = $true)] [object]$Body ) $endpoint = "presence/definitions/$DefinitionId" return Invoke-GCApiRequest -Endpoint $endpoint -Method PUT -Body $Body } |