Skip to content

Commit 36b627d

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 2f0f9b0 of spec repo
1 parent bfc9e85 commit 36b627d

File tree

3 files changed

+94
-4
lines changed

3 files changed

+94
-4
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22824,6 +22824,13 @@ components:
2282422824
product for this service account. Note: This requires resource_collection_enabled
2282522825
to be set to true.'
2282622826
type: boolean
22827+
is_global_location_enabled:
22828+
default: true
22829+
description: "When enabled, metrics where location is explicitly stated
22830+
as \u201Cglobal\u201D or where location information cannot be deduced
22831+
from GCP labels is collected."
22832+
example: true
22833+
type: boolean
2282722834
is_per_project_quota_enabled:
2282822835
default: false
2282922836
description: When enabled, Datadog applies the `X-Goog-User-Project` header,
@@ -22865,6 +22872,16 @@ components:
2286522872
items:
2286622873
$ref: '#/components/schemas/GCPMonitoredResourceConfig'
2286722874
type: array
22875+
region_filter_configs:
22876+
description: Filters to limit metric collection by GCP location, such as
22877+
region, multi-region, or zone. By default, Datadog collects from all locations.
22878+
example:
22879+
- nam4
22880+
- europe-north1
22881+
items:
22882+
description: Region Filter Configs
22883+
type: string
22884+
type: array
2286822885
resource_collection_enabled:
2286922886
description: When enabled, Datadog scans for all resources in your GCP environment.
2287022887
type: boolean

