From c774bbe5eaf0842eaf189e880f113ec09bc79089 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Wed, 22 Oct 2025 20:50:05 +0000 Subject: [PATCH] Regenerate client from commit 05ffea6 of spec repo --- .generator/schemas/v2/openapi.yaml | 17 ++++++++++++++++- features/v2/gcp_integration.feature | 8 ++++---- .../v2/models/gcp_metric_namespace_config.rb | 14 +++++++++++++- 3 files changed, 33 insertions(+), 6 deletions(-) diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 364018c47d51..47cd948788a6 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -20406,9 +20406,20 @@ components: to this GCP metric namespace. example: true type: boolean + filters: + description: When enabled, Datadog applies these additional filters to limit + metric collection. A metric is collected only if it does not match all + exclusion filters and matches at least one allow filter. + example: + - snapshot.* + - '!*_by_region' + items: + description: A metric namespace filter + type: string + type: array id: description: The id of the GCP metric namespace. - example: aiplatform + example: pubsub type: string type: object GCPMonitoredResourceConfig: @@ -20570,6 +20581,10 @@ components: example: - disabled: true id: aiplatform + - filters: + - snapshot.* + - '!*_by_region' + id: pubsub items: $ref: '#/components/schemas/GCPMetricNamespaceConfig' type: array diff --git a/features/v2/gcp_integration.feature b/features/v2/gcp_integration.feature index 935adb2d93bf..6d47a1508eb6 100644 --- a/features/v2/gcp_integration.feature +++ b/features/v2/gcp_integration.feature @@ -34,14 +34,14 @@ Feature: GCP Integration @generated @skip @team:DataDog/gcp-integrations Scenario: Create a new entry for your service account returns "Bad Request" response Given new "CreateGCPSTSAccount" request - And body with value {"data": {"attributes": {"account_tags": [], "client_email": "datadog-service-account@test-project.iam.gserviceaccount.com", "cloud_run_revision_filters": ["$KEY:$VALUE"], "host_filters": ["$KEY:$VALUE"], "is_per_project_quota_enabled": true, "is_resource_change_collection_enabled": true, "is_security_command_center_enabled": true, "metric_namespace_configs": [{"disabled": true, "id": "aiplatform"}], "monitored_resource_configs": [{"filters": ["$KEY:$VALUE"], "type": "gce_instance"}]}, "type": "gcp_service_account"}} + And body with value {"data": {"attributes": {"account_tags": [], "client_email": "datadog-service-account@test-project.iam.gserviceaccount.com", "cloud_run_revision_filters": ["$KEY:$VALUE"], "host_filters": ["$KEY:$VALUE"], "is_per_project_quota_enabled": true, "is_resource_change_collection_enabled": true, "is_security_command_center_enabled": true, "metric_namespace_configs": [{"disabled": true, "id": "aiplatform"}, {"filters": ["snapshot.*", "!*_by_region"], "id": "pubsub"}], "monitored_resource_configs": [{"filters": ["$KEY:$VALUE"], "type": "gce_instance"}]}, "type": "gcp_service_account"}} When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/gcp-integrations Scenario: Create a new entry for your service account returns "Conflict" response Given new "CreateGCPSTSAccount" request - And body with value {"data": {"attributes": {"account_tags": [], "client_email": "datadog-service-account@test-project.iam.gserviceaccount.com", "cloud_run_revision_filters": ["$KEY:$VALUE"], "host_filters": ["$KEY:$VALUE"], "is_per_project_quota_enabled": true, "is_resource_change_collection_enabled": true, "is_security_command_center_enabled": true, "metric_namespace_configs": [{"disabled": true, "id": "aiplatform"}], "monitored_resource_configs": [{"filters": ["$KEY:$VALUE"], "type": "gce_instance"}]}, "type": "gcp_service_account"}} + And body with value {"data": {"attributes": {"account_tags": [], "client_email": "datadog-service-account@test-project.iam.gserviceaccount.com", "cloud_run_revision_filters": ["$KEY:$VALUE"], "host_filters": ["$KEY:$VALUE"], "is_per_project_quota_enabled": true, "is_resource_change_collection_enabled": true, "is_security_command_center_enabled": true, "metric_namespace_configs": [{"disabled": true, "id": "aiplatform"}, {"filters": ["snapshot.*", "!*_by_region"], "id": "pubsub"}], "monitored_resource_configs": [{"filters": ["$KEY:$VALUE"], "type": "gce_instance"}]}, "type": "gcp_service_account"}} When the request is sent Then the response status is 409 Conflict @@ -151,7 +151,7 @@ Feature: GCP Integration Scenario: Update STS Service Account returns "Bad Request" response Given new "UpdateGCPSTSAccount" request And request contains "account_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"account_tags": [], "client_email": "datadog-service-account@test-project.iam.gserviceaccount.com", "cloud_run_revision_filters": ["$KEY:$VALUE"], "host_filters": ["$KEY:$VALUE"], "is_per_project_quota_enabled": true, "is_resource_change_collection_enabled": true, "is_security_command_center_enabled": true, "metric_namespace_configs": [{"disabled": true, "id": "aiplatform"}], "monitored_resource_configs": [{"filters": ["$KEY:$VALUE"], "type": "gce_instance"}]}, "id": "d291291f-12c2-22g4-j290-123456678897", "type": "gcp_service_account"}} + And body with value {"data": {"attributes": {"account_tags": [], "client_email": "datadog-service-account@test-project.iam.gserviceaccount.com", "cloud_run_revision_filters": ["$KEY:$VALUE"], "host_filters": ["$KEY:$VALUE"], "is_per_project_quota_enabled": true, "is_resource_change_collection_enabled": true, "is_security_command_center_enabled": true, "metric_namespace_configs": [{"disabled": true, "id": "aiplatform"}, {"filters": ["snapshot.*", "!*_by_region"], "id": "pubsub"}], "monitored_resource_configs": [{"filters": ["$KEY:$VALUE"], "type": "gce_instance"}]}, "id": "d291291f-12c2-22g4-j290-123456678897", "type": "gcp_service_account"}} When the request is sent Then the response status is 400 Bad Request @@ -159,7 +159,7 @@ Feature: GCP Integration Scenario: Update STS Service Account returns "Not Found" response Given new "UpdateGCPSTSAccount" request And request contains "account_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"account_tags": [], "client_email": "datadog-service-account@test-project.iam.gserviceaccount.com", "cloud_run_revision_filters": ["$KEY:$VALUE"], "host_filters": ["$KEY:$VALUE"], "is_per_project_quota_enabled": true, "is_resource_change_collection_enabled": true, "is_security_command_center_enabled": true, "metric_namespace_configs": [{"disabled": true, "id": "aiplatform"}], "monitored_resource_configs": [{"filters": ["$KEY:$VALUE"], "type": "gce_instance"}]}, "id": "d291291f-12c2-22g4-j290-123456678897", "type": "gcp_service_account"}} + And body with value {"data": {"attributes": {"account_tags": [], "client_email": "datadog-service-account@test-project.iam.gserviceaccount.com", "cloud_run_revision_filters": ["$KEY:$VALUE"], "host_filters": ["$KEY:$VALUE"], "is_per_project_quota_enabled": true, "is_resource_change_collection_enabled": true, "is_security_command_center_enabled": true, "metric_namespace_configs": [{"disabled": true, "id": "aiplatform"}, {"filters": ["snapshot.*", "!*_by_region"], "id": "pubsub"}], "monitored_resource_configs": [{"filters": ["$KEY:$VALUE"], "type": "gce_instance"}]}, "id": "d291291f-12c2-22g4-j290-123456678897", "type": "gcp_service_account"}} When the request is sent Then the response status is 404 Not Found diff --git a/lib/datadog_api_client/v2/models/gcp_metric_namespace_config.rb b/lib/datadog_api_client/v2/models/gcp_metric_namespace_config.rb index 243c4e6aa1b7..1cf5c550e3ea 100644 --- a/lib/datadog_api_client/v2/models/gcp_metric_namespace_config.rb +++ b/lib/datadog_api_client/v2/models/gcp_metric_namespace_config.rb @@ -24,6 +24,9 @@ class GCPMetricNamespaceConfig # When disabled, Datadog does not collect metrics that are related to this GCP metric namespace. attr_accessor :disabled + # When enabled, Datadog applies these additional filters to limit metric collection. A metric is collected only if it does not match all exclusion filters and matches at least one allow filter. + attr_accessor :filters + # The id of the GCP metric namespace. attr_accessor :id @@ -34,6 +37,7 @@ class GCPMetricNamespaceConfig def self.attribute_map { :'disabled' => :'disabled', + :'filters' => :'filters', :'id' => :'id' } end @@ -43,6 +47,7 @@ def self.attribute_map def self.openapi_types { :'disabled' => :'Boolean', + :'filters' => :'Array', :'id' => :'String' } end @@ -69,6 +74,12 @@ def initialize(attributes = {}) self.disabled = attributes[:'disabled'] end + if attributes.key?(:'filters') + if (value = attributes[:'filters']).is_a?(Array) + self.filters = value + end + end + if attributes.key?(:'id') self.id = attributes[:'id'] end @@ -101,6 +112,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && disabled == o.disabled && + filters == o.filters && id == o.id && additional_properties == o.additional_properties end @@ -109,7 +121,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [disabled, id, additional_properties].hash + [disabled, filters, id, additional_properties].hash end end end