Skip to content

Commit 82259ae

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 2ffcae8 of spec repo
1 parent fc4fc3c commit 82259ae

File tree

3 files changed

+39
-4
lines changed

3 files changed

+39
-4
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23536,6 +23536,13 @@ components:
2353623536
product for this service account. Note: This requires resource_collection_enabled
2353723537
to be set to true.'
2353823538
type: boolean
23539+
is_global_location_enabled:
23540+
default: true
23541+
description: When enabled, Datadog collects metrics where location is explicitly
23542+
stated as "global" or where location information cannot be deduced from
23543+
GCP labels.
23544+
example: true
23545+
type: boolean
2353923546
is_per_project_quota_enabled:
2354023547
default: false
2354123548
description: When enabled, Datadog applies the `X-Goog-User-Project` header,
@@ -23577,6 +23584,18 @@ components:
2357723584
items:
2357823585
$ref: '#/components/schemas/GCPMonitoredResourceConfig'
2357923586
type: array
23587+
region_filter_configs:
23588+
description: Configurations for GCP location filtering, such as region,
23589+
multi-region, or zone. Only monitored resources that match the specified
23590+
regions are imported into Datadog. By default, Datadog collects from all
23591+
locations.
23592+
example:
23593+
- nam4
23594+
- europe-north1
23595+
items:
23596+
description: Region Filter Configs
23597+
type: string
23598+
type: array
2358023599
resource_collection_enabled:
2358123600
description: When enabled, Datadog scans for all resources in your GCP environment.
2358223601
type: boolean

src/datadog_api_client/v2/model/gcpsts_service_account_attributes.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,13 @@ def openapi_types(_):
3131
"cloud_run_revision_filters": ([str],),
3232
"host_filters": ([str],),
3333
"is_cspm_enabled": (bool,),
34+
"is_global_location_enabled": (bool,),
3435
"is_per_project_quota_enabled": (bool,),
3536
"is_resource_change_collection_enabled": (bool,),
3637
"is_security_command_center_enabled": (bool,),
3738
"metric_namespace_configs": ([GCPMetricNamespaceConfig],),
3839
"monitored_resource_configs": ([GCPMonitoredResourceConfig],),
40+
"region_filter_configs": ([str],),
3941
"resource_collection_enabled": (bool,),
4042
}
4143

@@ -46,11 +48,13 @@ def openapi_types(_):
4648
"cloud_run_revision_filters": "cloud_run_revision_filters",
4749
"host_filters": "host_filters",
4850
"is_cspm_enabled": "is_cspm_enabled",
51+
"is_global_location_enabled": "is_global_location_enabled",
4952
"is_per_project_quota_enabled": "is_per_project_quota_enabled",
5053
"is_resource_change_collection_enabled": "is_resource_change_collection_enabled",
5154
"is_security_command_center_enabled": "is_security_command_center_enabled",
5255
"metric_namespace_configs": "metric_namespace_configs",
5356
"monitored_resource_configs": "monitored_resource_configs",
57+
"region_filter_configs": "region_filter_configs",
5458
"resource_collection_enabled": "resource_collection_enabled",
5559
}
5660

