Skip to content
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
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2025-04-04 12:49:27.974787",
"spec_repo_commit": "73e22797"
"regenerated": "2025-04-04 16:55:45.187360",
"spec_repo_commit": "da94868e"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-04-04 12:49:27.990030",
"spec_repo_commit": "73e22797"
"regenerated": "2025-04-04 16:55:45.204117",
"spec_repo_commit": "da94868e"
}
}
}
2 changes: 1 addition & 1 deletion examples/v2/action-connection/CreateActionConnection.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
data=ActionConnectionData(
type=ActionConnectionDataType.ACTION_CONNECTION,
attributes=ActionConnectionAttributes(
name="Cassette Connection DELETE_ME",
name="Cassette Connection exampleactionconnection",
integration=AWSIntegration(
type=AWSIntegrationType.AWS,
credentials=AWSAssumeRole(
Expand Down
6 changes: 5 additions & 1 deletion examples/v2/action-connection/DeleteActionConnection.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@
Delete an existing Action Connection returns "The resource was deleted successfully." response
"""

from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.action_connection_api import ActionConnectionApi

# there is a valid "action_connection" in the system
ACTION_CONNECTION_DATA_ID = environ["ACTION_CONNECTION_DATA_ID"]

configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = ActionConnectionApi(api_client)
api_instance.delete_action_connection(
connection_id="connection_id",
connection_id=ACTION_CONNECTION_DATA_ID,
)

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
2025-01-06T22:02:35.383Z
2025-03-26T20:24:59.622Z
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2025-01-06T22:02:35.598Z
2025-03-26T20:24:59.727Z
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
interactions:
- request:
body: '{"data":{"attributes":{"integration":{"credentials":{"account_id":"123456789123","role":"MyRoleUpdated","type":"AWSAssumeRole"},"type":"AWS"},"name":"Cassette
Connection DELETE_ME"},"type":"action_connection"}}'
Connection testcreateanewactionconnectionreturnssuccessfullycreatedactionconnectionresponse1743020699"},"type":"action_connection"}}'
headers:
accept:
- application/json
Expand All @@ -11,8 +11,8 @@ interactions:
uri: https://api.datadoghq.com/api/v2/actions/connections
response:
body:
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
Connection DELETE_ME"}}}'
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
Connection testcreateanewactionconnectionreturnssuccessfullycreatedactionconnectionresponse1743020699"}}}'
headers:
content-type:
- application/vnd.api+json
Expand All @@ -25,7 +25,7 @@ interactions:
accept:
- '*/*'
method: DELETE
uri: https://api.datadoghq.com/api/v2/actions/connections/db41b6cb-ef93-45bd-9857-548e9474737c
uri: https://api.datadoghq.com/api/v2/actions/connections/67aa2f61-266d-48d1-a1ee-cf7c3acc6b20
response:
body:
string: ''
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2025-01-06T22:02:36.467Z
2025-03-26T20:25:00.311Z
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2025-03-26T20:25:00.458Z
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
interactions:
- request:
body: '{"data":{"attributes":{"integration":{"credentials":{"account_id":"123456789123","role":"MyRole","type":"AWSAssumeRole"},"type":"AWS"},"name":"Cassette
Connection testdeleteanexistingactionconnectionreturnstheresourcewasdeletedsuccessfullyresponse1743020700"},"type":"action_connection"}}'
headers:
accept:
- application/json
content-type:
- application/json
method: POST
uri: https://api.datadoghq.com/api/v2/actions/connections
response:
body:
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
Connection testdeleteanexistingactionconnectionreturnstheresourcewasdeletedsuccessfullyresponse1743020700"}}}'
headers:
content-type:
- application/vnd.api+json
status:
code: 201
message: Created
- request:
body: null
headers:
accept:
- '*/*'
method: DELETE
uri: https://api.datadoghq.com/api/v2/actions/connections/c3c3d83b-c495-4c1b-bb1d-592825d21db0
response:
body:
string: ''
headers: {}
status:
code: 204
message: No Content
- request:
body: null
headers:
accept:
- '*/*'
method: DELETE
uri: https://api.datadoghq.com/api/v2/actions/connections/c3c3d83b-c495-4c1b-bb1d-592825d21db0
response:
body:
string: '{"errors":[{"title":"Generic Error","detail":"error deleting connection:
rpc error: code = NotFound desc = connection not found"}]}'
headers:
content-type:
- application/vnd.api+json
status:
code: 404
message: Not Found
version: 1
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2025-01-06T22:02:37.403Z
2025-03-26T20:25:01.150Z
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2025-01-06T22:02:37.563Z
2025-03-26T20:25:01.247Z
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2025-01-06T22:02:37.743Z
2025-03-26T20:25:01.398Z
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interactions:
uri: https://api.datadoghq.com/api/v2/actions/connections/cb460d51-3c88-4e87-adac-d47131d0423d
response:
body:
string: '{"data":{"id":"cb460d51-3c88-4e87-adac-d47131d0423d","type":"action_connection","attributes":{"integration":{"credentials":{"account_id":"123456789123","role":"MyRoleUpdated","external_id":"909b33b1242748cfbef42f20011e2fa0","principal_id":"464622532012","type":"AWSAssumeRole"},"type":"AWS"},"name":"Cassette
string: '{"data":{"id":"cb460d51-3c88-4e87-adac-d47131d0423d","type":"action_connection","attributes":{"integration":{"credentials":{"account_id":"123456789123","external_id":"909b33b1242748cfbef42f20011e2fa0","principal_id":"464622532012","role":"MyRoleUpdated","type":"AWSAssumeRole"},"type":"AWS"},"name":"Cassette
Connection"}}}'
headers:
content-type:
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2025-01-06T22:02:38.001Z
2025-03-26T20:25:01.521Z
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2025-01-06T22:02:38.092Z
2025-03-26T20:25:01.625Z
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2025-01-06T22:02:38.186Z
2025-03-26T20:25:01.719Z
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ interactions:
uri: https://api.datadoghq.com/api/v2/actions/connections/cb460d51-3c88-4e87-adac-d47131d0423d
response:
body:
string: '{"data":{"id":"cb460d51-3c88-4e87-adac-d47131d0423d","type":"action_connection","attributes":{"integration":{"credentials":{"account_id":"123456789123","role":"MyRoleUpdated","external_id":"909b33b1242748cfbef42f20011e2fa0","principal_id":"464622532012","type":"AWSAssumeRole"},"type":"AWS"},"name":"Cassette
string: '{"data":{"id":"cb460d51-3c88-4e87-adac-d47131d0423d","type":"action_connection","attributes":{"integration":{"credentials":{"account_id":"123456789123","external_id":"909b33b1242748cfbef42f20011e2fa0","principal_id":"464622532012","role":"MyRoleUpdated","type":"AWSAssumeRole"},"type":"AWS"},"name":"Cassette
Connection"}}}'
headers:
content-type:
Expand Down
11 changes: 2 additions & 9 deletions tests/v2/features/action_connection.feature
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Feature: Action Connection
@team:DataDog/workflow-automation-dev
Scenario: Create a new Action Connection returns "Successfully created Action Connection" response
Given new "CreateActionConnection" request
And body with value {"data":{"type":"action_connection","attributes":{"name":"Cassette Connection DELETE_ME","integration":{"type":"AWS","credentials":{"type":"AWSAssumeRole","role":"MyRoleUpdated","account_id":"123456789123"}}}}}
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"}}}}}
When the request is sent
Then the response status is 201 Successfully created Action Connection

Expand All @@ -36,20 +36,13 @@ Feature: Action Connection
Then the response status is 404 Not Found

@team:DataDog/workflow-automation-dev
Scenario: Delete an existing Action Connection returns "Successfully deleted Action Connection" response
Scenario: Delete an existing Action Connection returns "The resource was deleted successfully." response
Given there is a valid "action_connection" in the system
And new "DeleteActionConnection" request
And request contains "connection_id" parameter from "action_connection.data.id"
When the request is sent
Then the response status is 204 The resource was deleted successfully.

@generated @skip @team:DataDog/workflow-automation-dev
Scenario: Delete an existing Action Connection returns "The resource was deleted successfully." response
Given new "DeleteActionConnection" request
And request contains "connection_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 204 The resource was deleted successfully.

@team:DataDog/workflow-automation-dev
Scenario: Get an existing Action Connection returns "Bad Request" response
Given new "GetActionConnection" request
Expand Down
2 changes: 1 addition & 1 deletion tests/v2/features/given.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"parameters": [
{
"name": "body",
"value": "{\n \"data\": {\n \"type\": \"action_connection\",\n \"attributes\": {\n \"name\": \"Cassette Connection DELETE\",\n \"integration\": {\n \"type\": \"AWS\",\n \"credentials\": {\n \"type\": \"AWSAssumeRole\",\n \"role\": \"MyRole\",\n \"account_id\": \"123456789123\"\n }\n }\n }\n }\n}"
"value": "{\n \"data\": {\n \"type\": \"action_connection\",\n \"attributes\": {\n \"name\": \"Cassette Connection {{ unique_lower_alnum }}\",\n \"integration\": {\n \"type\": \"AWS\",\n \"credentials\": {\n \"type\": \"AWSAssumeRole\",\n \"role\": \"MyRole\",\n \"account_id\": \"123456789123\"\n }\n }\n }\n }\n}"
}
],
"step": "there is a valid \"action_connection\" in the system",
Expand Down