@Generated(value="software.amazon.awssdk:codegen") public interface CostAndUsageReportAsyncClient extends SdkClient
builder()
method.
The AWS Cost and Usage Report API enables you to programmatically create, query, and delete AWS Cost and Usage report definitions.
AWS Cost and Usage reports track the monthly AWS costs and usage associated with your AWS account. The report contains line items for each unique combination of AWS product, usage type, and operation that your AWS account uses. You can configure the AWS Cost and Usage report to show only the data that you want, using the AWS Cost and Usage API.
Service Endpoint
The AWS Cost and Usage Report API provides the following endpoint:
cur.us-east-1.amazonaws.com
Modifier and Type | Field and Description |
---|---|
static String |
SERVICE_METADATA_ID
Value for looking up the service's metadata from the
ServiceMetadataProvider . |
static String |
SERVICE_NAME |
serviceName
close
static final String SERVICE_NAME
static final String SERVICE_METADATA_ID
ServiceMetadataProvider
.static CostAndUsageReportAsyncClient create()
CostAndUsageReportAsyncClient
with the region loaded from the
DefaultAwsRegionProviderChain
and credentials loaded from the
DefaultCredentialsProvider
.static CostAndUsageReportAsyncClientBuilder builder()
CostAndUsageReportAsyncClient
.default CompletableFuture<DeleteReportDefinitionResponse> deleteReportDefinition(DeleteReportDefinitionRequest deleteReportDefinitionRequest)
Deletes the specified report.
deleteReportDefinitionRequest
- Deletes the specified report.default CompletableFuture<DeleteReportDefinitionResponse> deleteReportDefinition(Consumer<DeleteReportDefinitionRequest.Builder> deleteReportDefinitionRequest)
Deletes the specified report.
This is a convenience which creates an instance of the DeleteReportDefinitionRequest.Builder
avoiding the
need to create one manually via DeleteReportDefinitionRequest.builder()
deleteReportDefinitionRequest
- A Consumer
that will call methods on DeleteReportDefinitionRequest.Builder
to create a
request. Deletes the specified report.default CompletableFuture<DescribeReportDefinitionsResponse> describeReportDefinitions(DescribeReportDefinitionsRequest describeReportDefinitionsRequest)
Lists the AWS Cost and Usage reports available to this account.
describeReportDefinitionsRequest
- Requests a list of AWS Cost and Usage reports owned by the account.default CompletableFuture<DescribeReportDefinitionsResponse> describeReportDefinitions(Consumer<DescribeReportDefinitionsRequest.Builder> describeReportDefinitionsRequest)
Lists the AWS Cost and Usage reports available to this account.
This is a convenience which creates an instance of the DescribeReportDefinitionsRequest.Builder
avoiding
the need to create one manually via DescribeReportDefinitionsRequest.builder()
describeReportDefinitionsRequest
- A Consumer
that will call methods on DescribeReportDefinitionsRequest.Builder
to create a
request. Requests a list of AWS Cost and Usage reports owned by the account.default CompletableFuture<DescribeReportDefinitionsResponse> describeReportDefinitions()
Lists the AWS Cost and Usage reports available to this account.
default DescribeReportDefinitionsPublisher describeReportDefinitionsPaginator()
Lists the AWS Cost and Usage reports available to this account.
This is a variant of
describeReportDefinitions(software.amazon.awssdk.services.costandusagereport.model.DescribeReportDefinitionsRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
SDK will internally handle making service calls for you.
When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
failures only after you start streaming the data. The subscribe method should be called as a request to start
streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe
method will result in a new Subscription
i.e., a new contract to stream data from the
starting request.
The following are few ways to use the response class:
1) Using the subscribe helper method
software.amazon.awssdk.services.costandusagereport.paginators.DescribeReportDefinitionsPublisher publisher = client.describeReportDefinitionsPaginator(request);
CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
software.amazon.awssdk.services.costandusagereport.paginators.DescribeReportDefinitionsPublisher publisher = client.describeReportDefinitionsPaginator(request);
publisher.subscribe(new Subscriber<software.amazon.awssdk.services.costandusagereport.model.DescribeReportDefinitionsResponse>() {
public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.costandusagereport.model.DescribeReportDefinitionsResponse response) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
describeReportDefinitions(software.amazon.awssdk.services.costandusagereport.model.DescribeReportDefinitionsRequest)
operation.
default DescribeReportDefinitionsPublisher describeReportDefinitionsPaginator(DescribeReportDefinitionsRequest describeReportDefinitionsRequest)
Lists the AWS Cost and Usage reports available to this account.
This is a variant of
describeReportDefinitions(software.amazon.awssdk.services.costandusagereport.model.DescribeReportDefinitionsRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
SDK will internally handle making service calls for you.
When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
failures only after you start streaming the data. The subscribe method should be called as a request to start
streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe
method will result in a new Subscription
i.e., a new contract to stream data from the
starting request.
The following are few ways to use the response class:
1) Using the subscribe helper method
software.amazon.awssdk.services.costandusagereport.paginators.DescribeReportDefinitionsPublisher publisher = client.describeReportDefinitionsPaginator(request);
CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
software.amazon.awssdk.services.costandusagereport.paginators.DescribeReportDefinitionsPublisher publisher = client.describeReportDefinitionsPaginator(request);
publisher.subscribe(new Subscriber<software.amazon.awssdk.services.costandusagereport.model.DescribeReportDefinitionsResponse>() {
public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.costandusagereport.model.DescribeReportDefinitionsResponse response) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
describeReportDefinitions(software.amazon.awssdk.services.costandusagereport.model.DescribeReportDefinitionsRequest)
operation.
describeReportDefinitionsRequest
- Requests a list of AWS Cost and Usage reports owned by the account.default DescribeReportDefinitionsPublisher describeReportDefinitionsPaginator(Consumer<DescribeReportDefinitionsRequest.Builder> describeReportDefinitionsRequest)
Lists the AWS Cost and Usage reports available to this account.
This is a variant of
describeReportDefinitions(software.amazon.awssdk.services.costandusagereport.model.DescribeReportDefinitionsRequest)
operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
SDK will internally handle making service calls for you.
When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
failures only after you start streaming the data. The subscribe method should be called as a request to start
streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber)
. Each call to the subscribe
method will result in a new Subscription
i.e., a new contract to stream data from the
starting request.
The following are few ways to use the response class:
1) Using the subscribe helper method
software.amazon.awssdk.services.costandusagereport.paginators.DescribeReportDefinitionsPublisher publisher = client.describeReportDefinitionsPaginator(request);
CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
software.amazon.awssdk.services.costandusagereport.paginators.DescribeReportDefinitionsPublisher publisher = client.describeReportDefinitionsPaginator(request);
publisher.subscribe(new Subscriber<software.amazon.awssdk.services.costandusagereport.model.DescribeReportDefinitionsResponse>() {
public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.costandusagereport.model.DescribeReportDefinitionsResponse response) { //... };
});
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
describeReportDefinitions(software.amazon.awssdk.services.costandusagereport.model.DescribeReportDefinitionsRequest)
operation.
This is a convenience which creates an instance of the DescribeReportDefinitionsRequest.Builder
avoiding
the need to create one manually via DescribeReportDefinitionsRequest.builder()
describeReportDefinitionsRequest
- A Consumer
that will call methods on DescribeReportDefinitionsRequest.Builder
to create a
request. Requests a list of AWS Cost and Usage reports owned by the account.default CompletableFuture<ModifyReportDefinitionResponse> modifyReportDefinition(ModifyReportDefinitionRequest modifyReportDefinitionRequest)
Allows you to programatically update your report preferences.
modifyReportDefinitionRequest
- default CompletableFuture<ModifyReportDefinitionResponse> modifyReportDefinition(Consumer<ModifyReportDefinitionRequest.Builder> modifyReportDefinitionRequest)
Allows you to programatically update your report preferences.
This is a convenience which creates an instance of the ModifyReportDefinitionRequest.Builder
avoiding the
need to create one manually via ModifyReportDefinitionRequest.builder()
modifyReportDefinitionRequest
- A Consumer
that will call methods on ModifyReportDefinitionRequest.Builder
to create a
request.default CompletableFuture<PutReportDefinitionResponse> putReportDefinition(PutReportDefinitionRequest putReportDefinitionRequest)
Creates a new report using the description that you provide.
putReportDefinitionRequest
- Creates a Cost and Usage Report.default CompletableFuture<PutReportDefinitionResponse> putReportDefinition(Consumer<PutReportDefinitionRequest.Builder> putReportDefinitionRequest)
Creates a new report using the description that you provide.
This is a convenience which creates an instance of the PutReportDefinitionRequest.Builder
avoiding the
need to create one manually via PutReportDefinitionRequest.builder()
putReportDefinitionRequest
- A Consumer
that will call methods on PutReportDefinitionRequest.Builder
to create a
request. Creates a Cost and Usage Report.