Skip to content

Commit 5c77de5

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit fbdd97d of spec repo
1 parent b713e25 commit 5c77de5

10 files changed

Lines changed: 257 additions & 6 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4241,6 +4241,18 @@ components:
42414241
description: Name of the connection
42424242
example: My AWS Connection
42434243
type: string
4244+
tags:
4245+
description: |-
4246+
Tags associated with the connection. Each tag must follow the `key:value` format.
4247+
The `default` tag key is reserved.
4248+
example:
4249+
- env:prod
4250+
- team:action-platform
4251+
items:
4252+
description: A non-reserved tag in `key:value` format.
4253+
pattern: "^(?!default:)[A-Za-z0-9._/-]+:[A-Za-z0-9._/-]+$"
4254+
type: string
4255+
type: array
42444256
required:
42454257
- name
42464258
- integration
@@ -4254,6 +4266,18 @@ components:
42544266
description: Name of the connection
42554267
example: My AWS Connection
42564268
type: string
4269+
tags:
4270+
description: |-
4271+
Tags associated with the connection. Each tag must follow the `key:value` format.
4272+
The `default` tag key is reserved.
4273+
example:
4274+
- env:prod
4275+
- team:action-platform
4276+
items:
4277+
description: A non-reserved tag in `key:value` format.
4278+
pattern: "^(?!default:)[A-Za-z0-9._/-]+:[A-Za-z0-9._/-]+$"
4279+
type: string
4280+
type: array
42574281
type: object
42584282
ActionConnectionData:
42594283
description: Data related to the connection.
@@ -121471,6 +121495,9 @@ paths:
121471121495
type: AWSAssumeRole
121472121496
type: AWS
121473121497
name: My AWS Connection
121498+
tags:
121499+
- env:prod
121500+
- team:action-platform
121474121501
type: action_connection
121475121502
schema:
121476121503
$ref: "#/components/schemas/CreateActionConnectionRequest"
@@ -121487,6 +121514,9 @@ paths:
121487121514
integration:
121488121515
type: AWS
121489121516
name: My AWS Connection
121517+
tags:
121518+
- env:prod
121519+
- team:action-platform
121490121520
id: 00000000-0000-0000-0000-000000000001
121491121521
type: action_connection
121492121522
schema:
@@ -121564,6 +121594,9 @@ paths:
121564121594
integration:
121565121595
type: AWS
121566121596
name: My AWS Connection
121597+
tags:
121598+
- env:prod
121599+
- team:action-platform
121567121600
id: 00000000-0000-0000-0000-000000000002
121568121601
type: action_connection
121569121602
schema:
@@ -121612,6 +121645,9 @@ paths:
121612121645
integration:
121613121646
type: AWS
121614121647
name: My AWS Connection
121648+
tags:
121649+
- env:prod
121650+
- team:action-platform
121615121651
type: action_connection
121616121652
schema:
121617121653
$ref: "#/components/schemas/UpdateActionConnectionRequest"
@@ -121629,6 +121665,9 @@ paths:
121629121665
integration:
121630121666
type: AWS
121631121667
name: My AWS Connection
121668+
tags:
121669+
- env:prod
121670+
- team:action-platform
121632121671
id: 00000000-0000-0000-0000-000000000003
121633121672
type: action_connection
121634121673
schema:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2026-08-12T18:31:44.185Z

cassettes/features/v2/action_connection/Create-a-new-Action-Connection-with-tags-returns-Successfully-created-Action-Connection-response.yml

Lines changed: 42 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2026-08-12T18:31:45.411Z

cassettes/features/v2/action_connection/Update-an-existing-Action-Connection-with-tags-returns-Successfully-updated-Action-Connection-response.yml

Lines changed: 66 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Create a new Action Connection with tags returns "Successfully created Action Connection" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::ActionConnectionAPI.new
5+
6+
body = DatadogAPIClient::V2::CreateActionConnectionRequest.new({
7+
data: DatadogAPIClient::V2::ActionConnectionData.new({
8+
type: DatadogAPIClient::V2::ActionConnectionDataType::ACTION_CONNECTION,
9+
attributes: DatadogAPIClient::V2::ActionConnectionAttributes.new({
10+
name: "Cassette Connection exampleactionconnection",
11+
integration: DatadogAPIClient::V2::AWSIntegration.new({
12+
type: DatadogAPIClient::V2::AWSIntegrationType::AWS,
13+
credentials: DatadogAPIClient::V2::AWSAssumeRole.new({
14+
type: DatadogAPIClient::V2::AWSAssumeRoleType::AWSASSUMEROLE,
15+
role: "MyRoleUpdated",
16+
account_id: "123456789123",
17+
}),
18+
}),
19+
tags: [
20+
"env:test",
21+
"team:action-platform",
22+
],
23+
}),
24+
}),
25+
})
26+
p api_instance.create_action_connection(body)
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Update an existing Action Connection with tags returns "Successfully updated Action Connection" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::ActionConnectionAPI.new
5+
6+
# there is a valid "action_connection" in the system
7+
ACTION_CONNECTION_DATA_ID = ENV["ACTION_CONNECTION_DATA_ID"]
8+
9+
body = DatadogAPIClient::V2::UpdateActionConnectionRequest.new({
10+
data: DatadogAPIClient::V2::ActionConnectionDataUpdate.new({
11+
type: DatadogAPIClient::V2::ActionConnectionDataType::ACTION_CONNECTION,
12+
attributes: DatadogAPIClient::V2::ActionConnectionAttributesUpdate.new({
13+
integration: DatadogAPIClient::V2::AWSIntegrationUpdate.new({
14+
type: DatadogAPIClient::V2::AWSIntegrationType::AWS,
15+
credentials: DatadogAPIClient::V2::AWSAssumeRoleUpdate.new({
16+
type: DatadogAPIClient::V2::AWSAssumeRoleType::AWSASSUMEROLE,
17+
role: "MyRole",
18+
account_id: "123456789123",
19+
}),
20+
}),
21+
tags: [
22+
"env:test",
23+
"team:action-platform",
24+
],
25+
}),
26+
}),
27+
})
28+
p api_instance.update_action_connection(ACTION_CONNECTION_DATA_ID, body)

