Interface CostOptimizationHubAsyncClient
- All Superinterfaces:
- AutoCloseable,- AwsClient,- SdkAutoCloseable,- SdkClient
builder() method.The asynchronous client performs non-blocking I/O when configured with any
 SdkAsyncHttpClient supported in the SDK. However, full non-blocking is not guaranteed as the async client may
 perform blocking calls in some cases such as credentials retrieval and endpoint discovery as part of the async API
 call.
 You can use the Cost Optimization Hub API to programmatically identify, filter, aggregate, and quantify savings for your cost optimization recommendations across multiple Amazon Web Services Regions and Amazon Web Services accounts in your organization.
The Cost Optimization Hub API provides the following endpoint:
- 
 https://cost-optimization-hub.us-east-1.amazonaws.com 
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringValue for looking up the service's metadata from theServiceMetadataProvider.static final String
- 
Method SummaryModifier and TypeMethodDescriptionbuilder()Create a builder that can be used to configure and create aCostOptimizationHubAsyncClient.create()Create aCostOptimizationHubAsyncClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.default CompletableFuture<GetPreferencesResponse> getPreferences(Consumer<GetPreferencesRequest.Builder> getPreferencesRequest) Returns a set of preferences for an account in order to add account-specific preferences into the service.default CompletableFuture<GetPreferencesResponse> getPreferences(GetPreferencesRequest getPreferencesRequest) Returns a set of preferences for an account in order to add account-specific preferences into the service.getRecommendation(Consumer<GetRecommendationRequest.Builder> getRecommendationRequest) Returns both the current and recommended resource configuration and the estimated cost impact for a recommendation.getRecommendation(GetRecommendationRequest getRecommendationRequest) Returns both the current and recommended resource configuration and the estimated cost impact for a recommendation.listEnrollmentStatuses(Consumer<ListEnrollmentStatusesRequest.Builder> listEnrollmentStatusesRequest) Retrieves the enrollment status for an account.listEnrollmentStatuses(ListEnrollmentStatusesRequest listEnrollmentStatusesRequest) Retrieves the enrollment status for an account.default ListEnrollmentStatusesPublisherlistEnrollmentStatusesPaginator(Consumer<ListEnrollmentStatusesRequest.Builder> listEnrollmentStatusesRequest) This is a variant oflistEnrollmentStatuses(software.amazon.awssdk.services.costoptimizationhub.model.ListEnrollmentStatusesRequest)operation.default ListEnrollmentStatusesPublisherlistEnrollmentStatusesPaginator(ListEnrollmentStatusesRequest listEnrollmentStatusesRequest) This is a variant oflistEnrollmentStatuses(software.amazon.awssdk.services.costoptimizationhub.model.ListEnrollmentStatusesRequest)operation.listRecommendations(Consumer<ListRecommendationsRequest.Builder> listRecommendationsRequest) Returns a list of recommendations.listRecommendations(ListRecommendationsRequest listRecommendationsRequest) Returns a list of recommendations.default ListRecommendationsPublisherlistRecommendationsPaginator(Consumer<ListRecommendationsRequest.Builder> listRecommendationsRequest) This is a variant oflistRecommendations(software.amazon.awssdk.services.costoptimizationhub.model.ListRecommendationsRequest)operation.default ListRecommendationsPublisherlistRecommendationsPaginator(ListRecommendationsRequest listRecommendationsRequest) This is a variant oflistRecommendations(software.amazon.awssdk.services.costoptimizationhub.model.ListRecommendationsRequest)operation.listRecommendationSummaries(Consumer<ListRecommendationSummariesRequest.Builder> listRecommendationSummariesRequest) Returns a concise representation of savings estimates for resources.listRecommendationSummaries(ListRecommendationSummariesRequest listRecommendationSummariesRequest) Returns a concise representation of savings estimates for resources.listRecommendationSummariesPaginator(Consumer<ListRecommendationSummariesRequest.Builder> listRecommendationSummariesRequest) This is a variant oflistRecommendationSummaries(software.amazon.awssdk.services.costoptimizationhub.model.ListRecommendationSummariesRequest)operation.listRecommendationSummariesPaginator(ListRecommendationSummariesRequest listRecommendationSummariesRequest) This is a variant oflistRecommendationSummaries(software.amazon.awssdk.services.costoptimizationhub.model.ListRecommendationSummariesRequest)operation.The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfigurationupdateEnrollmentStatus(Consumer<UpdateEnrollmentStatusRequest.Builder> updateEnrollmentStatusRequest) Updates the enrollment (opt in and opt out) status of an account to the Cost Optimization Hub service.updateEnrollmentStatus(UpdateEnrollmentStatusRequest updateEnrollmentStatusRequest) Updates the enrollment (opt in and opt out) status of an account to the Cost Optimization Hub service.updatePreferences(Consumer<UpdatePreferencesRequest.Builder> updatePreferencesRequest) Updates a set of preferences for an account in order to add account-specific preferences into the service.updatePreferences(UpdatePreferencesRequest updatePreferencesRequest) Updates a set of preferences for an account in order to add account-specific preferences into the service.Methods inherited from interface software.amazon.awssdk.utils.SdkAutoCloseablecloseMethods inherited from interface software.amazon.awssdk.core.SdkClientserviceName
- 
Field Details- 
SERVICE_NAME- See Also:
 
