@ThreadSafe @Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class AWSCostAndUsageReportClient extends AmazonWebServiceClient implements AWSCostAndUsageReport
You can use the Amazon Web Services Cost and Usage Report API to programmatically create, query, and delete Amazon Web Services Cost and Usage Report definitions.
Amazon Web Services Cost and Usage Report track the monthly Amazon Web Services costs and usage associated with your Amazon Web Services account. The report contains line items for each unique combination of Amazon Web Services product, usage type, and operation that your Amazon Web Services account uses. You can configure the Amazon Web Services Cost and Usage Report to show only the data that you want, using the Amazon Web Services Cost and Usage Report API.
Service Endpoint
The Amazon Web Services Cost and Usage Report API provides the following endpoint:
cur.us-east-1.amazonaws.com
LOGGING_AWS_REQUEST_METRIC
ENDPOINT_PREFIX
Constructor and Description |
---|
AWSCostAndUsageReportClient()
Deprecated.
|
AWSCostAndUsageReportClient(AWSCredentials awsCredentials)
Deprecated.
use
AwsClientBuilder.withCredentials(AWSCredentialsProvider) for example:
AWSCostAndUsageReportClientBuilder.standard().withCredentials(new AWSStaticCredentialsProvider(awsCredentials)).build(); |
AWSCostAndUsageReportClient(AWSCredentials awsCredentials,
ClientConfiguration clientConfiguration)
|
AWSCostAndUsageReportClient(AWSCredentialsProvider awsCredentialsProvider)
Deprecated.
|
AWSCostAndUsageReportClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration)
|
AWSCostAndUsageReportClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration,
RequestMetricCollector requestMetricCollector)
|
AWSCostAndUsageReportClient(ClientConfiguration clientConfiguration)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static AWSCostAndUsageReportClientBuilder |
builder() |
DeleteReportDefinitionResult |
deleteReportDefinition(DeleteReportDefinitionRequest request)
Deletes the specified report.
|
DescribeReportDefinitionsResult |
describeReportDefinitions(DescribeReportDefinitionsRequest request)
Lists the Amazon Web Services Cost and Usage Report available to this account.
|
ResponseMetadata |
getCachedResponseMetadata(AmazonWebServiceRequest request)
Returns additional metadata for a previously executed successful, request, typically used for debugging issues
where a service isn't acting as expected.
|
ListTagsForResourceResult |
listTagsForResource(ListTagsForResourceRequest request)
Lists the tags associated with the specified report definition.
|
ModifyReportDefinitionResult |
modifyReportDefinition(ModifyReportDefinitionRequest request)
Allows you to programmatically update your report preferences.
|
PutReportDefinitionResult |
putReportDefinition(PutReportDefinitionRequest request)
Creates a new report using the description that you provide.
|
void |
shutdown()
Shuts down this client object, releasing any resources that might be held
open.
|
TagResourceResult |
tagResource(TagResourceRequest request)
Associates a set of tags with a report definition.
|
UntagResourceResult |
untagResource(UntagResourceRequest request)
Disassociates a set of tags from a report definition.
|
addRequestHandler, addRequestHandler, configureRegion, getClientConfiguration, getEndpointPrefix, getMonitoringListeners, getRequestMetricsCollector, getServiceName, getSignerByURI, getSignerOverride, getSignerRegionOverride, getTimeOffset, makeImmutable, removeRequestHandler, removeRequestHandler, setEndpoint, setEndpoint, setRegion, setServiceNameIntern, setSignerRegionOverride, setTimeOffset, withEndpoint, withRegion, withRegion, withTimeOffset
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setEndpoint, setRegion
@Deprecated public AWSCostAndUsageReportClient()
AWSCostAndUsageReportClientBuilder.defaultClient()
All service calls made using this new client object are blocking, and will not return until the service call completes.
DefaultAWSCredentialsProviderChain
@Deprecated public AWSCostAndUsageReportClient(ClientConfiguration clientConfiguration)
AwsClientBuilder.withClientConfiguration(ClientConfiguration)
All service calls made using this new client object are blocking, and will not return until the service call completes.
clientConfiguration
- The client configuration options controlling how this client connects to AWS Cost and Usage Report Service
(ex: proxy settings, retry counts, etc.).DefaultAWSCredentialsProviderChain
@Deprecated public AWSCostAndUsageReportClient(AWSCredentials awsCredentials)
AwsClientBuilder.withCredentials(AWSCredentialsProvider)
for example:
AWSCostAndUsageReportClientBuilder.standard().withCredentials(new AWSStaticCredentialsProvider(awsCredentials)).build();
All service calls made using this new client object are blocking, and will not return until the service call completes.
awsCredentials
- The AWS credentials (access key ID and secret key) to use when authenticating with AWS services.@Deprecated public AWSCostAndUsageReportClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration)
AwsClientBuilder.withCredentials(AWSCredentialsProvider)
and
AwsClientBuilder.withClientConfiguration(ClientConfiguration)
All service calls made using this new client object are blocking, and will not return until the service call completes.
awsCredentials
- The AWS credentials (access key ID and secret key) to use when authenticating with AWS services.clientConfiguration
- The client configuration options controlling how this client connects to AWS Cost and Usage Report Service
(ex: proxy settings, retry counts, etc.).@Deprecated public AWSCostAndUsageReportClient(AWSCredentialsProvider awsCredentialsProvider)
AwsClientBuilder.withCredentials(AWSCredentialsProvider)
All service calls made using this new client object are blocking, and will not return until the service call completes.
awsCredentialsProvider
- The AWS credentials provider which will provide credentials to authenticate requests with AWS services.@Deprecated public AWSCostAndUsageReportClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration)
AwsClientBuilder.withCredentials(AWSCredentialsProvider)
and
AwsClientBuilder.withClientConfiguration(ClientConfiguration)
All service calls made using this new client object are blocking, and will not return until the service call completes.
awsCredentialsProvider
- The AWS credentials provider which will provide credentials to authenticate requests with AWS services.clientConfiguration
- The client configuration options controlling how this client connects to AWS Cost and Usage Report Service
(ex: proxy settings, retry counts, etc.).@Deprecated public AWSCostAndUsageReportClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration, RequestMetricCollector requestMetricCollector)
AwsClientBuilder.withCredentials(AWSCredentialsProvider)
and
AwsClientBuilder.withClientConfiguration(ClientConfiguration)
and
AwsClientBuilder.withMetricsCollector(RequestMetricCollector)
All service calls made using this new client object are blocking, and will not return until the service call completes.
awsCredentialsProvider
- The AWS credentials provider which will provide credentials to authenticate requests with AWS services.clientConfiguration
- The client configuration options controlling how this client connects to AWS Cost and Usage Report Service
(ex: proxy settings, retry counts, etc.).requestMetricCollector
- optional request metric collectorpublic static AWSCostAndUsageReportClientBuilder builder()
public DeleteReportDefinitionResult deleteReportDefinition(DeleteReportDefinitionRequest request)
Deletes the specified report. Any tags associated with the report are also deleted.
deleteReportDefinition
in interface AWSCostAndUsageReport
deleteReportDefinitionRequest
- Deletes the specified report.InternalErrorException
- An error on the server occurred during the processing of your request. Try again later.ValidationException
- The input fails to satisfy the constraints specified by an Amazon Web Services service.public DescribeReportDefinitionsResult describeReportDefinitions(DescribeReportDefinitionsRequest request)
Lists the Amazon Web Services Cost and Usage Report available to this account.
describeReportDefinitions
in interface AWSCostAndUsageReport
describeReportDefinitionsRequest
- Requests a Amazon Web Services Cost and Usage Report list owned by the account.InternalErrorException
- An error on the server occurred during the processing of your request. Try again later.public ListTagsForResourceResult listTagsForResource(ListTagsForResourceRequest request)
Lists the tags associated with the specified report definition.
listTagsForResource
in interface AWSCostAndUsageReport
listTagsForResourceRequest
- ResourceNotFoundException
- The specified report (ReportName
) in the request doesn't exist.InternalErrorException
- An error on the server occurred during the processing of your request. Try again later.ValidationException
- The input fails to satisfy the constraints specified by an Amazon Web Services service.public ModifyReportDefinitionResult modifyReportDefinition(ModifyReportDefinitionRequest request)
Allows you to programmatically update your report preferences.
modifyReportDefinition
in interface AWSCostAndUsageReport
modifyReportDefinitionRequest
- InternalErrorException
- An error on the server occurred during the processing of your request. Try again later.ValidationException
- The input fails to satisfy the constraints specified by an Amazon Web Services service.public PutReportDefinitionResult putReportDefinition(PutReportDefinitionRequest request)
Creates a new report using the description that you provide.
putReportDefinition
in interface AWSCostAndUsageReport
putReportDefinitionRequest
- Creates a Cost and Usage Report.DuplicateReportNameException
- A report with the specified name already exists in the account. Specify a different report name.ReportLimitReachedException
- This account already has five reports defined. To define a new report, you must delete an existing
report.InternalErrorException
- An error on the server occurred during the processing of your request. Try again later.ValidationException
- The input fails to satisfy the constraints specified by an Amazon Web Services service.ResourceNotFoundException
- The specified report (ReportName
) in the request doesn't exist.public TagResourceResult tagResource(TagResourceRequest request)
Associates a set of tags with a report definition.
tagResource
in interface AWSCostAndUsageReport
tagResourceRequest
- ResourceNotFoundException
- The specified report (ReportName
) in the request doesn't exist.InternalErrorException
- An error on the server occurred during the processing of your request. Try again later.ValidationException
- The input fails to satisfy the constraints specified by an Amazon Web Services service.public UntagResourceResult untagResource(UntagResourceRequest request)
Disassociates a set of tags from a report definition.
untagResource
in interface AWSCostAndUsageReport
untagResourceRequest
- ResourceNotFoundException
- The specified report (ReportName
) in the request doesn't exist.InternalErrorException
- An error on the server occurred during the processing of your request. Try again later.ValidationException
- The input fails to satisfy the constraints specified by an Amazon Web Services service.public ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request)
Response metadata is only cached for a limited period of time, so if you need to access this extra diagnostic information for an executed request, you should use this method to retrieve it as soon as possible after executing the request.
getCachedResponseMetadata
in interface AWSCostAndUsageReport
request
- The originally executed requestpublic void shutdown()
AmazonWebServiceClient
shutdown
in interface AWSCostAndUsageReport
shutdown
in class AmazonWebServiceClient