Interface SavingsplansAsyncClient

  • All Superinterfaces:
    AutoCloseable, AwsClient, SdkAutoCloseable, SdkClient

    @Generated("software.amazon.awssdk:codegen")
    @ThreadSafe
    public interface SavingsplansAsyncClient
    extends AwsClient
    Service client for accessing AWSSavingsPlans asynchronously. This can be created using the static 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.

    Savings Plans are a pricing model that offer significant savings on Amazon Web Services usage (for example, on Amazon EC2 instances). You commit to a consistent amount of usage per hour, in the specified currency, for a term of one or three years, and receive a lower price for that usage. For more information, see the Amazon Web Services Savings Plans User Guide.

    • Method Detail

      • createSavingsPlan

        default CompletableFuture<CreateSavingsPlanResponse> createSavingsPlan​(CreateSavingsPlanRequest createSavingsPlanRequest)

        Creates a Savings Plan.

        Parameters:
        createSavingsPlanRequest -
        Returns:
        A Java Future containing the result of the CreateSavingsPlan 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 invoke Throwable.getCause() to retrieve the underlying exception.
        • ResourceNotFoundException The specified resource was not found.
        • ValidationException One of the input parameters is not valid.
        • InternalServerException An unexpected error occurred.
        • ServiceQuotaExceededException A service quota has been exceeded.
        • 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.
        • SavingsplansException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
        See Also:
        AWS API Documentation
      • createSavingsPlan

        default CompletableFuture<CreateSavingsPlanResponse> createSavingsPlan​(Consumer<CreateSavingsPlanRequest.Builder> createSavingsPlanRequest)

        Creates a Savings Plan.


        This is a convenience which creates an instance of the CreateSavingsPlanRequest.Builder avoiding the need to create one manually via CreateSavingsPlanRequest.builder()

        Parameters:
        createSavingsPlanRequest - A Consumer that will call methods on CreateSavingsPlanRequest.Builder to create a request.
        Returns:
        A Java Future containing the result of the CreateSavingsPlan 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 invoke Throwable.getCause() to retrieve the underlying exception.
        • ResourceNotFoundException The specified resource was not found.
        • ValidationException One of the input parameters is not valid.
        • InternalServerException An unexpected error occurred.
        • ServiceQuotaExceededException A service quota has been exceeded.
        • 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.
        • SavingsplansException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
        See Also:
        AWS API Documentation
      • deleteQueuedSavingsPlan

        default CompletableFuture<DeleteQueuedSavingsPlanResponse> deleteQueuedSavingsPlan​(DeleteQueuedSavingsPlanRequest deleteQueuedSavingsPlanRequest)

        Deletes the queued purchase for the specified Savings Plan.

        Parameters:
        deleteQueuedSavingsPlanRequest -
        Returns:
        A Java Future containing the result of the DeleteQueuedSavingsPlan 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 invoke Throwable.getCause() to retrieve the underlying exception.
        • ValidationException One of the input parameters is not valid.
        • ResourceNotFoundException The specified resource was not found.
        • InternalServerException An unexpected error occurred.
        • ServiceQuotaExceededException A service quota has been exceeded.
        • 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.
        • SavingsplansException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
        See Also:
        AWS API Documentation
      • deleteQueuedSavingsPlan

        default CompletableFuture<DeleteQueuedSavingsPlanResponse> deleteQueuedSavingsPlan​(Consumer<DeleteQueuedSavingsPlanRequest.Builder> deleteQueuedSavingsPlanRequest)

        Deletes the queued purchase for the specified Savings Plan.


        This is a convenience which creates an instance of the DeleteQueuedSavingsPlanRequest.Builder avoiding the need to create one manually via DeleteQueuedSavingsPlanRequest.builder()

        Parameters:
        deleteQueuedSavingsPlanRequest - A Consumer that will call methods on DeleteQueuedSavingsPlanRequest.Builder to create a request.
        Returns:
        A Java Future containing the result of the DeleteQueuedSavingsPlan 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 invoke Throwable.getCause() to retrieve the underlying exception.
        • ValidationException One of the input parameters is not valid.
        • ResourceNotFoundException The specified resource was not found.
        • InternalServerException An unexpected error occurred.
        • ServiceQuotaExceededException A service quota has been exceeded.
        • 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.
        • SavingsplansException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
        See Also:
        AWS API Documentation
      • describeSavingsPlanRates

        default CompletableFuture<DescribeSavingsPlanRatesResponse> describeSavingsPlanRates​(DescribeSavingsPlanRatesRequest describeSavingsPlanRatesRequest)

        Describes the rates for the specified Savings Plan.

        Parameters:
        describeSavingsPlanRatesRequest -
        Returns:
        A Java Future containing the result of the DescribeSavingsPlanRates 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 invoke Throwable.getCause() to retrieve the underlying exception.
        • ResourceNotFoundException The specified resource was not found.
        • ValidationException One of the input parameters is not valid.
        • 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.
        • SavingsplansException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
        See Also:
        AWS API Documentation
      • describeSavingsPlanRates

        default CompletableFuture<DescribeSavingsPlanRatesResponse> describeSavingsPlanRates​(Consumer<DescribeSavingsPlanRatesRequest.Builder> describeSavingsPlanRatesRequest)

        Describes the rates for the specified Savings Plan.


        This is a convenience which creates an instance of the DescribeSavingsPlanRatesRequest.Builder avoiding the need to create one manually via DescribeSavingsPlanRatesRequest.builder()

        Parameters:
        describeSavingsPlanRatesRequest - A Consumer that will call methods on DescribeSavingsPlanRatesRequest.Builder to create a request.
        Returns:
        A Java Future containing the result of the DescribeSavingsPlanRates 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 invoke Throwable.getCause() to retrieve the underlying exception.
        • ResourceNotFoundException The specified resource was not found.
        • ValidationException One of the input parameters is not valid.
        • 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.
        • SavingsplansException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
        See Also:
        AWS API Documentation
      • describeSavingsPlans

        default CompletableFuture<DescribeSavingsPlansResponse> describeSavingsPlans​(DescribeSavingsPlansRequest describeSavingsPlansRequest)

        Describes the specified Savings Plans.

        Parameters:
        describeSavingsPlansRequest -
        Returns:
        A Java Future containing the result of the DescribeSavingsPlans 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 invoke Throwable.getCause() to retrieve the underlying exception.
        • InternalServerException An unexpected error occurred.
        • ValidationException One of the input parameters is not valid.
        • 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.
        • SavingsplansException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
        See Also:
        AWS API Documentation
      • describeSavingsPlans

        default CompletableFuture<DescribeSavingsPlansResponse> describeSavingsPlans​(Consumer<DescribeSavingsPlansRequest.Builder> describeSavingsPlansRequest)

        Describes the specified Savings Plans.


        This is a convenience which creates an instance of the DescribeSavingsPlansRequest.Builder avoiding the need to create one manually via DescribeSavingsPlansRequest.builder()

        Parameters:
        describeSavingsPlansRequest - A Consumer that will call methods on DescribeSavingsPlansRequest.Builder to create a request.
        Returns:
        A Java Future containing the result of the DescribeSavingsPlans 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 invoke Throwable.getCause() to retrieve the underlying exception.
        • InternalServerException An unexpected error occurred.
        • ValidationException One of the input parameters is not valid.
        • 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.
        • SavingsplansException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
        See Also:
        AWS API Documentation
      • describeSavingsPlansOfferingRates

        default CompletableFuture<DescribeSavingsPlansOfferingRatesResponse> describeSavingsPlansOfferingRates​(DescribeSavingsPlansOfferingRatesRequest describeSavingsPlansOfferingRatesRequest)

        Describes the offering rates for the specified Savings Plans.

        Parameters:
        describeSavingsPlansOfferingRatesRequest -
        Returns:
        A Java Future containing the result of the DescribeSavingsPlansOfferingRates 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 invoke Throwable.getCause() to retrieve the underlying exception.
        • ValidationException One of the input parameters is not valid.
        • InternalServerException An unexpected error occurred.
        • 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.
        • SavingsplansException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
        See Also:
        AWS API Documentation
      • describeSavingsPlansOfferingRates

        default CompletableFuture<DescribeSavingsPlansOfferingRatesResponse> describeSavingsPlansOfferingRates​(Consumer<DescribeSavingsPlansOfferingRatesRequest.Builder> describeSavingsPlansOfferingRatesRequest)

        Describes the offering rates for the specified Savings Plans.


        This is a convenience which creates an instance of the DescribeSavingsPlansOfferingRatesRequest.Builder avoiding the need to create one manually via DescribeSavingsPlansOfferingRatesRequest.builder()

        Parameters:
        describeSavingsPlansOfferingRatesRequest - A Consumer that will call methods on DescribeSavingsPlansOfferingRatesRequest.Builder to create a request.
        Returns:
        A Java Future containing the result of the DescribeSavingsPlansOfferingRates 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 invoke Throwable.getCause() to retrieve the underlying exception.
        • ValidationException One of the input parameters is not valid.
        • InternalServerException An unexpected error occurred.
        • 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.
        • SavingsplansException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
        See Also:
        AWS API Documentation
      • describeSavingsPlansOfferings

        default CompletableFuture<DescribeSavingsPlansOfferingsResponse> describeSavingsPlansOfferings​(DescribeSavingsPlansOfferingsRequest describeSavingsPlansOfferingsRequest)

        Describes the offerings for the specified Savings Plans.

        Parameters:
        describeSavingsPlansOfferingsRequest -
        Returns:
        A Java Future containing the result of the DescribeSavingsPlansOfferings 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 invoke Throwable.getCause() to retrieve the underlying exception.
        • ValidationException One of the input parameters is not valid.
        • InternalServerException An unexpected error occurred.
        • 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.
        • SavingsplansException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
        See Also:
        AWS API Documentation
      • describeSavingsPlansOfferings

        default CompletableFuture<DescribeSavingsPlansOfferingsResponse> describeSavingsPlansOfferings​(Consumer<DescribeSavingsPlansOfferingsRequest.Builder> describeSavingsPlansOfferingsRequest)

        Describes the offerings for the specified Savings Plans.


        This is a convenience which creates an instance of the DescribeSavingsPlansOfferingsRequest.Builder avoiding the need to create one manually via DescribeSavingsPlansOfferingsRequest.builder()

        Parameters:
        describeSavingsPlansOfferingsRequest - A Consumer that will call methods on DescribeSavingsPlansOfferingsRequest.Builder to create a request.
        Returns:
        A Java Future containing the result of the DescribeSavingsPlansOfferings 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 invoke Throwable.getCause() to retrieve the underlying exception.
        • ValidationException One of the input parameters is not valid.
        • InternalServerException An unexpected error occurred.
        • 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.
        • SavingsplansException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
        See Also:
        AWS API Documentation
      • listTagsForResource

        default CompletableFuture<ListTagsForResourceResponse> listTagsForResource​(ListTagsForResourceRequest listTagsForResourceRequest)

        Lists the tags for the specified resource.

        Parameters:
        listTagsForResourceRequest -
        Returns:
        A Java Future containing the result of the ListTagsForResource 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 invoke Throwable.getCause() to retrieve the underlying exception.
        • ResourceNotFoundException The specified resource was not found.
        • ValidationException One of the input parameters is not valid.
        • InternalServerException An unexpected error occurred.
        • 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.
        • SavingsplansException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
        See Also:
        AWS API Documentation
      • listTagsForResource

        default CompletableFuture<ListTagsForResourceResponse> listTagsForResource​(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest)

        Lists the tags for the specified resource.


        This is a convenience which creates an instance of the ListTagsForResourceRequest.Builder avoiding the need to create one manually via ListTagsForResourceRequest.builder()

        Parameters:
        listTagsForResourceRequest - A Consumer that will call methods on ListTagsForResourceRequest.Builder to create a request.
        Returns:
        A Java Future containing the result of the ListTagsForResource 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 invoke Throwable.getCause() to retrieve the underlying exception.
        • ResourceNotFoundException The specified resource was not found.
        • ValidationException One of the input parameters is not valid.
        • InternalServerException An unexpected error occurred.
        • 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.
        • SavingsplansException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
        See Also:
        AWS API Documentation
      • returnSavingsPlan

        default CompletableFuture<ReturnSavingsPlanResponse> returnSavingsPlan​(ReturnSavingsPlanRequest returnSavingsPlanRequest)

        Returns the specified Savings Plan.

        Parameters:
        returnSavingsPlanRequest -
        Returns:
        A Java Future containing the result of the ReturnSavingsPlan 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 invoke Throwable.getCause() to retrieve the underlying exception.
        • ValidationException One of the input parameters is not valid.
        • ResourceNotFoundException The specified resource was not found.
        • InternalServerException An unexpected error occurred.
        • ServiceQuotaExceededException A service quota has been exceeded.
        • 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.
        • SavingsplansException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
        See Also:
        AWS API Documentation
      • returnSavingsPlan

        default CompletableFuture<ReturnSavingsPlanResponse> returnSavingsPlan​(Consumer<ReturnSavingsPlanRequest.Builder> returnSavingsPlanRequest)

        Returns the specified Savings Plan.


        This is a convenience which creates an instance of the ReturnSavingsPlanRequest.Builder avoiding the need to create one manually via ReturnSavingsPlanRequest.builder()

        Parameters:
        returnSavingsPlanRequest - A Consumer that will call methods on ReturnSavingsPlanRequest.Builder to create a request.
        Returns:
        A Java Future containing the result of the ReturnSavingsPlan 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 invoke Throwable.getCause() to retrieve the underlying exception.
        • ValidationException One of the input parameters is not valid.
        • ResourceNotFoundException The specified resource was not found.
        • InternalServerException An unexpected error occurred.
        • ServiceQuotaExceededException A service quota has been exceeded.
        • 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.
        • SavingsplansException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
        See Also:
        AWS API Documentation
      • tagResource

        default CompletableFuture<TagResourceResponse> tagResource​(TagResourceRequest tagResourceRequest)

        Adds the specified tags to the specified resource.

        Parameters:
        tagResourceRequest -
        Returns:
        A Java Future containing the result of the TagResource 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 invoke Throwable.getCause() to retrieve the underlying exception.
        • ResourceNotFoundException The specified resource was not found.
        • ServiceQuotaExceededException A service quota has been exceeded.
        • ValidationException One of the input parameters is not valid.
        • InternalServerException An unexpected error occurred.
        • 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.
        • SavingsplansException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
        See Also:
        AWS API Documentation
      • tagResource

        default CompletableFuture<TagResourceResponse> tagResource​(Consumer<TagResourceRequest.Builder> tagResourceRequest)

        Adds the specified tags to the specified resource.


        This is a convenience which creates an instance of the TagResourceRequest.Builder avoiding the need to create one manually via TagResourceRequest.builder()

        Parameters:
        tagResourceRequest - A Consumer that will call methods on TagResourceRequest.Builder to create a request.
        Returns:
        A Java Future containing the result of the TagResource 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 invoke Throwable.getCause() to retrieve the underlying exception.
        • ResourceNotFoundException The specified resource was not found.
        • ServiceQuotaExceededException A service quota has been exceeded.
        • ValidationException One of the input parameters is not valid.
        • InternalServerException An unexpected error occurred.
        • 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.
        • SavingsplansException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
        See Also:
        AWS API Documentation
      • untagResource

        default CompletableFuture<UntagResourceResponse> untagResource​(UntagResourceRequest untagResourceRequest)

        Removes the specified tags from the specified resource.

        Parameters:
        untagResourceRequest -
        Returns:
        A Java Future containing the result of the UntagResource 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 invoke Throwable.getCause() to retrieve the underlying exception.
        • ResourceNotFoundException The specified resource was not found.
        • ValidationException One of the input parameters is not valid.
        • InternalServerException An unexpected error occurred.
        • 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.
        • SavingsplansException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
        See Also:
        AWS API Documentation
      • untagResource

        default CompletableFuture<UntagResourceResponse> untagResource​(Consumer<UntagResourceRequest.Builder> untagResourceRequest)

        Removes the specified tags from the specified resource.


        This is a convenience which creates an instance of the UntagResourceRequest.Builder avoiding the need to create one manually via UntagResourceRequest.builder()

        Parameters:
        untagResourceRequest - A Consumer that will call methods on UntagResourceRequest.Builder to create a request.
        Returns:
        A Java Future containing the result of the UntagResource 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 invoke Throwable.getCause() to retrieve the underlying exception.
        • ResourceNotFoundException The specified resource was not found.
        • ValidationException One of the input parameters is not valid.
        • InternalServerException An unexpected error occurred.
        • 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.
        • SavingsplansException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
        See Also:
        AWS API Documentation