- 
SERVICE_METADATA_IDValue for looking up the service's metadata from theServiceMetadataProvider.- See Also:
 
 
- 
- 
Method Details- 
getPreferencesdefault CompletableFuture<GetPreferencesResponse> getPreferences(GetPreferencesRequest getPreferencesRequest) Returns a set of preferences for an account in order to add account-specific preferences into the service. These preferences impact how the savings associated with recommendations are presented—estimated savings after discounts or estimated savings before discounts, for example. - Parameters:
- getPreferencesRequest-
- Returns:
- A Java Future containing the result of the GetPreferences operation returned by the service.
 The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services service.
- InternalServerException An error on the server occurred during the processing of your request. Try again later.
- AccessDeniedException You are not authorized to use this operation with the given parameters.
- ThrottlingException The request was denied due to request throttling.
- 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.
- CostOptimizationHubException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
 
- See Also:
 
- 
getPreferencesdefault CompletableFuture<GetPreferencesResponse> getPreferences(Consumer<GetPreferencesRequest.Builder> getPreferencesRequest) Returns a set of preferences for an account in order to add account-specific preferences into the service. These preferences impact how the savings associated with recommendations are presented—estimated savings after discounts or estimated savings before discounts, for example. 
 This is a convenience which creates an instance of the GetPreferencesRequest.Builderavoiding the need to create one manually viaGetPreferencesRequest.builder()- Parameters:
- getPreferencesRequest- A- Consumerthat will call methods on- GetPreferencesRequest.Builderto create a request.
- Returns:
- A Java Future containing the result of the GetPreferences operation returned by the service.
 The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services service.
- InternalServerException An error on the server occurred during the processing of your request. Try again later.
- AccessDeniedException You are not authorized to use this operation with the given parameters.
- ThrottlingException The request was denied due to request throttling.
- 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.
- CostOptimizationHubException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
 
- See Also:
 
- 
getRecommendationdefault CompletableFuture<GetRecommendationResponse> getRecommendation(GetRecommendationRequest getRecommendationRequest) Returns both the current and recommended resource configuration and the estimated cost impact for a recommendation. The recommendationIdis only valid for up to a maximum of 24 hours as recommendations are refreshed daily. To retrieve therecommendationId, use theListRecommendationsAPI.- Parameters:
- getRecommendationRequest-
- Returns:
- A Java Future containing the result of the GetRecommendation operation returned by the service.
 The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services service.
