Skip to content

CreateTimeOffRequest

Source code in docs_src/capo_connectscheduling/types/create_time_off_request.py
class CreateTimeOffRequest(TypedDict, closed=True):
    instance_id: "capo_connectscheduling.types.instance_id_or_arn.InstanceIdOrArn"
    """<p>The identifier of the Connect Customer instance. This can be the ID or the ARN of the instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>"""
    user_id: "capo_connectscheduling.types.user_id_or_arn.UserIdOrArn"
    """<p>The identifier of the user who the time off request is for. This can be the ID or the ARN of the user.</p>"""
    shift_activity_id: (
        "capo_connectscheduling.types.shift_activity_id_or_arn.ShiftActivityIdOrArn"
    )
    """<p>The identifier of the shift activity that defines the type of time off being requested. This can be the ID or the ARN of the shift activity. It must be a time off activity. Activities that aren't set as <i>Requestable</i> are accepted.</p>"""
    start_at: "datetime.datetime"
    """<p>The start of the time off window, inclusive. It must be no earlier than one year before the current date. Connect Customer stores the value as sent, to the millisecond.</p>"""
    end_at: "datetime.datetime"
    """<p>The end of the time off window, exclusive. It must be after <code>StartAt</code> and no later than 24 months after the current date. Connect Customer stores the value as sent, to the millisecond.</p>"""
    description: NotRequired["capo_connectscheduling.types.description.Description"]
    """<p>A description recorded on the time off request. If you omit it, the request has no description.</p>"""
    approval_type: "capo_connectscheduling.types.approval_type.ApprovalType"
    """<p>Controls who approves the request. <code>AWAIT_APPROVAL</code> waits for an <code>ApproveTimeOff</code> or <code>RejectTimeOff</code> call. <code>AUTOMATIC</code> has Connect Customer decide the request. For details, see <code>CreateTimeOff</code>.</p>"""
    rule_failure_action: NotRequired[
        "capo_connectscheduling.types.rule_failure_action.RuleFailureAction"
    ]
    """<p>Controls what happens when a configured rule fails. <code>REJECT</code>, the default, records an <code>ERROR</code> and ends the request <code>REJECTED</code>, unless the whole window is in the past. <code>OVERRIDE</code> records a <code>WARNING</code> and ends the request <code>APPROVED</code>, like the <i>Override time off rules</i> option in the Connect Customer admin website. <code>OVERRIDE</code> requires <code>AUTOMATIC</code>. With <code>AWAIT_APPROVAL</code>, <code>OVERRIDE</code> fails with <code>ValidationException</code>. Set it on <code>ApproveTimeOff</code> instead. <code>OVERRIDE</code> never waives <code>CONFLICTING_TIME_OFF_REQUEST</code>.</p>"""
    client_token: NotRequired["capo_connectscheduling.types.client_token.ClientToken"]
    """<p>A unique, case-sensitive identifier that you provide to ensure that the operation completes no more than one time. If this token matches a previous request, Connect Customer returns the result of that request and doesn't create another time off request. If you don't provide a token, the AWS SDK populates this field. If you reuse a client token with a different request body, the request fails with <code>ValidationException</code>. For more information about idempotency, see <a href="https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.</p>"""

approval_type instance-attribute

approval_type: ApprovalType

Controls who approves the request. AWAIT_APPROVAL waits for an ApproveTimeOff or RejectTimeOff call. AUTOMATIC has Connect Customer decide the request. For details, see CreateTimeOff.

client_token instance-attribute

client_token: NotRequired[ClientToken]

A unique, case-sensitive identifier that you provide to ensure that the operation completes no more than one time. If this token matches a previous request, Connect Customer returns the result of that request and doesn't create another time off request. If you don't provide a token, the AWS SDK populates this field. If you reuse a client token with a different request body, the request fails with ValidationException. For more information about idempotency, see Making retries safe with idempotent APIs.

description instance-attribute

description: NotRequired[Description]

A description recorded on the time off request. If you omit it, the request has no description.

end_at instance-attribute

end_at: datetime

The end of the time off window, exclusive. It must be after StartAt and no later than 24 months after the current date. Connect Customer stores the value as sent, to the millisecond.

instance_id instance-attribute

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.

rule_failure_action instance-attribute

rule_failure_action: NotRequired[RuleFailureAction]

Controls what happens when a configured rule fails. REJECT, the default, records an ERROR and ends the request REJECTED, unless the whole window is in the past. OVERRIDE records a WARNING and ends the request APPROVED, like the Override time off rules option in the Connect Customer admin website. OVERRIDE requires AUTOMATIC. With AWAIT_APPROVAL, OVERRIDE fails with ValidationException. Set it on ApproveTimeOff instead. OVERRIDE never waives CONFLICTING_TIME_OFF_REQUEST.

shift_activity_id instance-attribute

shift_activity_id: ShiftActivityIdOrArn

The identifier of the shift activity that defines the type of time off being requested. This can be the ID or the ARN of the shift activity. It must be a time off activity. Activities that aren't set as Requestable are accepted.

start_at instance-attribute

start_at: datetime

The start of the time off window, inclusive. It must be no earlier than one year before the current date. Connect Customer stores the value as sent, to the millisecond.

user_id instance-attribute

user_id: UserIdOrArn

The identifier of the user who the time off request is for. This can be the ID or the ARN of the user.