@Generated(value="software.amazon.awssdk:codegen") public interface CostAndUsageReportClient extends SdkClient
builder()
method.
All public APIs for AWS Cost and Usage Report serviceModifier and Type | Field and Description |
---|---|
static String |
SERVICE_NAME |
serviceName
close
static final String SERVICE_NAME
static CostAndUsageReportClient create()
CostAndUsageReportClient
with the region loaded from the
DefaultAwsRegionProviderChain
and credentials loaded from the
DefaultCredentialsProvider
.static CostAndUsageReportClientBuilder builder()
CostAndUsageReportClient
.default DeleteReportDefinitionResponse deleteReportDefinition(DeleteReportDefinitionRequest deleteReportDefinitionRequest) throws InternalErrorException, ValidationException, AwsServiceException, SdkClientException, CostAndUsageReportException
deleteReportDefinitionRequest
- Request of DeleteReportDefinitionInternalErrorException
- This exception is thrown on a known dependency failure.ValidationException
- This exception is thrown when providing an invalid input. eg. Put a report preference with an invalid
report name, or Delete a report preference with an empty report name.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.CostAndUsageReportException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException
default DeleteReportDefinitionResponse deleteReportDefinition(Consumer<DeleteReportDefinitionRequest.Builder> deleteReportDefinitionRequest) throws InternalErrorException, ValidationException, AwsServiceException, SdkClientException, CostAndUsageReportException
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. Request of DeleteReportDefinitionInternalErrorException
- This exception is thrown on a known dependency failure.ValidationException
- This exception is thrown when providing an invalid input. eg. Put a report preference with an invalid
report name, or Delete a report preference with an empty report name.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.CostAndUsageReportException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException
default DescribeReportDefinitionsResponse describeReportDefinitions() throws InternalErrorException, AwsServiceException, SdkClientException, CostAndUsageReportException
InternalErrorException
- This exception is thrown on a known dependency failure.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.CostAndUsageReportException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException
describeReportDefinitions(DescribeReportDefinitionsRequest)
,
AWS
API Documentationdefault DescribeReportDefinitionsResponse describeReportDefinitions(DescribeReportDefinitionsRequest describeReportDefinitionsRequest) throws InternalErrorException, AwsServiceException, SdkClientException, CostAndUsageReportException
describeReportDefinitionsRequest
- Request of DescribeReportDefinitionsInternalErrorException
- This exception is thrown on a known dependency failure.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.CostAndUsageReportException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException
default DescribeReportDefinitionsResponse describeReportDefinitions(Consumer<DescribeReportDefinitionsRequest.Builder> describeReportDefinitionsRequest) throws InternalErrorException, AwsServiceException, SdkClientException, CostAndUsageReportException
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. Request of DescribeReportDefinitionsInternalErrorException
- This exception is thrown on a known dependency failure.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.CostAndUsageReportException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException
default DescribeReportDefinitionsIterable describeReportDefinitionsPaginator() throws InternalErrorException, AwsServiceException, SdkClientException, CostAndUsageReportException
This is a variant of
describeReportDefinitions(software.amazon.awssdk.services.costandusagereport.model.DescribeReportDefinitionsRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will
internally handle making service calls for you.
When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
software.amazon.awssdk.services.costandusagereport.paginators.DescribeReportDefinitionsIterable responses = client.describeReportDefinitionsPaginator(request);
responses.stream().forEach(....);
2) Using For loop
{ @code software.amazon.awssdk.services.costandusagereport.paginators.DescribeReportDefinitionsIterable responses = client .describeReportDefinitionsPaginator(request); for (software.amazon.awssdk.services.costandusagereport.model.DescribeReportDefinitionsResponse response : responses) { // do something; } }3) Use iterator directly
software.amazon.awssdk.services.costandusagereport.paginators.DescribeReportDefinitionsIterable responses = client.describeReportDefinitionsPaginator(request);
responses.iterator().forEachRemaining(....);
Note: If you prefer to have control on service calls, use the
describeReportDefinitions(software.amazon.awssdk.services.costandusagereport.model.DescribeReportDefinitionsRequest)
operation.
InternalErrorException
- This exception is thrown on a known dependency failure.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.CostAndUsageReportException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException
describeReportDefinitionsPaginator(DescribeReportDefinitionsRequest)
,
AWS
API Documentationdefault DescribeReportDefinitionsIterable describeReportDefinitionsPaginator(DescribeReportDefinitionsRequest describeReportDefinitionsRequest) throws InternalErrorException, AwsServiceException, SdkClientException, CostAndUsageReportException
This is a variant of
describeReportDefinitions(software.amazon.awssdk.services.costandusagereport.model.DescribeReportDefinitionsRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will
internally handle making service calls for you.
When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
software.amazon.awssdk.services.costandusagereport.paginators.DescribeReportDefinitionsIterable responses = client.describeReportDefinitionsPaginator(request);
responses.stream().forEach(....);
2) Using For loop
{ @code software.amazon.awssdk.services.costandusagereport.paginators.DescribeReportDefinitionsIterable responses = client .describeReportDefinitionsPaginator(request); for (software.amazon.awssdk.services.costandusagereport.model.DescribeReportDefinitionsResponse response : responses) { // do something; } }3) Use iterator directly
software.amazon.awssdk.services.costandusagereport.paginators.DescribeReportDefinitionsIterable responses = client.describeReportDefinitionsPaginator(request);
responses.iterator().forEachRemaining(....);
Note: If you prefer to have control on service calls, use the
describeReportDefinitions(software.amazon.awssdk.services.costandusagereport.model.DescribeReportDefinitionsRequest)
operation.
describeReportDefinitionsRequest
- Request of DescribeReportDefinitionsInternalErrorException
- This exception is thrown on a known dependency failure.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.CostAndUsageReportException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException
default DescribeReportDefinitionsIterable describeReportDefinitionsPaginator(Consumer<DescribeReportDefinitionsRequest.Builder> describeReportDefinitionsRequest) throws InternalErrorException, AwsServiceException, SdkClientException, CostAndUsageReportException
This is a variant of
describeReportDefinitions(software.amazon.awssdk.services.costandusagereport.model.DescribeReportDefinitionsRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will
internally handle making service calls for you.
When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
software.amazon.awssdk.services.costandusagereport.paginators.DescribeReportDefinitionsIterable responses = client.describeReportDefinitionsPaginator(request);
responses.stream().forEach(....);
2) Using For loop
{ @code software.amazon.awssdk.services.costandusagereport.paginators.DescribeReportDefinitionsIterable responses = client .describeReportDefinitionsPaginator(request); for (software.amazon.awssdk.services.costandusagereport.model.DescribeReportDefinitionsResponse response : responses) { // do something; } }3) Use iterator directly
software.amazon.awssdk.services.costandusagereport.paginators.DescribeReportDefinitionsIterable responses = client.describeReportDefinitionsPaginator(request);
responses.iterator().forEachRemaining(....);
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. Request of DescribeReportDefinitionsInternalErrorException
- This exception is thrown on a known dependency failure.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.CostAndUsageReportException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException
default PutReportDefinitionResponse putReportDefinition(PutReportDefinitionRequest putReportDefinitionRequest) throws DuplicateReportNameException, ReportLimitReachedException, InternalErrorException, ValidationException, AwsServiceException, SdkClientException, CostAndUsageReportException
putReportDefinitionRequest
- Request of PutReportDefinitionDuplicateReportNameException
- This exception is thrown when putting a report preference with a name that already exists.ReportLimitReachedException
- This exception is thrown when the number of report preference reaches max limit. The max number is 5.InternalErrorException
- This exception is thrown on a known dependency failure.ValidationException
- This exception is thrown when providing an invalid input. eg. Put a report preference with an invalid
report name, or Delete a report preference with an empty report name.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.CostAndUsageReportException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException
default PutReportDefinitionResponse putReportDefinition(Consumer<PutReportDefinitionRequest.Builder> putReportDefinitionRequest) throws DuplicateReportNameException, ReportLimitReachedException, InternalErrorException, ValidationException, AwsServiceException, SdkClientException, CostAndUsageReportException
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. Request of PutReportDefinitionDuplicateReportNameException
- This exception is thrown when putting a report preference with a name that already exists.ReportLimitReachedException
- This exception is thrown when the number of report preference reaches max limit. The max number is 5.InternalErrorException
- This exception is thrown on a known dependency failure.ValidationException
- This exception is thrown when providing an invalid input. eg. Put a report preference with an invalid
report name, or Delete a report preference with an empty report name.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.CostAndUsageReportException
- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException
static ServiceMetadata serviceMetadata()
Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.