All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awssdk.services.identitystore.IdentitystoreAsyncClient Maven / Gradle / Ivy

/*
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */

package software.amazon.awssdk.services.identitystore;

import java.util.concurrent.CompletableFuture;
import java.util.function.Consumer;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.core.SdkClient;
import software.amazon.awssdk.services.identitystore.model.DescribeGroupRequest;
import software.amazon.awssdk.services.identitystore.model.DescribeGroupResponse;
import software.amazon.awssdk.services.identitystore.model.DescribeUserRequest;
import software.amazon.awssdk.services.identitystore.model.DescribeUserResponse;
import software.amazon.awssdk.services.identitystore.model.ListGroupsRequest;
import software.amazon.awssdk.services.identitystore.model.ListGroupsResponse;
import software.amazon.awssdk.services.identitystore.model.ListUsersRequest;
import software.amazon.awssdk.services.identitystore.model.ListUsersResponse;
import software.amazon.awssdk.services.identitystore.paginators.ListGroupsPublisher;
import software.amazon.awssdk.services.identitystore.paginators.ListUsersPublisher;

/**
 * Service client for accessing IdentityStore asynchronously. This can be created using the static {@link #builder()}
 * method.
 *
 * null
 */
@Generated("software.amazon.awssdk:codegen")
public interface IdentitystoreAsyncClient extends SdkClient {
    String SERVICE_NAME = "identitystore";

    /**
     * Create a {@link IdentitystoreAsyncClient} with the region loaded from the
     * {@link software.amazon.awssdk.regions.providers.DefaultAwsRegionProviderChain} and credentials loaded from the
     * {@link software.amazon.awssdk.auth.credentials.DefaultCredentialsProvider}.
     */
    static IdentitystoreAsyncClient create() {
        return builder().build();
    }

    /**
     * Create a builder that can be used to configure and create a {@link IdentitystoreAsyncClient}.
     */
    static IdentitystoreAsyncClientBuilder builder() {
        return new DefaultIdentitystoreAsyncClientBuilder();
    }

