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.
Container for the parameters to the GetCostAndUsage operation.
Retrieves cost and usage metrics for your account. You can specify which cost and
usage-related metric that you want the request to return. For example, you can specify
BlendedCosts
or UsageQuantity
. You can also filter and group your data
by various dimensions, such as SERVICE
or AZ
, in a specific time range.
For a complete list of valid dimensions, see the GetDimensionValues
operation. Management account in an organization in Organizations have access to all
member accounts.
For information about filter limitations, see Quotas and restrictions in the Billing and Cost Management User Guide.
Namespace: Amazon.CostExplorer.Model
Assembly: AWSSDK.CostExplorer.dll
Version: 3.x.y.z
public class GetCostAndUsageRequest : AmazonCostExplorerRequest IAmazonWebServiceRequest
The GetCostAndUsageRequest type exposes the following members
Name | Description | |
---|---|---|
GetCostAndUsageRequest() |
Name | Type | Description | |
---|---|---|---|
Filter | Amazon.CostExplorer.Model.Expression |
Gets and sets the property Filter.
Filters Amazon Web Services costs by different dimensions. For example, you can specify
Valid values for
Valid values for |
|
Granularity | Amazon.CostExplorer.Granularity |
Gets and sets the property Granularity.
Sets the Amazon Web Services cost granularity to |
|
GroupBy | System.Collections.Generic.List<Amazon.CostExplorer.Model.GroupDefinition> |
Gets and sets the property GroupBy. You can group Amazon Web Services costs using up to two different groups, either dimensions, tag keys, cost categories, or any two group by types.
Valid values for the
When you group by the |
|
Metrics | System.Collections.Generic.List<System.String> |
Gets and sets the property Metrics. Which metrics are returned in the query. For more information about blended and unblended rates, see Why does the "blended" annotation appear on some line items in my bill?.
Valid values are
If you return the
|
|
NextPageToken | System.String |
Gets and sets the property NextPageToken. The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size. |
|
TimePeriod | Amazon.CostExplorer.Model.DateInterval |
Gets and sets the property TimePeriod.
Sets the start date and end date for retrieving Amazon Web Services costs. The start
date is inclusive, but the end date is exclusive. For example, if |
.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