Skip to content

Commit 8cd1163

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
[OnCall] replacing connection name with unique name (#2474)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent d3600aa commit 8cd1163

File tree

20 files changed

+82
-48
lines changed

20 files changed

+82
-48
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2025-04-04 12:49:27.974787",
8-
"spec_repo_commit": "73e22797"
7+
"regenerated": "2025-04-04 16:55:45.187360",
8+
"spec_repo_commit": "da94868e"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-04-04 12:49:27.990030",
13-
"spec_repo_commit": "73e22797"
12+
"regenerated": "2025-04-04 16:55:45.204117",
13+
"spec_repo_commit": "da94868e"
1414
}
1515
}
1616
}

examples/v2/action-connection/CreateActionConnection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
data=ActionConnectionData(
1818
type=ActionConnectionDataType.ACTION_CONNECTION,
1919
attributes=ActionConnectionAttributes(
20-
name="Cassette Connection DELETE_ME",
20+
name="Cassette Connection exampleactionconnection",
2121
integration=AWSIntegration(
2222
type=AWSIntegrationType.AWS,
2323
credentials=AWSAssumeRole(

examples/v2/action-connection/DeleteActionConnection.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,16 @@
22
Delete an existing Action Connection returns "The resource was deleted successfully." response
33
"""
44

5+
from os import environ
56
from datadog_api_client import ApiClient, Configuration
67
from datadog_api_client.v2.api.action_connection_api import ActionConnectionApi
78

9+
# there is a valid "action_connection" in the system
10+
ACTION_CONNECTION_DATA_ID = environ["ACTION_CONNECTION_DATA_ID"]
11+
812
configuration = Configuration()
913
with ApiClient(configuration) as api_client:
1014
api_instance = ActionConnectionApi(api_client)
1115
api_instance.delete_action_connection(
12-
connection_id="connection_id",
16+
connection_id=ACTION_CONNECTION_DATA_ID,
1317
)

examples/v2/action-connection/DeleteActionConnection_2142905164.py

Lines changed: 0 additions & 17 deletions
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2025-01-06T22:02:35.383Z
1+
2025-03-26T20:24:59.622Z
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2025-01-06T22:02:35.598Z
1+
2025-03-26T20:24:59.727Z

tests/v2/cassettes/test_scenarios/test_create_a_new_action_connection_returns_successfully_created_action_connection_response.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
interactions:
22
- request:
33
body: '{"data":{"attributes":{"integration":{"credentials":{"account_id":"123456789123","role":"MyRoleUpdated","type":"AWSAssumeRole"},"type":"AWS"},"name":"Cassette
4-
Connection DELETE_ME"},"type":"action_connection"}}'
4+
Connection testcreateanewactionconnectionreturnssuccessfullycreatedactionconnectionresponse1743020699"},"type":"action_connection"}}'
55
headers:
66
accept:
77
- application/json
@@ -11,8 +11,8 @@ interactions:
1111
uri: https://api.datadoghq.com/api/v2/actions/connections
1212
response:
1313
body:
14-
string: '{"data":{"id":"db41b6cb-ef93-45bd-9857-548e9474737c","type":"action_connection","attributes":{"integration":{"credentials":{"account_id":"123456789123","role":"MyRoleUpdated","external_id":"c6f62d439f14423b963e4dd4246af4a7","principal_id":"464622532012","type":"AWSAssumeRole"},"type":"AWS"},"name":"Cassette
15-
Connection DELETE_ME"}}}'
14+
string: '{"data":{"id":"67aa2f61-266d-48d1-a1ee-cf7c3acc6b20","type":"action_connection","attributes":{"integration":{"credentials":{"account_id":"123456789123","external_id":"70f4660c99684420821b0c13a67eb4d1","principal_id":"464622532012","role":"MyRoleUpdated","type":"AWSAssumeRole"},"type":"AWS"},"name":"Cassette
15+
Connection testcreateanewactionconnectionreturnssuccessfullycreatedactionconnectionresponse1743020699"}}}'
1616
headers:
1717
content-type:
1818
- application/vnd.api+json
@@ -25,7 +25,7 @@ interactions:
2525
accept:
2626
- '*/*'
2727
method: DELETE
28-
uri: https://api.datadoghq.com/api/v2/actions/connections/db41b6cb-ef93-45bd-9857-548e9474737c
28+
uri: https://api.datadoghq.com/api/v2/actions/connections/67aa2f61-266d-48d1-a1ee-cf7c3acc6b20
2929
response:
3030
body:
3131
string: ''
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2025-01-06T22:02:36.467Z
1+
2025-03-26T20:25:00.311Z
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2025-03-26T20:25:00.458Z
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
interactions:
2+
- request:
3+
body: '{"data":{"attributes":{"integration":{"credentials":{"account_id":"123456789123","role":"MyRole","type":"AWSAssumeRole"},"type":"AWS"},"name":"Cassette
4+
Connection testdeleteanexistingactionconnectionreturnstheresourcewasdeletedsuccessfullyresponse1743020700"},"type":"action_connection"}}'
5+
headers:
6+
accept:
7+
- application/json
8+
content-type:
9+
- application/json
10+
method: POST
11+
uri: https://api.datadoghq.com/api/v2/actions/connections
12+
response:
13+
body:
14+
string: '{"data":{"id":"c3c3d83b-c495-4c1b-bb1d-592825d21db0","type":"action_connection","attributes":{"integration":{"credentials":{"account_id":"123456789123","external_id":"6183670d1ceb4278808cf2df9aa03a07","principal_id":"464622532012","role":"MyRole","type":"AWSAssumeRole"},"type":"AWS"},"name":"Cassette
15+
Connection testdeleteanexistingactionconnectionreturnstheresourcewasdeletedsuccessfullyresponse1743020700"}}}'
16+
headers:
17+
content-type:
18+
- application/vnd.api+json
19+
status:
20+
code: 201
21+
message: Created
22+
- request:
23+
body: null
24+
headers:
25+
accept:
26+
- '*/*'
27+
method: DELETE
28+
uri: https://api.datadoghq.com/api/v2/actions/connections/c3c3d83b-c495-4c1b-bb1d-592825d21db0
29+
response:
30+
body:
31+
string: ''
32+
headers: {}
33+
status:
34+
code: 204
35+
message: No Content
36+
- request:
37+
body: null
38+
headers:
39+
accept:
40+
- '*/*'
41+
method: DELETE
42+
uri: https://api.datadoghq.com/api/v2/actions/connections/c3c3d83b-c495-4c1b-bb1d-592825d21db0
43+
response:
44+
body:
45+
string: '{"errors":[{"title":"Generic Error","detail":"error deleting connection:
46+
rpc error: code = NotFound desc = connection not found"}]}'
47+
headers:
48+
content-type:
49+
- application/vnd.api+json
50+
status:
51+
code: 404
52+
message: Not Found
53+
version: 1

0 commit comments

Comments
 (0)