reject_time_off
async
¶
reject_time_off(
instance_id: InstanceIdOrArn,
user_id: UserIdOrArn,
time_off_id: TimeOffId,
*,
config_overrides: Optional[AsyncConnectSchedulingClientConfig] = None,
description: Optional[Description] = None,
) -> RejectTimeOffResponse
Rejects a time off request.
Rejecting a REJECTED request succeeds without a change. 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.
Parameters:
-
instance_id(InstanceIdOrArn) –The identifier of the Connect Customer instance. This can be the ID or the ARN of the instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
-
user_id(UserIdOrArn) –The identifier of the user who the time off request belongs to. This can be the ID or the ARN of the user.
-
time_off_id(TimeOffId) –The unique identifier of the time off request to reject. If the time off request doesn't belong to
UserId, the operation returnsResourceNotFoundException. -
description(Optional[Description], default:None) –A description recorded with the rejection, such as the reason.
GetTimeOffdoesn't return it.
Raises:
-
AccessDeniedException–You do not have sufficient permissions to perform this action.
-
ConflictException–The request could not be processed because of a conflict with the current state of the resource.
-
InternalServerException–The request processing failed because of an error or failure with the service.
-
ResourceNotFoundException–The specified resource was not found.
-
ThrottlingException–The request was denied due to request throttling.
-
ValidationException–The input fails to satisfy the constraints specified by an AWS service.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To reject a time off request The following example rejects a time off request and records the reason on the rejection.
>>> await client.reject_time_off(instance_id='12345678-1234-1234-1234-123456789012', user_id='87654321-4321-4321-4321-210987654321', time_off_id='abcdef12-3456-7890-abcd-ef1234567890', description='Not enough coverage for this shift')
Source code in docs_src/capo_connectscheduling/_services/async_connect_scheduling.py
589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 | |