Skip to content

Commit ec6b914

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
[OnCall] replacing connection name with unique name (#2774)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent c0851f4 commit ec6b914

File tree

20 files changed

+108
-57
lines changed

20 files changed

+108
-57
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:29.243722",
8-
"spec_repo_commit": "73e22797"
7+
"regenerated": "2025-04-04 16:55:47.238517",
8+
"spec_repo_commit": "da94868e"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-04-04 12:49:29.261107",
13-
"spec_repo_commit": "73e22797"
12+
"regenerated": "2025-04-04 16:55:47.254022",
13+
"spec_repo_commit": "da94868e"
1414
}
1515
}
1616
}

examples/v2/action-connection/CreateActionConnection.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public static void main(String[] args) {
2727
.type(ActionConnectionDataType.ACTION_CONNECTION)
2828
.attributes(
2929
new ActionConnectionAttributes()
30-
.name("Cassette Connection DELETE_ME")
30+
.name("Cassette Connection exampleactionconnection")
3131
.integration(
3232
new ActionConnectionIntegration(
3333
new AWSIntegration()

examples/v2/action-connection/DeleteActionConnection.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,11 @@ public static void main(String[] args) {
99
ApiClient defaultClient = ApiClient.getDefaultApiClient();
1010
ActionConnectionApi apiInstance = new ActionConnectionApi(defaultClient);
1111

12+
// there is a valid "action_connection" in the system
13+
String ACTION_CONNECTION_DATA_ID = System.getenv("ACTION_CONNECTION_DATA_ID");
14+
1215
try {
13-
apiInstance.deleteActionConnection("connection_id");
16+
apiInstance.deleteActionConnection(ACTION_CONNECTION_DATA_ID);
1417
} catch (ApiException e) {
1518
System.err.println("Exception when calling ActionConnectionApi#deleteActionConnection");
1619
System.err.println("Status code: " + e.getCode());

examples/v2/action-connection/DeleteActionConnection_2142905164.java

Lines changed: 0 additions & 25 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
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

src/test/resources/cassettes/features/v2/Create_a_new_Action_Connection_returns_Successfully_created_Action_Connection_response.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"httpRequest": {
44
"body": {
55
"type": "JSON",
6-
"json": "{\"data\":{\"attributes\":{\"integration\":{\"credentials\":{\"account_id\":\"123456789123\",\"role\":\"MyRoleUpdated\",\"type\":\"AWSAssumeRole\"},\"type\":\"AWS\"},\"name\":\"Cassette Connection DELETE_ME\"},\"type\":\"action_connection\"}}"
6+
"json": "{\"data\":{\"attributes\":{\"integration\":{\"credentials\":{\"account_id\":\"123456789123\",\"role\":\"MyRoleUpdated\",\"type\":\"AWSAssumeRole\"},\"type\":\"AWS\"},\"name\":\"Cassette Connection testcreateanewactionconnectionreturnssuccessfullycreatedactionconnectionresponse1743020699\"},\"type\":\"action_connection\"}}"
77
},
88
"headers": {},
99
"method": "POST",
@@ -12,7 +12,7 @@
1212
"secure": true
1313
},
1414
"httpResponse": {
15-
"body": "{\"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 Connection DELETE_ME\"}}}",
15+
"body": "{\"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 Connection testcreateanewactionconnectionreturnssuccessfullycreatedactionconnectionresponse1743020699\"}}}",
1616
"headers": {
1717
"Content-Type": [
1818
"application/vnd.api+json"
@@ -27,13 +27,13 @@
2727
"timeToLive": {
2828
"unlimited": true
2929
},
30-
"id": "143d1c35-6301-e638-823f-d266922b4a2b"
30+
"id": "04556392-bb7b-98ed-b374-d36633910050"
3131
},
3232
{
3333
"httpRequest": {
3434
"headers": {},
3535
"method": "DELETE",
36-
"path": "/api/v2/actions/connections/db41b6cb-ef93-45bd-9857-548e9474737c",
36+
"path": "/api/v2/actions/connections/67aa2f61-266d-48d1-a1ee-cf7c3acc6b20",
3737
"keepAlive": false,
3838
"secure": true
3939
},
@@ -48,6 +48,6 @@
4848
"timeToLive": {
4949
"unlimited": true
5050
},
51-
"id": "bf4a6792-05b2-4047-13ab-b319f5aac56c"
51+
"id": "7561c857-b479-1fb9-a517-18620d730ba3"
5252
}
5353
]
Lines changed: 1 addition & 1 deletion
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,79 @@
1+
[
2+
{
3+
"httpRequest": {
4+
"body": {
5+
"type": "JSON",
6+
"json": "{\"data\":{\"attributes\":{\"integration\":{\"credentials\":{\"account_id\":\"123456789123\",\"role\":\"MyRole\",\"type\":\"AWSAssumeRole\"},\"type\":\"AWS\"},\"name\":\"Cassette Connection testdeleteanexistingactionconnectionreturnstheresourcewasdeletedsuccessfullyresponse1743020700\"},\"type\":\"action_connection\"}}"
7+
},
8+
"headers": {},
9+
"method": "POST",
10+
"path": "/api/v2/actions/connections",
11+
"keepAlive": false,
12+
"secure": true
13+
},
14+
"httpResponse": {
15+
"body": "{\"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 Connection testdeleteanexistingactionconnectionreturnstheresourcewasdeletedsuccessfullyresponse1743020700\"}}}",
16+
"headers": {
17+
"Content-Type": [
18+
"application/vnd.api+json"
19+
]
20+
},
21+
"statusCode": 201,
22+
"reasonPhrase": "Created"
23+
},
24+
"times": {
25+
"remainingTimes": 1
26+
},
27+
"timeToLive": {
28+
"unlimited": true
29+
},
30+
"id": "d622b652-bd44-a22d-1527-2fe726a42d5a"
31+
},
32+
{
33+
"httpRequest": {
34+
"headers": {},
35+
"method": "DELETE",
36+
"path": "/api/v2/actions/connections/c3c3d83b-c495-4c1b-bb1d-592825d21db0",
37+
"keepAlive": false,
38+
"secure": true
39+
},
40+
"httpResponse": {
41+
"headers": {},
42+
"statusCode": 204,
43+
"reasonPhrase": "No Content"
44+
},
45+
"times": {
46+
"remainingTimes": 1
47+
},
48+
"timeToLive": {
49+
"unlimited": true
50+
},
51+
"id": "67294d8d-49a4-c8c6-e910-111ce63e8aeb"
52+
},
53+
{
54+
"httpRequest": {
55+
"headers": {},
56+
"method": "DELETE",
57+
"path": "/api/v2/actions/connections/c3c3d83b-c495-4c1b-bb1d-592825d21db0",
58+
"keepAlive": false,
59+
"secure": true
60+
},
61+
"httpResponse": {
62+
"body": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"error deleting connection: rpc error: code = NotFound desc = connection not found\"}]}",
63+
"headers": {
64+
"Content-Type": [
65+
"application/vnd.api+json"
66+
]
67+
},
68+
"statusCode": 404,
69+
"reasonPhrase": "Not Found"
70+
},
71+
"times": {
72+
"remainingTimes": 1
73+
},
74+
"timeToLive": {
75+
"unlimited": true
76+
},
77+
"id": "67294d8d-49a4-c8c6-e910-111ce63e8aec"
78+
}
79+
]

0 commit comments

Comments
 (0)