Approves a time off request. Evaluates agent time off balances and group time off allowances before approving.
RuleFailureAction controls what happens when these evaluations fail. The request is rejected with
CONFLICTING_TIME_OFF_REQUEST if it overlaps another time off request for the user that is
APPROVED or being approved.
The time off request is processed asynchronously, so a successful call doesn't indicate the final status. Read the resulting status with
GetTimeOff or from the time off state-change events.
Approving an
APPROVED request succeeds without a change. Approving a
REJECTED request evaluates the rules again, so it can end
APPROVED or
REJECTED, and repeating the call can give a different result. Check the status with
GetTimeOff before you retry.
Returns
ConflictException if the request is
PENDING or
CANCELLED.
PENDING means Connect Customer is still processing the request asynchronously. Wait until
GetTimeOff returns a status other than
PENDING, and then retry.
When the approval succeeds, Connect Customer cancels any overtime or voluntary time off activity that overlaps the approved window. Connect Customer doesn't check whether the principal that calls this operation supervises the user. The staffing group's approval settings also don't apply. IAM permissions are the only control. If you allow a principal to call this operation, that principal can send
RuleFailureActionOVERRIDE and approve a request past failed rules. Grant permission for this operation only to principals that you trust to override time off rules.