Skip to content

Commit 61f08d4

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 29e4e3d of spec repo
1 parent a1f1bff commit 61f08d4

File tree

4 files changed

+94
-5
lines changed

4 files changed

+94
-5
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22330,6 +22330,13 @@ components:
2233022330
product for this service account. Note: This requires resource_collection_enabled
2233122331
to be set to true.'
2233222332
type: boolean
22333+
is_global_location_enabled:
22334+
default: true
22335+
description: "When enabled, metrics, events, and resources where location
22336+
is explicitly stated as \u201Cglobal\u201D or where location information
22337+
could not be deduced from GCP labels will be collected."
22338+
example: true
22339+
type: boolean
2233322340
is_per_project_quota_enabled:
2233422341
default: false
2233522342
description: When enabled, Datadog applies the `X-Goog-User-Project` header,
@@ -22371,6 +22378,16 @@ components:
2237122378
items:
2237222379
$ref: '#/components/schemas/GCPMonitoredResourceConfig'
2237322380
type: array
22381+
region_filter_configs:
22382+
description: Filters to limit metric collection by GCP region. By default
22383+
Datadog collects from all regions.
22384+
example:
22385+
- us-east1
22386+
- europe-north1
22387+
items:
22388+
description: Region Filter Configs
22389+
type: string
22390+
type: array
2237422391
resource_collection_enabled:
2237522392
description: When enabled, Datadog scans for all resources in your GCP environment.
2237622393
type: boolean

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

Lines changed: 72 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, events, and resources where location is explicitly stated as “global” or
263+
* where location information could not be deduced from GCP labels will be 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,35 @@ 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 region. By default Datadog collects from all regions.
432+
*
433+
* @return regionFilterConfigs
434+
*/
435+
@jakarta.annotation.Nullable
436+
@JsonProperty(JSON_PROPERTY_REGION_FILTER_CONFIGS)
437+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
438+
public List<String> getRegionFilterConfigs() {
439+
return regionFilterConfigs;
440+
}
441+
442+
public void setRegionFilterConfigs(List<String> regionFilterConfigs) {
443+
this.regionFilterConfigs = regionFilterConfigs;
444+
}
445+
386446
public GCPSTSServiceAccountAttributes resourceCollectionEnabled(
387447
Boolean resourceCollectionEnabled) {
388448
this.resourceCollectionEnabled = resourceCollectionEnabled;
@@ -469,6 +529,8 @@ public boolean equals(Object o) {
469529
this.cloudRunRevisionFilters, gcpstsServiceAccountAttributes.cloudRunRevisionFilters)
470530
&& Objects.equals(this.hostFilters, gcpstsServiceAccountAttributes.hostFilters)
471531
&& Objects.equals(this.isCspmEnabled, gcpstsServiceAccountAttributes.isCspmEnabled)
532+
&& Objects.equals(
533+
this.isGlobalLocationEnabled, gcpstsServiceAccountAttributes.isGlobalLocationEnabled)
472534
&& Objects.equals(
473535
this.isPerProjectQuotaEnabled, gcpstsServiceAccountAttributes.isPerProjectQuotaEnabled)
474536
&& Objects.equals(
@@ -481,6 +543,8 @@ public boolean equals(Object o) {
481543
this.metricNamespaceConfigs, gcpstsServiceAccountAttributes.metricNamespaceConfigs)
482544
&& Objects.equals(
483545
this.monitoredResourceConfigs, gcpstsServiceAccountAttributes.monitoredResourceConfigs)
546+
&& Objects.equals(
547+
this.regionFilterConfigs, gcpstsServiceAccountAttributes.regionFilterConfigs)
484548
&& Objects.equals(
485549
this.resourceCollectionEnabled,
486550
gcpstsServiceAccountAttributes.resourceCollectionEnabled)
@@ -497,11 +561,13 @@ public int hashCode() {
497561
cloudRunRevisionFilters,
498562
hostFilters,
499563
isCspmEnabled,
564+
isGlobalLocationEnabled,
500565
isPerProjectQuotaEnabled,
501566
isResourceChangeCollectionEnabled,
502567
isSecurityCommandCenterEnabled,
503568
metricNamespaceConfigs,
504569
monitoredResourceConfigs,
570+
regionFilterConfigs,
505571
resourceCollectionEnabled,
506572
additionalProperties);
507573
}
@@ -518,6 +584,9 @@ public String toString() {
518584
.append("\n");
519585
sb.append(" hostFilters: ").append(toIndentedString(hostFilters)).append("\n");
520586
sb.append(" isCspmEnabled: ").append(toIndentedString(isCspmEnabled)).append("\n");
587+
sb.append(" isGlobalLocationEnabled: ")
588+
.append(toIndentedString(isGlobalLocationEnabled))
589+
.append("\n");
521590
sb.append(" isPerProjectQuotaEnabled: ")
522591
.append(toIndentedString(isPerProjectQuotaEnabled))
523592
.append("\n");
@@ -533,6 +602,9 @@ public String toString() {
533602
sb.append(" monitoredResourceConfigs: ")
534603
.append(toIndentedString(monitoredResourceConfigs))
535604
.append("\n");
605+
sb.append(" regionFilterConfigs: ")
606+
.append(toIndentedString(regionFilterConfigs))
607+
.append("\n");
536608
sb.append(" resourceCollectionEnabled: ")
537609
.append(toIndentedString(resourceCollectionEnabled))
538610
.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": "[email protected]", "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": "[email protected]", "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"}}
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": ["$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": "[email protected]", "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"}}
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": ["$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": "[email protected]", "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"}}
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": ["$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": "[email protected]", "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"}}
163163
When the request is sent
164164
Then the response status is 404 Not Found
165165

src/test/resources/com/datadog/api/client/v2/api/given.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@
350350
"parameters": [
351351
{
352352
"name": "body",
353-
"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}"
353+
"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}"
354354
}
355355
],
356356
"step": "there is a valid \"deployment_gate\" in the system",

0 commit comments

Comments
 (0)