@@ -62,11 +66,13 @@ def __init__(
6266
cloud_run_revision_filters: Union[List[str], UnsetType] = unset,
6367
host_filters: Union[List[str], UnsetType] = unset,
6468
is_cspm_enabled: Union[bool, UnsetType] = unset,
69+
is_global_location_enabled: Union[bool, UnsetType] = unset,
6570
is_per_project_quota_enabled: Union[bool, UnsetType] = unset,
6671
is_resource_change_collection_enabled: Union[bool, UnsetType] = unset,
6772
is_security_command_center_enabled: Union[bool, UnsetType] = unset,
6873
metric_namespace_configs: Union[List[GCPMetricNamespaceConfig], UnsetType] = unset,
6974
monitored_resource_configs: Union[List[GCPMonitoredResourceConfig], UnsetType] = unset,
75+
region_filter_configs: Union[List[str], UnsetType] = unset,
7076
resource_collection_enabled: Union[bool, UnsetType] = unset,
7177
**kwargs,
7278
):
@@ -95,6 +101,9 @@ def __init__(
95101
: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.
96102
:type is_cspm_enabled: bool, optional
97103
104+
:param is_global_location_enabled: When enabled, Datadog collects metrics where location is explicitly stated as "global" or where location information cannot be deduced from GCP labels.
105+
:type is_global_location_enabled: bool, optional
106+
98107
: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.
99108
:type is_per_project_quota_enabled: bool, optional
100109
@@ -110,6 +119,9 @@ def __init__(
110119
:param monitored_resource_configs: Configurations for GCP monitored resources.
111120
:type monitored_resource_configs: [GCPMonitoredResourceConfig], optional
112121
122+
:param region_filter_configs: Configurations for GCP location filtering, such as region, multi-region, or zone. Only monitored resources that match the specified regions are imported into Datadog. By default, Datadog collects from all locations.
123+
:type region_filter_configs: [str], optional
124+
113125
:param resource_collection_enabled: When enabled, Datadog scans for all resources in your GCP environment.
114126
:type resource_collection_enabled: bool, optional
115127
"""
@@ -125,6 +137,8 @@ def __init__(
125137
kwargs["host_filters"] = host_filters
126138
if is_cspm_enabled is not unset:
127139
kwargs["is_cspm_enabled"] = is_cspm_enabled
140+
if is_global_location_enabled is not unset:
141+
kwargs["is_global_location_enabled"] = is_global_location_enabled
128142
if is_per_project_quota_enabled is not unset:
129143
kwargs["is_per_project_quota_enabled"] = is_per_project_quota_enabled
130144
if is_resource_change_collection_enabled is not unset:
@@ -135,6 +149,8 @@ def __init__(
135149
kwargs["metric_namespace_configs"] = metric_namespace_configs
136150
if monitored_resource_configs is not unset:
137151
kwargs["monitored_resource_configs"] = monitored_resource_configs
152+
if region_filter_configs is not unset:
153+
kwargs["region_filter_configs"] = region_filter_configs
138154
if resource_collection_enabled is not unset:
139155
kwargs["resource_collection_enabled"] = resource_collection_enabled
140156
super().__init__(kwargs)

tests/v2/features/gcp_integration.feature

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ Feature: GCP Integration
3434
@generated @skip @team:DataDog/gcp-integrations
3535
Scenario: Create a new entry for your service account returns "Bad Request" response
3636
Given new "CreateGCPSTSAccount" request
37-
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"}}
37+
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": ["nam4", "europe-north1"]}, "type": "gcp_service_account"}}
3838
When the request is sent
3939
Then the response status is 400 Bad Request
4040

4141
@generated @skip @team:DataDog/gcp-integrations
4242
Scenario: Create a new entry for your service account returns "Conflict" response
4343
Given new "CreateGCPSTSAccount" request
44-
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"}}
44+
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": ["nam4", "europe-north1"]}, "type": "gcp_service_account"}}
4545
When the request is sent
4646
Then the response status is 409 Conflict
4747

@@ -151,15 +151,15 @@ Feature: GCP Integration
151151
Scenario: Update STS Service Account returns "Bad Request" response
152152
Given new "UpdateGCPSTSAccount" request
153153
And request contains "account_id" parameter from "REPLACE.ME"
154-
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"}}
154+
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": ["nam4", "europe-north1"]}, "id": "d291291f-12c2-22g4-j290-123456678897", "type": "gcp_service_account"}}
155155
When the request is sent
156156
Then the response status is 400 Bad Request
157157

158158
@generated @skip @team:DataDog/gcp-integrations
159159
Scenario: Update STS Service Account returns "Not Found" response
160160
Given new "UpdateGCPSTSAccount" request
161161
And request contains "account_id" parameter from "REPLACE.ME"
162-
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"}}
162+
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": ["nam4", "europe-north1"]}, "id": "d291291f-12c2-22g4-j290-123456678897", "type": "gcp_service_account"}}
163163
When the request is sent
164164
Then the response status is 404 Not Found
165165

0 commit comments

Comments
 (0)