@Generated(value="software.amazon.awssdk:codegen") @ThreadSafe public interface BraketAsyncClient extends AwsClient
builder() method.
The Amazon Braket API Reference provides information about the operations and structures supported in Amazon Braket.
Additional Resources:
| Modifier and Type | Field and Description |
|---|---|
static String |
SERVICE_METADATA_ID
Value for looking up the service's metadata from the
ServiceMetadataProvider. |
static String |
SERVICE_NAME |
| Modifier and Type | Method and Description |
|---|---|
static BraketAsyncClientBuilder |
builder()
Create a builder that can be used to configure and create a
BraketAsyncClient. |
default CompletableFuture<CancelJobResponse> |
cancelJob(CancelJobRequest cancelJobRequest)
Cancels an Amazon Braket job.
|
default CompletableFuture<CancelJobResponse> |
cancelJob(Consumer<CancelJobRequest.Builder> cancelJobRequest)
Cancels an Amazon Braket job.
|
default CompletableFuture<CancelQuantumTaskResponse> |
cancelQuantumTask(CancelQuantumTaskRequest cancelQuantumTaskRequest)
Cancels the specified task.
|
default CompletableFuture<CancelQuantumTaskResponse> |
cancelQuantumTask(Consumer<CancelQuantumTaskRequest.Builder> cancelQuantumTaskRequest)
Cancels the specified task.
|
static BraketAsyncClient |
create()
Create a
BraketAsyncClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from the
DefaultCredentialsProvider. |
default CompletableFuture<CreateJobResponse> |
createJob(Consumer<CreateJobRequest.Builder> createJobRequest)
Creates an Amazon Braket job.
|
default CompletableFuture<CreateJobResponse> |
createJob(CreateJobRequest createJobRequest)
Creates an Amazon Braket job.
|
default CompletableFuture<CreateQuantumTaskResponse> |
createQuantumTask(Consumer<CreateQuantumTaskRequest.Builder> createQuantumTaskRequest)
Creates a quantum task.
|
default CompletableFuture<CreateQuantumTaskResponse> |
createQuantumTask(CreateQuantumTaskRequest createQuantumTaskRequest)
Creates a quantum task.
|
default CompletableFuture<GetDeviceResponse> |
getDevice(Consumer<GetDeviceRequest.Builder> getDeviceRequest)
Retrieves the devices available in Amazon Braket.
|
default CompletableFuture<GetDeviceResponse> |
getDevice(GetDeviceRequest getDeviceRequest)
Retrieves the devices available in Amazon Braket.
|
default CompletableFuture<GetJobResponse> |
getJob(Consumer<GetJobRequest.Builder> getJobRequest)
Retrieves the specified Amazon Braket job.
|
default CompletableFuture<GetJobResponse> |
getJob(GetJobRequest getJobRequest)
Retrieves the specified Amazon Braket job.
|
default CompletableFuture<GetQuantumTaskResponse> |
getQuantumTask(Consumer<GetQuantumTaskRequest.Builder> getQuantumTaskRequest)
Retrieves the specified quantum task.
|
default CompletableFuture<GetQuantumTaskResponse> |
getQuantumTask(GetQuantumTaskRequest getQuantumTaskRequest)
Retrieves the specified quantum task.
|
default CompletableFuture<ListTagsForResourceResponse> |
listTagsForResource(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest)
Shows the tags associated with this resource.
|
default CompletableFuture<ListTagsForResourceResponse> |
listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest)
Shows the tags associated with this resource.
|
default CompletableFuture<SearchDevicesResponse> |
searchDevices(Consumer<SearchDevicesRequest.Builder> searchDevicesRequest)
Searches for devices using the specified filters.
|
default CompletableFuture<SearchDevicesResponse> |
searchDevices(SearchDevicesRequest searchDevicesRequest)
Searches for devices using the specified filters.
|
default SearchDevicesPublisher |
searchDevicesPaginator(Consumer<SearchDevicesRequest.Builder> searchDevicesRequest)
Searches for devices using the specified filters.
|
default SearchDevicesPublisher |
searchDevicesPaginator(SearchDevicesRequest searchDevicesRequest)
Searches for devices using the specified filters.
|
default CompletableFuture<SearchJobsResponse> |
searchJobs(Consumer<SearchJobsRequest.Builder> searchJobsRequest)
Searches for Amazon Braket jobs that match the specified filter values.
|
default CompletableFuture<SearchJobsResponse> |
searchJobs(SearchJobsRequest searchJobsRequest)
Searches for Amazon Braket jobs that match the specified filter values.
|
default SearchJobsPublisher |
searchJobsPaginator(Consumer<SearchJobsRequest.Builder> searchJobsRequest)
Searches for Amazon Braket jobs that match the specified filter values.
|
default SearchJobsPublisher |
searchJobsPaginator(SearchJobsRequest searchJobsRequest)
Searches for Amazon Braket jobs that match the specified filter values.
|
default CompletableFuture<SearchQuantumTasksResponse> |
searchQuantumTasks(Consumer<SearchQuantumTasksRequest.Builder> searchQuantumTasksRequest)
Searches for tasks that match the specified filter values.
|
default CompletableFuture<SearchQuantumTasksResponse> |
searchQuantumTasks(SearchQuantumTasksRequest searchQuantumTasksRequest)
Searches for tasks that match the specified filter values.
|
default SearchQuantumTasksPublisher |
searchQuantumTasksPaginator(Consumer<SearchQuantumTasksRequest.Builder> searchQuantumTasksRequest)
Searches for tasks that match the specified filter values.
|
default SearchQuantumTasksPublisher |
searchQuantumTasksPaginator(SearchQuantumTasksRequest searchQuantumTasksRequest)
Searches for tasks that match the specified filter values.
|
default BraketServiceClientConfiguration |
serviceClientConfiguration() |
default CompletableFuture<TagResourceResponse> |
tagResource(Consumer<TagResourceRequest.Builder> tagResourceRequest)
Add a tag to the specified resource.
|
default CompletableFuture<TagResourceResponse> |
tagResource(TagResourceRequest tagResourceRequest)
Add a tag to the specified resource.
|
default CompletableFuture<UntagResourceResponse> |
untagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest)
Remove tags from a resource.
|
default CompletableFuture<UntagResourceResponse> |
untagResource(UntagResourceRequest untagResourceRequest)
Remove tags from a resource.
|
serviceNameclosestatic final String SERVICE_NAME
static final String SERVICE_METADATA_ID
ServiceMetadataProvider.default CompletableFuture<CancelJobResponse> cancelJob(CancelJobRequest cancelJobRequest)
Cancels an Amazon Braket job.
cancelJobRequest - default CompletableFuture<CancelJobResponse> cancelJob(Consumer<CancelJobRequest.Builder> cancelJobRequest)
Cancels an Amazon Braket job.
This is a convenience which creates an instance of the CancelJobRequest.Builder avoiding the need to
create one manually via CancelJobRequest.builder()
cancelJobRequest - A Consumer that will call methods on
CancelJobRequest.Builder to create a request.default CompletableFuture<CancelQuantumTaskResponse> cancelQuantumTask(CancelQuantumTaskRequest cancelQuantumTaskRequest)
Cancels the specified task.
cancelQuantumTaskRequest - default CompletableFuture<CancelQuantumTaskResponse> cancelQuantumTask(Consumer<CancelQuantumTaskRequest.Builder> cancelQuantumTaskRequest)
Cancels the specified task.
This is a convenience which creates an instance of the CancelQuantumTaskRequest.Builder avoiding the need
to create one manually via CancelQuantumTaskRequest.builder()
cancelQuantumTaskRequest - A Consumer that will call methods on
CancelQuantumTaskRequest.Builder to create a request.default CompletableFuture<CreateJobResponse> createJob(CreateJobRequest createJobRequest)
Creates an Amazon Braket job.
createJobRequest - default CompletableFuture<CreateJobResponse> createJob(Consumer<CreateJobRequest.Builder> createJobRequest)
Creates an Amazon Braket job.
This is a convenience which creates an instance of the CreateJobRequest.Builder avoiding the need to
create one manually via CreateJobRequest.builder()
createJobRequest - A Consumer that will call methods on
CreateJobRequest.Builder to create a request.default CompletableFuture<CreateQuantumTaskResponse> createQuantumTask(CreateQuantumTaskRequest createQuantumTaskRequest)
Creates a quantum task.
createQuantumTaskRequest - default CompletableFuture<CreateQuantumTaskResponse> createQuantumTask(Consumer<CreateQuantumTaskRequest.Builder> createQuantumTaskRequest)
Creates a quantum task.
This is a convenience which creates an instance of the CreateQuantumTaskRequest.Builder avoiding the need
to create one manually via CreateQuantumTaskRequest.builder()
createQuantumTaskRequest - A Consumer that will call methods on
CreateQuantumTaskRequest.Builder to create a request.default CompletableFuture<GetDeviceResponse> getDevice(GetDeviceRequest getDeviceRequest)
Retrieves the devices available in Amazon Braket.
For backwards compatibility with older versions of BraketSchemas, OpenQASM information is omitted from GetDevice API calls. To get this information the user-agent needs to present a recent version of the BraketSchemas (1.8.0 or later). The Braket SDK automatically reports this for you. If you do not see OpenQASM results in the GetDevice response when using a Braket SDK, you may need to set AWS_EXECUTION_ENV environment variable to configure user-agent. See the code examples provided below for how to do this for the AWS CLI, Boto3, and the Go, Java, and JavaScript/TypeScript SDKs.
getDeviceRequest - default CompletableFuture<GetDeviceResponse> getDevice(Consumer<GetDeviceRequest.Builder> getDeviceRequest)
Retrieves the devices available in Amazon Braket.
For backwards compatibility with older versions of BraketSchemas, OpenQASM information is omitted from GetDevice API calls. To get this information the user-agent needs to present a recent version of the BraketSchemas (1.8.0 or later). The Braket SDK automatically reports this for you. If you do not see OpenQASM results in the GetDevice response when using a Braket SDK, you may need to set AWS_EXECUTION_ENV environment variable to configure user-agent. See the code examples provided below for how to do this for the AWS CLI, Boto3, and the Go, Java, and JavaScript/TypeScript SDKs.
This is a convenience which creates an instance of the GetDeviceRequest.Builder avoiding the need to
create one manually via GetDeviceRequest.builder()
getDeviceRequest - A Consumer that will call methods on
GetDeviceRequest.Builder to create a request.default CompletableFuture<GetJobResponse> getJob(GetJobRequest getJobRequest)
Retrieves the specified Amazon Braket job.
getJobRequest - default CompletableFuture<GetJobResponse> getJob(Consumer<GetJobRequest.Builder> getJobRequest)
Retrieves the specified Amazon Braket job.
This is a convenience which creates an instance of the GetJobRequest.Builder avoiding the need to create
one manually via GetJobRequest.builder()
getJobRequest - A Consumer that will call methods on
GetJobRequest.Builder to create a request.default CompletableFuture<GetQuantumTaskResponse> getQuantumTask(GetQuantumTaskRequest getQuantumTaskRequest)
Retrieves the specified quantum task.
getQuantumTaskRequest - default CompletableFuture<GetQuantumTaskResponse> getQuantumTask(Consumer<GetQuantumTaskRequest.Builder> getQuantumTaskRequest)
Retrieves the specified quantum task.
This is a convenience which creates an instance of the GetQuantumTaskRequest.Builder avoiding the need to
create one manually via GetQuantumTaskRequest.builder()
getQuantumTaskRequest - A Consumer that will call methods on
GetQuantumTaskRequest.Builder to create a request.default CompletableFuture<ListTagsForResourceResponse> listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest)
Shows the tags associated with this resource.
listTagsForResourceRequest - default CompletableFuture<ListTagsForResourceResponse> listTagsForResource(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest)
Shows the tags associated with this resource.
This is a convenience which creates an instance of the ListTagsForResourceRequest.Builder avoiding the
need to create one manually via ListTagsForResourceRequest.builder()
listTagsForResourceRequest - A Consumer that will call methods on
ListTagsForResourceRequest.Builder to create a
request.default CompletableFuture<SearchDevicesResponse> searchDevices(SearchDevicesRequest searchDevicesRequest)
Searches for devices using the specified filters.
searchDevicesRequest - default CompletableFuture<SearchDevicesResponse> searchDevices(Consumer<SearchDevicesRequest.Builder> searchDevicesRequest)
Searches for devices using the specified filters.
This is a convenience which creates an instance of the SearchDevicesRequest.Builder avoiding the need to
create one manually via SearchDevicesRequest.builder()
searchDevicesRequest - A Consumer that will call methods on
SearchDevicesRequest.Builder to create a request.default SearchDevicesPublisher searchDevicesPaginator(SearchDevicesRequest searchDevicesRequest)
Searches for devices using the specified filters.
This is a variant of searchDevices(software.amazon.awssdk.services.braket.model.SearchDevicesRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
SDK will internally handle making service calls for you.
When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
failures only after you start streaming the data. The subscribe method should be called as a request to start
streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe
method will result in a new Subscription i.e., a new contract to stream data from the
starting request.
The following are few ways to use the response class:
1) Using the subscribe helper method
software.amazon.awssdk.services.braket.paginators.SearchDevicesPublisher publisher = client.searchDevicesPaginator(request);
CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
software.amazon.awssdk.services.braket.paginators.SearchDevicesPublisher publisher = client.searchDevicesPaginator(request);
publisher.subscribe(new Subscriber<software.amazon.awssdk.services.braket.model.SearchDevicesResponse>() {
public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.braket.model.SearchDevicesResponse response) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
searchDevices(software.amazon.awssdk.services.braket.model.SearchDevicesRequest) operation.
searchDevicesRequest - default SearchDevicesPublisher searchDevicesPaginator(Consumer<SearchDevicesRequest.Builder> searchDevicesRequest)
Searches for devices using the specified filters.
This is a variant of searchDevices(software.amazon.awssdk.services.braket.model.SearchDevicesRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
SDK will internally handle making service calls for you.
When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
failures only after you start streaming the data. The subscribe method should be called as a request to start
streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe
method will result in a new Subscription i.e., a new contract to stream data from the
starting request.
The following are few ways to use the response class:
1) Using the subscribe helper method
software.amazon.awssdk.services.braket.paginators.SearchDevicesPublisher publisher = client.searchDevicesPaginator(request);
CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
software.amazon.awssdk.services.braket.paginators.SearchDevicesPublisher publisher = client.searchDevicesPaginator(request);
publisher.subscribe(new Subscriber<software.amazon.awssdk.services.braket.model.SearchDevicesResponse>() {
public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.braket.model.SearchDevicesResponse response) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
searchDevices(software.amazon.awssdk.services.braket.model.SearchDevicesRequest) operation.
This is a convenience which creates an instance of the SearchDevicesRequest.Builder avoiding the need to
create one manually via SearchDevicesRequest.builder()
searchDevicesRequest - A Consumer that will call methods on
SearchDevicesRequest.Builder to create a request.default CompletableFuture<SearchJobsResponse> searchJobs(SearchJobsRequest searchJobsRequest)
Searches for Amazon Braket jobs that match the specified filter values.
searchJobsRequest - default CompletableFuture<SearchJobsResponse> searchJobs(Consumer<SearchJobsRequest.Builder> searchJobsRequest)
Searches for Amazon Braket jobs that match the specified filter values.
This is a convenience which creates an instance of the SearchJobsRequest.Builder avoiding the need to
create one manually via SearchJobsRequest.builder()
searchJobsRequest - A Consumer that will call methods on
SearchJobsRequest.Builder to create a request.default SearchJobsPublisher searchJobsPaginator(SearchJobsRequest searchJobsRequest)
Searches for Amazon Braket jobs that match the specified filter values.
This is a variant of searchJobs(software.amazon.awssdk.services.braket.model.SearchJobsRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
SDK will internally handle making service calls for you.
When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
failures only after you start streaming the data. The subscribe method should be called as a request to start
streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe
method will result in a new Subscription i.e., a new contract to stream data from the
starting request.
The following are few ways to use the response class:
1) Using the subscribe helper method
software.amazon.awssdk.services.braket.paginators.SearchJobsPublisher publisher = client.searchJobsPaginator(request);
CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
software.amazon.awssdk.services.braket.paginators.SearchJobsPublisher publisher = client.searchJobsPaginator(request);
publisher.subscribe(new Subscriber<software.amazon.awssdk.services.braket.model.SearchJobsResponse>() {
public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.braket.model.SearchJobsResponse response) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
searchJobs(software.amazon.awssdk.services.braket.model.SearchJobsRequest) operation.
searchJobsRequest - default SearchJobsPublisher searchJobsPaginator(Consumer<SearchJobsRequest.Builder> searchJobsRequest)
Searches for Amazon Braket jobs that match the specified filter values.
This is a variant of searchJobs(software.amazon.awssdk.services.braket.model.SearchJobsRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
SDK will internally handle making service calls for you.
When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
failures only after you start streaming the data. The subscribe method should be called as a request to start
streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe
method will result in a new Subscription i.e., a new contract to stream data from the
starting request.
The following are few ways to use the response class:
1) Using the subscribe helper method
software.amazon.awssdk.services.braket.paginators.SearchJobsPublisher publisher = client.searchJobsPaginator(request);
CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
software.amazon.awssdk.services.braket.paginators.SearchJobsPublisher publisher = client.searchJobsPaginator(request);
publisher.subscribe(new Subscriber<software.amazon.awssdk.services.braket.model.SearchJobsResponse>() {
public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.braket.model.SearchJobsResponse response) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
searchJobs(software.amazon.awssdk.services.braket.model.SearchJobsRequest) operation.
This is a convenience which creates an instance of the SearchJobsRequest.Builder avoiding the need to
create one manually via SearchJobsRequest.builder()
searchJobsRequest - A Consumer that will call methods on
SearchJobsRequest.Builder to create a request.default CompletableFuture<SearchQuantumTasksResponse> searchQuantumTasks(SearchQuantumTasksRequest searchQuantumTasksRequest)
Searches for tasks that match the specified filter values.
searchQuantumTasksRequest - default CompletableFuture<SearchQuantumTasksResponse> searchQuantumTasks(Consumer<SearchQuantumTasksRequest.Builder> searchQuantumTasksRequest)
Searches for tasks that match the specified filter values.
This is a convenience which creates an instance of the SearchQuantumTasksRequest.Builder avoiding the
need to create one manually via SearchQuantumTasksRequest.builder()
searchQuantumTasksRequest - A Consumer that will call methods on
SearchQuantumTasksRequest.Builder to create a
request.default SearchQuantumTasksPublisher searchQuantumTasksPaginator(SearchQuantumTasksRequest searchQuantumTasksRequest)
Searches for tasks that match the specified filter values.
This is a variant of
searchQuantumTasks(software.amazon.awssdk.services.braket.model.SearchQuantumTasksRequest) operation.
The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will
internally handle making service calls for you.
When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
failures only after you start streaming the data. The subscribe method should be called as a request to start
streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe
method will result in a new Subscription i.e., a new contract to stream data from the
starting request.
The following are few ways to use the response class:
1) Using the subscribe helper method
software.amazon.awssdk.services.braket.paginators.SearchQuantumTasksPublisher publisher = client.searchQuantumTasksPaginator(request);
CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
software.amazon.awssdk.services.braket.paginators.SearchQuantumTasksPublisher publisher = client.searchQuantumTasksPaginator(request);
publisher.subscribe(new Subscriber<software.amazon.awssdk.services.braket.model.SearchQuantumTasksResponse>() {
public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.braket.model.SearchQuantumTasksResponse response) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
searchQuantumTasks(software.amazon.awssdk.services.braket.model.SearchQuantumTasksRequest)
operation.
searchQuantumTasksRequest - default SearchQuantumTasksPublisher searchQuantumTasksPaginator(Consumer<SearchQuantumTasksRequest.Builder> searchQuantumTasksRequest)
Searches for tasks that match the specified filter values.
This is a variant of
searchQuantumTasks(software.amazon.awssdk.services.braket.model.SearchQuantumTasksRequest) operation.
The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will
internally handle making service calls for you.
When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
failures only after you start streaming the data. The subscribe method should be called as a request to start
streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe
method will result in a new Subscription i.e., a new contract to stream data from the
starting request.
The following are few ways to use the response class:
1) Using the subscribe helper method
software.amazon.awssdk.services.braket.paginators.SearchQuantumTasksPublisher publisher = client.searchQuantumTasksPaginator(request);
CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
software.amazon.awssdk.services.braket.paginators.SearchQuantumTasksPublisher publisher = client.searchQuantumTasksPaginator(request);
publisher.subscribe(new Subscriber<software.amazon.awssdk.services.braket.model.SearchQuantumTasksResponse>() {
public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.braket.model.SearchQuantumTasksResponse response) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
searchQuantumTasks(software.amazon.awssdk.services.braket.model.SearchQuantumTasksRequest)
operation.
This is a convenience which creates an instance of the SearchQuantumTasksRequest.Builder avoiding the
need to create one manually via SearchQuantumTasksRequest.builder()
searchQuantumTasksRequest - A Consumer that will call methods on
SearchQuantumTasksRequest.Builder to create a
request.default CompletableFuture<TagResourceResponse> tagResource(TagResourceRequest tagResourceRequest)
Add a tag to the specified resource.
tagResourceRequest - default CompletableFuture<TagResourceResponse> tagResource(Consumer<TagResourceRequest.Builder> tagResourceRequest)
Add a tag to the specified resource.
This is a convenience which creates an instance of the TagResourceRequest.Builder avoiding the need to
create one manually via TagResourceRequest.builder()
tagResourceRequest - A Consumer that will call methods on
TagResourceRequest.Builder to create a request.default CompletableFuture<UntagResourceResponse> untagResource(UntagResourceRequest untagResourceRequest)
Remove tags from a resource.
untagResourceRequest - default CompletableFuture<UntagResourceResponse> untagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest)
Remove tags from a resource.
This is a convenience which creates an instance of the UntagResourceRequest.Builder avoiding the need to
create one manually via UntagResourceRequest.builder()
untagResourceRequest - A Consumer that will call methods on
UntagResourceRequest.Builder to create a request.default BraketServiceClientConfiguration serviceClientConfiguration()
serviceClientConfiguration in interface AwsClientserviceClientConfiguration in interface SdkClientstatic BraketAsyncClient create()
BraketAsyncClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from the
DefaultCredentialsProvider.static BraketAsyncClientBuilder builder()
BraketAsyncClient.Copyright © 2023. All rights reserved.