Skip to content

Adding Datadog Connection to Connection API #2706

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
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
4 changes: 2 additions & 2 deletions .generated-info
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"spec_repo_commit": "dc49df4",
"generated": "2025-07-18 13:57:41.438"
"spec_repo_commit": "0f24b8e",
"generated": "2025-07-18 16:53:18.934"
}
99 changes: 99 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2016,11 +2016,13 @@ components:
description: The definition of `ActionConnectionIntegration` object.
oneOf:
- $ref: '#/components/schemas/AWSIntegration'
- $ref: '#/components/schemas/DatadogIntegration'
- $ref: '#/components/schemas/HTTPIntegration'
ActionConnectionIntegrationUpdate:
description: The definition of `ActionConnectionIntegrationUpdate` object.
oneOf:
- $ref: '#/components/schemas/AWSIntegrationUpdate'
- $ref: '#/components/schemas/DatadogIntegrationUpdate'
- $ref: '#/components/schemas/HTTPIntegrationUpdate'
ActionQuery:
description: An action query. This query type is used to trigger an action,
Expand Down Expand Up @@ -12378,6 +12380,103 @@ components:
required:
- databaseMonitoringTrigger
type: object
DatadogAPIKey:
description: The definition of the `DatadogAPIKey` object.
properties:
api_key:
description: The `DatadogAPIKey` `api_key`.
example: ''
type: string
app_key:
description: The `DatadogAPIKey` `app_key`.
example: ''
type: string
datacenter:
description: The `DatadogAPIKey` `datacenter`.
example: ''
type: string
subdomain:
description: Custom subdomain used for Datadog URLs generated with this
Connection. For example, if this org uses `https://acme.datadoghq.com`
to access Datadog, set this field to `acme`. If this field is omitted,
generated URLs will use the default site URL for its datacenter (see [https://docs.datadoghq.com/getting_started/site](https://docs.datadoghq.com/getting_started/site)).
type: string
type:
$ref: '#/components/schemas/DatadogAPIKeyType'
required:
- type
- datacenter
- api_key
- app_key
type: object
DatadogAPIKeyType:
description: The definition of the `DatadogAPIKey` object.
enum:
- DatadogAPIKey
example: DatadogAPIKey
type: string
x-enum-varnames:
- DATADOGAPIKEY
DatadogAPIKeyUpdate:
description: The definition of the `DatadogAPIKey` object.
properties:
api_key:
description: The `DatadogAPIKeyUpdate` `api_key`.
type: string
app_key:
description: The `DatadogAPIKeyUpdate` `app_key`.
type: string
datacenter:
description: The `DatadogAPIKeyUpdate` `datacenter`.
type: string
subdomain:
description: Custom subdomain used for Datadog URLs generated with this
Connection. For example, if this org uses `https://acme.datadoghq.com`
to access Datadog, set this field to `acme`. If this field is omitted,
generated URLs will use the default site URL for its datacenter (see [https://docs.datadoghq.com/getting_started/site](https://docs.datadoghq.com/getting_started/site)).
type: string
type:
$ref: '#/components/schemas/DatadogAPIKeyType'
required:
- type
type: object
DatadogCredentials:
description: The definition of the `DatadogCredentials` object.
oneOf:
- $ref: '#/components/schemas/DatadogAPIKey'
DatadogCredentialsUpdate:
description: The definition of the `DatadogCredentialsUpdate` object.
oneOf:
- $ref: '#/components/schemas/DatadogAPIKeyUpdate'
DatadogIntegration:
description: The definition of the `DatadogIntegration` object.
properties:
credentials:
$ref: '#/components/schemas/DatadogCredentials'
type:
$ref: '#/components/schemas/DatadogIntegrationType'
required:
- type
- credentials
type: object
DatadogIntegrationType:
description: The definition of the `DatadogIntegrationType` object.
enum:
- Datadog
example: Datadog
type: string
x-enum-varnames:
- DATADOG
DatadogIntegrationUpdate:
description: The definition of the `DatadogIntegrationUpdate` object.
properties:
credentials:
$ref: '#/components/schemas/DatadogCredentialsUpdate'
type:
$ref: '#/components/schemas/DatadogIntegrationType'
required:
- type
type: object
Dataset:
description: Dataset object.
properties:
Expand Down
56 changes: 56 additions & 0 deletions docs/datadog_api_client.v2.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4750,6 +4750,62 @@ datadog\_api\_client.v2.model.database\_monitoring\_trigger\_wrapper module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.datadog\_api\_key module
------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.datadog_api_key
:members:
:show-inheritance:

datadog\_api\_client.v2.model.datadog\_api\_key\_type module
------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.datadog_api_key_type
:members:
:show-inheritance:

datadog\_api\_client.v2.model.datadog\_api\_key\_update module
--------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.datadog_api_key_update
:members:
:show-inheritance:

datadog\_api\_client.v2.model.datadog\_credentials module
---------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.datadog_credentials
:members:
:show-inheritance:

datadog\_api\_client.v2.model.datadog\_credentials\_update module
-----------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.datadog_credentials_update
:members:
:show-inheritance:

datadog\_api\_client.v2.model.datadog\_integration module
---------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.datadog_integration
:members:
:show-inheritance:

datadog\_api\_client.v2.model.datadog\_integration\_type module
---------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.datadog_integration_type
:members:
:show-inheritance:

datadog\_api\_client.v2.model.datadog\_integration\_update module
-----------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.datadog_integration_update
:members:
:show-inheritance:

datadog\_api\_client.v2.model.dataset module
--------------------------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
if TYPE_CHECKING:
from datadog_api_client.v2.model.action_connection_integration import ActionConnectionIntegration
from datadog_api_client.v2.model.aws_integration import AWSIntegration
from datadog_api_client.v2.model.datadog_integration import DatadogIntegration
from datadog_api_client.v2.model.http_integration import HTTPIntegration


Expand All @@ -33,7 +34,10 @@ def openapi_types(_):
}

def __init__(
self_, integration: Union[ActionConnectionIntegration, AWSIntegration, HTTPIntegration], name: str, **kwargs
self_,
integration: Union[ActionConnectionIntegration, AWSIntegration, DatadogIntegration, HTTPIntegration],
name: str,
**kwargs,
):
"""
The definition of ``ActionConnectionAttributes`` object.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
if TYPE_CHECKING:
from datadog_api_client.v2.model.action_connection_integration_update import ActionConnectionIntegrationUpdate
from datadog_api_client.v2.model.aws_integration_update import AWSIntegrationUpdate
from datadog_api_client.v2.model.datadog_integration_update import DatadogIntegrationUpdate
from datadog_api_client.v2.model.http_integration_update import HTTPIntegrationUpdate


Expand All @@ -37,7 +38,11 @@ def openapi_types(_):
def __init__(
self_,
integration: Union[
ActionConnectionIntegrationUpdate, AWSIntegrationUpdate, HTTPIntegrationUpdate, UnsetType
ActionConnectionIntegrationUpdate,
AWSIntegrationUpdate,
DatadogIntegrationUpdate,
HTTPIntegrationUpdate,
UnsetType,
] = unset,
name: Union[str, UnsetType] = unset,
**kwargs,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,13 @@ def _composed_schemas(_):
# classes don't exist yet because their module has not finished
# loading
from datadog_api_client.v2.model.aws_integration import AWSIntegration
from datadog_api_client.v2.model.datadog_integration import DatadogIntegration
from datadog_api_client.v2.model.http_integration import HTTPIntegration

return {
"oneOf": [
AWSIntegration,
DatadogIntegration,
HTTPIntegration,
],
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,13 @@ def _composed_schemas(_):
# classes don't exist yet because their module has not finished
# loading
from datadog_api_client.v2.model.aws_integration_update import AWSIntegrationUpdate
from datadog_api_client.v2.model.datadog_integration_update import DatadogIntegrationUpdate
from datadog_api_client.v2.model.http_integration_update import HTTPIntegrationUpdate

return {
"oneOf": [
AWSIntegrationUpdate,
DatadogIntegrationUpdate,
HTTPIntegrationUpdate,
],
}
75 changes: 75 additions & 0 deletions src/datadog_api_client/v2/model/datadog_api_key.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2019-Present Datadog, Inc.
from __future__ import annotations

from typing import Union, TYPE_CHECKING

from datadog_api_client.model_utils import (
ModelNormal,
cached_property,
unset,
UnsetType,
)


if TYPE_CHECKING:
from datadog_api_client.v2.model.datadog_api_key_type import DatadogAPIKeyType


class DatadogAPIKey(ModelNormal):
@cached_property
def openapi_types(_):
from datadog_api_client.v2.model.datadog_api_key_type import DatadogAPIKeyType

return {
"api_key": (str,),
"app_key": (str,),
"datacenter": (str,),
"subdomain": (str,),
"type": (DatadogAPIKeyType,),
}

attribute_map = {
"api_key": "api_key",
"app_key": "app_key",
"datacenter": "datacenter",
"subdomain": "subdomain",
"type": "type",
}

def __init__(
self_,
api_key: str,
app_key: str,
datacenter: str,
type: DatadogAPIKeyType,
subdomain: Union[str, UnsetType] = unset,
**kwargs,
):
"""
The definition of the ``DatadogAPIKey`` object.

:param api_key: The ``DatadogAPIKey`` ``api_key``.
:type api_key: str

:param app_key: The ``DatadogAPIKey`` ``app_key``.
:type app_key: str

:param datacenter: The ``DatadogAPIKey`` ``datacenter``.
:type datacenter: str

:param subdomain: Custom subdomain used for Datadog URLs generated with this Connection. For example, if this org uses ``https://acme.datadoghq.com`` to access Datadog, set this field to ``acme``. If this field is omitted, generated URLs will use the default site URL for its datacenter (see `https://docs.datadoghq.com/getting_started/site <https://docs.datadoghq.com/getting_started/site>`_ ).
:type subdomain: str, optional

:param type: The definition of the ``DatadogAPIKey`` object.
:type type: DatadogAPIKeyType
"""
if subdomain is not unset:
kwargs["subdomain"] = subdomain
super().__init__(kwargs)

self_.api_key = api_key
self_.app_key = app_key
self_.datacenter = datacenter
self_.type = type
35 changes: 35 additions & 0 deletions src/datadog_api_client/v2/model/datadog_api_key_type.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2019-Present Datadog, Inc.
from __future__ import annotations


from datadog_api_client.model_utils import (
ModelSimple,
cached_property,
)

from typing import ClassVar


class DatadogAPIKeyType(ModelSimple):
"""
The definition of the `DatadogAPIKey` object.

:param value: If omitted defaults to "DatadogAPIKey". Must be one of ["DatadogAPIKey"].
:type value: str
"""

allowed_values = {
"DatadogAPIKey",
}
DATADOGAPIKEY: ClassVar["DatadogAPIKeyType"]

@cached_property
def openapi_types(_):
return {
"value": (str,),
}


DatadogAPIKeyType.DATADOGAPIKEY = DatadogAPIKeyType("DatadogAPIKey")
Loading
Loading