Skip to content

Commit 43eee55

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 29e4e3d of spec repo
1 parent 73a6de3 commit 43eee55

File tree

4 files changed

+45
-6
lines changed

4 files changed

+45
-6
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

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": ["$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": ["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": "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": ["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": "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": ["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": "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": ["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

features/v2/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",

lib/datadog_api_client/v2/models/gcpsts_service_account_attributes.rb

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ class GCPSTSServiceAccountAttributes
4343
# 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.
4444
attr_accessor :is_cspm_enabled
4545

46+
# When enabled, metrics, events, and resources where location is explicitly stated as “global” or where location information could not be deduced from GCP labels will be collected.
47+
attr_accessor :is_global_location_enabled
48+
4649
# 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.
4750
attr_accessor :is_per_project_quota_enabled
4851

@@ -58,6 +61,9 @@ class GCPSTSServiceAccountAttributes
5861
# Configurations for GCP monitored resources.
5962
attr_accessor :monitored_resource_configs
6063

64+
# Filters to limit metric collection by GCP region. By default Datadog collects from all regions.
65+
attr_accessor :region_filter_configs
66+
6167
# When enabled, Datadog scans for all resources in your GCP environment.
6268
attr_accessor :resource_collection_enabled
6369

@@ -73,11 +79,13 @@ def self.attribute_map
7379
:'cloud_run_revision_filters' => :'cloud_run_revision_filters',
7480
:'host_filters' => :'host_filters',
7581
:'is_cspm_enabled' => :'is_cspm_enabled',
82+
:'is_global_location_enabled' => :'is_global_location_enabled',
7683
:'is_per_project_quota_enabled' => :'is_per_project_quota_enabled',
7784
:'is_resource_change_collection_enabled' => :'is_resource_change_collection_enabled',
7885
:'is_security_command_center_enabled' => :'is_security_command_center_enabled',
7986
:'metric_namespace_configs' => :'metric_namespace_configs',
8087
:'monitored_resource_configs' => :'monitored_resource_configs',
88+
:'region_filter_configs' => :'region_filter_configs',
8189
:'resource_collection_enabled' => :'resource_collection_enabled'
8290
}
8391
end
@@ -92,11 +100,13 @@ def self.openapi_types
92100
:'cloud_run_revision_filters' => :'Array<String>',
93101
:'host_filters' => :'Array<String>',
94102
:'is_cspm_enabled' => :'Boolean',
103+
:'is_global_location_enabled' => :'Boolean',
95104
:'is_per_project_quota_enabled' => :'Boolean',
96105
:'is_resource_change_collection_enabled' => :'Boolean',
97106
:'is_security_command_center_enabled' => :'Boolean',
98107
:'metric_namespace_configs' => :'Array<GCPMetricNamespaceConfig>',
99108
:'monitored_resource_configs' => :'Array<GCPMonitoredResourceConfig>',
109+
:'region_filter_configs' => :'Array<String>',
100110
:'resource_collection_enabled' => :'Boolean'
101111
}
102112
end
@@ -149,6 +159,10 @@ def initialize(attributes = {})
149159
self.is_cspm_enabled = attributes[:'is_cspm_enabled']
150160
end
151161

162+
if attributes.key?(:'is_global_location_enabled')
163+
self.is_global_location_enabled = attributes[:'is_global_location_enabled']
164+
end
165+
152166
if attributes.key?(:'is_per_project_quota_enabled')
153167
self.is_per_project_quota_enabled = attributes[:'is_per_project_quota_enabled']
154168
end
@@ -173,6 +187,12 @@ def initialize(attributes = {})
173187
end
174188
end
175189

190+
if attributes.key?(:'region_filter_configs')
191+
if (value = attributes[:'region_filter_configs']).is_a?(Array)
192+
self.region_filter_configs = value
193+
end
194+
end
195+
176196
if attributes.key?(:'resource_collection_enabled')
177197
self.resource_collection_enabled = attributes[:'resource_collection_enabled']
178198
end
@@ -210,11 +230,13 @@ def ==(o)
210230
cloud_run_revision_filters == o.cloud_run_revision_filters &&
211231
host_filters == o.host_filters &&
212232
is_cspm_enabled == o.is_cspm_enabled &&
233+
is_global_location_enabled == o.is_global_location_enabled &&
213234
is_per_project_quota_enabled == o.is_per_project_quota_enabled &&
214235
is_resource_change_collection_enabled == o.is_resource_change_collection_enabled &&
215236
is_security_command_center_enabled == o.is_security_command_center_enabled &&
216237
metric_namespace_configs == o.metric_namespace_configs &&
217238
monitored_resource_configs == o.monitored_resource_configs &&
239+
region_filter_configs == o.region_filter_configs &&
218240
resource_collection_enabled == o.resource_collection_enabled &&
219241
additional_properties == o.additional_properties
220242
end
@@ -223,7 +245,7 @@ def ==(o)
223245
# @return [Integer] Hash code
224246
# @!visibility private
225247
def hash
226-
[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, monitored_resource_configs, resource_collection_enabled, additional_properties].hash
248+
[account_tags, automute, client_email, cloud_run_revision_filters, host_filters, is_cspm_enabled, is_global_location_enabled, is_per_project_quota_enabled, is_resource_change_collection_enabled, is_security_command_center_enabled, metric_namespace_configs, monitored_resource_configs, region_filter_configs, resource_collection_enabled, additional_properties].hash
227249
end
228250
end
229251
end

0 commit comments

Comments
 (0)