src/main/java/com/datadog/api/client/v2/model/GCPSTSServiceAccountAttributes.java

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,13 @@
2626
GCPSTSServiceAccountAttributes.JSON_PROPERTY_CLOUD_RUN_REVISION_FILTERS,
2727
GCPSTSServiceAccountAttributes.JSON_PROPERTY_HOST_FILTERS,
2828
GCPSTSServiceAccountAttributes.JSON_PROPERTY_IS_CSPM_ENABLED,
29+
GCPSTSServiceAccountAttributes.JSON_PROPERTY_IS_GLOBAL_LOCATION_ENABLED,
2930
GCPSTSServiceAccountAttributes.JSON_PROPERTY_IS_PER_PROJECT_QUOTA_ENABLED,
3031
GCPSTSServiceAccountAttributes.JSON_PROPERTY_IS_RESOURCE_CHANGE_COLLECTION_ENABLED,
3132
GCPSTSServiceAccountAttributes.JSON_PROPERTY_IS_SECURITY_COMMAND_CENTER_ENABLED,
3233
GCPSTSServiceAccountAttributes.JSON_PROPERTY_METRIC_NAMESPACE_CONFIGS,
3334
GCPSTSServiceAccountAttributes.JSON_PROPERTY_MONITORED_RESOURCE_CONFIGS,
35+
GCPSTSServiceAccountAttributes.JSON_PROPERTY_REGION_FILTER_CONFIGS,
3436
GCPSTSServiceAccountAttributes.JSON_PROPERTY_RESOURCE_COLLECTION_ENABLED
3537
})
3638
@jakarta.annotation.Generated(
@@ -56,6 +58,10 @@ public class GCPSTSServiceAccountAttributes {
5658
public static final String JSON_PROPERTY_IS_CSPM_ENABLED = "is_cspm_enabled";
5759
private Boolean isCspmEnabled;
5860

61+
public static final String JSON_PROPERTY_IS_GLOBAL_LOCATION_ENABLED =
62+
"is_global_location_enabled";
63+
private Boolean isGlobalLocationEnabled = true;
64+
5965
public static final String JSON_PROPERTY_IS_PER_PROJECT_QUOTA_ENABLED =
6066
"is_per_project_quota_enabled";
6167
private Boolean isPerProjectQuotaEnabled = false;
@@ -75,6 +81,9 @@ public class GCPSTSServiceAccountAttributes {
7581
"monitored_resource_configs";
7682
private List<GCPMonitoredResourceConfig> monitoredResourceConfigs = null;
7783

84+
public static final String JSON_PROPERTY_REGION_FILTER_CONFIGS = "region_filter_configs";
85+
private List<String> regionFilterConfigs = null;
86+
7887
public static final String JSON_PROPERTY_RESOURCE_COLLECTION_ENABLED =
7988
"resource_collection_enabled";
8089
private Boolean resourceCollectionEnabled;
@@ -244,6 +253,28 @@ public void setIsCspmEnabled(Boolean isCspmEnabled) {
244253
this.isCspmEnabled = isCspmEnabled;
245254
}
246255

256+
public GCPSTSServiceAccountAttributes isGlobalLocationEnabled(Boolean isGlobalLocationEnabled) {
257+
this.isGlobalLocationEnabled = isGlobalLocationEnabled;
258+
return this;
259+
}
260+
261+
/**
262+
* When enabled, metrics where location is explicitly stated as “global” or where location
263+
* information cannot be deduced from GCP labels is collected.
264+
*
265+
* @return isGlobalLocationEnabled
266+
*/
267+
@jakarta.annotation.Nullable
268+
@JsonProperty(JSON_PROPERTY_IS_GLOBAL_LOCATION_ENABLED)
269+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
270+
public Boolean getIsGlobalLocationEnabled() {
271+
return isGlobalLocationEnabled;
272+
}
273+
274+
public void setIsGlobalLocationEnabled(Boolean isGlobalLocationEnabled) {
275+
this.isGlobalLocationEnabled = isGlobalLocationEnabled;
276+
}
277+
247278
public GCPSTSServiceAccountAttributes isPerProjectQuotaEnabled(Boolean isPerProjectQuotaEnabled) {
248279
this.isPerProjectQuotaEnabled = isPerProjectQuotaEnabled;
249280
return this;
@@ -383,6 +414,36 @@ public void setMonitoredResourceConfigs(
383414
this.monitoredResourceConfigs = monitoredResourceConfigs;
384415
}
385416

417+
public GCPSTSServiceAccountAttributes regionFilterConfigs(List<String> regionFilterConfigs) {
418+
this.regionFilterConfigs = regionFilterConfigs;
419+
return this;
420+
}
421+
422+
public GCPSTSServiceAccountAttributes addRegionFilterConfigsItem(String regionFilterConfigsItem) {
423+
if (this.regionFilterConfigs == null) {
424+
this.regionFilterConfigs = new ArrayList<>();
425+
}
426+
this.regionFilterConfigs.add(regionFilterConfigsItem);
427+
return this;
428+
}
429+
430+
/**
431+
* Filters to limit metric collection by GCP location, such as region, multi-region, or zone. By
432+
* default, Datadog collects from all locations.
433+
*
434+
* @return regionFilterConfigs
435+
*/
436+
@jakarta.annotation.Nullable
437+
@JsonProperty(JSON_PROPERTY_REGION_FILTER_CONFIGS)
438+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
439+
public List<String> getRegionFilterConfigs() {
440+
return regionFilterConfigs;
441+
}
442+
443+
public void setRegionFilterConfigs(List<String> regionFilterConfigs) {
444+
this.regionFilterConfigs = regionFilterConfigs;
445+
}
446+
386447
public GCPSTSServiceAccountAttributes resourceCollectionEnabled(
387448
Boolean resourceCollectionEnabled) {
388449
this.resourceCollectionEnabled = resourceCollectionEnabled;
@@ -469,6 +530,8 @@ public boolean equals(Object o) {
469530
this.cloudRunRevisionFilters, gcpstsServiceAccountAttributes.cloudRunRevisionFilters)
470531
&& Objects.equals(this.hostFilters, gcpstsServiceAccountAttributes.hostFilters)
471532
&& Objects.equals(this.isCspmEnabled, gcpstsServiceAccountAttributes.isCspmEnabled)
533+
&& Objects.equals(
534+
this.isGlobalLocationEnabled, gcpstsServiceAccountAttributes.isGlobalLocationEnabled)
472535
&& Objects.equals(
473536
this.isPerProjectQuotaEnabled, gcpstsServiceAccountAttributes.isPerProjectQuotaEnabled)
474537
&& Objects.equals(
@@ -481,6 +544,8 @@ public boolean equals(Object o) {
481544
this.metricNamespaceConfigs, gcpstsServiceAccountAttributes.metricNamespaceConfigs)
482545
&& Objects.equals(
483546
this.monitoredResourceConfigs, gcpstsServiceAccountAttributes.monitoredResourceConfigs)
547+
&& Objects.equals(
548+
this.regionFilterConfigs, gcpstsServiceAccountAttributes.regionFilterConfigs)
484549
&& Objects.equals(
485550
this.resourceCollectionEnabled,
486551
gcpstsServiceAccountAttributes.resourceCollectionEnabled)
@@ -497,11 +562,13 @@ public int hashCode() {
497562
cloudRunRevisionFilters,
498563
hostFilters,
499564
isCspmEnabled,
565+
isGlobalLocationEnabled,
500566
isPerProjectQuotaEnabled,
501567
isResourceChangeCollectionEnabled,
502568
isSecurityCommandCenterEnabled,
503569
metricNamespaceConfigs,
504570
monitoredResourceConfigs,
571+
regionFilterConfigs,
505572
resourceCollectionEnabled,
506573
additionalProperties);
507574
}
@@ -518,6 +585,9 @@ public String toString() {
518585
.append("\n");
519586
sb.append(" hostFilters: ").append(toIndentedString(hostFilters)).append("\n");
520587
sb.append(" isCspmEnabled: ").append(toIndentedString(isCspmEnabled)).append("\n");
588+
sb.append(" isGlobalLocationEnabled: ")
589+
.append(toIndentedString(isGlobalLocationEnabled))
590+
.append("\n");
521591
sb.append(" isPerProjectQuotaEnabled: ")
522592
.append(toIndentedString(isPerProjectQuotaEnabled))
523593
.append("\n");
@@ -533,6 +603,9 @@ public String toString() {
533603
sb.append(" monitoredResourceConfigs: ")
534604
.append(toIndentedString(monitoredResourceConfigs))
535605
.append("\n");
606+
sb.append(" regionFilterConfigs: ")
607+
.append(toIndentedString(regionFilterConfigs))
608+
.append("\n");
536609
sb.append(" resourceCollectionEnabled: ")
537610
.append(toIndentedString(resourceCollectionEnabled))
538611
.append("\n");

src/test/resources/com/datadog/api/client/v2/api/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)