    /**
     * 

* Retrieves the group metadata and attributes from GroupId in an identity store. *

* * @param describeGroupRequest * @return A Java Future containing the result of the DescribeGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException Indicates that a requested resource is not found.
  • *
  • ValidationException The request failed because it contains a syntax error.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • ThrottlingException Indicates that the principal has crossed the throttling limits of the API * operations.
  • *
  • InternalServerException The request processing has failed because of an unknown error, exception or * failure with an internal server.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IdentitystoreException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IdentitystoreAsyncClient.DescribeGroup * @see AWS * API Documentation */ default CompletableFuture describeGroup(DescribeGroupRequest describeGroupRequest) { throw new UnsupportedOperationException(); } /** *

* Retrieves the group metadata and attributes from GroupId in an identity store. *

*
*

* This is a convenience which creates an instance of the {@link DescribeGroupRequest.Builder} avoiding the need to * create one manually via {@link DescribeGroupRequest#builder()} *

* * @param describeGroupRequest * A {@link Consumer} that will call methods on {@link DescribeGroupRequest.Builder} to create a request. * @return A Java Future containing the result of the DescribeGroup operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException Indicates that a requested resource is not found.
  • *
  • ValidationException The request failed because it contains a syntax error.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • ThrottlingException Indicates that the principal has crossed the throttling limits of the API * operations.
  • *
  • InternalServerException The request processing has failed because of an unknown error, exception or * failure with an internal server.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IdentitystoreException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IdentitystoreAsyncClient.DescribeGroup * @see AWS * API Documentation */ default CompletableFuture describeGroup(Consumer describeGroupRequest) { return describeGroup(DescribeGroupRequest.builder().applyMutation(describeGroupRequest).build()); } /** *

* Retrieves the user metadata and attributes from UserId in an identity store. *

* * @param describeUserRequest * @return A Java Future containing the result of the DescribeUser operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException Indicates that a requested resource is not found.
  • *
  • ValidationException The request failed because it contains a syntax error.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • ThrottlingException Indicates that the principal has crossed the throttling limits of the API * operations.
  • *
  • InternalServerException The request processing has failed because of an unknown error, exception or * failure with an internal server.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IdentitystoreException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IdentitystoreAsyncClient.DescribeUser * @see AWS API * Documentation */ default CompletableFuture describeUser(DescribeUserRequest describeUserRequest) { throw new UnsupportedOperationException(); } /** *

* Retrieves the user metadata and attributes from UserId in an identity store. *

*
*

* This is a convenience which creates an instance of the {@link DescribeUserRequest.Builder} avoiding the need to * create one manually via {@link DescribeUserRequest#builder()} *

* * @param describeUserRequest * A {@link Consumer} that will call methods on {@link DescribeUserRequest.Builder} to create a request. * @return A Java Future containing the result of the DescribeUser operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ResourceNotFoundException Indicates that a requested resource is not found.
  • *
  • ValidationException The request failed because it contains a syntax error.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • ThrottlingException Indicates that the principal has crossed the throttling limits of the API * operations.
  • *
  • InternalServerException The request processing has failed because of an unknown error, exception or * failure with an internal server.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IdentitystoreException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IdentitystoreAsyncClient.DescribeUser * @see AWS API * Documentation */ default CompletableFuture describeUser(Consumer describeUserRequest) { return describeUser(DescribeUserRequest.builder().applyMutation(describeUserRequest).build()); } /** *

* Lists the attribute name and value of the group that you specified in the search. We only support * DisplayName as a valid filter attribute path currently, and filter is required. This API returns * minimum attributes, including GroupId and group DisplayName in the response. *

* * @param listGroupsRequest * @return A Java Future containing the result of the ListGroups operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ValidationException The request failed because it contains a syntax error.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • ResourceNotFoundException Indicates that a requested resource is not found.
  • *
  • ThrottlingException Indicates that the principal has crossed the throttling limits of the API * operations.
  • *
  • InternalServerException The request processing has failed because of an unknown error, exception or * failure with an internal server.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IdentitystoreException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IdentitystoreAsyncClient.ListGroups * @see AWS API * Documentation */ default CompletableFuture listGroups(ListGroupsRequest listGroupsRequest) { throw new UnsupportedOperationException(); } /** *

* Lists the attribute name and value of the group that you specified in the search. We only support * DisplayName as a valid filter attribute path currently, and filter is required. This API returns * minimum attributes, including GroupId and group DisplayName in the response. *

*
*

* This is a convenience which creates an instance of the {@link ListGroupsRequest.Builder} avoiding the need to * create one manually via {@link ListGroupsRequest#builder()} *

* * @param listGroupsRequest * A {@link Consumer} that will call methods on {@link ListGroupsRequest.Builder} to create a request. * @return A Java Future containing the result of the ListGroups operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ValidationException The request failed because it contains a syntax error.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • ResourceNotFoundException Indicates that a requested resource is not found.
  • *
  • ThrottlingException Indicates that the principal has crossed the throttling limits of the API * operations.
  • *
  • InternalServerException The request processing has failed because of an unknown error, exception or * failure with an internal server.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IdentitystoreException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IdentitystoreAsyncClient.ListGroups * @see AWS API * Documentation */ default CompletableFuture listGroups(Consumer listGroupsRequest) { return listGroups(ListGroupsRequest.builder().applyMutation(listGroupsRequest).build()); } /** *

* Lists the attribute name and value of the group that you specified in the search. We only support * DisplayName as a valid filter attribute path currently, and filter is required. This API returns * minimum attributes, including GroupId and group DisplayName in the response. *

*
*

* This is a variant of {@link #listGroups(software.amazon.awssdk.services.identitystore.model.ListGroupsRequest)} * 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 * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.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 * *
     * {@code
     * software.amazon.awssdk.services.identitystore.paginators.ListGroupsPublisher publisher = client.listGroupsPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.identitystore.paginators.ListGroupsPublisher publisher = client.listGroupsPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.identitystore.model.ListGroupsResponse 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 * {@link #listGroups(software.amazon.awssdk.services.identitystore.model.ListGroupsRequest)} operation. *

* * @param listGroupsRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ValidationException The request failed because it contains a syntax error.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • ResourceNotFoundException Indicates that a requested resource is not found.
  • *
  • ThrottlingException Indicates that the principal has crossed the throttling limits of the API * operations.
  • *
  • InternalServerException The request processing has failed because of an unknown error, exception or * failure with an internal server.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IdentitystoreException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IdentitystoreAsyncClient.ListGroups * @see AWS API * Documentation */ default ListGroupsPublisher listGroupsPaginator(ListGroupsRequest listGroupsRequest) { throw new UnsupportedOperationException(); } /** *

* Lists the attribute name and value of the group that you specified in the search. We only support * DisplayName as a valid filter attribute path currently, and filter is required. This API returns * minimum attributes, including GroupId and group DisplayName in the response. *

*
*

* This is a variant of {@link #listGroups(software.amazon.awssdk.services.identitystore.model.ListGroupsRequest)} * 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 * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.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 * *
     * {@code
     * software.amazon.awssdk.services.identitystore.paginators.ListGroupsPublisher publisher = client.listGroupsPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.identitystore.paginators.ListGroupsPublisher publisher = client.listGroupsPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.identitystore.model.ListGroupsResponse 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 * {@link #listGroups(software.amazon.awssdk.services.identitystore.model.ListGroupsRequest)} operation. *

*

* This is a convenience which creates an instance of the {@link ListGroupsRequest.Builder} avoiding the need to * create one manually via {@link ListGroupsRequest#builder()} *

* * @param listGroupsRequest * A {@link Consumer} that will call methods on {@link ListGroupsRequest.Builder} to create a request. * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ValidationException The request failed because it contains a syntax error.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • ResourceNotFoundException Indicates that a requested resource is not found.
  • *
  • ThrottlingException Indicates that the principal has crossed the throttling limits of the API * operations.
  • *
  • InternalServerException The request processing has failed because of an unknown error, exception or * failure with an internal server.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IdentitystoreException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IdentitystoreAsyncClient.ListGroups * @see AWS API * Documentation */ default ListGroupsPublisher listGroupsPaginator(Consumer listGroupsRequest) { return listGroupsPaginator(ListGroupsRequest.builder().applyMutation(listGroupsRequest).build()); } /** *

* Lists the attribute name and value of the user that you specified in the search. We only support * UserName as a valid filter attribute path currently, and filter is required. This API returns * minimum attributes, including UserId and UserName in the response. *

* * @param listUsersRequest * @return A Java Future containing the result of the ListUsers operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ValidationException The request failed because it contains a syntax error.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • ResourceNotFoundException Indicates that a requested resource is not found.
  • *
  • ThrottlingException Indicates that the principal has crossed the throttling limits of the API * operations.
  • *
  • InternalServerException The request processing has failed because of an unknown error, exception or * failure with an internal server.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IdentitystoreException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IdentitystoreAsyncClient.ListUsers * @see AWS API * Documentation */ default CompletableFuture listUsers(ListUsersRequest listUsersRequest) { throw new UnsupportedOperationException(); } /** *

* Lists the attribute name and value of the user that you specified in the search. We only support * UserName as a valid filter attribute path currently, and filter is required. This API returns * minimum attributes, including UserId and UserName in the response. *

*
*

* This is a convenience which creates an instance of the {@link ListUsersRequest.Builder} avoiding the need to * create one manually via {@link ListUsersRequest#builder()} *

* * @param listUsersRequest * A {@link Consumer} that will call methods on {@link ListUsersRequest.Builder} to create a request. * @return A Java Future containing the result of the ListUsers operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ValidationException The request failed because it contains a syntax error.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • ResourceNotFoundException Indicates that a requested resource is not found.
  • *
  • ThrottlingException Indicates that the principal has crossed the throttling limits of the API * operations.
  • *
  • InternalServerException The request processing has failed because of an unknown error, exception or * failure with an internal server.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IdentitystoreException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IdentitystoreAsyncClient.ListUsers * @see AWS API * Documentation */ default CompletableFuture listUsers(Consumer listUsersRequest) { return listUsers(ListUsersRequest.builder().applyMutation(listUsersRequest).build()); } /** *

* Lists the attribute name and value of the user that you specified in the search. We only support * UserName as a valid filter attribute path currently, and filter is required. This API returns * minimum attributes, including UserId and UserName in the response. *

*
*

* This is a variant of {@link #listUsers(software.amazon.awssdk.services.identitystore.model.ListUsersRequest)} * 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 * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.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 * *
     * {@code
     * software.amazon.awssdk.services.identitystore.paginators.ListUsersPublisher publisher = client.listUsersPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.identitystore.paginators.ListUsersPublisher publisher = client.listUsersPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.identitystore.model.ListUsersResponse 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 * {@link #listUsers(software.amazon.awssdk.services.identitystore.model.ListUsersRequest)} operation. *

* * @param listUsersRequest * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ValidationException The request failed because it contains a syntax error.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • ResourceNotFoundException Indicates that a requested resource is not found.
  • *
  • ThrottlingException Indicates that the principal has crossed the throttling limits of the API * operations.
  • *
  • InternalServerException The request processing has failed because of an unknown error, exception or * failure with an internal server.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IdentitystoreException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IdentitystoreAsyncClient.ListUsers * @see AWS API * Documentation */ default ListUsersPublisher listUsersPaginator(ListUsersRequest listUsersRequest) { throw new UnsupportedOperationException(); } /** *

* Lists the attribute name and value of the user that you specified in the search. We only support * UserName as a valid filter attribute path currently, and filter is required. This API returns * minimum attributes, including UserId and UserName in the response. *

*
*

* This is a variant of {@link #listUsers(software.amazon.awssdk.services.identitystore.model.ListUsersRequest)} * 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 * {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe * method will result in a new {@link org.reactivestreams.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 * *
     * {@code
     * software.amazon.awssdk.services.identitystore.paginators.ListUsersPublisher publisher = client.listUsersPaginator(request);
     * CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
     * future.get();
     * }
     * 
* * 2) Using a custom subscriber * *
     * {@code
     * software.amazon.awssdk.services.identitystore.paginators.ListUsersPublisher publisher = client.listUsersPaginator(request);
     * publisher.subscribe(new Subscriber() {
     * 
     * public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
     * 
     * 
     * public void onNext(software.amazon.awssdk.services.identitystore.model.ListUsersResponse 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 * {@link #listUsers(software.amazon.awssdk.services.identitystore.model.ListUsersRequest)} operation. *

*

* This is a convenience which creates an instance of the {@link ListUsersRequest.Builder} avoiding the need to * create one manually via {@link ListUsersRequest#builder()} *

* * @param listUsersRequest * A {@link Consumer} that will call methods on {@link ListUsersRequest.Builder} to create a request. * @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following * exceptions. *
    *
  • ValidationException The request failed because it contains a syntax error.
  • *
  • AccessDeniedException You do not have sufficient access to perform this action.
  • *
  • ResourceNotFoundException Indicates that a requested resource is not found.
  • *
  • ThrottlingException Indicates that the principal has crossed the throttling limits of the API * operations.
  • *
  • InternalServerException The request processing has failed because of an unknown error, exception or * failure with an internal server.
  • *
  • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). * Can be used for catch all scenarios.
  • *
  • SdkClientException If any client side error occurs such as an IO related failure, failure to get * credentials, etc.
  • *
  • IdentitystoreException Base class for all service exceptions. Unknown exceptions will be thrown as an * instance of this type.
  • *
* @sample IdentitystoreAsyncClient.ListUsers * @see AWS API * Documentation */ default ListUsersPublisher listUsersPaginator(Consumer listUsersRequest) { return listUsersPaginator(ListUsersRequest.builder().applyMutation(listUsersRequest).build()); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy