Skip to content

Commit a9eef99

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add cross_org_uuids to v2 query endpoints (#3296)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 71f4b1f commit a9eef99

13 files changed

Lines changed: 320 additions & 12 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4231,6 +4231,8 @@ components:
42314231
description: >-
42324232
A query for APM dependency statistics between services, such as call latency and error rates.
42334233
properties:
4234+
cross_org_uuids:
4235+
$ref: "#/components/schemas/CrossOrgUuids"
42344236
data_source:
42354237
$ref: "#/components/schemas/ApmDependencyStatsDataSource"
42364238
env:
@@ -4289,6 +4291,8 @@ components:
42894291
description: >-
42904292
A query for APM trace metrics such as hits, errors, and latency percentiles, aggregated across services.
42914293
properties:
4294+
cross_org_uuids:
4295+
$ref: "#/components/schemas/CrossOrgUuids"
42924296
data_source:
42934297
$ref: "#/components/schemas/ApmMetricsDataSource"
42944298
group_by:
@@ -4439,6 +4443,8 @@ components:
44394443
description: >-
44404444
A query for APM resource statistics such as latency, error rate, and hit count, grouped by resource name.
44414445
properties:
4446+
cross_org_uuids:
4447+
$ref: "#/components/schemas/CrossOrgUuids"
44424448
data_source:
44434449
$ref: "#/components/schemas/ApmResourceStatsDataSource"
44444450
env:
@@ -15258,6 +15264,8 @@ components:
1525815264
properties:
1525915265
aggregator:
1526015266
$ref: "#/components/schemas/MetricsAggregator"
15267+
cross_org_uuids:
15268+
$ref: "#/components/schemas/CrossOrgUuids"
1526115269
data_source:
1526215270
$ref: "#/components/schemas/ContainerDataSource"
1526315271
is_normalized_cpu:
@@ -15295,6 +15303,8 @@ components:
1529515303
ContainerTimeseriesQuery:
1529615304
description: A query for container-level metrics such as CPU and memory usage.
1529715305
properties:
15306+
cross_org_uuids:
15307+
$ref: "#/components/schemas/CrossOrgUuids"
1529815308
data_source:
1529915309
$ref: "#/components/schemas/ContainerDataSource"
1530015310
is_normalized_cpu:
@@ -18122,6 +18132,14 @@ components:
1812218132
nullable: true
1812318133
type: string
1812418134
type: object
18135+
CrossOrgUuids:
18136+
description: >-
18137+
Organization UUIDs to query when using [cross-organization visibility](/account_management/org_settings/cross_org_visibility/). Limited to one organization UUID.
18138+
items:
18139+
description: An organization UUID.
18140+
type: string
18141+
maxItems: 1
18142+
type: array
1812518143
CsmAgentData:
1812618144
description: Single Agent Data.
1812718145
properties:
@@ -26178,6 +26196,8 @@ components:
2617826196
properties:
2617926197
compute:
2618026198
$ref: "#/components/schemas/EventsCompute"
26199+
cross_org_uuids:
26200+
$ref: "#/components/schemas/CrossOrgUuids"
2618126201
data_source:
2618226202
$ref: "#/components/schemas/EventsDataSource"
2618326203
group_by:
@@ -26231,6 +26251,8 @@ components:
2623126251
properties:
2623226252
compute:
2623326253
$ref: "#/components/schemas/EventsCompute"
26254+
cross_org_uuids:
26255+
$ref: "#/components/schemas/CrossOrgUuids"
2623426256
data_source:
2623526257
$ref: "#/components/schemas/EventsDataSource"
2623626258
group_by:
@@ -44141,6 +44163,8 @@ components:
4414144163
properties:
4414244164
aggregator:
4414344165
$ref: "#/components/schemas/MetricsAggregator"
44166+
cross_org_uuids:
44167+
$ref: "#/components/schemas/CrossOrgUuids"
4414444168
data_source:
4414544169
$ref: "#/components/schemas/MetricsDataSource"
4414644170
name:
@@ -44158,6 +44182,8 @@ components:
4415844182
MetricsTimeseriesQuery:
4415944183
description: A query against Datadog custom metrics or Cloud Cost data sources.
4416044184
properties:
44185+
cross_org_uuids:
44186+
$ref: "#/components/schemas/CrossOrgUuids"
4416144187
data_source:
4416244188
$ref: "#/components/schemas/MetricsDataSource"
4416344189
name:
@@ -55272,6 +55298,8 @@ components:
5527255298
properties:
5527355299
aggregator:
5527455300
$ref: "#/components/schemas/MetricsAggregator"
55301+
cross_org_uuids:
55302+
$ref: "#/components/schemas/CrossOrgUuids"
5527555303
data_source:
5527655304
$ref: "#/components/schemas/ProcessDataSource"
5527755305
is_normalized_cpu:
@@ -55395,6 +55423,8 @@ components:
5539555423
ProcessTimeseriesQuery:
5539655424
description: A query for host-level process metrics such as CPU and memory usage.
5539755425
properties:
55426+
cross_org_uuids:
55427+
$ref: "#/components/schemas/CrossOrgUuids"
5539855428
data_source:
5539955429
$ref: "#/components/schemas/ProcessDataSource"
5540055430
is_normalized_cpu:
@@ -69802,6 +69832,8 @@ components:
6980269832
description: Additional filters applied to the SLO query.
6980369833
example: "host:host_a,env:prod"
6980469834
type: string
69835+
cross_org_uuids:
69836+
$ref: "#/components/schemas/CrossOrgUuids"
6980569837
data_source:
6980669838
$ref: "#/components/schemas/SloDataSource"
6980769839
group_mode:

lib/datadog_api_client/v2/models/apm_dependency_stats_query.rb

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ module DatadogAPIClient::V2
2121
class ApmDependencyStatsQuery
2222
include BaseGenericModel
2323

24+
# Organization UUIDs to query when using [cross-organization visibility](/account_management/org_settings/cross_org_visibility/). Limited to one organization UUID.
25+
attr_reader :cross_org_uuids
26+
2427
# A data source for APM dependency statistics queries.
2528
attr_reader :data_source
2629

@@ -57,6 +60,7 @@ class ApmDependencyStatsQuery
5760
# @!visibility private
5861
def self.attribute_map
5962
{
63+
:'cross_org_uuids' => :'cross_org_uuids',
6064
:'data_source' => :'data_source',
6165
:'env' => :'env',
6266
:'is_upstream' => :'is_upstream',
@@ -74,6 +78,7 @@ def self.attribute_map
7478
# @!visibility private
7579
def self.openapi_types
7680
{
81+
:'cross_org_uuids' => :'Array<String>',
7782
:'data_source' => :'ApmDependencyStatsDataSource',
7883
:'env' => :'String',
7984
:'is_upstream' => :'Boolean',
@@ -105,6 +110,12 @@ def initialize(attributes = {})
105110
end
106111
}
107112

113+
if attributes.key?(:'cross_org_uuids')
114+
if (value = attributes[:'cross_org_uuids']).is_a?(Array)
115+
self.cross_org_uuids = value
116+
end
117+
end
118+
108119
if attributes.key?(:'data_source')
109120
self.data_source = attributes[:'data_source']
110121
end
@@ -150,6 +161,7 @@ def initialize(attributes = {})
150161
# @return true if the model is valid
151162
# @!visibility private
152163
def valid?
164+
return false if !@cross_org_uuids.nil? && @cross_org_uuids.length > 1
153165
return false if @data_source.nil?
154166
return false if @env.nil?
155167
return false if @name.nil?
@@ -160,6 +172,16 @@ def valid?
160172
true
161173
end
162174

175+
# Custom attribute writer method with validation
176+
# @param cross_org_uuids [Object] Object to be assigned
177+
# @!visibility private
178+
def cross_org_uuids=(cross_org_uuids)
179+
if !cross_org_uuids.nil? && cross_org_uuids.length > 1
180+
fail ArgumentError, 'invalid value for "cross_org_uuids", number of items must be less than or equal to 1.'
181+
end
182+
@cross_org_uuids = cross_org_uuids
183+
end
184+
163185
# Custom attribute writer method with validation
164186
# @param data_source [Object] Object to be assigned
165187
# @!visibility private
@@ -256,6 +278,7 @@ def to_hash
256278
def ==(o)
257279
return true if self.equal?(o)
258280
self.class == o.class &&
281+
cross_org_uuids == o.cross_org_uuids &&
259282
data_source == o.data_source &&
260283
env == o.env &&
261284
is_upstream == o.is_upstream &&
@@ -273,7 +296,7 @@ def ==(o)
273296
# @return [Integer] Hash code
274297
# @!visibility private
275298
def hash
276-
[data_source, env, is_upstream, name, operation_name, primary_tag_name, primary_tag_value, resource_name, service, stat, additional_properties].hash
299+
[cross_org_uuids, data_source, env, is_upstream, name, operation_name, primary_tag_name, primary_tag_value, resource_name, service, stat, additional_properties].hash
277300
end
278301
end
279302
end

lib/datadog_api_client/v2/models/apm_metrics_query.rb

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ module DatadogAPIClient::V2
2121
class ApmMetricsQuery
2222
include BaseGenericModel
2323

24+
# Organization UUIDs to query when using [cross-organization visibility](/account_management/org_settings/cross_org_visibility/). Limited to one organization UUID.
25+
attr_reader :cross_org_uuids
26+
2427
# A data source for APM metrics queries.
2528
attr_reader :data_source
2629

@@ -63,6 +66,7 @@ class ApmMetricsQuery
6366
# @!visibility private
6467
def self.attribute_map
6568
{
69+
:'cross_org_uuids' => :'cross_org_uuids',
6670
:'data_source' => :'data_source',
6771
:'group_by' => :'group_by',
6872
:'name' => :'name',
@@ -82,6 +86,7 @@ def self.attribute_map
8286
# @!visibility private
8387
def self.openapi_types
8488
{
89+
:'cross_org_uuids' => :'Array<String>',
8590
:'data_source' => :'ApmMetricsDataSource',
8691
:'group_by' => :'Array<String>',
8792
:'name' => :'String',
@@ -115,6 +120,12 @@ def initialize(attributes = {})
115120
end
116121
}
117122

123+
if attributes.key?(:'cross_org_uuids')
124+
if (value = attributes[:'cross_org_uuids']).is_a?(Array)
125+
self.cross_org_uuids = value
126+
end
127+
end
128+
118129
if attributes.key?(:'data_source')
119130
self.data_source = attributes[:'data_source']
120131
end
@@ -172,12 +183,23 @@ def initialize(attributes = {})
172183
# @return true if the model is valid
173184
# @!visibility private
174185
def valid?
186+
return false if !@cross_org_uuids.nil? && @cross_org_uuids.length > 1
175187
return false if @data_source.nil?
176188
return false if @name.nil?
177189
return false if @stat.nil?
178190
true
179191
end
180192

193+
# Custom attribute writer method with validation
194+
# @param cross_org_uuids [Object] Object to be assigned
195+
# @!visibility private
196+
def cross_org_uuids=(cross_org_uuids)
197+
if !cross_org_uuids.nil? && cross_org_uuids.length > 1
198+
fail ArgumentError, 'invalid value for "cross_org_uuids", number of items must be less than or equal to 1.'
199+
end
200+
@cross_org_uuids = cross_org_uuids
201+
end
202+
181203
# Custom attribute writer method with validation
182204
# @param data_source [Object] Object to be assigned
183205
# @!visibility private
@@ -234,6 +256,7 @@ def to_hash
234256
def ==(o)
235257
return true if self.equal?(o)
236258
self.class == o.class &&
259+
cross_org_uuids == o.cross_org_uuids &&
237260
data_source == o.data_source &&
238261
group_by == o.group_by &&
239262
name == o.name &&
@@ -253,7 +276,7 @@ def ==(o)
253276
# @return [Integer] Hash code
254277
# @!visibility private
255278
def hash
256-
[data_source, group_by, name, operation_mode, operation_name, peer_tags, query_filter, resource_hash, resource_name, service, span_kind, stat, additional_properties].hash
279+
[cross_org_uuids, data_source, group_by, name, operation_mode, operation_name, peer_tags, query_filter, resource_hash, resource_name, service, span_kind, stat, additional_properties].hash
257280
end
258281
end
259282
end

lib/datadog_api_client/v2/models/apm_resource_stats_query.rb

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ module DatadogAPIClient::V2
2121
class ApmResourceStatsQuery
2222
include BaseGenericModel
2323

24+
# Organization UUIDs to query when using [cross-organization visibility](/account_management/org_settings/cross_org_visibility/). Limited to one organization UUID.
25+
attr_reader :cross_org_uuids
26+
2427
# A data source for APM resource statistics queries.
2528
attr_reader :data_source
2629

@@ -57,6 +60,7 @@ class ApmResourceStatsQuery
5760
# @!visibility private
5861
def self.attribute_map
5962
{
63+
:'cross_org_uuids' => :'cross_org_uuids',
6064
:'data_source' => :'data_source',
6165
:'env' => :'env',
6266
:'group_by' => :'group_by',
@@ -74,6 +78,7 @@ def self.attribute_map
7478
# @!visibility private
7579
def self.openapi_types
7680
{
81+
:'cross_org_uuids' => :'Array<String>',
7782
:'data_source' => :'ApmResourceStatsDataSource',
7883
:'env' => :'String',
7984
:'group_by' => :'Array<String>',
@@ -105,6 +110,12 @@ def initialize(attributes = {})
105110
end
106111
}
107112

113+
if attributes.key?(:'cross_org_uuids')
114+
if (value = attributes[:'cross_org_uuids']).is_a?(Array)
115+
self.cross_org_uuids = value
116+
end
117+
end
118+
108119
if attributes.key?(:'data_source')
109120
self.data_source = attributes[:'data_source']
110121
end
@@ -152,6 +163,7 @@ def initialize(attributes = {})
152163
# @return true if the model is valid
153164
# @!visibility private
154165
def valid?
166+
return false if !@cross_org_uuids.nil? && @cross_org_uuids.length > 1
155167
return false if @data_source.nil?
156168
return false if @env.nil?
157169
return false if @name.nil?
@@ -160,6 +172,16 @@ def valid?
160172
true
161173
end
162174

175+
# Custom attribute writer method with validation
176+
# @param cross_org_uuids [Object] Object to be assigned
177+
# @!visibility private
178+
def cross_org_uuids=(cross_org_uuids)
179+
if !cross_org_uuids.nil? && cross_org_uuids.length > 1
180+
fail ArgumentError, 'invalid value for "cross_org_uuids", number of items must be less than or equal to 1.'
181+
end
182+
@cross_org_uuids = cross_org_uuids
183+
end
184+
163185
# Custom attribute writer method with validation
164186
# @param data_source [Object] Object to be assigned
165187
# @!visibility private
@@ -236,6 +258,7 @@ def to_hash
236258
def ==(o)
237259
return true if self.equal?(o)
238260
self.class == o.class &&
261+
cross_org_uuids == o.cross_org_uuids &&
239262
data_source == o.data_source &&
240263
env == o.env &&
241264
group_by == o.group_by &&
@@ -253,7 +276,7 @@ def ==(o)
253276
# @return [Integer] Hash code
254277
# @!visibility private
255278
def hash
256-
[data_source, env, group_by, name, operation_name, primary_tag_name, primary_tag_value, resource_name, service, stat, additional_properties].hash
279+
[cross_org_uuids, data_source, env, group_by, name, operation_name, primary_tag_name, primary_tag_value, resource_name, service, stat, additional_properties].hash
257280
end
258281
end
259282
end

0 commit comments

Comments
 (0)