From 4918a09c89dfd18e664ba4a4b22f8fabb17d1e2f Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Thu, 23 Feb 2023 21:13:34 +0000 Subject: [PATCH] Add profiled fargate tasks to usage attribution (#1256) Co-authored-by: ci.datadog-api-spec --- .apigentools-info | 8 +++---- .generator/schemas/v1/openapi.yaml | 14 ++++++++++++ .../v1/api/usage_metering_api.rb | 6 ++--- .../hourly_usage_attribution_usage_type.rb | 1 + ...hly_usage_attribution_supported_metrics.rb | 2 ++ .../monthly_usage_attribution_values.rb | 22 ++++++++++++++++++- 6 files changed, 45 insertions(+), 8 deletions(-) diff --git a/.apigentools-info b/.apigentools-info index 8709c40865d4..d9bf488541da 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.4", - "regenerated": "2023-02-22 19:40:48.868501", - "spec_repo_commit": "837505a7" + "regenerated": "2023-02-23 20:26:33.044700", + "spec_repo_commit": "437dad25" }, "v2": { "apigentools_version": "1.6.4", - "regenerated": "2023-02-22 19:40:48.880833", - "spec_repo_commit": "837505a7" + "regenerated": "2023-02-23 20:26:33.056596", + "spec_repo_commit": "437dad25" } } } \ No newline at end of file diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index d88875538f30..8f2916aae6b8 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -3665,6 +3665,7 @@ components: - invocations_usage - npm_host_usage - profiled_container_usage + - profiled_fargate_usage - profiled_host_usage - snmp_usage - estimated_rum_sessions_usage @@ -3695,6 +3696,7 @@ components: - INVOCATIONS_USAGE - NPM_HOST_USAGE - PROFILED_CONTAINER_USAGE + - PROFILED_FARGATE_USAGE - PROFILED_HOST_USAGE - SNMP_USAGE - ESTIMATED_RUM_SESSIONS_USAGE @@ -7138,6 +7140,8 @@ components: - npm_host_percentage - profiled_container_usage - profiled_container_percentage + - profiled_fargate_usage + - profiled_fargate_percentage - profiled_host_usage - profiled_host_percentage - snmp_usage @@ -7197,6 +7201,8 @@ components: - NPM_HOST_PERCENTAGE - PROFILED_CONTAINER_USAGE - PROFILED_CONTAINER_PERCENTAGE + - PROFILED_FARGATE_USAGE + - PROFILED_FARGATE_PERCENTAGE - PROFILED_HOST_USAGE - PROFILED_HOST_PERCENTAGE - SNMP_USAGE @@ -7420,6 +7426,14 @@ components: description: The profiled container usage by tag(s). format: double type: number + profiled_fargate_percentage: + description: The percentage of profiled Fargate task usage by tag(s). + format: double + type: number + profiled_fargate_usage: + description: The profiled Fargate task usage by tag(s). + format: double + type: number profiled_host_percentage: description: The percentage of profiled hosts usage by tag(s). format: double diff --git a/lib/datadog_api_client/v1/api/usage_metering_api.rb b/lib/datadog_api_client/v1/api/usage_metering_api.rb index 5715fe4f1b5c..2ddcf6a36cca 100644 --- a/lib/datadog_api_client/v1/api/usage_metering_api.rb +++ b/lib/datadog_api_client/v1/api/usage_metering_api.rb @@ -152,7 +152,7 @@ def get_hourly_usage_attribution_with_http_info(start_hr, usage_type, opts = {}) fail ArgumentError, "Missing the required parameter 'usage_type' when calling UsageMeteringAPI.get_hourly_usage_attribution" end # verify enum value - allowable_values = ['api_usage', 'apm_fargate_usage', 'apm_host_usage', 'appsec_fargate_usage', 'appsec_usage', 'browser_usage', 'container_excl_agent_usage', 'container_usage', 'cspm_containers_usage', 'cspm_hosts_usage', 'custom_timeseries_usage', 'cws_containers_usage', 'cws_hosts_usage', 'dbm_hosts_usage', 'dbm_queries_usage', 'estimated_indexed_logs_usage', 'estimated_ingested_logs_usage', 'estimated_indexed_spans_usage', 'estimated_ingested_spans_usage', 'fargate_usage', 'functions_usage', 'infra_host_usage', 'invocations_usage', 'npm_host_usage', 'profiled_container_usage', 'profiled_host_usage', 'snmp_usage', 'estimated_rum_sessions_usage'] + allowable_values = ['api_usage', 'apm_fargate_usage', 'apm_host_usage', 'appsec_fargate_usage', 'appsec_usage', 'browser_usage', 'container_excl_agent_usage', 'container_usage', 'cspm_containers_usage', 'cspm_hosts_usage', 'custom_timeseries_usage', 'cws_containers_usage', 'cws_hosts_usage', 'dbm_hosts_usage', 'dbm_queries_usage', 'estimated_indexed_logs_usage', 'estimated_ingested_logs_usage', 'estimated_indexed_spans_usage', 'estimated_ingested_spans_usage', 'fargate_usage', 'functions_usage', 'infra_host_usage', 'invocations_usage', 'npm_host_usage', 'profiled_container_usage', 'profiled_fargate_usage', 'profiled_host_usage', 'snmp_usage', 'estimated_rum_sessions_usage'] if @api_client.config.client_side_validation && !allowable_values.include?(usage_type) fail ArgumentError, "invalid value for \"usage_type\", must be one of #{allowable_values}" end @@ -472,7 +472,7 @@ def get_monthly_usage_attribution_with_http_info(start_month, fields, opts = {}) fail ArgumentError, "Missing the required parameter 'fields' when calling UsageMeteringAPI.get_monthly_usage_attribution" end # verify enum value - allowable_values = ['api_usage', 'api_percentage', 'apm_fargate_usage', 'apm_fargate_percentage', 'appsec_fargate_usage', 'appsec_fargate_percentage', 'apm_host_usage', 'apm_host_percentage', 'appsec_usage', 'appsec_percentage', 'browser_usage', 'browser_percentage', 'container_excl_agent_usage', 'container_excl_agent_percentage', 'container_usage', 'container_percentage', 'cspm_containers_percentage', 'cspm_containers_usage', 'cspm_hosts_percentage', 'cspm_hosts_usage', 'custom_timeseries_usage', 'custom_timeseries_percentage', 'cws_containers_percentage', 'cws_containers_usage', 'cws_hosts_percentage', 'cws_hosts_usage', 'dbm_hosts_percentage', 'dbm_hosts_usage', 'dbm_queries_percentage', 'dbm_queries_usage', 'estimated_indexed_logs_usage', 'estimated_indexed_logs_percentage', 'estimated_ingested_logs_usage', 'estimated_ingested_logs_percentage', 'estimated_indexed_spans_usage', 'estimated_indexed_spans_percentage', 'estimated_ingested_spans_usage', 'estimated_ingested_spans_percentage', 'fargate_usage', 'fargate_percentage', 'functions_usage', 'functions_percentage', 'infra_host_usage', 'infra_host_percentage', 'invocations_usage', 'invocations_percentage', 'npm_host_usage', 'npm_host_percentage', 'profiled_container_usage', 'profiled_container_percentage', 'profiled_host_usage', 'profiled_host_percentage', 'snmp_usage', 'snmp_percentage', 'estimated_rum_sessions_usage', 'estimated_rum_sessions_percentage', '*'] + allowable_values = ['api_usage', 'api_percentage', 'apm_fargate_usage', 'apm_fargate_percentage', 'appsec_fargate_usage', 'appsec_fargate_percentage', 'apm_host_usage', 'apm_host_percentage', 'appsec_usage', 'appsec_percentage', 'browser_usage', 'browser_percentage', 'container_excl_agent_usage', 'container_excl_agent_percentage', 'container_usage', 'container_percentage', 'cspm_containers_percentage', 'cspm_containers_usage', 'cspm_hosts_percentage', 'cspm_hosts_usage', 'custom_timeseries_usage', 'custom_timeseries_percentage', 'cws_containers_percentage', 'cws_containers_usage', 'cws_hosts_percentage', 'cws_hosts_usage', 'dbm_hosts_percentage', 'dbm_hosts_usage', 'dbm_queries_percentage', 'dbm_queries_usage', 'estimated_indexed_logs_usage', 'estimated_indexed_logs_percentage', 'estimated_ingested_logs_usage', 'estimated_ingested_logs_percentage', 'estimated_indexed_spans_usage', 'estimated_indexed_spans_percentage', 'estimated_ingested_spans_usage', 'estimated_ingested_spans_percentage', 'fargate_usage', 'fargate_percentage', 'functions_usage', 'functions_percentage', 'infra_host_usage', 'infra_host_percentage', 'invocations_usage', 'invocations_percentage', 'npm_host_usage', 'npm_host_percentage', 'profiled_container_usage', 'profiled_container_percentage', 'profiled_fargate_usage', 'profiled_fargate_percentage', 'profiled_host_usage', 'profiled_host_percentage', 'snmp_usage', 'snmp_percentage', 'estimated_rum_sessions_usage', 'estimated_rum_sessions_percentage', '*'] if @api_client.config.client_side_validation && !allowable_values.include?(fields) fail ArgumentError, "invalid value for \"fields\", must be one of #{allowable_values}" end @@ -480,7 +480,7 @@ def get_monthly_usage_attribution_with_http_info(start_month, fields, opts = {}) if @api_client.config.client_side_validation && opts[:'sort_direction'] && !allowable_values.include?(opts[:'sort_direction']) fail ArgumentError, "invalid value for \"sort_direction\", must be one of #{allowable_values}" end - allowable_values = ['api_usage', 'api_percentage', 'apm_fargate_usage', 'apm_fargate_percentage', 'appsec_fargate_usage', 'appsec_fargate_percentage', 'apm_host_usage', 'apm_host_percentage', 'appsec_usage', 'appsec_percentage', 'browser_usage', 'browser_percentage', 'container_excl_agent_usage', 'container_excl_agent_percentage', 'container_usage', 'container_percentage', 'cspm_containers_percentage', 'cspm_containers_usage', 'cspm_hosts_percentage', 'cspm_hosts_usage', 'custom_timeseries_usage', 'custom_timeseries_percentage', 'cws_containers_percentage', 'cws_containers_usage', 'cws_hosts_percentage', 'cws_hosts_usage', 'dbm_hosts_percentage', 'dbm_hosts_usage', 'dbm_queries_percentage', 'dbm_queries_usage', 'estimated_indexed_logs_usage', 'estimated_indexed_logs_percentage', 'estimated_ingested_logs_usage', 'estimated_ingested_logs_percentage', 'estimated_indexed_spans_usage', 'estimated_indexed_spans_percentage', 'estimated_ingested_spans_usage', 'estimated_ingested_spans_percentage', 'fargate_usage', 'fargate_percentage', 'functions_usage', 'functions_percentage', 'infra_host_usage', 'infra_host_percentage', 'invocations_usage', 'invocations_percentage', 'npm_host_usage', 'npm_host_percentage', 'profiled_container_usage', 'profiled_container_percentage', 'profiled_host_usage', 'profiled_host_percentage', 'snmp_usage', 'snmp_percentage', 'estimated_rum_sessions_usage', 'estimated_rum_sessions_percentage', '*'] + allowable_values = ['api_usage', 'api_percentage', 'apm_fargate_usage', 'apm_fargate_percentage', 'appsec_fargate_usage', 'appsec_fargate_percentage', 'apm_host_usage', 'apm_host_percentage', 'appsec_usage', 'appsec_percentage', 'browser_usage', 'browser_percentage', 'container_excl_agent_usage', 'container_excl_agent_percentage', 'container_usage', 'container_percentage', 'cspm_containers_percentage', 'cspm_containers_usage', 'cspm_hosts_percentage', 'cspm_hosts_usage', 'custom_timeseries_usage', 'custom_timeseries_percentage', 'cws_containers_percentage', 'cws_containers_usage', 'cws_hosts_percentage', 'cws_hosts_usage', 'dbm_hosts_percentage', 'dbm_hosts_usage', 'dbm_queries_percentage', 'dbm_queries_usage', 'estimated_indexed_logs_usage', 'estimated_indexed_logs_percentage', 'estimated_ingested_logs_usage', 'estimated_ingested_logs_percentage', 'estimated_indexed_spans_usage', 'estimated_indexed_spans_percentage', 'estimated_ingested_spans_usage', 'estimated_ingested_spans_percentage', 'fargate_usage', 'fargate_percentage', 'functions_usage', 'functions_percentage', 'infra_host_usage', 'infra_host_percentage', 'invocations_usage', 'invocations_percentage', 'npm_host_usage', 'npm_host_percentage', 'profiled_container_usage', 'profiled_container_percentage', 'profiled_fargate_usage', 'profiled_fargate_percentage', 'profiled_host_usage', 'profiled_host_percentage', 'snmp_usage', 'snmp_percentage', 'estimated_rum_sessions_usage', 'estimated_rum_sessions_percentage', '*'] if @api_client.config.client_side_validation && opts[:'sort_name'] && !allowable_values.include?(opts[:'sort_name']) fail ArgumentError, "invalid value for \"sort_name\", must be one of #{allowable_values}" end diff --git a/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb b/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb index 7a303468c5b3..f79d29b00c2d 100644 --- a/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +++ b/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb @@ -46,6 +46,7 @@ class HourlyUsageAttributionUsageType INVOCATIONS_USAGE = "invocations_usage".freeze NPM_HOST_USAGE = "npm_host_usage".freeze PROFILED_CONTAINER_USAGE = "profiled_container_usage".freeze + PROFILED_FARGATE_USAGE = "profiled_fargate_usage".freeze PROFILED_HOST_USAGE = "profiled_host_usage".freeze SNMP_USAGE = "snmp_usage".freeze ESTIMATED_RUM_SESSIONS_USAGE = "estimated_rum_sessions_usage".freeze diff --git a/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb b/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb index 36e58cea7e5a..2519e0a5ec6a 100644 --- a/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +++ b/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb @@ -71,6 +71,8 @@ class MonthlyUsageAttributionSupportedMetrics NPM_HOST_PERCENTAGE = "npm_host_percentage".freeze PROFILED_CONTAINER_USAGE = "profiled_container_usage".freeze PROFILED_CONTAINER_PERCENTAGE = "profiled_container_percentage".freeze + PROFILED_FARGATE_USAGE = "profiled_fargate_usage".freeze + PROFILED_FARGATE_PERCENTAGE = "profiled_fargate_percentage".freeze PROFILED_HOST_USAGE = "profiled_host_usage".freeze PROFILED_HOST_PERCENTAGE = "profiled_host_percentage".freeze SNMP_USAGE = "snmp_usage".freeze diff --git a/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb b/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb index 92a8c5f5ec1d..c1f3f3bba1ee 100644 --- a/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +++ b/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb @@ -181,6 +181,12 @@ class MonthlyUsageAttributionValues # The profiled container usage by tag(s). attr_accessor :profiled_container_usage + # The percentage of profiled Fargate task usage by tag(s). + attr_accessor :profiled_fargate_percentage + + # The profiled Fargate task usage by tag(s). + attr_accessor :profiled_fargate_usage + # The percentage of profiled hosts usage by tag(s). attr_accessor :profiled_host_percentage @@ -249,6 +255,8 @@ def self.attribute_map :'npm_host_usage' => :'npm_host_usage', :'profiled_container_percentage' => :'profiled_container_percentage', :'profiled_container_usage' => :'profiled_container_usage', + :'profiled_fargate_percentage' => :'profiled_fargate_percentage', + :'profiled_fargate_usage' => :'profiled_fargate_usage', :'profiled_host_percentage' => :'profiled_host_percentage', :'profiled_host_usage' => :'profiled_host_usage', :'snmp_percentage' => :'snmp_percentage', @@ -312,6 +320,8 @@ def self.openapi_types :'npm_host_usage' => :'Float', :'profiled_container_percentage' => :'Float', :'profiled_container_usage' => :'Float', + :'profiled_fargate_percentage' => :'Float', + :'profiled_fargate_usage' => :'Float', :'profiled_host_percentage' => :'Float', :'profiled_host_usage' => :'Float', :'snmp_percentage' => :'Float', @@ -543,6 +553,14 @@ def initialize(attributes = {}) self.profiled_container_usage = attributes[:'profiled_container_usage'] end + if attributes.key?(:'profiled_fargate_percentage') + self.profiled_fargate_percentage = attributes[:'profiled_fargate_percentage'] + end + + if attributes.key?(:'profiled_fargate_usage') + self.profiled_fargate_usage = attributes[:'profiled_fargate_usage'] + end + if attributes.key?(:'profiled_host_percentage') self.profiled_host_percentage = attributes[:'profiled_host_percentage'] end @@ -625,6 +643,8 @@ def ==(o) npm_host_usage == o.npm_host_usage && profiled_container_percentage == o.profiled_container_percentage && profiled_container_usage == o.profiled_container_usage && + profiled_fargate_percentage == o.profiled_fargate_percentage && + profiled_fargate_usage == o.profiled_fargate_usage && profiled_host_percentage == o.profiled_host_percentage && profiled_host_usage == o.profiled_host_usage && snmp_percentage == o.snmp_percentage && @@ -635,7 +655,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [api_percentage, api_usage, apm_fargate_percentage, apm_fargate_usage, apm_host_percentage, apm_host_usage, appsec_fargate_percentage, appsec_fargate_usage, appsec_percentage, appsec_usage, browser_percentage, browser_usage, container_excl_agent_percentage, container_excl_agent_usage, container_percentage, container_usage, cspm_containers_percentage, cspm_containers_usage, cspm_hosts_percentage, cspm_hosts_usage, custom_timeseries_percentage, custom_timeseries_usage, cws_containers_percentage, cws_containers_usage, cws_hosts_percentage, cws_hosts_usage, dbm_hosts_percentage, dbm_hosts_usage, dbm_queries_percentage, dbm_queries_usage, estimated_indexed_logs_percentage, estimated_indexed_logs_usage, estimated_indexed_spans_percentage, estimated_indexed_spans_usage, estimated_ingested_logs_percentage, estimated_ingested_logs_usage, estimated_ingested_spans_percentage, estimated_ingested_spans_usage, estimated_rum_sessions_percentage, estimated_rum_sessions_usage, fargate_percentage, fargate_usage, functions_percentage, functions_usage, infra_host_percentage, infra_host_usage, invocations_percentage, invocations_usage, npm_host_percentage, npm_host_usage, profiled_container_percentage, profiled_container_usage, profiled_host_percentage, profiled_host_usage, snmp_percentage, snmp_usage].hash + [api_percentage, api_usage, apm_fargate_percentage, apm_fargate_usage, apm_host_percentage, apm_host_usage, appsec_fargate_percentage, appsec_fargate_usage, appsec_percentage, appsec_usage, browser_percentage, browser_usage, container_excl_agent_percentage, container_excl_agent_usage, container_percentage, container_usage, cspm_containers_percentage, cspm_containers_usage, cspm_hosts_percentage, cspm_hosts_usage, custom_timeseries_percentage, custom_timeseries_usage, cws_containers_percentage, cws_containers_usage, cws_hosts_percentage, cws_hosts_usage, dbm_hosts_percentage, dbm_hosts_usage, dbm_queries_percentage, dbm_queries_usage, estimated_indexed_logs_percentage, estimated_indexed_logs_usage, estimated_indexed_spans_percentage, estimated_indexed_spans_usage, estimated_ingested_logs_percentage, estimated_ingested_logs_usage, estimated_ingested_spans_percentage, estimated_ingested_spans_usage, estimated_rum_sessions_percentage, estimated_rum_sessions_usage, fargate_percentage, fargate_usage, functions_percentage, functions_usage, infra_host_percentage, infra_host_usage, invocations_percentage, invocations_usage, npm_host_percentage, npm_host_usage, profiled_container_percentage, profiled_container_usage, profiled_fargate_percentage, profiled_fargate_usage, profiled_host_percentage, profiled_host_usage, snmp_percentage, snmp_usage].hash end end end