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?
6async fn main() {
7 let configuration = datadog::Configuration::new();
8 let api = UsageMeteringAPI::with_config(configuration);
9 let resp = api
10 .get_specified_daily_custom_reports("2022-03-20".to_string())
11 .await;
12 if let Ok(value) = resp {
13 println!("{:#?}", value);
14 } else {
15 println!("{:#?}", resp.unwrap_err());
16 }
17}
More examples
6async fn main() {
7 let configuration = datadog::Configuration::new();
8 let api = UsageMeteringAPI::with_config(configuration);
9 let resp = api
10 .get_specified_monthly_custom_reports("2021-05-01".to_string())
11 .await;
12 if let Ok(value) = resp {
13 println!("{:#?}", value);
14 } else {
15 println!("{:#?}", resp.unwrap_err());
16 }
17}
7async fn main() {
8 let configuration = datadog::Configuration::new();
9 let api = UsageMeteringAPI::with_config(configuration);
10 let resp = api
11 .get_daily_custom_reports(GetDailyCustomReportsOptionalParams::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_monthly_custom_reports(GetMonthlyCustomReportsOptionalParams::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_usage_billable_summary(GetUsageBillableSummaryOptionalParams::default())
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_usage_dbm(
13 DateTime::parse_from_rfc3339("2021-11-11T11:11:11.111000+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 GetUsageDBMOptionalParams::default(),
17 )
18 .await;
19 if let Ok(value) = resp {
20 println!("{:#?}", value);
21 } else {
22 println!("{:#?}", resp.unwrap_err());
23 }
24}
- examples/v1_usage-metering_GetUsageSDS.rs
- examples/v1_usage-metering_GetUsageLogs.rs
- examples/v1_usage-metering_GetUsageSummary.rs
- examples/v1_usage-metering_GetUsageRumUnits.rs
- examples/v1_usage-metering_GetUsageSynthetics.rs
- examples/v1_usage-metering_GetUsageRumSessions.rs
- examples/v1_usage-metering_GetUsageLogsByIndex.rs
- examples/v1_usage-metering_GetUsageNetworkFlows.rs
- examples/v1_usage-metering_GetUsageNetworkHosts.rs
- examples/v1_usage-metering_GetUsageOnlineArchive.rs
- examples/v1_usage-metering_GetUsageSyntheticsAPI.rs
- examples/v1_usage-metering_GetUsageSyntheticsBrowser.rs
- examples/v1_usage-metering_GetUsageTopAvgMetrics.rs
- examples/v1_usage-metering_GetUsageCloudSecurityPostureManagement.rs
- examples/v1_usage-metering_GetHourlyUsageAttribution.rs
- examples/v1_usage-metering_GetMonthlyUsageAttribution.rs
- examples/v1_usage-metering_GetUsageCWS.rs
- examples/v1_usage-metering_GetUsageDBM_3446806203.rs
- examples/v1_usage-metering_GetUsageSDS_271128478.rs
- examples/v1_usage-metering_GetUsageLogs_2562396405.rs
- examples/v1_usage-metering_GetUsageSNMP.rs
- examples/v1_usage-metering_GetUsageHosts.rs
- examples/v1_usage-metering_GetUsageCIApp.rs
- examples/v1_usage-metering_GetUsageLambda.rs
- examples/v1_usage-metering_GetUsageFargate.rs
- examples/v1_usage-metering_GetIngestedSpans.rs
- examples/v1_usage-metering_GetUsageRumUnits_3959755399.rs
- examples/v1_usage-metering_GetUsageProfiling.rs
- examples/v1_usage-metering_GetUsageAuditLogs.rs
- examples/v1_usage-metering_GetUsageTimeseries.rs
- examples/v1_usage-metering_GetUsageRumSessions_714937291.rs
- examples/v1_usage-metering_GetUsageLogsByIndex_1025184776.rs
- examples/v1_usage-metering_GetUsageAnalyzedLogs.rs
- examples/v1_usage-metering_GetUsageIndexedSpans.rs
- examples/v1_usage-metering_GetUsageNetworkFlows_1239422069.rs
- examples/v1_usage-metering_GetUsageNetworkHosts_1249907835.rs
- examples/v1_usage-metering_GetIncidentManagement.rs
- examples/v1_usage-metering_GetUsageOnlineArchive_1501172903.rs
- examples/v1_usage-metering_GetUsageSyntheticsAPI_4048033529.rs
- examples/v1_usage-metering_GetUsageLogsByRetention.rs
- examples/v1_usage-metering_GetUsageInternetOfThings.rs
- examples/v1_usage-metering_GetUsageSyntheticsBrowser_1704663299.rs
- examples/v1_usage-metering_GetUsageRumSessions_3271366243.rs
- examples/v1_usage-metering_GetMonthlyUsageAttribution_3849653599.rs
pub fn with_client_and_config( config: Configuration, client: ClientWithMiddleware, ) -> Self
Sourcepub async fn get_daily_custom_reports(
&self,
params: GetDailyCustomReportsOptionalParams,
) -> Result<UsageCustomReportsResponse, Error<GetDailyCustomReportsError>>
pub async fn get_daily_custom_reports( &self, params: GetDailyCustomReportsOptionalParams, ) -> Result<UsageCustomReportsResponse, Error<GetDailyCustomReportsError>>
Get daily custom reports. Note: This endpoint will be fully deprecated on December 1, 2022. Refer to Migrating from v1 to v2 of the Usage Attribution API for the associated migration guide.
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_daily_custom_reports(GetDailyCustomReportsOptionalParams::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_daily_custom_reports_with_http_info(
&self,
params: GetDailyCustomReportsOptionalParams,
) -> Result<ResponseContent<UsageCustomReportsResponse>, Error<GetDailyCustomReportsError>>
pub async fn get_daily_custom_reports_with_http_info( &self, params: GetDailyCustomReportsOptionalParams, ) -> Result<ResponseContent<UsageCustomReportsResponse>, Error<GetDailyCustomReportsError>>
Get daily custom reports. Note: This endpoint will be fully deprecated on December 1, 2022. Refer to Migrating from v1 to v2 of the Usage Attribution API for the associated migration guide.
Sourcepub async fn get_hourly_usage_attribution(
&self,
start_hr: DateTime<Utc>,
usage_type: HourlyUsageAttributionUsageType,
params: GetHourlyUsageAttributionOptionalParams,
) -> Result<HourlyUsageAttributionResponse, Error<GetHourlyUsageAttributionError>>
pub async fn get_hourly_usage_attribution( &self, start_hr: DateTime<Utc>, usage_type: HourlyUsageAttributionUsageType, params: GetHourlyUsageAttributionOptionalParams, ) -> Result<HourlyUsageAttributionResponse, Error<GetHourlyUsageAttributionError>>
Get hourly usage attribution. Multi-region data is available starting March 1, 2023.
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 := GetHourlyUsageAttribution(start_month)
cursor := response.metadata.pagination.next_record_id
WHILE cursor != null BEGIN
sleep(5 seconds) # Avoid running into rate limit
response := GetHourlyUsageAttribution(start_month, next_record_id=cursor)
cursor := response.metadata.pagination.next_record_id
END
Examples found in repository?
9async fn main() {
10 let configuration = datadog::Configuration::new();
11 let api = UsageMeteringAPI::with_config(configuration);
12 let resp = api
13 .get_hourly_usage_attribution(
14 DateTime::parse_from_rfc3339("2021-11-08T11:11:11+00:00")
15 .expect("Failed to parse datetime")
16 .with_timezone(&Utc),
17 HourlyUsageAttributionUsageType::INFRA_HOST_USAGE,
18 GetHourlyUsageAttributionOptionalParams::default(),
19 )
20 .await;
21 if let Ok(value) = resp {
22 println!("{:#?}", value);
23 } else {
24 println!("{:#?}", resp.unwrap_err());
25 }
26}
Sourcepub async fn get_hourly_usage_attribution_with_http_info(
&self,
start_hr: DateTime<Utc>,
usage_type: HourlyUsageAttributionUsageType,
params: GetHourlyUsageAttributionOptionalParams,
) -> Result<ResponseContent<HourlyUsageAttributionResponse>, Error<GetHourlyUsageAttributionError>>
pub async fn get_hourly_usage_attribution_with_http_info( &self, start_hr: DateTime<Utc>, usage_type: HourlyUsageAttributionUsageType, params: GetHourlyUsageAttributionOptionalParams, ) -> Result<ResponseContent<HourlyUsageAttributionResponse>, Error<GetHourlyUsageAttributionError>>
Get hourly usage attribution. Multi-region data is available starting March 1, 2023.
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 := GetHourlyUsageAttribution(start_month)
cursor := response.metadata.pagination.next_record_id
WHILE cursor != null BEGIN
sleep(5 seconds) # Avoid running into rate limit
response := GetHourlyUsageAttribution(start_month, next_record_id=cursor)
cursor := response.metadata.pagination.next_record_id
END
Sourcepub async fn get_incident_management(
&self,
start_hr: DateTime<Utc>,
params: GetIncidentManagementOptionalParams,
) -> Result<UsageIncidentManagementResponse, Error<GetIncidentManagementError>>
pub async fn get_incident_management( &self, start_hr: DateTime<Utc>, params: GetIncidentManagementOptionalParams, ) -> Result<UsageIncidentManagementResponse, Error<GetIncidentManagementError>>
Get hourly usage for incident management. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.
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_incident_management(
13 DateTime::parse_from_rfc3339("2021-11-06T11:11:11+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 GetIncidentManagementOptionalParams::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_incident_management_with_http_info(
&self,
start_hr: DateTime<Utc>,
params: GetIncidentManagementOptionalParams,
) -> Result<ResponseContent<UsageIncidentManagementResponse>, Error<GetIncidentManagementError>>
pub async fn get_incident_management_with_http_info( &self, start_hr: DateTime<Utc>, params: GetIncidentManagementOptionalParams, ) -> Result<ResponseContent<UsageIncidentManagementResponse>, Error<GetIncidentManagementError>>
Get hourly usage for incident management. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.
Sourcepub async fn get_ingested_spans(
&self,
start_hr: DateTime<Utc>,
params: GetIngestedSpansOptionalParams,
) -> Result<UsageIngestedSpansResponse, Error<GetIngestedSpansError>>
pub async fn get_ingested_spans( &self, start_hr: DateTime<Utc>, params: GetIngestedSpansOptionalParams, ) -> Result<UsageIngestedSpansResponse, Error<GetIngestedSpansError>>
Get hourly usage for ingested spans. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.
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_ingested_spans(
13 DateTime::parse_from_rfc3339("2021-11-06T11:11:11+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 GetIngestedSpansOptionalParams::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_ingested_spans_with_http_info(
&self,
start_hr: DateTime<Utc>,
params: GetIngestedSpansOptionalParams,
) -> Result<ResponseContent<UsageIngestedSpansResponse>, Error<GetIngestedSpansError>>
pub async fn get_ingested_spans_with_http_info( &self, start_hr: DateTime<Utc>, params: GetIngestedSpansOptionalParams, ) -> Result<ResponseContent<UsageIngestedSpansResponse>, Error<GetIngestedSpansError>>
Get hourly usage for ingested spans. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.
Sourcepub async fn get_monthly_custom_reports(
&self,
params: GetMonthlyCustomReportsOptionalParams,
) -> Result<UsageCustomReportsResponse, Error<GetMonthlyCustomReportsError>>
pub async fn get_monthly_custom_reports( &self, params: GetMonthlyCustomReportsOptionalParams, ) -> Result<UsageCustomReportsResponse, Error<GetMonthlyCustomReportsError>>
Get monthly custom reports. Note: This endpoint will be fully deprecated on December 1, 2022. Refer to Migrating from v1 to v2 of the Usage Attribution API for the associated migration guide.
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_monthly_custom_reports(GetMonthlyCustomReportsOptionalParams::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_monthly_custom_reports_with_http_info(
&self,
params: GetMonthlyCustomReportsOptionalParams,
) -> Result<ResponseContent<UsageCustomReportsResponse>, Error<GetMonthlyCustomReportsError>>
pub async fn get_monthly_custom_reports_with_http_info( &self, params: GetMonthlyCustomReportsOptionalParams, ) -> Result<ResponseContent<UsageCustomReportsResponse>, Error<GetMonthlyCustomReportsError>>
Get monthly custom reports. Note: This endpoint will be fully deprecated on December 1, 2022. Refer to Migrating from v1 to v2 of the Usage Attribution API for the associated migration guide.
Sourcepub async fn get_monthly_usage_attribution(
&self,
start_month: DateTime<Utc>,
fields: MonthlyUsageAttributionSupportedMetrics,
params: GetMonthlyUsageAttributionOptionalParams,
) -> Result<MonthlyUsageAttributionResponse, Error<GetMonthlyUsageAttributionError>>
pub async fn get_monthly_usage_attribution( &self, start_month: DateTime<Utc>, fields: MonthlyUsageAttributionSupportedMetrics, params: GetMonthlyUsageAttributionOptionalParams, ) -> Result<MonthlyUsageAttributionResponse, Error<GetMonthlyUsageAttributionError>>
Get monthly usage attribution. Multi-region data is available starting March 1, 2023.
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 := GetMonthlyUsageAttribution(start_month)
cursor := response.metadata.pagination.next_record_id
WHILE cursor != null BEGIN
sleep(5 seconds) # Avoid running into rate limit
response := GetMonthlyUsageAttribution(start_month, next_record_id=cursor)
cursor := response.metadata.pagination.next_record_id
END
Examples found in repository?
9async fn main() {
10 let configuration = datadog::Configuration::new();
11 let api = UsageMeteringAPI::with_config(configuration);
12 let resp = api
13 .get_monthly_usage_attribution(
14 DateTime::parse_from_rfc3339("2021-11-08T11:11:11+00:00")
15 .expect("Failed to parse datetime")
16 .with_timezone(&Utc),
17 MonthlyUsageAttributionSupportedMetrics::INFRA_HOST_USAGE,
18 GetMonthlyUsageAttributionOptionalParams::default(),
19 )
20 .await;
21 if let Ok(value) = resp {
22 println!("{:#?}", value);
23 } else {
24 println!("{:#?}", resp.unwrap_err());
25 }
26}
More examples
9async fn main() {
10 // there is a valid "monthly_usage_attribution" response
11 let monthly_usage_attribution_metadata_pagination_next_record_id =
12 std::env::var("MONTHLY_USAGE_ATTRIBUTION_METADATA_PAGINATION_NEXT_RECORD_ID").unwrap();
13 let configuration = datadog::Configuration::new();
14 let api = UsageMeteringAPI::with_config(configuration);
15 let resp = api
16 .get_monthly_usage_attribution(
17 DateTime::parse_from_rfc3339("2021-11-08T11:11:11+00:00")
18 .expect("Failed to parse datetime")
19 .with_timezone(&Utc),
20 MonthlyUsageAttributionSupportedMetrics::INFRA_HOST_USAGE,
21 GetMonthlyUsageAttributionOptionalParams::default().next_record_id(
22 monthly_usage_attribution_metadata_pagination_next_record_id.clone(),
23 ),
24 )
25 .await;
26 if let Ok(value) = resp {
27 println!("{:#?}", value);
28 } else {
29 println!("{:#?}", resp.unwrap_err());
30 }
31}
Sourcepub async fn get_monthly_usage_attribution_with_http_info(
&self,
start_month: DateTime<Utc>,
fields: MonthlyUsageAttributionSupportedMetrics,
params: GetMonthlyUsageAttributionOptionalParams,
) -> Result<ResponseContent<MonthlyUsageAttributionResponse>, Error<GetMonthlyUsageAttributionError>>
pub async fn get_monthly_usage_attribution_with_http_info( &self, start_month: DateTime<Utc>, fields: MonthlyUsageAttributionSupportedMetrics, params: GetMonthlyUsageAttributionOptionalParams, ) -> Result<ResponseContent<MonthlyUsageAttributionResponse>, Error<GetMonthlyUsageAttributionError>>
Get monthly usage attribution. Multi-region data is available starting March 1, 2023.
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 := GetMonthlyUsageAttribution(start_month)
cursor := response.metadata.pagination.next_record_id
WHILE cursor != null BEGIN
sleep(5 seconds) # Avoid running into rate limit
response := GetMonthlyUsageAttribution(start_month, next_record_id=cursor)
cursor := response.metadata.pagination.next_record_id
END
Sourcepub async fn get_specified_daily_custom_reports(
&self,
report_id: String,
) -> Result<UsageSpecifiedCustomReportsResponse, Error<GetSpecifiedDailyCustomReportsError>>
pub async fn get_specified_daily_custom_reports( &self, report_id: String, ) -> Result<UsageSpecifiedCustomReportsResponse, Error<GetSpecifiedDailyCustomReportsError>>
Get specified daily custom reports. Note: This endpoint will be fully deprecated on December 1, 2022. Refer to Migrating from v1 to v2 of the Usage Attribution API for the associated migration guide.
Examples found in repository?
6async fn main() {
7 let configuration = datadog::Configuration::new();
8 let api = UsageMeteringAPI::with_config(configuration);
9 let resp = api
10 .get_specified_daily_custom_reports("2022-03-20".to_string())
11 .await;
12 if let Ok(value) = resp {
13 println!("{:#?}", value);
14 } else {
15 println!("{:#?}", resp.unwrap_err());
16 }
17}
Sourcepub async fn get_specified_daily_custom_reports_with_http_info(
&self,
report_id: String,
) -> Result<ResponseContent<UsageSpecifiedCustomReportsResponse>, Error<GetSpecifiedDailyCustomReportsError>>
pub async fn get_specified_daily_custom_reports_with_http_info( &self, report_id: String, ) -> Result<ResponseContent<UsageSpecifiedCustomReportsResponse>, Error<GetSpecifiedDailyCustomReportsError>>
Get specified daily custom reports. Note: This endpoint will be fully deprecated on December 1, 2022. Refer to Migrating from v1 to v2 of the Usage Attribution API for the associated migration guide.
Sourcepub async fn get_specified_monthly_custom_reports(
&self,
report_id: String,
) -> Result<UsageSpecifiedCustomReportsResponse, Error<GetSpecifiedMonthlyCustomReportsError>>
pub async fn get_specified_monthly_custom_reports( &self, report_id: String, ) -> Result<UsageSpecifiedCustomReportsResponse, Error<GetSpecifiedMonthlyCustomReportsError>>
Get specified monthly custom reports. Note: This endpoint will be fully deprecated on December 1, 2022. Refer to Migrating from v1 to v2 of the Usage Attribution API for the associated migration guide.
Examples found in repository?
6async fn main() {
7 let configuration = datadog::Configuration::new();
8 let api = UsageMeteringAPI::with_config(configuration);
9 let resp = api
10 .get_specified_monthly_custom_reports("2021-05-01".to_string())
11 .await;
12 if let Ok(value) = resp {
13 println!("{:#?}", value);
14 } else {
15 println!("{:#?}", resp.unwrap_err());
16 }
17}
Sourcepub async fn get_specified_monthly_custom_reports_with_http_info(
&self,
report_id: String,
) -> Result<ResponseContent<UsageSpecifiedCustomReportsResponse>, Error<GetSpecifiedMonthlyCustomReportsError>>
pub async fn get_specified_monthly_custom_reports_with_http_info( &self, report_id: String, ) -> Result<ResponseContent<UsageSpecifiedCustomReportsResponse>, Error<GetSpecifiedMonthlyCustomReportsError>>
Get specified monthly custom reports. Note: This endpoint will be fully deprecated on December 1, 2022. Refer to Migrating from v1 to v2 of the Usage Attribution API for the associated migration guide.
Sourcepub async fn get_usage_analyzed_logs(
&self,
start_hr: DateTime<Utc>,
params: GetUsageAnalyzedLogsOptionalParams,
) -> Result<UsageAnalyzedLogsResponse, Error<GetUsageAnalyzedLogsError>>
pub async fn get_usage_analyzed_logs( &self, start_hr: DateTime<Utc>, params: GetUsageAnalyzedLogsOptionalParams, ) -> Result<UsageAnalyzedLogsResponse, Error<GetUsageAnalyzedLogsError>>
Get hourly usage for analyzed logs (Security Monitoring). Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.
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_analyzed_logs(
13 DateTime::parse_from_rfc3339("2021-11-06T11:11:11+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 GetUsageAnalyzedLogsOptionalParams::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_analyzed_logs_with_http_info(
&self,
start_hr: DateTime<Utc>,
params: GetUsageAnalyzedLogsOptionalParams,
) -> Result<ResponseContent<UsageAnalyzedLogsResponse>, Error<GetUsageAnalyzedLogsError>>
pub async fn get_usage_analyzed_logs_with_http_info( &self, start_hr: DateTime<Utc>, params: GetUsageAnalyzedLogsOptionalParams, ) -> Result<ResponseContent<UsageAnalyzedLogsResponse>, Error<GetUsageAnalyzedLogsError>>
Get hourly usage for analyzed logs (Security Monitoring). Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.
Sourcepub async fn get_usage_audit_logs(
&self,
start_hr: DateTime<Utc>,
params: GetUsageAuditLogsOptionalParams,
) -> Result<UsageAuditLogsResponse, Error<GetUsageAuditLogsError>>
pub async fn get_usage_audit_logs( &self, start_hr: DateTime<Utc>, params: GetUsageAuditLogsOptionalParams, ) -> Result<UsageAuditLogsResponse, Error<GetUsageAuditLogsError>>
Get hourly usage for audit logs. Note: This endpoint has been deprecated.
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_audit_logs(
13 DateTime::parse_from_rfc3339("2021-11-06T11:11:11+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 GetUsageAuditLogsOptionalParams::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_audit_logs_with_http_info(
&self,
start_hr: DateTime<Utc>,
params: GetUsageAuditLogsOptionalParams,
) -> Result<ResponseContent<UsageAuditLogsResponse>, Error<GetUsageAuditLogsError>>
pub async fn get_usage_audit_logs_with_http_info( &self, start_hr: DateTime<Utc>, params: GetUsageAuditLogsOptionalParams, ) -> Result<ResponseContent<UsageAuditLogsResponse>, Error<GetUsageAuditLogsError>>
Get hourly usage for audit logs. Note: This endpoint has been deprecated.
Sourcepub async fn get_usage_billable_summary(
&self,
params: GetUsageBillableSummaryOptionalParams,
) -> Result<UsageBillableSummaryResponse, Error<GetUsageBillableSummaryError>>
pub async fn get_usage_billable_summary( &self, params: GetUsageBillableSummaryOptionalParams, ) -> Result<UsageBillableSummaryResponse, Error<GetUsageBillableSummaryError>>
Get billable usage across your account.
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_usage_billable_summary(GetUsageBillableSummaryOptionalParams::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_usage_billable_summary_with_http_info(
&self,
params: GetUsageBillableSummaryOptionalParams,
) -> Result<ResponseContent<UsageBillableSummaryResponse>, Error<GetUsageBillableSummaryError>>
pub async fn get_usage_billable_summary_with_http_info( &self, params: GetUsageBillableSummaryOptionalParams, ) -> Result<ResponseContent<UsageBillableSummaryResponse>, Error<GetUsageBillableSummaryError>>
Get billable usage across your account.
This endpoint is only accessible for parent-level organizations.
Sourcepub async fn get_usage_ci_app(
&self,
start_hr: DateTime<Utc>,
params: GetUsageCIAppOptionalParams,
) -> Result<UsageCIVisibilityResponse, Error<GetUsageCIAppError>>
pub async fn get_usage_ci_app( &self, start_hr: DateTime<Utc>, params: GetUsageCIAppOptionalParams, ) -> Result<UsageCIVisibilityResponse, Error<GetUsageCIAppError>>
Get hourly usage for CI visibility (tests, pipeline, and spans). Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.
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_ci_app(
13 DateTime::parse_from_rfc3339("2021-11-06T11:11:11+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 GetUsageCIAppOptionalParams::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_ci_app_with_http_info(
&self,
start_hr: DateTime<Utc>,
params: GetUsageCIAppOptionalParams,
) -> Result<ResponseContent<UsageCIVisibilityResponse>, Error<GetUsageCIAppError>>
pub async fn get_usage_ci_app_with_http_info( &self, start_hr: DateTime<Utc>, params: GetUsageCIAppOptionalParams, ) -> Result<ResponseContent<UsageCIVisibilityResponse>, Error<GetUsageCIAppError>>
Get hourly usage for CI visibility (tests, pipeline, and spans). Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.
Sourcepub async fn get_usage_cws(
&self,
start_hr: DateTime<Utc>,
params: GetUsageCWSOptionalParams,
) -> Result<UsageCWSResponse, Error<GetUsageCWSError>>
pub async fn get_usage_cws( &self, start_hr: DateTime<Utc>, params: GetUsageCWSOptionalParams, ) -> Result<UsageCWSResponse, Error<GetUsageCWSError>>
Get hourly usage for cloud workload 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. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.
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_cws(
13 DateTime::parse_from_rfc3339("2021-11-06T11:11:11+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 GetUsageCWSOptionalParams::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_cws_with_http_info(
&self,
start_hr: DateTime<Utc>,
params: GetUsageCWSOptionalParams,
) -> Result<ResponseContent<UsageCWSResponse>, Error<GetUsageCWSError>>
pub async fn get_usage_cws_with_http_info( &self, start_hr: DateTime<Utc>, params: GetUsageCWSOptionalParams, ) -> Result<ResponseContent<UsageCWSResponse>, Error<GetUsageCWSError>>
Get hourly usage for cloud workload 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. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.
Sourcepub async fn get_usage_cloud_security_posture_management(
&self,
start_hr: DateTime<Utc>,
params: GetUsageCloudSecurityPostureManagementOptionalParams,
) -> Result<UsageCloudSecurityPostureManagementResponse, Error<GetUsageCloudSecurityPostureManagementError>>
pub async fn get_usage_cloud_security_posture_management( &self, start_hr: DateTime<Utc>, params: GetUsageCloudSecurityPostureManagementOptionalParams, ) -> Result<UsageCloudSecurityPostureManagementResponse, Error<GetUsageCloudSecurityPostureManagementError>>
Get hourly usage for cloud security management (CSM) pro. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.
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_cloud_security_posture_management(
13 DateTime::parse_from_rfc3339("2021-11-08T11:11:11+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 GetUsageCloudSecurityPostureManagementOptionalParams::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_usage_cloud_security_posture_management_with_http_info(
&self,
start_hr: DateTime<Utc>,
params: GetUsageCloudSecurityPostureManagementOptionalParams,
) -> Result<ResponseContent<UsageCloudSecurityPostureManagementResponse>, Error<GetUsageCloudSecurityPostureManagementError>>
pub async fn get_usage_cloud_security_posture_management_with_http_info( &self, start_hr: DateTime<Utc>, params: GetUsageCloudSecurityPostureManagementOptionalParams, ) -> Result<ResponseContent<UsageCloudSecurityPostureManagementResponse>, Error<GetUsageCloudSecurityPostureManagementError>>
Get hourly usage for cloud security management (CSM) pro. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.
Sourcepub async fn get_usage_dbm(
&self,
start_hr: DateTime<Utc>,
params: GetUsageDBMOptionalParams,
) -> Result<UsageDBMResponse, Error<GetUsageDBMError>>
pub async fn get_usage_dbm( &self, start_hr: DateTime<Utc>, params: GetUsageDBMOptionalParams, ) -> Result<UsageDBMResponse, Error<GetUsageDBMError>>
Get hourly usage for database monitoring Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.
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_dbm(
13 DateTime::parse_from_rfc3339("2021-11-11T11:11:11.111000+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 GetUsageDBMOptionalParams::default(),
17 )
18 .await;
19 if let Ok(value) = resp {
20 println!("{:#?}", value);
21 } else {
22 println!("{:#?}", resp.unwrap_err());
23 }
24}
More examples
8async fn main() {
9 let configuration = datadog::Configuration::new();
10 let api = UsageMeteringAPI::with_config(configuration);
11 let resp = api
12 .get_usage_dbm(
13 DateTime::parse_from_rfc3339("2021-11-06T11:11:11+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 GetUsageDBMOptionalParams::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_dbm_with_http_info(
&self,
start_hr: DateTime<Utc>,
params: GetUsageDBMOptionalParams,
) -> Result<ResponseContent<UsageDBMResponse>, Error<GetUsageDBMError>>
pub async fn get_usage_dbm_with_http_info( &self, start_hr: DateTime<Utc>, params: GetUsageDBMOptionalParams, ) -> Result<ResponseContent<UsageDBMResponse>, Error<GetUsageDBMError>>
Get hourly usage for database monitoring Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.
Sourcepub async fn get_usage_fargate(
&self,
start_hr: DateTime<Utc>,
params: GetUsageFargateOptionalParams,
) -> Result<UsageFargateResponse, Error<GetUsageFargateError>>
pub async fn get_usage_fargate( &self, start_hr: DateTime<Utc>, params: GetUsageFargateOptionalParams, ) -> Result<UsageFargateResponse, Error<GetUsageFargateError>>
Get hourly usage for Fargate. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.
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_fargate(
13 DateTime::parse_from_rfc3339("2021-11-06T11:11:11+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 GetUsageFargateOptionalParams::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_fargate_with_http_info(
&self,
start_hr: DateTime<Utc>,
params: GetUsageFargateOptionalParams,
) -> Result<ResponseContent<UsageFargateResponse>, Error<GetUsageFargateError>>
pub async fn get_usage_fargate_with_http_info( &self, start_hr: DateTime<Utc>, params: GetUsageFargateOptionalParams, ) -> Result<ResponseContent<UsageFargateResponse>, Error<GetUsageFargateError>>
Get hourly usage for Fargate. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.
Sourcepub async fn get_usage_hosts(
&self,
start_hr: DateTime<Utc>,
params: GetUsageHostsOptionalParams,
) -> Result<UsageHostsResponse, Error<GetUsageHostsError>>
pub async fn get_usage_hosts( &self, start_hr: DateTime<Utc>, params: GetUsageHostsOptionalParams, ) -> Result<UsageHostsResponse, Error<GetUsageHostsError>>
Get hourly usage for hosts and containers. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.
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_hosts(
13 DateTime::parse_from_rfc3339("2021-11-06T11:11:11+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 GetUsageHostsOptionalParams::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_hosts_with_http_info(
&self,
start_hr: DateTime<Utc>,
params: GetUsageHostsOptionalParams,
) -> Result<ResponseContent<UsageHostsResponse>, Error<GetUsageHostsError>>
pub async fn get_usage_hosts_with_http_info( &self, start_hr: DateTime<Utc>, params: GetUsageHostsOptionalParams, ) -> Result<ResponseContent<UsageHostsResponse>, Error<GetUsageHostsError>>
Get hourly usage for hosts and containers. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.
Sourcepub async fn get_usage_indexed_spans(
&self,
start_hr: DateTime<Utc>,
params: GetUsageIndexedSpansOptionalParams,
) -> Result<UsageIndexedSpansResponse, Error<GetUsageIndexedSpansError>>
pub async fn get_usage_indexed_spans( &self, start_hr: DateTime<Utc>, params: GetUsageIndexedSpansOptionalParams, ) -> Result<UsageIndexedSpansResponse, Error<GetUsageIndexedSpansError>>
Get hourly usage for indexed spans. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.
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_indexed_spans(
13 DateTime::parse_from_rfc3339("2021-11-06T11:11:11+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 GetUsageIndexedSpansOptionalParams::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_indexed_spans_with_http_info(
&self,
start_hr: DateTime<Utc>,
params: GetUsageIndexedSpansOptionalParams,
) -> Result<ResponseContent<UsageIndexedSpansResponse>, Error<GetUsageIndexedSpansError>>
pub async fn get_usage_indexed_spans_with_http_info( &self, start_hr: DateTime<Utc>, params: GetUsageIndexedSpansOptionalParams, ) -> Result<ResponseContent<UsageIndexedSpansResponse>, Error<GetUsageIndexedSpansError>>
Get hourly usage for indexed spans. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.
Sourcepub async fn get_usage_internet_of_things(
&self,
start_hr: DateTime<Utc>,
params: GetUsageInternetOfThingsOptionalParams,
) -> Result<UsageIoTResponse, Error<GetUsageInternetOfThingsError>>
pub async fn get_usage_internet_of_things( &self, start_hr: DateTime<Utc>, params: GetUsageInternetOfThingsOptionalParams, ) -> Result<UsageIoTResponse, Error<GetUsageInternetOfThingsError>>
Get hourly usage for IoT. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.
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_internet_of_things(
13 DateTime::parse_from_rfc3339("2021-11-06T11:11:11+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 GetUsageInternetOfThingsOptionalParams::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_internet_of_things_with_http_info(
&self,
start_hr: DateTime<Utc>,
params: GetUsageInternetOfThingsOptionalParams,
) -> Result<ResponseContent<UsageIoTResponse>, Error<GetUsageInternetOfThingsError>>
pub async fn get_usage_internet_of_things_with_http_info( &self, start_hr: DateTime<Utc>, params: GetUsageInternetOfThingsOptionalParams, ) -> Result<ResponseContent<UsageIoTResponse>, Error<GetUsageInternetOfThingsError>>
Get hourly usage for IoT. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.
Sourcepub async fn get_usage_lambda(
&self,
start_hr: DateTime<Utc>,
params: GetUsageLambdaOptionalParams,
) -> Result<UsageLambdaResponse, Error<GetUsageLambdaError>>
pub async fn get_usage_lambda( &self, start_hr: DateTime<Utc>, params: GetUsageLambdaOptionalParams, ) -> Result<UsageLambdaResponse, Error<GetUsageLambdaError>>
Get hourly usage for Lambda. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.
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(
13 DateTime::parse_from_rfc3339("2021-11-06T11:11:11+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 GetUsageLambdaOptionalParams::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_with_http_info(
&self,
start_hr: DateTime<Utc>,
params: GetUsageLambdaOptionalParams,
) -> Result<ResponseContent<UsageLambdaResponse>, Error<GetUsageLambdaError>>
pub async fn get_usage_lambda_with_http_info( &self, start_hr: DateTime<Utc>, params: GetUsageLambdaOptionalParams, ) -> Result<ResponseContent<UsageLambdaResponse>, Error<GetUsageLambdaError>>
Get hourly usage for Lambda. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.
Sourcepub async fn get_usage_logs(
&self,
start_hr: DateTime<Utc>,
params: GetUsageLogsOptionalParams,
) -> Result<UsageLogsResponse, Error<GetUsageLogsError>>
pub async fn get_usage_logs( &self, start_hr: DateTime<Utc>, params: GetUsageLogsOptionalParams, ) -> Result<UsageLogsResponse, Error<GetUsageLogsError>>
Get hourly usage for logs. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.
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_logs(
13 DateTime::parse_from_rfc3339("2021-11-11T11:11:11.111000+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 GetUsageLogsOptionalParams::default(),
17 )
18 .await;
19 if let Ok(value) = resp {
20 println!("{:#?}", value);
21 } else {
22 println!("{:#?}", resp.unwrap_err());
23 }
24}
More examples
8async fn main() {
9 let configuration = datadog::Configuration::new();
10 let api = UsageMeteringAPI::with_config(configuration);
11 let resp = api
12 .get_usage_logs(
13 DateTime::parse_from_rfc3339("2021-11-06T11:11:11+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 GetUsageLogsOptionalParams::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_logs_with_http_info(
&self,
start_hr: DateTime<Utc>,
params: GetUsageLogsOptionalParams,
) -> Result<ResponseContent<UsageLogsResponse>, Error<GetUsageLogsError>>
pub async fn get_usage_logs_with_http_info( &self, start_hr: DateTime<Utc>, params: GetUsageLogsOptionalParams, ) -> Result<ResponseContent<UsageLogsResponse>, Error<GetUsageLogsError>>
Get hourly usage for logs. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.
Sourcepub async fn get_usage_logs_by_index(
&self,
start_hr: DateTime<Utc>,
params: GetUsageLogsByIndexOptionalParams,
) -> Result<UsageLogsByIndexResponse, Error<GetUsageLogsByIndexError>>
pub async fn get_usage_logs_by_index( &self, start_hr: DateTime<Utc>, params: GetUsageLogsByIndexOptionalParams, ) -> Result<UsageLogsByIndexResponse, Error<GetUsageLogsByIndexError>>
Get hourly usage for logs by index.
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_logs_by_index(
13 DateTime::parse_from_rfc3339("2021-11-11T11:11:11.111000+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 GetUsageLogsByIndexOptionalParams::default(),
17 )
18 .await;
19 if let Ok(value) = resp {
20 println!("{:#?}", value);
21 } else {
22 println!("{:#?}", resp.unwrap_err());
23 }
24}
More examples
8async fn main() {
9 let configuration = datadog::Configuration::new();
10 let api = UsageMeteringAPI::with_config(configuration);
11 let resp = api
12 .get_usage_logs_by_index(
13 DateTime::parse_from_rfc3339("2021-11-06T11:11:11+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 GetUsageLogsByIndexOptionalParams::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_logs_by_index_with_http_info(
&self,
start_hr: DateTime<Utc>,
params: GetUsageLogsByIndexOptionalParams,
) -> Result<ResponseContent<UsageLogsByIndexResponse>, Error<GetUsageLogsByIndexError>>
pub async fn get_usage_logs_by_index_with_http_info( &self, start_hr: DateTime<Utc>, params: GetUsageLogsByIndexOptionalParams, ) -> Result<ResponseContent<UsageLogsByIndexResponse>, Error<GetUsageLogsByIndexError>>
Get hourly usage for logs by index.
Sourcepub async fn get_usage_logs_by_retention(
&self,
start_hr: DateTime<Utc>,
params: GetUsageLogsByRetentionOptionalParams,
) -> Result<UsageLogsByRetentionResponse, Error<GetUsageLogsByRetentionError>>
pub async fn get_usage_logs_by_retention( &self, start_hr: DateTime<Utc>, params: GetUsageLogsByRetentionOptionalParams, ) -> Result<UsageLogsByRetentionResponse, Error<GetUsageLogsByRetentionError>>
Get hourly usage for indexed logs by retention period. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.
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_logs_by_retention(
13 DateTime::parse_from_rfc3339("2021-11-06T11:11:11+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 GetUsageLogsByRetentionOptionalParams::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_logs_by_retention_with_http_info(
&self,
start_hr: DateTime<Utc>,
params: GetUsageLogsByRetentionOptionalParams,
) -> Result<ResponseContent<UsageLogsByRetentionResponse>, Error<GetUsageLogsByRetentionError>>
pub async fn get_usage_logs_by_retention_with_http_info( &self, start_hr: DateTime<Utc>, params: GetUsageLogsByRetentionOptionalParams, ) -> Result<ResponseContent<UsageLogsByRetentionResponse>, Error<GetUsageLogsByRetentionError>>
Get hourly usage for indexed logs by retention period. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.
Sourcepub async fn get_usage_network_flows(
&self,
start_hr: DateTime<Utc>,
params: GetUsageNetworkFlowsOptionalParams,
) -> Result<UsageNetworkFlowsResponse, Error<GetUsageNetworkFlowsError>>
pub async fn get_usage_network_flows( &self, start_hr: DateTime<Utc>, params: GetUsageNetworkFlowsOptionalParams, ) -> Result<UsageNetworkFlowsResponse, Error<GetUsageNetworkFlowsError>>
Get hourly usage for network flows. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.
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_network_flows(
13 DateTime::parse_from_rfc3339("2021-11-11T11:11:11.111000+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 GetUsageNetworkFlowsOptionalParams::default(),
17 )
18 .await;
19 if let Ok(value) = resp {
20 println!("{:#?}", value);
21 } else {
22 println!("{:#?}", resp.unwrap_err());
23 }
24}
More examples
8async fn main() {
9 let configuration = datadog::Configuration::new();
10 let api = UsageMeteringAPI::with_config(configuration);
11 let resp = api
12 .get_usage_network_flows(
13 DateTime::parse_from_rfc3339("2021-11-06T11:11:11+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 GetUsageNetworkFlowsOptionalParams::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_network_flows_with_http_info(
&self,
start_hr: DateTime<Utc>,
params: GetUsageNetworkFlowsOptionalParams,
) -> Result<ResponseContent<UsageNetworkFlowsResponse>, Error<GetUsageNetworkFlowsError>>
pub async fn get_usage_network_flows_with_http_info( &self, start_hr: DateTime<Utc>, params: GetUsageNetworkFlowsOptionalParams, ) -> Result<ResponseContent<UsageNetworkFlowsResponse>, Error<GetUsageNetworkFlowsError>>
Get hourly usage for network flows. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.
Sourcepub async fn get_usage_network_hosts(
&self,
start_hr: DateTime<Utc>,
params: GetUsageNetworkHostsOptionalParams,
) -> Result<UsageNetworkHostsResponse, Error<GetUsageNetworkHostsError>>
pub async fn get_usage_network_hosts( &self, start_hr: DateTime<Utc>, params: GetUsageNetworkHostsOptionalParams, ) -> Result<UsageNetworkHostsResponse, Error<GetUsageNetworkHostsError>>
Get hourly usage for network hosts. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.
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_network_hosts(
13 DateTime::parse_from_rfc3339("2021-11-11T11:11:11.111000+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 GetUsageNetworkHostsOptionalParams::default(),
17 )
18 .await;
19 if let Ok(value) = resp {
20 println!("{:#?}", value);
21 } else {
22 println!("{:#?}", resp.unwrap_err());
23 }
24}
More examples
8async fn main() {
9 let configuration = datadog::Configuration::new();
10 let api = UsageMeteringAPI::with_config(configuration);
11 let resp = api
12 .get_usage_network_hosts(
13 DateTime::parse_from_rfc3339("2021-11-06T11:11:11+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 GetUsageNetworkHostsOptionalParams::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_network_hosts_with_http_info(
&self,
start_hr: DateTime<Utc>,
params: GetUsageNetworkHostsOptionalParams,
) -> Result<ResponseContent<UsageNetworkHostsResponse>, Error<GetUsageNetworkHostsError>>
pub async fn get_usage_network_hosts_with_http_info( &self, start_hr: DateTime<Utc>, params: GetUsageNetworkHostsOptionalParams, ) -> Result<ResponseContent<UsageNetworkHostsResponse>, Error<GetUsageNetworkHostsError>>
Get hourly usage for network hosts. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.
Sourcepub async fn get_usage_online_archive(
&self,
start_hr: DateTime<Utc>,
params: GetUsageOnlineArchiveOptionalParams,
) -> Result<UsageOnlineArchiveResponse, Error<GetUsageOnlineArchiveError>>
pub async fn get_usage_online_archive( &self, start_hr: DateTime<Utc>, params: GetUsageOnlineArchiveOptionalParams, ) -> Result<UsageOnlineArchiveResponse, Error<GetUsageOnlineArchiveError>>
Get hourly usage for online archive. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.
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_online_archive(
13 DateTime::parse_from_rfc3339("2021-11-11T11:11:11.111000+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 GetUsageOnlineArchiveOptionalParams::default(),
17 )
18 .await;
19 if let Ok(value) = resp {
20 println!("{:#?}", value);
21 } else {
22 println!("{:#?}", resp.unwrap_err());
23 }
24}
More examples
8async fn main() {
9 let configuration = datadog::Configuration::new();
10 let api = UsageMeteringAPI::with_config(configuration);
11 let resp = api
12 .get_usage_online_archive(
13 DateTime::parse_from_rfc3339("2021-11-06T11:11:11+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 GetUsageOnlineArchiveOptionalParams::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_online_archive_with_http_info(
&self,
start_hr: DateTime<Utc>,
params: GetUsageOnlineArchiveOptionalParams,
) -> Result<ResponseContent<UsageOnlineArchiveResponse>, Error<GetUsageOnlineArchiveError>>
pub async fn get_usage_online_archive_with_http_info( &self, start_hr: DateTime<Utc>, params: GetUsageOnlineArchiveOptionalParams, ) -> Result<ResponseContent<UsageOnlineArchiveResponse>, Error<GetUsageOnlineArchiveError>>
Get hourly usage for online archive. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.
Sourcepub async fn get_usage_profiling(
&self,
start_hr: DateTime<Utc>,
params: GetUsageProfilingOptionalParams,
) -> Result<UsageProfilingResponse, Error<GetUsageProfilingError>>
pub async fn get_usage_profiling( &self, start_hr: DateTime<Utc>, params: GetUsageProfilingOptionalParams, ) -> Result<UsageProfilingResponse, Error<GetUsageProfilingError>>
Get hourly usage for profiled hosts. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.
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_profiling(
13 DateTime::parse_from_rfc3339("2021-11-06T11:11:11+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 GetUsageProfilingOptionalParams::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_profiling_with_http_info(
&self,
start_hr: DateTime<Utc>,
params: GetUsageProfilingOptionalParams,
) -> Result<ResponseContent<UsageProfilingResponse>, Error<GetUsageProfilingError>>
pub async fn get_usage_profiling_with_http_info( &self, start_hr: DateTime<Utc>, params: GetUsageProfilingOptionalParams, ) -> Result<ResponseContent<UsageProfilingResponse>, Error<GetUsageProfilingError>>
Get hourly usage for profiled hosts. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.
Sourcepub async fn get_usage_rum_sessions(
&self,
start_hr: DateTime<Utc>,
params: GetUsageRumSessionsOptionalParams,
) -> Result<UsageRumSessionsResponse, Error<GetUsageRumSessionsError>>
pub async fn get_usage_rum_sessions( &self, start_hr: DateTime<Utc>, params: GetUsageRumSessionsOptionalParams, ) -> Result<UsageRumSessionsResponse, Error<GetUsageRumSessionsError>>
Get hourly usage for RUM Sessions. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.
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_rum_sessions(
13 DateTime::parse_from_rfc3339("2021-11-11T11:11:11.111000+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 GetUsageRumSessionsOptionalParams::default(),
17 )
18 .await;
19 if let Ok(value) = resp {
20 println!("{:#?}", value);
21 } else {
22 println!("{:#?}", resp.unwrap_err());
23 }
24}
More examples
8async fn main() {
9 let configuration = datadog::Configuration::new();
10 let api = UsageMeteringAPI::with_config(configuration);
11 let resp = api
12 .get_usage_rum_sessions(
13 DateTime::parse_from_rfc3339("2021-11-06T11:11:11+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 GetUsageRumSessionsOptionalParams::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}
8async fn main() {
9 let configuration = datadog::Configuration::new();
10 let api = UsageMeteringAPI::with_config(configuration);
11 let resp = api
12 .get_usage_rum_sessions(
13 DateTime::parse_from_rfc3339("2021-11-06T11:11:11+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 GetUsageRumSessionsOptionalParams::default()
17 .end_hr(
18 DateTime::parse_from_rfc3339("2021-11-08T11:11:11+00:00")
19 .expect("Failed to parse datetime")
20 .with_timezone(&Utc),
21 )
22 .type_("mobile".to_string()),
23 )
24 .await;
25 if let Ok(value) = resp {
26 println!("{:#?}", value);
27 } else {
28 println!("{:#?}", resp.unwrap_err());
29 }
30}
Sourcepub async fn get_usage_rum_sessions_with_http_info(
&self,
start_hr: DateTime<Utc>,
params: GetUsageRumSessionsOptionalParams,
) -> Result<ResponseContent<UsageRumSessionsResponse>, Error<GetUsageRumSessionsError>>
pub async fn get_usage_rum_sessions_with_http_info( &self, start_hr: DateTime<Utc>, params: GetUsageRumSessionsOptionalParams, ) -> Result<ResponseContent<UsageRumSessionsResponse>, Error<GetUsageRumSessionsError>>
Get hourly usage for RUM Sessions. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.
Sourcepub async fn get_usage_rum_units(
&self,
start_hr: DateTime<Utc>,
params: GetUsageRumUnitsOptionalParams,
) -> Result<UsageRumUnitsResponse, Error<GetUsageRumUnitsError>>
pub async fn get_usage_rum_units( &self, start_hr: DateTime<Utc>, params: GetUsageRumUnitsOptionalParams, ) -> Result<UsageRumUnitsResponse, Error<GetUsageRumUnitsError>>
Get hourly usage for RUM Units. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.
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_rum_units(
13 DateTime::parse_from_rfc3339("2021-11-11T11:11:11.111000+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 GetUsageRumUnitsOptionalParams::default(),
17 )
18 .await;
19 if let Ok(value) = resp {
20 println!("{:#?}", value);
21 } else {
22 println!("{:#?}", resp.unwrap_err());
23 }
24}
More examples
8async fn main() {
9 let configuration = datadog::Configuration::new();
10 let api = UsageMeteringAPI::with_config(configuration);
11 let resp = api
12 .get_usage_rum_units(
13 DateTime::parse_from_rfc3339("2021-11-06T11:11:11+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 GetUsageRumUnitsOptionalParams::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_rum_units_with_http_info(
&self,
start_hr: DateTime<Utc>,
params: GetUsageRumUnitsOptionalParams,
) -> Result<ResponseContent<UsageRumUnitsResponse>, Error<GetUsageRumUnitsError>>
pub async fn get_usage_rum_units_with_http_info( &self, start_hr: DateTime<Utc>, params: GetUsageRumUnitsOptionalParams, ) -> Result<ResponseContent<UsageRumUnitsResponse>, Error<GetUsageRumUnitsError>>
Get hourly usage for RUM Units. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.
Sourcepub async fn get_usage_sds(
&self,
start_hr: DateTime<Utc>,
params: GetUsageSDSOptionalParams,
) -> Result<UsageSDSResponse, Error<GetUsageSDSError>>
pub async fn get_usage_sds( &self, start_hr: DateTime<Utc>, params: GetUsageSDSOptionalParams, ) -> Result<UsageSDSResponse, Error<GetUsageSDSError>>
Get hourly usage for sensitive data scanner. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.
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_sds(
13 DateTime::parse_from_rfc3339("2021-11-11T11:11:11.111000+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 GetUsageSDSOptionalParams::default(),
17 )
18 .await;
19 if let Ok(value) = resp {
20 println!("{:#?}", value);
21 } else {
22 println!("{:#?}", resp.unwrap_err());
23 }
24}
More examples
8async fn main() {
9 let configuration = datadog::Configuration::new();
10 let api = UsageMeteringAPI::with_config(configuration);
11 let resp = api
12 .get_usage_sds(
13 DateTime::parse_from_rfc3339("2021-11-06T11:11:11+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 GetUsageSDSOptionalParams::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_sds_with_http_info(
&self,
start_hr: DateTime<Utc>,
params: GetUsageSDSOptionalParams,
) -> Result<ResponseContent<UsageSDSResponse>, Error<GetUsageSDSError>>
pub async fn get_usage_sds_with_http_info( &self, start_hr: DateTime<Utc>, params: GetUsageSDSOptionalParams, ) -> Result<ResponseContent<UsageSDSResponse>, Error<GetUsageSDSError>>
Get hourly usage for sensitive data scanner. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.
Sourcepub async fn get_usage_snmp(
&self,
start_hr: DateTime<Utc>,
params: GetUsageSNMPOptionalParams,
) -> Result<UsageSNMPResponse, Error<GetUsageSNMPError>>
pub async fn get_usage_snmp( &self, start_hr: DateTime<Utc>, params: GetUsageSNMPOptionalParams, ) -> Result<UsageSNMPResponse, Error<GetUsageSNMPError>>
Get hourly usage for SNMP devices. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.
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_snmp(
13 DateTime::parse_from_rfc3339("2021-11-06T11:11:11+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 GetUsageSNMPOptionalParams::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_snmp_with_http_info(
&self,
start_hr: DateTime<Utc>,
params: GetUsageSNMPOptionalParams,
) -> Result<ResponseContent<UsageSNMPResponse>, Error<GetUsageSNMPError>>
pub async fn get_usage_snmp_with_http_info( &self, start_hr: DateTime<Utc>, params: GetUsageSNMPOptionalParams, ) -> Result<ResponseContent<UsageSNMPResponse>, Error<GetUsageSNMPError>>
Get hourly usage for SNMP devices. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.
Sourcepub async fn get_usage_summary(
&self,
start_month: DateTime<Utc>,
params: GetUsageSummaryOptionalParams,
) -> Result<UsageSummaryResponse, Error<GetUsageSummaryError>>
pub async fn get_usage_summary( &self, start_month: DateTime<Utc>, params: GetUsageSummaryOptionalParams, ) -> Result<UsageSummaryResponse, Error<GetUsageSummaryError>>
Get all usage across your account.
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_usage_summary(
13 DateTime::parse_from_rfc3339("2021-11-11T11:11:11.111000+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 GetUsageSummaryOptionalParams::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_usage_summary_with_http_info(
&self,
start_month: DateTime<Utc>,
params: GetUsageSummaryOptionalParams,
) -> Result<ResponseContent<UsageSummaryResponse>, Error<GetUsageSummaryError>>
pub async fn get_usage_summary_with_http_info( &self, start_month: DateTime<Utc>, params: GetUsageSummaryOptionalParams, ) -> Result<ResponseContent<UsageSummaryResponse>, Error<GetUsageSummaryError>>
Get all usage across your account.
This endpoint is only accessible for parent-level organizations.
Sourcepub async fn get_usage_synthetics(
&self,
start_hr: DateTime<Utc>,
params: GetUsageSyntheticsOptionalParams,
) -> Result<UsageSyntheticsResponse, Error<GetUsageSyntheticsError>>
pub async fn get_usage_synthetics( &self, start_hr: DateTime<Utc>, params: GetUsageSyntheticsOptionalParams, ) -> Result<UsageSyntheticsResponse, Error<GetUsageSyntheticsError>>
Get hourly usage for synthetics checks. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.
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_synthetics(
13 DateTime::parse_from_rfc3339("2021-11-11T11:11:11.111000+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 GetUsageSyntheticsOptionalParams::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_usage_synthetics_with_http_info(
&self,
start_hr: DateTime<Utc>,
params: GetUsageSyntheticsOptionalParams,
) -> Result<ResponseContent<UsageSyntheticsResponse>, Error<GetUsageSyntheticsError>>
pub async fn get_usage_synthetics_with_http_info( &self, start_hr: DateTime<Utc>, params: GetUsageSyntheticsOptionalParams, ) -> Result<ResponseContent<UsageSyntheticsResponse>, Error<GetUsageSyntheticsError>>
Get hourly usage for synthetics checks. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.
Sourcepub async fn get_usage_synthetics_api(
&self,
start_hr: DateTime<Utc>,
params: GetUsageSyntheticsAPIOptionalParams,
) -> Result<UsageSyntheticsAPIResponse, Error<GetUsageSyntheticsAPIError>>
pub async fn get_usage_synthetics_api( &self, start_hr: DateTime<Utc>, params: GetUsageSyntheticsAPIOptionalParams, ) -> Result<UsageSyntheticsAPIResponse, Error<GetUsageSyntheticsAPIError>>
Get hourly usage for synthetics API checks. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.
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_synthetics_api(
13 DateTime::parse_from_rfc3339("2021-11-11T11:11:11.111000+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 GetUsageSyntheticsAPIOptionalParams::default(),
17 )
18 .await;
19 if let Ok(value) = resp {
20 println!("{:#?}", value);
21 } else {
22 println!("{:#?}", resp.unwrap_err());
23 }
24}
More examples
8async fn main() {
9 let configuration = datadog::Configuration::new();
10 let api = UsageMeteringAPI::with_config(configuration);
11 let resp = api
12 .get_usage_synthetics_api(
13 DateTime::parse_from_rfc3339("2021-11-06T11:11:11+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 GetUsageSyntheticsAPIOptionalParams::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_synthetics_api_with_http_info(
&self,
start_hr: DateTime<Utc>,
params: GetUsageSyntheticsAPIOptionalParams,
) -> Result<ResponseContent<UsageSyntheticsAPIResponse>, Error<GetUsageSyntheticsAPIError>>
pub async fn get_usage_synthetics_api_with_http_info( &self, start_hr: DateTime<Utc>, params: GetUsageSyntheticsAPIOptionalParams, ) -> Result<ResponseContent<UsageSyntheticsAPIResponse>, Error<GetUsageSyntheticsAPIError>>
Get hourly usage for synthetics API checks. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.
Sourcepub async fn get_usage_synthetics_browser(
&self,
start_hr: DateTime<Utc>,
params: GetUsageSyntheticsBrowserOptionalParams,
) -> Result<UsageSyntheticsBrowserResponse, Error<GetUsageSyntheticsBrowserError>>
pub async fn get_usage_synthetics_browser( &self, start_hr: DateTime<Utc>, params: GetUsageSyntheticsBrowserOptionalParams, ) -> Result<UsageSyntheticsBrowserResponse, Error<GetUsageSyntheticsBrowserError>>
Get hourly usage for synthetics browser checks. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.
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_synthetics_browser(
13 DateTime::parse_from_rfc3339("2021-11-11T11:11:11.111000+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 GetUsageSyntheticsBrowserOptionalParams::default(),
17 )
18 .await;
19 if let Ok(value) = resp {
20 println!("{:#?}", value);
21 } else {
22 println!("{:#?}", resp.unwrap_err());
23 }
24}
More examples
8async fn main() {
9 let configuration = datadog::Configuration::new();
10 let api = UsageMeteringAPI::with_config(configuration);
11 let resp = api
12 .get_usage_synthetics_browser(
13 DateTime::parse_from_rfc3339("2021-11-06T11:11:11+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 GetUsageSyntheticsBrowserOptionalParams::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_synthetics_browser_with_http_info(
&self,
start_hr: DateTime<Utc>,
params: GetUsageSyntheticsBrowserOptionalParams,
) -> Result<ResponseContent<UsageSyntheticsBrowserResponse>, Error<GetUsageSyntheticsBrowserError>>
pub async fn get_usage_synthetics_browser_with_http_info( &self, start_hr: DateTime<Utc>, params: GetUsageSyntheticsBrowserOptionalParams, ) -> Result<ResponseContent<UsageSyntheticsBrowserResponse>, Error<GetUsageSyntheticsBrowserError>>
Get hourly usage for synthetics browser checks. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.
Sourcepub async fn get_usage_timeseries(
&self,
start_hr: DateTime<Utc>,
params: GetUsageTimeseriesOptionalParams,
) -> Result<UsageTimeseriesResponse, Error<GetUsageTimeseriesError>>
pub async fn get_usage_timeseries( &self, start_hr: DateTime<Utc>, params: GetUsageTimeseriesOptionalParams, ) -> Result<UsageTimeseriesResponse, Error<GetUsageTimeseriesError>>
Get hourly usage for custom metrics. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.
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_timeseries(
13 DateTime::parse_from_rfc3339("2021-11-06T11:11:11+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 GetUsageTimeseriesOptionalParams::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_timeseries_with_http_info(
&self,
start_hr: DateTime<Utc>,
params: GetUsageTimeseriesOptionalParams,
) -> Result<ResponseContent<UsageTimeseriesResponse>, Error<GetUsageTimeseriesError>>
pub async fn get_usage_timeseries_with_http_info( &self, start_hr: DateTime<Utc>, params: GetUsageTimeseriesOptionalParams, ) -> Result<ResponseContent<UsageTimeseriesResponse>, Error<GetUsageTimeseriesError>>
Get hourly usage for custom metrics. Note: This endpoint has been deprecated. Hourly usage data for all products is now available in the Get hourly usage by product family API. Refer to Migrating from the V1 Hourly Usage APIs to V2 for the associated migration guide.
Sourcepub async fn get_usage_top_avg_metrics(
&self,
params: GetUsageTopAvgMetricsOptionalParams,
) -> Result<UsageTopAvgMetricsResponse, Error<GetUsageTopAvgMetricsError>>
pub async fn get_usage_top_avg_metrics( &self, params: GetUsageTopAvgMetricsOptionalParams, ) -> Result<UsageTopAvgMetricsResponse, Error<GetUsageTopAvgMetricsError>>
Get all custom metrics by hourly average. Use the month parameter to get a month-to-date data resolution or use the day parameter to get a daily resolution. One of the two is required, and only one of the two is allowed.
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_top_avg_metrics(
13 GetUsageTopAvgMetricsOptionalParams::default().day(
14 DateTime::parse_from_rfc3339("2021-11-08T11:11:11+00:00")
15 .expect("Failed to parse datetime")
16 .with_timezone(&Utc),
17 ),
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_usage_top_avg_metrics_with_http_info(
&self,
params: GetUsageTopAvgMetricsOptionalParams,
) -> Result<ResponseContent<UsageTopAvgMetricsResponse>, Error<GetUsageTopAvgMetricsError>>
pub async fn get_usage_top_avg_metrics_with_http_info( &self, params: GetUsageTopAvgMetricsOptionalParams, ) -> Result<ResponseContent<UsageTopAvgMetricsResponse>, Error<GetUsageTopAvgMetricsError>>
Get all custom metrics by hourly average. Use the month parameter to get a month-to-date data resolution or use the day parameter to get a daily resolution. One of the two is required, and only one of the two is allowed.
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