- InternalServerException An error on the server occurred during the processing of your request. Try again later.
- AccessDeniedException You are not authorized to use this operation with the given parameters.
- ResourceNotFoundException The specified Amazon Resource Name (ARN) in the request doesn't exist.
- ThrottlingException The request was denied due to request throttling.
- 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.
- CostOptimizationHubException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
 
- See Also:
 
- 
getRecommendationdefault CompletableFuture<GetRecommendationResponse> getRecommendation(Consumer<GetRecommendationRequest.Builder> getRecommendationRequest) Returns both the current and recommended resource configuration and the estimated cost impact for a recommendation. The recommendationIdis only valid for up to a maximum of 24 hours as recommendations are refreshed daily. To retrieve therecommendationId, use theListRecommendationsAPI.
 This is a convenience which creates an instance of the GetRecommendationRequest.Builderavoiding the need to create one manually viaGetRecommendationRequest.builder()- Parameters:
- getRecommendationRequest- A- Consumerthat will call methods on- GetRecommendationRequest.Builderto create a request.
- Returns:
- A Java Future containing the result of the GetRecommendation operation returned by the service.
 The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services service.
- InternalServerException An error on the server occurred during the processing of your request. Try again later.
- AccessDeniedException You are not authorized to use this operation with the given parameters.
- ResourceNotFoundException The specified Amazon Resource Name (ARN) in the request doesn't exist.
- ThrottlingException The request was denied due to request throttling.
- 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.
- CostOptimizationHubException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
 
- See Also:
 
- 
listEnrollmentStatusesdefault CompletableFuture<ListEnrollmentStatusesResponse> listEnrollmentStatuses(ListEnrollmentStatusesRequest listEnrollmentStatusesRequest) Retrieves the enrollment status for an account. It can also return the list of accounts that are enrolled under the organization. - Parameters:
- listEnrollmentStatusesRequest-
- Returns:
- A Java Future containing the result of the ListEnrollmentStatuses operation returned by the service.
 The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services service.
- InternalServerException An error on the server occurred during the processing of your request. Try again later.
- AccessDeniedException You are not authorized to use this operation with the given parameters.
- ThrottlingException The request was denied due to request throttling.
- 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.
- CostOptimizationHubException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
 
- See Also:
 
- 
listEnrollmentStatusesdefault CompletableFuture<ListEnrollmentStatusesResponse> listEnrollmentStatuses(Consumer<ListEnrollmentStatusesRequest.Builder> listEnrollmentStatusesRequest) Retrieves the enrollment status for an account. It can also return the list of accounts that are enrolled under the organization. 
 This is a convenience which creates an instance of the ListEnrollmentStatusesRequest.Builderavoiding the need to create one manually viaListEnrollmentStatusesRequest.builder()- Parameters:
- listEnrollmentStatusesRequest- A- Consumerthat will call methods on- ListEnrollmentStatusesRequest.Builderto create a request.
- Returns:
- A Java Future containing the result of the ListEnrollmentStatuses operation returned by the service.
 The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services service.
- InternalServerException An error on the server occurred during the processing of your request. Try again later.
- AccessDeniedException You are not authorized to use this operation with the given parameters.
- ThrottlingException The request was denied due to request throttling.
- 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.
- CostOptimizationHubException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
 
- See Also:
 
