Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62417,6 +62417,39 @@ paths:
get:
description: Returns a list of org connections.
operationId: ListOrgConnections
parameters:
- description: The Org ID of the sink org.
example: 0879ce27-29a1-481f-a12e-bc2a48ec9ae1
in: query
name: sink_org_id
required: false
schema:
type: string
- description: The Org ID of the source org.
example: 0879ce27-29a1-481f-a12e-bc2a48ec9ae1
in: query
name: source_org_id
required: false
schema:
type: string
- description: The limit of number of entries you want to return. Default is
1000.
example: 1000
in: query
name: limit
required: false
schema:
format: int64
type: integer
- description: The pagination offset which you want to query from. Default is
0.
example: 0
in: query
name: offset
required: false
schema:
format: int64
type: integer
responses:
'200':
content:
Expand Down
52 changes: 50 additions & 2 deletions src/datadog_api_client/v2/api/org_connections_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
# Copyright 2019-Present Datadog, Inc.
from __future__ import annotations

from typing import Any, Dict
from typing import Any, Dict, Union

from datadog_api_client.api_client import ApiClient, Endpoint as _Endpoint
from datadog_api_client.configuration import Configuration
from datadog_api_client.model_utils import (
UnsetType,
unset,
UUID,
)
from datadog_api_client.v2.model.org_connection_list_response import OrgConnectionListResponse
Expand Down Expand Up @@ -78,7 +80,28 @@ def __init__(self, api_client=None):
"http_method": "GET",
"version": "v2",
},
params_map={},
params_map={
"sink_org_id": {
"openapi_types": (str,),
"attribute": "sink_org_id",
"location": "query",
},
"source_org_id": {
"openapi_types": (str,),
"attribute": "source_org_id",
"location": "query",
},
"limit": {
"openapi_types": (int,),
"attribute": "limit",
"location": "query",
},
"offset": {
"openapi_types": (int,),
"attribute": "offset",
"location": "query",
},
},
headers_map={
"accept": ["application/json"],
},
Expand Down Expand Up @@ -146,14 +169,39 @@ def delete_org_connections(

def list_org_connections(
self,
*,
sink_org_id: Union[str, UnsetType] = unset,
source_org_id: Union[str, UnsetType] = unset,
limit: Union[int, UnsetType] = unset,
offset: Union[int, UnsetType] = unset,
) -> OrgConnectionListResponse:
"""List Org Connections.

Returns a list of org connections.

:param sink_org_id: The Org ID of the sink org.
:type sink_org_id: str, optional
:param source_org_id: The Org ID of the source org.
:type source_org_id: str, optional
:param limit: The limit of number of entries you want to return. Default is 1000.
:type limit: int, optional
:param offset: The pagination offset which you want to query from. Default is 0.
:type offset: int, optional
:rtype: OrgConnectionListResponse
"""
kwargs: Dict[str, Any] = {}
if sink_org_id is not unset:
kwargs["sink_org_id"] = sink_org_id

if source_org_id is not unset:
kwargs["source_org_id"] = source_org_id

if limit is not unset:
kwargs["limit"] = limit

if offset is not unset:
kwargs["offset"] = offset

return self._list_org_connections_endpoint.call_with_http_info(**kwargs)

def update_org_connections(
Expand Down
Loading