CreateQuantumTask - Braket

CreateQuantumTask

Creates a quantum task.

Request Syntax

POST /quantum-task HTTP/1.1 Content-type: application/json { "action": "string", "clientToken": "string", "deviceArn": "string", "deviceParameters": "string", "outputS3Bucket": "string", "outputS3KeyPrefix": "string", "shots": number, "tags": { "string" : "string" } }

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request accepts the following data in JSON format.

action

The action associated with the task.

Type: String

Required: Yes

clientToken

The client token associated with the request.

Type: String

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

Required: Yes

deviceArn

The ARN of the device to run the task on.

Type: String

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

Required: Yes

deviceParameters

The parameters for the device to run the task on.

Type: String

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

Required: No

outputS3Bucket

The S3 bucket to store task result files in.

Type: String

Length Constraints: Minimum length of 3. Maximum length of 63.

Required: Yes

outputS3KeyPrefix

The key prefix for the location in the S3 bucket to store task results in.

Type: String

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

Required: Yes

shots

The number of shots to use for the task.

Type: Long

Valid Range: Minimum value of 0.

Required: Yes

tags

Tags to be added to the quantum task you're creating.

Type: String to string map

Required: No

Response Syntax

HTTP/1.1 201 Content-type: application/json { "quantumTaskArn": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 201 response.

The following data is returned in JSON format by the service.

quantumTaskArn

The ARN of the task created by the request.

Type: String

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

Errors

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

AccessDeniedException

You do not have sufficient access to perform this action.

HTTP Status Code: 403

DeviceOfflineException

The specified device is currently offline.

HTTP Status Code: 424

InternalServiceException

The request processing has failed because of an unknown error, exception, or failure.

HTTP Status Code: 500

ServiceQuotaExceededException

The request failed because a service quota is exceeded.

HTTP Status Code: 402

ThrottlingException

The throttling rate limit is met.

HTTP Status Code: 429

ValidationException

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

HTTP Status Code: 400

See Also

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