pub struct UsageMeteringAPI { /* private fields */ }
Expand description
The usage metering API allows you to get hourly, daily, and monthly usage across multiple facets of Datadog. This API is available to all Pro and Enterprise customers.
Note: Usage data is delayed by up to 72 hours from when it was incurred. It is retained for 15 months.
You can retrieve up to 24 hours of hourly usage data for multiple organizations, and up to two months of hourly usage data for a single organization in one request. Learn more on the usage details documentation.
Implementations§
Source§impl UsageMeteringAPI
impl UsageMeteringAPI
pub fn new() -> Self
Sourcepub fn with_config(config: Configuration) -> Self
pub fn with_config(config: Configuration) -> Self
Examples found in repository?
More examples
7async fn main() {
8 let configuration = datadog::Configuration::new();
9 let api = UsageMeteringAPI::with_config(configuration);
10 let resp = api
11 .get_estimated_cost_by_org(GetEstimatedCostByOrgOptionalParams::default())
12 .await;
13 if let Ok(value) = resp {
14 println!("{:#?}", value);
15 } else {
16 println!("{:#?}", resp.unwrap_err());
17 }
18}
7async fn main() {
8 let configuration = datadog::Configuration::new();
9 let api = UsageMeteringAPI::with_config(configuration);
10 let resp = api
11 .get_billing_dimension_mapping(GetBillingDimensionMappingOptionalParams::default())
12 .await;
13 if let Ok(value) = resp {
14 println!("{:#?}", value);
15 } else {
16 println!("{:#?}", resp.unwrap_err());
17 }
18}
7async fn main() {
8 let configuration = datadog::Configuration::new();
9 let api = UsageMeteringAPI::with_config(configuration);
10 let resp = api
11 .get_projected_cost(GetProjectedCostOptionalParams::default().view("sub-org".to_string()))
12 .await;
13 if let Ok(value) = resp {
14 println!("{:#?}", value);
15 } else {
16 println!("{:#?}", resp.unwrap_err());
17 }
18}
8async fn main() {
9 let configuration = datadog::Configuration::new();
10 let api = UsageMeteringAPI::with_config(configuration);
11 let resp = api
12 .get_cost_by_org(
13 DateTime::parse_from_rfc3339("2021-11-08T11:11:11+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 GetCostByOrgOptionalParams::default(),
17 )
18 .await;
19 if let Ok(value) = resp {
20 println!("{:#?}", value);
21 } else {
22 println!("{:#?}", resp.unwrap_err());
23 }
24}
8async fn main() {
9 let configuration = datadog::Configuration::new();
10 let api = UsageMeteringAPI::with_config(configuration);
11 let resp = api
12 .get_hourly_usage(
13 DateTime::parse_from_rfc3339("2021-11-08T11:11:11+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 "infra_hosts".to_string(),
17 GetHourlyUsageOptionalParams::default(),
18 )
19 .await;
20 if let Ok(value) = resp {
21 println!("{:#?}", value);
22 } else {
23 println!("{:#?}", resp.unwrap_err());
24 }
25}
- examples/v2_usage-metering_GetHistoricalCostByOrg.rs
- examples/v2_usage-metering_GetEstimatedCostByOrg_3186693804.rs
- examples/v2_usage-metering_GetUsageObservabilityPipelines.rs
- examples/v2_usage-metering_GetUsageLambdaTracedInvocations.rs
- examples/v2_usage-metering_GetUsageApplicationSecurityMonitoring.rs
- examples/v2_usage-metering_GetMonthlyCostAttribution.rs
pub fn with_client_and_config( config: Configuration, client: ClientWithMiddleware, ) -> Self
Sourcepub async fn get_active_billing_dimensions(
&self,
) -> Result<ActiveBillingDimensionsResponse, Error<GetActiveBillingDimensionsError>>
pub async fn get_active_billing_dimensions( &self, ) -> Result<ActiveBillingDimensionsResponse, Error<GetActiveBillingDimensionsError>>
Get active billing dimensions for cost attribution. Cost data for a given month becomes available no later than the 19th of the following month.
Sourcepub async fn get_active_billing_dimensions_with_http_info(
&self,
) -> Result<ResponseContent<ActiveBillingDimensionsResponse>, Error<GetActiveBillingDimensionsError>>
pub async fn get_active_billing_dimensions_with_http_info( &self, ) -> Result<ResponseContent<ActiveBillingDimensionsResponse>, Error<GetActiveBillingDimensionsError>>
Get active billing dimensions for cost attribution. Cost data for a given month becomes available no later than the 19th of the following month.
Sourcepub async fn get_billing_dimension_mapping(
&self,
params: GetBillingDimensionMappingOptionalParams,
) -> Result<BillingDimensionsMappingResponse, Error<GetBillingDimensionMappingError>>
pub async fn get_billing_dimension_mapping( &self, params: GetBillingDimensionMappingOptionalParams, ) -> Result<BillingDimensionsMappingResponse, Error<GetBillingDimensionMappingError>>
Get a mapping of billing dimensions to the corresponding keys for the supported usage metering public API endpoints. Mapping data is updated on a monthly cadence.
This endpoint is only accessible to parent-level organizations.
Examples found in repository?
7async fn main() {
8 let configuration = datadog::Configuration::new();
9 let api = UsageMeteringAPI::with_config(configuration);
10 let resp = api
11 .get_billing_dimension_mapping(GetBillingDimensionMappingOptionalParams::default())
12 .await;
13 if let Ok(value) = resp {
14 println!("{:#?}", value);
15 } else {
16 println!("{:#?}", resp.unwrap_err());
17 }
18}
Sourcepub async fn get_billing_dimension_mapping_with_http_info(
&self,
params: GetBillingDimensionMappingOptionalParams,
) -> Result<ResponseContent<BillingDimensionsMappingResponse>, Error<GetBillingDimensionMappingError>>
pub async fn get_billing_dimension_mapping_with_http_info( &self, params: GetBillingDimensionMappingOptionalParams, ) -> Result<ResponseContent<BillingDimensionsMappingResponse>, Error<GetBillingDimensionMappingError>>
Get a mapping of billing dimensions to the corresponding keys for the supported usage metering public API endpoints. Mapping data is updated on a monthly cadence.
This endpoint is only accessible to parent-level organizations.
Sourcepub async fn get_cost_by_org(
&self,
start_month: DateTime<Utc>,
params: GetCostByOrgOptionalParams,
) -> Result<CostByOrgResponse, Error<GetCostByOrgError>>
pub async fn get_cost_by_org( &self, start_month: DateTime<Utc>, params: GetCostByOrgOptionalParams, ) -> Result<CostByOrgResponse, Error<GetCostByOrgError>>
Get cost across multi-org account.
Cost by org data for a given month becomes available no later than the 16th of the following month.
Note: This endpoint has been deprecated. Please use the new endpoint
/historical_cost
instead.
This endpoint is only accessible for parent-level organizations.
Examples found in repository?
8async fn main() {
9 let configuration = datadog::Configuration::new();
10 let api = UsageMeteringAPI::with_config(configuration);
11 let resp = api
12 .get_cost_by_org(
13 DateTime::parse_from_rfc3339("2021-11-08T11:11:11+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 GetCostByOrgOptionalParams::default(),
17 )
18 .await;
19 if let Ok(value) = resp {
20 println!("{:#?}", value);
21 } else {
22 println!("{:#?}", resp.unwrap_err());
23 }
24}
Sourcepub async fn get_cost_by_org_with_http_info(
&self,
start_month: DateTime<Utc>,
params: GetCostByOrgOptionalParams,
) -> Result<ResponseContent<CostByOrgResponse>, Error<GetCostByOrgError>>
pub async fn get_cost_by_org_with_http_info( &self, start_month: DateTime<Utc>, params: GetCostByOrgOptionalParams, ) -> Result<ResponseContent<CostByOrgResponse>, Error<GetCostByOrgError>>
Get cost across multi-org account.
Cost by org data for a given month becomes available no later than the 16th of the following month.
Note: This endpoint has been deprecated. Please use the new endpoint
/historical_cost
instead.
This endpoint is only accessible for parent-level organizations.
Sourcepub async fn get_estimated_cost_by_org(
&self,
params: GetEstimatedCostByOrgOptionalParams,
) -> Result<CostByOrgResponse, Error<GetEstimatedCostByOrgError>>
pub async fn get_estimated_cost_by_org( &self, params: GetEstimatedCostByOrgOptionalParams, ) -> Result<CostByOrgResponse, Error<GetEstimatedCostByOrgError>>
Get estimated cost across multi-org and single root-org accounts.
Estimated cost data is only available for the current month and previous month
and is delayed by up to 72 hours from when it was incurred.
To access historical costs prior to this, use the /historical_cost
endpoint.
This endpoint is only accessible for parent-level organizations.
Examples found in repository?
7async fn main() {
8 let configuration = datadog::Configuration::new();
9 let api = UsageMeteringAPI::with_config(configuration);
10 let resp = api
11 .get_estimated_cost_by_org(GetEstimatedCostByOrgOptionalParams::default())
12 .await;
13 if let Ok(value) = resp {
14 println!("{:#?}", value);
15 } else {
16 println!("{:#?}", resp.unwrap_err());
17 }
18}
More examples
8async fn main() {
9 let configuration = datadog::Configuration::new();
10 let api = UsageMeteringAPI::with_config(configuration);
11 let resp = api
12 .get_estimated_cost_by_org(
13 GetEstimatedCostByOrgOptionalParams::default()
14 .view("sub-org".to_string())
15 .start_month(
16 DateTime::parse_from_rfc3339("2021-11-11T11:11:11+00:00")
17 .expect("Failed to parse datetime")
18 .with_timezone(&Utc),
19 ),
20 )
21 .await;
22 if let Ok(value) = resp {
23 println!("{:#?}", value);
24 } else {
25 println!("{:#?}", resp.unwrap_err());
26 }
27}
Sourcepub async fn get_estimated_cost_by_org_with_http_info(
&self,
params: GetEstimatedCostByOrgOptionalParams,
) -> Result<ResponseContent<CostByOrgResponse>, Error<GetEstimatedCostByOrgError>>
pub async fn get_estimated_cost_by_org_with_http_info( &self, params: GetEstimatedCostByOrgOptionalParams, ) -> Result<ResponseContent<CostByOrgResponse>, Error<GetEstimatedCostByOrgError>>
Get estimated cost across multi-org and single root-org accounts.
Estimated cost data is only available for the current month and previous month
and is delayed by up to 72 hours from when it was incurred.
To access historical costs prior to this, use the /historical_cost
endpoint.
This endpoint is only accessible for parent-level organizations.
Sourcepub async fn get_historical_cost_by_org(
&self,
start_month: DateTime<Utc>,
params: GetHistoricalCostByOrgOptionalParams,
) -> Result<CostByOrgResponse, Error<GetHistoricalCostByOrgError>>
pub async fn get_historical_cost_by_org( &self, start_month: DateTime<Utc>, params: GetHistoricalCostByOrgOptionalParams, ) -> Result<CostByOrgResponse, Error<GetHistoricalCostByOrgError>>
Get historical cost across multi-org and single root-org accounts. Cost data for a given month becomes available no later than the 16th of the following month.
This endpoint is only accessible for parent-level organizations.
Examples found in repository?
8async fn main() {
9 let configuration = datadog::Configuration::new();
10 let api = UsageMeteringAPI::with_config(configuration);
11 let resp = api
12 .get_historical_cost_by_org(
13 DateTime::parse_from_rfc3339("2021-09-11T11:11:11+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 GetHistoricalCostByOrgOptionalParams::default().view("sub-org".to_string()),
17 )
18 .await;
19 if let Ok(value) = resp {
20 println!("{:#?}", value);
21 } else {
22 println!("{:#?}", resp.unwrap_err());
23 }
24}
Sourcepub async fn get_historical_cost_by_org_with_http_info(
&self,
start_month: DateTime<Utc>,
params: GetHistoricalCostByOrgOptionalParams,
) -> Result<ResponseContent<CostByOrgResponse>, Error<GetHistoricalCostByOrgError>>
pub async fn get_historical_cost_by_org_with_http_info( &self, start_month: DateTime<Utc>, params: GetHistoricalCostByOrgOptionalParams, ) -> Result<ResponseContent<CostByOrgResponse>, Error<GetHistoricalCostByOrgError>>
Get historical cost across multi-org and single root-org accounts. Cost data for a given month becomes available no later than the 16th of the following month.
This endpoint is only accessible for parent-level organizations.
Sourcepub async fn get_hourly_usage(
&self,
filter_timestamp_start: DateTime<Utc>,
filter_product_families: String,
params: GetHourlyUsageOptionalParams,
) -> Result<HourlyUsageResponse, Error<GetHourlyUsageError>>
pub async fn get_hourly_usage( &self, filter_timestamp_start: DateTime<Utc>, filter_product_families: String, params: GetHourlyUsageOptionalParams, ) -> Result<HourlyUsageResponse, Error<GetHourlyUsageError>>
Get hourly usage by product family.
Examples found in repository?
8async fn main() {
9 let configuration = datadog::Configuration::new();
10 let api = UsageMeteringAPI::with_config(configuration);
11 let resp = api
12 .get_hourly_usage(
13 DateTime::parse_from_rfc3339("2021-11-08T11:11:11+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 "infra_hosts".to_string(),
17 GetHourlyUsageOptionalParams::default(),
18 )
19 .await;
20 if let Ok(value) = resp {
21 println!("{:#?}", value);
22 } else {
23 println!("{:#?}", resp.unwrap_err());
24 }
25}
Sourcepub async fn get_hourly_usage_with_http_info(
&self,
filter_timestamp_start: DateTime<Utc>,
filter_product_families: String,
params: GetHourlyUsageOptionalParams,
) -> Result<ResponseContent<HourlyUsageResponse>, Error<GetHourlyUsageError>>
pub async fn get_hourly_usage_with_http_info( &self, filter_timestamp_start: DateTime<Utc>, filter_product_families: String, params: GetHourlyUsageOptionalParams, ) -> Result<ResponseContent<HourlyUsageResponse>, Error<GetHourlyUsageError>>
Get hourly usage by product family.
Sourcepub async fn get_monthly_cost_attribution(
&self,
start_month: DateTime<Utc>,
fields: String,
params: GetMonthlyCostAttributionOptionalParams,
) -> Result<MonthlyCostAttributionResponse, Error<GetMonthlyCostAttributionError>>
pub async fn get_monthly_cost_attribution( &self, start_month: DateTime<Utc>, fields: String, params: GetMonthlyCostAttributionOptionalParams, ) -> Result<MonthlyCostAttributionResponse, Error<GetMonthlyCostAttributionError>>
Get monthly cost attribution by tag across multi-org and single root-org accounts.
Cost Attribution data for a given month becomes available no later than the 19th of the following month.
This API endpoint is paginated. To make sure you receive all records, check if the value of next_record_id
is
set in the response. If it is, make another request and pass next_record_id
as a parameter.
Pseudo code example:
response := GetMonthlyCostAttribution(start_month, end_month)
cursor := response.metadata.pagination.next_record_id
WHILE cursor != null BEGIN
sleep(5 seconds) # Avoid running into rate limit
response := GetMonthlyCostAttribution(start_month, end_month, next_record_id=cursor)
cursor := response.metadata.pagination.next_record_id
END
This endpoint is only accessible for parent-level organizations. This endpoint is not available in the Government (US1-FED) site.
Examples found in repository?
8async fn main() {
9 let configuration = datadog::Configuration::new();
10 let api = UsageMeteringAPI::with_config(configuration);
11 let resp = api
12 .get_monthly_cost_attribution(
13 DateTime::parse_from_rfc3339("2021-11-06T11:11:11+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 "infra_host_total_cost".to_string(),
17 GetMonthlyCostAttributionOptionalParams::default().end_month(
18 DateTime::parse_from_rfc3339("2021-11-08T11:11:11+00:00")
19 .expect("Failed to parse datetime")
20 .with_timezone(&Utc),
21 ),
22 )
23 .await;
24 if let Ok(value) = resp {
25 println!("{:#?}", value);
26 } else {
27 println!("{:#?}", resp.unwrap_err());
28 }
29}
Sourcepub async fn get_monthly_cost_attribution_with_http_info(
&self,
start_month: DateTime<Utc>,
fields: String,
params: GetMonthlyCostAttributionOptionalParams,
) -> Result<ResponseContent<MonthlyCostAttributionResponse>, Error<GetMonthlyCostAttributionError>>
pub async fn get_monthly_cost_attribution_with_http_info( &self, start_month: DateTime<Utc>, fields: String, params: GetMonthlyCostAttributionOptionalParams, ) -> Result<ResponseContent<MonthlyCostAttributionResponse>, Error<GetMonthlyCostAttributionError>>
Get monthly cost attribution by tag across multi-org and single root-org accounts.
Cost Attribution data for a given month becomes available no later than the 19th of the following month.
This API endpoint is paginated. To make sure you receive all records, check if the value of next_record_id
is
set in the response. If it is, make another request and pass next_record_id
as a parameter.
Pseudo code example:
response := GetMonthlyCostAttribution(start_month, end_month)
cursor := response.metadata.pagination.next_record_id
WHILE cursor != null BEGIN
sleep(5 seconds) # Avoid running into rate limit
response := GetMonthlyCostAttribution(start_month, end_month, next_record_id=cursor)
cursor := response.metadata.pagination.next_record_id
END
This endpoint is only accessible for parent-level organizations. This endpoint is not available in the Government (US1-FED) site.
Sourcepub async fn get_projected_cost(
&self,
params: GetProjectedCostOptionalParams,
) -> Result<ProjectedCostResponse, Error<GetProjectedCostError>>
pub async fn get_projected_cost( &self, params: GetProjectedCostOptionalParams, ) -> Result<ProjectedCostResponse, Error<GetProjectedCostError>>
Get projected cost across multi-org and single root-org accounts. Projected cost data is only available for the current month and becomes available around the 12th of the month.
This endpoint is only accessible for parent-level organizations.
Examples found in repository?
7async fn main() {
8 let configuration = datadog::Configuration::new();
9 let api = UsageMeteringAPI::with_config(configuration);
10 let resp = api
11 .get_projected_cost(GetProjectedCostOptionalParams::default().view("sub-org".to_string()))
12 .await;
13 if let Ok(value) = resp {
14 println!("{:#?}", value);
15 } else {
16 println!("{:#?}", resp.unwrap_err());
17 }
18}
Sourcepub async fn get_projected_cost_with_http_info(
&self,
params: GetProjectedCostOptionalParams,
) -> Result<ResponseContent<ProjectedCostResponse>, Error<GetProjectedCostError>>
pub async fn get_projected_cost_with_http_info( &self, params: GetProjectedCostOptionalParams, ) -> Result<ResponseContent<ProjectedCostResponse>, Error<GetProjectedCostError>>
Get projected cost across multi-org and single root-org accounts. Projected cost data is only available for the current month and becomes available around the 12th of the month.
This endpoint is only accessible for parent-level organizations.
Sourcepub async fn get_usage_application_security_monitoring(
&self,
start_hr: DateTime<Utc>,
params: GetUsageApplicationSecurityMonitoringOptionalParams,
) -> Result<UsageApplicationSecurityMonitoringResponse, Error<GetUsageApplicationSecurityMonitoringError>>
pub async fn get_usage_application_security_monitoring( &self, start_hr: DateTime<Utc>, params: GetUsageApplicationSecurityMonitoringOptionalParams, ) -> Result<UsageApplicationSecurityMonitoringResponse, Error<GetUsageApplicationSecurityMonitoringError>>
Get hourly usage for application security . Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the Get hourly usage by product family API
Examples found in repository?
8async fn main() {
9 let configuration = datadog::Configuration::new();
10 let api = UsageMeteringAPI::with_config(configuration);
11 let resp = api
12 .get_usage_application_security_monitoring(
13 DateTime::parse_from_rfc3339("2021-11-06T11:11:11+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 GetUsageApplicationSecurityMonitoringOptionalParams::default().end_hr(
17 DateTime::parse_from_rfc3339("2021-11-08T11:11:11+00:00")
18 .expect("Failed to parse datetime")
19 .with_timezone(&Utc),
20 ),
21 )
22 .await;
23 if let Ok(value) = resp {
24 println!("{:#?}", value);
25 } else {
26 println!("{:#?}", resp.unwrap_err());
27 }
28}
Sourcepub async fn get_usage_application_security_monitoring_with_http_info(
&self,
start_hr: DateTime<Utc>,
params: GetUsageApplicationSecurityMonitoringOptionalParams,
) -> Result<ResponseContent<UsageApplicationSecurityMonitoringResponse>, Error<GetUsageApplicationSecurityMonitoringError>>
pub async fn get_usage_application_security_monitoring_with_http_info( &self, start_hr: DateTime<Utc>, params: GetUsageApplicationSecurityMonitoringOptionalParams, ) -> Result<ResponseContent<UsageApplicationSecurityMonitoringResponse>, Error<GetUsageApplicationSecurityMonitoringError>>
Get hourly usage for application security . Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the Get hourly usage by product family API
Sourcepub async fn get_usage_lambda_traced_invocations(
&self,
start_hr: DateTime<Utc>,
params: GetUsageLambdaTracedInvocationsOptionalParams,
) -> Result<UsageLambdaTracedInvocationsResponse, Error<GetUsageLambdaTracedInvocationsError>>
pub async fn get_usage_lambda_traced_invocations( &self, start_hr: DateTime<Utc>, params: GetUsageLambdaTracedInvocationsOptionalParams, ) -> Result<UsageLambdaTracedInvocationsResponse, Error<GetUsageLambdaTracedInvocationsError>>
Get hourly usage for Lambda traced invocations. Note: This endpoint has been deprecated.. Hourly usage data for all products is now available in the Get hourly usage by product family API
Examples found in repository?
8async fn main() {
9 let configuration = datadog::Configuration::new();
10 let api = UsageMeteringAPI::with_config(configuration);
11 let resp = api
12 .get_usage_lambda_traced_invocations(
13 DateTime::parse_from_rfc3339("2021-11-06T11:11:11+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 GetUsageLambdaTracedInvocationsOptionalParams::default().end_hr(
17 DateTime::parse_from_rfc3339("2021-11-08T11:11:11+00:00")
18 .expect("Failed to parse datetime")
19 .with_timezone(&Utc),
20 ),
21 )
22 .await;
23 if let Ok(value) = resp {
24 println!("{:#?}", value);
25 } else {
26 println!("{:#?}", resp.unwrap_err());
27 }
28}
Sourcepub async fn get_usage_lambda_traced_invocations_with_http_info(
&self,
start_hr: DateTime<Utc>,
params: GetUsageLambdaTracedInvocationsOptionalParams,
) -> Result<ResponseContent<UsageLambdaTracedInvocationsResponse>, Error<GetUsageLambdaTracedInvocationsError>>
pub async fn get_usage_lambda_traced_invocations_with_http_info( &self, start_hr: DateTime<Utc>, params: GetUsageLambdaTracedInvocationsOptionalParams, ) -> Result<ResponseContent<UsageLambdaTracedInvocationsResponse>, Error<GetUsageLambdaTracedInvocationsError>>
Get hourly usage for Lambda traced invocations. Note: This endpoint has been deprecated.. Hourly usage data for all products is now available in the Get hourly usage by product family API
Sourcepub async fn get_usage_observability_pipelines(
&self,
start_hr: DateTime<Utc>,
params: GetUsageObservabilityPipelinesOptionalParams,
) -> Result<UsageObservabilityPipelinesResponse, Error<GetUsageObservabilityPipelinesError>>
pub async fn get_usage_observability_pipelines( &self, start_hr: DateTime<Utc>, params: GetUsageObservabilityPipelinesOptionalParams, ) -> Result<UsageObservabilityPipelinesResponse, Error<GetUsageObservabilityPipelinesError>>
Get hourly usage for observability pipelines. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the Get hourly usage by product family API
Examples found in repository?
8async fn main() {
9 let configuration = datadog::Configuration::new();
10 let api = UsageMeteringAPI::with_config(configuration);
11 let resp = api
12 .get_usage_observability_pipelines(
13 DateTime::parse_from_rfc3339("2021-11-06T11:11:11+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 GetUsageObservabilityPipelinesOptionalParams::default().end_hr(
17 DateTime::parse_from_rfc3339("2021-11-08T11:11:11+00:00")
18 .expect("Failed to parse datetime")
19 .with_timezone(&Utc),
20 ),
21 )
22 .await;
23 if let Ok(value) = resp {
24 println!("{:#?}", value);
25 } else {
26 println!("{:#?}", resp.unwrap_err());
27 }
28}
Sourcepub async fn get_usage_observability_pipelines_with_http_info(
&self,
start_hr: DateTime<Utc>,
params: GetUsageObservabilityPipelinesOptionalParams,
) -> Result<ResponseContent<UsageObservabilityPipelinesResponse>, Error<GetUsageObservabilityPipelinesError>>
pub async fn get_usage_observability_pipelines_with_http_info( &self, start_hr: DateTime<Utc>, params: GetUsageObservabilityPipelinesOptionalParams, ) -> Result<ResponseContent<UsageObservabilityPipelinesResponse>, Error<GetUsageObservabilityPipelinesError>>
Get hourly usage for observability pipelines. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the Get hourly usage by product family API
Trait Implementations§
Source§impl Clone for UsageMeteringAPI
impl Clone for UsageMeteringAPI
Source§fn clone(&self) -> UsageMeteringAPI
fn clone(&self) -> UsageMeteringAPI
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read more