Interface ConnectSchedulingClient
- All Superinterfaces:
AutoCloseable,AwsClient,SdkAutoCloseable,SdkClient
builder()
method.
Use the Amazon Connect Scheduling API to work programmatically with Connect Customer forecasting, capacity planning, and scheduling, and to integrate these capabilities with your own systems. In the Connect Customer admin website, you use them to forecast contact volume, plan capacity, and create and manage agent schedules.
For more information, see Forecasting & agent scheduling in the Connect Customer Administrator Guide.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringValue for looking up the service's metadata from theServiceMetadataProvider.static final String -
Method Summary
Modifier and TypeMethodDescriptiondefault ApproveTimeOffResponseapproveTimeOff(Consumer<ApproveTimeOffRequest.Builder> approveTimeOffRequest) Approves a time off request.default ApproveTimeOffResponseapproveTimeOff(ApproveTimeOffRequest approveTimeOffRequest) Approves a time off request.builder()Create a builder that can be used to configure and create aConnectSchedulingClient.default CancelTimeOffResponsecancelTimeOff(Consumer<CancelTimeOffRequest.Builder> cancelTimeOffRequest) Cancels a time off request.default CancelTimeOffResponsecancelTimeOff(CancelTimeOffRequest cancelTimeOffRequest) Cancels a time off request.static ConnectSchedulingClientcreate()Create aConnectSchedulingClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.default CreateTimeOffResponsecreateTimeOff(Consumer<CreateTimeOffRequest.Builder> createTimeOffRequest) Creates a time off request for a user.default CreateTimeOffResponsecreateTimeOff(CreateTimeOffRequest createTimeOffRequest) Creates a time off request for a user.default GetTimeOffResponsegetTimeOff(Consumer<GetTimeOffRequest.Builder> getTimeOffRequest) Returns a time off request, including its current status and validation results.default GetTimeOffResponsegetTimeOff(GetTimeOffRequest getTimeOffRequest) Returns a time off request, including its current status and validation results.default PutTimeOffBalanceResponseputTimeOffBalance(Consumer<PutTimeOffBalanceRequest.Builder> putTimeOffBalanceRequest) Sets the time off balance for one user and shift activity.default PutTimeOffBalanceResponseputTimeOffBalance(PutTimeOffBalanceRequest putTimeOffBalanceRequest) Sets the time off balance for one user and shift activity.default RejectTimeOffResponserejectTimeOff(Consumer<RejectTimeOffRequest.Builder> rejectTimeOffRequest) Rejects a time off request.default RejectTimeOffResponserejectTimeOff(RejectTimeOffRequest rejectTimeOffRequest) Rejects a time off request.The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfigurationstatic ServiceMetadataMethods inherited from interface software.amazon.awssdk.utils.SdkAutoCloseable
closeMethods inherited from interface software.amazon.awssdk.core.SdkClient
serviceName
-
Field Details
-
SERVICE_NAME
- See Also:
-
SERVICE_METADATA_ID
Value for looking up the service's metadata from theServiceMetadataProvider.- See Also:
-
-
Method Details
-
approveTimeOff
default ApproveTimeOffResponse approveTimeOff(ApproveTimeOffRequest approveTimeOffRequest) throws InternalServerException, ValidationException, ThrottlingException, AccessDeniedException, ConflictException, ResourceNotFoundException, AwsServiceException, SdkClientException, ConnectSchedulingException Approves a time off request. Evaluates agent time off balances and group time off allowances before approving.
RuleFailureActioncontrols what happens when these evaluations fail. The request is rejected withCONFLICTING_TIME_OFF_REQUESTif it overlaps another time off request for the user that isAPPROVEDor being approved.The time off request is processed asynchronously, so a successful call doesn't indicate the final status. Read the resulting status with
GetTimeOffor from the time off state-change events.Approving an
APPROVEDrequest succeeds without a change. Approving aREJECTEDrequest evaluates the rules again, so it can endAPPROVEDorREJECTED, and repeating the call can give a different result. Check the status withGetTimeOffbefore you retry.Returns
ConflictExceptionif the request isPENDINGorCANCELLED.PENDINGmeans Connect Customer is still processing the request asynchronously. Wait untilGetTimeOffreturns a status other thanPENDING, 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
RuleFailureActionOVERRIDEand approve a request past failed rules. Grant permission for this operation only to principals that you trust to override time off rules.- Parameters:
approveTimeOffRequest- The request forApproveTimeOff.- Returns:
- Result of the ApproveTimeOff operation returned by the service.
- See Also:
-
approveTimeOff
default ApproveTimeOffResponse approveTimeOff(Consumer<ApproveTimeOffRequest.Builder> approveTimeOffRequest) throws InternalServerException, ValidationException, ThrottlingException, AccessDeniedException, ConflictException, ResourceNotFoundException, AwsServiceException, SdkClientException, ConnectSchedulingException Approves a time off request. Evaluates agent time off balances and group time off allowances before approving.
RuleFailureActioncontrols what happens when these evaluations fail. The request is rejected withCONFLICTING_TIME_OFF_REQUESTif it overlaps another time off request for the user that isAPPROVEDor being approved.The time off request is processed asynchronously, so a successful call doesn't indicate the final status. Read the resulting status with
GetTimeOffor from the time off state-change events.Approving an
APPROVEDrequest succeeds without a change. Approving aREJECTEDrequest evaluates the rules again, so it can endAPPROVEDorREJECTED, and repeating the call can give a different result. Check the status withGetTimeOffbefore you retry.Returns
ConflictExceptionif the request isPENDINGorCANCELLED.PENDINGmeans Connect Customer is still processing the request asynchronously. Wait untilGetTimeOffreturns a status other thanPENDING, 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
RuleFailureActionOVERRIDEand approve a request past failed rules. Grant permission for this operation only to principals that you trust to override time off rules.
This is a convenience which creates an instance of the
ApproveTimeOffRequest.Builderavoiding the need to create one manually viaApproveTimeOffRequest.builder()- Parameters:
approveTimeOffRequest- AConsumerthat will call methods onApproveTimeOffRequest.Builderto create a request. The request forApproveTimeOff.- Returns:
- Result of the ApproveTimeOff operation returned by the service.
- See Also:
-
cancelTimeOff
default CancelTimeOffResponse cancelTimeOff(CancelTimeOffRequest cancelTimeOffRequest) throws InternalServerException, ValidationException, ThrottlingException, AccessDeniedException, ConflictException, ResourceNotFoundException, AwsServiceException, SdkClientException, ConnectSchedulingException Cancels a time off request.
Cancelling a
CANCELLEDrequest succeeds without a change. ReturnsConflictExceptionif the request isPENDING, which means Connect Customer is still processing the request asynchronously. Wait untilGetTimeOffreturns a status other thanPENDING, and then retry.- Parameters:
cancelTimeOffRequest- The request forCancelTimeOff.- Returns:
- Result of the CancelTimeOff operation returned by the service.
- See Also:
-
cancelTimeOff
default CancelTimeOffResponse cancelTimeOff(Consumer<CancelTimeOffRequest.Builder> cancelTimeOffRequest) throws InternalServerException, ValidationException, ThrottlingException, AccessDeniedException, ConflictException, ResourceNotFoundException, AwsServiceException, SdkClientException, ConnectSchedulingException Cancels a time off request.
Cancelling a
CANCELLEDrequest succeeds without a change. ReturnsConflictExceptionif the request isPENDING, which means Connect Customer is still processing the request asynchronously. Wait untilGetTimeOffreturns a status other thanPENDING, and then retry.
This is a convenience which creates an instance of the
CancelTimeOffRequest.Builderavoiding the need to create one manually viaCancelTimeOffRequest.builder()- Parameters:
cancelTimeOffRequest- AConsumerthat will call methods onCancelTimeOffRequest.Builderto create a request. The request forCancelTimeOff.- Returns:
- Result of the CancelTimeOff operation returned by the service.
- See Also:
-
createTimeOff
default CreateTimeOffResponse createTimeOff(CreateTimeOffRequest createTimeOffRequest) throws ServiceQuotaExceededException, InternalServerException, ValidationException, ThrottlingException, AccessDeniedException, ConflictException, ResourceNotFoundException, AwsServiceException, SdkClientException, ConnectSchedulingException Creates a time off request for a user. You don't provide a status, because Connect Customer owns the request lifecycle. To get the decided status, call
GetTimeOffor use the time off state-change events.ApprovalTypecontrols who approves the request. You can specify one of the following values:-
AWAIT_APPROVAL: the request waits inAWAITING_APPROVALuntil you callApproveTimeOfforRejectTimeOff. Rule evaluation and the overlap check run at approval, not at creation. A waiting request doesn't reserve its window, so another request for the same window can be approved first. -
AUTOMATIC: Connect Customer evaluates the rules (time off balances and group allowances) and decides the request. The request can bePENDINGwhile Connect Customer decides, and then endsAPPROVEDorREJECTED. If it overlaps another time off request for the user, the requested time off endsREJECTEDwithCONFLICTING_TIME_OFF_REQUEST. It also endsREJECTEDif it overlaps overtime or voluntary time off. If the whole window is in the past, Connect Customer records failed rules asWARNINGand doesn't reject the request, whatever theRuleFailureAction.
The staffing group's Supervisor approval needed setting doesn't apply to this operation.
ApprovalTypealone decides whether the request waits for approval. The operation fails withValidationExceptiononUserIdin the following cases:-
The user isn't in a staffing group, or the staffing group isn't associated with a forecast group.
-
Time off isn't enabled for the user's staffing group, or the user's staff rules don't allow time off.
To change the dates of a request, cancel it with
CancelTimeOffand create a new request. The new request has a newTimeOffId.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
ApprovalTypeAUTOMATICwithRuleFailureActionOVERRIDEand approve a request past failed rules. Grant permission for this operation only to principals that you trust to override time off rules.For information about time off in the Connect Customer admin website, see Time off management in the Connect Customer Administrator Guide.
- Parameters:
createTimeOffRequest- The request forCreateTimeOff.- Returns:
- Result of the CreateTimeOff operation returned by the service.
- See Also:
-
-
createTimeOff
default CreateTimeOffResponse createTimeOff(Consumer<CreateTimeOffRequest.Builder> createTimeOffRequest) throws ServiceQuotaExceededException, InternalServerException, ValidationException, ThrottlingException, AccessDeniedException, ConflictException, ResourceNotFoundException, AwsServiceException, SdkClientException, ConnectSchedulingException Creates a time off request for a user. You don't provide a status, because Connect Customer owns the request lifecycle. To get the decided status, call
GetTimeOffor use the time off state-change events.ApprovalTypecontrols who approves the request. You can specify one of the following values:-
AWAIT_APPROVAL: the request waits inAWAITING_APPROVALuntil you callApproveTimeOfforRejectTimeOff. Rule evaluation and the overlap check run at approval, not at creation. A waiting request doesn't reserve its window, so another request for the same window can be approved first. -
AUTOMATIC: Connect Customer evaluates the rules (time off balances and group allowances) and decides the request. The request can bePENDINGwhile Connect Customer decides, and then endsAPPROVEDorREJECTED. If it overlaps another time off request for the user, the requested time off endsREJECTEDwithCONFLICTING_TIME_OFF_REQUEST. It also endsREJECTEDif it overlaps overtime or voluntary time off. If the whole window is in the past, Connect Customer records failed rules asWARNINGand doesn't reject the request, whatever theRuleFailureAction.
The staffing group's Supervisor approval needed setting doesn't apply to this operation.
ApprovalTypealone decides whether the request waits for approval. The operation fails withValidationExceptiononUserIdin the following cases:-
The user isn't in a staffing group, or the staffing group isn't associated with a forecast group.
-
Time off isn't enabled for the user's staffing group, or the user's staff rules don't allow time off.
To change the dates of a request, cancel it with
CancelTimeOffand create a new request. The new request has a newTimeOffId.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
ApprovalTypeAUTOMATICwithRuleFailureActionOVERRIDEand approve a request past failed rules. Grant permission for this operation only to principals that you trust to override time off rules.For information about time off in the Connect Customer admin website, see Time off management in the Connect Customer Administrator Guide.
This is a convenience which creates an instance of the
CreateTimeOffRequest.Builderavoiding the need to create one manually viaCreateTimeOffRequest.builder()- Parameters:
createTimeOffRequest- AConsumerthat will call methods onCreateTimeOffRequest.Builderto create a request. The request forCreateTimeOff.- Returns:
- Result of the CreateTimeOff operation returned by the service.
- See Also:
-
-
getTimeOff
default GetTimeOffResponse getTimeOff(GetTimeOffRequest getTimeOffRequest) throws InternalServerException, ValidationException, ThrottlingException, AccessDeniedException, ResourceNotFoundException, AwsServiceException, SdkClientException, ConnectSchedulingException Returns a time off request, including its current status and validation results.
- Parameters:
getTimeOffRequest- The request forGetTimeOff.- Returns:
- Result of the GetTimeOff operation returned by the service.
- See Also:
-
getTimeOff
default GetTimeOffResponse getTimeOff(Consumer<GetTimeOffRequest.Builder> getTimeOffRequest) throws InternalServerException, ValidationException, ThrottlingException, AccessDeniedException, ResourceNotFoundException, AwsServiceException, SdkClientException, ConnectSchedulingException Returns a time off request, including its current status and validation results.
This is a convenience which creates an instance of the
GetTimeOffRequest.Builderavoiding the need to create one manually viaGetTimeOffRequest.builder()- Parameters:
getTimeOffRequest- AConsumerthat will call methods onGetTimeOffRequest.Builderto create a request. The request forGetTimeOff.- Returns:
- Result of the GetTimeOff operation returned by the service.
- See Also:
-
putTimeOffBalance
default PutTimeOffBalanceResponse putTimeOffBalance(PutTimeOffBalanceRequest putTimeOffBalanceRequest) throws InternalServerException, ValidationException, ThrottlingException, AccessDeniedException, ConflictException, ResourceNotFoundException, AwsServiceException, SdkClientException, ConnectSchedulingException Sets the time off balance for one user and shift activity. The value replaces the existing balance rather than adjusting it, so you can safely retry the call. This operation can't remove a balance. To remove one, upload a blank balance in the Connect Customer admin website. For more information, see Import an agent's time off balance in the Connect Customer Administrator Guide.
- Parameters:
putTimeOffBalanceRequest- The request forPutTimeOffBalance.- Returns:
- Result of the PutTimeOffBalance operation returned by the service.
- See Also:
-
putTimeOffBalance
default PutTimeOffBalanceResponse putTimeOffBalance(Consumer<PutTimeOffBalanceRequest.Builder> putTimeOffBalanceRequest) throws InternalServerException, ValidationException, ThrottlingException, AccessDeniedException, ConflictException, ResourceNotFoundException, AwsServiceException, SdkClientException, ConnectSchedulingException Sets the time off balance for one user and shift activity. The value replaces the existing balance rather than adjusting it, so you can safely retry the call. This operation can't remove a balance. To remove one, upload a blank balance in the Connect Customer admin website. For more information, see Import an agent's time off balance in the Connect Customer Administrator Guide.
This is a convenience which creates an instance of the
PutTimeOffBalanceRequest.Builderavoiding the need to create one manually viaPutTimeOffBalanceRequest.builder()- Parameters:
putTimeOffBalanceRequest- AConsumerthat will call methods onPutTimeOffBalanceRequest.Builderto create a request. The request forPutTimeOffBalance.- Returns:
- Result of the PutTimeOffBalance operation returned by the service.
- See Also:
-
rejectTimeOff
default RejectTimeOffResponse rejectTimeOff(RejectTimeOffRequest rejectTimeOffRequest) throws InternalServerException, ValidationException, ThrottlingException, AccessDeniedException, ConflictException, ResourceNotFoundException, AwsServiceException, SdkClientException, ConnectSchedulingException Rejects a time off request.
Rejecting a
REJECTEDrequest succeeds without a change. ReturnsConflictExceptionif the request isPENDINGorCANCELLED.PENDINGmeans Connect Customer is still processing the request asynchronously. Wait untilGetTimeOffreturns a status other thanPENDING, and then retry.- Parameters:
rejectTimeOffRequest- The request forRejectTimeOff.- Returns:
- Result of the RejectTimeOff operation returned by the service.
- See Also:
-
rejectTimeOff
default RejectTimeOffResponse rejectTimeOff(Consumer<RejectTimeOffRequest.Builder> rejectTimeOffRequest) throws InternalServerException, ValidationException, ThrottlingException, AccessDeniedException, ConflictException, ResourceNotFoundException, AwsServiceException, SdkClientException, ConnectSchedulingException Rejects a time off request.
Rejecting a
REJECTEDrequest succeeds without a change. ReturnsConflictExceptionif the request isPENDINGorCANCELLED.PENDINGmeans Connect Customer is still processing the request asynchronously. Wait untilGetTimeOffreturns a status other thanPENDING, and then retry.
This is a convenience which creates an instance of the
RejectTimeOffRequest.Builderavoiding the need to create one manually viaRejectTimeOffRequest.builder()- Parameters:
rejectTimeOffRequest- AConsumerthat will call methods onRejectTimeOffRequest.Builderto create a request. The request forRejectTimeOff.- Returns:
- Result of the RejectTimeOff operation returned by the service.
- See Also:
-
create
Create aConnectSchedulingClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider. -
builder
Create a builder that can be used to configure and create aConnectSchedulingClient. -
serviceMetadata
-
serviceClientConfiguration
Description copied from interface:SdkClientThe SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration- Specified by:
serviceClientConfigurationin interfaceAwsClient- Specified by:
serviceClientConfigurationin interfaceSdkClient- Returns:
- SdkServiceClientConfiguration
-