Skip to content

Commit 76aaf35

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
and
ci.datadog-api-spec
authored
datadog_integration_gcp_sts Add Support for IsPerProjectQuotaEnabled for GCP STS Service Accounts (#2180)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent ffb7dcf commit 76aaf35

File tree

4 files changed

+23
-8
lines changed

4 files changed

+23
-8
lines changed

.apigentools-info

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2025-04-17 13:26:12.084116",
8-
"spec_repo_commit": "12ab5180"
7+
"regenerated": "2025-04-22 18:28:02.640100",
8+
"spec_repo_commit": "2b6fa951"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-04-17 13:26:12.100267",
13-
"spec_repo_commit": "12ab5180"
12+
"regenerated": "2025-04-22 18:28:02.655906",
13+
"spec_repo_commit": "2b6fa951"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

+7
Original file line numberDiff line numberDiff line change
@@ -14676,6 +14676,13 @@ components:
1467614676
product for this service account. Note: This requires resource_collection_enabled
1467714677
to be set to true.'
1467814678
type: boolean
14679+
is_per_project_quota_enabled:
14680+
default: false
14681+
description: When enabled, Datadog applies the `X-Goog-User-Project` header,
14682+
attributing Google Cloud billing and quota usage to the project being
14683+
monitored rather than the default service account project.
14684+
example: true
14685+
type: boolean
1467914686
is_resource_change_collection_enabled:
1468014687
default: false
1468114688
description: When enabled, Datadog scans for all resource change data in

features/v2/gcp_integration.feature

+4-4
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": "[email protected]", "cloud_run_revision_filters": ["$KEY:$VALUE"], "host_filters": [], "is_resource_change_collection_enabled": true, "is_security_command_center_enabled": true, "metric_namespace_configs": [{"disabled": true, "id": "aiplatform"}]}, "type": "gcp_service_account"}}
37+
And body with value {"data": {"attributes": {"account_tags": [], "client_email": "[email protected]", "cloud_run_revision_filters": ["$KEY:$VALUE"], "host_filters": [], "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"}]}, "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": "[email protected]", "cloud_run_revision_filters": ["$KEY:$VALUE"], "host_filters": [], "is_resource_change_collection_enabled": true, "is_security_command_center_enabled": true, "metric_namespace_configs": [{"disabled": true, "id": "aiplatform"}]}, "type": "gcp_service_account"}}
44+
And body with value {"data": {"attributes": {"account_tags": [], "client_email": "[email protected]", "cloud_run_revision_filters": ["$KEY:$VALUE"], "host_filters": [], "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"}]}, "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": "[email protected]", "cloud_run_revision_filters": ["$KEY:$VALUE"], "host_filters": [], "is_resource_change_collection_enabled": true, "is_security_command_center_enabled": true, "metric_namespace_configs": [{"disabled": true, "id": "aiplatform"}]}, "id": "d291291f-12c2-22g4-j290-123456678897", "type": "gcp_service_account"}}
154+
And body with value {"data": {"attributes": {"account_tags": [], "client_email": "[email protected]", "cloud_run_revision_filters": ["$KEY:$VALUE"], "host_filters": [], "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"}]}, "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": "[email protected]", "cloud_run_revision_filters": ["$KEY:$VALUE"], "host_filters": [], "is_resource_change_collection_enabled": true, "is_security_command_center_enabled": true, "metric_namespace_configs": [{"disabled": true, "id": "aiplatform"}]}, "id": "d291291f-12c2-22g4-j290-123456678897", "type": "gcp_service_account"}}
162+
And body with value {"data": {"attributes": {"account_tags": [], "client_email": "[email protected]", "cloud_run_revision_filters": ["$KEY:$VALUE"], "host_filters": [], "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"}]}, "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

packages/datadog-api-client-v2/models/GCPSTSServiceAccountAttributes.ts

+8
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ export class GCPSTSServiceAccountAttributes {
3636
* 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.
3737
*/
3838
"isCspmEnabled"?: boolean;
39+
/**
40+
* 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.
41+
*/
42+
"isPerProjectQuotaEnabled"?: boolean;
3943
/**
4044
* When enabled, Datadog scans for all resource change data in your Google Cloud environment.
4145
*/
@@ -93,6 +97,10 @@ export class GCPSTSServiceAccountAttributes {
9397
baseName: "is_cspm_enabled",
9498
type: "boolean",
9599
},
100+
isPerProjectQuotaEnabled: {
101+
baseName: "is_per_project_quota_enabled",
102+
type: "boolean",
103+
},
96104
isResourceChangeCollectionEnabled: {
97105
baseName: "is_resource_change_collection_enabled",
98106
type: "boolean",

0 commit comments

Comments
 (0)