@Generated(value="software.amazon.awssdk:codegen") public interface CloudHsmV2AsyncClient extends SdkClient
builder()
method.
For more information about AWS CloudHSM, see AWS CloudHSM and the AWS CloudHSM User Guide.
Modifier and Type | Field and Description |
---|---|
static String |
SERVICE_NAME |
Modifier and Type | Method and Description |
---|---|
static CloudHsmV2AsyncClientBuilder |
builder()
Create a builder that can be used to configure and create a
CloudHsmV2AsyncClient . |
static CloudHsmV2AsyncClient |
create()
Create a
CloudHsmV2AsyncClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from the
DefaultCredentialsProvider . |
default CompletableFuture<CreateClusterResponse> |
createCluster(Consumer<CreateClusterRequest.Builder> createClusterRequest)
Creates a new AWS CloudHSM cluster.
|
default CompletableFuture<CreateClusterResponse> |
createCluster(CreateClusterRequest createClusterRequest)
Creates a new AWS CloudHSM cluster.
|
default CompletableFuture<CreateHsmResponse> |
createHsm(Consumer<CreateHsmRequest.Builder> createHsmRequest)
Creates a new hardware security module (HSM) in the specified AWS CloudHSM cluster.
|
default CompletableFuture<CreateHsmResponse> |
createHsm(CreateHsmRequest createHsmRequest)
Creates a new hardware security module (HSM) in the specified AWS CloudHSM cluster.
|
default CompletableFuture<DeleteClusterResponse> |
deleteCluster(Consumer<DeleteClusterRequest.Builder> deleteClusterRequest)
Deletes the specified AWS CloudHSM cluster.
|
default CompletableFuture<DeleteClusterResponse> |
deleteCluster(DeleteClusterRequest deleteClusterRequest)
Deletes the specified AWS CloudHSM cluster.
|
default CompletableFuture<DeleteHsmResponse> |
deleteHsm(Consumer<DeleteHsmRequest.Builder> deleteHsmRequest)
Deletes the specified HSM.
|
default CompletableFuture<DeleteHsmResponse> |
deleteHsm(DeleteHsmRequest deleteHsmRequest)
Deletes the specified HSM.
|
default CompletableFuture<DescribeBackupsResponse> |
describeBackups()
Gets information about backups of AWS CloudHSM clusters.
|
default CompletableFuture<DescribeBackupsResponse> |
describeBackups(Consumer<DescribeBackupsRequest.Builder> describeBackupsRequest)
Gets information about backups of AWS CloudHSM clusters.
|
default CompletableFuture<DescribeBackupsResponse> |
describeBackups(DescribeBackupsRequest describeBackupsRequest)
Gets information about backups of AWS CloudHSM clusters.
|
default DescribeBackupsPublisher |
describeBackupsPaginator()
Gets information about backups of AWS CloudHSM clusters.
|
default DescribeBackupsPublisher |
describeBackupsPaginator(Consumer<DescribeBackupsRequest.Builder> describeBackupsRequest)
Gets information about backups of AWS CloudHSM clusters.
|
default DescribeBackupsPublisher |
describeBackupsPaginator(DescribeBackupsRequest describeBackupsRequest)
Gets information about backups of AWS CloudHSM clusters.
|
default CompletableFuture<DescribeClustersResponse> |
describeClusters()
Gets information about AWS CloudHSM clusters.
|
default CompletableFuture<DescribeClustersResponse> |
describeClusters(Consumer<DescribeClustersRequest.Builder> describeClustersRequest)
Gets information about AWS CloudHSM clusters.
|
default CompletableFuture<DescribeClustersResponse> |
describeClusters(DescribeClustersRequest describeClustersRequest)
Gets information about AWS CloudHSM clusters.
|
default DescribeClustersPublisher |
describeClustersPaginator()
Gets information about AWS CloudHSM clusters.
|
default DescribeClustersPublisher |
describeClustersPaginator(Consumer<DescribeClustersRequest.Builder> describeClustersRequest)
Gets information about AWS CloudHSM clusters.
|
default DescribeClustersPublisher |
describeClustersPaginator(DescribeClustersRequest describeClustersRequest)
Gets information about AWS CloudHSM clusters.
|
default CompletableFuture<InitializeClusterResponse> |
initializeCluster(Consumer<InitializeClusterRequest.Builder> initializeClusterRequest)
Claims an AWS CloudHSM cluster by submitting the cluster certificate issued by your issuing certificate authority
(CA) and the CA's root certificate.
|
default CompletableFuture<InitializeClusterResponse> |
initializeCluster(InitializeClusterRequest initializeClusterRequest)
Claims an AWS CloudHSM cluster by submitting the cluster certificate issued by your issuing certificate authority
(CA) and the CA's root certificate.
|
default CompletableFuture<ListTagsResponse> |
listTags(Consumer<ListTagsRequest.Builder> listTagsRequest)
Gets a list of tags for the specified AWS CloudHSM cluster.
|
default CompletableFuture<ListTagsResponse> |
listTags(ListTagsRequest listTagsRequest)
Gets a list of tags for the specified AWS CloudHSM cluster.
|
default ListTagsPublisher |
listTagsPaginator(Consumer<ListTagsRequest.Builder> listTagsRequest)
Gets a list of tags for the specified AWS CloudHSM cluster.
|
default ListTagsPublisher |
listTagsPaginator(ListTagsRequest listTagsRequest)
Gets a list of tags for the specified AWS CloudHSM cluster.
|
default CompletableFuture<TagResourceResponse> |
tagResource(Consumer<TagResourceRequest.Builder> tagResourceRequest)
Adds or overwrites one or more tags for the specified AWS CloudHSM cluster.
|
default CompletableFuture<TagResourceResponse> |
tagResource(TagResourceRequest tagResourceRequest)
Adds or overwrites one or more tags for the specified AWS CloudHSM cluster.
|
default CompletableFuture<UntagResourceResponse> |
untagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest)
Removes the specified tag or tags from the specified AWS CloudHSM cluster.
|
default CompletableFuture<UntagResourceResponse> |
untagResource(UntagResourceRequest untagResourceRequest)
Removes the specified tag or tags from the specified AWS CloudHSM cluster.
|
serviceName
close
static final String SERVICE_NAME
static CloudHsmV2AsyncClient create()
CloudHsmV2AsyncClient
with the region loaded from the
DefaultAwsRegionProviderChain
and credentials loaded from the
DefaultCredentialsProvider
.static CloudHsmV2AsyncClientBuilder builder()
CloudHsmV2AsyncClient
.default CompletableFuture<CreateClusterResponse> createCluster(CreateClusterRequest createClusterRequest)
Creates a new AWS CloudHSM cluster.
createClusterRequest
- default CompletableFuture<CreateClusterResponse> createCluster(Consumer<CreateClusterRequest.Builder> createClusterRequest)
Creates a new AWS CloudHSM cluster.
This is a convenience which creates an instance of the CreateClusterRequest.Builder
avoiding the need to
create one manually via CreateClusterRequest.builder()
createClusterRequest
- A Consumer
that will call methods on CreateClusterRequest.Builder
to create a request.default CompletableFuture<CreateHsmResponse> createHsm(CreateHsmRequest createHsmRequest)
Creates a new hardware security module (HSM) in the specified AWS CloudHSM cluster.
createHsmRequest
- default CompletableFuture<CreateHsmResponse> createHsm(Consumer<CreateHsmRequest.Builder> createHsmRequest)
Creates a new hardware security module (HSM) in the specified AWS CloudHSM cluster.
This is a convenience which creates an instance of the CreateHsmRequest.Builder
avoiding the need to
create one manually via CreateHsmRequest.builder()
createHsmRequest
- A Consumer
that will call methods on CreateHsmRequest.Builder
to create a request.default CompletableFuture<DeleteClusterResponse> deleteCluster(DeleteClusterRequest deleteClusterRequest)
Deletes the specified AWS CloudHSM cluster. Before you can delete a cluster, you must delete all HSMs in the cluster. To see if the cluster contains any HSMs, use DescribeClusters. To delete an HSM, use DeleteHsm.
deleteClusterRequest
- default CompletableFuture<DeleteClusterResponse> deleteCluster(Consumer<DeleteClusterRequest.Builder> deleteClusterRequest)
Deletes the specified AWS CloudHSM cluster. Before you can delete a cluster, you must delete all HSMs in the cluster. To see if the cluster contains any HSMs, use DescribeClusters. To delete an HSM, use DeleteHsm.
This is a convenience which creates an instance of the DeleteClusterRequest.Builder
avoiding the need to
create one manually via DeleteClusterRequest.builder()
deleteClusterRequest
- A Consumer
that will call methods on DeleteClusterRequest.Builder
to create a request.default CompletableFuture<DeleteHsmResponse> deleteHsm(DeleteHsmRequest deleteHsmRequest)
Deletes the specified HSM. To specify an HSM, you can use its identifier (ID), the IP address of the HSM's elastic network interface (ENI), or the ID of the HSM's ENI. You need to specify only one of these values. To find these values, use DescribeClusters.
deleteHsmRequest
- default CompletableFuture<DeleteHsmResponse> deleteHsm(Consumer<DeleteHsmRequest.Builder> deleteHsmRequest)
Deletes the specified HSM. To specify an HSM, you can use its identifier (ID), the IP address of the HSM's elastic network interface (ENI), or the ID of the HSM's ENI. You need to specify only one of these values. To find these values, use DescribeClusters.
This is a convenience which creates an instance of the DeleteHsmRequest.Builder
avoiding the need to
create one manually via DeleteHsmRequest.builder()
deleteHsmRequest
- A Consumer
that will call methods on DeleteHsmRequest.Builder
to create a request.default CompletableFuture<DescribeBackupsResponse> describeBackups(DescribeBackupsRequest describeBackupsRequest)
Gets information about backups of AWS CloudHSM clusters.
This is a paginated operation, which means that each response might contain only a subset of all the backups.
When the response contains only a subset of backups, it includes a NextToken
value. Use this value
in a subsequent DescribeBackups
request to get more backups. When you receive a response with no
NextToken
(or an empty or null value), that means there are no more backups to get.
describeBackupsRequest
- default CompletableFuture<DescribeBackupsResponse> describeBackups(Consumer<DescribeBackupsRequest.Builder> describeBackupsRequest)
Gets information about backups of AWS CloudHSM clusters.
This is a paginated operation, which means that each response might contain only a subset of all the backups.
When the response contains only a subset of backups, it includes a NextToken
value. Use this value
in a subsequent DescribeBackups
request to get more backups. When you receive a response with no
NextToken
(or an empty or null value), that means there are no more backups to get.
This is a convenience which creates an instance of the DescribeBackupsRequest.Builder
avoiding the need
to create one manually via DescribeBackupsRequest.builder()
describeBackupsRequest
- A Consumer
that will call methods on DescribeBackupsRequest.Builder
to create a request.default CompletableFuture<DescribeBackupsResponse> describeBackups()
Gets information about backups of AWS CloudHSM clusters.
This is a paginated operation, which means that each response might contain only a subset of all the backups.
When the response contains only a subset of backups, it includes a NextToken
value. Use this value
in a subsequent DescribeBackups
request to get more backups. When you receive a response with no
NextToken
(or an empty or null value), that means there are no more backups to get.
default DescribeBackupsPublisher describeBackupsPaginator()
Gets information about backups of AWS CloudHSM clusters.
This is a paginated operation, which means that each response might contain only a subset of all the backups.
When the response contains only a subset of backups, it includes a NextToken
value. Use this value
in a subsequent DescribeBackups
request to get more backups. When you receive a response with no
NextToken
(or an empty or null value), that means there are no more backups to get.
This is a variant of
describeBackups(software.amazon.awssdk.services.cloudhsmv2.model.DescribeBackupsRequest)
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 forEach helper method
software.amazon.awssdk.services.cloudhsmv2.paginators.DescribeBackupsPublisher publisher = client.describeBackupsPaginator(request);
CompletableFuture<Void> future = publisher.forEach(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
software.amazon.awssdk.services.cloudhsmv2.paginators.DescribeBackupsPublisher publisher = client.describeBackupsPaginator(request);
publisher.subscribe(new Subscriber<software.amazon.awssdk.services.cloudhsmv2.model.DescribeBackupsResponse>() {
public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.cloudhsmv2.model.DescribeBackupsResponse response) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
Note: If you prefer to have control on service calls, use the
describeBackups(software.amazon.awssdk.services.cloudhsmv2.model.DescribeBackupsRequest)
operation.
default DescribeBackupsPublisher describeBackupsPaginator(DescribeBackupsRequest describeBackupsRequest)
Gets information about backups of AWS CloudHSM clusters.
This is a paginated operation, which means that each response might contain only a subset of all the backups.
When the response contains only a subset of backups, it includes a NextToken
value. Use this value
in a subsequent DescribeBackups
request to get more backups. When you receive a response with no
NextToken
(or an empty or null value), that means there are no more backups to get.
This is a variant of
describeBackups(software.amazon.awssdk.services.cloudhsmv2.model.DescribeBackupsRequest)
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 forEach helper method
software.amazon.awssdk.services.cloudhsmv2.paginators.DescribeBackupsPublisher publisher = client.describeBackupsPaginator(request);
CompletableFuture<Void> future = publisher.forEach(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
software.amazon.awssdk.services.cloudhsmv2.paginators.DescribeBackupsPublisher publisher = client.describeBackupsPaginator(request);
publisher.subscribe(new Subscriber<software.amazon.awssdk.services.cloudhsmv2.model.DescribeBackupsResponse>() {
public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.cloudhsmv2.model.DescribeBackupsResponse response) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
Note: If you prefer to have control on service calls, use the
describeBackups(software.amazon.awssdk.services.cloudhsmv2.model.DescribeBackupsRequest)
operation.
describeBackupsRequest
- default DescribeBackupsPublisher describeBackupsPaginator(Consumer<DescribeBackupsRequest.Builder> describeBackupsRequest)
Gets information about backups of AWS CloudHSM clusters.
This is a paginated operation, which means that each response might contain only a subset of all the backups.
When the response contains only a subset of backups, it includes a NextToken
value. Use this value
in a subsequent DescribeBackups
request to get more backups. When you receive a response with no
NextToken
(or an empty or null value), that means there are no more backups to get.
This is a variant of
describeBackups(software.amazon.awssdk.services.cloudhsmv2.model.DescribeBackupsRequest)
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 forEach helper method
software.amazon.awssdk.services.cloudhsmv2.paginators.DescribeBackupsPublisher publisher = client.describeBackupsPaginator(request);
CompletableFuture<Void> future = publisher.forEach(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
software.amazon.awssdk.services.cloudhsmv2.paginators.DescribeBackupsPublisher publisher = client.describeBackupsPaginator(request);
publisher.subscribe(new Subscriber<software.amazon.awssdk.services.cloudhsmv2.model.DescribeBackupsResponse>() {
public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.cloudhsmv2.model.DescribeBackupsResponse response) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
Note: If you prefer to have control on service calls, use the
describeBackups(software.amazon.awssdk.services.cloudhsmv2.model.DescribeBackupsRequest)
operation.
This is a convenience which creates an instance of the DescribeBackupsRequest.Builder
avoiding the need
to create one manually via DescribeBackupsRequest.builder()
describeBackupsRequest
- A Consumer
that will call methods on DescribeBackupsRequest.Builder
to create a request.default CompletableFuture<DescribeClustersResponse> describeClusters(DescribeClustersRequest describeClustersRequest)
Gets information about AWS CloudHSM clusters.
This is a paginated operation, which means that each response might contain only a subset of all the clusters.
When the response contains only a subset of clusters, it includes a NextToken
value. Use this value
in a subsequent DescribeClusters
request to get more clusters. When you receive a response with no
NextToken
(or an empty or null value), that means there are no more clusters to get.
describeClustersRequest
- default CompletableFuture<DescribeClustersResponse> describeClusters(Consumer<DescribeClustersRequest.Builder> describeClustersRequest)
Gets information about AWS CloudHSM clusters.
This is a paginated operation, which means that each response might contain only a subset of all the clusters.
When the response contains only a subset of clusters, it includes a NextToken
value. Use this value
in a subsequent DescribeClusters
request to get more clusters. When you receive a response with no
NextToken
(or an empty or null value), that means there are no more clusters to get.
This is a convenience which creates an instance of the DescribeClustersRequest.Builder
avoiding the need
to create one manually via DescribeClustersRequest.builder()
describeClustersRequest
- A Consumer
that will call methods on DescribeClustersRequest.Builder
to create a request.default CompletableFuture<DescribeClustersResponse> describeClusters()
Gets information about AWS CloudHSM clusters.
This is a paginated operation, which means that each response might contain only a subset of all the clusters.
When the response contains only a subset of clusters, it includes a NextToken
value. Use this value
in a subsequent DescribeClusters
request to get more clusters. When you receive a response with no
NextToken
(or an empty or null value), that means there are no more clusters to get.
default DescribeClustersPublisher describeClustersPaginator()
Gets information about AWS CloudHSM clusters.
This is a paginated operation, which means that each response might contain only a subset of all the clusters.
When the response contains only a subset of clusters, it includes a NextToken
value. Use this value
in a subsequent DescribeClusters
request to get more clusters. When you receive a response with no
NextToken
(or an empty or null value), that means there are no more clusters to get.
This is a variant of
describeClusters(software.amazon.awssdk.services.cloudhsmv2.model.DescribeClustersRequest)
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 forEach helper method
software.amazon.awssdk.services.cloudhsmv2.paginators.DescribeClustersPublisher publisher = client.describeClustersPaginator(request);
CompletableFuture<Void> future = publisher.forEach(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
software.amazon.awssdk.services.cloudhsmv2.paginators.DescribeClustersPublisher publisher = client.describeClustersPaginator(request);
publisher.subscribe(new Subscriber<software.amazon.awssdk.services.cloudhsmv2.model.DescribeClustersResponse>() {
public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.cloudhsmv2.model.DescribeClustersResponse response) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
Note: If you prefer to have control on service calls, use the
describeClusters(software.amazon.awssdk.services.cloudhsmv2.model.DescribeClustersRequest)
operation.
default DescribeClustersPublisher describeClustersPaginator(DescribeClustersRequest describeClustersRequest)
Gets information about AWS CloudHSM clusters.
This is a paginated operation, which means that each response might contain only a subset of all the clusters.
When the response contains only a subset of clusters, it includes a NextToken
value. Use this value
in a subsequent DescribeClusters
request to get more clusters. When you receive a response with no
NextToken
(or an empty or null value), that means there are no more clusters to get.
This is a variant of
describeClusters(software.amazon.awssdk.services.cloudhsmv2.model.DescribeClustersRequest)
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 forEach helper method
software.amazon.awssdk.services.cloudhsmv2.paginators.DescribeClustersPublisher publisher = client.describeClustersPaginator(request);
CompletableFuture<Void> future = publisher.forEach(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
software.amazon.awssdk.services.cloudhsmv2.paginators.DescribeClustersPublisher publisher = client.describeClustersPaginator(request);
publisher.subscribe(new Subscriber<software.amazon.awssdk.services.cloudhsmv2.model.DescribeClustersResponse>() {
public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.cloudhsmv2.model.DescribeClustersResponse response) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
Note: If you prefer to have control on service calls, use the
describeClusters(software.amazon.awssdk.services.cloudhsmv2.model.DescribeClustersRequest)
operation.
describeClustersRequest
- default DescribeClustersPublisher describeClustersPaginator(Consumer<DescribeClustersRequest.Builder> describeClustersRequest)
Gets information about AWS CloudHSM clusters.
This is a paginated operation, which means that each response might contain only a subset of all the clusters.
When the response contains only a subset of clusters, it includes a NextToken
value. Use this value
in a subsequent DescribeClusters
request to get more clusters. When you receive a response with no
NextToken
(or an empty or null value), that means there are no more clusters to get.
This is a variant of
describeClusters(software.amazon.awssdk.services.cloudhsmv2.model.DescribeClustersRequest)
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 forEach helper method
software.amazon.awssdk.services.cloudhsmv2.paginators.DescribeClustersPublisher publisher = client.describeClustersPaginator(request);
CompletableFuture<Void> future = publisher.forEach(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
software.amazon.awssdk.services.cloudhsmv2.paginators.DescribeClustersPublisher publisher = client.describeClustersPaginator(request);
publisher.subscribe(new Subscriber<software.amazon.awssdk.services.cloudhsmv2.model.DescribeClustersResponse>() {
public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.cloudhsmv2.model.DescribeClustersResponse response) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
Note: If you prefer to have control on service calls, use the
describeClusters(software.amazon.awssdk.services.cloudhsmv2.model.DescribeClustersRequest)
operation.
This is a convenience which creates an instance of the DescribeClustersRequest.Builder
avoiding the need
to create one manually via DescribeClustersRequest.builder()
describeClustersRequest
- A Consumer
that will call methods on DescribeClustersRequest.Builder
to create a request.default CompletableFuture<InitializeClusterResponse> initializeCluster(InitializeClusterRequest initializeClusterRequest)
Claims an AWS CloudHSM cluster by submitting the cluster certificate issued by your issuing certificate authority (CA) and the CA's root certificate. Before you can claim a cluster, you must sign the cluster's certificate signing request (CSR) with your issuing CA. To get the cluster's CSR, use DescribeClusters.
initializeClusterRequest
- default CompletableFuture<InitializeClusterResponse> initializeCluster(Consumer<InitializeClusterRequest.Builder> initializeClusterRequest)
Claims an AWS CloudHSM cluster by submitting the cluster certificate issued by your issuing certificate authority (CA) and the CA's root certificate. Before you can claim a cluster, you must sign the cluster's certificate signing request (CSR) with your issuing CA. To get the cluster's CSR, use DescribeClusters.
This is a convenience which creates an instance of the InitializeClusterRequest.Builder
avoiding the need
to create one manually via InitializeClusterRequest.builder()
initializeClusterRequest
- A Consumer
that will call methods on InitializeClusterRequest.Builder
to create a request.default CompletableFuture<ListTagsResponse> listTags(ListTagsRequest listTagsRequest)
Gets a list of tags for the specified AWS CloudHSM cluster.
This is a paginated operation, which means that each response might contain only a subset of all the tags. When
the response contains only a subset of tags, it includes a NextToken
value. Use this value in a
subsequent ListTags
request to get more tags. When you receive a response with no
NextToken
(or an empty or null value), that means there are no more tags to get.
listTagsRequest
- default CompletableFuture<ListTagsResponse> listTags(Consumer<ListTagsRequest.Builder> listTagsRequest)
Gets a list of tags for the specified AWS CloudHSM cluster.
This is a paginated operation, which means that each response might contain only a subset of all the tags. When
the response contains only a subset of tags, it includes a NextToken
value. Use this value in a
subsequent ListTags
request to get more tags. When you receive a response with no
NextToken
(or an empty or null value), that means there are no more tags to get.
This is a convenience which creates an instance of the ListTagsRequest.Builder
avoiding the need to
create one manually via ListTagsRequest.builder()
listTagsRequest
- A Consumer
that will call methods on ListTagsRequest.Builder
to create a request.default ListTagsPublisher listTagsPaginator(ListTagsRequest listTagsRequest)
Gets a list of tags for the specified AWS CloudHSM cluster.
This is a paginated operation, which means that each response might contain only a subset of all the tags. When
the response contains only a subset of tags, it includes a NextToken
value. Use this value in a
subsequent ListTags
request to get more tags. When you receive a response with no
NextToken
(or an empty or null value), that means there are no more tags to get.
This is a variant of listTags(software.amazon.awssdk.services.cloudhsmv2.model.ListTagsRequest)
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 forEach helper method
software.amazon.awssdk.services.cloudhsmv2.paginators.ListTagsPublisher publisher = client.listTagsPaginator(request);
CompletableFuture<Void> future = publisher.forEach(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
software.amazon.awssdk.services.cloudhsmv2.paginators.ListTagsPublisher publisher = client.listTagsPaginator(request);
publisher.subscribe(new Subscriber<software.amazon.awssdk.services.cloudhsmv2.model.ListTagsResponse>() {
public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.cloudhsmv2.model.ListTagsResponse response) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
Note: If you prefer to have control on service calls, use the
listTags(software.amazon.awssdk.services.cloudhsmv2.model.ListTagsRequest)
operation.
listTagsRequest
- default ListTagsPublisher listTagsPaginator(Consumer<ListTagsRequest.Builder> listTagsRequest)
Gets a list of tags for the specified AWS CloudHSM cluster.
This is a paginated operation, which means that each response might contain only a subset of all the tags. When
the response contains only a subset of tags, it includes a NextToken
value. Use this value in a
subsequent ListTags
request to get more tags. When you receive a response with no
NextToken
(or an empty or null value), that means there are no more tags to get.
This is a variant of listTags(software.amazon.awssdk.services.cloudhsmv2.model.ListTagsRequest)
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 forEach helper method
software.amazon.awssdk.services.cloudhsmv2.paginators.ListTagsPublisher publisher = client.listTagsPaginator(request);
CompletableFuture<Void> future = publisher.forEach(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
software.amazon.awssdk.services.cloudhsmv2.paginators.ListTagsPublisher publisher = client.listTagsPaginator(request);
publisher.subscribe(new Subscriber<software.amazon.awssdk.services.cloudhsmv2.model.ListTagsResponse>() {
public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.cloudhsmv2.model.ListTagsResponse response) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
Note: If you prefer to have control on service calls, use the
listTags(software.amazon.awssdk.services.cloudhsmv2.model.ListTagsRequest)
operation.
This is a convenience which creates an instance of the ListTagsRequest.Builder
avoiding the need to
create one manually via ListTagsRequest.builder()
listTagsRequest
- A Consumer
that will call methods on ListTagsRequest.Builder
to create a request.default CompletableFuture<TagResourceResponse> tagResource(TagResourceRequest tagResourceRequest)
Adds or overwrites one or more tags for the specified AWS CloudHSM cluster.
tagResourceRequest
- default CompletableFuture<TagResourceResponse> tagResource(Consumer<TagResourceRequest.Builder> tagResourceRequest)
Adds or overwrites one or more tags for the specified AWS CloudHSM cluster.
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)
Removes the specified tag or tags from the specified AWS CloudHSM cluster.
untagResourceRequest
- default CompletableFuture<UntagResourceResponse> untagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest)
Removes the specified tag or tags from the specified AWS CloudHSM cluster.
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.Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.