View a markdown version of this page

RejectTimeOff - Amazon Connect Customer

RejectTimeOff

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.

Request Syntax

POST /scheduling/instances/InstanceId/users/UserId/timeoffs/TimeOffId/reject HTTP/1.1 Content-type: application/json { "Description": "string" }

URI Request Parameters

The request uses the following URI parameters.

InstanceId

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.

Length Constraints: Minimum length of 1. Maximum length of 250.

Pattern: (arn:(aws|aws-us-gov):connect:[a-z]{2}(-[a-z]+){1,2}-[0-9]{1}:[0-9]{1,20}:instance/)?[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}

Required: Yes

TimeOffId

The unique identifier of the time off request to reject. If the time off request doesn't belong to UserId, the operation returns ResourceNotFoundException.

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [a-z0-9-]+

Required: Yes

UserId

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

Length Constraints: Minimum length of 1. Maximum length of 255.

Required: Yes

Request Body

The request accepts the following data in JSON format.

Description

A description recorded with the rejection, such as the reason. GetTimeOff doesn't return it.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 500.

Required: No

Response Syntax

HTTP/1.1 200

Response Elements

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

Errors

For information about the errors that are common to all actions, see Common Error Types.

AccessDeniedException

You do not have sufficient permissions to perform this action.

HTTP Status Code: 403

ConflictException

The request could not be processed because of a conflict with the current state of the resource.

ResourceId

The identifier or ARN of the resource that is in conflict.

ResourceType

The type of the resource that is in conflict.

HTTP Status Code: 409

InternalServerException

The request processing failed because of an error or failure with the service.

RetryAfterSeconds

The number of seconds to wait before retrying.

HTTP Status Code: 500

ResourceNotFoundException

The specified resource was not found.

ResourceId

The identifier or ARN of the resource that was not found.

ResourceType

The type of the resource that was not found.

HTTP Status Code: 404

ThrottlingException

The request was denied due to request throttling.

QuotaCode

The code of the quota that was throttled, for use with the Service Quotas API.

RetryAfterSeconds

The number of seconds to wait before retrying.

ServiceCode

The code of the service that owns the quota.

HTTP Status Code: 429

ValidationException

The input fails to satisfy the constraints specified by an AWS service.

FieldList

The specific input fields that failed validation, when Reason is FIELD_VALIDATION_FAILED.

Reason

The reason the input failed validation. Branch on this value rather than on the message wording.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: