Interface BillingClient
-
- All Superinterfaces:
AutoCloseable,AwsClient,SdkAutoCloseable,SdkClient
@Generated("software.amazon.awssdk:codegen") @ThreadSafe public interface BillingClient extends AwsClient
Service client for accessing AWS Billing. This can be created using the staticbuilder()method.You can use the Billing API to programatically list the billing views available to you for a given time period. A billing view represents a set of billing data.
The Billing API provides the following endpoint:
https://billing.us-east-1.api.aws
-
-
Field Summary
Fields Modifier and Type Field Description static StringSERVICE_METADATA_IDValue for looking up the service's metadata from theServiceMetadataProvider.static StringSERVICE_NAME
-
Method Summary
All Methods Static Methods Instance Methods Default Methods Modifier and Type Method Description static BillingClientBuilderbuilder()Create a builder that can be used to configure and create aBillingClient.static BillingClientcreate()Create aBillingClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.default CreateBillingViewResponsecreateBillingView(Consumer<CreateBillingViewRequest.Builder> createBillingViewRequest)Creates a billing view with the specified billing view attributes.default CreateBillingViewResponsecreateBillingView(CreateBillingViewRequest createBillingViewRequest)Creates a billing view with the specified billing view attributes.default DeleteBillingViewResponsedeleteBillingView(Consumer<DeleteBillingViewRequest.Builder> deleteBillingViewRequest)Deletes the specified billing view.default DeleteBillingViewResponsedeleteBillingView(DeleteBillingViewRequest deleteBillingViewRequest)Deletes the specified billing view.default GetBillingViewResponsegetBillingView(Consumer<GetBillingViewRequest.Builder> getBillingViewRequest)Returns the metadata associated to the specified billing view ARN.default GetBillingViewResponsegetBillingView(GetBillingViewRequest getBillingViewRequest)Returns the metadata associated to the specified billing view ARN.default GetResourcePolicyResponsegetResourcePolicy(Consumer<GetResourcePolicyRequest.Builder> getResourcePolicyRequest)Returns the resource-based policy document attached to the resource inJSONformat.default GetResourcePolicyResponsegetResourcePolicy(GetResourcePolicyRequest getResourcePolicyRequest)Returns the resource-based policy document attached to the resource inJSONformat.default ListBillingViewsResponselistBillingViews(Consumer<ListBillingViewsRequest.Builder> listBillingViewsRequest)Lists the billing views available for a given time period.default ListBillingViewsResponselistBillingViews(ListBillingViewsRequest listBillingViewsRequest)Lists the billing views available for a given time period.default ListBillingViewsIterablelistBillingViewsPaginator(Consumer<ListBillingViewsRequest.Builder> listBillingViewsRequest)This is a variant oflistBillingViews(software.amazon.awssdk.services.billing.model.ListBillingViewsRequest)operation.default ListBillingViewsIterablelistBillingViewsPaginator(ListBillingViewsRequest listBillingViewsRequest)This is a variant oflistBillingViews(software.amazon.awssdk.services.billing.model.ListBillingViewsRequest)operation.default ListSourceViewsForBillingViewResponselistSourceViewsForBillingView(Consumer<ListSourceViewsForBillingViewRequest.Builder> listSourceViewsForBillingViewRequest)Lists the source views (managed Amazon Web Services billing views) associated with the billing view.default ListSourceViewsForBillingViewResponselistSourceViewsForBillingView(ListSourceViewsForBillingViewRequest listSourceViewsForBillingViewRequest)Lists the source views (managed Amazon Web Services billing views) associated with the billing view.default ListSourceViewsForBillingViewIterablelistSourceViewsForBillingViewPaginator(Consumer<ListSourceViewsForBillingViewRequest.Builder> listSourceViewsForBillingViewRequest)This is a variant oflistSourceViewsForBillingView(software.amazon.awssdk.services.billing.model.ListSourceViewsForBillingViewRequest)operation.default ListSourceViewsForBillingViewIterablelistSourceViewsForBillingViewPaginator(ListSourceViewsForBillingViewRequest listSourceViewsForBillingViewRequest)This is a variant oflistSourceViewsForBillingView(software.amazon.awssdk.services.billing.model.ListSourceViewsForBillingViewRequest)operation.default ListTagsForResourceResponselistTagsForResource(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest)Lists tags associated with the billing view resource.default ListTagsForResourceResponselistTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest)Lists tags associated with the billing view resource.default BillingServiceClientConfigurationserviceClientConfiguration()static ServiceMetadataserviceMetadata()default TagResourceResponsetagResource(Consumer<TagResourceRequest.Builder> tagResourceRequest)An API operation for adding one or more tags (key-value pairs) to a resource.default TagResourceResponsetagResource(TagResourceRequest tagResourceRequest)An API operation for adding one or more tags (key-value pairs) to a resource.default UntagResourceResponseuntagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest)Removes one or more tags from a resource.default UntagResourceResponseuntagResource(UntagResourceRequest untagResourceRequest)Removes one or more tags from a resource.default UpdateBillingViewResponseupdateBillingView(Consumer<UpdateBillingViewRequest.Builder> updateBillingViewRequest)An API to update the attributes of the billing view.default UpdateBillingViewResponseupdateBillingView(UpdateBillingViewRequest updateBillingViewRequest)An API to update the attributes of the billing view.-
Methods inherited from interface software.amazon.awssdk.utils.SdkAutoCloseable
close
-
Methods inherited from interface software.amazon.awssdk.core.SdkClient
serviceName
-
-
-
-
Field Detail
-
SERVICE_NAME
static final String SERVICE_NAME
- See Also:
- Constant Field Values
-
SERVICE_METADATA_ID
static final String SERVICE_METADATA_ID
Value for looking up the service's metadata from theServiceMetadataProvider.- See Also:
- Constant Field Values
-
-
Method Detail
-
createBillingView
default CreateBillingViewResponse createBillingView(CreateBillingViewRequest createBillingViewRequest) throws ServiceQuotaExceededException, ThrottlingException, AccessDeniedException, ConflictException, ValidationException, InternalServerException, AwsServiceException, SdkClientException, BillingException
Creates a billing view with the specified billing view attributes.
- Parameters:
createBillingViewRequest-- Returns:
- Result of the CreateBillingView operation returned by the service.
- Throws:
ServiceQuotaExceededException- You've reached the limit of resources you can create, or exceeded the size of an individual resource.ThrottlingException- The request was denied due to request throttling.AccessDeniedException- You don't have sufficient access to perform this action.ConflictException- The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request.ValidationException- The input fails to satisfy the constraints specified by an Amazon Web Services service.InternalServerException- The request processing failed because of an unknown error, exception, or 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.BillingException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
createBillingView
default CreateBillingViewResponse createBillingView(Consumer<CreateBillingViewRequest.Builder> createBillingViewRequest) throws ServiceQuotaExceededException, ThrottlingException, AccessDeniedException, ConflictException, ValidationException, InternalServerException, AwsServiceException, SdkClientException, BillingException
Creates a billing view with the specified billing view attributes.
This is a convenience which creates an instance of the
CreateBillingViewRequest.Builderavoiding the need to create one manually viaCreateBillingViewRequest.builder()- Parameters:
createBillingViewRequest- AConsumerthat will call methods onCreateBillingViewRequest.Builderto create a request.- Returns:
- Result of the CreateBillingView operation returned by the service.
- Throws:
ServiceQuotaExceededException- You've reached the limit of resources you can create, or exceeded the size of an individual resource.ThrottlingException- The request was denied due to request throttling.AccessDeniedException- You don't have sufficient access to perform this action.ConflictException- The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request.ValidationException- The input fails to satisfy the constraints specified by an Amazon Web Services service.InternalServerException- The request processing failed because of an unknown error, exception, or 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.BillingException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
deleteBillingView
default DeleteBillingViewResponse deleteBillingView(DeleteBillingViewRequest deleteBillingViewRequest) throws ThrottlingException, AccessDeniedException, ConflictException, ValidationException, InternalServerException, AwsServiceException, SdkClientException, BillingException
Deletes the specified billing view.
- Parameters:
deleteBillingViewRequest-- Returns:
- Result of the DeleteBillingView operation returned by the service.
- Throws:
ThrottlingException- The request was denied due to request throttling.AccessDeniedException- You don't have sufficient access to perform this action.ConflictException- The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request.ValidationException- The input fails to satisfy the constraints specified by an Amazon Web Services service.InternalServerException- The request processing failed because of an unknown error, exception, or 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.BillingException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
deleteBillingView
default DeleteBillingViewResponse deleteBillingView(Consumer<DeleteBillingViewRequest.Builder> deleteBillingViewRequest) throws ThrottlingException, AccessDeniedException, ConflictException, ValidationException, InternalServerException, AwsServiceException, SdkClientException, BillingException
Deletes the specified billing view.
This is a convenience which creates an instance of the
DeleteBillingViewRequest.Builderavoiding the need to create one manually viaDeleteBillingViewRequest.builder()- Parameters:
deleteBillingViewRequest- AConsumerthat will call methods onDeleteBillingViewRequest.Builderto create a request.- Returns:
- Result of the DeleteBillingView operation returned by the service.
- Throws:
ThrottlingException- The request was denied due to request throttling.AccessDeniedException- You don't have sufficient access to perform this action.ConflictException- The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request.ValidationException- The input fails to satisfy the constraints specified by an Amazon Web Services service.InternalServerException- The request processing failed because of an unknown error, exception, or 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.BillingException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
getBillingView
default GetBillingViewResponse getBillingView(GetBillingViewRequest getBillingViewRequest) throws ThrottlingException, ResourceNotFoundException, AccessDeniedException, ValidationException, InternalServerException, AwsServiceException, SdkClientException, BillingException
Returns the metadata associated to the specified billing view ARN.
- Parameters:
getBillingViewRequest-- Returns:
- Result of the GetBillingView operation returned by the service.
- Throws:
ThrottlingException- The request was denied due to request throttling.ResourceNotFoundException- The specified ARN in the request doesn't exist.AccessDeniedException- You don't have sufficient access to perform this action.ValidationException- The input fails to satisfy the constraints specified by an Amazon Web Services service.InternalServerException- The request processing failed because of an unknown error, exception, or 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.BillingException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
getBillingView
default GetBillingViewResponse getBillingView(Consumer<GetBillingViewRequest.Builder> getBillingViewRequest) throws ThrottlingException, ResourceNotFoundException, AccessDeniedException, ValidationException, InternalServerException, AwsServiceException, SdkClientException, BillingException
Returns the metadata associated to the specified billing view ARN.
This is a convenience which creates an instance of the
GetBillingViewRequest.Builderavoiding the need to create one manually viaGetBillingViewRequest.builder()- Parameters:
getBillingViewRequest- AConsumerthat will call methods onGetBillingViewRequest.Builderto create a request.- Returns:
- Result of the GetBillingView operation returned by the service.
- Throws:
ThrottlingException- The request was denied due to request throttling.ResourceNotFoundException- The specified ARN in the request doesn't exist.AccessDeniedException- You don't have sufficient access to perform this action.ValidationException- The input fails to satisfy the constraints specified by an Amazon Web Services service.InternalServerException- The request processing failed because of an unknown error, exception, or 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.BillingException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
getResourcePolicy
default GetResourcePolicyResponse getResourcePolicy(GetResourcePolicyRequest getResourcePolicyRequest) throws ThrottlingException, ResourceNotFoundException, AccessDeniedException, ValidationException, InternalServerException, AwsServiceException, SdkClientException, BillingException
Returns the resource-based policy document attached to the resource in
JSONformat.- Parameters:
getResourcePolicyRequest-- Returns:
- Result of the GetResourcePolicy operation returned by the service.
- Throws:
ThrottlingException- The request was denied due to request throttling.ResourceNotFoundException- The specified ARN in the request doesn't exist.AccessDeniedException- You don't have sufficient access to perform this action.ValidationException- The input fails to satisfy the constraints specified by an Amazon Web Services service.InternalServerException- The request processing failed because of an unknown error, exception, or 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.BillingException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
getResourcePolicy
default GetResourcePolicyResponse getResourcePolicy(Consumer<GetResourcePolicyRequest.Builder> getResourcePolicyRequest) throws ThrottlingException, ResourceNotFoundException, AccessDeniedException, ValidationException, InternalServerException, AwsServiceException, SdkClientException, BillingException
Returns the resource-based policy document attached to the resource in
JSONformat.
This is a convenience which creates an instance of the
GetResourcePolicyRequest.Builderavoiding the need to create one manually viaGetResourcePolicyRequest.builder()- Parameters:
getResourcePolicyRequest- AConsumerthat will call methods onGetResourcePolicyRequest.Builderto create a request.- Returns:
- Result of the GetResourcePolicy operation returned by the service.
- Throws:
ThrottlingException- The request was denied due to request throttling.ResourceNotFoundException- The specified ARN in the request doesn't exist.AccessDeniedException- You don't have sufficient access to perform this action.ValidationException- The input fails to satisfy the constraints specified by an Amazon Web Services service.InternalServerException- The request processing failed because of an unknown error, exception, or 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.BillingException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
listBillingViews
default ListBillingViewsResponse listBillingViews(ListBillingViewsRequest listBillingViewsRequest) throws ThrottlingException, AccessDeniedException, ValidationException, InternalServerException, AwsServiceException, SdkClientException, BillingException
Lists the billing views available for a given time period.
Every Amazon Web Services account has a unique
PRIMARYbilling view that represents the billing data available by default. Accounts that use Billing Conductor also haveBILLING_GROUPbilling views representing pro forma costs associated with each created billing group.- Parameters:
listBillingViewsRequest-- Returns:
- Result of the ListBillingViews operation returned by the service.
- Throws:
ThrottlingException- The request was denied due to request throttling.AccessDeniedException- You don't have sufficient access to perform this action.ValidationException- The input fails to satisfy the constraints specified by an Amazon Web Services service.InternalServerException- The request processing failed because of an unknown error, exception, or 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.BillingException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
listBillingViews
default ListBillingViewsResponse listBillingViews(Consumer<ListBillingViewsRequest.Builder> listBillingViewsRequest) throws ThrottlingException, AccessDeniedException, ValidationException, InternalServerException, AwsServiceException, SdkClientException, BillingException
Lists the billing views available for a given time period.
Every Amazon Web Services account has a unique
PRIMARYbilling view that represents the billing data available by default. Accounts that use Billing Conductor also haveBILLING_GROUPbilling views representing pro forma costs associated with each created billing group.
This is a convenience which creates an instance of the
ListBillingViewsRequest.Builderavoiding the need to create one manually viaListBillingViewsRequest.builder()- Parameters:
listBillingViewsRequest- AConsumerthat will call methods onListBillingViewsRequest.Builderto create a request.- Returns:
- Result of the ListBillingViews operation returned by the service.
- Throws:
ThrottlingException- The request was denied due to request throttling.AccessDeniedException- You don't have sufficient access to perform this action.ValidationException- The input fails to satisfy the constraints specified by an Amazon Web Services service.InternalServerException- The request processing failed because of an unknown error, exception, or 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.BillingException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
listBillingViewsPaginator
default ListBillingViewsIterable listBillingViewsPaginator(ListBillingViewsRequest listBillingViewsRequest) throws ThrottlingException, AccessDeniedException, ValidationException, InternalServerException, AwsServiceException, SdkClientException, BillingException
This is a variant of
listBillingViews(software.amazon.awssdk.services.billing.model.ListBillingViewsRequest)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
2) Using For loopsoftware.amazon.awssdk.services.billing.paginators.ListBillingViewsIterable responses = client.listBillingViewsPaginator(request); responses.stream().forEach(....);{ @code software.amazon.awssdk.services.billing.paginators.ListBillingViewsIterable responses = client .listBillingViewsPaginator(request); for (software.amazon.awssdk.services.billing.model.ListBillingViewsResponse response : responses) { // do something; } }3) Use iterator directlysoftware.amazon.awssdk.services.billing.paginators.ListBillingViewsIterable responses = client.listBillingViewsPaginator(request); responses.iterator().forEachRemaining(....);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
listBillingViews(software.amazon.awssdk.services.billing.model.ListBillingViewsRequest)operation.- Parameters:
listBillingViewsRequest-- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- Throws:
ThrottlingException- The request was denied due to request throttling.AccessDeniedException- You don't have sufficient access to perform this action.ValidationException- The input fails to satisfy the constraints specified by an Amazon Web Services service.InternalServerException- The request processing failed because of an unknown error, exception, or 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.BillingException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
listBillingViewsPaginator
default ListBillingViewsIterable listBillingViewsPaginator(Consumer<ListBillingViewsRequest.Builder> listBillingViewsRequest) throws ThrottlingException, AccessDeniedException, ValidationException, InternalServerException, AwsServiceException, SdkClientException, BillingException
This is a variant of
listBillingViews(software.amazon.awssdk.services.billing.model.ListBillingViewsRequest)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
2) Using For loopsoftware.amazon.awssdk.services.billing.paginators.ListBillingViewsIterable responses = client.listBillingViewsPaginator(request); responses.stream().forEach(....);{ @code software.amazon.awssdk.services.billing.paginators.ListBillingViewsIterable responses = client .listBillingViewsPaginator(request); for (software.amazon.awssdk.services.billing.model.ListBillingViewsResponse response : responses) { // do something; } }3) Use iterator directlysoftware.amazon.awssdk.services.billing.paginators.ListBillingViewsIterable responses = client.listBillingViewsPaginator(request); responses.iterator().forEachRemaining(....);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
listBillingViews(software.amazon.awssdk.services.billing.model.ListBillingViewsRequest)operation.
This is a convenience which creates an instance of the
ListBillingViewsRequest.Builderavoiding the need to create one manually viaListBillingViewsRequest.builder()- Parameters:
listBillingViewsRequest- AConsumerthat will call methods onListBillingViewsRequest.Builderto create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- Throws:
ThrottlingException- The request was denied due to request throttling.AccessDeniedException- You don't have sufficient access to perform this action.ValidationException- The input fails to satisfy the constraints specified by an Amazon Web Services service.InternalServerException- The request processing failed because of an unknown error, exception, or 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.BillingException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
listSourceViewsForBillingView
default ListSourceViewsForBillingViewResponse listSourceViewsForBillingView(ListSourceViewsForBillingViewRequest listSourceViewsForBillingViewRequest) throws ThrottlingException, ResourceNotFoundException, AccessDeniedException, ValidationException, InternalServerException, AwsServiceException, SdkClientException, BillingException
Lists the source views (managed Amazon Web Services billing views) associated with the billing view.
- Parameters:
listSourceViewsForBillingViewRequest-- Returns:
- Result of the ListSourceViewsForBillingView operation returned by the service.
- Throws:
ThrottlingException- The request was denied due to request throttling.ResourceNotFoundException- The specified ARN in the request doesn't exist.AccessDeniedException- You don't have sufficient access to perform this action.ValidationException- The input fails to satisfy the constraints specified by an Amazon Web Services service.InternalServerException- The request processing failed because of an unknown error, exception, or 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.BillingException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
listSourceViewsForBillingView
default ListSourceViewsForBillingViewResponse listSourceViewsForBillingView(Consumer<ListSourceViewsForBillingViewRequest.Builder> listSourceViewsForBillingViewRequest) throws ThrottlingException, ResourceNotFoundException, AccessDeniedException, ValidationException, InternalServerException, AwsServiceException, SdkClientException, BillingException
Lists the source views (managed Amazon Web Services billing views) associated with the billing view.
This is a convenience which creates an instance of the
ListSourceViewsForBillingViewRequest.Builderavoiding the need to create one manually viaListSourceViewsForBillingViewRequest.builder()- Parameters:
listSourceViewsForBillingViewRequest- AConsumerthat will call methods onListSourceViewsForBillingViewRequest.Builderto create a request.- Returns:
- Result of the ListSourceViewsForBillingView operation returned by the service.
- Throws:
ThrottlingException- The request was denied due to request throttling.ResourceNotFoundException- The specified ARN in the request doesn't exist.AccessDeniedException- You don't have sufficient access to perform this action.ValidationException- The input fails to satisfy the constraints specified by an Amazon Web Services service.InternalServerException- The request processing failed because of an unknown error, exception, or 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.BillingException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
listSourceViewsForBillingViewPaginator
default ListSourceViewsForBillingViewIterable listSourceViewsForBillingViewPaginator(ListSourceViewsForBillingViewRequest listSourceViewsForBillingViewRequest) throws ThrottlingException, ResourceNotFoundException, AccessDeniedException, ValidationException, InternalServerException, AwsServiceException, SdkClientException, BillingException
This is a variant of
listSourceViewsForBillingView(software.amazon.awssdk.services.billing.model.ListSourceViewsForBillingViewRequest)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
2) Using For loopsoftware.amazon.awssdk.services.billing.paginators.ListSourceViewsForBillingViewIterable responses = client.listSourceViewsForBillingViewPaginator(request); responses.stream().forEach(....);{ @code software.amazon.awssdk.services.billing.paginators.ListSourceViewsForBillingViewIterable responses = client .listSourceViewsForBillingViewPaginator(request); for (software.amazon.awssdk.services.billing.model.ListSourceViewsForBillingViewResponse response : responses) { // do something; } }3) Use iterator directlysoftware.amazon.awssdk.services.billing.paginators.ListSourceViewsForBillingViewIterable responses = client.listSourceViewsForBillingViewPaginator(request); responses.iterator().forEachRemaining(....);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
listSourceViewsForBillingView(software.amazon.awssdk.services.billing.model.ListSourceViewsForBillingViewRequest)operation.- Parameters:
listSourceViewsForBillingViewRequest-- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- Throws:
ThrottlingException- The request was denied due to request throttling.ResourceNotFoundException- The specified ARN in the request doesn't exist.AccessDeniedException- You don't have sufficient access to perform this action.ValidationException- The input fails to satisfy the constraints specified by an Amazon Web Services service.InternalServerException- The request processing failed because of an unknown error, exception, or 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.BillingException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
listSourceViewsForBillingViewPaginator
default ListSourceViewsForBillingViewIterable listSourceViewsForBillingViewPaginator(Consumer<ListSourceViewsForBillingViewRequest.Builder> listSourceViewsForBillingViewRequest) throws ThrottlingException, ResourceNotFoundException, AccessDeniedException, ValidationException, InternalServerException, AwsServiceException, SdkClientException, BillingException
This is a variant of
listSourceViewsForBillingView(software.amazon.awssdk.services.billing.model.ListSourceViewsForBillingViewRequest)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
2) Using For loopsoftware.amazon.awssdk.services.billing.paginators.ListSourceViewsForBillingViewIterable responses = client.listSourceViewsForBillingViewPaginator(request); responses.stream().forEach(....);{ @code software.amazon.awssdk.services.billing.paginators.ListSourceViewsForBillingViewIterable responses = client .listSourceViewsForBillingViewPaginator(request); for (software.amazon.awssdk.services.billing.model.ListSourceViewsForBillingViewResponse response : responses) { // do something; } }3) Use iterator directlysoftware.amazon.awssdk.services.billing.paginators.ListSourceViewsForBillingViewIterable responses = client.listSourceViewsForBillingViewPaginator(request); responses.iterator().forEachRemaining(....);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
listSourceViewsForBillingView(software.amazon.awssdk.services.billing.model.ListSourceViewsForBillingViewRequest)operation.
This is a convenience which creates an instance of the
ListSourceViewsForBillingViewRequest.Builderavoiding the need to create one manually viaListSourceViewsForBillingViewRequest.builder()- Parameters:
listSourceViewsForBillingViewRequest- AConsumerthat will call methods onListSourceViewsForBillingViewRequest.Builderto create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- Throws:
ThrottlingException- The request was denied due to request throttling.ResourceNotFoundException- The specified ARN in the request doesn't exist.AccessDeniedException- You don't have sufficient access to perform this action.ValidationException- The input fails to satisfy the constraints specified by an Amazon Web Services service.InternalServerException- The request processing failed because of an unknown error, exception, or 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.BillingException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
listTagsForResource
default ListTagsForResourceResponse listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) throws ThrottlingException, ResourceNotFoundException, AccessDeniedException, ValidationException, InternalServerException, AwsServiceException, SdkClientException, BillingException
Lists tags associated with the billing view resource.
- Parameters:
listTagsForResourceRequest-- Returns:
- Result of the ListTagsForResource operation returned by the service.
- Throws:
ThrottlingException- The request was denied due to request throttling.ResourceNotFoundException- The specified ARN in the request doesn't exist.AccessDeniedException- You don't have sufficient access to perform this action.ValidationException- The input fails to satisfy the constraints specified by an Amazon Web Services service.InternalServerException- The request processing failed because of an unknown error, exception, or 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.BillingException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
listTagsForResource
default ListTagsForResourceResponse listTagsForResource(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest) throws ThrottlingException, ResourceNotFoundException, AccessDeniedException, ValidationException, InternalServerException, AwsServiceException, SdkClientException, BillingException
Lists tags associated with the billing view resource.
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:
- Result of the ListTagsForResource operation returned by the service.
- Throws:
ThrottlingException- The request was denied due to request throttling.ResourceNotFoundException- The specified ARN in the request doesn't exist.AccessDeniedException- You don't have sufficient access to perform this action.ValidationException- The input fails to satisfy the constraints specified by an Amazon Web Services service.InternalServerException- The request processing failed because of an unknown error, exception, or 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.BillingException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
tagResource
default TagResourceResponse tagResource(TagResourceRequest tagResourceRequest) throws ThrottlingException, ResourceNotFoundException, AccessDeniedException, ValidationException, InternalServerException, AwsServiceException, SdkClientException, BillingException
An API operation for adding one or more tags (key-value pairs) to a resource.
- Parameters:
tagResourceRequest-- Returns:
- Result of the TagResource operation returned by the service.
- Throws:
ThrottlingException- The request was denied due to request throttling.ResourceNotFoundException- The specified ARN in the request doesn't exist.AccessDeniedException- You don't have sufficient access to perform this action.ValidationException- The input fails to satisfy the constraints specified by an Amazon Web Services service.InternalServerException- The request processing failed because of an unknown error, exception, or 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.BillingException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
tagResource
default TagResourceResponse tagResource(Consumer<TagResourceRequest.Builder> tagResourceRequest) throws ThrottlingException, ResourceNotFoundException, AccessDeniedException, ValidationException, InternalServerException, AwsServiceException, SdkClientException, BillingException
An API operation for adding one or more tags (key-value pairs) to a resource.
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:
- Result of the TagResource operation returned by the service.
- Throws:
ThrottlingException- The request was denied due to request throttling.ResourceNotFoundException- The specified ARN in the request doesn't exist.AccessDeniedException- You don't have sufficient access to perform this action.ValidationException- The input fails to satisfy the constraints specified by an Amazon Web Services service.InternalServerException- The request processing failed because of an unknown error, exception, or 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.BillingException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
untagResource
default UntagResourceResponse untagResource(UntagResourceRequest untagResourceRequest) throws ThrottlingException, ResourceNotFoundException, AccessDeniedException, ValidationException, InternalServerException, AwsServiceException, SdkClientException, BillingException
Removes one or more tags from a resource. Specify only tag keys in your request. Don't specify the value.
- Parameters:
untagResourceRequest-- Returns:
- Result of the UntagResource operation returned by the service.
- Throws:
ThrottlingException- The request was denied due to request throttling.ResourceNotFoundException- The specified ARN in the request doesn't exist.AccessDeniedException- You don't have sufficient access to perform this action.ValidationException- The input fails to satisfy the constraints specified by an Amazon Web Services service.InternalServerException- The request processing failed because of an unknown error, exception, or 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.BillingException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
untagResource
default UntagResourceResponse untagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest) throws ThrottlingException, ResourceNotFoundException, AccessDeniedException, ValidationException, InternalServerException, AwsServiceException, SdkClientException, BillingException
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:
- Result of the UntagResource operation returned by the service.
- Throws:
ThrottlingException- The request was denied due to request throttling.ResourceNotFoundException- The specified ARN in the request doesn't exist.AccessDeniedException- You don't have sufficient access to perform this action.ValidationException- The input fails to satisfy the constraints specified by an Amazon Web Services service.InternalServerException- The request processing failed because of an unknown error, exception, or 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.BillingException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
updateBillingView
default UpdateBillingViewResponse updateBillingView(UpdateBillingViewRequest updateBillingViewRequest) throws ServiceQuotaExceededException, ThrottlingException, ResourceNotFoundException, AccessDeniedException, ConflictException, ValidationException, InternalServerException, AwsServiceException, SdkClientException, BillingException
An API to update the attributes of the billing view.
- Parameters:
updateBillingViewRequest-- Returns:
- Result of the UpdateBillingView operation returned by the service.
- Throws:
ServiceQuotaExceededException- You've reached the limit of resources you can create, or exceeded the size of an individual resource.ThrottlingException- The request was denied due to request throttling.ResourceNotFoundException- The specified ARN in the request doesn't exist.AccessDeniedException- You don't have sufficient access to perform this action.ConflictException- The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request.ValidationException- The input fails to satisfy the constraints specified by an Amazon Web Services service.InternalServerException- The request processing failed because of an unknown error, exception, or 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.BillingException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
updateBillingView
default UpdateBillingViewResponse updateBillingView(Consumer<UpdateBillingViewRequest.Builder> updateBillingViewRequest) throws ServiceQuotaExceededException, ThrottlingException, ResourceNotFoundException, AccessDeniedException, ConflictException, ValidationException, InternalServerException, AwsServiceException, SdkClientException, BillingException
An API to update the attributes of the billing view.
This is a convenience which creates an instance of the
UpdateBillingViewRequest.Builderavoiding the need to create one manually viaUpdateBillingViewRequest.builder()- Parameters:
updateBillingViewRequest- AConsumerthat will call methods onUpdateBillingViewRequest.Builderto create a request.- Returns:
- Result of the UpdateBillingView operation returned by the service.
- Throws:
ServiceQuotaExceededException- You've reached the limit of resources you can create, or exceeded the size of an individual resource.ThrottlingException- The request was denied due to request throttling.ResourceNotFoundException- The specified ARN in the request doesn't exist.AccessDeniedException- You don't have sufficient access to perform this action.ConflictException- The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request.ValidationException- The input fails to satisfy the constraints specified by an Amazon Web Services service.InternalServerException- The request processing failed because of an unknown error, exception, or 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.BillingException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceException- See Also:
- AWS API Documentation
-
create
static BillingClient create()
Create aBillingClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.
-
builder
static BillingClientBuilder builder()
Create a builder that can be used to configure and create aBillingClient.
-
serviceMetadata
static ServiceMetadata serviceMetadata()
-
serviceClientConfiguration
default BillingServiceClientConfiguration serviceClientConfiguration()
- Specified by:
serviceClientConfigurationin interfaceAwsClient- Specified by:
serviceClientConfigurationin interfaceSdkClient
-
-