Braket 2019-09-01
- Client: Aws\Braket\BraketClient
- Service ID: braket
- Version: 2019-09-01
This page describes the parameters and results for the operations of the Braket (2019-09-01), and shows how to use the Aws\Braket\BraketClient object to call the described operations. This documentation is specific to the 2019-09-01 API version of the service.
Operation Summary
Each of the following operations can be created from a client using
$client->getCommand('CommandName')
, where "CommandName" is the
name of one of the following operations. Note: a command is a value that
encapsulates an operation and the parameters used to create an HTTP request.
You can also create and send a command immediately using the magic methods
available on a client object: $client->commandName(/* parameters */)
.
You can send the command asynchronously (returning a promise) by appending the
word "Async" to the operation name: $client->commandNameAsync(/* parameters */)
.
- CancelQuantumTask ( array $params = [] )
Cancels the specified task.
- CreateQuantumTask ( array $params = [] )
Creates a quantum task.
- GetDevice ( array $params = [] )
Retrieves the devices available in Amazon Braket.
- GetQuantumTask ( array $params = [] )
Retrieves the specified quantum task.
- ListTagsForResource ( array $params = [] )
Shows the tags associated with this resource.
- SearchDevices ( array $params = [] )
Searches for devices using the specified filters.
- SearchQuantumTasks ( array $params = [] )
Searches for tasks that match the specified filter values.
- TagResource ( array $params = [] )
Add a tag to the specified resource.
- UntagResource ( array $params = [] )
Remove tags from a resource.
Paginators
Paginators handle automatically iterating over paginated API results. Paginators are associated with specific API operations, and they accept the parameters that the corresponding API operation accepts. You can get a paginator from a client class using getPaginator($paginatorName, $operationParameters). This client supports the following paginators:
Operations
CancelQuantumTask
$result = $client->cancelQuantumTask
([/* ... */]); $promise = $client->cancelQuantumTaskAsync
([/* ... */]);
Cancels the specified task.
Parameter Syntax
$result = $client->cancelQuantumTask([ 'clientToken' => '<string>', // REQUIRED 'quantumTaskArn' => '<string>', // REQUIRED ]);
Parameter Details
Members
Result Syntax
[ 'cancellationStatus' => 'CANCELLING|CANCELLED', 'quantumTaskArn' => '<string>', ]
Result Details
Members
Errors
-
The specified resource was not found.
-
You do not have sufficient access to perform this action.
-
An error occurred due to a conflict.
-
The throttling rate limit is met.
-
The request processing has failed because of an unknown error, exception, or failure.
-
The input fails to satisfy the constraints specified by an AWS service.
CreateQuantumTask
$result = $client->createQuantumTask
([/* ... */]); $promise = $client->createQuantumTaskAsync
([/* ... */]);
Creates a quantum task.
Parameter Syntax
$result = $client->createQuantumTask([ 'action' => '<string>', // REQUIRED 'clientToken' => '<string>', // REQUIRED 'deviceArn' => '<string>', // REQUIRED 'deviceParameters' => '<string>', 'outputS3Bucket' => '<string>', // REQUIRED 'outputS3KeyPrefix' => '<string>', // REQUIRED 'shots' => <integer>, // REQUIRED 'tags' => ['<string>', ...], ]);
Parameter Details
Members
- action
-
- Required: Yes
- Type: string (string|number|array|map or anything parsable by json_encode)
The action associated with the task.
- clientToken
-
- Required: Yes
- Type: string
The client token associated with the request.
- deviceArn
-
- Required: Yes
- Type: string
The ARN of the device to run the task on.
- deviceParameters
-
- Type: string (string|number|array|map or anything parsable by json_encode)
The parameters for the device to run the task on.
- outputS3Bucket
-
- Required: Yes
- Type: string
The S3 bucket to store task result files in.
- outputS3KeyPrefix
-
- Required: Yes
- Type: string
The key prefix for the location in the S3 bucket to store task results in.
- shots
-
- Required: Yes
- Type: long (int|float)
The number of shots to use for the task.
- tags
-
- Type: Associative array of custom strings keys (String) to strings
Tags to be added to the quantum task you're creating.
Result Syntax
[ 'quantumTaskArn' => '<string>', ]
Result Details
Errors
-
You do not have sufficient access to perform this action.
-
The throttling rate limit is met.
-
The specified device is currently offline.
-
The request processing has failed because of an unknown error, exception, or failure.
-
ServiceQuotaExceededException:
The request failed because a service quota is exceeded.
-
The input fails to satisfy the constraints specified by an AWS service.
GetDevice
$result = $client->getDevice
([/* ... */]); $promise = $client->getDeviceAsync
([/* ... */]);
Retrieves the devices available in Amazon Braket.
Parameter Syntax
$result = $client->getDevice([ 'deviceArn' => '<string>', // REQUIRED ]);
Parameter Details
Result Syntax
[ 'deviceArn' => '<string>', 'deviceCapabilities' => '<string>', 'deviceName' => '<string>', 'deviceStatus' => 'ONLINE|OFFLINE', 'deviceType' => 'QPU|SIMULATOR', 'providerName' => '<string>', ]
Result Details
Members
- deviceArn
-
- Required: Yes
- Type: string
The ARN of the device.
- deviceCapabilities
-
- Required: Yes
- Type: string (string|number|array|map or anything parsable by json_encode)
Details about the capabilities of the device.
- deviceName
-
- Required: Yes
- Type: string
The name of the device.
- deviceStatus
-
- Required: Yes
- Type: string
The status of the device.
- deviceType
-
- Required: Yes
- Type: string
The type of the device.
- providerName
-
- Required: Yes
- Type: string
The name of the partner company for the device.
Errors
-
The specified resource was not found.
-
You do not have sufficient access to perform this action.
-
The throttling rate limit is met.
-
The request processing has failed because of an unknown error, exception, or failure.
-
The input fails to satisfy the constraints specified by an AWS service.
GetQuantumTask
$result = $client->getQuantumTask
([/* ... */]); $promise = $client->getQuantumTaskAsync
([/* ... */]);
Retrieves the specified quantum task.
Parameter Syntax
$result = $client->getQuantumTask([ 'quantumTaskArn' => '<string>', // REQUIRED ]);
Parameter Details
Result Syntax
[ 'createdAt' => <DateTime>, 'deviceArn' => '<string>', 'deviceParameters' => '<string>', 'endedAt' => <DateTime>, 'failureReason' => '<string>', 'outputS3Bucket' => '<string>', 'outputS3Directory' => '<string>', 'quantumTaskArn' => '<string>', 'shots' => <integer>, 'status' => 'CREATED|QUEUED|RUNNING|COMPLETED|FAILED|CANCELLING|CANCELLED', 'tags' => ['<string>', ...], ]
Result Details
Members
- createdAt
-
- Required: Yes
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time at which the task was created.
- deviceArn
-
- Required: Yes
- Type: string
The ARN of the device the task was run on.
- deviceParameters
-
- Required: Yes
- Type: string (string|number|array|map or anything parsable by json_encode)
The parameters for the device on which the task ran.
- endedAt
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time at which the task ended.
- failureReason
-
- Type: string
The reason that a task failed.
- outputS3Bucket
-
- Required: Yes
- Type: string
The S3 bucket where task results are stored.
- outputS3Directory
-
- Required: Yes
- Type: string
The folder in the S3 bucket where task results are stored.
- quantumTaskArn
-
- Required: Yes
- Type: string
The ARN of the task.
- shots
-
- Required: Yes
- Type: long (int|float)
The number of shots used in the task.
- status
-
- Required: Yes
- Type: string
The status of the task.
- tags
-
- Type: Associative array of custom strings keys (String) to strings
The tags that belong to this task.
Errors
-
The specified resource was not found.
-
You do not have sufficient access to perform this action.
-
The throttling rate limit is met.
-
The request processing has failed because of an unknown error, exception, or failure.
-
The input fails to satisfy the constraints specified by an AWS service.
ListTagsForResource
$result = $client->listTagsForResource
([/* ... */]); $promise = $client->listTagsForResourceAsync
([/* ... */]);
Shows the tags associated with this resource.
Parameter Syntax
$result = $client->listTagsForResource([ 'resourceArn' => '<string>', // REQUIRED ]);
Parameter Details
Members
Result Syntax
[ 'tags' => ['<string>', ...], ]
Result Details
Members
Errors
-
The specified resource was not found.
-
The request processing has failed because of an unknown error, exception, or failure.
-
The input fails to satisfy the constraints specified by an AWS service.
SearchDevices
$result = $client->searchDevices
([/* ... */]); $promise = $client->searchDevicesAsync
([/* ... */]);
Searches for devices using the specified filters.
Parameter Syntax
$result = $client->searchDevices([ 'filters' => [ // REQUIRED [ 'name' => '<string>', // REQUIRED 'values' => ['<string>', ...], // REQUIRED ], // ... ], 'maxResults' => <integer>, 'nextToken' => '<string>', ]);
Parameter Details
Members
- filters
-
- Required: Yes
- Type: Array of SearchDevicesFilter structures
The filter values to use to search for a device.
- maxResults
-
- Type: int
The maximum number of results to return in the response.
- nextToken
-
- Type: string
A token used for pagination of results returned in the response. Use the token returned from the previous request continue results where the previous request ended.
Result Syntax
[ 'devices' => [ [ 'deviceArn' => '<string>', 'deviceName' => '<string>', 'deviceStatus' => 'ONLINE|OFFLINE', 'deviceType' => 'QPU|SIMULATOR', 'providerName' => '<string>', ], // ... ], 'nextToken' => '<string>', ]
Result Details
Members
- devices
-
- Required: Yes
- Type: Array of DeviceSummary structures
An array of
DeviceSummary
objects for devices that match the specified filter values. - nextToken
-
- Type: string
A token used for pagination of results, or null if there are no additional results. Use the token value in a subsequent request to continue results where the previous request ended.
Errors
-
You do not have sufficient access to perform this action.
-
The throttling rate limit is met.
-
The request processing has failed because of an unknown error, exception, or failure.
-
The input fails to satisfy the constraints specified by an AWS service.
SearchQuantumTasks
$result = $client->searchQuantumTasks
([/* ... */]); $promise = $client->searchQuantumTasksAsync
([/* ... */]);
Searches for tasks that match the specified filter values.
Parameter Syntax
$result = $client->searchQuantumTasks([ 'filters' => [ // REQUIRED [ 'name' => '<string>', // REQUIRED 'operator' => 'LT|LTE|EQUAL|GT|GTE|BETWEEN', // REQUIRED 'values' => ['<string>', ...], // REQUIRED ], // ... ], 'maxResults' => <integer>, 'nextToken' => '<string>', ]);
Parameter Details
Members
- filters
-
- Required: Yes
- Type: Array of SearchQuantumTasksFilter structures
Array of
SearchQuantumTasksFilter
objects. - maxResults
-
- Type: int
Maximum number of results to return in the response.
- nextToken
-
- Type: string
A token used for pagination of results returned in the response. Use the token returned from the previous request continue results where the previous request ended.
Result Syntax
[ 'nextToken' => '<string>', 'quantumTasks' => [ [ 'createdAt' => <DateTime>, 'deviceArn' => '<string>', 'endedAt' => <DateTime>, 'outputS3Bucket' => '<string>', 'outputS3Directory' => '<string>', 'quantumTaskArn' => '<string>', 'shots' => <integer>, 'status' => 'CREATED|QUEUED|RUNNING|COMPLETED|FAILED|CANCELLING|CANCELLED', 'tags' => ['<string>', ...], ], // ... ], ]
Result Details
Members
- nextToken
-
- Type: string
A token used for pagination of results, or null if there are no additional results. Use the token value in a subsequent request to continue results where the previous request ended.
- quantumTasks
-
- Required: Yes
- Type: Array of QuantumTaskSummary structures
An array of
QuantumTaskSummary
objects for tasks that match the specified filters.
Errors
-
You do not have sufficient access to perform this action.
-
The throttling rate limit is met.
-
The request processing has failed because of an unknown error, exception, or failure.
-
The input fails to satisfy the constraints specified by an AWS service.
TagResource
$result = $client->tagResource
([/* ... */]); $promise = $client->tagResourceAsync
([/* ... */]);
Add a tag to the specified resource.
Parameter Syntax
$result = $client->tagResource([ 'resourceArn' => '<string>', // REQUIRED 'tags' => ['<string>', ...], // REQUIRED ]);
Parameter Details
Members
Result Syntax
[]
Result Details
Errors
-
The specified resource was not found.
-
The request processing has failed because of an unknown error, exception, or failure.
-
The input fails to satisfy the constraints specified by an AWS service.
UntagResource
$result = $client->untagResource
([/* ... */]); $promise = $client->untagResourceAsync
([/* ... */]);
Remove tags from a resource.
Parameter Syntax
$result = $client->untagResource([ 'resourceArn' => '<string>', // REQUIRED 'tagKeys' => ['<string>', ...], // REQUIRED ]);
Parameter Details
Members
Result Syntax
[]
Result Details
Errors
-
The specified resource was not found.
-
The request processing has failed because of an unknown error, exception, or failure.
-
The input fails to satisfy the constraints specified by an AWS service.
Shapes
AccessDeniedException
ConflictException
DeviceOfflineException
DeviceSummary
Description
Includes information about the device.
Members
- deviceArn
-
- Required: Yes
- Type: string
The ARN of the device.
- deviceName
-
- Required: Yes
- Type: string
The name of the device.
- deviceStatus
-
- Required: Yes
- Type: string
The status of the device.
- deviceType
-
- Required: Yes
- Type: string
The type of the device.
- providerName
-
- Required: Yes
- Type: string
The provider of the device.
InternalServiceException
Description
The request processing has failed because of an unknown error, exception, or failure.
Members
QuantumTaskSummary
Description
Includes information about a quantum task.
Members
- createdAt
-
- Required: Yes
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time at which the task was created.
- deviceArn
-
- Required: Yes
- Type: string
The ARN of the device the task ran on.
- endedAt
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time at which the task finished.
- outputS3Bucket
-
- Required: Yes
- Type: string
The S3 bucket where the task result file is stored..
- outputS3Directory
-
- Required: Yes
- Type: string
The folder in the S3 bucket where the task result file is stored.
- quantumTaskArn
-
- Required: Yes
- Type: string
The ARN of the task.
- shots
-
- Required: Yes
- Type: long (int|float)
The shots used for the task.
- status
-
- Required: Yes
- Type: string
The status of the task.
- tags
-
- Type: Associative array of custom strings keys (String) to strings
Displays the key, value pairs of tags associated with this quantum task.
ResourceNotFoundException
SearchDevicesFilter
Description
The filter to use for searching devices.
Members
SearchQuantumTasksFilter
Description
A filter to use to search for tasks.