Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118751,6 +118751,11 @@ paths:
name: filter[provider]
schema:
type: string
- description: Filter results to tag keys that have data for a specific Cloud Cost Management metric (for example, `aws.cost.net.amortized`). When omitted, all tag keys for the requested period are returned.
in: query
name: filter[metric]
schema:
type: string
responses:
"200":
content:
Expand Down
12 changes: 12 additions & 0 deletions src/datadogV2/api/api_cloud_cost_management.rs
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,8 @@ impl ListCostTagDescriptionsOptionalParams {
pub struct ListCostTagKeySourcesOptionalParams {
/// Filter results to a specific provider. Common cloud values are `aws`, `azure`, `gcp`, `Oracle` (OCI), and `custom`. SaaS billing integrations (for example, `Snowflake`, `MongoDB`, `Databricks`) are also accepted using their display-name string. Values are case-sensitive.
pub filter_provider: Option<String>,
/// Filter results to tag keys that have data for a specific Cloud Cost Management metric (for example, `aws.cost.net.amortized`). When omitted, all tag keys for the requested period are returned.
pub filter_metric: Option<String>,
}

impl ListCostTagKeySourcesOptionalParams {
Expand All @@ -356,6 +358,11 @@ impl ListCostTagKeySourcesOptionalParams {
self.filter_provider = Some(value);
self
}
/// Filter results to tag keys that have data for a specific Cloud Cost Management metric (for example, `aws.cost.net.amortized`). When omitted, all tag keys for the requested period are returned.
pub fn filter_metric(mut self, value: String) -> Self {
self.filter_metric = Some(value);
self
}
}

/// ListCostTagKeysOptionalParams is a struct for passing parameters to the method [`CloudCostManagementAPI::list_cost_tag_keys`]
Expand Down Expand Up @@ -6090,6 +6097,7 @@ impl CloudCostManagementAPI {

// unbox and build optional parameters
let filter_provider = params.filter_provider;
let filter_metric = params.filter_metric;

let local_client = &self.client;

Expand All @@ -6106,6 +6114,10 @@ impl CloudCostManagementAPI {
local_req_builder =
local_req_builder.query(&[("filter[provider]", &local_query_param.to_string())]);
};
if let Some(ref local_query_param) = filter_metric {
local_req_builder =
local_req_builder.query(&[("filter[metric]", &local_query_param.to_string())]);
};

// build headers
let mut headers = HeaderMap::new();
Expand Down
4 changes: 4 additions & 0 deletions tests/scenarios/function_mappings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30911,9 +30911,13 @@ fn test_v2_list_cost_tag_key_sources(
let filter_provider = _parameters
.get("filter[provider]")
.and_then(|param| Some(serde_json::from_value(param.clone()).unwrap()));
let filter_metric = _parameters
.get("filter[metric]")
.and_then(|param| Some(serde_json::from_value(param.clone()).unwrap()));
let mut params =
datadogV2::api_cloud_cost_management::ListCostTagKeySourcesOptionalParams::default();
params.filter_provider = filter_provider;
params.filter_metric = filter_metric;
let response =
match block_on(api.list_cost_tag_key_sources_with_http_info(filter_month, params)) {
Ok(response) => response,
Expand Down
Loading