Skip to content

Commit 2ecf0ac

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Adding Datadog Connection to Connection API (#2541)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 893c1d8 commit 2ecf0ac

13 files changed

+923
-2
lines changed

.generated-info

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"spec_repo_commit": "dc49df4",
3-
"generated": "2025-07-18 13:57:23.914"
2+
"spec_repo_commit": "0f24b8e",
3+
"generated": "2025-07-18 16:53:06.032"
44
}

.generator/schemas/v2/openapi.yaml

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2016,11 +2016,13 @@ components:
20162016
description: The definition of `ActionConnectionIntegration` object.
20172017
oneOf:
20182018
- $ref: '#/components/schemas/AWSIntegration'
2019+
- $ref: '#/components/schemas/DatadogIntegration'
20192020
- $ref: '#/components/schemas/HTTPIntegration'
20202021
ActionConnectionIntegrationUpdate:
20212022
description: The definition of `ActionConnectionIntegrationUpdate` object.
20222023
oneOf:
20232024
- $ref: '#/components/schemas/AWSIntegrationUpdate'
2025+
- $ref: '#/components/schemas/DatadogIntegrationUpdate'
20242026
- $ref: '#/components/schemas/HTTPIntegrationUpdate'
20252027
ActionQuery:
20262028
description: An action query. This query type is used to trigger an action,
@@ -12378,6 +12380,103 @@ components:
1237812380
required:
1237912381
- databaseMonitoringTrigger
1238012382
type: object
12383+
DatadogAPIKey:
12384+
description: The definition of the `DatadogAPIKey` object.
12385+
properties:
12386+
api_key:
12387+
description: The `DatadogAPIKey` `api_key`.
12388+
example: ''
12389+
type: string
12390+
app_key:
12391+
description: The `DatadogAPIKey` `app_key`.
12392+
example: ''
12393+
type: string
12394+
datacenter:
12395+
description: The `DatadogAPIKey` `datacenter`.
12396+
example: ''
12397+
type: string
12398+
subdomain:
12399+
description: Custom subdomain used for Datadog URLs generated with this
12400+
Connection. For example, if this org uses `https://acme.datadoghq.com`
12401+
to access Datadog, set this field to `acme`. If this field is omitted,
12402+
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)).
12403+
type: string
12404+
type:
12405+
$ref: '#/components/schemas/DatadogAPIKeyType'
12406+
required:
12407+
- type
12408+
- datacenter
12409+
- api_key
12410+
- app_key
12411+
type: object
12412+
DatadogAPIKeyType:
12413+
description: The definition of the `DatadogAPIKey` object.
12414+
enum:
12415+
- DatadogAPIKey
12416+
example: DatadogAPIKey
12417+
type: string
12418+
x-enum-varnames:
12419+
- DATADOGAPIKEY
12420+
DatadogAPIKeyUpdate:
12421+
description: The definition of the `DatadogAPIKey` object.
12422+
properties:
12423+
api_key:
12424+
description: The `DatadogAPIKeyUpdate` `api_key`.
12425+
type: string
12426+
app_key:
12427+
description: The `DatadogAPIKeyUpdate` `app_key`.
12428+
type: string
12429+
datacenter:
12430+
description: The `DatadogAPIKeyUpdate` `datacenter`.
12431+
type: string
12432+
subdomain:
12433+
description: Custom subdomain used for Datadog URLs generated with this
12434+
Connection. For example, if this org uses `https://acme.datadoghq.com`
12435+
to access Datadog, set this field to `acme`. If this field is omitted,
12436+
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)).
12437+
type: string
12438+
type:
12439+
$ref: '#/components/schemas/DatadogAPIKeyType'
12440+
required:
12441+
- type
12442+
type: object
12443+
DatadogCredentials:
12444+
description: The definition of the `DatadogCredentials` object.
12445+
oneOf:
12446+
- $ref: '#/components/schemas/DatadogAPIKey'
12447+
DatadogCredentialsUpdate:
12448+
description: The definition of the `DatadogCredentialsUpdate` object.
12449+
oneOf:
12450+
- $ref: '#/components/schemas/DatadogAPIKeyUpdate'
12451+
DatadogIntegration:
12452+
description: The definition of the `DatadogIntegration` object.
12453+
properties:
12454+
credentials:
12455+
$ref: '#/components/schemas/DatadogCredentials'
12456+
type:
12457+
$ref: '#/components/schemas/DatadogIntegrationType'
12458+
required:
12459+
- type
12460+
- credentials
12461+
type: object
12462+
DatadogIntegrationType:
12463+
description: The definition of the `DatadogIntegrationType` object.
12464+
enum:
12465+
- Datadog
12466+
example: Datadog
12467+
type: string
12468+
x-enum-varnames:
12469+
- DATADOG
12470+
DatadogIntegrationUpdate:
12471+
description: The definition of the `DatadogIntegrationUpdate` object.
12472+
properties:
12473+
credentials:
12474+
$ref: '#/components/schemas/DatadogCredentialsUpdate'
12475+
type:
12476+
$ref: '#/components/schemas/DatadogIntegrationType'
12477+
required:
12478+
- type
12479+
type: object
1238112480
Dataset:
1238212481
description: Dataset object.
1238312482
properties:

