Interface CostExplorerAsyncClient
- 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 Explorer API to programmatically query your cost and usage data. You can query for aggregated data such as total monthly costs or total daily usage. You can also query for granular data. This might include the number of daily write operations for Amazon DynamoDB database tables in your production environment.
Service Endpoint
The Cost Explorer API provides the following endpoint:
-
https://ce.us-east-1.amazonaws.com
For information about the costs that are associated with the Cost Explorer API, see Amazon Web Services Cost Management Pricing.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringValue for looking up the service's metadata from theServiceMetadataProvider.static final String -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Create a builder that can be used to configure and create aCostExplorerAsyncClient.static CostExplorerAsyncClientcreate()Create aCostExplorerAsyncClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.createAnomalyMonitor(Consumer<CreateAnomalyMonitorRequest.Builder> createAnomalyMonitorRequest) Creates a new cost anomaly detection monitor with the requested type and monitor specification.createAnomalyMonitor(CreateAnomalyMonitorRequest createAnomalyMonitorRequest) Creates a new cost anomaly detection monitor with the requested type and monitor specification.createAnomalySubscription(Consumer<CreateAnomalySubscriptionRequest.Builder> createAnomalySubscriptionRequest) Adds an alert subscription to a cost anomaly detection monitor.createAnomalySubscription(CreateAnomalySubscriptionRequest createAnomalySubscriptionRequest) Adds an alert subscription to a cost anomaly detection monitor.createCostCategoryDefinition(Consumer<CreateCostCategoryDefinitionRequest.Builder> createCostCategoryDefinitionRequest) Creates a new Cost Category with the requested name and rules.createCostCategoryDefinition(CreateCostCategoryDefinitionRequest createCostCategoryDefinitionRequest) Creates a new Cost Category with the requested name and rules.deleteAnomalyMonitor(Consumer<DeleteAnomalyMonitorRequest.Builder> deleteAnomalyMonitorRequest) Deletes a cost anomaly monitor.deleteAnomalyMonitor(DeleteAnomalyMonitorRequest deleteAnomalyMonitorRequest) Deletes a cost anomaly monitor.deleteAnomalySubscription(Consumer<DeleteAnomalySubscriptionRequest.Builder> deleteAnomalySubscriptionRequest) Deletes a cost anomaly subscription.deleteAnomalySubscription(DeleteAnomalySubscriptionRequest deleteAnomalySubscriptionRequest) Deletes a cost anomaly subscription.deleteCostCategoryDefinition(Consumer<DeleteCostCategoryDefinitionRequest.Builder> deleteCostCategoryDefinitionRequest) Deletes a Cost Category.deleteCostCategoryDefinition(DeleteCostCategoryDefinitionRequest deleteCostCategoryDefinitionRequest) Deletes a Cost Category.describeCostCategoryDefinition(Consumer<DescribeCostCategoryDefinitionRequest.Builder> describeCostCategoryDefinitionRequest) Returns the name, Amazon Resource Name (ARN), rules, definition, and effective dates of a Cost Category that's defined in the account.describeCostCategoryDefinition(DescribeCostCategoryDefinitionRequest describeCostCategoryDefinitionRequest) Returns the name, Amazon Resource Name (ARN), rules, definition, and effective dates of a Cost Category that's defined in the account.default CompletableFuture<GetAnomaliesResponse> getAnomalies(Consumer<GetAnomaliesRequest.Builder> getAnomaliesRequest) Retrieves all of the cost anomalies detected on your account during the time period that's specified by theDateIntervalobject.default CompletableFuture<GetAnomaliesResponse> getAnomalies(GetAnomaliesRequest getAnomaliesRequest) Retrieves all of the cost anomalies detected on your account during the time period that's specified by theDateIntervalobject.default GetAnomaliesPublishergetAnomaliesPaginator(Consumer<GetAnomaliesRequest.Builder> getAnomaliesRequest) This is a variant ofgetAnomalies(software.amazon.awssdk.services.costexplorer.model.GetAnomaliesRequest)operation.default GetAnomaliesPublishergetAnomaliesPaginator(GetAnomaliesRequest getAnomaliesRequest) This is a variant ofgetAnomalies(software.amazon.awssdk.services.costexplorer.model.GetAnomaliesRequest)operation.getAnomalyMonitors(Consumer<GetAnomalyMonitorsRequest.Builder> getAnomalyMonitorsRequest) Retrieves the cost anomaly monitor definitions for your account.getAnomalyMonitors(GetAnomalyMonitorsRequest getAnomalyMonitorsRequest) Retrieves the cost anomaly monitor definitions for your account.default GetAnomalyMonitorsPublishergetAnomalyMonitorsPaginator(Consumer<GetAnomalyMonitorsRequest.Builder> getAnomalyMonitorsRequest) This is a variant ofgetAnomalyMonitors(software.amazon.awssdk.services.costexplorer.model.GetAnomalyMonitorsRequest)operation.default GetAnomalyMonitorsPublishergetAnomalyMonitorsPaginator(GetAnomalyMonitorsRequest getAnomalyMonitorsRequest) This is a variant ofgetAnomalyMonitors(software.amazon.awssdk.services.costexplorer.model.GetAnomalyMonitorsRequest)operation.getAnomalySubscriptions(Consumer<GetAnomalySubscriptionsRequest.Builder> getAnomalySubscriptionsRequest) Retrieves the cost anomaly subscription objects for your account.getAnomalySubscriptions(GetAnomalySubscriptionsRequest getAnomalySubscriptionsRequest) Retrieves the cost anomaly subscription objects for your account.default GetAnomalySubscriptionsPublishergetAnomalySubscriptionsPaginator(Consumer<GetAnomalySubscriptionsRequest.Builder> getAnomalySubscriptionsRequest) This is a variant ofgetAnomalySubscriptions(software.amazon.awssdk.services.costexplorer.model.GetAnomalySubscriptionsRequest)operation.default GetAnomalySubscriptionsPublishergetAnomalySubscriptionsPaginator(GetAnomalySubscriptionsRequest getAnomalySubscriptionsRequest) This is a variant ofgetAnomalySubscriptions(software.amazon.awssdk.services.costexplorer.model.GetAnomalySubscriptionsRequest)operation.getApproximateUsageRecords(Consumer<GetApproximateUsageRecordsRequest.Builder> getApproximateUsageRecordsRequest) Retrieves estimated usage records for hourly granularity or resource-level data at daily granularity.getApproximateUsageRecords(GetApproximateUsageRecordsRequest getApproximateUsageRecordsRequest) Retrieves estimated usage records for hourly granularity or resource-level data at daily granularity.getCommitmentPurchaseAnalysis(Consumer<GetCommitmentPurchaseAnalysisRequest.Builder> getCommitmentPurchaseAnalysisRequest) Retrieves a commitment purchase analysis result based on theAnalysisId.getCommitmentPurchaseAnalysis(GetCommitmentPurchaseAnalysisRequest getCommitmentPurchaseAnalysisRequest) Retrieves a commitment purchase analysis result based on theAnalysisId.default CompletableFuture<GetCostAndUsageResponse> getCostAndUsage(Consumer<GetCostAndUsageRequest.Builder> getCostAndUsageRequest) Retrieves cost and usage metrics for your account.default CompletableFuture<GetCostAndUsageResponse> getCostAndUsage(GetCostAndUsageRequest getCostAndUsageRequest) Retrieves cost and usage metrics for your account.getCostAndUsageComparisons(Consumer<GetCostAndUsageComparisonsRequest.Builder> getCostAndUsageComparisonsRequest) Retrieves cost and usage comparisons for your account between two periods within the last 13 months.getCostAndUsageComparisons(GetCostAndUsageComparisonsRequest getCostAndUsageComparisonsRequest) Retrieves cost and usage comparisons for your account between two periods within the last 13 months.getCostAndUsageComparisonsPaginator(Consumer<GetCostAndUsageComparisonsRequest.Builder> getCostAndUsageComparisonsRequest) This is a variant ofgetCostAndUsageComparisons(software.amazon.awssdk.services.costexplorer.model.GetCostAndUsageComparisonsRequest)operation.getCostAndUsageComparisonsPaginator(GetCostAndUsageComparisonsRequest getCostAndUsageComparisonsRequest) This is a variant ofgetCostAndUsageComparisons(software.amazon.awssdk.services.costexplorer.model.GetCostAndUsageComparisonsRequest)operation.getCostAndUsageWithResources(Consumer<GetCostAndUsageWithResourcesRequest.Builder> getCostAndUsageWithResourcesRequest) Retrieves cost and usage metrics with resources for your account.getCostAndUsageWithResources(GetCostAndUsageWithResourcesRequest getCostAndUsageWithResourcesRequest) Retrieves cost and usage metrics with resources for your account.getCostCategories(Consumer<GetCostCategoriesRequest.Builder> getCostCategoriesRequest) Retrieves an array of Cost Category names and values incurred cost.getCostCategories(GetCostCategoriesRequest getCostCategoriesRequest) Retrieves an array of Cost Category names and values incurred cost.getCostComparisonDrivers(Consumer<GetCostComparisonDriversRequest.Builder> getCostComparisonDriversRequest) Retrieves key factors driving cost changes between two time periods within the last 13 months, such as usage changes, discount changes, and commitment-based savings.getCostComparisonDrivers(GetCostComparisonDriversRequest getCostComparisonDriversRequest) Retrieves key factors driving cost changes between two time periods within the last 13 months, such as usage changes, discount changes, and commitment-based savings.getCostComparisonDriversPaginator(Consumer<GetCostComparisonDriversRequest.Builder> getCostComparisonDriversRequest) This is a variant ofgetCostComparisonDrivers(software.amazon.awssdk.services.costexplorer.model.GetCostComparisonDriversRequest)operation.getCostComparisonDriversPaginator(GetCostComparisonDriversRequest getCostComparisonDriversRequest) This is a variant ofgetCostComparisonDrivers(software.amazon.awssdk.services.costexplorer.model.GetCostComparisonDriversRequest)operation.default CompletableFuture<GetCostForecastResponse> getCostForecast(Consumer<GetCostForecastRequest.Builder> getCostForecastRequest) Retrieves a forecast for how much Amazon Web Services predicts that you will spend over the forecast time period that you select, based on your past costs.default CompletableFuture<GetCostForecastResponse> getCostForecast(GetCostForecastRequest getCostForecastRequest) Retrieves a forecast for how much Amazon Web Services predicts that you will spend over the forecast time period that you select, based on your past costs.getDimensionValues(Consumer<GetDimensionValuesRequest.Builder> getDimensionValuesRequest) Retrieves all available filter values for a specified filter over a period of time.getDimensionValues(GetDimensionValuesRequest getDimensionValuesRequest) Retrieves all available filter values for a specified filter over a period of time.getReservationCoverage(Consumer<GetReservationCoverageRequest.Builder> getReservationCoverageRequest) Retrieves the reservation coverage for your account, which you can use to see how much of your Amazon Elastic Compute Cloud, Amazon ElastiCache, Amazon Relational Database Service, or Amazon Redshift usage is covered by a reservation.getReservationCoverage(GetReservationCoverageRequest getReservationCoverageRequest) Retrieves the reservation coverage for your account, which you can use to see how much of your Amazon Elastic Compute Cloud, Amazon ElastiCache, Amazon Relational Database Service, or Amazon Redshift usage is covered by a reservation.getReservationPurchaseRecommendation(Consumer<GetReservationPurchaseRecommendationRequest.Builder> getReservationPurchaseRecommendationRequest) Gets recommendations for reservation purchases.getReservationPurchaseRecommendation(GetReservationPurchaseRecommendationRequest getReservationPurchaseRecommendationRequest) Gets recommendations for reservation purchases.getReservationUtilization(Consumer<GetReservationUtilizationRequest.Builder> getReservationUtilizationRequest) Retrieves the reservation utilization for your account.getReservationUtilization(GetReservationUtilizationRequest getReservationUtilizationRequest) Retrieves the reservation utilization for your account.getRightsizingRecommendation(Consumer<GetRightsizingRecommendationRequest.Builder> getRightsizingRecommendationRequest) Creates recommendations that help you save cost by identifying idle and underutilized Amazon EC2 instances.getRightsizingRecommendation(GetRightsizingRecommendationRequest getRightsizingRecommendationRequest) Creates recommendations that help you save cost by identifying idle and underutilized Amazon EC2 instances.getSavingsPlanPurchaseRecommendationDetails(Consumer<GetSavingsPlanPurchaseRecommendationDetailsRequest.Builder> getSavingsPlanPurchaseRecommendationDetailsRequest) Retrieves the details for a Savings Plan recommendation.getSavingsPlanPurchaseRecommendationDetails(GetSavingsPlanPurchaseRecommendationDetailsRequest getSavingsPlanPurchaseRecommendationDetailsRequest) Retrieves the details for a Savings Plan recommendation.getSavingsPlansCoverage(Consumer<GetSavingsPlansCoverageRequest.Builder> getSavingsPlansCoverageRequest) Retrieves the Savings Plans covered for your account.getSavingsPlansCoverage(GetSavingsPlansCoverageRequest getSavingsPlansCoverageRequest) Retrieves the Savings Plans covered for your account.default GetSavingsPlansCoveragePublishergetSavingsPlansCoveragePaginator(Consumer<GetSavingsPlansCoverageRequest.Builder> getSavingsPlansCoverageRequest) This is a variant ofgetSavingsPlansCoverage(software.amazon.awssdk.services.costexplorer.model.GetSavingsPlansCoverageRequest)operation.default GetSavingsPlansCoveragePublishergetSavingsPlansCoveragePaginator(GetSavingsPlansCoverageRequest getSavingsPlansCoverageRequest) This is a variant ofgetSavingsPlansCoverage(software.amazon.awssdk.services.costexplorer.model.GetSavingsPlansCoverageRequest)operation.getSavingsPlansPurchaseRecommendation(Consumer<GetSavingsPlansPurchaseRecommendationRequest.Builder> getSavingsPlansPurchaseRecommendationRequest) Retrieves the Savings Plans recommendations for your account.getSavingsPlansPurchaseRecommendation(GetSavingsPlansPurchaseRecommendationRequest getSavingsPlansPurchaseRecommendationRequest) Retrieves the Savings Plans recommendations for your account.getSavingsPlansUtilization(Consumer<GetSavingsPlansUtilizationRequest.Builder> getSavingsPlansUtilizationRequest) Retrieves the Savings Plans utilization for your account across date ranges with daily or monthly granularity.getSavingsPlansUtilization(GetSavingsPlansUtilizationRequest getSavingsPlansUtilizationRequest) Retrieves the Savings Plans utilization for your account across date ranges with daily or monthly granularity.getSavingsPlansUtilizationDetails(Consumer<GetSavingsPlansUtilizationDetailsRequest.Builder> getSavingsPlansUtilizationDetailsRequest) Retrieves attribute data along with aggregate utilization and savings data for a given time period.getSavingsPlansUtilizationDetails(GetSavingsPlansUtilizationDetailsRequest getSavingsPlansUtilizationDetailsRequest) Retrieves attribute data along with aggregate utilization and savings data for a given time period.getSavingsPlansUtilizationDetailsPaginator(Consumer<GetSavingsPlansUtilizationDetailsRequest.Builder> getSavingsPlansUtilizationDetailsRequest) This is a variant ofgetSavingsPlansUtilizationDetails(software.amazon.awssdk.services.costexplorer.model.GetSavingsPlansUtilizationDetailsRequest)operation.getSavingsPlansUtilizationDetailsPaginator(GetSavingsPlansUtilizationDetailsRequest getSavingsPlansUtilizationDetailsRequest) This is a variant ofgetSavingsPlansUtilizationDetails(software.amazon.awssdk.services.costexplorer.model.GetSavingsPlansUtilizationDetailsRequest)operation.default CompletableFuture<GetTagsResponse> getTags(Consumer<GetTagsRequest.Builder> getTagsRequest) Queries for available tag keys and tag values for a specified period.default CompletableFuture<GetTagsResponse> getTags(GetTagsRequest getTagsRequest) Queries for available tag keys and tag values for a specified period.getUsageForecast(Consumer<GetUsageForecastRequest.Builder> getUsageForecastRequest) Retrieves a forecast for how much Amazon Web Services predicts that you will use over the forecast time period that you select, based on your past usage.getUsageForecast(GetUsageForecastRequest getUsageForecastRequest) Retrieves a forecast for how much Amazon Web Services predicts that you will use over the forecast time period that you select, based on your past usage.listCommitmentPurchaseAnalyses(Consumer<ListCommitmentPurchaseAnalysesRequest.Builder> listCommitmentPurchaseAnalysesRequest) Lists the commitment purchase analyses for your account.listCommitmentPurchaseAnalyses(ListCommitmentPurchaseAnalysesRequest listCommitmentPurchaseAnalysesRequest) Lists the commitment purchase analyses for your account.listCostAllocationTagBackfillHistory(Consumer<ListCostAllocationTagBackfillHistoryRequest.Builder> listCostAllocationTagBackfillHistoryRequest) Retrieves a list of your historical cost allocation tag backfill requests.listCostAllocationTagBackfillHistory(ListCostAllocationTagBackfillHistoryRequest listCostAllocationTagBackfillHistoryRequest) Retrieves a list of your historical cost allocation tag backfill requests.listCostAllocationTagBackfillHistoryPaginator(Consumer<ListCostAllocationTagBackfillHistoryRequest.Builder> listCostAllocationTagBackfillHistoryRequest) listCostAllocationTagBackfillHistoryPaginator(ListCostAllocationTagBackfillHistoryRequest listCostAllocationTagBackfillHistoryRequest) listCostAllocationTags(Consumer<ListCostAllocationTagsRequest.Builder> listCostAllocationTagsRequest) Get a list of cost allocation tags.listCostAllocationTags(ListCostAllocationTagsRequest listCostAllocationTagsRequest) Get a list of cost allocation tags.default ListCostAllocationTagsPublisherlistCostAllocationTagsPaginator(Consumer<ListCostAllocationTagsRequest.Builder> listCostAllocationTagsRequest) This is a variant oflistCostAllocationTags(software.amazon.awssdk.services.costexplorer.model.ListCostAllocationTagsRequest)operation.default ListCostAllocationTagsPublisherlistCostAllocationTagsPaginator(ListCostAllocationTagsRequest listCostAllocationTagsRequest) This is a variant oflistCostAllocationTags(software.amazon.awssdk.services.costexplorer.model.ListCostAllocationTagsRequest)operation.listCostCategoryDefinitions(Consumer<ListCostCategoryDefinitionsRequest.Builder> listCostCategoryDefinitionsRequest) Returns the name, Amazon Resource Name (ARN),NumberOfRulesand effective dates of all Cost Categories defined in the account.listCostCategoryDefinitions(ListCostCategoryDefinitionsRequest listCostCategoryDefinitionsRequest) Returns the name, Amazon Resource Name (ARN),NumberOfRulesand effective dates of all Cost Categories defined in the account.listCostCategoryDefinitionsPaginator(Consumer<ListCostCategoryDefinitionsRequest.Builder> listCostCategoryDefinitionsRequest) This is a variant oflistCostCategoryDefinitions(software.amazon.awssdk.services.costexplorer.model.ListCostCategoryDefinitionsRequest)operation.listCostCategoryDefinitionsPaginator(ListCostCategoryDefinitionsRequest listCostCategoryDefinitionsRequest) This is a variant oflistCostCategoryDefinitions(software.amazon.awssdk.services.costexplorer.model.ListCostCategoryDefinitionsRequest)operation.listSavingsPlansPurchaseRecommendationGeneration(Consumer<ListSavingsPlansPurchaseRecommendationGenerationRequest.Builder> listSavingsPlansPurchaseRecommendationGenerationRequest) Retrieves a list of your historical recommendation generations within the past 30 days.listSavingsPlansPurchaseRecommendationGeneration(ListSavingsPlansPurchaseRecommendationGenerationRequest listSavingsPlansPurchaseRecommendationGenerationRequest) Retrieves a list of your historical recommendation generations within the past 30 days.listTagsForResource(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest) Returns a list of resource tags associated with the resource specified by the Amazon Resource Name (ARN).listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) Returns a list of resource tags associated with the resource specified by the Amazon Resource Name (ARN).provideAnomalyFeedback(Consumer<ProvideAnomalyFeedbackRequest.Builder> provideAnomalyFeedbackRequest) Modifies the feedback property of a given cost anomaly.provideAnomalyFeedback(ProvideAnomalyFeedbackRequest provideAnomalyFeedbackRequest) Modifies the feedback property of a given cost anomaly.The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfigurationstartCommitmentPurchaseAnalysis(Consumer<StartCommitmentPurchaseAnalysisRequest.Builder> startCommitmentPurchaseAnalysisRequest) Specifies the parameters of a planned commitment purchase and starts the generation of the analysis.startCommitmentPurchaseAnalysis(StartCommitmentPurchaseAnalysisRequest startCommitmentPurchaseAnalysisRequest) Specifies the parameters of a planned commitment purchase and starts the generation of the analysis.startCostAllocationTagBackfill(Consumer<StartCostAllocationTagBackfillRequest.Builder> startCostAllocationTagBackfillRequest) Request a cost allocation tag backfill.startCostAllocationTagBackfill(StartCostAllocationTagBackfillRequest startCostAllocationTagBackfillRequest) Request a cost allocation tag backfill.startSavingsPlansPurchaseRecommendationGeneration(Consumer<StartSavingsPlansPurchaseRecommendationGenerationRequest.Builder> startSavingsPlansPurchaseRecommendationGenerationRequest) Requests a Savings Plans recommendation generation.startSavingsPlansPurchaseRecommendationGeneration(StartSavingsPlansPurchaseRecommendationGenerationRequest startSavingsPlansPurchaseRecommendationGenerationRequest) Requests a Savings Plans recommendation generation.default CompletableFuture<TagResourceResponse> tagResource(Consumer<TagResourceRequest.Builder> tagResourceRequest) An API operation for adding one or more tags (key-value pairs) to a resource.default CompletableFuture<TagResourceResponse> tagResource(TagResourceRequest tagResourceRequest) An API operation for adding one or more tags (key-value pairs) to a resource.default CompletableFuture<UntagResourceResponse> untagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest) Removes one or more tags from a resource.default CompletableFuture<UntagResourceResponse> untagResource(UntagResourceRequest untagResourceRequest) Removes one or more tags from a resource.updateAnomalyMonitor(Consumer<UpdateAnomalyMonitorRequest.Builder> updateAnomalyMonitorRequest) Updates an existing cost anomaly monitor.updateAnomalyMonitor(UpdateAnomalyMonitorRequest updateAnomalyMonitorRequest) Updates an existing cost anomaly monitor.updateAnomalySubscription(Consumer<UpdateAnomalySubscriptionRequest.Builder> updateAnomalySubscriptionRequest) Updates an existing cost anomaly subscription.updateAnomalySubscription(UpdateAnomalySubscriptionRequest updateAnomalySubscriptionRequest) Updates an existing cost anomaly subscription.updateCostAllocationTagsStatus(Consumer<UpdateCostAllocationTagsStatusRequest.Builder> updateCostAllocationTagsStatusRequest) Updates status for cost allocation tags in bulk, with maximum batch size of 20.updateCostAllocationTagsStatus(UpdateCostAllocationTagsStatusRequest updateCostAllocationTagsStatusRequest) Updates status for cost allocation tags in bulk, with maximum batch size of 20.updateCostCategoryDefinition(Consumer<UpdateCostCategoryDefinitionRequest.Builder> updateCostCategoryDefinitionRequest) Updates an existing Cost Category.updateCostCategoryDefinition(UpdateCostCategoryDefinitionRequest updateCostCategoryDefinitionRequest) Updates an existing Cost Category.Methods inherited from interface software.amazon.awssdk.utils.SdkAutoCloseable
closeMethods inherited from interface software.amazon.awssdk.core.SdkClient
serviceName
-
Field Details
-
SERVICE_NAME
- See Also:
-
SERVICE_METADATA_ID
Value for looking up the service's metadata from theServiceMetadataProvider.- See Also:
-
-
Method Details
-
createAnomalyMonitor
default CompletableFuture<CreateAnomalyMonitorResponse> createAnomalyMonitor(CreateAnomalyMonitorRequest createAnomalyMonitorRequest) Creates a new cost anomaly detection monitor with the requested type and monitor specification.
- Parameters:
createAnomalyMonitorRequest-- Returns:
- A Java Future containing the result of the CreateAnomalyMonitor 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
createAnomalyMonitor
default CompletableFuture<CreateAnomalyMonitorResponse> createAnomalyMonitor(Consumer<CreateAnomalyMonitorRequest.Builder> createAnomalyMonitorRequest) Creates a new cost anomaly detection monitor with the requested type and monitor specification.
This is a convenience which creates an instance of the
CreateAnomalyMonitorRequest.Builderavoiding the need to create one manually viaCreateAnomalyMonitorRequest.builder()- Parameters:
createAnomalyMonitorRequest- AConsumerthat will call methods onCreateAnomalyMonitorRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the CreateAnomalyMonitor 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
createAnomalySubscription
default CompletableFuture<CreateAnomalySubscriptionResponse> createAnomalySubscription(CreateAnomalySubscriptionRequest createAnomalySubscriptionRequest) Adds an alert subscription to a cost anomaly detection monitor. You can use each subscription to define subscribers with email or SNS notifications. Email subscribers can set an absolute or percentage threshold and a time frequency for receiving notifications.
- Parameters:
createAnomalySubscriptionRequest-- Returns:
- A Java Future containing the result of the CreateAnomalySubscription 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.- UnknownMonitorException The cost anomaly monitor does not exist for the account.
- LimitExceededException You made too many calls in a short period of time. Try again later.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
createAnomalySubscription
default CompletableFuture<CreateAnomalySubscriptionResponse> createAnomalySubscription(Consumer<CreateAnomalySubscriptionRequest.Builder> createAnomalySubscriptionRequest) Adds an alert subscription to a cost anomaly detection monitor. You can use each subscription to define subscribers with email or SNS notifications. Email subscribers can set an absolute or percentage threshold and a time frequency for receiving notifications.
This is a convenience which creates an instance of the
CreateAnomalySubscriptionRequest.Builderavoiding the need to create one manually viaCreateAnomalySubscriptionRequest.builder()- Parameters:
createAnomalySubscriptionRequest- AConsumerthat will call methods onCreateAnomalySubscriptionRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the CreateAnomalySubscription 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.- UnknownMonitorException The cost anomaly monitor does not exist for the account.
- LimitExceededException You made too many calls in a short period of time. Try again later.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
createCostCategoryDefinition
default CompletableFuture<CreateCostCategoryDefinitionResponse> createCostCategoryDefinition(CreateCostCategoryDefinitionRequest createCostCategoryDefinitionRequest) Creates a new Cost Category with the requested name and rules.
- Parameters:
createCostCategoryDefinitionRequest-- Returns:
- A Java Future containing the result of the CreateCostCategoryDefinition 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.- ServiceQuotaExceededException You've reached the limit on the number of resources you can create, or exceeded the size of an individual resource.
- LimitExceededException You made too many calls in a short period of time. Try again later.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
createCostCategoryDefinition
default CompletableFuture<CreateCostCategoryDefinitionResponse> createCostCategoryDefinition(Consumer<CreateCostCategoryDefinitionRequest.Builder> createCostCategoryDefinitionRequest) Creates a new Cost Category with the requested name and rules.
This is a convenience which creates an instance of the
CreateCostCategoryDefinitionRequest.Builderavoiding the need to create one manually viaCreateCostCategoryDefinitionRequest.builder()- Parameters:
createCostCategoryDefinitionRequest- AConsumerthat will call methods onCreateCostCategoryDefinitionRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the CreateCostCategoryDefinition 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.- ServiceQuotaExceededException You've reached the limit on the number of resources you can create, or exceeded the size of an individual resource.
- LimitExceededException You made too many calls in a short period of time. Try again later.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
deleteAnomalyMonitor
default CompletableFuture<DeleteAnomalyMonitorResponse> deleteAnomalyMonitor(DeleteAnomalyMonitorRequest deleteAnomalyMonitorRequest) Deletes a cost anomaly monitor.
- Parameters:
deleteAnomalyMonitorRequest-- Returns:
- A Java Future containing the result of the DeleteAnomalyMonitor 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- UnknownMonitorException The cost anomaly monitor does not exist for the account.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
deleteAnomalyMonitor
default CompletableFuture<DeleteAnomalyMonitorResponse> deleteAnomalyMonitor(Consumer<DeleteAnomalyMonitorRequest.Builder> deleteAnomalyMonitorRequest) Deletes a cost anomaly monitor.
This is a convenience which creates an instance of the
DeleteAnomalyMonitorRequest.Builderavoiding the need to create one manually viaDeleteAnomalyMonitorRequest.builder()- Parameters:
deleteAnomalyMonitorRequest- AConsumerthat will call methods onDeleteAnomalyMonitorRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the DeleteAnomalyMonitor 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- UnknownMonitorException The cost anomaly monitor does not exist for the account.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
deleteAnomalySubscription
default CompletableFuture<DeleteAnomalySubscriptionResponse> deleteAnomalySubscription(DeleteAnomalySubscriptionRequest deleteAnomalySubscriptionRequest) Deletes a cost anomaly subscription.
- Parameters:
deleteAnomalySubscriptionRequest-- Returns:
- A Java Future containing the result of the DeleteAnomalySubscription 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- UnknownSubscriptionException The cost anomaly subscription does not exist for the account.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
deleteAnomalySubscription
default CompletableFuture<DeleteAnomalySubscriptionResponse> deleteAnomalySubscription(Consumer<DeleteAnomalySubscriptionRequest.Builder> deleteAnomalySubscriptionRequest) Deletes a cost anomaly subscription.
This is a convenience which creates an instance of the
DeleteAnomalySubscriptionRequest.Builderavoiding the need to create one manually viaDeleteAnomalySubscriptionRequest.builder()- Parameters:
deleteAnomalySubscriptionRequest- AConsumerthat will call methods onDeleteAnomalySubscriptionRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the DeleteAnomalySubscription 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- UnknownSubscriptionException The cost anomaly subscription does not exist for the account.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
deleteCostCategoryDefinition
default CompletableFuture<DeleteCostCategoryDefinitionResponse> deleteCostCategoryDefinition(DeleteCostCategoryDefinitionRequest deleteCostCategoryDefinitionRequest) Deletes a Cost Category. Expenses from this month going forward will no longer be categorized with this Cost Category.
- Parameters:
deleteCostCategoryDefinitionRequest-- Returns:
- A Java Future containing the result of the DeleteCostCategoryDefinition 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.- ResourceNotFoundException The specified ARN in the request doesn't exist.
- LimitExceededException You made too many calls in a short period of time. Try again later.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
deleteCostCategoryDefinition
default CompletableFuture<DeleteCostCategoryDefinitionResponse> deleteCostCategoryDefinition(Consumer<DeleteCostCategoryDefinitionRequest.Builder> deleteCostCategoryDefinitionRequest) Deletes a Cost Category. Expenses from this month going forward will no longer be categorized with this Cost Category.
This is a convenience which creates an instance of the
DeleteCostCategoryDefinitionRequest.Builderavoiding the need to create one manually viaDeleteCostCategoryDefinitionRequest.builder()- Parameters:
deleteCostCategoryDefinitionRequest- AConsumerthat will call methods onDeleteCostCategoryDefinitionRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the DeleteCostCategoryDefinition 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.- ResourceNotFoundException The specified ARN in the request doesn't exist.
- LimitExceededException You made too many calls in a short period of time. Try again later.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
describeCostCategoryDefinition
default CompletableFuture<DescribeCostCategoryDefinitionResponse> describeCostCategoryDefinition(DescribeCostCategoryDefinitionRequest describeCostCategoryDefinitionRequest) Returns the name, Amazon Resource Name (ARN), rules, definition, and effective dates of a Cost Category that's defined in the account.
You have the option to use
EffectiveOnto return a Cost Category that's active on a specific date. If there's noEffectiveOnspecified, you see a Cost Category that's effective on the current date. If Cost Category is still effective,EffectiveEndis omitted in the response.- Parameters:
describeCostCategoryDefinitionRequest-- Returns:
- A Java Future containing the result of the DescribeCostCategoryDefinition 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.- ResourceNotFoundException The specified ARN in the request doesn't exist.
- LimitExceededException You made too many calls in a short period of time. Try again later.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
describeCostCategoryDefinition
default CompletableFuture<DescribeCostCategoryDefinitionResponse> describeCostCategoryDefinition(Consumer<DescribeCostCategoryDefinitionRequest.Builder> describeCostCategoryDefinitionRequest) Returns the name, Amazon Resource Name (ARN), rules, definition, and effective dates of a Cost Category that's defined in the account.
You have the option to use
EffectiveOnto return a Cost Category that's active on a specific date. If there's noEffectiveOnspecified, you see a Cost Category that's effective on the current date. If Cost Category is still effective,EffectiveEndis omitted in the response.
This is a convenience which creates an instance of the
DescribeCostCategoryDefinitionRequest.Builderavoiding the need to create one manually viaDescribeCostCategoryDefinitionRequest.builder()- Parameters:
describeCostCategoryDefinitionRequest- AConsumerthat will call methods onDescribeCostCategoryDefinitionRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the DescribeCostCategoryDefinition 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.- ResourceNotFoundException The specified ARN in the request doesn't exist.
- LimitExceededException You made too many calls in a short period of time. Try again later.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getAnomalies
default CompletableFuture<GetAnomaliesResponse> getAnomalies(GetAnomaliesRequest getAnomaliesRequest) Retrieves all of the cost anomalies detected on your account during the time period that's specified by the
DateIntervalobject. Anomalies are available for up to 90 days.- Parameters:
getAnomaliesRequest-- Returns:
- A Java Future containing the result of the GetAnomalies 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getAnomalies
default CompletableFuture<GetAnomaliesResponse> getAnomalies(Consumer<GetAnomaliesRequest.Builder> getAnomaliesRequest) Retrieves all of the cost anomalies detected on your account during the time period that's specified by the
DateIntervalobject. Anomalies are available for up to 90 days.
This is a convenience which creates an instance of the
GetAnomaliesRequest.Builderavoiding the need to create one manually viaGetAnomaliesRequest.builder()- Parameters:
getAnomaliesRequest- AConsumerthat will call methods onGetAnomaliesRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the GetAnomalies 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getAnomaliesPaginator
This is a variant of
getAnomalies(software.amazon.awssdk.services.costexplorer.model.GetAnomaliesRequest)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.costexplorer.paginators.GetAnomaliesPublisher publisher = client.getAnomaliesPaginator(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.costexplorer.paginators.GetAnomaliesPublisher publisher = client.getAnomaliesPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.costexplorer.model.GetAnomaliesResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.costexplorer.model.GetAnomaliesResponse 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
getAnomalies(software.amazon.awssdk.services.costexplorer.model.GetAnomaliesRequest)operation.- Parameters:
getAnomaliesRequest-- 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getAnomaliesPaginator
default GetAnomaliesPublisher getAnomaliesPaginator(Consumer<GetAnomaliesRequest.Builder> getAnomaliesRequest) This is a variant of
getAnomalies(software.amazon.awssdk.services.costexplorer.model.GetAnomaliesRequest)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.costexplorer.paginators.GetAnomaliesPublisher publisher = client.getAnomaliesPaginator(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.costexplorer.paginators.GetAnomaliesPublisher publisher = client.getAnomaliesPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.costexplorer.model.GetAnomaliesResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.costexplorer.model.GetAnomaliesResponse 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
getAnomalies(software.amazon.awssdk.services.costexplorer.model.GetAnomaliesRequest)operation.
This is a convenience which creates an instance of the
GetAnomaliesRequest.Builderavoiding the need to create one manually viaGetAnomaliesRequest.builder()- Parameters:
getAnomaliesRequest- AConsumerthat will call methods onGetAnomaliesRequest.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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getAnomalyMonitors
default CompletableFuture<GetAnomalyMonitorsResponse> getAnomalyMonitors(GetAnomalyMonitorsRequest getAnomalyMonitorsRequest) Retrieves the cost anomaly monitor definitions for your account. You can filter using a list of cost anomaly monitor Amazon Resource Names (ARNs).
- Parameters:
getAnomalyMonitorsRequest-- Returns:
- A Java Future containing the result of the GetAnomalyMonitors 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- UnknownMonitorException The cost anomaly monitor does not exist for the account.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getAnomalyMonitors
default CompletableFuture<GetAnomalyMonitorsResponse> getAnomalyMonitors(Consumer<GetAnomalyMonitorsRequest.Builder> getAnomalyMonitorsRequest) Retrieves the cost anomaly monitor definitions for your account. You can filter using a list of cost anomaly monitor Amazon Resource Names (ARNs).
This is a convenience which creates an instance of the
GetAnomalyMonitorsRequest.Builderavoiding the need to create one manually viaGetAnomalyMonitorsRequest.builder()- Parameters:
getAnomalyMonitorsRequest- AConsumerthat will call methods onGetAnomalyMonitorsRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the GetAnomalyMonitors 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- UnknownMonitorException The cost anomaly monitor does not exist for the account.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getAnomalyMonitorsPaginator
default GetAnomalyMonitorsPublisher getAnomalyMonitorsPaginator(GetAnomalyMonitorsRequest getAnomalyMonitorsRequest) This is a variant of
getAnomalyMonitors(software.amazon.awssdk.services.costexplorer.model.GetAnomalyMonitorsRequest)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.costexplorer.paginators.GetAnomalyMonitorsPublisher publisher = client.getAnomalyMonitorsPaginator(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.costexplorer.paginators.GetAnomalyMonitorsPublisher publisher = client.getAnomalyMonitorsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.costexplorer.model.GetAnomalyMonitorsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.costexplorer.model.GetAnomalyMonitorsResponse 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
getAnomalyMonitors(software.amazon.awssdk.services.costexplorer.model.GetAnomalyMonitorsRequest)operation.- Parameters:
getAnomalyMonitorsRequest-- 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- UnknownMonitorException The cost anomaly monitor does not exist for the account.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getAnomalyMonitorsPaginator
default GetAnomalyMonitorsPublisher getAnomalyMonitorsPaginator(Consumer<GetAnomalyMonitorsRequest.Builder> getAnomalyMonitorsRequest) This is a variant of
getAnomalyMonitors(software.amazon.awssdk.services.costexplorer.model.GetAnomalyMonitorsRequest)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.costexplorer.paginators.GetAnomalyMonitorsPublisher publisher = client.getAnomalyMonitorsPaginator(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.costexplorer.paginators.GetAnomalyMonitorsPublisher publisher = client.getAnomalyMonitorsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.costexplorer.model.GetAnomalyMonitorsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.costexplorer.model.GetAnomalyMonitorsResponse 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
getAnomalyMonitors(software.amazon.awssdk.services.costexplorer.model.GetAnomalyMonitorsRequest)operation.
This is a convenience which creates an instance of the
GetAnomalyMonitorsRequest.Builderavoiding the need to create one manually viaGetAnomalyMonitorsRequest.builder()- Parameters:
getAnomalyMonitorsRequest- AConsumerthat will call methods onGetAnomalyMonitorsRequest.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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- UnknownMonitorException The cost anomaly monitor does not exist for the account.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getAnomalySubscriptions
default CompletableFuture<GetAnomalySubscriptionsResponse> getAnomalySubscriptions(GetAnomalySubscriptionsRequest getAnomalySubscriptionsRequest) Retrieves the cost anomaly subscription objects for your account. You can filter using a list of cost anomaly monitor Amazon Resource Names (ARNs).
- Parameters:
getAnomalySubscriptionsRequest-- Returns:
- A Java Future containing the result of the GetAnomalySubscriptions 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- UnknownSubscriptionException The cost anomaly subscription does not exist for the account.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getAnomalySubscriptions
default CompletableFuture<GetAnomalySubscriptionsResponse> getAnomalySubscriptions(Consumer<GetAnomalySubscriptionsRequest.Builder> getAnomalySubscriptionsRequest) Retrieves the cost anomaly subscription objects for your account. You can filter using a list of cost anomaly monitor Amazon Resource Names (ARNs).
This is a convenience which creates an instance of the
GetAnomalySubscriptionsRequest.Builderavoiding the need to create one manually viaGetAnomalySubscriptionsRequest.builder()- Parameters:
getAnomalySubscriptionsRequest- AConsumerthat will call methods onGetAnomalySubscriptionsRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the GetAnomalySubscriptions 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- UnknownSubscriptionException The cost anomaly subscription does not exist for the account.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getAnomalySubscriptionsPaginator
default GetAnomalySubscriptionsPublisher getAnomalySubscriptionsPaginator(GetAnomalySubscriptionsRequest getAnomalySubscriptionsRequest) This is a variant of
getAnomalySubscriptions(software.amazon.awssdk.services.costexplorer.model.GetAnomalySubscriptionsRequest)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.costexplorer.paginators.GetAnomalySubscriptionsPublisher publisher = client.getAnomalySubscriptionsPaginator(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.costexplorer.paginators.GetAnomalySubscriptionsPublisher publisher = client.getAnomalySubscriptionsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.costexplorer.model.GetAnomalySubscriptionsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.costexplorer.model.GetAnomalySubscriptionsResponse 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
getAnomalySubscriptions(software.amazon.awssdk.services.costexplorer.model.GetAnomalySubscriptionsRequest)operation.- Parameters:
getAnomalySubscriptionsRequest-- 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- UnknownSubscriptionException The cost anomaly subscription does not exist for the account.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getAnomalySubscriptionsPaginator
default GetAnomalySubscriptionsPublisher getAnomalySubscriptionsPaginator(Consumer<GetAnomalySubscriptionsRequest.Builder> getAnomalySubscriptionsRequest) This is a variant of
getAnomalySubscriptions(software.amazon.awssdk.services.costexplorer.model.GetAnomalySubscriptionsRequest)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.costexplorer.paginators.GetAnomalySubscriptionsPublisher publisher = client.getAnomalySubscriptionsPaginator(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.costexplorer.paginators.GetAnomalySubscriptionsPublisher publisher = client.getAnomalySubscriptionsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.costexplorer.model.GetAnomalySubscriptionsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.costexplorer.model.GetAnomalySubscriptionsResponse 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
getAnomalySubscriptions(software.amazon.awssdk.services.costexplorer.model.GetAnomalySubscriptionsRequest)operation.
This is a convenience which creates an instance of the
GetAnomalySubscriptionsRequest.Builderavoiding the need to create one manually viaGetAnomalySubscriptionsRequest.builder()- Parameters:
getAnomalySubscriptionsRequest- AConsumerthat will call methods onGetAnomalySubscriptionsRequest.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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- UnknownSubscriptionException The cost anomaly subscription does not exist for the account.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getApproximateUsageRecords
default CompletableFuture<GetApproximateUsageRecordsResponse> getApproximateUsageRecords(GetApproximateUsageRecordsRequest getApproximateUsageRecordsRequest) Retrieves estimated usage records for hourly granularity or resource-level data at daily granularity.
- Parameters:
getApproximateUsageRecordsRequest-- Returns:
- A Java Future containing the result of the GetApproximateUsageRecords 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- DataUnavailableException The requested data is unavailable.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getApproximateUsageRecords
default CompletableFuture<GetApproximateUsageRecordsResponse> getApproximateUsageRecords(Consumer<GetApproximateUsageRecordsRequest.Builder> getApproximateUsageRecordsRequest) Retrieves estimated usage records for hourly granularity or resource-level data at daily granularity.
This is a convenience which creates an instance of the
GetApproximateUsageRecordsRequest.Builderavoiding the need to create one manually viaGetApproximateUsageRecordsRequest.builder()- Parameters:
getApproximateUsageRecordsRequest- AConsumerthat will call methods onGetApproximateUsageRecordsRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the GetApproximateUsageRecords 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- DataUnavailableException The requested data is unavailable.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getCommitmentPurchaseAnalysis
default CompletableFuture<GetCommitmentPurchaseAnalysisResponse> getCommitmentPurchaseAnalysis(GetCommitmentPurchaseAnalysisRequest getCommitmentPurchaseAnalysisRequest) Retrieves a commitment purchase analysis result based on the
AnalysisId.- Parameters:
getCommitmentPurchaseAnalysisRequest-- Returns:
- A Java Future containing the result of the GetCommitmentPurchaseAnalysis 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- AnalysisNotFoundException The requested analysis can't be found.
- DataUnavailableException The requested data is unavailable.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getCommitmentPurchaseAnalysis
default CompletableFuture<GetCommitmentPurchaseAnalysisResponse> getCommitmentPurchaseAnalysis(Consumer<GetCommitmentPurchaseAnalysisRequest.Builder> getCommitmentPurchaseAnalysisRequest) Retrieves a commitment purchase analysis result based on the
AnalysisId.
This is a convenience which creates an instance of the
GetCommitmentPurchaseAnalysisRequest.Builderavoiding the need to create one manually viaGetCommitmentPurchaseAnalysisRequest.builder()- Parameters:
getCommitmentPurchaseAnalysisRequest- AConsumerthat will call methods onGetCommitmentPurchaseAnalysisRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the GetCommitmentPurchaseAnalysis 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- AnalysisNotFoundException The requested analysis can't be found.
- DataUnavailableException The requested data is unavailable.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getCostAndUsage
default CompletableFuture<GetCostAndUsageResponse> getCostAndUsage(GetCostAndUsageRequest getCostAndUsageRequest) Retrieves cost and usage metrics for your account. You can specify which cost and usage-related metric that you want the request to return. For example, you can specify
BlendedCostsorUsageQuantity. You can also filter and group your data by various dimensions, such asSERVICEorAZ, in a specific time range. For a complete list of valid dimensions, see the GetDimensionValues operation. Management account in an organization in Organizations have access to all member accounts.For information about filter limitations, see Quotas and restrictions in the Billing and Cost Management User Guide.
- Parameters:
getCostAndUsageRequest-- Returns:
- A Java Future containing the result of the GetCostAndUsage 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- BillExpirationException The requested report expired. Update the date interval and try again.
- DataUnavailableException The requested data is unavailable.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- RequestChangedException Your request parameters changed between pages. Try again with the old parameters or without a pagination token.
- ResourceNotFoundException The specified ARN in the request doesn't exist.
- BillingViewHealthStatusException The billing view status must be
HEALTHYto perform this action. Try again when the status isHEALTHY. - 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getCostAndUsage
default CompletableFuture<GetCostAndUsageResponse> getCostAndUsage(Consumer<GetCostAndUsageRequest.Builder> getCostAndUsageRequest) Retrieves cost and usage metrics for your account. You can specify which cost and usage-related metric that you want the request to return. For example, you can specify
BlendedCostsorUsageQuantity. You can also filter and group your data by various dimensions, such asSERVICEorAZ, in a specific time range. For a complete list of valid dimensions, see the GetDimensionValues operation. Management account in an organization in Organizations have access to all member accounts.For information about filter limitations, see Quotas and restrictions in the Billing and Cost Management User Guide.
This is a convenience which creates an instance of the
GetCostAndUsageRequest.Builderavoiding the need to create one manually viaGetCostAndUsageRequest.builder()- Parameters:
getCostAndUsageRequest- AConsumerthat will call methods onGetCostAndUsageRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the GetCostAndUsage 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- BillExpirationException The requested report expired. Update the date interval and try again.
- DataUnavailableException The requested data is unavailable.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- RequestChangedException Your request parameters changed between pages. Try again with the old parameters or without a pagination token.
- ResourceNotFoundException The specified ARN in the request doesn't exist.
- BillingViewHealthStatusException The billing view status must be
HEALTHYto perform this action. Try again when the status isHEALTHY. - 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getCostAndUsageComparisons
default CompletableFuture<GetCostAndUsageComparisonsResponse> getCostAndUsageComparisons(GetCostAndUsageComparisonsRequest getCostAndUsageComparisonsRequest) Retrieves cost and usage comparisons for your account between two periods within the last 13 months. If you have enabled multi-year data at monthly granularity, you can go back up to 38 months.
- Parameters:
getCostAndUsageComparisonsRequest-- Returns:
- A Java Future containing the result of the GetCostAndUsageComparisons 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.- DataUnavailableException The requested data is unavailable.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- LimitExceededException You made too many calls in a short period of time. Try again later.
- ResourceNotFoundException The specified ARN in the request doesn't exist.
- BillingViewHealthStatusException The billing view status must be
HEALTHYto perform this action. Try again when the status isHEALTHY. - 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getCostAndUsageComparisons
default CompletableFuture<GetCostAndUsageComparisonsResponse> getCostAndUsageComparisons(Consumer<GetCostAndUsageComparisonsRequest.Builder> getCostAndUsageComparisonsRequest) Retrieves cost and usage comparisons for your account between two periods within the last 13 months. If you have enabled multi-year data at monthly granularity, you can go back up to 38 months.
This is a convenience which creates an instance of the
GetCostAndUsageComparisonsRequest.Builderavoiding the need to create one manually viaGetCostAndUsageComparisonsRequest.builder()- Parameters:
getCostAndUsageComparisonsRequest- AConsumerthat will call methods onGetCostAndUsageComparisonsRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the GetCostAndUsageComparisons 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.- DataUnavailableException The requested data is unavailable.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- LimitExceededException You made too many calls in a short period of time. Try again later.
- ResourceNotFoundException The specified ARN in the request doesn't exist.
- BillingViewHealthStatusException The billing view status must be
HEALTHYto perform this action. Try again when the status isHEALTHY. - 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getCostAndUsageComparisonsPaginator
default GetCostAndUsageComparisonsPublisher getCostAndUsageComparisonsPaginator(GetCostAndUsageComparisonsRequest getCostAndUsageComparisonsRequest) This is a variant of
getCostAndUsageComparisons(software.amazon.awssdk.services.costexplorer.model.GetCostAndUsageComparisonsRequest)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.costexplorer.paginators.GetCostAndUsageComparisonsPublisher publisher = client.getCostAndUsageComparisonsPaginator(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.costexplorer.paginators.GetCostAndUsageComparisonsPublisher publisher = client.getCostAndUsageComparisonsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.costexplorer.model.GetCostAndUsageComparisonsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.costexplorer.model.GetCostAndUsageComparisonsResponse 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
getCostAndUsageComparisons(software.amazon.awssdk.services.costexplorer.model.GetCostAndUsageComparisonsRequest)operation.- Parameters:
getCostAndUsageComparisonsRequest-- 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.- DataUnavailableException The requested data is unavailable.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- LimitExceededException You made too many calls in a short period of time. Try again later.
- ResourceNotFoundException The specified ARN in the request doesn't exist.
- BillingViewHealthStatusException The billing view status must be
HEALTHYto perform this action. Try again when the status isHEALTHY. - 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getCostAndUsageComparisonsPaginator
default GetCostAndUsageComparisonsPublisher getCostAndUsageComparisonsPaginator(Consumer<GetCostAndUsageComparisonsRequest.Builder> getCostAndUsageComparisonsRequest) This is a variant of
getCostAndUsageComparisons(software.amazon.awssdk.services.costexplorer.model.GetCostAndUsageComparisonsRequest)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.costexplorer.paginators.GetCostAndUsageComparisonsPublisher publisher = client.getCostAndUsageComparisonsPaginator(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.costexplorer.paginators.GetCostAndUsageComparisonsPublisher publisher = client.getCostAndUsageComparisonsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.costexplorer.model.GetCostAndUsageComparisonsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.costexplorer.model.GetCostAndUsageComparisonsResponse 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
getCostAndUsageComparisons(software.amazon.awssdk.services.costexplorer.model.GetCostAndUsageComparisonsRequest)operation.
This is a convenience which creates an instance of the
GetCostAndUsageComparisonsRequest.Builderavoiding the need to create one manually viaGetCostAndUsageComparisonsRequest.builder()- Parameters:
getCostAndUsageComparisonsRequest- AConsumerthat will call methods onGetCostAndUsageComparisonsRequest.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.- DataUnavailableException The requested data is unavailable.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- LimitExceededException You made too many calls in a short period of time. Try again later.
- ResourceNotFoundException The specified ARN in the request doesn't exist.
- BillingViewHealthStatusException The billing view status must be
HEALTHYto perform this action. Try again when the status isHEALTHY. - 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getCostAndUsageWithResources
default CompletableFuture<GetCostAndUsageWithResourcesResponse> getCostAndUsageWithResources(GetCostAndUsageWithResourcesRequest getCostAndUsageWithResourcesRequest) Retrieves cost and usage metrics with resources for your account. You can specify which cost and usage-related metric, such as
BlendedCostsorUsageQuantity, that you want the request to return. You can also filter and group your data by various dimensions, such asSERVICEorAZ, in a specific time range. For a complete list of valid dimensions, see the GetDimensionValues operation. Management account in an organization in Organizations have access to all member accounts.Hourly granularity is only available for EC2-Instances (Elastic Compute Cloud) resource-level data. All other resource-level data is available at daily granularity.
This is an opt-in only feature. You can enable this feature from the Cost Explorer Settings page. For information about how to access the Settings page, see Controlling Access for Cost Explorer in the Billing and Cost Management User Guide.
- Parameters:
getCostAndUsageWithResourcesRequest-- Returns:
- A Java Future containing the result of the GetCostAndUsageWithResources 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.- DataUnavailableException The requested data is unavailable.
- LimitExceededException You made too many calls in a short period of time. Try again later.
- BillExpirationException The requested report expired. Update the date interval and try again.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- RequestChangedException Your request parameters changed between pages. Try again with the old parameters or without a pagination token.
- ResourceNotFoundException The specified ARN in the request doesn't exist.
- BillingViewHealthStatusException The billing view status must be
HEALTHYto perform this action. Try again when the status isHEALTHY. - 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getCostAndUsageWithResources
default CompletableFuture<GetCostAndUsageWithResourcesResponse> getCostAndUsageWithResources(Consumer<GetCostAndUsageWithResourcesRequest.Builder> getCostAndUsageWithResourcesRequest) Retrieves cost and usage metrics with resources for your account. You can specify which cost and usage-related metric, such as
BlendedCostsorUsageQuantity, that you want the request to return. You can also filter and group your data by various dimensions, such asSERVICEorAZ, in a specific time range. For a complete list of valid dimensions, see the GetDimensionValues operation. Management account in an organization in Organizations have access to all member accounts.Hourly granularity is only available for EC2-Instances (Elastic Compute Cloud) resource-level data. All other resource-level data is available at daily granularity.
This is an opt-in only feature. You can enable this feature from the Cost Explorer Settings page. For information about how to access the Settings page, see Controlling Access for Cost Explorer in the Billing and Cost Management User Guide.
This is a convenience which creates an instance of the
GetCostAndUsageWithResourcesRequest.Builderavoiding the need to create one manually viaGetCostAndUsageWithResourcesRequest.builder()- Parameters:
getCostAndUsageWithResourcesRequest- AConsumerthat will call methods onGetCostAndUsageWithResourcesRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the GetCostAndUsageWithResources 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.- DataUnavailableException The requested data is unavailable.
- LimitExceededException You made too many calls in a short period of time. Try again later.
- BillExpirationException The requested report expired. Update the date interval and try again.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- RequestChangedException Your request parameters changed between pages. Try again with the old parameters or without a pagination token.
- ResourceNotFoundException The specified ARN in the request doesn't exist.
- BillingViewHealthStatusException The billing view status must be
HEALTHYto perform this action. Try again when the status isHEALTHY. - 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getCostCategories
default CompletableFuture<GetCostCategoriesResponse> getCostCategories(GetCostCategoriesRequest getCostCategoriesRequest) Retrieves an array of Cost Category names and values incurred cost.
If some Cost Category names and values are not associated with any cost, they will not be returned by this API.
- Parameters:
getCostCategoriesRequest-- Returns:
- A Java Future containing the result of the GetCostCategories 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- BillExpirationException The requested report expired. Update the date interval and try again.
- DataUnavailableException The requested data is unavailable.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- RequestChangedException Your request parameters changed between pages. Try again with the old parameters or without a pagination token.
- ResourceNotFoundException The specified ARN in the request doesn't exist.
- BillingViewHealthStatusException The billing view status must be
HEALTHYto perform this action. Try again when the status isHEALTHY. - 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getCostCategories
default CompletableFuture<GetCostCategoriesResponse> getCostCategories(Consumer<GetCostCategoriesRequest.Builder> getCostCategoriesRequest) Retrieves an array of Cost Category names and values incurred cost.
If some Cost Category names and values are not associated with any cost, they will not be returned by this API.
This is a convenience which creates an instance of the
GetCostCategoriesRequest.Builderavoiding the need to create one manually viaGetCostCategoriesRequest.builder()- Parameters:
getCostCategoriesRequest- AConsumerthat will call methods onGetCostCategoriesRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the GetCostCategories 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- BillExpirationException The requested report expired. Update the date interval and try again.
- DataUnavailableException The requested data is unavailable.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- RequestChangedException Your request parameters changed between pages. Try again with the old parameters or without a pagination token.
- ResourceNotFoundException The specified ARN in the request doesn't exist.
- BillingViewHealthStatusException The billing view status must be
HEALTHYto perform this action. Try again when the status isHEALTHY. - 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getCostComparisonDrivers
default CompletableFuture<GetCostComparisonDriversResponse> getCostComparisonDrivers(GetCostComparisonDriversRequest getCostComparisonDriversRequest) Retrieves key factors driving cost changes between two time periods within the last 13 months, such as usage changes, discount changes, and commitment-based savings. If you have enabled multi-year data at monthly granularity, you can go back up to 38 months.
- Parameters:
getCostComparisonDriversRequest-- Returns:
- A Java Future containing the result of the GetCostComparisonDrivers 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.- DataUnavailableException The requested data is unavailable.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- LimitExceededException You made too many calls in a short period of time. Try again later.
- ResourceNotFoundException The specified ARN in the request doesn't exist.
- BillingViewHealthStatusException The billing view status must be
HEALTHYto perform this action. Try again when the status isHEALTHY. - 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getCostComparisonDrivers
default CompletableFuture<GetCostComparisonDriversResponse> getCostComparisonDrivers(Consumer<GetCostComparisonDriversRequest.Builder> getCostComparisonDriversRequest) Retrieves key factors driving cost changes between two time periods within the last 13 months, such as usage changes, discount changes, and commitment-based savings. If you have enabled multi-year data at monthly granularity, you can go back up to 38 months.
This is a convenience which creates an instance of the
GetCostComparisonDriversRequest.Builderavoiding the need to create one manually viaGetCostComparisonDriversRequest.builder()- Parameters:
getCostComparisonDriversRequest- AConsumerthat will call methods onGetCostComparisonDriversRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the GetCostComparisonDrivers 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.- DataUnavailableException The requested data is unavailable.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- LimitExceededException You made too many calls in a short period of time. Try again later.
- ResourceNotFoundException The specified ARN in the request doesn't exist.
- BillingViewHealthStatusException The billing view status must be
HEALTHYto perform this action. Try again when the status isHEALTHY. - 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getCostComparisonDriversPaginator
default GetCostComparisonDriversPublisher getCostComparisonDriversPaginator(GetCostComparisonDriversRequest getCostComparisonDriversRequest) This is a variant of
getCostComparisonDrivers(software.amazon.awssdk.services.costexplorer.model.GetCostComparisonDriversRequest)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.costexplorer.paginators.GetCostComparisonDriversPublisher publisher = client.getCostComparisonDriversPaginator(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.costexplorer.paginators.GetCostComparisonDriversPublisher publisher = client.getCostComparisonDriversPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.costexplorer.model.GetCostComparisonDriversResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.costexplorer.model.GetCostComparisonDriversResponse 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
getCostComparisonDrivers(software.amazon.awssdk.services.costexplorer.model.GetCostComparisonDriversRequest)operation.- Parameters:
getCostComparisonDriversRequest-- 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.- DataUnavailableException The requested data is unavailable.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- LimitExceededException You made too many calls in a short period of time. Try again later.
- ResourceNotFoundException The specified ARN in the request doesn't exist.
- BillingViewHealthStatusException The billing view status must be
HEALTHYto perform this action. Try again when the status isHEALTHY. - 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getCostComparisonDriversPaginator
default GetCostComparisonDriversPublisher getCostComparisonDriversPaginator(Consumer<GetCostComparisonDriversRequest.Builder> getCostComparisonDriversRequest) This is a variant of
getCostComparisonDrivers(software.amazon.awssdk.services.costexplorer.model.GetCostComparisonDriversRequest)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.costexplorer.paginators.GetCostComparisonDriversPublisher publisher = client.getCostComparisonDriversPaginator(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.costexplorer.paginators.GetCostComparisonDriversPublisher publisher = client.getCostComparisonDriversPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.costexplorer.model.GetCostComparisonDriversResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.costexplorer.model.GetCostComparisonDriversResponse 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
getCostComparisonDrivers(software.amazon.awssdk.services.costexplorer.model.GetCostComparisonDriversRequest)operation.
This is a convenience which creates an instance of the
GetCostComparisonDriversRequest.Builderavoiding the need to create one manually viaGetCostComparisonDriversRequest.builder()- Parameters:
getCostComparisonDriversRequest- AConsumerthat will call methods onGetCostComparisonDriversRequest.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.- DataUnavailableException The requested data is unavailable.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- LimitExceededException You made too many calls in a short period of time. Try again later.
- ResourceNotFoundException The specified ARN in the request doesn't exist.
- BillingViewHealthStatusException The billing view status must be
HEALTHYto perform this action. Try again when the status isHEALTHY. - 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getCostForecast
default CompletableFuture<GetCostForecastResponse> getCostForecast(GetCostForecastRequest getCostForecastRequest) Retrieves a forecast for how much Amazon Web Services predicts that you will spend over the forecast time period that you select, based on your past costs.
- Parameters:
getCostForecastRequest-- Returns:
- A Java Future containing the result of the GetCostForecast 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- DataUnavailableException The requested data is unavailable.
- ResourceNotFoundException The specified ARN in the request doesn't exist.
- BillingViewHealthStatusException The billing view status must be
HEALTHYto perform this action. Try again when the status isHEALTHY. - 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getCostForecast
default CompletableFuture<GetCostForecastResponse> getCostForecast(Consumer<GetCostForecastRequest.Builder> getCostForecastRequest) Retrieves a forecast for how much Amazon Web Services predicts that you will spend over the forecast time period that you select, based on your past costs.
This is a convenience which creates an instance of the
GetCostForecastRequest.Builderavoiding the need to create one manually viaGetCostForecastRequest.builder()- Parameters:
getCostForecastRequest- AConsumerthat will call methods onGetCostForecastRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the GetCostForecast 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- DataUnavailableException The requested data is unavailable.
- ResourceNotFoundException The specified ARN in the request doesn't exist.
- BillingViewHealthStatusException The billing view status must be
HEALTHYto perform this action. Try again when the status isHEALTHY. - 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getDimensionValues
default CompletableFuture<GetDimensionValuesResponse> getDimensionValues(GetDimensionValuesRequest getDimensionValuesRequest) Retrieves all available filter values for a specified filter over a period of time. You can search the dimension values for an arbitrary string.
- Parameters:
getDimensionValuesRequest-- Returns:
- A Java Future containing the result of the GetDimensionValues 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- BillExpirationException The requested report expired. Update the date interval and try again.
- DataUnavailableException The requested data is unavailable.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- RequestChangedException Your request parameters changed between pages. Try again with the old parameters or without a pagination token.
- ResourceNotFoundException The specified ARN in the request doesn't exist.
- BillingViewHealthStatusException The billing view status must be
HEALTHYto perform this action. Try again when the status isHEALTHY. - 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getDimensionValues
default CompletableFuture<GetDimensionValuesResponse> getDimensionValues(Consumer<GetDimensionValuesRequest.Builder> getDimensionValuesRequest) Retrieves all available filter values for a specified filter over a period of time. You can search the dimension values for an arbitrary string.
This is a convenience which creates an instance of the
GetDimensionValuesRequest.Builderavoiding the need to create one manually viaGetDimensionValuesRequest.builder()- Parameters:
getDimensionValuesRequest- AConsumerthat will call methods onGetDimensionValuesRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the GetDimensionValues 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- BillExpirationException The requested report expired. Update the date interval and try again.
- DataUnavailableException The requested data is unavailable.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- RequestChangedException Your request parameters changed between pages. Try again with the old parameters or without a pagination token.
- ResourceNotFoundException The specified ARN in the request doesn't exist.
- BillingViewHealthStatusException The billing view status must be
HEALTHYto perform this action. Try again when the status isHEALTHY. - 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getReservationCoverage
default CompletableFuture<GetReservationCoverageResponse> getReservationCoverage(GetReservationCoverageRequest getReservationCoverageRequest) Retrieves the reservation coverage for your account, which you can use to see how much of your Amazon Elastic Compute Cloud, Amazon ElastiCache, Amazon Relational Database Service, or Amazon Redshift usage is covered by a reservation. An organization's management account can see the coverage of the associated member accounts. This supports dimensions, Cost Categories, and nested expressions. For any time period, you can filter data about reservation usage by the following dimensions:
-
AZ
-
CACHE_ENGINE
-
DATABASE_ENGINE
-
DEPLOYMENT_OPTION
-
INSTANCE_TYPE
-
LINKED_ACCOUNT
-
OPERATING_SYSTEM
-
PLATFORM
-
REGION
-
SERVICE
-
TAG
-
TENANCY
To determine valid values for a dimension, use the
GetDimensionValuesoperation.- Parameters:
getReservationCoverageRequest- You can use the following request parameters to query for how much of your instance usage a reservation covered.- Returns:
- A Java Future containing the result of the GetReservationCoverage 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- DataUnavailableException The requested data is unavailable.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
-
getReservationCoverage
default CompletableFuture<GetReservationCoverageResponse> getReservationCoverage(Consumer<GetReservationCoverageRequest.Builder> getReservationCoverageRequest) Retrieves the reservation coverage for your account, which you can use to see how much of your Amazon Elastic Compute Cloud, Amazon ElastiCache, Amazon Relational Database Service, or Amazon Redshift usage is covered by a reservation. An organization's management account can see the coverage of the associated member accounts. This supports dimensions, Cost Categories, and nested expressions. For any time period, you can filter data about reservation usage by the following dimensions:
-
AZ
-
CACHE_ENGINE
-
DATABASE_ENGINE
-
DEPLOYMENT_OPTION
-
INSTANCE_TYPE
-
LINKED_ACCOUNT
-
OPERATING_SYSTEM
-
PLATFORM
-
REGION
-
SERVICE
-
TAG
-
TENANCY
To determine valid values for a dimension, use the
GetDimensionValuesoperation.
This is a convenience which creates an instance of the
GetReservationCoverageRequest.Builderavoiding the need to create one manually viaGetReservationCoverageRequest.builder()- Parameters:
getReservationCoverageRequest- AConsumerthat will call methods onGetReservationCoverageRequest.Builderto create a request. You can use the following request parameters to query for how much of your instance usage a reservation covered.- Returns:
- A Java Future containing the result of the GetReservationCoverage 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- DataUnavailableException The requested data is unavailable.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
-
getReservationPurchaseRecommendation
default CompletableFuture<GetReservationPurchaseRecommendationResponse> getReservationPurchaseRecommendation(GetReservationPurchaseRecommendationRequest getReservationPurchaseRecommendationRequest) Gets recommendations for reservation purchases. These recommendations might help you to reduce your costs. Reservations provide a discounted hourly rate (up to 75%) compared to On-Demand pricing.
Amazon Web Services generates your recommendations by identifying your On-Demand usage during a specific time period and collecting your usage into categories that are eligible for a reservation. After Amazon Web Services has these categories, it simulates every combination of reservations in each category of usage to identify the best number of each type of Reserved Instance (RI) to purchase to maximize your estimated savings.
For example, Amazon Web Services automatically aggregates your Amazon EC2 Linux, shared tenancy, and c4 family usage in the US West (Oregon) Region and recommends that you buy size-flexible regional reservations to apply to the c4 family usage. Amazon Web Services recommends the smallest size instance in an instance family. This makes it easier to purchase a size-flexible Reserved Instance (RI). Amazon Web Services also shows the equal number of normalized units. This way, you can purchase any instance size that you want. For this example, your RI recommendation is for
c4.largebecause that is the smallest size instance in the c4 instance family.- Parameters:
getReservationPurchaseRecommendationRequest-- Returns:
- A Java Future containing the result of the GetReservationPurchaseRecommendation 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- DataUnavailableException The requested data is unavailable.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getReservationPurchaseRecommendation
default CompletableFuture<GetReservationPurchaseRecommendationResponse> getReservationPurchaseRecommendation(Consumer<GetReservationPurchaseRecommendationRequest.Builder> getReservationPurchaseRecommendationRequest) Gets recommendations for reservation purchases. These recommendations might help you to reduce your costs. Reservations provide a discounted hourly rate (up to 75%) compared to On-Demand pricing.
Amazon Web Services generates your recommendations by identifying your On-Demand usage during a specific time period and collecting your usage into categories that are eligible for a reservation. After Amazon Web Services has these categories, it simulates every combination of reservations in each category of usage to identify the best number of each type of Reserved Instance (RI) to purchase to maximize your estimated savings.
For example, Amazon Web Services automatically aggregates your Amazon EC2 Linux, shared tenancy, and c4 family usage in the US West (Oregon) Region and recommends that you buy size-flexible regional reservations to apply to the c4 family usage. Amazon Web Services recommends the smallest size instance in an instance family. This makes it easier to purchase a size-flexible Reserved Instance (RI). Amazon Web Services also shows the equal number of normalized units. This way, you can purchase any instance size that you want. For this example, your RI recommendation is for
c4.largebecause that is the smallest size instance in the c4 instance family.
This is a convenience which creates an instance of the
GetReservationPurchaseRecommendationRequest.Builderavoiding the need to create one manually viaGetReservationPurchaseRecommendationRequest.builder()- Parameters:
getReservationPurchaseRecommendationRequest- AConsumerthat will call methods onGetReservationPurchaseRecommendationRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the GetReservationPurchaseRecommendation 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- DataUnavailableException The requested data is unavailable.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getReservationUtilization
default CompletableFuture<GetReservationUtilizationResponse> getReservationUtilization(GetReservationUtilizationRequest getReservationUtilizationRequest) Retrieves the reservation utilization for your account. Management account in an organization have access to member accounts. You can filter data by dimensions in a time period. You can use
GetDimensionValuesto determine the possible dimension values. Currently, you can group only bySUBSCRIPTION_ID.- Parameters:
getReservationUtilizationRequest-- Returns:
- A Java Future containing the result of the GetReservationUtilization 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- DataUnavailableException The requested data is unavailable.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getReservationUtilization
default CompletableFuture<GetReservationUtilizationResponse> getReservationUtilization(Consumer<GetReservationUtilizationRequest.Builder> getReservationUtilizationRequest) Retrieves the reservation utilization for your account. Management account in an organization have access to member accounts. You can filter data by dimensions in a time period. You can use
GetDimensionValuesto determine the possible dimension values. Currently, you can group only bySUBSCRIPTION_ID.
This is a convenience which creates an instance of the
GetReservationUtilizationRequest.Builderavoiding the need to create one manually viaGetReservationUtilizationRequest.builder()- Parameters:
getReservationUtilizationRequest- AConsumerthat will call methods onGetReservationUtilizationRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the GetReservationUtilization 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- DataUnavailableException The requested data is unavailable.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getRightsizingRecommendation
default CompletableFuture<GetRightsizingRecommendationResponse> getRightsizingRecommendation(GetRightsizingRecommendationRequest getRightsizingRecommendationRequest) Creates recommendations that help you save cost by identifying idle and underutilized Amazon EC2 instances.
Recommendations are generated to either downsize or terminate instances, along with providing savings detail and metrics. For more information about calculation and function, see Optimizing Your Cost with Rightsizing Recommendations in the Billing and Cost Management User Guide.
- Parameters:
getRightsizingRecommendationRequest-- Returns:
- A Java Future containing the result of the GetRightsizingRecommendation 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getRightsizingRecommendation
default CompletableFuture<GetRightsizingRecommendationResponse> getRightsizingRecommendation(Consumer<GetRightsizingRecommendationRequest.Builder> getRightsizingRecommendationRequest) Creates recommendations that help you save cost by identifying idle and underutilized Amazon EC2 instances.
Recommendations are generated to either downsize or terminate instances, along with providing savings detail and metrics. For more information about calculation and function, see Optimizing Your Cost with Rightsizing Recommendations in the Billing and Cost Management User Guide.
This is a convenience which creates an instance of the
GetRightsizingRecommendationRequest.Builderavoiding the need to create one manually viaGetRightsizingRecommendationRequest.builder()- Parameters:
getRightsizingRecommendationRequest- AConsumerthat will call methods onGetRightsizingRecommendationRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the GetRightsizingRecommendation 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getSavingsPlanPurchaseRecommendationDetails
default CompletableFuture<GetSavingsPlanPurchaseRecommendationDetailsResponse> getSavingsPlanPurchaseRecommendationDetails(GetSavingsPlanPurchaseRecommendationDetailsRequest getSavingsPlanPurchaseRecommendationDetailsRequest) Retrieves the details for a Savings Plan recommendation. These details include the hourly data-points that construct the cost, coverage, and utilization charts.
- Parameters:
getSavingsPlanPurchaseRecommendationDetailsRequest-- Returns:
- A Java Future containing the result of the GetSavingsPlanPurchaseRecommendationDetails 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- DataUnavailableException The requested data is unavailable.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getSavingsPlanPurchaseRecommendationDetails
default CompletableFuture<GetSavingsPlanPurchaseRecommendationDetailsResponse> getSavingsPlanPurchaseRecommendationDetails(Consumer<GetSavingsPlanPurchaseRecommendationDetailsRequest.Builder> getSavingsPlanPurchaseRecommendationDetailsRequest) Retrieves the details for a Savings Plan recommendation. These details include the hourly data-points that construct the cost, coverage, and utilization charts.
This is a convenience which creates an instance of the
GetSavingsPlanPurchaseRecommendationDetailsRequest.Builderavoiding the need to create one manually viaGetSavingsPlanPurchaseRecommendationDetailsRequest.builder()- Parameters:
getSavingsPlanPurchaseRecommendationDetailsRequest- AConsumerthat will call methods onGetSavingsPlanPurchaseRecommendationDetailsRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the GetSavingsPlanPurchaseRecommendationDetails 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- DataUnavailableException The requested data is unavailable.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getSavingsPlansCoverage
default CompletableFuture<GetSavingsPlansCoverageResponse> getSavingsPlansCoverage(GetSavingsPlansCoverageRequest getSavingsPlansCoverageRequest) Retrieves the Savings Plans covered for your account. This enables you to see how much of your cost is covered by a Savings Plan. An organization’s management account can see the coverage of the associated member accounts. This supports dimensions, Cost Categories, and nested expressions. For any time period, you can filter data for Savings Plans usage with the following dimensions:
-
LINKED_ACCOUNT -
REGION -
SERVICE -
INSTANCE_FAMILY
To determine valid values for a dimension, use the
GetDimensionValuesoperation.- Parameters:
getSavingsPlansCoverageRequest-- Returns:
- A Java Future containing the result of the GetSavingsPlansCoverage 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- DataUnavailableException The requested data is unavailable.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
-
getSavingsPlansCoverage
default CompletableFuture<GetSavingsPlansCoverageResponse> getSavingsPlansCoverage(Consumer<GetSavingsPlansCoverageRequest.Builder> getSavingsPlansCoverageRequest) Retrieves the Savings Plans covered for your account. This enables you to see how much of your cost is covered by a Savings Plan. An organization’s management account can see the coverage of the associated member accounts. This supports dimensions, Cost Categories, and nested expressions. For any time period, you can filter data for Savings Plans usage with the following dimensions:
-
LINKED_ACCOUNT -
REGION -
SERVICE -
INSTANCE_FAMILY
To determine valid values for a dimension, use the
GetDimensionValuesoperation.
This is a convenience which creates an instance of the
GetSavingsPlansCoverageRequest.Builderavoiding the need to create one manually viaGetSavingsPlansCoverageRequest.builder()- Parameters:
getSavingsPlansCoverageRequest- AConsumerthat will call methods onGetSavingsPlansCoverageRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the GetSavingsPlansCoverage 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- DataUnavailableException The requested data is unavailable.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
-
getSavingsPlansCoveragePaginator
default GetSavingsPlansCoveragePublisher getSavingsPlansCoveragePaginator(GetSavingsPlansCoverageRequest getSavingsPlansCoverageRequest) This is a variant of
getSavingsPlansCoverage(software.amazon.awssdk.services.costexplorer.model.GetSavingsPlansCoverageRequest)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.costexplorer.paginators.GetSavingsPlansCoveragePublisher publisher = client.getSavingsPlansCoveragePaginator(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.costexplorer.paginators.GetSavingsPlansCoveragePublisher publisher = client.getSavingsPlansCoveragePaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.costexplorer.model.GetSavingsPlansCoverageResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.costexplorer.model.GetSavingsPlansCoverageResponse 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
getSavingsPlansCoverage(software.amazon.awssdk.services.costexplorer.model.GetSavingsPlansCoverageRequest)operation.- Parameters:
getSavingsPlansCoverageRequest-- 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- DataUnavailableException The requested data is unavailable.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getSavingsPlansCoveragePaginator
default GetSavingsPlansCoveragePublisher getSavingsPlansCoveragePaginator(Consumer<GetSavingsPlansCoverageRequest.Builder> getSavingsPlansCoverageRequest) This is a variant of
getSavingsPlansCoverage(software.amazon.awssdk.services.costexplorer.model.GetSavingsPlansCoverageRequest)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.costexplorer.paginators.GetSavingsPlansCoveragePublisher publisher = client.getSavingsPlansCoveragePaginator(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.costexplorer.paginators.GetSavingsPlansCoveragePublisher publisher = client.getSavingsPlansCoveragePaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.costexplorer.model.GetSavingsPlansCoverageResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.costexplorer.model.GetSavingsPlansCoverageResponse 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
getSavingsPlansCoverage(software.amazon.awssdk.services.costexplorer.model.GetSavingsPlansCoverageRequest)operation.
This is a convenience which creates an instance of the
GetSavingsPlansCoverageRequest.Builderavoiding the need to create one manually viaGetSavingsPlansCoverageRequest.builder()- Parameters:
getSavingsPlansCoverageRequest- AConsumerthat will call methods onGetSavingsPlansCoverageRequest.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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- DataUnavailableException The requested data is unavailable.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getSavingsPlansPurchaseRecommendation
default CompletableFuture<GetSavingsPlansPurchaseRecommendationResponse> getSavingsPlansPurchaseRecommendation(GetSavingsPlansPurchaseRecommendationRequest getSavingsPlansPurchaseRecommendationRequest) Retrieves the Savings Plans recommendations for your account. First use
StartSavingsPlansPurchaseRecommendationGenerationto generate a new set of recommendations, and then useGetSavingsPlansPurchaseRecommendationto retrieve them.- Parameters:
getSavingsPlansPurchaseRecommendationRequest-- Returns:
- A Java Future containing the result of the GetSavingsPlansPurchaseRecommendation 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getSavingsPlansPurchaseRecommendation
default CompletableFuture<GetSavingsPlansPurchaseRecommendationResponse> getSavingsPlansPurchaseRecommendation(Consumer<GetSavingsPlansPurchaseRecommendationRequest.Builder> getSavingsPlansPurchaseRecommendationRequest) Retrieves the Savings Plans recommendations for your account. First use
StartSavingsPlansPurchaseRecommendationGenerationto generate a new set of recommendations, and then useGetSavingsPlansPurchaseRecommendationto retrieve them.
This is a convenience which creates an instance of the
GetSavingsPlansPurchaseRecommendationRequest.Builderavoiding the need to create one manually viaGetSavingsPlansPurchaseRecommendationRequest.builder()- Parameters:
getSavingsPlansPurchaseRecommendationRequest- AConsumerthat will call methods onGetSavingsPlansPurchaseRecommendationRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the GetSavingsPlansPurchaseRecommendation 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getSavingsPlansUtilization
default CompletableFuture<GetSavingsPlansUtilizationResponse> getSavingsPlansUtilization(GetSavingsPlansUtilizationRequest getSavingsPlansUtilizationRequest) Retrieves the Savings Plans utilization for your account across date ranges with daily or monthly granularity. Management account in an organization have access to member accounts. You can use
GetDimensionValuesinSAVINGS_PLANSto determine the possible dimension values.You can't group by any dimension values for
GetSavingsPlansUtilization.- Parameters:
getSavingsPlansUtilizationRequest-- Returns:
- A Java Future containing the result of the GetSavingsPlansUtilization 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- DataUnavailableException The requested data is unavailable.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getSavingsPlansUtilization
default CompletableFuture<GetSavingsPlansUtilizationResponse> getSavingsPlansUtilization(Consumer<GetSavingsPlansUtilizationRequest.Builder> getSavingsPlansUtilizationRequest) Retrieves the Savings Plans utilization for your account across date ranges with daily or monthly granularity. Management account in an organization have access to member accounts. You can use
GetDimensionValuesinSAVINGS_PLANSto determine the possible dimension values.You can't group by any dimension values for
GetSavingsPlansUtilization.
This is a convenience which creates an instance of the
GetSavingsPlansUtilizationRequest.Builderavoiding the need to create one manually viaGetSavingsPlansUtilizationRequest.builder()- Parameters:
getSavingsPlansUtilizationRequest- AConsumerthat will call methods onGetSavingsPlansUtilizationRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the GetSavingsPlansUtilization 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- DataUnavailableException The requested data is unavailable.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getSavingsPlansUtilizationDetails
default CompletableFuture<GetSavingsPlansUtilizationDetailsResponse> getSavingsPlansUtilizationDetails(GetSavingsPlansUtilizationDetailsRequest getSavingsPlansUtilizationDetailsRequest) Retrieves attribute data along with aggregate utilization and savings data for a given time period. This doesn't support granular or grouped data (daily/monthly) in response. You can't retrieve data by dates in a single response similar to
GetSavingsPlanUtilization, but you have the option to make multiple calls toGetSavingsPlanUtilizationDetailsby providing individual dates. You can useGetDimensionValuesinSAVINGS_PLANSto determine the possible dimension values.GetSavingsPlanUtilizationDetailsinternally groups data bySavingsPlansArn.- Parameters:
getSavingsPlansUtilizationDetailsRequest-- Returns:
- A Java Future containing the result of the GetSavingsPlansUtilizationDetails 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- DataUnavailableException The requested data is unavailable.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getSavingsPlansUtilizationDetails
default CompletableFuture<GetSavingsPlansUtilizationDetailsResponse> getSavingsPlansUtilizationDetails(Consumer<GetSavingsPlansUtilizationDetailsRequest.Builder> getSavingsPlansUtilizationDetailsRequest) Retrieves attribute data along with aggregate utilization and savings data for a given time period. This doesn't support granular or grouped data (daily/monthly) in response. You can't retrieve data by dates in a single response similar to
GetSavingsPlanUtilization, but you have the option to make multiple calls toGetSavingsPlanUtilizationDetailsby providing individual dates. You can useGetDimensionValuesinSAVINGS_PLANSto determine the possible dimension values.GetSavingsPlanUtilizationDetailsinternally groups data bySavingsPlansArn.
This is a convenience which creates an instance of the
GetSavingsPlansUtilizationDetailsRequest.Builderavoiding the need to create one manually viaGetSavingsPlansUtilizationDetailsRequest.builder()- Parameters:
getSavingsPlansUtilizationDetailsRequest- AConsumerthat will call methods onGetSavingsPlansUtilizationDetailsRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the GetSavingsPlansUtilizationDetails 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- DataUnavailableException The requested data is unavailable.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getSavingsPlansUtilizationDetailsPaginator
default GetSavingsPlansUtilizationDetailsPublisher getSavingsPlansUtilizationDetailsPaginator(GetSavingsPlansUtilizationDetailsRequest getSavingsPlansUtilizationDetailsRequest) This is a variant of
getSavingsPlansUtilizationDetails(software.amazon.awssdk.services.costexplorer.model.GetSavingsPlansUtilizationDetailsRequest)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.costexplorer.paginators.GetSavingsPlansUtilizationDetailsPublisher publisher = client.getSavingsPlansUtilizationDetailsPaginator(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.costexplorer.paginators.GetSavingsPlansUtilizationDetailsPublisher publisher = client.getSavingsPlansUtilizationDetailsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.costexplorer.model.GetSavingsPlansUtilizationDetailsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.costexplorer.model.GetSavingsPlansUtilizationDetailsResponse 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
getSavingsPlansUtilizationDetails(software.amazon.awssdk.services.costexplorer.model.GetSavingsPlansUtilizationDetailsRequest)operation.- Parameters:
getSavingsPlansUtilizationDetailsRequest-- 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- DataUnavailableException The requested data is unavailable.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getSavingsPlansUtilizationDetailsPaginator
default GetSavingsPlansUtilizationDetailsPublisher getSavingsPlansUtilizationDetailsPaginator(Consumer<GetSavingsPlansUtilizationDetailsRequest.Builder> getSavingsPlansUtilizationDetailsRequest) This is a variant of
getSavingsPlansUtilizationDetails(software.amazon.awssdk.services.costexplorer.model.GetSavingsPlansUtilizationDetailsRequest)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.costexplorer.paginators.GetSavingsPlansUtilizationDetailsPublisher publisher = client.getSavingsPlansUtilizationDetailsPaginator(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.costexplorer.paginators.GetSavingsPlansUtilizationDetailsPublisher publisher = client.getSavingsPlansUtilizationDetailsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.costexplorer.model.GetSavingsPlansUtilizationDetailsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.costexplorer.model.GetSavingsPlansUtilizationDetailsResponse 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
getSavingsPlansUtilizationDetails(software.amazon.awssdk.services.costexplorer.model.GetSavingsPlansUtilizationDetailsRequest)operation.
This is a convenience which creates an instance of the
GetSavingsPlansUtilizationDetailsRequest.Builderavoiding the need to create one manually viaGetSavingsPlansUtilizationDetailsRequest.builder()- Parameters:
getSavingsPlansUtilizationDetailsRequest- AConsumerthat will call methods onGetSavingsPlansUtilizationDetailsRequest.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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- DataUnavailableException The requested data is unavailable.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getTags
Queries for available tag keys and tag values for a specified period. You can search the tag values for an arbitrary string.
- Parameters:
getTagsRequest-- Returns:
- A Java Future containing the result of the GetTags 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- BillExpirationException The requested report expired. Update the date interval and try again.
- DataUnavailableException The requested data is unavailable.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- RequestChangedException Your request parameters changed between pages. Try again with the old parameters or without a pagination token.
- ResourceNotFoundException The specified ARN in the request doesn't exist.
- BillingViewHealthStatusException The billing view status must be
HEALTHYto perform this action. Try again when the status isHEALTHY. - 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getTags
Queries for available tag keys and tag values for a specified period. You can search the tag values for an arbitrary string.
This is a convenience which creates an instance of the
GetTagsRequest.Builderavoiding the need to create one manually viaGetTagsRequest.builder()- Parameters:
getTagsRequest- AConsumerthat will call methods onGetTagsRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the GetTags 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- BillExpirationException The requested report expired. Update the date interval and try again.
- DataUnavailableException The requested data is unavailable.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- RequestChangedException Your request parameters changed between pages. Try again with the old parameters or without a pagination token.
- ResourceNotFoundException The specified ARN in the request doesn't exist.
- BillingViewHealthStatusException The billing view status must be
HEALTHYto perform this action. Try again when the status isHEALTHY. - 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getUsageForecast
default CompletableFuture<GetUsageForecastResponse> getUsageForecast(GetUsageForecastRequest getUsageForecastRequest) Retrieves a forecast for how much Amazon Web Services predicts that you will use over the forecast time period that you select, based on your past usage.
- Parameters:
getUsageForecastRequest-- Returns:
- A Java Future containing the result of the GetUsageForecast 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- DataUnavailableException The requested data is unavailable.
- UnresolvableUsageUnitException Cost Explorer was unable to identify the usage unit. Provide
UsageType/UsageTypeGroupfilter selections that contain matching units, for example:hours. - ResourceNotFoundException The specified ARN in the request doesn't exist.
- BillingViewHealthStatusException The billing view status must be
HEALTHYto perform this action. Try again when the status isHEALTHY. - 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getUsageForecast
default CompletableFuture<GetUsageForecastResponse> getUsageForecast(Consumer<GetUsageForecastRequest.Builder> getUsageForecastRequest) Retrieves a forecast for how much Amazon Web Services predicts that you will use over the forecast time period that you select, based on your past usage.
This is a convenience which creates an instance of the
GetUsageForecastRequest.Builderavoiding the need to create one manually viaGetUsageForecastRequest.builder()- Parameters:
getUsageForecastRequest- AConsumerthat will call methods onGetUsageForecastRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the GetUsageForecast 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- DataUnavailableException The requested data is unavailable.
- UnresolvableUsageUnitException Cost Explorer was unable to identify the usage unit. Provide
UsageType/UsageTypeGroupfilter selections that contain matching units, for example:hours. - ResourceNotFoundException The specified ARN in the request doesn't exist.
- BillingViewHealthStatusException The billing view status must be
HEALTHYto perform this action. Try again when the status isHEALTHY. - 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listCommitmentPurchaseAnalyses
default CompletableFuture<ListCommitmentPurchaseAnalysesResponse> listCommitmentPurchaseAnalyses(ListCommitmentPurchaseAnalysesRequest listCommitmentPurchaseAnalysesRequest) Lists the commitment purchase analyses for your account.
- Parameters:
listCommitmentPurchaseAnalysesRequest-- Returns:
- A Java Future containing the result of the ListCommitmentPurchaseAnalyses 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- DataUnavailableException The requested data is unavailable.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listCommitmentPurchaseAnalyses
default CompletableFuture<ListCommitmentPurchaseAnalysesResponse> listCommitmentPurchaseAnalyses(Consumer<ListCommitmentPurchaseAnalysesRequest.Builder> listCommitmentPurchaseAnalysesRequest) Lists the commitment purchase analyses for your account.
This is a convenience which creates an instance of the
ListCommitmentPurchaseAnalysesRequest.Builderavoiding the need to create one manually viaListCommitmentPurchaseAnalysesRequest.builder()- Parameters:
listCommitmentPurchaseAnalysesRequest- AConsumerthat will call methods onListCommitmentPurchaseAnalysesRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the ListCommitmentPurchaseAnalyses 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- DataUnavailableException The requested data is unavailable.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listCostAllocationTagBackfillHistory
default CompletableFuture<ListCostAllocationTagBackfillHistoryResponse> listCostAllocationTagBackfillHistory(ListCostAllocationTagBackfillHistoryRequest listCostAllocationTagBackfillHistoryRequest) Retrieves a list of your historical cost allocation tag backfill requests.
- Parameters:
listCostAllocationTagBackfillHistoryRequest-- Returns:
- A Java Future containing the result of the ListCostAllocationTagBackfillHistory 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listCostAllocationTagBackfillHistory
default CompletableFuture<ListCostAllocationTagBackfillHistoryResponse> listCostAllocationTagBackfillHistory(Consumer<ListCostAllocationTagBackfillHistoryRequest.Builder> listCostAllocationTagBackfillHistoryRequest) Retrieves a list of your historical cost allocation tag backfill requests.
This is a convenience which creates an instance of the
ListCostAllocationTagBackfillHistoryRequest.Builderavoiding the need to create one manually viaListCostAllocationTagBackfillHistoryRequest.builder()- Parameters:
listCostAllocationTagBackfillHistoryRequest- AConsumerthat will call methods onListCostAllocationTagBackfillHistoryRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the ListCostAllocationTagBackfillHistory 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listCostAllocationTagBackfillHistoryPaginator
default ListCostAllocationTagBackfillHistoryPublisher listCostAllocationTagBackfillHistoryPaginator(ListCostAllocationTagBackfillHistoryRequest listCostAllocationTagBackfillHistoryRequest) This is a variant of
listCostAllocationTagBackfillHistory(software.amazon.awssdk.services.costexplorer.model.ListCostAllocationTagBackfillHistoryRequest)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.costexplorer.paginators.ListCostAllocationTagBackfillHistoryPublisher publisher = client.listCostAllocationTagBackfillHistoryPaginator(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.costexplorer.paginators.ListCostAllocationTagBackfillHistoryPublisher publisher = client.listCostAllocationTagBackfillHistoryPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.costexplorer.model.ListCostAllocationTagBackfillHistoryResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.costexplorer.model.ListCostAllocationTagBackfillHistoryResponse 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
listCostAllocationTagBackfillHistory(software.amazon.awssdk.services.costexplorer.model.ListCostAllocationTagBackfillHistoryRequest)operation.- Parameters:
listCostAllocationTagBackfillHistoryRequest-- 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listCostAllocationTagBackfillHistoryPaginator
default ListCostAllocationTagBackfillHistoryPublisher listCostAllocationTagBackfillHistoryPaginator(Consumer<ListCostAllocationTagBackfillHistoryRequest.Builder> listCostAllocationTagBackfillHistoryRequest) This is a variant of
listCostAllocationTagBackfillHistory(software.amazon.awssdk.services.costexplorer.model.ListCostAllocationTagBackfillHistoryRequest)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.costexplorer.paginators.ListCostAllocationTagBackfillHistoryPublisher publisher = client.listCostAllocationTagBackfillHistoryPaginator(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.costexplorer.paginators.ListCostAllocationTagBackfillHistoryPublisher publisher = client.listCostAllocationTagBackfillHistoryPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.costexplorer.model.ListCostAllocationTagBackfillHistoryResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.costexplorer.model.ListCostAllocationTagBackfillHistoryResponse 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
listCostAllocationTagBackfillHistory(software.amazon.awssdk.services.costexplorer.model.ListCostAllocationTagBackfillHistoryRequest)operation.
This is a convenience which creates an instance of the
ListCostAllocationTagBackfillHistoryRequest.Builderavoiding the need to create one manually viaListCostAllocationTagBackfillHistoryRequest.builder()- Parameters:
listCostAllocationTagBackfillHistoryRequest- AConsumerthat will call methods onListCostAllocationTagBackfillHistoryRequest.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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listCostAllocationTags
default CompletableFuture<ListCostAllocationTagsResponse> listCostAllocationTags(ListCostAllocationTagsRequest listCostAllocationTagsRequest) Get a list of cost allocation tags. All inputs in the API are optional and serve as filters. By default, all cost allocation tags are returned.
- Parameters:
listCostAllocationTagsRequest-- Returns:
- A Java Future containing the result of the ListCostAllocationTags 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listCostAllocationTags
default CompletableFuture<ListCostAllocationTagsResponse> listCostAllocationTags(Consumer<ListCostAllocationTagsRequest.Builder> listCostAllocationTagsRequest) Get a list of cost allocation tags. All inputs in the API are optional and serve as filters. By default, all cost allocation tags are returned.
This is a convenience which creates an instance of the
ListCostAllocationTagsRequest.Builderavoiding the need to create one manually viaListCostAllocationTagsRequest.builder()- Parameters:
listCostAllocationTagsRequest- AConsumerthat will call methods onListCostAllocationTagsRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the ListCostAllocationTags 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listCostAllocationTagsPaginator
default ListCostAllocationTagsPublisher listCostAllocationTagsPaginator(ListCostAllocationTagsRequest listCostAllocationTagsRequest) This is a variant of
listCostAllocationTags(software.amazon.awssdk.services.costexplorer.model.ListCostAllocationTagsRequest)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.costexplorer.paginators.ListCostAllocationTagsPublisher publisher = client.listCostAllocationTagsPaginator(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.costexplorer.paginators.ListCostAllocationTagsPublisher publisher = client.listCostAllocationTagsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.costexplorer.model.ListCostAllocationTagsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.costexplorer.model.ListCostAllocationTagsResponse 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
listCostAllocationTags(software.amazon.awssdk.services.costexplorer.model.ListCostAllocationTagsRequest)operation.- Parameters:
listCostAllocationTagsRequest-- 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listCostAllocationTagsPaginator
default ListCostAllocationTagsPublisher listCostAllocationTagsPaginator(Consumer<ListCostAllocationTagsRequest.Builder> listCostAllocationTagsRequest) This is a variant of
listCostAllocationTags(software.amazon.awssdk.services.costexplorer.model.ListCostAllocationTagsRequest)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.costexplorer.paginators.ListCostAllocationTagsPublisher publisher = client.listCostAllocationTagsPaginator(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.costexplorer.paginators.ListCostAllocationTagsPublisher publisher = client.listCostAllocationTagsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.costexplorer.model.ListCostAllocationTagsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.costexplorer.model.ListCostAllocationTagsResponse 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
listCostAllocationTags(software.amazon.awssdk.services.costexplorer.model.ListCostAllocationTagsRequest)operation.
This is a convenience which creates an instance of the
ListCostAllocationTagsRequest.Builderavoiding the need to create one manually viaListCostAllocationTagsRequest.builder()- Parameters:
listCostAllocationTagsRequest- AConsumerthat will call methods onListCostAllocationTagsRequest.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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listCostCategoryDefinitions
default CompletableFuture<ListCostCategoryDefinitionsResponse> listCostCategoryDefinitions(ListCostCategoryDefinitionsRequest listCostCategoryDefinitionsRequest) Returns the name, Amazon Resource Name (ARN),
NumberOfRulesand effective dates of all Cost Categories defined in the account. You have the option to useEffectiveOnto return a list of Cost Categories that were active on a specific date. If there is noEffectiveOnspecified, you’ll see Cost Categories that are effective on the current date. If Cost Category is still effective,EffectiveEndis omitted in the response.ListCostCategoryDefinitionssupports pagination. The request can have aMaxResultsrange up to 100.- Parameters:
listCostCategoryDefinitionsRequest-- Returns:
- A Java Future containing the result of the ListCostCategoryDefinitions 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listCostCategoryDefinitions
default CompletableFuture<ListCostCategoryDefinitionsResponse> listCostCategoryDefinitions(Consumer<ListCostCategoryDefinitionsRequest.Builder> listCostCategoryDefinitionsRequest) Returns the name, Amazon Resource Name (ARN),
NumberOfRulesand effective dates of all Cost Categories defined in the account. You have the option to useEffectiveOnto return a list of Cost Categories that were active on a specific date. If there is noEffectiveOnspecified, you’ll see Cost Categories that are effective on the current date. If Cost Category is still effective,EffectiveEndis omitted in the response.ListCostCategoryDefinitionssupports pagination. The request can have aMaxResultsrange up to 100.
This is a convenience which creates an instance of the
ListCostCategoryDefinitionsRequest.Builderavoiding the need to create one manually viaListCostCategoryDefinitionsRequest.builder()- Parameters:
listCostCategoryDefinitionsRequest- AConsumerthat will call methods onListCostCategoryDefinitionsRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the ListCostCategoryDefinitions 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listCostCategoryDefinitionsPaginator
default ListCostCategoryDefinitionsPublisher listCostCategoryDefinitionsPaginator(ListCostCategoryDefinitionsRequest listCostCategoryDefinitionsRequest) This is a variant of
listCostCategoryDefinitions(software.amazon.awssdk.services.costexplorer.model.ListCostCategoryDefinitionsRequest)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.costexplorer.paginators.ListCostCategoryDefinitionsPublisher publisher = client.listCostCategoryDefinitionsPaginator(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.costexplorer.paginators.ListCostCategoryDefinitionsPublisher publisher = client.listCostCategoryDefinitionsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.costexplorer.model.ListCostCategoryDefinitionsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.costexplorer.model.ListCostCategoryDefinitionsResponse 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
listCostCategoryDefinitions(software.amazon.awssdk.services.costexplorer.model.ListCostCategoryDefinitionsRequest)operation.- Parameters:
listCostCategoryDefinitionsRequest-- 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listCostCategoryDefinitionsPaginator
default ListCostCategoryDefinitionsPublisher listCostCategoryDefinitionsPaginator(Consumer<ListCostCategoryDefinitionsRequest.Builder> listCostCategoryDefinitionsRequest) This is a variant of
listCostCategoryDefinitions(software.amazon.awssdk.services.costexplorer.model.ListCostCategoryDefinitionsRequest)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.costexplorer.paginators.ListCostCategoryDefinitionsPublisher publisher = client.listCostCategoryDefinitionsPaginator(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.costexplorer.paginators.ListCostCategoryDefinitionsPublisher publisher = client.listCostCategoryDefinitionsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.costexplorer.model.ListCostCategoryDefinitionsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.costexplorer.model.ListCostCategoryDefinitionsResponse 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
listCostCategoryDefinitions(software.amazon.awssdk.services.costexplorer.model.ListCostCategoryDefinitionsRequest)operation.
This is a convenience which creates an instance of the
ListCostCategoryDefinitionsRequest.Builderavoiding the need to create one manually viaListCostCategoryDefinitionsRequest.builder()- Parameters:
listCostCategoryDefinitionsRequest- AConsumerthat will call methods onListCostCategoryDefinitionsRequest.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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listSavingsPlansPurchaseRecommendationGeneration
default CompletableFuture<ListSavingsPlansPurchaseRecommendationGenerationResponse> listSavingsPlansPurchaseRecommendationGeneration(ListSavingsPlansPurchaseRecommendationGenerationRequest listSavingsPlansPurchaseRecommendationGenerationRequest) Retrieves a list of your historical recommendation generations within the past 30 days.
- Parameters:
listSavingsPlansPurchaseRecommendationGenerationRequest-- Returns:
- A Java Future containing the result of the ListSavingsPlansPurchaseRecommendationGeneration 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- DataUnavailableException The requested data is unavailable.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listSavingsPlansPurchaseRecommendationGeneration
default CompletableFuture<ListSavingsPlansPurchaseRecommendationGenerationResponse> listSavingsPlansPurchaseRecommendationGeneration(Consumer<ListSavingsPlansPurchaseRecommendationGenerationRequest.Builder> listSavingsPlansPurchaseRecommendationGenerationRequest) Retrieves a list of your historical recommendation generations within the past 30 days.
This is a convenience which creates an instance of the
ListSavingsPlansPurchaseRecommendationGenerationRequest.Builderavoiding the need to create one manually viaListSavingsPlansPurchaseRecommendationGenerationRequest.builder()- Parameters:
listSavingsPlansPurchaseRecommendationGenerationRequest- AConsumerthat will call methods onListSavingsPlansPurchaseRecommendationGenerationRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the ListSavingsPlansPurchaseRecommendationGeneration 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- InvalidNextTokenException The pagination token is invalid. Try again without a pagination token.
- DataUnavailableException The requested data is unavailable.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listTagsForResource
default CompletableFuture<ListTagsForResourceResponse> listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) Returns a list of resource tags associated with the resource specified by the Amazon Resource Name (ARN).
- 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 invokeThrowable.getCause()to retrieve the underlying exception.- ResourceNotFoundException The specified ARN in the request doesn't exist.
- LimitExceededException You made too many calls in a short period of time. Try again later.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listTagsForResource
default CompletableFuture<ListTagsForResourceResponse> listTagsForResource(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest) Returns a list of resource tags associated with the resource specified by the Amazon Resource Name (ARN).
This is a convenience which creates an instance of the
ListTagsForResourceRequest.Builderavoiding the need to create one manually viaListTagsForResourceRequest.builder()- Parameters:
listTagsForResourceRequest- AConsumerthat will call methods onListTagsForResourceRequest.Builderto 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 invokeThrowable.getCause()to retrieve the underlying exception.- ResourceNotFoundException The specified ARN in the request doesn't exist.
- LimitExceededException You made too many calls in a short period of time. Try again later.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
provideAnomalyFeedback
default CompletableFuture<ProvideAnomalyFeedbackResponse> provideAnomalyFeedback(ProvideAnomalyFeedbackRequest provideAnomalyFeedbackRequest) Modifies the feedback property of a given cost anomaly.
- Parameters:
provideAnomalyFeedbackRequest-- Returns:
- A Java Future containing the result of the ProvideAnomalyFeedback 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
provideAnomalyFeedback
default CompletableFuture<ProvideAnomalyFeedbackResponse> provideAnomalyFeedback(Consumer<ProvideAnomalyFeedbackRequest.Builder> provideAnomalyFeedbackRequest) Modifies the feedback property of a given cost anomaly.
This is a convenience which creates an instance of the
ProvideAnomalyFeedbackRequest.Builderavoiding the need to create one manually viaProvideAnomalyFeedbackRequest.builder()- Parameters:
provideAnomalyFeedbackRequest- AConsumerthat will call methods onProvideAnomalyFeedbackRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the ProvideAnomalyFeedback 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
startCommitmentPurchaseAnalysis
default CompletableFuture<StartCommitmentPurchaseAnalysisResponse> startCommitmentPurchaseAnalysis(StartCommitmentPurchaseAnalysisRequest startCommitmentPurchaseAnalysisRequest) Specifies the parameters of a planned commitment purchase and starts the generation of the analysis. This enables you to estimate the cost, coverage, and utilization impact of your planned commitment purchases.
- Parameters:
startCommitmentPurchaseAnalysisRequest-- Returns:
- A Java Future containing the result of the StartCommitmentPurchaseAnalysis 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- ServiceQuotaExceededException You've reached the limit on the number of resources you can create, or exceeded the size of an individual resource.
- DataUnavailableException The requested data is unavailable.
- GenerationExistsException A request to generate a recommendation or analysis is already in progress.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
startCommitmentPurchaseAnalysis
default CompletableFuture<StartCommitmentPurchaseAnalysisResponse> startCommitmentPurchaseAnalysis(Consumer<StartCommitmentPurchaseAnalysisRequest.Builder> startCommitmentPurchaseAnalysisRequest) Specifies the parameters of a planned commitment purchase and starts the generation of the analysis. This enables you to estimate the cost, coverage, and utilization impact of your planned commitment purchases.
This is a convenience which creates an instance of the
StartCommitmentPurchaseAnalysisRequest.Builderavoiding the need to create one manually viaStartCommitmentPurchaseAnalysisRequest.builder()- Parameters:
startCommitmentPurchaseAnalysisRequest- AConsumerthat will call methods onStartCommitmentPurchaseAnalysisRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the StartCommitmentPurchaseAnalysis 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- ServiceQuotaExceededException You've reached the limit on the number of resources you can create, or exceeded the size of an individual resource.
- DataUnavailableException The requested data is unavailable.
- GenerationExistsException A request to generate a recommendation or analysis is already in progress.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
startCostAllocationTagBackfill
default CompletableFuture<StartCostAllocationTagBackfillResponse> startCostAllocationTagBackfill(StartCostAllocationTagBackfillRequest startCostAllocationTagBackfillRequest) Request a cost allocation tag backfill. This will backfill the activation status (either
activeorinactive) for all tag keys frompara:BackfillFromup to the time this request is made.You can request a backfill once every 24 hours.
- Parameters:
startCostAllocationTagBackfillRequest-- Returns:
- A Java Future containing the result of the StartCostAllocationTagBackfill 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- BackfillLimitExceededException A request to backfill is already in progress. Once the previous request is complete, you can create another request.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
startCostAllocationTagBackfill
default CompletableFuture<StartCostAllocationTagBackfillResponse> startCostAllocationTagBackfill(Consumer<StartCostAllocationTagBackfillRequest.Builder> startCostAllocationTagBackfillRequest) Request a cost allocation tag backfill. This will backfill the activation status (either
activeorinactive) for all tag keys frompara:BackfillFromup to the time this request is made.You can request a backfill once every 24 hours.
This is a convenience which creates an instance of the
StartCostAllocationTagBackfillRequest.Builderavoiding the need to create one manually viaStartCostAllocationTagBackfillRequest.builder()- Parameters:
startCostAllocationTagBackfillRequest- AConsumerthat will call methods onStartCostAllocationTagBackfillRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the StartCostAllocationTagBackfill 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- BackfillLimitExceededException A request to backfill is already in progress. Once the previous request is complete, you can create another request.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
startSavingsPlansPurchaseRecommendationGeneration
default CompletableFuture<StartSavingsPlansPurchaseRecommendationGenerationResponse> startSavingsPlansPurchaseRecommendationGeneration(StartSavingsPlansPurchaseRecommendationGenerationRequest startSavingsPlansPurchaseRecommendationGenerationRequest) Requests a Savings Plans recommendation generation. This enables you to calculate a fresh set of Savings Plans recommendations that takes your latest usage data and current Savings Plans inventory into account. You can refresh Savings Plans recommendations up to three times daily for a consolidated billing family.
StartSavingsPlansPurchaseRecommendationGenerationhas no request syntax because no input parameters are needed to support this operation.- Parameters:
startSavingsPlansPurchaseRecommendationGenerationRequest-- Returns:
- A Java Future containing the result of the StartSavingsPlansPurchaseRecommendationGeneration 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- ServiceQuotaExceededException You've reached the limit on the number of resources you can create, or exceeded the size of an individual resource.
- GenerationExistsException A request to generate a recommendation or analysis is already in progress.
- DataUnavailableException The requested data is unavailable.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
startSavingsPlansPurchaseRecommendationGeneration
default CompletableFuture<StartSavingsPlansPurchaseRecommendationGenerationResponse> startSavingsPlansPurchaseRecommendationGeneration(Consumer<StartSavingsPlansPurchaseRecommendationGenerationRequest.Builder> startSavingsPlansPurchaseRecommendationGenerationRequest) Requests a Savings Plans recommendation generation. This enables you to calculate a fresh set of Savings Plans recommendations that takes your latest usage data and current Savings Plans inventory into account. You can refresh Savings Plans recommendations up to three times daily for a consolidated billing family.
StartSavingsPlansPurchaseRecommendationGenerationhas no request syntax because no input parameters are needed to support this operation.
This is a convenience which creates an instance of the
StartSavingsPlansPurchaseRecommendationGenerationRequest.Builderavoiding the need to create one manually viaStartSavingsPlansPurchaseRecommendationGenerationRequest.builder()- Parameters:
startSavingsPlansPurchaseRecommendationGenerationRequest- AConsumerthat will call methods onStartSavingsPlansPurchaseRecommendationGenerationRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the StartSavingsPlansPurchaseRecommendationGeneration 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- ServiceQuotaExceededException You've reached the limit on the number of resources you can create, or exceeded the size of an individual resource.
- GenerationExistsException A request to generate a recommendation or analysis is already in progress.
- DataUnavailableException The requested data is unavailable.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
tagResource
An API operation for adding one or more tags (key-value pairs) to a resource.
You can use the
TagResourceoperation with a resource that already has tags. If you specify a new tag key for the resource, this tag is appended to the list of tags associated with the resource. If you specify a tag key that is already associated with the resource, the new tag value you specify replaces the previous value for that tag.Although the maximum number of array members is 200, user-tag maximum is 50. The remaining are reserved for Amazon Web Services use.
- 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 invokeThrowable.getCause()to retrieve the underlying exception.- ResourceNotFoundException The specified ARN in the request doesn't exist.
- TooManyTagsException Can occur if you specify a number of tags for a resource greater than the maximum 50 user tags per resource.
- LimitExceededException You made too many calls in a short period of time. Try again later.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
tagResource
default CompletableFuture<TagResourceResponse> tagResource(Consumer<TagResourceRequest.Builder> tagResourceRequest) An API operation for adding one or more tags (key-value pairs) to a resource.
You can use the
TagResourceoperation with a resource that already has tags. If you specify a new tag key for the resource, this tag is appended to the list of tags associated with the resource. If you specify a tag key that is already associated with the resource, the new tag value you specify replaces the previous value for that tag.Although the maximum number of array members is 200, user-tag maximum is 50. The remaining are reserved for Amazon Web Services use.
This is a convenience which creates an instance of the
TagResourceRequest.Builderavoiding the need to create one manually viaTagResourceRequest.builder()- Parameters:
tagResourceRequest- AConsumerthat will call methods onTagResourceRequest.Builderto 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 invokeThrowable.getCause()to retrieve the underlying exception.- ResourceNotFoundException The specified ARN in the request doesn't exist.
- TooManyTagsException Can occur if you specify a number of tags for a resource greater than the maximum 50 user tags per resource.
- LimitExceededException You made too many calls in a short period of time. Try again later.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
untagResource
default CompletableFuture<UntagResourceResponse> untagResource(UntagResourceRequest untagResourceRequest) Removes one or more tags from a resource. Specify only tag keys in your request. Don't specify the value.
- 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 invokeThrowable.getCause()to retrieve the underlying exception.- ResourceNotFoundException The specified ARN in the request doesn't exist.
- LimitExceededException You made too many calls in a short period of time. Try again later.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
untagResource
default CompletableFuture<UntagResourceResponse> untagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest) Removes one or more tags from a resource. Specify only tag keys in your request. Don't specify the value.
This is a convenience which creates an instance of the
UntagResourceRequest.Builderavoiding the need to create one manually viaUntagResourceRequest.builder()- Parameters:
untagResourceRequest- AConsumerthat will call methods onUntagResourceRequest.Builderto 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 invokeThrowable.getCause()to retrieve the underlying exception.- ResourceNotFoundException The specified ARN in the request doesn't exist.
- LimitExceededException You made too many calls in a short period of time. Try again later.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
updateAnomalyMonitor
default CompletableFuture<UpdateAnomalyMonitorResponse> updateAnomalyMonitor(UpdateAnomalyMonitorRequest updateAnomalyMonitorRequest) Updates an existing cost anomaly monitor. The changes made are applied going forward, and doesn't change anomalies detected in the past.
- Parameters:
updateAnomalyMonitorRequest-- Returns:
- A Java Future containing the result of the UpdateAnomalyMonitor 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- UnknownMonitorException The cost anomaly monitor does not exist for the account.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
updateAnomalyMonitor
default CompletableFuture<UpdateAnomalyMonitorResponse> updateAnomalyMonitor(Consumer<UpdateAnomalyMonitorRequest.Builder> updateAnomalyMonitorRequest) Updates an existing cost anomaly monitor. The changes made are applied going forward, and doesn't change anomalies detected in the past.
This is a convenience which creates an instance of the
UpdateAnomalyMonitorRequest.Builderavoiding the need to create one manually viaUpdateAnomalyMonitorRequest.builder()- Parameters:
updateAnomalyMonitorRequest- AConsumerthat will call methods onUpdateAnomalyMonitorRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the UpdateAnomalyMonitor 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- UnknownMonitorException The cost anomaly monitor does not exist for the account.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
updateAnomalySubscription
default CompletableFuture<UpdateAnomalySubscriptionResponse> updateAnomalySubscription(UpdateAnomalySubscriptionRequest updateAnomalySubscriptionRequest) Updates an existing cost anomaly subscription. Specify the fields that you want to update. Omitted fields are unchanged.
The JSON below describes the generic construct for each type. See Request Parameters for possible values as they apply to
AnomalySubscription.- Parameters:
updateAnomalySubscriptionRequest-- Returns:
- A Java Future containing the result of the UpdateAnomalySubscription 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- UnknownMonitorException The cost anomaly monitor does not exist for the account.
- UnknownSubscriptionException The cost anomaly subscription does not exist for the account.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
updateAnomalySubscription
default CompletableFuture<UpdateAnomalySubscriptionResponse> updateAnomalySubscription(Consumer<UpdateAnomalySubscriptionRequest.Builder> updateAnomalySubscriptionRequest) Updates an existing cost anomaly subscription. Specify the fields that you want to update. Omitted fields are unchanged.
The JSON below describes the generic construct for each type. See Request Parameters for possible values as they apply to
AnomalySubscription.
This is a convenience which creates an instance of the
UpdateAnomalySubscriptionRequest.Builderavoiding the need to create one manually viaUpdateAnomalySubscriptionRequest.builder()- Parameters:
updateAnomalySubscriptionRequest- AConsumerthat will call methods onUpdateAnomalySubscriptionRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the UpdateAnomalySubscription 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- UnknownMonitorException The cost anomaly monitor does not exist for the account.
- UnknownSubscriptionException The cost anomaly subscription does not exist for the account.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
updateCostAllocationTagsStatus
default CompletableFuture<UpdateCostAllocationTagsStatusResponse> updateCostAllocationTagsStatus(UpdateCostAllocationTagsStatusRequest updateCostAllocationTagsStatusRequest) Updates status for cost allocation tags in bulk, with maximum batch size of 20. If the tag status that's updated is the same as the existing tag status, the request doesn't fail. Instead, it doesn't have any effect on the tag status (for example, activating the active tag).
- Parameters:
updateCostAllocationTagsStatusRequest-- Returns:
- A Java Future containing the result of the UpdateCostAllocationTagsStatus 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
updateCostAllocationTagsStatus
default CompletableFuture<UpdateCostAllocationTagsStatusResponse> updateCostAllocationTagsStatus(Consumer<UpdateCostAllocationTagsStatusRequest.Builder> updateCostAllocationTagsStatusRequest) Updates status for cost allocation tags in bulk, with maximum batch size of 20. If the tag status that's updated is the same as the existing tag status, the request doesn't fail. Instead, it doesn't have any effect on the tag status (for example, activating the active tag).
This is a convenience which creates an instance of the
UpdateCostAllocationTagsStatusRequest.Builderavoiding the need to create one manually viaUpdateCostAllocationTagsStatusRequest.builder()- Parameters:
updateCostAllocationTagsStatusRequest- AConsumerthat will call methods onUpdateCostAllocationTagsStatusRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the UpdateCostAllocationTagsStatus 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.- LimitExceededException You made too many calls in a short period of time. Try again later.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
updateCostCategoryDefinition
default CompletableFuture<UpdateCostCategoryDefinitionResponse> updateCostCategoryDefinition(UpdateCostCategoryDefinitionRequest updateCostCategoryDefinitionRequest) Updates an existing Cost Category. Changes made to the Cost Category rules will be used to categorize the current month’s expenses and future expenses. This won’t change categorization for the previous months.
- Parameters:
updateCostCategoryDefinitionRequest-- Returns:
- A Java Future containing the result of the UpdateCostCategoryDefinition 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.- ResourceNotFoundException The specified ARN in the request doesn't exist.
- ServiceQuotaExceededException You've reached the limit on the number of resources you can create, or exceeded the size of an individual resource.
- LimitExceededException You made too many calls in a short period of time. Try again later.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
updateCostCategoryDefinition
default CompletableFuture<UpdateCostCategoryDefinitionResponse> updateCostCategoryDefinition(Consumer<UpdateCostCategoryDefinitionRequest.Builder> updateCostCategoryDefinitionRequest) Updates an existing Cost Category. Changes made to the Cost Category rules will be used to categorize the current month’s expenses and future expenses. This won’t change categorization for the previous months.
This is a convenience which creates an instance of the
UpdateCostCategoryDefinitionRequest.Builderavoiding the need to create one manually viaUpdateCostCategoryDefinitionRequest.builder()- Parameters:
updateCostCategoryDefinitionRequest- AConsumerthat will call methods onUpdateCostCategoryDefinitionRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the UpdateCostCategoryDefinition 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.- ResourceNotFoundException The specified ARN in the request doesn't exist.
- ServiceQuotaExceededException You've reached the limit on the number of resources you can create, or exceeded the size of an individual resource.
- LimitExceededException You made too many calls in a short period of time. Try again later.
- 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.
- CostExplorerException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
serviceClientConfiguration
Description copied from interface:SdkClientThe SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration- Specified by:
serviceClientConfigurationin interfaceAwsClient- Specified by:
serviceClientConfigurationin interfaceSdkClient- Returns:
- SdkServiceClientConfiguration
-
create
Create aCostExplorerAsyncClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider. -
builder
Create a builder that can be used to configure and create aCostExplorerAsyncClient.
-