pub struct GetCostAndUsageWithResourcesRequest {
pub filter: Expression,
pub granularity: String,
pub group_by: Option<Vec<GroupDefinition>>,
pub metrics: Option<Vec<String>>,
pub next_page_token: Option<String>,
pub time_period: DateInterval,
}
Fields
filter: Expression
Filters Amazon Web Services costs by different dimensions. For example, you can specify SERVICE
and LINKED_ACCOUNT
and get the costs that are 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 Expression.
The GetCostAndUsageWithResources
operation requires that you either group by or filter by a ResourceId
. It requires the Expression "SERVICE = Amazon Elastic Compute Cloud - Compute"
in the filter.
granularity: String
Sets the AWS cost granularity to MONTHLY
, DAILY
, or HOURLY
. If Granularity
isn't set, the response object doesn't include the Granularity
, MONTHLY
, DAILY
, or HOURLY
.
group_by: Option<Vec<GroupDefinition>>
You can group Amazon Web Services costs using up to two different groups: DIMENSION
, TAG
, COST_CATEGORY
.
metrics: Option<Vec<String>>
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 AmortizedCost
, BlendedCost
, NetAmortizedCost
, NetUnblendedCost
, NormalizedUsageAmount
, UnblendedCost
, and UsageQuantity
.
If you return the UsageQuantity
metric, the service aggregates all usage numbers without taking the units into account. For example, if you aggregate usageQuantity
across all of Amazon EC2, the results aren't meaningful because Amazon 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
is required for GetCostAndUsageWithResources
requests.
next_page_token: Option<String>
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.
time_period: DateInterval
Sets the start and end dates for retrieving Amazon Web Services costs. The range must be within the last 14 days (the start date cannot be earlier than 14 days ago). 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
.
Trait Implementations
sourceimpl Clone for GetCostAndUsageWithResourcesRequest
impl Clone for GetCostAndUsageWithResourcesRequest
sourcefn clone(&self) -> GetCostAndUsageWithResourcesRequest
fn clone(&self) -> GetCostAndUsageWithResourcesRequest
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Default for GetCostAndUsageWithResourcesRequest
impl Default for GetCostAndUsageWithResourcesRequest
sourcefn default() -> GetCostAndUsageWithResourcesRequest
fn default() -> GetCostAndUsageWithResourcesRequest
Returns the “default value” for a type. Read more
sourceimpl PartialEq<GetCostAndUsageWithResourcesRequest> for GetCostAndUsageWithResourcesRequest
impl PartialEq<GetCostAndUsageWithResourcesRequest> for GetCostAndUsageWithResourcesRequest
sourcefn eq(&self, other: &GetCostAndUsageWithResourcesRequest) -> bool
fn eq(&self, other: &GetCostAndUsageWithResourcesRequest) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &GetCostAndUsageWithResourcesRequest) -> bool
fn ne(&self, other: &GetCostAndUsageWithResourcesRequest) -> bool
This method tests for !=
.
impl StructuralPartialEq for GetCostAndUsageWithResourcesRequest
Auto Trait Implementations
impl RefUnwindSafe for GetCostAndUsageWithResourcesRequest
impl Send for GetCostAndUsageWithResourcesRequest
impl Sync for GetCostAndUsageWithResourcesRequest
impl Unpin for GetCostAndUsageWithResourcesRequest
impl UnwindSafe for GetCostAndUsageWithResourcesRequest
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more