Interface ApplicationCostProfilerAsyncClient

All Superinterfaces:
AutoCloseable, AwsClient, SdkAutoCloseable, SdkClient

@Generated("software.amazon.awssdk:codegen") @ThreadSafe public interface ApplicationCostProfilerAsyncClient extends AwsClient
Service client for accessing AWS Application Cost Profiler asynchronously. This can be created using the static builder() method.

This reference provides descriptions of the AWS Application Cost Profiler API.

The AWS Application Cost Profiler API provides programmatic access to view, create, update, and delete application cost report definitions, as well as to import your usage data into the Application Cost Profiler service.

For more information about using this service, see the AWS Application Cost Profiler User Guide.

  • Field Details

  • Method Details

    • deleteReportDefinition

      default CompletableFuture<DeleteReportDefinitionResponse> deleteReportDefinition(DeleteReportDefinitionRequest deleteReportDefinitionRequest)

      Deletes the specified report definition in AWS Application Cost Profiler. This stops the report from being generated.

      Parameters:
      deleteReportDefinitionRequest -
      Returns:
      A Java Future containing the result of the DeleteReportDefinition operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The calls to AWS Application Cost Profiler API are throttled. The request was denied.
      • ValidationException The input fails to satisfy the constraints for the API.
      • AccessDeniedException You do not have permission to perform this action.
      • 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.
      • ApplicationCostProfilerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • deleteReportDefinition

      default CompletableFuture<DeleteReportDefinitionResponse> deleteReportDefinition(Consumer<DeleteReportDefinitionRequest.Builder> deleteReportDefinitionRequest)

      Deletes the specified report definition in AWS Application Cost Profiler. This stops the report from being generated.


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

      Parameters:
      deleteReportDefinitionRequest - A Consumer that will call methods on DeleteReportDefinitionRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the DeleteReportDefinition operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The calls to AWS Application Cost Profiler API are throttled. The request was denied.
      • ValidationException The input fails to satisfy the constraints for the API.
      • AccessDeniedException You do not have permission to perform this action.
      • 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.
      • ApplicationCostProfilerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • getReportDefinition

      default CompletableFuture<GetReportDefinitionResponse> getReportDefinition(GetReportDefinitionRequest getReportDefinitionRequest)

      Retrieves the definition of a report already configured in AWS Application Cost Profiler.

      Parameters:
      getReportDefinitionRequest -
      Returns:
      A Java Future containing the result of the GetReportDefinition operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The calls to AWS Application Cost Profiler API are throttled. The request was denied.
      • ValidationException The input fails to satisfy the constraints for the API.
      • AccessDeniedException You do not have permission to perform this action.
      • 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.
      • ApplicationCostProfilerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • getReportDefinition

      default CompletableFuture<GetReportDefinitionResponse> getReportDefinition(Consumer<GetReportDefinitionRequest.Builder> getReportDefinitionRequest)

      Retrieves the definition of a report already configured in AWS Application Cost Profiler.


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

      Parameters:
      getReportDefinitionRequest - A Consumer that will call methods on GetReportDefinitionRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the GetReportDefinition operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The calls to AWS Application Cost Profiler API are throttled. The request was denied.
      • ValidationException The input fails to satisfy the constraints for the API.
      • AccessDeniedException You do not have permission to perform this action.
      • 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.
      • ApplicationCostProfilerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • importApplicationUsage

      default CompletableFuture<ImportApplicationUsageResponse> importApplicationUsage(ImportApplicationUsageRequest importApplicationUsageRequest)

      Ingests application usage data from Amazon Simple Storage Service (Amazon S3).

      The data must already exist in the S3 location. As part of the action, AWS Application Cost Profiler copies the object from your S3 bucket to an S3 bucket owned by Amazon for processing asynchronously.

      Parameters:
      importApplicationUsageRequest -
      Returns:
      A Java Future containing the result of the ImportApplicationUsage operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The calls to AWS Application Cost Profiler API are throttled. The request was denied.
      • ValidationException The input fails to satisfy the constraints for the API.
      • AccessDeniedException You do not have permission to perform this action.
      • 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.
      • ApplicationCostProfilerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • importApplicationUsage

      default CompletableFuture<ImportApplicationUsageResponse> importApplicationUsage(Consumer<ImportApplicationUsageRequest.Builder> importApplicationUsageRequest)

      Ingests application usage data from Amazon Simple Storage Service (Amazon S3).

      The data must already exist in the S3 location. As part of the action, AWS Application Cost Profiler copies the object from your S3 bucket to an S3 bucket owned by Amazon for processing asynchronously.


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

      Parameters:
      importApplicationUsageRequest - A Consumer that will call methods on ImportApplicationUsageRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the ImportApplicationUsage operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The calls to AWS Application Cost Profiler API are throttled. The request was denied.
      • ValidationException The input fails to satisfy the constraints for the API.
      • AccessDeniedException You do not have permission to perform this action.
      • 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.
      • ApplicationCostProfilerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • listReportDefinitions

      default CompletableFuture<ListReportDefinitionsResponse> listReportDefinitions(ListReportDefinitionsRequest listReportDefinitionsRequest)

      Retrieves a list of all reports and their configurations for your AWS account.

      The maximum number of reports is one.

      Parameters:
      listReportDefinitionsRequest -
      Returns:
      A Java Future containing the result of the ListReportDefinitions operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The calls to AWS Application Cost Profiler API are throttled. The request was denied.
      • ValidationException The input fails to satisfy the constraints for the API.
      • AccessDeniedException You do not have permission to perform this action.
      • 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.
      • ApplicationCostProfilerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • listReportDefinitions

      default CompletableFuture<ListReportDefinitionsResponse> listReportDefinitions(Consumer<ListReportDefinitionsRequest.Builder> listReportDefinitionsRequest)

      Retrieves a list of all reports and their configurations for your AWS account.

      The maximum number of reports is one.


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

      Parameters:
      listReportDefinitionsRequest - A Consumer that will call methods on ListReportDefinitionsRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the ListReportDefinitions operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The calls to AWS Application Cost Profiler API are throttled. The request was denied.
      • ValidationException The input fails to satisfy the constraints for the API.
      • AccessDeniedException You do not have permission to perform this action.
      • 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.
      • ApplicationCostProfilerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • listReportDefinitionsPaginator

      default ListReportDefinitionsPublisher listReportDefinitionsPaginator(ListReportDefinitionsRequest listReportDefinitionsRequest)

      This is a variant of listReportDefinitions(software.amazon.awssdk.services.applicationcostprofiler.model.ListReportDefinitionsRequest) operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.

      When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe method will result in a new Subscription i.e., a new contract to stream data from the starting request.

      The following are few ways to use the response class:

      1) Using the subscribe helper method
       
       software.amazon.awssdk.services.applicationcostprofiler.paginators.ListReportDefinitionsPublisher publisher = client.listReportDefinitionsPaginator(request);
       CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
       future.get();
       
       
      2) Using a custom subscriber
       
       software.amazon.awssdk.services.applicationcostprofiler.paginators.ListReportDefinitionsPublisher publisher = client.listReportDefinitionsPaginator(request);
       publisher.subscribe(new Subscriber<software.amazon.awssdk.services.applicationcostprofiler.model.ListReportDefinitionsResponse>() {
       
       public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
       
       
       public void onNext(software.amazon.awssdk.services.applicationcostprofiler.model.ListReportDefinitionsResponse 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 listReportDefinitions(software.amazon.awssdk.services.applicationcostprofiler.model.ListReportDefinitionsRequest) operation.

      Parameters:
      listReportDefinitionsRequest -
      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.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The calls to AWS Application Cost Profiler API are throttled. The request was denied.
      • ValidationException The input fails to satisfy the constraints for the API.
      • AccessDeniedException You do not have permission to perform this action.
      • 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.
      • ApplicationCostProfilerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • listReportDefinitionsPaginator

      default ListReportDefinitionsPublisher listReportDefinitionsPaginator(Consumer<ListReportDefinitionsRequest.Builder> listReportDefinitionsRequest)

      This is a variant of listReportDefinitions(software.amazon.awssdk.services.applicationcostprofiler.model.ListReportDefinitionsRequest) operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.

      When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe method will result in a new Subscription i.e., a new contract to stream data from the starting request.

      The following are few ways to use the response class:

      1) Using the subscribe helper method
       
       software.amazon.awssdk.services.applicationcostprofiler.paginators.ListReportDefinitionsPublisher publisher = client.listReportDefinitionsPaginator(request);
       CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
       future.get();
       
       
      2) Using a custom subscriber
       
       software.amazon.awssdk.services.applicationcostprofiler.paginators.ListReportDefinitionsPublisher publisher = client.listReportDefinitionsPaginator(request);
       publisher.subscribe(new Subscriber<software.amazon.awssdk.services.applicationcostprofiler.model.ListReportDefinitionsResponse>() {
       
       public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
       
       
       public void onNext(software.amazon.awssdk.services.applicationcostprofiler.model.ListReportDefinitionsResponse 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 listReportDefinitions(software.amazon.awssdk.services.applicationcostprofiler.model.ListReportDefinitionsRequest) operation.


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

      Parameters:
      listReportDefinitionsRequest - A Consumer that will call methods on ListReportDefinitionsRequest.Builder to 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.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The calls to AWS Application Cost Profiler API are throttled. The request was denied.
      • ValidationException The input fails to satisfy the constraints for the API.
      • AccessDeniedException You do not have permission to perform this action.
      • 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.
      • ApplicationCostProfilerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • putReportDefinition

      default CompletableFuture<PutReportDefinitionResponse> putReportDefinition(PutReportDefinitionRequest putReportDefinitionRequest)

      Creates the report definition for a report in Application Cost Profiler.

      Parameters:
      putReportDefinitionRequest -
      Returns:
      A Java Future containing the result of the PutReportDefinition operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The calls to AWS Application Cost Profiler API are throttled. The request was denied.
      • ValidationException The input fails to satisfy the constraints for the API.
      • AccessDeniedException You do not have permission to perform this action.
      • ServiceQuotaExceededException Your request exceeds one or more of the service quotas.
      • 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.
      • ApplicationCostProfilerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • putReportDefinition

      default CompletableFuture<PutReportDefinitionResponse> putReportDefinition(Consumer<PutReportDefinitionRequest.Builder> putReportDefinitionRequest)

      Creates the report definition for a report in Application Cost Profiler.


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

      Parameters:
      putReportDefinitionRequest - A Consumer that will call methods on PutReportDefinitionRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the PutReportDefinition operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The calls to AWS Application Cost Profiler API are throttled. The request was denied.
      • ValidationException The input fails to satisfy the constraints for the API.
      • AccessDeniedException You do not have permission to perform this action.
      • ServiceQuotaExceededException Your request exceeds one or more of the service quotas.
      • 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.
      • ApplicationCostProfilerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • updateReportDefinition

      default CompletableFuture<UpdateReportDefinitionResponse> updateReportDefinition(UpdateReportDefinitionRequest updateReportDefinitionRequest)

      Updates existing report in AWS Application Cost Profiler.

      Parameters:
      updateReportDefinitionRequest -
      Returns:
      A Java Future containing the result of the UpdateReportDefinition operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The calls to AWS Application Cost Profiler API are throttled. The request was denied.
      • ValidationException The input fails to satisfy the constraints for the API.
      • AccessDeniedException You do not have permission to perform this action.
      • 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.
      • ApplicationCostProfilerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • updateReportDefinition

      default CompletableFuture<UpdateReportDefinitionResponse> updateReportDefinition(Consumer<UpdateReportDefinitionRequest.Builder> updateReportDefinitionRequest)

      Updates existing report in AWS Application Cost Profiler.


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

      Parameters:
      updateReportDefinitionRequest - A Consumer that will call methods on UpdateReportDefinitionRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the UpdateReportDefinition operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions.
      • InternalServerException An internal server error occurred. Retry your request.
      • ThrottlingException The calls to AWS Application Cost Profiler API are throttled. The request was denied.
      • ValidationException The input fails to satisfy the constraints for the API.
      • AccessDeniedException You do not have permission to perform this action.
      • 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.
      • ApplicationCostProfilerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
      See Also:
    • serviceClientConfiguration

      default ApplicationCostProfilerServiceClientConfiguration serviceClientConfiguration()
      Description copied from interface: SdkClient
      The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration
      Specified by:
      serviceClientConfiguration in interface AwsClient
      Specified by:
      serviceClientConfiguration in interface SdkClient
      Returns:
      SdkServiceClientConfiguration
    • create

      Create a ApplicationCostProfilerAsyncClient with the region loaded from the DefaultAwsRegionProviderChain and credentials loaded from the DefaultCredentialsProvider.
    • builder

      Create a builder that can be used to configure and create a ApplicationCostProfilerAsyncClient.