lib/datadog_api_client/inflector.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1602,6 +1602,14 @@ def overrides
16021602
"v2.data_deletion_response_item" => "DataDeletionResponseItem",
16031603
"v2.data_deletion_response_item_attributes" => "DataDeletionResponseItemAttributes",
16041604
"v2.data_deletion_response_meta" => "DataDeletionResponseMeta",
1605+
"v2.datadog_api_key" => "DatadogAPIKey",
1606+
"v2.datadog_api_key_type" => "DatadogAPIKeyType",
1607+
"v2.datadog_api_key_update" => "DatadogAPIKeyUpdate",
1608+
"v2.datadog_credentials" => "DatadogCredentials",
1609+
"v2.datadog_credentials_update" => "DatadogCredentialsUpdate",
1610+
"v2.datadog_integration" => "DatadogIntegration",
1611+
"v2.datadog_integration_type" => "DatadogIntegrationType",
1612+
"v2.datadog_integration_update" => "DatadogIntegrationUpdate",
16051613
"v2.data_relationships_teams" => "DataRelationshipsTeams",
16061614
"v2.data_relationships_teams_data_items" => "DataRelationshipsTeamsDataItems",
16071615
"v2.data_relationships_teams_data_items_type" => "DataRelationshipsTeamsDataItemsType",

lib/datadog_api_client/v2/models/action_connection_integration.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ class << self
2727
def openapi_one_of
2828
[
2929
:'AWSIntegration',
30+
:'DatadogIntegration',
3031
:'HTTPIntegration'
3132
]
3233
end

