@Generated(value="software.amazon.awssdk:codegen") public interface ElasticsearchAsyncClient extends SdkClient, SdkAutoCloseable
builder()
method.
Use the Amazon Elasticsearch configuration API to create, configure, and manage Elasticsearch domains.
The endpoint for configuration service requests is region-specific: es.region.amazonaws.com. For example, es.us-east-1.amazonaws.com. For a current list of supported regions and endpoints, see Regions and Endpoints.
Modifier and Type | Field and Description |
---|---|
static String |
SERVICE_NAME |
Modifier and Type | Method and Description |
---|---|
default CompletableFuture<AddTagsResponse> |
addTags(AddTagsRequest addTagsRequest)
Attaches tags to an existing Elasticsearch domain.
|
default CompletableFuture<AddTagsResponse> |
addTags(Consumer<AddTagsRequest.Builder> addTagsRequest)
Attaches tags to an existing Elasticsearch domain.
|
static ElasticsearchAsyncClientBuilder |
builder()
Create a builder that can be used to configure and create a
ElasticsearchAsyncClient . |
static ElasticsearchAsyncClient |
create()
Create a
ElasticsearchAsyncClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from
the DefaultCredentialsProvider . |
default CompletableFuture<CreateElasticsearchDomainResponse> |
createElasticsearchDomain(Consumer<CreateElasticsearchDomainRequest.Builder> createElasticsearchDomainRequest)
Creates a new Elasticsearch domain.
|
default CompletableFuture<CreateElasticsearchDomainResponse> |
createElasticsearchDomain(CreateElasticsearchDomainRequest createElasticsearchDomainRequest)
Creates a new Elasticsearch domain.
|
default CompletableFuture<DeleteElasticsearchDomainResponse> |
deleteElasticsearchDomain(Consumer<DeleteElasticsearchDomainRequest.Builder> deleteElasticsearchDomainRequest)
Permanently deletes the specified Elasticsearch domain and all of its data.
|
default CompletableFuture<DeleteElasticsearchDomainResponse> |
deleteElasticsearchDomain(DeleteElasticsearchDomainRequest deleteElasticsearchDomainRequest)
Permanently deletes the specified Elasticsearch domain and all of its data.
|
default CompletableFuture<DeleteElasticsearchServiceRoleResponse> |
deleteElasticsearchServiceRole()
Deletes the service-linked role that Elasticsearch Service uses to manage and maintain VPC domains.
|
default CompletableFuture<DeleteElasticsearchServiceRoleResponse> |
deleteElasticsearchServiceRole(Consumer<DeleteElasticsearchServiceRoleRequest.Builder> deleteElasticsearchServiceRoleRequest)
Deletes the service-linked role that Elasticsearch Service uses to manage and maintain VPC domains.
|
default CompletableFuture<DeleteElasticsearchServiceRoleResponse> |
deleteElasticsearchServiceRole(DeleteElasticsearchServiceRoleRequest deleteElasticsearchServiceRoleRequest)
Deletes the service-linked role that Elasticsearch Service uses to manage and maintain VPC domains.
|
default CompletableFuture<DescribeElasticsearchDomainResponse> |
describeElasticsearchDomain(Consumer<DescribeElasticsearchDomainRequest.Builder> describeElasticsearchDomainRequest)
Returns domain configuration information about the specified Elasticsearch domain, including the domain ID,
domain endpoint, and domain ARN.
|
default CompletableFuture<DescribeElasticsearchDomainResponse> |
describeElasticsearchDomain(DescribeElasticsearchDomainRequest describeElasticsearchDomainRequest)
Returns domain configuration information about the specified Elasticsearch domain, including the domain ID,
domain endpoint, and domain ARN.
|
default CompletableFuture<DescribeElasticsearchDomainConfigResponse> |
describeElasticsearchDomainConfig(Consumer<DescribeElasticsearchDomainConfigRequest.Builder> describeElasticsearchDomainConfigRequest)
Provides cluster configuration information about the specified Elasticsearch domain, such as the state, creation
date, update version, and update date for cluster options.
|
default CompletableFuture<DescribeElasticsearchDomainConfigResponse> |
describeElasticsearchDomainConfig(DescribeElasticsearchDomainConfigRequest describeElasticsearchDomainConfigRequest)
Provides cluster configuration information about the specified Elasticsearch domain, such as the state, creation
date, update version, and update date for cluster options.
|
default CompletableFuture<DescribeElasticsearchDomainsResponse> |
describeElasticsearchDomains(Consumer<DescribeElasticsearchDomainsRequest.Builder> describeElasticsearchDomainsRequest)
Returns domain configuration information about the specified Elasticsearch domains, including the domain ID,
domain endpoint, and domain ARN.
|
default CompletableFuture<DescribeElasticsearchDomainsResponse> |
describeElasticsearchDomains(DescribeElasticsearchDomainsRequest describeElasticsearchDomainsRequest)
Returns domain configuration information about the specified Elasticsearch domains, including the domain ID,
domain endpoint, and domain ARN.
|
default CompletableFuture<DescribeElasticsearchInstanceTypeLimitsResponse> |
describeElasticsearchInstanceTypeLimits(Consumer<DescribeElasticsearchInstanceTypeLimitsRequest.Builder> describeElasticsearchInstanceTypeLimitsRequest)
Describe Elasticsearch Limits for a given InstanceType and ElasticsearchVersion.
|
default CompletableFuture<DescribeElasticsearchInstanceTypeLimitsResponse> |
describeElasticsearchInstanceTypeLimits(DescribeElasticsearchInstanceTypeLimitsRequest describeElasticsearchInstanceTypeLimitsRequest)
Describe Elasticsearch Limits for a given InstanceType and ElasticsearchVersion.
|
default CompletableFuture<ListDomainNamesResponse> |
listDomainNames()
Returns the name of all Elasticsearch domains owned by the current user's account.
|
default CompletableFuture<ListDomainNamesResponse> |
listDomainNames(Consumer<ListDomainNamesRequest.Builder> listDomainNamesRequest)
Returns the name of all Elasticsearch domains owned by the current user's account.
|
default CompletableFuture<ListDomainNamesResponse> |
listDomainNames(ListDomainNamesRequest listDomainNamesRequest)
Returns the name of all Elasticsearch domains owned by the current user's account.
|
default CompletableFuture<ListElasticsearchInstanceTypesResponse> |
listElasticsearchInstanceTypes(Consumer<ListElasticsearchInstanceTypesRequest.Builder> listElasticsearchInstanceTypesRequest)
List all Elasticsearch instance types that are supported for given ElasticsearchVersion
|
default CompletableFuture<ListElasticsearchInstanceTypesResponse> |
listElasticsearchInstanceTypes(ListElasticsearchInstanceTypesRequest listElasticsearchInstanceTypesRequest)
List all Elasticsearch instance types that are supported for given ElasticsearchVersion
|
default ListElasticsearchInstanceTypesPublisher |
listElasticsearchInstanceTypesPaginator(ListElasticsearchInstanceTypesRequest listElasticsearchInstanceTypesRequest)
List all Elasticsearch instance types that are supported for given ElasticsearchVersion
|
default CompletableFuture<ListElasticsearchVersionsResponse> |
listElasticsearchVersions()
List all supported Elasticsearch versions
|
default CompletableFuture<ListElasticsearchVersionsResponse> |
listElasticsearchVersions(Consumer<ListElasticsearchVersionsRequest.Builder> listElasticsearchVersionsRequest)
List all supported Elasticsearch versions
|
default CompletableFuture<ListElasticsearchVersionsResponse> |
listElasticsearchVersions(ListElasticsearchVersionsRequest listElasticsearchVersionsRequest)
List all supported Elasticsearch versions
|
default ListElasticsearchVersionsPublisher |
listElasticsearchVersionsPaginator()
List all supported Elasticsearch versions
|
default ListElasticsearchVersionsPublisher |
listElasticsearchVersionsPaginator(ListElasticsearchVersionsRequest listElasticsearchVersionsRequest)
List all supported Elasticsearch versions
|
default CompletableFuture<ListTagsResponse> |
listTags(Consumer<ListTagsRequest.Builder> listTagsRequest)
Returns all tags for the given Elasticsearch domain.
|
default CompletableFuture<ListTagsResponse> |
listTags(ListTagsRequest listTagsRequest)
Returns all tags for the given Elasticsearch domain.
|
default CompletableFuture<RemoveTagsResponse> |
removeTags(Consumer<RemoveTagsRequest.Builder> removeTagsRequest)
Removes the specified set of tags from the specified Elasticsearch domain.
|
default CompletableFuture<RemoveTagsResponse> |
removeTags(RemoveTagsRequest removeTagsRequest)
Removes the specified set of tags from the specified Elasticsearch domain.
|
default CompletableFuture<UpdateElasticsearchDomainConfigResponse> |
updateElasticsearchDomainConfig(Consumer<UpdateElasticsearchDomainConfigRequest.Builder> updateElasticsearchDomainConfigRequest)
Modifies the cluster configuration of the specified Elasticsearch domain, setting as setting the instance type
and the number of instances.
|
default CompletableFuture<UpdateElasticsearchDomainConfigResponse> |
updateElasticsearchDomainConfig(UpdateElasticsearchDomainConfigRequest updateElasticsearchDomainConfigRequest)
Modifies the cluster configuration of the specified Elasticsearch domain, setting as setting the instance type
and the number of instances.
|
serviceName
close
static final String SERVICE_NAME
static ElasticsearchAsyncClient create()
ElasticsearchAsyncClient
with the region loaded from the
DefaultAwsRegionProviderChain
and credentials loaded from
the DefaultCredentialsProvider
.static ElasticsearchAsyncClientBuilder builder()
ElasticsearchAsyncClient
.default CompletableFuture<AddTagsResponse> addTags(AddTagsRequest addTagsRequest)
Attaches tags to an existing Elasticsearch domain. Tags are a set of case-sensitive key value pairs. An Elasticsearch domain may have up to 10 tags. See Tagging Amazon Elasticsearch Service Domains for more information.
addTagsRequest
- Container for the parameters to the AddTags
operation. Specify the tags that you want
to attach to the Elasticsearch domain.default CompletableFuture<AddTagsResponse> addTags(Consumer<AddTagsRequest.Builder> addTagsRequest)
Attaches tags to an existing Elasticsearch domain. Tags are a set of case-sensitive key value pairs. An Elasticsearch domain may have up to 10 tags. See Tagging Amazon Elasticsearch Service Domains for more information.
AddTagsRequest.Builder
avoiding the need to create
one manually via AddTagsRequest.builder()
addTagsRequest
- a Consumer
that will call methods on AddTagsRequest.Builder
.default CompletableFuture<CreateElasticsearchDomainResponse> createElasticsearchDomain(CreateElasticsearchDomainRequest createElasticsearchDomainRequest)
Creates a new Elasticsearch domain. For more information, see Creating Elasticsearch Domains in the Amazon Elasticsearch Service Developer Guide.
createElasticsearchDomainRequest
- default CompletableFuture<CreateElasticsearchDomainResponse> createElasticsearchDomain(Consumer<CreateElasticsearchDomainRequest.Builder> createElasticsearchDomainRequest)
Creates a new Elasticsearch domain. For more information, see Creating Elasticsearch Domains in the Amazon Elasticsearch Service Developer Guide.
CreateElasticsearchDomainRequest.Builder
avoiding
the need to create one manually via CreateElasticsearchDomainRequest.builder()
createElasticsearchDomainRequest
- a Consumer
that will call methods on CreateElasticsearchDomainRequest.Builder
.default CompletableFuture<DeleteElasticsearchDomainResponse> deleteElasticsearchDomain(DeleteElasticsearchDomainRequest deleteElasticsearchDomainRequest)
Permanently deletes the specified Elasticsearch domain and all of its data. Once a domain is deleted, it cannot be recovered.
deleteElasticsearchDomainRequest
- Container for the parameters to the DeleteElasticsearchDomain
operation. Specifies the
name of the Elasticsearch domain that you want to delete.default CompletableFuture<DeleteElasticsearchDomainResponse> deleteElasticsearchDomain(Consumer<DeleteElasticsearchDomainRequest.Builder> deleteElasticsearchDomainRequest)
Permanently deletes the specified Elasticsearch domain and all of its data. Once a domain is deleted, it cannot be recovered.
DeleteElasticsearchDomainRequest.Builder
avoiding
the need to create one manually via DeleteElasticsearchDomainRequest.builder()
deleteElasticsearchDomainRequest
- a Consumer
that will call methods on DeleteElasticsearchDomainRequest.Builder
.default CompletableFuture<DeleteElasticsearchServiceRoleResponse> deleteElasticsearchServiceRole(DeleteElasticsearchServiceRoleRequest deleteElasticsearchServiceRoleRequest)
Deletes the service-linked role that Elasticsearch Service uses to manage and maintain VPC domains. Role deletion will fail if any existing VPC domains use the role. You must delete any such Elasticsearch domains before deleting the role. See Deleting Elasticsearch Service Role in VPC Endpoints for Amazon Elasticsearch Service Domains.
deleteElasticsearchServiceRoleRequest
- default CompletableFuture<DeleteElasticsearchServiceRoleResponse> deleteElasticsearchServiceRole()
Deletes the service-linked role that Elasticsearch Service uses to manage and maintain VPC domains. Role deletion will fail if any existing VPC domains use the role. You must delete any such Elasticsearch domains before deleting the role. See Deleting Elasticsearch Service Role in VPC Endpoints for Amazon Elasticsearch Service Domains.
default CompletableFuture<DeleteElasticsearchServiceRoleResponse> deleteElasticsearchServiceRole(Consumer<DeleteElasticsearchServiceRoleRequest.Builder> deleteElasticsearchServiceRoleRequest)
Deletes the service-linked role that Elasticsearch Service uses to manage and maintain VPC domains. Role deletion will fail if any existing VPC domains use the role. You must delete any such Elasticsearch domains before deleting the role. See Deleting Elasticsearch Service Role in VPC Endpoints for Amazon Elasticsearch Service Domains.
DeleteElasticsearchServiceRoleRequest.Builder
avoiding the need to create one manually via DeleteElasticsearchServiceRoleRequest.builder()
deleteElasticsearchServiceRoleRequest
- a Consumer
that will call methods on DeleteElasticsearchServiceRoleRequest.Builder
.default CompletableFuture<DescribeElasticsearchDomainResponse> describeElasticsearchDomain(DescribeElasticsearchDomainRequest describeElasticsearchDomainRequest)
Returns domain configuration information about the specified Elasticsearch domain, including the domain ID, domain endpoint, and domain ARN.
describeElasticsearchDomainRequest
- Container for the parameters to the DescribeElasticsearchDomain
operation.default CompletableFuture<DescribeElasticsearchDomainResponse> describeElasticsearchDomain(Consumer<DescribeElasticsearchDomainRequest.Builder> describeElasticsearchDomainRequest)
Returns domain configuration information about the specified Elasticsearch domain, including the domain ID, domain endpoint, and domain ARN.
DescribeElasticsearchDomainRequest.Builder
avoiding the need to create one manually via DescribeElasticsearchDomainRequest.builder()
describeElasticsearchDomainRequest
- a Consumer
that will call methods on DescribeElasticsearchDomainRequest.Builder
.default CompletableFuture<DescribeElasticsearchDomainConfigResponse> describeElasticsearchDomainConfig(DescribeElasticsearchDomainConfigRequest describeElasticsearchDomainConfigRequest)
Provides cluster configuration information about the specified Elasticsearch domain, such as the state, creation date, update version, and update date for cluster options.
describeElasticsearchDomainConfigRequest
- Container for the parameters to the DescribeElasticsearchDomainConfig
operation. Specifies
the domain name for which you want configuration information.default CompletableFuture<DescribeElasticsearchDomainConfigResponse> describeElasticsearchDomainConfig(Consumer<DescribeElasticsearchDomainConfigRequest.Builder> describeElasticsearchDomainConfigRequest)
Provides cluster configuration information about the specified Elasticsearch domain, such as the state, creation date, update version, and update date for cluster options.
DescribeElasticsearchDomainConfigRequest.Builder
avoiding the need to create one manually via DescribeElasticsearchDomainConfigRequest.builder()
describeElasticsearchDomainConfigRequest
- a Consumer
that will call methods on DescribeElasticsearchDomainConfigRequest.Builder
.default CompletableFuture<DescribeElasticsearchDomainsResponse> describeElasticsearchDomains(DescribeElasticsearchDomainsRequest describeElasticsearchDomainsRequest)
Returns domain configuration information about the specified Elasticsearch domains, including the domain ID, domain endpoint, and domain ARN.
describeElasticsearchDomainsRequest
- Container for the parameters to the DescribeElasticsearchDomains
operation. By
default, the API returns the status of all Elasticsearch domains.default CompletableFuture<DescribeElasticsearchDomainsResponse> describeElasticsearchDomains(Consumer<DescribeElasticsearchDomainsRequest.Builder> describeElasticsearchDomainsRequest)
Returns domain configuration information about the specified Elasticsearch domains, including the domain ID, domain endpoint, and domain ARN.
DescribeElasticsearchDomainsRequest.Builder
avoiding the need to create one manually via DescribeElasticsearchDomainsRequest.builder()
describeElasticsearchDomainsRequest
- a Consumer
that will call methods on DescribeElasticsearchDomainsRequest.Builder
.default CompletableFuture<DescribeElasticsearchInstanceTypeLimitsResponse> describeElasticsearchInstanceTypeLimits(DescribeElasticsearchInstanceTypeLimitsRequest describeElasticsearchInstanceTypeLimitsRequest)
Describe Elasticsearch Limits for a given InstanceType and ElasticsearchVersion. When modifying existing Domain,
specify the DomainName
to know what Limits are supported for modifying.
describeElasticsearchInstanceTypeLimitsRequest
- Container for the parameters to DescribeElasticsearchInstanceTypeLimits
operation.default CompletableFuture<DescribeElasticsearchInstanceTypeLimitsResponse> describeElasticsearchInstanceTypeLimits(Consumer<DescribeElasticsearchInstanceTypeLimitsRequest.Builder> describeElasticsearchInstanceTypeLimitsRequest)
Describe Elasticsearch Limits for a given InstanceType and ElasticsearchVersion. When modifying existing Domain,
specify the DomainName
to know what Limits are supported for modifying.
DescribeElasticsearchInstanceTypeLimitsRequest.Builder
avoiding the need to create one manually via
DescribeElasticsearchInstanceTypeLimitsRequest.builder()
describeElasticsearchInstanceTypeLimitsRequest
- a Consumer
that will call methods on
DescribeElasticsearchInstanceTypeLimitsRequest.Builder
.default CompletableFuture<ListDomainNamesResponse> listDomainNames(ListDomainNamesRequest listDomainNamesRequest)
Returns the name of all Elasticsearch domains owned by the current user's account.
listDomainNamesRequest
- default CompletableFuture<ListDomainNamesResponse> listDomainNames()
Returns the name of all Elasticsearch domains owned by the current user's account.
default CompletableFuture<ListDomainNamesResponse> listDomainNames(Consumer<ListDomainNamesRequest.Builder> listDomainNamesRequest)
Returns the name of all Elasticsearch domains owned by the current user's account.
ListDomainNamesRequest.Builder
avoiding the need
to create one manually via ListDomainNamesRequest.builder()
listDomainNamesRequest
- a Consumer
that will call methods on ListDomainNamesRequest.Builder
.default CompletableFuture<ListElasticsearchInstanceTypesResponse> listElasticsearchInstanceTypes(ListElasticsearchInstanceTypesRequest listElasticsearchInstanceTypesRequest)
List all Elasticsearch instance types that are supported for given ElasticsearchVersion
listElasticsearchInstanceTypesRequest
- Container for the parameters to the ListElasticsearchInstanceTypes
operation.default CompletableFuture<ListElasticsearchInstanceTypesResponse> listElasticsearchInstanceTypes(Consumer<ListElasticsearchInstanceTypesRequest.Builder> listElasticsearchInstanceTypesRequest)
List all Elasticsearch instance types that are supported for given ElasticsearchVersion
ListElasticsearchInstanceTypesRequest.Builder
avoiding the need to create one manually via ListElasticsearchInstanceTypesRequest.builder()
listElasticsearchInstanceTypesRequest
- a Consumer
that will call methods on ListElasticsearchInstanceTypesRequest.Builder
.default ListElasticsearchInstanceTypesPublisher listElasticsearchInstanceTypesPaginator(ListElasticsearchInstanceTypesRequest listElasticsearchInstanceTypesRequest)
List all Elasticsearch instance types that are supported for given ElasticsearchVersion
This is a variant of
listElasticsearchInstanceTypes(software.amazon.awssdk.services.elasticsearch.model.ListElasticsearchInstanceTypesRequest)
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.elasticsearch.paginators.ListElasticsearchInstanceTypesPublisher publisher = client.listElasticsearchInstanceTypesPaginator(request);
CompletableFuture<Void> future = publisher.forEach(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
software.amazon.awssdk.services.elasticsearch.paginators.ListElasticsearchInstanceTypesPublisher publisher = client.listElasticsearchInstanceTypesPaginator(request);
publisher.subscribe(new Subscriber<software.amazon.awssdk.services.elasticsearch.model.ListElasticsearchInstanceTypesResponse>() {
public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.elasticsearch.model.ListElasticsearchInstanceTypesResponse 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
listElasticsearchInstanceTypes(software.amazon.awssdk.services.elasticsearch.model.ListElasticsearchInstanceTypesRequest)
operation.
listElasticsearchInstanceTypesRequest
- Container for the parameters to the ListElasticsearchInstanceTypes
operation.default CompletableFuture<ListElasticsearchVersionsResponse> listElasticsearchVersions(ListElasticsearchVersionsRequest listElasticsearchVersionsRequest)
List all supported Elasticsearch versions
listElasticsearchVersionsRequest
- Container for the parameters to the ListElasticsearchVersions
operation.
Use MaxResults
to control the maximum number of results to retrieve in a single
call.
Use NextToken
in response to retrieve more results. If the received response does
not contain a NextToken, then there are no more results to retrieve.
default CompletableFuture<ListElasticsearchVersionsResponse> listElasticsearchVersions()
List all supported Elasticsearch versions
default CompletableFuture<ListElasticsearchVersionsResponse> listElasticsearchVersions(Consumer<ListElasticsearchVersionsRequest.Builder> listElasticsearchVersionsRequest)
List all supported Elasticsearch versions
ListElasticsearchVersionsRequest.Builder
avoiding
the need to create one manually via ListElasticsearchVersionsRequest.builder()
listElasticsearchVersionsRequest
- a Consumer
that will call methods on ListElasticsearchVersionsRequest.Builder
.default ListElasticsearchVersionsPublisher listElasticsearchVersionsPaginator(ListElasticsearchVersionsRequest listElasticsearchVersionsRequest)
List all supported Elasticsearch versions
This is a variant of
listElasticsearchVersions(software.amazon.awssdk.services.elasticsearch.model.ListElasticsearchVersionsRequest)
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.elasticsearch.paginators.ListElasticsearchVersionsPublisher publisher = client.listElasticsearchVersionsPaginator(request);
CompletableFuture<Void> future = publisher.forEach(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
software.amazon.awssdk.services.elasticsearch.paginators.ListElasticsearchVersionsPublisher publisher = client.listElasticsearchVersionsPaginator(request);
publisher.subscribe(new Subscriber<software.amazon.awssdk.services.elasticsearch.model.ListElasticsearchVersionsResponse>() {
public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.elasticsearch.model.ListElasticsearchVersionsResponse 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
listElasticsearchVersions(software.amazon.awssdk.services.elasticsearch.model.ListElasticsearchVersionsRequest)
operation.
listElasticsearchVersionsRequest
- Container for the parameters to the ListElasticsearchVersions
operation.
Use MaxResults
to control the maximum number of results to retrieve in a single
call.
Use NextToken
in response to retrieve more results. If the received response does
not contain a NextToken, then there are no more results to retrieve.
default ListElasticsearchVersionsPublisher listElasticsearchVersionsPaginator()
List all supported Elasticsearch versions
This is a variant of
listElasticsearchVersions(software.amazon.awssdk.services.elasticsearch.model.ListElasticsearchVersionsRequest)
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.elasticsearch.paginators.ListElasticsearchVersionsPublisher publisher = client.listElasticsearchVersionsPaginator(request);
CompletableFuture<Void> future = publisher.forEach(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
software.amazon.awssdk.services.elasticsearch.paginators.ListElasticsearchVersionsPublisher publisher = client.listElasticsearchVersionsPaginator(request);
publisher.subscribe(new Subscriber<software.amazon.awssdk.services.elasticsearch.model.ListElasticsearchVersionsResponse>() {
public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.elasticsearch.model.ListElasticsearchVersionsResponse 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
listElasticsearchVersions(software.amazon.awssdk.services.elasticsearch.model.ListElasticsearchVersionsRequest)
operation.
default CompletableFuture<ListTagsResponse> listTags(ListTagsRequest listTagsRequest)
Returns all tags for the given Elasticsearch domain.
listTagsRequest
- Container for the parameters to the ListTags
operation. Specify the ARN
for the Elasticsearch domain to which the tags are attached that you want to view are attached.default CompletableFuture<ListTagsResponse> listTags(Consumer<ListTagsRequest.Builder> listTagsRequest)
Returns all tags for the given Elasticsearch domain.
ListTagsRequest.Builder
avoiding the need to
create one manually via ListTagsRequest.builder()
listTagsRequest
- a Consumer
that will call methods on ListTagsRequest.Builder
.default CompletableFuture<RemoveTagsResponse> removeTags(RemoveTagsRequest removeTagsRequest)
Removes the specified set of tags from the specified Elasticsearch domain.
removeTagsRequest
- Container for the parameters to the RemoveTags
operation. Specify the ARN
for the Elasticsearch domain from which you want to remove the specified TagKey
.default CompletableFuture<RemoveTagsResponse> removeTags(Consumer<RemoveTagsRequest.Builder> removeTagsRequest)
Removes the specified set of tags from the specified Elasticsearch domain.
RemoveTagsRequest.Builder
avoiding the need to
create one manually via RemoveTagsRequest.builder()
removeTagsRequest
- a Consumer
that will call methods on RemoveTagsRequest.Builder
.default CompletableFuture<UpdateElasticsearchDomainConfigResponse> updateElasticsearchDomainConfig(UpdateElasticsearchDomainConfigRequest updateElasticsearchDomainConfigRequest)
Modifies the cluster configuration of the specified Elasticsearch domain, setting as setting the instance type and the number of instances.
updateElasticsearchDomainConfigRequest
- Container for the parameters to the UpdateElasticsearchDomain
operation. Specifies the
type and number of instances in the domain cluster.default CompletableFuture<UpdateElasticsearchDomainConfigResponse> updateElasticsearchDomainConfig(Consumer<UpdateElasticsearchDomainConfigRequest.Builder> updateElasticsearchDomainConfigRequest)
Modifies the cluster configuration of the specified Elasticsearch domain, setting as setting the instance type and the number of instances.
UpdateElasticsearchDomainConfigRequest.Builder
avoiding the need to create one manually via UpdateElasticsearchDomainConfigRequest.builder()
updateElasticsearchDomainConfigRequest
- a Consumer
that will call methods on UpdateElasticsearchDomainConfigRequest.Builder
.Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.