diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 2b0efd759..2c387c08d 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -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: diff --git a/src/datadogV2/api/api_cloud_cost_management.rs b/src/datadogV2/api/api_cloud_cost_management.rs index 19077731b..134452b63 100644 --- a/src/datadogV2/api/api_cloud_cost_management.rs +++ b/src/datadogV2/api/api_cloud_cost_management.rs @@ -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, + /// 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, } impl ListCostTagKeySourcesOptionalParams { @@ -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`] @@ -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; @@ -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(); diff --git a/tests/scenarios/function_mappings.rs b/tests/scenarios/function_mappings.rs index 8d9a189c4..7de928c55 100644 --- a/tests/scenarios/function_mappings.rs +++ b/tests/scenarios/function_mappings.rs @@ -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,