lib/datadog_api_client/v2/models/action_connection_integration_update.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ class << self
2727
def openapi_one_of
2828
[
2929
:'AWSIntegrationUpdate',
30+
:'DatadogIntegrationUpdate',
3031
:'HTTPIntegrationUpdate'
3132
]
3233
end
Lines changed: 196 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,196 @@
1+
=begin
2+
#Datadog API V2 Collection
3+
4+
#Collection of all Datadog Public endpoints.
5+
6+
The version of the OpenAPI document: 1.0
7+
8+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9+
10+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11+
This product includes software developed at Datadog (https://www.datadoghq.com/).
12+
Copyright 2020-Present Datadog, Inc.
13+
14+
=end
15+
16+
require 'date'
17+
require 'time'
18+
19+
module DatadogAPIClient::V2
20+
# The definition of the `DatadogAPIKey` object.
21+
class DatadogAPIKey
22+
include BaseGenericModel
23+
24+
# The `DatadogAPIKey` `api_key`.
25+
attr_reader :api_key
26+
27+
# The `DatadogAPIKey` `app_key`.
28+
attr_reader :app_key
29+
30+
# The `DatadogAPIKey` `datacenter`.
31+
attr_reader :datacenter
32+
33+
# 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)).
34+
attr_accessor :subdomain
35+
36+
# The definition of the `DatadogAPIKey` object.
37+
attr_reader :type
38+
39+
attr_accessor :additional_properties
40+
41+
# Attribute mapping from ruby-style variable name to JSON key.
42+
# @!visibility private
43+
def self.attribute_map
44+
{
45+
:'api_key' => :'api_key',
46+
:'app_key' => :'app_key',
47+
:'datacenter' => :'datacenter',
48+
:'subdomain' => :'subdomain',
49+
:'type' => :'type'
50+
}
51+
end
52+
53+
# Attribute type mapping.
54+
# @!visibility private
55+
def self.openapi_types
56+
{
57+
:'api_key' => :'String',
58+
:'app_key' => :'String',
59+
:'datacenter' => :'String',
60+
:'subdomain' => :'String',
61+
:'type' => :'DatadogAPIKeyType'
62+
}
63+
end
64+
65+
# Initializes the object
66+
# @param attributes [Hash] Model attributes in the form of hash
67+
# @!visibility private
68+
def initialize(attributes = {})
69+
if (!attributes.is_a?(Hash))
70+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DatadogAPIKey` initialize method"
71+
end
72+
73+
self.additional_properties = {}
74+
# check to see if the attribute exists and convert string to symbol for hash key
75+
attributes = attributes.each_with_object({}) { |(k, v), h|
76+
if (!self.class.attribute_map.key?(k.to_sym))
77+
self.additional_properties[k.to_sym] = v
78+
else
79+
h[k.to_sym] = v
80+
end
81+
}
82+
83+
if attributes.key?(:'api_key')
84+
self.api_key = attributes[:'api_key']
85+
end
86+
87+
if attributes.key?(:'app_key')
88+
self.app_key = attributes[:'app_key']
89+
end
90+
91+
if attributes.key?(:'datacenter')
92+
self.datacenter = attributes[:'datacenter']
93+
end
94+
95+
if attributes.key?(:'subdomain')
96+
self.subdomain = attributes[:'subdomain']
97+
end
98+
99+
if attributes.key?(:'type')
100+
self.type = attributes[:'type']
101+
end
102+
end
103+
104+
# Check to see if the all the properties in the model are valid
105+
# @return true if the model is valid
106+
# @!visibility private
107+
def valid?
108+
return false if @api_key.nil?
109+
return false if @app_key.nil?
110+
return false if @datacenter.nil?
111+
return false if @type.nil?
112+
true
113+
end
114+
115+
# Custom attribute writer method with validation
116+
# @param api_key [Object] Object to be assigned
117+
# @!visibility private
118+
def api_key=(api_key)
119+
if api_key.nil?
120+
fail ArgumentError, 'invalid value for "api_key", api_key cannot be nil.'
121+
end
122+
@api_key = api_key
123+
end
124+
125+
# Custom attribute writer method with validation
126+
# @param app_key [Object] Object to be assigned
127+
# @!visibility private
128+
def app_key=(app_key)
129+
if app_key.nil?
130+
fail ArgumentError, 'invalid value for "app_key", app_key cannot be nil.'
131+
end
132+
@app_key = app_key
133+
end
134+
135+
# Custom attribute writer method with validation
136+
# @param datacenter [Object] Object to be assigned
137+
# @!visibility private
138+
def datacenter=(datacenter)
139+
if datacenter.nil?
140+
fail ArgumentError, 'invalid value for "datacenter", datacenter cannot be nil.'
141+
end
142+
@datacenter = datacenter
143+
end
144+
145+
# Custom attribute writer method with validation
146+
# @param type [Object] Object to be assigned
147+
# @!visibility private
148+
def type=(type)
149+
if type.nil?
150+
fail ArgumentError, 'invalid value for "type", type cannot be nil.'
151+
end
152+
@type = type
153+
end
154+
155+
# Returns the object in the form of hash, with additionalProperties support.
156+
# @return [Hash] Returns the object in the form of hash
157+
# @!visibility private
158+
def to_hash
159+
hash = {}
160+
self.class.attribute_map.each_pair do |attr, param|
161+
value = self.send(attr)
162+
if value.nil?
163+
is_nullable = self.class.openapi_nullable.include?(attr)
164+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
165+
end
166+
167+
hash[param] = _to_hash(value)
168+
end
169+
self.additional_properties.each_pair do |attr, value|
170+
hash[attr] = value
171+
end
172+
hash
173+
end
174+
175+
# Checks equality by comparing each attribute.
176+
# @param o [Object] Object to be compared
177+
# @!visibility private
178+
def ==(o)
179+
return true if self.equal?(o)
180+
self.class == o.class &&
181+
api_key == o.api_key &&
182+
app_key == o.app_key &&
183+
datacenter == o.datacenter &&
184+
subdomain == o.subdomain &&
185+
type == o.type &&
186+
additional_properties == o.additional_properties
187+
end
188+
189+
# Calculates hash code according to all attributes.
190+
# @return [Integer] Hash code
191+
# @!visibility private
192+
def hash
193+
[api_key, app_key, datacenter, subdomain, type, additional_properties].hash
194+
end
195+
end
196+
end
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
=begin
2+
#Datadog API V2 Collection
3+
4+
#Collection of all Datadog Public endpoints.
5+
6+
The version of the OpenAPI document: 1.0
7+
8+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9+
10+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11+
This product includes software developed at Datadog (https://www.datadoghq.com/).
12+
Copyright 2020-Present Datadog, Inc.
13+
14+
=end
15+
16+
require 'date'
17+
require 'time'
18+
19+
module DatadogAPIClient::V2
20+
# The definition of the `DatadogAPIKey` object.
21+
class DatadogAPIKeyType
22+
include BaseEnumModel
23+
24+
DATADOGAPIKEY = "DatadogAPIKey".freeze
25+
end
26+
end

0 commit comments

Comments
 (0)