Skip to content

Commit f09cc25

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

15 files changed

Lines changed: 217 additions & 5 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:

src/datadog_api_client/v2/model/apm_dependency_stats_query.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Copyright 2019-Present Datadog, Inc.
44
from __future__ import annotations
55

6-
from typing import Union, TYPE_CHECKING
6+
from typing import List, Union, TYPE_CHECKING
77

88
from datadog_api_client.model_utils import (
99
ModelNormal,
@@ -19,12 +19,19 @@
1919

2020

2121
class ApmDependencyStatsQuery(ModelNormal):
22+
validations = {
23+
"cross_org_uuids": {
24+
"max_items": 1,
25+
},
26+
}
27+
2228
@cached_property
2329
def openapi_types(_):
2430
from datadog_api_client.v2.model.apm_dependency_stats_data_source import ApmDependencyStatsDataSource
2531
from datadog_api_client.v2.model.apm_dependency_stat_name import ApmDependencyStatName
2632

2733
return {
34+
"cross_org_uuids": ([str],),
2835
"data_source": (ApmDependencyStatsDataSource,),
2936
"env": (str,),
3037
"is_upstream": (bool,),
@@ -38,6 +45,7 @@ def openapi_types(_):
3845
}
3946

4047
attribute_map = {
48+
"cross_org_uuids": "cross_org_uuids",
4149
"data_source": "data_source",
4250
"env": "env",
4351
"is_upstream": "is_upstream",
@@ -59,6 +67,7 @@ def __init__(
5967
resource_name: str,
6068
service: str,
6169
stat: ApmDependencyStatName,
70+
cross_org_uuids: Union[List[str], UnsetType] = unset,
6271
is_upstream: Union[bool, UnsetType] = unset,
6372
primary_tag_name: Union[str, UnsetType] = unset,
6473
primary_tag_value: Union[str, UnsetType] = unset,
@@ -67,6 +76,9 @@ def __init__(
6776
"""
6877
A query for APM dependency statistics between services, such as call latency and error rates.
6978
79+
:param cross_org_uuids: Organization UUIDs to query when using `cross-organization visibility </account_management/org_settings/cross_org_visibility/>`_. Limited to one organization UUID.
80+
:type cross_org_uuids: [str], optional
81+
7082
:param data_source: A data source for APM dependency statistics queries.
7183
:type data_source: ApmDependencyStatsDataSource
7284
@@ -97,6 +109,8 @@ def __init__(
97109
:param stat: The APM dependency statistic to query.
98110
:type stat: ApmDependencyStatName
99111
"""
112+
if cross_org_uuids is not unset:
113+
kwargs["cross_org_uuids"] = cross_org_uuids
100114
if is_upstream is not unset:
101115
kwargs["is_upstream"] = is_upstream
102116
if primary_tag_name is not unset:

src/datadog_api_client/v2/model/apm_metrics_query.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,20 @@
2020

2121

2222
class ApmMetricsQuery(ModelNormal):
23+
validations = {
24+
"cross_org_uuids": {
25+
"max_items": 1,
26+
},
27+
}
28+
2329
@cached_property
2430
def openapi_types(_):
2531
from datadog_api_client.v2.model.apm_metrics_data_source import ApmMetricsDataSource
2632
from datadog_api_client.v2.model.apm_metrics_span_kind import ApmMetricsSpanKind
2733
from datadog_api_client.v2.model.apm_metrics_stat import ApmMetricsStat
2834

2935
return {
36+
"cross_org_uuids": ([str],),
3037
"data_source": (ApmMetricsDataSource,),
3138
"group_by": ([str],),
3239
"name": (str,),
@@ -42,6 +49,7 @@ def openapi_types(_):
4249
}
4350

4451
attribute_map = {
52+
"cross_org_uuids": "cross_org_uuids",
4553
"data_source": "data_source",
4654
"group_by": "group_by",
4755
"name": "name",
@@ -61,6 +69,7 @@ def __init__(
6169
data_source: ApmMetricsDataSource,
6270
name: str,
6371
stat: ApmMetricsStat,
72+
cross_org_uuids: Union[List[str], UnsetType] = unset,
6473
group_by: Union[List[str], UnsetType] = unset,
6574
operation_mode: Union[str, UnsetType] = unset,
6675
operation_name: Union[str, UnsetType] = unset,
@@ -75,6 +84,9 @@ def __init__(
7584
"""
7685
A query for APM trace metrics such as hits, errors, and latency percentiles, aggregated across services.
7786
87+
:param cross_org_uuids: Organization UUIDs to query when using `cross-organization visibility </account_management/org_settings/cross_org_visibility/>`_. Limited to one organization UUID.
88+
:type cross_org_uuids: [str], optional
89+
7890
:param data_source: A data source for APM metrics queries.
7991
:type data_source: ApmMetricsDataSource
8092
@@ -111,6 +123,8 @@ def __init__(
111123
:param stat: The APM metric statistic to query.
112124
:type stat: ApmMetricsStat
113125
"""
126+
if cross_org_uuids is not unset:
127+
kwargs["cross_org_uuids"] = cross_org_uuids
114128
if group_by is not unset:
115129
kwargs["group_by"] = group_by
116130
if operation_mode is not unset:

src/datadog_api_client/v2/model/apm_resource_stats_query.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,19 @@
1919

2020

2121
class ApmResourceStatsQuery(ModelNormal):
22+
validations = {
23+
"cross_org_uuids": {
24+
"max_items": 1,
25+
},
26+
}
27+
2228
@cached_property
2329
def openapi_types(_):
2430
from datadog_api_client.v2.model.apm_resource_stats_data_source import ApmResourceStatsDataSource
2531
from datadog_api_client.v2.model.apm_resource_stat_name import ApmResourceStatName
2632

2733
return {
34+
"cross_org_uuids": ([str],),
2835
"data_source": (ApmResourceStatsDataSource,),
2936
"env": (str,),
3037
"group_by": ([str],),
@@ -38,6 +45,7 @@ def openapi_types(_):
3845
}
3946

4047
attribute_map = {
48+
"cross_org_uuids": "cross_org_uuids",
4149
"data_source": "data_source",
4250
"env": "env",
4351
"group_by": "group_by",
@@ -57,6 +65,7 @@ def __init__(
5765
name: str,
5866
service: str,
5967
stat: ApmResourceStatName,
68+
cross_org_uuids: Union[List[str], UnsetType] = unset,
6069
group_by: Union[List[str], UnsetType] = unset,
6170
operation_name: Union[str, UnsetType] = unset,
6271
primary_tag_name: Union[str, UnsetType] = unset,
@@ -67,6 +76,9 @@ def __init__(
6776
"""
6877
A query for APM resource statistics such as latency, error rate, and hit count, grouped by resource name.
6978
79+
:param cross_org_uuids: Organization UUIDs to query when using `cross-organization visibility </account_management/org_settings/cross_org_visibility/>`_. Limited to one organization UUID.
80+
:type cross_org_uuids: [str], optional
81+
7082
:param data_source: A data source for APM resource statistics queries.
7183
:type data_source: ApmResourceStatsDataSource
7284
@@ -97,6 +109,8 @@ def __init__(
97109
:param stat: The APM resource statistic to query.
98110
:type stat: ApmResourceStatName
99111
"""
112+
if cross_org_uuids is not unset:
113+
kwargs["cross_org_uuids"] = cross_org_uuids
100114
if group_by is not unset:
101115
kwargs["group_by"] = group_by
102116
if operation_name is not unset:

src/datadog_api_client/v2/model/container_scalar_query.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@
2020

2121

2222
class ContainerScalarQuery(ModelNormal):
23+
validations = {
24+
"cross_org_uuids": {
25+
"max_items": 1,
26+
},
27+
}
28+
2329
@cached_property
2430
def openapi_types(_):
2531
from datadog_api_client.v2.model.metrics_aggregator import MetricsAggregator
@@ -28,6 +34,7 @@ def openapi_types(_):
2834

2935
return {
3036
"aggregator": (MetricsAggregator,),
37+
"cross_org_uuids": ([str],),
3138
"data_source": (ContainerDataSource,),
3239
"is_normalized_cpu": (bool,),
3340
"limit": (int,),
@@ -40,6 +47,7 @@ def openapi_types(_):
4047

4148
attribute_map = {
4249
"aggregator": "aggregator",
50+
"cross_org_uuids": "cross_org_uuids",
4351
"data_source": "data_source",
4452
"is_normalized_cpu": "is_normalized_cpu",
4553
"limit": "limit",
@@ -56,6 +64,7 @@ def __init__(
5664
metric: str,
5765
name: str,
5866
aggregator: Union[MetricsAggregator, UnsetType] = unset,
67+
cross_org_uuids: Union[List[str], UnsetType] = unset,
5968
is_normalized_cpu: Union[bool, UnsetType] = unset,
6069
limit: Union[int, UnsetType] = unset,
6170
sort: Union[QuerySortOrder, UnsetType] = unset,
@@ -69,6 +78,9 @@ def __init__(
6978
:param aggregator: The type of aggregation that can be performed on metrics-based queries.
7079
:type aggregator: MetricsAggregator, optional
7180
81+
:param cross_org_uuids: Organization UUIDs to query when using `cross-organization visibility </account_management/org_settings/cross_org_visibility/>`_. Limited to one organization UUID.
82+
:type cross_org_uuids: [str], optional
83+
7284
:param data_source: A data source for container-level infrastructure metrics.
7385
:type data_source: ContainerDataSource
7486
@@ -95,6 +107,8 @@ def __init__(
95107
"""
96108
if aggregator is not unset:
97109
kwargs["aggregator"] = aggregator
110+
if cross_org_uuids is not unset:
111+
kwargs["cross_org_uuids"] = cross_org_uuids
98112
if is_normalized_cpu is not unset:
99113
kwargs["is_normalized_cpu"] = is_normalized_cpu
100114
if limit is not unset:

0 commit comments

Comments
 (0)