Private/New-ConnectorSyncSessionOperation.ps1

function New-UserProvisioningSyncSessionOperation {
    [CmdletBinding()]
    [OutputType([hashtable])]

    Param(
        # The action to perform. Possible values are 'Create', 'Update', 'Delete'.
        [Parameter(Mandatory = $true)]
        [ValidateSet("Set-ADUser", "Remove-ADObject", "New-ADUser", "Rename-ADObject", "Move-ADObject", "Patch Entra ID User")]
        [string]$Action,

        # A hashtable of parameters required for the operation.
        [Parameter(Mandatory = $false)]
        [hashtable]$Parameters = @{},

        # A hashtable of old values for the operation.
        [Parameter(Mandatory = $false)]
        [hashtable]$OldValues = @{},

        # The identity of the object to operate on (e.g. sAMAccountName or DistinguishedName).
        [Parameter(Mandatory = $true)]
        [string]$Identity,

        # The identity of the object to operate on (e.g. sAMAccountName or DistinguishedName).
        [Parameter(Mandatory = $true)]
        [string]$IAMCoreIdentityId,

        # The identity of the object to operate on (e.g. sAMAccountName or DistinguishedName).
        [Parameter(Mandatory = $false)]
        [string]$ADDN
    )

    Process {
        return @{
            Identity          = $Identity
            Action            = $Action
            Parameters        = $Parameters
            OldValues         = $OldValues
            IAMCoreIdentityId = $IAMCoreIdentityId
            ADDN              = $ADDN
        }
    }
}