pub struct UsageCostsParams {
pub start_time: i64,
pub end_time: Option<i64>,
pub bucket_width: Option<UsageCostsParamsBucketWidth>,
pub project_ids: Option<Vec<String>>,
pub group_by: Option<Vec<UsageCostsParamsGroupBy>>,
pub limit: Option<i64>,
pub page: Option<String>,
}
Fields§
§start_time: i64
Start time (Unix seconds) of the query time range, inclusive.
end_time: Option<i64>
End time (Unix seconds) of the query time range, exclusive.
bucket_width: Option<UsageCostsParamsBucketWidth>
Width of each time bucket in response. Currently only 1d
is supported, default to 1d
.
project_ids: Option<Vec<String>>
Return only costs for these projects.
group_by: Option<Vec<UsageCostsParamsGroupBy>>
Group the costs by the specified fields. Support fields include project_id
, line_item
and any combination of them.
limit: Option<i64>
A limit on the number of buckets to be returned. Limit can range between 1 and 180, and the default is 7.
page: Option<String>
A cursor for use in pagination. Corresponding to the next_page
field from the previous response.
Implementations§
Source§impl UsageCostsParams
impl UsageCostsParams
Sourcepub fn builder() -> UsageCostsParamsBuilder<((), (), (), (), (), (), ())>
pub fn builder() -> UsageCostsParamsBuilder<((), (), (), (), (), (), ())>
Create a builder for building UsageCostsParams
.
On the builder, call .start_time(...)
, .end_time(...)
(optional), .bucket_width(...)
(optional), .project_ids(...)
(optional), .group_by(...)
(optional), .limit(...)
(optional), .page(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of UsageCostsParams
.
Trait Implementations§
Source§impl Clone for UsageCostsParams
impl Clone for UsageCostsParams
Source§fn clone(&self) -> UsageCostsParams
fn clone(&self) -> UsageCostsParams
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read more