software.amazon.awssdk.services.costexplorer.CostExplorerAsyncClient Maven / Gradle / Ivy
Show all versions of cost-explorer Show documentation
/*
* Copyright 2013-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package software.amazon.awssdk.services.costexplorer;
import java.util.concurrent.CompletableFuture;
import java.util.function.Consumer;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.core.SdkClient;
import software.amazon.awssdk.services.costexplorer.model.GetCostAndUsageRequest;
import software.amazon.awssdk.services.costexplorer.model.GetCostAndUsageResponse;
import software.amazon.awssdk.services.costexplorer.model.GetDimensionValuesRequest;
import software.amazon.awssdk.services.costexplorer.model.GetDimensionValuesResponse;
import software.amazon.awssdk.services.costexplorer.model.GetReservationUtilizationRequest;
import software.amazon.awssdk.services.costexplorer.model.GetReservationUtilizationResponse;
import software.amazon.awssdk.services.costexplorer.model.GetTagsRequest;
import software.amazon.awssdk.services.costexplorer.model.GetTagsResponse;
/**
* Service client for accessing AWS Cost Explorer asynchronously. This can be created using the static
* {@link #builder()} method.
*
*
* The Cost Explorer API allows you 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, such as the number of
* daily write operations for DynamoDB database tables in your production environment.
*
*
* Service Endpoint
*
*
* The Cost Explorer API provides the following endpoint:
*
*
* -
*
* https://ce.us-east-1.amazonaws.com
*
*
*
*/
@Generated("software.amazon.awssdk:codegen")
public interface CostExplorerAsyncClient extends SdkClient {
String SERVICE_NAME = "ce";
/**
* Create a {@link CostExplorerAsyncClient} with the region loaded from the
* {@link software.amazon.awssdk.regions.providers.DefaultAwsRegionProviderChain} and credentials loaded from the
* {@link software.amazon.awssdk.auth.credentials.DefaultCredentialsProvider}.
*/
static CostExplorerAsyncClient create() {
return builder().build();
}
/**
* Create a builder that can be used to configure and create a {@link CostExplorerAsyncClient}.
*/
static CostExplorerAsyncClientBuilder builder() {
return new DefaultCostExplorerAsyncClientBuilder();
}
/**
*
* Retrieve cost and usage metrics for your account. You can specify which cost and usage-related metric, such as
* BlendedCosts
or UsageQuantity
, that you want the request to return. You can also filter
* and group your data by various dimensions, such as AWS Service
or AvailabilityZone
, in
* a specific time range. See the GetDimensionValues
action for a complete list of the valid
* dimensions. Master accounts in an organization have access to all member accounts.
*
*
* @param getCostAndUsageRequest
* @return 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.
*
* - 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.
*
* @sample CostExplorerAsyncClient.GetCostAndUsage
* @see AWS API
* Documentation
*/
default CompletableFuture getCostAndUsage(GetCostAndUsageRequest getCostAndUsageRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Retrieve cost and usage metrics for your account. You can specify which cost and usage-related metric, such as
* BlendedCosts
or UsageQuantity
, that you want the request to return. You can also filter
* and group your data by various dimensions, such as AWS Service
or AvailabilityZone
, in
* a specific time range. See the GetDimensionValues
action for a complete list of the valid
* dimensions. Master accounts in an organization have access to all member accounts.
*
*
*
* This is a convenience which creates an instance of the {@link GetCostAndUsageRequest.Builder} avoiding the need
* to create one manually via {@link GetCostAndUsageRequest#builder()}
*
*
* @param getCostAndUsageRequest
* A {@link Consumer} that will call methods on {@link GetCostAndUsageRequest.Builder} to create a request.
* @return 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.
*
* - 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.
*
* @sample CostExplorerAsyncClient.GetCostAndUsage
* @see AWS API
* Documentation
*/
default CompletableFuture getCostAndUsage(
Consumer getCostAndUsageRequest) {
return getCostAndUsage(GetCostAndUsageRequest.builder().applyMutation(getCostAndUsageRequest).build());
}
/**
*
* You can use GetDimensionValues
to retrieve all available filter values for a specific filter over a
* period of time. You can search the dimension values for an arbitrary string.
*
*
* @param getDimensionValuesRequest
* @return 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.
*
* - 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.
*
* @sample CostExplorerAsyncClient.GetDimensionValues
* @see AWS API
* Documentation
*/
default CompletableFuture getDimensionValues(GetDimensionValuesRequest getDimensionValuesRequest) {
throw new UnsupportedOperationException();
}
/**
*
* You can use GetDimensionValues
to retrieve all available filter values for a specific 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 {@link GetDimensionValuesRequest.Builder} avoiding the
* need to create one manually via {@link GetDimensionValuesRequest#builder()}
*
*
* @param getDimensionValuesRequest
* A {@link Consumer} that will call methods on {@link GetDimensionValuesRequest.Builder} to create a
* request.
* @return 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.
*
* - 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.
*
* @sample CostExplorerAsyncClient.GetDimensionValues
* @see AWS API
* Documentation
*/
default CompletableFuture getDimensionValues(
Consumer getDimensionValuesRequest) {
return getDimensionValues(GetDimensionValuesRequest.builder().applyMutation(getDimensionValuesRequest).build());
}
/**
*
* You can retrieve the Reservation utilization for your account. Master accounts in an organization have access to
* their associated member accounts. You can filter data by dimensions in a time period. You can use
* GetDimensionValues
to determine the possible dimension values. Currently, you can group only by
* SUBSCRIPTION_ID
.
*
*
* @param getReservationUtilizationRequest
* @return 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.
*
* - 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.
*
* @sample CostExplorerAsyncClient.GetReservationUtilization
* @see AWS
* API Documentation
*/
default CompletableFuture getReservationUtilization(
GetReservationUtilizationRequest getReservationUtilizationRequest) {
throw new UnsupportedOperationException();
}
/**
*
* You can retrieve the Reservation utilization for your account. Master accounts in an organization have access to
* their associated member accounts. You can filter data by dimensions in a time period. You can use
* GetDimensionValues
to determine the possible dimension values. Currently, you can group only by
* SUBSCRIPTION_ID
.
*
*
*
* This is a convenience which creates an instance of the {@link GetReservationUtilizationRequest.Builder} avoiding
* the need to create one manually via {@link GetReservationUtilizationRequest#builder()}
*
*
* @param getReservationUtilizationRequest
* A {@link Consumer} that will call methods on {@link GetReservationUtilizationRequest.Builder} to create a
* request.
* @return 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.
*
* - 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.
*
* @sample CostExplorerAsyncClient.GetReservationUtilization
* @see AWS
* API Documentation
*/
default CompletableFuture getReservationUtilization(
Consumer getReservationUtilizationRequest) {
return getReservationUtilization(GetReservationUtilizationRequest.builder()
.applyMutation(getReservationUtilizationRequest).build());
}
/**
*
* You can query for available tag keys and tag values for a specified period. You can search the tag values for an
* arbitrary string.
*
*
* @param getTagsRequest
* @return 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.
*
* - 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.
*
* @sample CostExplorerAsyncClient.GetTags
* @see AWS API
* Documentation
*/
default CompletableFuture getTags(GetTagsRequest getTagsRequest) {
throw new UnsupportedOperationException();
}
/**
*
* You can query 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 {@link GetTagsRequest.Builder} avoiding the need to create
* one manually via {@link GetTagsRequest#builder()}
*
*
* @param getTagsRequest
* A {@link Consumer} that will call methods on {@link GetTagsRequest.Builder} to create a request.
* @return 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.
*
* - 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.
*
* @sample CostExplorerAsyncClient.GetTags
* @see AWS API
* Documentation
*/
default CompletableFuture getTags(Consumer getTagsRequest) {
return getTags(GetTagsRequest.builder().applyMutation(getTagsRequest).build());
}
}