From a3b7666ea874d2cd43d1e4dbadc129616a819a4b Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Tue, 2 Dec 2025 21:36:46 +0000 Subject: [PATCH] Regenerate client from commit 29e4e3d of spec repo --- .generator/schemas/v2/openapi.yaml | 17 +++++++++++++++++ .../model/gcpsts_service_account_attributes.py | 16 ++++++++++++++++ tests/v2/features/gcp_integration.feature | 8 ++++---- tests/v2/features/given.json | 2 +- 4 files changed, 38 insertions(+), 5 deletions(-) diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 6bc8997cfd..af1e649852 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -22330,6 +22330,13 @@ components: product for this service account. Note: This requires resource_collection_enabled to be set to true.' type: boolean + is_global_location_enabled: + default: true + description: "When enabled, metrics, events, and resources where location + is explicitly stated as \u201Cglobal\u201D or where location information + could not be deduced from GCP labels will be collected." + example: true + type: boolean is_per_project_quota_enabled: default: false description: When enabled, Datadog applies the `X-Goog-User-Project` header, @@ -22371,6 +22378,16 @@ components: items: $ref: '#/components/schemas/GCPMonitoredResourceConfig' type: array + region_filter_configs: + description: Filters to limit metric collection by GCP region. By default + Datadog collects from all regions. + example: + - us-east1 + - europe-north1 + items: + description: Region Filter Configs + type: string + type: array resource_collection_enabled: description: When enabled, Datadog scans for all resources in your GCP environment. type: boolean diff --git a/src/datadog_api_client/v2/model/gcpsts_service_account_attributes.py b/src/datadog_api_client/v2/model/gcpsts_service_account_attributes.py index 422265ff53..e2f927986a 100644 --- a/src/datadog_api_client/v2/model/gcpsts_service_account_attributes.py +++ b/src/datadog_api_client/v2/model/gcpsts_service_account_attributes.py @@ -31,11 +31,13 @@ def openapi_types(_): "cloud_run_revision_filters": ([str],), "host_filters": ([str],), "is_cspm_enabled": (bool,), + "is_global_location_enabled": (bool,), "is_per_project_quota_enabled": (bool,), "is_resource_change_collection_enabled": (bool,), "is_security_command_center_enabled": (bool,), "metric_namespace_configs": ([GCPMetricNamespaceConfig],), "monitored_resource_configs": ([GCPMonitoredResourceConfig],), + "region_filter_configs": ([str],), "resource_collection_enabled": (bool,), } @@ -46,11 +48,13 @@ def openapi_types(_): "cloud_run_revision_filters": "cloud_run_revision_filters", "host_filters": "host_filters", "is_cspm_enabled": "is_cspm_enabled", + "is_global_location_enabled": "is_global_location_enabled", "is_per_project_quota_enabled": "is_per_project_quota_enabled", "is_resource_change_collection_enabled": "is_resource_change_collection_enabled", "is_security_command_center_enabled": "is_security_command_center_enabled", "metric_namespace_configs": "metric_namespace_configs", "monitored_resource_configs": "monitored_resource_configs", + "region_filter_configs": "region_filter_configs", "resource_collection_enabled": "resource_collection_enabled", } @@ -62,11 +66,13 @@ def __init__( cloud_run_revision_filters: Union[List[str], UnsetType] = unset, host_filters: Union[List[str], UnsetType] = unset, is_cspm_enabled: Union[bool, UnsetType] = unset, + is_global_location_enabled: Union[bool, UnsetType] = unset, is_per_project_quota_enabled: Union[bool, UnsetType] = unset, is_resource_change_collection_enabled: Union[bool, UnsetType] = unset, is_security_command_center_enabled: Union[bool, UnsetType] = unset, metric_namespace_configs: Union[List[GCPMetricNamespaceConfig], UnsetType] = unset, monitored_resource_configs: Union[List[GCPMonitoredResourceConfig], UnsetType] = unset, + region_filter_configs: Union[List[str], UnsetType] = unset, resource_collection_enabled: Union[bool, UnsetType] = unset, **kwargs, ): @@ -95,6 +101,9 @@ def __init__( :param is_cspm_enabled: When enabled, Datadog will activate the Cloud Security Monitoring product for this service account. Note: This requires resource_collection_enabled to be set to true. :type is_cspm_enabled: bool, optional + :param is_global_location_enabled: When enabled, metrics, events, and resources where location is explicitly stated as “global” or where location information could not be deduced from GCP labels will be collected. + :type is_global_location_enabled: bool, optional + :param is_per_project_quota_enabled: When enabled, Datadog applies the ``X-Goog-User-Project`` header, attributing Google Cloud billing and quota usage to the project being monitored rather than the default service account project. :type is_per_project_quota_enabled: bool, optional @@ -110,6 +119,9 @@ def __init__( :param monitored_resource_configs: Configurations for GCP monitored resources. :type monitored_resource_configs: [GCPMonitoredResourceConfig], optional + :param region_filter_configs: Filters to limit metric collection by GCP region. By default Datadog collects from all regions. + :type region_filter_configs: [str], optional + :param resource_collection_enabled: When enabled, Datadog scans for all resources in your GCP environment. :type resource_collection_enabled: bool, optional """ @@ -125,6 +137,8 @@ def __init__( kwargs["host_filters"] = host_filters if is_cspm_enabled is not unset: kwargs["is_cspm_enabled"] = is_cspm_enabled + if is_global_location_enabled is not unset: + kwargs["is_global_location_enabled"] = is_global_location_enabled if is_per_project_quota_enabled is not unset: kwargs["is_per_project_quota_enabled"] = is_per_project_quota_enabled if is_resource_change_collection_enabled is not unset: @@ -135,6 +149,8 @@ def __init__( kwargs["metric_namespace_configs"] = metric_namespace_configs if monitored_resource_configs is not unset: kwargs["monitored_resource_configs"] = monitored_resource_configs + if region_filter_configs is not unset: + kwargs["region_filter_configs"] = region_filter_configs if resource_collection_enabled is not unset: kwargs["resource_collection_enabled"] = resource_collection_enabled super().__init__(kwargs) diff --git a/tests/v2/features/gcp_integration.feature b/tests/v2/features/gcp_integration.feature index 6d47a1508e..b832a25073 100644 --- a/tests/v2/features/gcp_integration.feature +++ b/tests/v2/features/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"}, {"filters": ["snapshot.*", "!*_by_region"], "id": "pubsub"}], "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_global_location_enabled": true, "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"}], "region_filter_configs": ["us-east1", "europe-north1"]}, "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"}, {"filters": ["snapshot.*", "!*_by_region"], "id": "pubsub"}], "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_global_location_enabled": true, "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"}], "region_filter_configs": ["us-east1", "europe-north1"]}, "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"}, {"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"}} + 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_global_location_enabled": true, "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"}], "region_filter_configs": ["us-east1", "europe-north1"]}, "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"}, {"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"}} + 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_global_location_enabled": true, "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"}], "region_filter_configs": ["us-east1", "europe-north1"]}, "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/tests/v2/features/given.json b/tests/v2/features/given.json index d1d4bce2f1..6c6d3bf98f 100644 --- a/tests/v2/features/given.json +++ b/tests/v2/features/given.json @@ -350,7 +350,7 @@ "parameters": [ { "name": "body", - "value": "{\n \"data\": {\n \"type\": \"deployment_gate\",\n \"attributes\": {\n \"service\": \"my-service\",\n \"env\": \"production\",\n \"identifier\": \"my-gate-{{ unique_lower_alnum }}\",\n \"dry_run\": false\n }\n }\n}" + "value": "{\n \"data\": {\n \"type\": \"deployment_gate\",\n \"attributes\": {\n \"service\": \"my-service\",\n \"env\": \"production\",\n \"identifier\": \"my-gate\",\n \"dry_run\": false\n }\n }\n}" } ], "step": "there is a valid \"deployment_gate\" in the system",