@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class GetCostAndUsageRequest extends AmazonWebServiceRequest implements Serializable, Cloneable
NOOP| Constructor and Description |
|---|
GetCostAndUsageRequest() |
| Modifier and Type | Method and Description |
|---|---|
GetCostAndUsageRequest |
clone() |
boolean |
equals(Object obj) |
Expression |
getFilter()
Filters AWS costs by different dimensions.
|
String |
getGranularity()
Sets the AWS cost granularity to
MONTHLY or DAILY. |
List<GroupDefinition> |
getGroupBy()
You can group AWS costs using up to two different groups, either dimensions, tag keys, or both.
|
List<String> |
getMetrics()
Which metrics are returned in the query.
|
String |
getNextPageToken()
The token to retrieve the next set of results.
|
DateInterval |
getTimePeriod()
Sets the start and end dates for retrieving AWS costs.
|
int |
hashCode() |
void |
setFilter(Expression filter)
Filters AWS costs by different dimensions.
|
void |
setGranularity(String granularity)
Sets the AWS cost granularity to
MONTHLY or DAILY. |
void |
setGroupBy(Collection<GroupDefinition> groupBy)
You can group AWS costs using up to two different groups, either dimensions, tag keys, or both.
|
void |
setMetrics(Collection<String> metrics)
Which metrics are returned in the query.
|
void |
setNextPageToken(String nextPageToken)
The token to retrieve the next set of results.
|
void |
setTimePeriod(DateInterval timePeriod)
Sets the start and end dates for retrieving AWS costs.
|
String |
toString()
Returns a string representation of this object; useful for testing and debugging.
|
GetCostAndUsageRequest |
withFilter(Expression filter)
Filters AWS costs by different dimensions.
|
GetCostAndUsageRequest |
withGranularity(Granularity granularity)
Sets the AWS cost granularity to
MONTHLY or DAILY. |
GetCostAndUsageRequest |
withGranularity(String granularity)
Sets the AWS cost granularity to
MONTHLY or DAILY. |
GetCostAndUsageRequest |
withGroupBy(Collection<GroupDefinition> groupBy)
You can group AWS costs using up to two different groups, either dimensions, tag keys, or both.
|
GetCostAndUsageRequest |
withGroupBy(GroupDefinition... groupBy)
You can group AWS costs using up to two different groups, either dimensions, tag keys, or both.
|
GetCostAndUsageRequest |
withMetrics(Collection<String> metrics)
Which metrics are returned in the query.
|
GetCostAndUsageRequest |
withMetrics(String... metrics)
Which metrics are returned in the query.
|
GetCostAndUsageRequest |
withNextPageToken(String nextPageToken)
The token to retrieve the next set of results.
|
GetCostAndUsageRequest |
withTimePeriod(DateInterval timePeriod)
Sets the start and end dates for retrieving AWS costs.
|
addHandlerContext, copyBaseTo, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getHandlerContext, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestCredentialsProvider, getRequestMetricCollector, getSdkClientExecutionTimeout, getSdkRequestTimeout, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestCredentialsProvider, setRequestMetricCollector, setSdkClientExecutionTimeout, setSdkRequestTimeout, withGeneralProgressListener, withRequestCredentialsProvider, withRequestMetricCollector, withSdkClientExecutionTimeout, withSdkRequestTimeoutpublic void setTimePeriod(DateInterval timePeriod)
Sets the start and end dates for retrieving AWS costs. The start date is inclusive, but the end date is
exclusive. For example, if start is 2017-01-01 and end is
2017-05-01, then the cost and usage data is retrieved from 2017-01-01 up to and
including 2017-04-30 but not including 2017-05-01.
timePeriod - Sets the start and end dates for retrieving AWS costs. The start date is inclusive, but the end date is
exclusive. For example, if start is 2017-01-01 and end is
2017-05-01, then the cost and usage data is retrieved from 2017-01-01 up to and
including 2017-04-30 but not including 2017-05-01.public DateInterval getTimePeriod()
Sets the start and end dates for retrieving AWS costs. The start date is inclusive, but the end date is
exclusive. For example, if start is 2017-01-01 and end is
2017-05-01, then the cost and usage data is retrieved from 2017-01-01 up to and
including 2017-04-30 but not including 2017-05-01.
start is 2017-01-01 and end is
2017-05-01, then the cost and usage data is retrieved from 2017-01-01 up to and
including 2017-04-30 but not including 2017-05-01.public GetCostAndUsageRequest withTimePeriod(DateInterval timePeriod)
Sets the start and end dates for retrieving AWS costs. The start date is inclusive, but the end date is
exclusive. For example, if start is 2017-01-01 and end is
2017-05-01, then the cost and usage data is retrieved from 2017-01-01 up to and
including 2017-04-30 but not including 2017-05-01.
timePeriod - Sets the start and end dates for retrieving AWS costs. The start date is inclusive, but the end date is
exclusive. For example, if start is 2017-01-01 and end is
2017-05-01, then the cost and usage data is retrieved from 2017-01-01 up to and
including 2017-04-30 but not including 2017-05-01.public void setGranularity(String granularity)
Sets the AWS cost granularity to MONTHLY or DAILY.
granularity - Sets the AWS cost granularity to MONTHLY or DAILY.Granularitypublic String getGranularity()
Sets the AWS cost granularity to MONTHLY or DAILY.
MONTHLY or DAILY.Granularitypublic GetCostAndUsageRequest withGranularity(String granularity)
Sets the AWS cost granularity to MONTHLY or DAILY.
granularity - Sets the AWS cost granularity to MONTHLY or DAILY.Granularitypublic GetCostAndUsageRequest withGranularity(Granularity granularity)
Sets the AWS cost granularity to MONTHLY or DAILY.
granularity - Sets the AWS cost granularity to MONTHLY or DAILY.Granularitypublic void setFilter(Expression filter)
Filters AWS costs by different dimensions. For example, you can specify Service and
Linked Account and get the costs associated with that account's usage of that service. You can nest
Expression objects to define any combination of dimension filters. For more information, see the
Expression object or More Examples.
filter - Filters AWS costs by different dimensions. For example, you can specify Service and
Linked Account and get the costs associated with that account's usage of that service. You
can nest Expression objects to define any combination of dimension filters. For more
information, see the Expression object or More Examples.public Expression getFilter()
Filters AWS costs by different dimensions. For example, you can specify Service and
Linked Account and get the costs associated with that account's usage of that service. You can nest
Expression objects to define any combination of dimension filters. For more information, see the
Expression object or More Examples.
Service and
Linked Account and get the costs associated with that account's usage of that service. You
can nest Expression objects to define any combination of dimension filters. For more
information, see the Expression object or More Examples.public GetCostAndUsageRequest withFilter(Expression filter)
Filters AWS costs by different dimensions. For example, you can specify Service and
Linked Account and get the costs associated with that account's usage of that service. You can nest
Expression objects to define any combination of dimension filters. For more information, see the
Expression object or More Examples.
filter - Filters AWS costs by different dimensions. For example, you can specify Service and
Linked Account and get the costs associated with that account's usage of that service. You
can nest Expression objects to define any combination of dimension filters. For more
information, see the Expression object or More Examples.public List<String> getMetrics()
Which metrics are returned in the query. For more information about blended and unblended rates, see https://aws.amazon.com/premiumsupport/knowledge-center/blended-rates-intro/.
Valid values are BlendedCost, UnblendedCost, and UsageQuantity.
If you return the UsageQuantity metric, the service aggregates all usage numbers without taking into
account the units. For example, if you aggregate usageQuantity across all of EC2, the results aren't
meaningful because EC2 compute hours and data transfer are measured in different units (for example, hours vs.
GB). To get more meaningful UsageQuantity metrics, filter by UsageType or
UsageTypeGroups.
Valid values are BlendedCost, UnblendedCost, and UsageQuantity.
If you return the UsageQuantity metric, the service aggregates all usage numbers without
taking into account the units. For example, if you aggregate usageQuantity across all of
EC2, the results aren't meaningful because EC2 compute hours and data transfer are measured in different
units (for example, hours vs. GB). To get more meaningful UsageQuantity metrics, filter by
UsageType or UsageTypeGroups.
public void setMetrics(Collection<String> metrics)
Which metrics are returned in the query. For more information about blended and unblended rates, see https://aws.amazon.com/premiumsupport/knowledge-center/blended-rates-intro/.
Valid values are BlendedCost, UnblendedCost, and UsageQuantity.
If you return the UsageQuantity metric, the service aggregates all usage numbers without taking into
account the units. For example, if you aggregate usageQuantity across all of EC2, the results aren't
meaningful because EC2 compute hours and data transfer are measured in different units (for example, hours vs.
GB). To get more meaningful UsageQuantity metrics, filter by UsageType or
UsageTypeGroups.
metrics - Which metrics are returned in the query. For more information about blended and unblended rates, see
https://aws.amazon.com/premiumsupport/knowledge-center/blended-rates-intro/.
Valid values are BlendedCost, UnblendedCost, and UsageQuantity.
If you return the UsageQuantity metric, the service aggregates all usage numbers without
taking into account the units. For example, if you aggregate usageQuantity across all of EC2,
the results aren't meaningful because EC2 compute hours and data transfer are measured in different units
(for example, hours vs. GB). To get more meaningful UsageQuantity metrics, filter by
UsageType or UsageTypeGroups.
public GetCostAndUsageRequest withMetrics(String... metrics)
Which metrics are returned in the query. For more information about blended and unblended rates, see https://aws.amazon.com/premiumsupport/knowledge-center/blended-rates-intro/.
Valid values are BlendedCost, UnblendedCost, and UsageQuantity.
If you return the UsageQuantity metric, the service aggregates all usage numbers without taking into
account the units. For example, if you aggregate usageQuantity across all of EC2, the results aren't
meaningful because EC2 compute hours and data transfer are measured in different units (for example, hours vs.
GB). To get more meaningful UsageQuantity metrics, filter by UsageType or
UsageTypeGroups.
NOTE: This method appends the values to the existing list (if any). Use
setMetrics(java.util.Collection) or withMetrics(java.util.Collection) if you want to override
the existing values.
metrics - Which metrics are returned in the query. For more information about blended and unblended rates, see
https://aws.amazon.com/premiumsupport/knowledge-center/blended-rates-intro/.
Valid values are BlendedCost, UnblendedCost, and UsageQuantity.
If you return the UsageQuantity metric, the service aggregates all usage numbers without
taking into account the units. For example, if you aggregate usageQuantity across all of EC2,
the results aren't meaningful because EC2 compute hours and data transfer are measured in different units
(for example, hours vs. GB). To get more meaningful UsageQuantity metrics, filter by
UsageType or UsageTypeGroups.
public GetCostAndUsageRequest withMetrics(Collection<String> metrics)
Which metrics are returned in the query. For more information about blended and unblended rates, see https://aws.amazon.com/premiumsupport/knowledge-center/blended-rates-intro/.
Valid values are BlendedCost, UnblendedCost, and UsageQuantity.
If you return the UsageQuantity metric, the service aggregates all usage numbers without taking into
account the units. For example, if you aggregate usageQuantity across all of EC2, the results aren't
meaningful because EC2 compute hours and data transfer are measured in different units (for example, hours vs.
GB). To get more meaningful UsageQuantity metrics, filter by UsageType or
UsageTypeGroups.
metrics - Which metrics are returned in the query. For more information about blended and unblended rates, see
https://aws.amazon.com/premiumsupport/knowledge-center/blended-rates-intro/.
Valid values are BlendedCost, UnblendedCost, and UsageQuantity.
If you return the UsageQuantity metric, the service aggregates all usage numbers without
taking into account the units. For example, if you aggregate usageQuantity across all of EC2,
the results aren't meaningful because EC2 compute hours and data transfer are measured in different units
(for example, hours vs. GB). To get more meaningful UsageQuantity metrics, filter by
UsageType or UsageTypeGroups.
public List<GroupDefinition> getGroupBy()
You can group AWS costs using up to two different groups, either dimensions, tag keys, or both.
When you group by tag key, you get all tag values, including empty strings.
Valid values are: AZ, INSTANCE_TYPE, LINKED_ACCCOUNT,
OPERATION, PURCHASE_TYPE, SERVICE, USAGE_TYPE,
TAGS, and PLATFORM.
When you group by tag key, you get all tag values, including empty strings.
Valid values are: AZ, INSTANCE_TYPE, LINKED_ACCCOUNT,
OPERATION, PURCHASE_TYPE, SERVICE, USAGE_TYPE,
TAGS, and PLATFORM.
public void setGroupBy(Collection<GroupDefinition> groupBy)
You can group AWS costs using up to two different groups, either dimensions, tag keys, or both.
When you group by tag key, you get all tag values, including empty strings.
Valid values are: AZ, INSTANCE_TYPE, LINKED_ACCCOUNT,
OPERATION, PURCHASE_TYPE, SERVICE, USAGE_TYPE,
TAGS, and PLATFORM.
groupBy - You can group AWS costs using up to two different groups, either dimensions, tag keys, or both.
When you group by tag key, you get all tag values, including empty strings.
Valid values are: AZ, INSTANCE_TYPE, LINKED_ACCCOUNT,
OPERATION, PURCHASE_TYPE, SERVICE, USAGE_TYPE,
TAGS, and PLATFORM.
public GetCostAndUsageRequest withGroupBy(GroupDefinition... groupBy)
You can group AWS costs using up to two different groups, either dimensions, tag keys, or both.
When you group by tag key, you get all tag values, including empty strings.
Valid values are: AZ, INSTANCE_TYPE, LINKED_ACCCOUNT,
OPERATION, PURCHASE_TYPE, SERVICE, USAGE_TYPE,
TAGS, and PLATFORM.
NOTE: This method appends the values to the existing list (if any). Use
setGroupBy(java.util.Collection) or withGroupBy(java.util.Collection) if you want to override
the existing values.
groupBy - You can group AWS costs using up to two different groups, either dimensions, tag keys, or both.
When you group by tag key, you get all tag values, including empty strings.
Valid values are: AZ, INSTANCE_TYPE, LINKED_ACCCOUNT,
OPERATION, PURCHASE_TYPE, SERVICE, USAGE_TYPE,
TAGS, and PLATFORM.
public GetCostAndUsageRequest withGroupBy(Collection<GroupDefinition> groupBy)
You can group AWS costs using up to two different groups, either dimensions, tag keys, or both.
When you group by tag key, you get all tag values, including empty strings.
Valid values are: AZ, INSTANCE_TYPE, LINKED_ACCCOUNT,
OPERATION, PURCHASE_TYPE, SERVICE, USAGE_TYPE,
TAGS, and PLATFORM.
groupBy - You can group AWS costs using up to two different groups, either dimensions, tag keys, or both.
When you group by tag key, you get all tag values, including empty strings.
Valid values are: AZ, INSTANCE_TYPE, LINKED_ACCCOUNT,
OPERATION, PURCHASE_TYPE, SERVICE, USAGE_TYPE,
TAGS, and PLATFORM.
public void setNextPageToken(String nextPageToken)
The token to retrieve the next set of results. AWS provides the token when the response from a previous call has more results than the maximum page size.
nextPageToken - The token to retrieve the next set of results. AWS provides the token when the response from a previous
call has more results than the maximum page size.public String getNextPageToken()
The token to retrieve the next set of results. AWS provides the token when the response from a previous call has more results than the maximum page size.
public GetCostAndUsageRequest withNextPageToken(String nextPageToken)
The token to retrieve the next set of results. AWS provides the token when the response from a previous call has more results than the maximum page size.
nextPageToken - The token to retrieve the next set of results. AWS provides the token when the response from a previous
call has more results than the maximum page size.public String toString()
toString in class ObjectObject.toString()public GetCostAndUsageRequest clone()
clone in class AmazonWebServiceRequestCopyright © 2017. All rights reserved.