Skip to content

Commit c15c2ac

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit da3f25d2 of spec repo
1 parent 65afec6 commit c15c2ac

4 files changed

Lines changed: 55 additions & 9 deletions

File tree

.apigentools-info

Lines changed: 4 additions & 4 deletions
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:13.758060",
8-
"spec_repo_commit": "12ab5180"
7+
"regenerated": "2025-04-21 22:29:14.941472",
8+
"spec_repo_commit": "da3f25d2"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-04-17 13:26:13.777583",
13-
"spec_repo_commit": "12ab5180"
12+
"regenerated": "2025-04-21 22:29:14.961229",
13+
"spec_repo_commit": "da3f25d2"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 7 additions & 0 deletions
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

api/datadogV2/model_gcpsts_service_account_attributes.go

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ type GCPSTSServiceAccountAttributes struct {
2323
HostFilters []string `json:"host_filters,omitempty"`
2424
// 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.
2525
IsCspmEnabled *bool `json:"is_cspm_enabled,omitempty"`
26+
// 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.
27+
IsPerProjectQuotaEnabled *bool `json:"is_per_project_quota_enabled,omitempty"`
2628
// When enabled, Datadog scans for all resource change data in your Google Cloud environment.
2729
IsResourceChangeCollectionEnabled *bool `json:"is_resource_change_collection_enabled,omitempty"`
2830
// When enabled, Datadog will attempt to collect Security Command Center Findings. Note: This requires additional permissions on the service account.
@@ -42,6 +44,8 @@ type GCPSTSServiceAccountAttributes struct {
4244
// will change when the set of required properties is changed.
4345
func NewGCPSTSServiceAccountAttributes() *GCPSTSServiceAccountAttributes {
4446
this := GCPSTSServiceAccountAttributes{}
47+
var isPerProjectQuotaEnabled bool = false
48+
this.IsPerProjectQuotaEnabled = &isPerProjectQuotaEnabled
4549
var isResourceChangeCollectionEnabled bool = false
4650
this.IsResourceChangeCollectionEnabled = &isResourceChangeCollectionEnabled
4751
var isSecurityCommandCenterEnabled bool = false
@@ -54,6 +58,8 @@ func NewGCPSTSServiceAccountAttributes() *GCPSTSServiceAccountAttributes {
5458
// but it doesn't guarantee that properties required by API are set.
5559
func NewGCPSTSServiceAccountAttributesWithDefaults() *GCPSTSServiceAccountAttributes {
5660
this := GCPSTSServiceAccountAttributes{}
61+
var isPerProjectQuotaEnabled bool = false
62+
this.IsPerProjectQuotaEnabled = &isPerProjectQuotaEnabled
5763
var isResourceChangeCollectionEnabled bool = false
5864
this.IsResourceChangeCollectionEnabled = &isResourceChangeCollectionEnabled
5965
var isSecurityCommandCenterEnabled bool = false
@@ -229,6 +235,34 @@ func (o *GCPSTSServiceAccountAttributes) SetIsCspmEnabled(v bool) {
229235
o.IsCspmEnabled = &v
230236
}
231237

238+
// GetIsPerProjectQuotaEnabled returns the IsPerProjectQuotaEnabled field value if set, zero value otherwise.
239+
func (o *GCPSTSServiceAccountAttributes) GetIsPerProjectQuotaEnabled() bool {
240+
if o == nil || o.IsPerProjectQuotaEnabled == nil {
241+
var ret bool
242+
return ret
243+
}
244+
return *o.IsPerProjectQuotaEnabled
245+
}
246+
247+
// GetIsPerProjectQuotaEnabledOk returns a tuple with the IsPerProjectQuotaEnabled field value if set, nil otherwise
248+
// and a boolean to check if the value has been set.
249+
func (o *GCPSTSServiceAccountAttributes) GetIsPerProjectQuotaEnabledOk() (*bool, bool) {
250+
if o == nil || o.IsPerProjectQuotaEnabled == nil {
251+
return nil, false
252+
}
253+
return o.IsPerProjectQuotaEnabled, true
254+
}
255+
256+
// HasIsPerProjectQuotaEnabled returns a boolean if a field has been set.
257+
func (o *GCPSTSServiceAccountAttributes) HasIsPerProjectQuotaEnabled() bool {
258+
return o != nil && o.IsPerProjectQuotaEnabled != nil
259+
}
260+
261+
// SetIsPerProjectQuotaEnabled gets a reference to the given bool and assigns it to the IsPerProjectQuotaEnabled field.
262+
func (o *GCPSTSServiceAccountAttributes) SetIsPerProjectQuotaEnabled(v bool) {
263+
o.IsPerProjectQuotaEnabled = &v
264+
}
265+
232266
// GetIsResourceChangeCollectionEnabled returns the IsResourceChangeCollectionEnabled field value if set, zero value otherwise.
233267
func (o *GCPSTSServiceAccountAttributes) GetIsResourceChangeCollectionEnabled() bool {
234268
if o == nil || o.IsResourceChangeCollectionEnabled == nil {
@@ -365,6 +399,9 @@ func (o GCPSTSServiceAccountAttributes) MarshalJSON() ([]byte, error) {
365399
if o.IsCspmEnabled != nil {
366400
toSerialize["is_cspm_enabled"] = o.IsCspmEnabled
367401
}
402+
if o.IsPerProjectQuotaEnabled != nil {
403+
toSerialize["is_per_project_quota_enabled"] = o.IsPerProjectQuotaEnabled
404+
}
368405
if o.IsResourceChangeCollectionEnabled != nil {
369406
toSerialize["is_resource_change_collection_enabled"] = o.IsResourceChangeCollectionEnabled
370407
}
@@ -393,6 +430,7 @@ func (o *GCPSTSServiceAccountAttributes) UnmarshalJSON(bytes []byte) (err error)
393430
CloudRunRevisionFilters []string `json:"cloud_run_revision_filters,omitempty"`
394431
HostFilters []string `json:"host_filters,omitempty"`
395432
IsCspmEnabled *bool `json:"is_cspm_enabled,omitempty"`
433+
IsPerProjectQuotaEnabled *bool `json:"is_per_project_quota_enabled,omitempty"`
396434
IsResourceChangeCollectionEnabled *bool `json:"is_resource_change_collection_enabled,omitempty"`
397435
IsSecurityCommandCenterEnabled *bool `json:"is_security_command_center_enabled,omitempty"`
398436
MetricNamespaceConfigs []GCPMetricNamespaceConfig `json:"metric_namespace_configs,omitempty"`
@@ -403,7 +441,7 @@ func (o *GCPSTSServiceAccountAttributes) UnmarshalJSON(bytes []byte) (err error)
403441
}
404442
additionalProperties := make(map[string]interface{})
405443
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
406-
datadog.DeleteKeys(additionalProperties, &[]string{"account_tags", "automute", "client_email", "cloud_run_revision_filters", "host_filters", "is_cspm_enabled", "is_resource_change_collection_enabled", "is_security_command_center_enabled", "metric_namespace_configs", "resource_collection_enabled"})
444+
datadog.DeleteKeys(additionalProperties, &[]string{"account_tags", "automute", "client_email", "cloud_run_revision_filters", "host_filters", "is_cspm_enabled", "is_per_project_quota_enabled", "is_resource_change_collection_enabled", "is_security_command_center_enabled", "metric_namespace_configs", "resource_collection_enabled"})
407445
} else {
408446
return err
409447
}
@@ -413,6 +451,7 @@ func (o *GCPSTSServiceAccountAttributes) UnmarshalJSON(bytes []byte) (err error)
413451
o.CloudRunRevisionFilters = all.CloudRunRevisionFilters
414452
o.HostFilters = all.HostFilters
415453
o.IsCspmEnabled = all.IsCspmEnabled
454+
o.IsPerProjectQuotaEnabled = all.IsPerProjectQuotaEnabled
416455
o.IsResourceChangeCollectionEnabled = all.IsResourceChangeCollectionEnabled
417456
o.IsSecurityCommandCenterEnabled = all.IsSecurityCommandCenterEnabled
418457
o.MetricNamespaceConfigs = all.MetricNamespaceConfigs

tests/scenarios/features/v2/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": [], "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": "datadog-service-account@test-project.iam.gserviceaccount.com", "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": "datadog-service-account@test-project.iam.gserviceaccount.com", "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": "datadog-service-account@test-project.iam.gserviceaccount.com", "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": "datadog-service-account@test-project.iam.gserviceaccount.com", "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": "datadog-service-account@test-project.iam.gserviceaccount.com", "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": "datadog-service-account@test-project.iam.gserviceaccount.com", "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": "datadog-service-account@test-project.iam.gserviceaccount.com", "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

0 commit comments

Comments
 (0)