- 
listEnrollmentStatusesPaginatordefault ListEnrollmentStatusesPublisher listEnrollmentStatusesPaginator(ListEnrollmentStatusesRequest listEnrollmentStatusesRequest) This is a variant of listEnrollmentStatuses(software.amazon.awssdk.services.costoptimizationhub.model.ListEnrollmentStatusesRequest)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 newSubscriptioni.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
 2) Using a custom subscribersoftware.amazon.awssdk.services.costoptimizationhub.paginators.ListEnrollmentStatusesPublisher publisher = client.listEnrollmentStatusesPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
 As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.software.amazon.awssdk.services.costoptimizationhub.paginators.ListEnrollmentStatusesPublisher publisher = client.listEnrollmentStatusesPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.costoptimizationhub.model.ListEnrollmentStatusesResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.costoptimizationhub.model.ListEnrollmentStatusesResponse response) { //... }; });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 listEnrollmentStatuses(software.amazon.awssdk.services.costoptimizationhub.model.ListEnrollmentStatusesRequest)operation.- Parameters:
- listEnrollmentStatusesRequest-
- Returns:
- 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. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services service.
- InternalServerException An error on the server occurred during the processing of your request. Try again later.
- AccessDeniedException You are not authorized to use this operation with the given parameters.
- ThrottlingException The request was denied due to request throttling.
- 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.
- CostOptimizationHubException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
 
- See Also:
 
- 
listEnrollmentStatusesPaginatordefault ListEnrollmentStatusesPublisher listEnrollmentStatusesPaginator(Consumer<ListEnrollmentStatusesRequest.Builder> listEnrollmentStatusesRequest) This is a variant of listEnrollmentStatuses(software.amazon.awssdk.services.costoptimizationhub.model.ListEnrollmentStatusesRequest)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 newSubscriptioni.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
 2) Using a custom subscribersoftware.amazon.awssdk.services.costoptimizationhub.paginators.ListEnrollmentStatusesPublisher publisher = client.listEnrollmentStatusesPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
 As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.software.amazon.awssdk.services.costoptimizationhub.paginators.ListEnrollmentStatusesPublisher publisher = client.listEnrollmentStatusesPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.costoptimizationhub.model.ListEnrollmentStatusesResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.costoptimizationhub.model.ListEnrollmentStatusesResponse response) { //... }; });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 listEnrollmentStatuses(software.amazon.awssdk.services.costoptimizationhub.model.ListEnrollmentStatusesRequest)operation.
 This is a convenience which creates an instance of the ListEnrollmentStatusesRequest.Builderavoiding the need to create one manually viaListEnrollmentStatusesRequest.builder()- Parameters:
- listEnrollmentStatusesRequest- A- Consumerthat will call methods on- ListEnrollmentStatusesRequest.Builderto create a request.
- Returns:
- 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. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services service.
- InternalServerException An error on the server occurred during the processing of your request. Try again later.
- AccessDeniedException You are not authorized to use this operation with the given parameters.
- ThrottlingException The request was denied due to request throttling.
- 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.
- CostOptimizationHubException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
 
- See Also:
 
- 
listRecommendationSummariesdefault CompletableFuture<ListRecommendationSummariesResponse> listRecommendationSummaries(ListRecommendationSummariesRequest listRecommendationSummariesRequest) Returns a concise representation of savings estimates for resources. Also returns de-duped savings across different types of recommendations. The following filters are not supported for this API: recommendationIds,resourceArns, andresourceIds.- Parameters:
- listRecommendationSummariesRequest-
- Returns:
- A Java Future containing the result of the ListRecommendationSummaries operation returned by the service.
 The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services service.
- InternalServerException An error on the server occurred during the processing of your request. Try again later.
- AccessDeniedException You are not authorized to use this operation with the given parameters.
- ThrottlingException The request was denied due to request throttling.
- 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.
- CostOptimizationHubException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
 
- See Also:
 
- 
listRecommendationSummariesdefault CompletableFuture<ListRecommendationSummariesResponse> listRecommendationSummaries(Consumer<ListRecommendationSummariesRequest.Builder> listRecommendationSummariesRequest) Returns a concise representation of savings estimates for resources. Also returns de-duped savings across different types of recommendations. The following filters are not supported for this API: recommendationIds,resourceArns, andresourceIds.
 This is a convenience which creates an instance of the ListRecommendationSummariesRequest.Builderavoiding the need to create one manually viaListRecommendationSummariesRequest.builder()- Parameters:
- listRecommendationSummariesRequest- A- Consumerthat will call methods on- ListRecommendationSummariesRequest.Builderto create a request.
- Returns:
- A Java Future containing the result of the ListRecommendationSummaries operation returned by the service.
 The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services service.
- InternalServerException An error on the server occurred during the processing of your request. Try again later.
- AccessDeniedException You are not authorized to use this operation with the given parameters.
- ThrottlingException The request was denied due to request throttling.
- 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.
- CostOptimizationHubException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
 
- See Also:
 
- 
listRecommendationSummariesPaginatordefault ListRecommendationSummariesPublisher listRecommendationSummariesPaginator(ListRecommendationSummariesRequest listRecommendationSummariesRequest) This is a variant of listRecommendationSummaries(software.amazon.awssdk.services.costoptimizationhub.model.ListRecommendationSummariesRequest)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 newSubscriptioni.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
 2) Using a custom subscribersoftware.amazon.awssdk.services.costoptimizationhub.paginators.ListRecommendationSummariesPublisher publisher = client.listRecommendationSummariesPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
 As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.software.amazon.awssdk.services.costoptimizationhub.paginators.ListRecommendationSummariesPublisher publisher = client.listRecommendationSummariesPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.costoptimizationhub.model.ListRecommendationSummariesResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.costoptimizationhub.model.ListRecommendationSummariesResponse response) { //... }; });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 listRecommendationSummaries(software.amazon.awssdk.services.costoptimizationhub.model.ListRecommendationSummariesRequest)operation.- Parameters:
- listRecommendationSummariesRequest-
- Returns:
- 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. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services service.
- InternalServerException An error on the server occurred during the processing of your request. Try again later.
- AccessDeniedException You are not authorized to use this operation with the given parameters.
- ThrottlingException The request was denied due to request throttling.
- 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.
- CostOptimizationHubException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
 
- See Also:
 
- 
listRecommendationSummariesPaginatordefault ListRecommendationSummariesPublisher listRecommendationSummariesPaginator(Consumer<ListRecommendationSummariesRequest.Builder> listRecommendationSummariesRequest) This is a variant of listRecommendationSummaries(software.amazon.awssdk.services.costoptimizationhub.model.ListRecommendationSummariesRequest)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 newSubscriptioni.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
 2) Using a custom subscribersoftware.amazon.awssdk.services.costoptimizationhub.paginators.ListRecommendationSummariesPublisher publisher = client.listRecommendationSummariesPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
 As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.software.amazon.awssdk.services.costoptimizationhub.paginators.ListRecommendationSummariesPublisher publisher = client.listRecommendationSummariesPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.costoptimizationhub.model.ListRecommendationSummariesResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.costoptimizationhub.model.ListRecommendationSummariesResponse response) { //... }; });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 listRecommendationSummaries(software.amazon.awssdk.services.costoptimizationhub.model.ListRecommendationSummariesRequest)operation.
 This is a convenience which creates an instance of the ListRecommendationSummariesRequest.Builderavoiding the need to create one manually viaListRecommendationSummariesRequest.builder()- Parameters:
- listRecommendationSummariesRequest- A- Consumerthat will call methods on- ListRecommendationSummariesRequest.Builderto create a request.
- Returns:
- 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. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services service.
- InternalServerException An error on the server occurred during the processing of your request. Try again later.
- AccessDeniedException You are not authorized to use this operation with the given parameters.
- ThrottlingException The request was denied due to request throttling.
- 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.
- CostOptimizationHubException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
 
- See Also:
 
- 
listRecommendationsdefault CompletableFuture<ListRecommendationsResponse> listRecommendations(ListRecommendationsRequest listRecommendationsRequest) Returns a list of recommendations. - Parameters:
- listRecommendationsRequest-
- Returns:
- A Java Future containing the result of the ListRecommendations operation returned by the service.
 The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services service.
- InternalServerException An error on the server occurred during the processing of your request. Try again later.
- AccessDeniedException You are not authorized to use this operation with the given parameters.
- ThrottlingException The request was denied due to request throttling.
- 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.
- CostOptimizationHubException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
 
- See Also:
 
- 
listRecommendationsdefault CompletableFuture<ListRecommendationsResponse> listRecommendations(Consumer<ListRecommendationsRequest.Builder> listRecommendationsRequest) Returns a list of recommendations. 
 This is a convenience which creates an instance of the ListRecommendationsRequest.Builderavoiding the need to create one manually viaListRecommendationsRequest.builder()- Parameters:
- listRecommendationsRequest- A- Consumerthat will call methods on- ListRecommendationsRequest.Builderto create a request.
- Returns:
- A Java Future containing the result of the ListRecommendations operation returned by the service.
 The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services service.
- InternalServerException An error on the server occurred during the processing of your request. Try again later.
- AccessDeniedException You are not authorized to use this operation with the given parameters.
- ThrottlingException The request was denied due to request throttling.
- 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.
- CostOptimizationHubException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
 
- See Also:
 
- 
listRecommendationsPaginatordefault ListRecommendationsPublisher listRecommendationsPaginator(ListRecommendationsRequest listRecommendationsRequest) This is a variant of listRecommendations(software.amazon.awssdk.services.costoptimizationhub.model.ListRecommendationsRequest)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 newSubscriptioni.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
 2) Using a custom subscribersoftware.amazon.awssdk.services.costoptimizationhub.paginators.ListRecommendationsPublisher publisher = client.listRecommendationsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
 As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.software.amazon.awssdk.services.costoptimizationhub.paginators.ListRecommendationsPublisher publisher = client.listRecommendationsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.costoptimizationhub.model.ListRecommendationsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.costoptimizationhub.model.ListRecommendationsResponse response) { //... }; });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 listRecommendations(software.amazon.awssdk.services.costoptimizationhub.model.ListRecommendationsRequest)operation.- Parameters:
- listRecommendationsRequest-
- Returns:
- 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. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services service.
- InternalServerException An error on the server occurred during the processing of your request. Try again later.
- AccessDeniedException You are not authorized to use this operation with the given parameters.
- ThrottlingException The request was denied due to request throttling.
- 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.
- CostOptimizationHubException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
 
- See Also:
 
- 
listRecommendationsPaginatordefault ListRecommendationsPublisher listRecommendationsPaginator(Consumer<ListRecommendationsRequest.Builder> listRecommendationsRequest) This is a variant of listRecommendations(software.amazon.awssdk.services.costoptimizationhub.model.ListRecommendationsRequest)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 newSubscriptioni.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
 2) Using a custom subscribersoftware.amazon.awssdk.services.costoptimizationhub.paginators.ListRecommendationsPublisher publisher = client.listRecommendationsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
 As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.software.amazon.awssdk.services.costoptimizationhub.paginators.ListRecommendationsPublisher publisher = client.listRecommendationsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.costoptimizationhub.model.ListRecommendationsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.costoptimizationhub.model.ListRecommendationsResponse response) { //... }; });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 listRecommendations(software.amazon.awssdk.services.costoptimizationhub.model.ListRecommendationsRequest)operation.
 This is a convenience which creates an instance of the ListRecommendationsRequest.Builderavoiding the need to create one manually viaListRecommendationsRequest.builder()- Parameters:
- listRecommendationsRequest- A- Consumerthat will call methods on- ListRecommendationsRequest.Builderto create a request.
- Returns:
- 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. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services service.
- InternalServerException An error on the server occurred during the processing of your request. Try again later.
- AccessDeniedException You are not authorized to use this operation with the given parameters.
- ThrottlingException The request was denied due to request throttling.
- 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.
- CostOptimizationHubException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
 
- See Also:
 
- 
updateEnrollmentStatusdefault CompletableFuture<UpdateEnrollmentStatusResponse> updateEnrollmentStatus(UpdateEnrollmentStatusRequest updateEnrollmentStatusRequest) Updates the enrollment (opt in and opt out) status of an account to the Cost Optimization Hub service. If the account is a management account or delegated administrator of an organization, this action can also be used to enroll member accounts of the organization. You must have the appropriate permissions to opt in to Cost Optimization Hub and to view its recommendations. When you opt in, Cost Optimization Hub automatically creates a service-linked role in your account to access its data. - Parameters:
- updateEnrollmentStatusRequest-
- Returns:
- A Java Future containing the result of the UpdateEnrollmentStatus operation returned by the service.
 The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services service.
- InternalServerException An error on the server occurred during the processing of your request. Try again later.
- AccessDeniedException You are not authorized to use this operation with the given parameters.
- ThrottlingException The request was denied due to request throttling.
- 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.
- CostOptimizationHubException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
 
- See Also:
 
- 
updateEnrollmentStatusdefault CompletableFuture<UpdateEnrollmentStatusResponse> updateEnrollmentStatus(Consumer<UpdateEnrollmentStatusRequest.Builder> updateEnrollmentStatusRequest) Updates the enrollment (opt in and opt out) status of an account to the Cost Optimization Hub service. If the account is a management account or delegated administrator of an organization, this action can also be used to enroll member accounts of the organization. You must have the appropriate permissions to opt in to Cost Optimization Hub and to view its recommendations. When you opt in, Cost Optimization Hub automatically creates a service-linked role in your account to access its data. 
 This is a convenience which creates an instance of the UpdateEnrollmentStatusRequest.Builderavoiding the need to create one manually viaUpdateEnrollmentStatusRequest.builder()- Parameters:
- updateEnrollmentStatusRequest- A- Consumerthat will call methods on- UpdateEnrollmentStatusRequest.Builderto create a request.
- Returns:
- A Java Future containing the result of the UpdateEnrollmentStatus operation returned by the service.
 The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services service.
- InternalServerException An error on the server occurred during the processing of your request. Try again later.
- AccessDeniedException You are not authorized to use this operation with the given parameters.
- ThrottlingException The request was denied due to request throttling.
- 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.
- CostOptimizationHubException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
 
- See Also:
 
- 
updatePreferencesdefault CompletableFuture<UpdatePreferencesResponse> updatePreferences(UpdatePreferencesRequest updatePreferencesRequest) Updates a set of preferences for an account in order to add account-specific preferences into the service. These preferences impact how the savings associated with recommendations are presented. - Parameters:
- updatePreferencesRequest-
- Returns:
- A Java Future containing the result of the UpdatePreferences operation returned by the service.
 The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services service.
- InternalServerException An error on the server occurred during the processing of your request. Try again later.
- AccessDeniedException You are not authorized to use this operation with the given parameters.
- ThrottlingException The request was denied due to request throttling.
- 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.
- CostOptimizationHubException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
 
- See Also:
 
- 
updatePreferencesdefault CompletableFuture<UpdatePreferencesResponse> updatePreferences(Consumer<UpdatePreferencesRequest.Builder> updatePreferencesRequest) Updates a set of preferences for an account in order to add account-specific preferences into the service. These preferences impact how the savings associated with recommendations are presented. 
 This is a convenience which creates an instance of the UpdatePreferencesRequest.Builderavoiding the need to create one manually viaUpdatePreferencesRequest.builder()- Parameters:
- updatePreferencesRequest- A- Consumerthat will call methods on- UpdatePreferencesRequest.Builderto create a request.
- Returns:
- A Java Future containing the result of the UpdatePreferences operation returned by the service.
 The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ValidationException The input fails to satisfy the constraints specified by an Amazon Web Services service.
- InternalServerException An error on the server occurred during the processing of your request. Try again later.
- AccessDeniedException You are not authorized to use this operation with the given parameters.
- ThrottlingException The request was denied due to request throttling.
- 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.
- CostOptimizationHubException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
 
- See Also:
 
- 
serviceClientConfigurationDescription copied from interface:SdkClientThe SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration- Specified by:
- serviceClientConfigurationin interface- AwsClient
- Specified by:
- serviceClientConfigurationin interface- SdkClient
- Returns:
- SdkServiceClientConfiguration
 
- 
createCreate aCostOptimizationHubAsyncClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.
- 
builderCreate a builder that can be used to configure and create aCostOptimizationHubAsyncClient.
 
-