AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Implementation for accessing CostAndUsageReport
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
Namespace: Amazon.CostAndUsageReport
Assembly: AWSSDK.CostAndUsageReport.dll
Version: 3.x.y.z
public class AmazonCostAndUsageReportClient : AmazonServiceClient IAmazonCostAndUsageReport, IAmazonService, IDisposable
The AmazonCostAndUsageReportClient type exposes the following members
Name | Description | |
---|---|---|
AmazonCostAndUsageReportClient() |
Constructs AmazonCostAndUsageReportClient with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set. <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="AWSProfileName" value="AWS Default"/> </appSettings> </configuration> |
|
AmazonCostAndUsageReportClient(RegionEndpoint) |
Constructs AmazonCostAndUsageReportClient with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set. <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="AWSProfileName" value="AWS Default"/> </appSettings> </configuration> |
|
AmazonCostAndUsageReportClient(AmazonCostAndUsageReportConfig) |
Constructs AmazonCostAndUsageReportClient with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set. <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="AWSProfileName" value="AWS Default"/> </appSettings> </configuration> |
|
AmazonCostAndUsageReportClient(AWSCredentials) |
Constructs AmazonCostAndUsageReportClient with AWS Credentials |
|
AmazonCostAndUsageReportClient(AWSCredentials, RegionEndpoint) |
Constructs AmazonCostAndUsageReportClient with AWS Credentials |
|
AmazonCostAndUsageReportClient(AWSCredentials, AmazonCostAndUsageReportConfig) |
Constructs AmazonCostAndUsageReportClient with AWS Credentials and an AmazonCostAndUsageReportClient Configuration object. |
|
AmazonCostAndUsageReportClient(string, string) |
Constructs AmazonCostAndUsageReportClient with AWS Access Key ID and AWS Secret Key |
|
AmazonCostAndUsageReportClient(string, string, RegionEndpoint) |
Constructs AmazonCostAndUsageReportClient with AWS Access Key ID and AWS Secret Key |
|
AmazonCostAndUsageReportClient(string, string, AmazonCostAndUsageReportConfig) |
Constructs AmazonCostAndUsageReportClient with AWS Access Key ID, AWS Secret Key and an AmazonCostAndUsageReportClient Configuration object. |
|
AmazonCostAndUsageReportClient(string, string, string) |
Constructs AmazonCostAndUsageReportClient with AWS Access Key ID and AWS Secret Key |
|
AmazonCostAndUsageReportClient(string, string, string, RegionEndpoint) |
Constructs AmazonCostAndUsageReportClient with AWS Access Key ID and AWS Secret Key |
|
AmazonCostAndUsageReportClient(string, string, string, AmazonCostAndUsageReportConfig) |
Constructs AmazonCostAndUsageReportClient with AWS Access Key ID, AWS Secret Key and an AmazonCostAndUsageReportClient Configuration object. |
Name | Type | Description | |
---|---|---|---|
Config | Amazon.Runtime.IClientConfig | Inherited from Amazon.Runtime.AmazonServiceClient. | |
Paginators | Amazon.CostAndUsageReport.Model.ICostAndUsageReportPaginatorFactory |
Paginators for the service |
Name | Description | |
---|---|---|
DeleteReportDefinition(DeleteReportDefinitionRequest) |
Deletes the specified report. Any tags associated with the report are also deleted. |
|
DeleteReportDefinitionAsync(DeleteReportDefinitionRequest, CancellationToken) |
Deletes the specified report. Any tags associated with the report are also deleted. |
|
DescribeReportDefinitions(DescribeReportDefinitionsRequest) |
Lists the Amazon Web Services Cost and Usage Report available to this account. |
|
DescribeReportDefinitionsAsync(DescribeReportDefinitionsRequest, CancellationToken) |
Lists the Amazon Web Services Cost and Usage Report available to this account. |
|
DetermineServiceOperationEndpoint(AmazonWebServiceRequest) |
Returns the endpoint that will be used for a particular request. |
|
Dispose() | Inherited from Amazon.Runtime.AmazonServiceClient. | |
ListTagsForResource(ListTagsForResourceRequest) |
Lists the tags associated with the specified report definition. |
|
ListTagsForResourceAsync(ListTagsForResourceRequest, CancellationToken) |
Lists the tags associated with the specified report definition. |
|
ModifyReportDefinition(ModifyReportDefinitionRequest) |
Allows you to programmatically update your report preferences. |
|
ModifyReportDefinitionAsync(ModifyReportDefinitionRequest, CancellationToken) |
Allows you to programmatically update your report preferences. |
|
PutReportDefinition(PutReportDefinitionRequest) |
Creates a new report using the description that you provide. |
|
PutReportDefinitionAsync(PutReportDefinitionRequest, CancellationToken) |
Creates a new report using the description that you provide. |
|
TagResource(TagResourceRequest) |
Associates a set of tags with a report definition. |
|
TagResourceAsync(TagResourceRequest, CancellationToken) |
Associates a set of tags with a report definition. |
|
UntagResource(UntagResourceRequest) |
Disassociates a set of tags from a report definition. |
|
UntagResourceAsync(UntagResourceRequest, CancellationToken) |
Disassociates a set of tags from a report definition. |
Name | Description | |
---|---|---|
AfterResponseEvent | Inherited from Amazon.Runtime.AmazonServiceClient. | |
BeforeRequestEvent | Inherited from Amazon.Runtime.AmazonServiceClient. | |
ExceptionEvent | Inherited from Amazon.Runtime.AmazonServiceClient. |
.NET:
Supported in: 8.0 and newer, Core 3.1
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.5 and newer, 3.5