Skip to content

Commit 73f3297

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add Query Parameters to ListOrgConnections Endpoint (#2830)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 3e57772 commit 73f3297

File tree

2 files changed

+83
-2
lines changed

2 files changed

+83
-2
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62417,6 +62417,39 @@ paths:
6241762417
get:
6241862418
description: Returns a list of org connections.
6241962419
operationId: ListOrgConnections
62420+
parameters:
62421+
- description: The Org ID of the sink org.
62422+
example: 0879ce27-29a1-481f-a12e-bc2a48ec9ae1
62423+
in: query
62424+
name: sink_org_id
62425+
required: false
62426+
schema:
62427+
type: string
62428+
- description: The Org ID of the source org.
62429+
example: 0879ce27-29a1-481f-a12e-bc2a48ec9ae1
62430+
in: query
62431+
name: source_org_id
62432+
required: false
62433+
schema:
62434+
type: string
62435+
- description: The limit of number of entries you want to return. Default is
62436+
1000.
62437+
example: 1000
62438+
in: query
62439+
name: limit
62440+
required: false
62441+
schema:
62442+
format: int64
62443+
type: integer
62444+
- description: The pagination offset which you want to query from. Default is
62445+
0.
62446+
example: 0
62447+
in: query
62448+
name: offset
62449+
required: false
62450+
schema:
62451+
format: int64
62452+
type: integer
6242062453
responses:
6242162454
'200':
6242262455
content:

src/datadog_api_client/v2/api/org_connections_api.py

Lines changed: 50 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@
33
# Copyright 2019-Present Datadog, Inc.
44
from __future__ import annotations
55

6-
from typing import Any, Dict
6+
from typing import Any, Dict, Union
77

88
from datadog_api_client.api_client import ApiClient, Endpoint as _Endpoint
99
from datadog_api_client.configuration import Configuration
1010
from datadog_api_client.model_utils import (
11+
UnsetType,
12+
unset,
1113
UUID,
1214
)
1315
from datadog_api_client.v2.model.org_connection_list_response import OrgConnectionListResponse
@@ -78,7 +80,28 @@ def __init__(self, api_client=None):
7880
"http_method": "GET",
7981
"version": "v2",
8082
},
81-
params_map={},
83+
params_map={
84+
"sink_org_id": {
85+
"openapi_types": (str,),
86+
"attribute": "sink_org_id",
87+
"location": "query",
88+
},
89+
"source_org_id": {
90+
"openapi_types": (str,),
91+
"attribute": "source_org_id",
92+
"location": "query",
93+
},
94+
"limit": {
95+
"openapi_types": (int,),
96+
"attribute": "limit",
97+
"location": "query",
98+
},
99+
"offset": {
100+
"openapi_types": (int,),
101+
"attribute": "offset",
102+
"location": "query",
103+
},
104+
},
82105
headers_map={
83106
"accept": ["application/json"],
84107
},
@@ -146,14 +169,39 @@ def delete_org_connections(
146169

147170
def list_org_connections(
148171
self,
172+
*,
173+
sink_org_id: Union[str, UnsetType] = unset,
174+
source_org_id: Union[str, UnsetType] = unset,
175+
limit: Union[int, UnsetType] = unset,
176+
offset: Union[int, UnsetType] = unset,
149177
) -> OrgConnectionListResponse:
150178
"""List Org Connections.
151179
152180
Returns a list of org connections.
153181
182+
:param sink_org_id: The Org ID of the sink org.
183+
:type sink_org_id: str, optional
184+
:param source_org_id: The Org ID of the source org.
185+
:type source_org_id: str, optional
186+
:param limit: The limit of number of entries you want to return. Default is 1000.
187+
:type limit: int, optional
188+
:param offset: The pagination offset which you want to query from. Default is 0.
189+
:type offset: int, optional
154190
:rtype: OrgConnectionListResponse
155191
"""
156192
kwargs: Dict[str, Any] = {}
193+
if sink_org_id is not unset:
194+
kwargs["sink_org_id"] = sink_org_id
195+
196+
if source_org_id is not unset:
197+
kwargs["source_org_id"] = source_org_id
198+
199+
if limit is not unset:
200+
kwargs["limit"] = limit
201+
202+
if offset is not unset:
203+
kwargs["offset"] = offset
204+
157205
return self._list_org_connections_endpoint.call_with_http_info(**kwargs)
158206

159207
def update_org_connections(

0 commit comments

Comments
 (0)