features/v2/action_connection.feature

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,16 @@ Feature: Action Connection
2828
When the request is sent
2929
Then the response status is 201 Successfully created Action Connection
3030

31+
@team:DataDog/workflow-automation-dev
32+
Scenario: Create a new Action Connection with tags returns "Successfully created Action Connection" response
33+
Given new "CreateActionConnection" request
34+
And body with value {"data":{"type":"action_connection","attributes":{"name":"Cassette Connection {{ unique_lower_alnum }}","integration":{"type":"AWS","credentials":{"type":"AWSAssumeRole","role":"MyRoleUpdated","account_id":"123456789123"}},"tags":["env:test","team:action-platform"]}}}
35+
When the request is sent
36+
Then the response status is 201 Successfully created Action Connection
37+
And the response "data.attributes.tags" has length 2
38+
And the response "data.attributes.tags" array contains value "env:test"
39+
And the response "data.attributes.tags" array contains value "team:action-platform"
40+
3141
@team:DataDog/workflow-automation-dev
3242
Scenario: Delete an existing Action Connection returns "Not Found" response
3343
Given new "DeleteActionConnection" request
@@ -155,3 +165,15 @@ Feature: Action Connection
155165
And body with value {"data":{"type":"action_connection","attributes":{"name":"Cassette Connection","integration":{"type":"AWS","credentials":{"type":"AWSAssumeRole","role":"MyRoleUpdated","account_id":"123456789123"}}}}}
156166
When the request is sent
157167
Then the response status is 200 Successfully updated Action Connection
168+
169+
@team:DataDog/workflow-automation-dev
170+
Scenario: Update an existing Action Connection with tags returns "Successfully updated Action Connection" response
171+
Given there is a valid "action_connection" in the system
172+
And new "UpdateActionConnection" request
173+
And request contains "connection_id" parameter from "action_connection.data.id"
174+
And body with value {"data":{"type":"action_connection","attributes":{"integration":{"type":"AWS","credentials":{"type":"AWSAssumeRole","role":"MyRole","account_id":"123456789123"}},"tags":["env:test","team:action-platform"]}}}
175+
When the request is sent
176+
Then the response status is 200 Successfully updated Action Connection
177+
And the response "data.attributes.tags" has length 2
178+
And the response "data.attributes.tags" array contains value "env:test"
179+
And the response "data.attributes.tags" array contains value "team:action-platform"

lib/datadog_api_client/v2/models/action_connection_attributes.rb

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,19 @@ class ActionConnectionAttributes
2727
# Name of the connection
2828
attr_reader :name
2929

30+
# Tags associated with the connection. Each tag must follow the `key:value` format.
31+
# The `default` tag key is reserved.
32+
attr_accessor :tags
33+
3034
attr_accessor :additional_properties
3135

3236
# Attribute mapping from ruby-style variable name to JSON key.
3337
# @!visibility private
3438
def self.attribute_map
3539
{
3640
:'integration' => :'integration',
37-
:'name' => :'name'
41+
:'name' => :'name',
42+
:'tags' => :'tags'
3843
}
3944
end
4045

@@ -43,7 +48,8 @@ def self.attribute_map
4348
def self.openapi_types
4449
{
4550
:'integration' => :'ActionConnectionIntegration',
46-
:'name' => :'String'
51+
:'name' => :'String',
52+
:'tags' => :'Array<String>'
4753
}
4854
end
4955

@@ -72,6 +78,12 @@ def initialize(attributes = {})
7278
if attributes.key?(:'name')
7379
self.name = attributes[:'name']
7480
end
81+
82+
if attributes.key?(:'tags')
83+
if (value = attributes[:'tags']).is_a?(Array)
84+
self.tags = value
85+
end
86+
end
7587
end
7688

7789
# Check to see if the all the properties in the model are valid
@@ -131,14 +143,15 @@ def ==(o)
131143
self.class == o.class &&
132144
integration == o.integration &&
133145
name == o.name &&
146+
tags == o.tags &&
134147
additional_properties == o.additional_properties
135148
end
136149

137150
# Calculates hash code according to all attributes.
138151
# @return [Integer] Hash code
139152
# @!visibility private
140153
def hash
141-
[integration, name, additional_properties].hash
154+
[integration, name, tags, additional_properties].hash
142155
end
143156
end
144157
end

0 commit comments

Comments
 (0)