Skip to content

Commit 430a333

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 99d9905 of spec repo
1 parent ddeeeef commit 430a333

32 files changed

Lines changed: 3640 additions & 0 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 1140 additions & 0 deletions
Large diffs are not rendered by default.

features/v2/given.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -834,6 +834,22 @@
834834
"tag": "Okta Integration",
835835
"operationId": "CreateOktaAccount"
836836
},
837+
{
838+
"parameters": [
839+
{
840+
"name": "integration_name",
841+
"value": "\"twilio\""
842+
},
843+
{
844+
"name": "body",
845+
"value": "{\n \"data\": {\n \"type\": \"Account\",\n \"attributes\": {\n \"name\": \"{{ unique }}\",\n \"settings\": {\n \"api_key\": \"SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\n \"account_sid\": \"ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\n \"events\": true,\n \"messages\": true,\n \"alerts\": true,\n \"call_summaries\": true,\n \"ccm_enabled\": true,\n \"censor_logs\": true\n },\n \"secrets\": {\n \"api_key_token\": \"test_secret_token_value\"\n }\n }\n }\n}"
846+
}
847+
],
848+
"step": "there is a valid \"web_integration_account\" in the system",
849+
"key": "web_integration_account",
850+
"tag": "Integration Accounts",
851+
"operationId": "CreateAmsIntegrationAccount"
852+
},
837853
{
838854
"parameters": [
839855
{
Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
@endpoint(integration-accounts) @endpoint(integration-accounts-v2)
2+
Feature: Integration Accounts
3+
Configure and manage third-party integrations with Datadog. This API
4+
provides a unified interface for managing integration accounts across
5+
various external services. Each integration has its own unique schema
6+
that defines the required settings and secrets. Before creating or
7+
updating an account, use the schema endpoint to retrieve the specific
8+
requirements, field types, validation rules, and available configuration
9+
options for your integration. **Note**: This API manages integration
10+
account configurations only. It does not support Grace Resources,
11+
Reference Tables, or Custom Queries CRUD operations. For those features,
12+
refer to each integration's dedicated documentation. Supported
13+
Integrations: -
14+
[Twilio](https://docs.datadoghq.com/integrations/twilio/) -
15+
[Snowflake](https://docs.datadoghq.com/integrations/snowflake-web/) -
16+
[Databricks](https://docs.datadoghq.com/integrations/databricks/)
17+
18+
Background:
19+
Given a valid "apiKeyAuth" key in the system
20+
And a valid "appKeyAuth" key in the system
21+
And an instance of "IntegrationAccounts" API
22+
23+
@generated @skip @team:DataDog/saas-integrations
24+
Scenario: Create integration account returns "Bad Request: The request body is malformed or the integration name format is invalid." response
25+
Given new "CreateAmsIntegrationAccount" request
26+
And request contains "integration_name" parameter from "REPLACE.ME"
27+
And body with value {"data": {"attributes": {"name": "My Production Account", "secrets": {"api_key_token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}, "settings": {"account_sid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "alerts": true, "api_key": "SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "call_summaries": true, "ccm_enabled": true, "censor_logs": true, "events": true, "messages": true}}, "type": "Account"}}
28+
When the request is sent
29+
Then the response status is 400 Bad Request: The request body is malformed or the integration name format is invalid.
30+
31+
@generated @skip @team:DataDog/saas-integrations
32+
Scenario: Create integration account returns "Created: The account was successfully created." response
33+
Given new "CreateAmsIntegrationAccount" request
34+
And request contains "integration_name" parameter from "REPLACE.ME"
35+
And body with value {"data": {"attributes": {"name": "My Production Account", "secrets": {"api_key_token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}, "settings": {"account_sid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "alerts": true, "api_key": "SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "call_summaries": true, "ccm_enabled": true, "censor_logs": true, "events": true, "messages": true}}, "type": "Account"}}
36+
When the request is sent
37+
Then the response status is 201 Created: The account was successfully created.
38+
39+
@generated @skip @team:DataDog/saas-integrations
40+
Scenario: Create integration account returns "Not Found: The integration does not exist." response
41+
Given new "CreateAmsIntegrationAccount" request
42+
And request contains "integration_name" parameter from "REPLACE.ME"
43+
And body with value {"data": {"attributes": {"name": "My Production Account", "secrets": {"api_key_token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}, "settings": {"account_sid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "alerts": true, "api_key": "SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "call_summaries": true, "ccm_enabled": true, "censor_logs": true, "events": true, "messages": true}}, "type": "Account"}}
44+
When the request is sent
45+
Then the response status is 404 Not Found: The integration does not exist.
46+
47+
@generated @skip @team:DataDog/saas-integrations
48+
Scenario: Create integration account returns "Unprocessable Entity: The account configuration does not match the integration schema." response
49+
Given new "CreateAmsIntegrationAccount" request
50+
And request contains "integration_name" parameter from "REPLACE.ME"
51+
And body with value {"data": {"attributes": {"name": "My Production Account", "secrets": {"api_key_token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}, "settings": {"account_sid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "alerts": true, "api_key": "SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "call_summaries": true, "ccm_enabled": true, "censor_logs": true, "events": true, "messages": true}}, "type": "Account"}}
52+
When the request is sent
53+
Then the response status is 422 Unprocessable Entity: The account configuration does not match the integration schema.
54+
55+
@generated @skip @team:DataDog/saas-integrations
56+
Scenario: Delete integration account returns "Bad Request: The integration name or account ID format is invalid." response
57+
Given new "DeleteAmsIntegrationAccount" request
58+
And request contains "integration_name" parameter from "REPLACE.ME"
59+
And request contains "account_id" parameter from "REPLACE.ME"
60+
When the request is sent
61+
Then the response status is 400 Bad Request: The integration name or account ID format is invalid.
62+
63+
@generated @skip @team:DataDog/saas-integrations
64+
Scenario: Delete integration account returns "Not Found: The integration or account does not exist." response
65+
Given new "DeleteAmsIntegrationAccount" request
66+
And request contains "integration_name" parameter from "REPLACE.ME"
67+
And request contains "account_id" parameter from "REPLACE.ME"
68+
When the request is sent
69+
Then the response status is 404 Not Found: The integration or account does not exist.
70+
71+
@generated @skip @team:DataDog/saas-integrations
72+
Scenario: Delete integration account returns "OK: The account was successfully deleted." response
73+
Given new "DeleteAmsIntegrationAccount" request
74+
And request contains "integration_name" parameter from "REPLACE.ME"
75+
And request contains "account_id" parameter from "REPLACE.ME"
76+
When the request is sent
77+
Then the response status is 200 OK: The account was successfully deleted.
78+
79+
@generated @skip @team:DataDog/saas-integrations
80+
Scenario: Get account schema for an integration returns "Bad Request: The integration name format is invalid." response
81+
Given new "GetAmsIntegrationAccountSchema" request
82+
And request contains "integration_name" parameter from "REPLACE.ME"
83+
When the request is sent
84+
Then the response status is 400 Bad Request: The integration name format is invalid.
85+
86+
@generated @skip @team:DataDog/saas-integrations
87+
Scenario: Get account schema for an integration returns "Not Found: The integration does not exist or has no schema available." response
88+
Given new "GetAmsIntegrationAccountSchema" request
89+
And request contains "integration_name" parameter from "REPLACE.ME"
90+
When the request is sent
91+
Then the response status is 404 Not Found: The integration does not exist or has no schema available.
92+
93+
@generated @skip @team:DataDog/saas-integrations
94+
Scenario: Get account schema for an integration returns "OK: The JSON schema for the integration's account configuration." response
95+
Given new "GetAmsIntegrationAccountSchema" request
96+
And request contains "integration_name" parameter from "REPLACE.ME"
97+
When the request is sent
98+
Then the response status is 200 OK: The JSON schema for the integration's account configuration.
99+
100+
@generated @skip @team:DataDog/saas-integrations
101+
Scenario: Get integration account returns "Bad Request: The integration name or account ID format is invalid." response
102+
Given new "GetAmsIntegrationAccount" request
103+
And request contains "integration_name" parameter from "REPLACE.ME"
104+
And request contains "account_id" parameter from "REPLACE.ME"
105+
When the request is sent
106+
Then the response status is 400 Bad Request: The integration name or account ID format is invalid.
107+
108+
@generated @skip @team:DataDog/saas-integrations
109+
Scenario: Get integration account returns "Not Found: The integration or account does not exist." response
110+
Given new "GetAmsIntegrationAccount" request
111+
And request contains "integration_name" parameter from "REPLACE.ME"
112+
And request contains "account_id" parameter from "REPLACE.ME"
113+
When the request is sent
114+
Then the response status is 404 Not Found: The integration or account does not exist.
115+
116+
@generated @skip @team:DataDog/saas-integrations
117+
Scenario: Get integration account returns "OK: The account details for the specified integration." response
118+
Given new "GetAmsIntegrationAccount" request
119+
And request contains "integration_name" parameter from "REPLACE.ME"
120+
And request contains "account_id" parameter from "REPLACE.ME"
121+
When the request is sent
122+
Then the response status is 200 OK: The account details for the specified integration.
123+
124+
@generated @skip @team:DataDog/saas-integrations
125+
Scenario: List integration accounts returns "Bad Request: The integration name format is invalid." response
126+
Given new "ListAmsIntegrationAccounts" request
127+
And request contains "integration_name" parameter from "REPLACE.ME"
128+
When the request is sent
129+
Then the response status is 400 Bad Request: The integration name format is invalid.
130+
131+
@generated @skip @team:DataDog/saas-integrations
132+
Scenario: List integration accounts returns "Not Found: The integration does not exist." response
133+
Given new "ListAmsIntegrationAccounts" request
134+
And request contains "integration_name" parameter from "REPLACE.ME"
135+
When the request is sent
136+
Then the response status is 404 Not Found: The integration does not exist.
137+
138+
@generated @skip @team:DataDog/saas-integrations
139+
Scenario: List integration accounts returns "OK: List of all accounts for the specified integration." response
140+
Given new "ListAmsIntegrationAccounts" request
141+
And request contains "integration_name" parameter from "REPLACE.ME"
142+
When the request is sent
143+
Then the response status is 200 OK: List of all accounts for the specified integration.
144+
145+
@generated @skip @team:DataDog/saas-integrations
146+
Scenario: Update integration account returns "Bad Request: The request body is malformed or the integration name/account ID format is invalid." response
147+
Given new "UpdateAmsIntegrationAccount" request
148+
And request contains "integration_name" parameter from "REPLACE.ME"
149+
And request contains "account_id" parameter from "REPLACE.ME"
150+
And body with value {"data": {"attributes": {"name": "My Production Account (Updated)", "secrets": {"api_key_token": "new_secret_token_value"}, "settings": {"ccm_enabled": true, "events": true, "messages": false}}, "type": "Account"}}
151+
When the request is sent
152+
Then the response status is 400 Bad Request: The request body is malformed or the integration name/account ID format is invalid.
153+
154+
@generated @skip @team:DataDog/saas-integrations
155+
Scenario: Update integration account returns "Not Found: The integration or account does not exist." response
156+
Given new "UpdateAmsIntegrationAccount" request
157+
And request contains "integration_name" parameter from "REPLACE.ME"
158+
And request contains "account_id" parameter from "REPLACE.ME"
159+
And body with value {"data": {"attributes": {"name": "My Production Account (Updated)", "secrets": {"api_key_token": "new_secret_token_value"}, "settings": {"ccm_enabled": true, "events": true, "messages": false}}, "type": "Account"}}
160+
When the request is sent
161+
Then the response status is 404 Not Found: The integration or account does not exist.
162+
163+
@generated @skip @team:DataDog/saas-integrations
164+
Scenario: Update integration account returns "OK: The account was successfully updated." response
165+
Given new "UpdateAmsIntegrationAccount" request
166+
And request contains "integration_name" parameter from "REPLACE.ME"
167+
And request contains "account_id" parameter from "REPLACE.ME"
168+
And body with value {"data": {"attributes": {"name": "My Production Account (Updated)", "secrets": {"api_key_token": "new_secret_token_value"}, "settings": {"ccm_enabled": true, "events": true, "messages": false}}, "type": "Account"}}
169+
When the request is sent
170+
Then the response status is 200 OK: The account was successfully updated.
171+
172+
@generated @skip @team:DataDog/saas-integrations
173+
Scenario: Update integration account returns "Unprocessable Entity: The account configuration does not match the integration schema." response
174+
Given new "UpdateAmsIntegrationAccount" request
175+
And request contains "integration_name" parameter from "REPLACE.ME"
176+
And request contains "account_id" parameter from "REPLACE.ME"
177+
And body with value {"data": {"attributes": {"name": "My Production Account (Updated)", "secrets": {"api_key_token": "new_secret_token_value"}, "settings": {"ccm_enabled": true, "events": true, "messages": false}}, "type": "Account"}}
178+
When the request is sent
179+
Then the response status is 422 Unprocessable Entity: The account configuration does not match the integration schema.

features/v2/undo.json

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4191,6 +4191,53 @@
41914191
"type": "idempotent"
41924192
}
41934193
},
4194+
"ListAmsIntegrationAccounts": {
4195+
"tag": "Integration Accounts",
4196+
"undo": {
4197+
"type": "safe"
4198+
}
4199+
},
4200+
"CreateAmsIntegrationAccount": {
4201+
"tag": "Integration Accounts",
4202+
"undo": {
4203+
"operationId": "DeleteAmsIntegrationAccount",
4204+
"parameters": [
4205+
{
4206+
"name": "integration_name",
4207+
"source": "integration_name"
4208+
},
4209+
{
4210+
"name": "account_id",
4211+
"source": "data.id"
4212+
}
4213+
],
4214+
"type": "unsafe"
4215+
}
4216+
},
4217+
"GetAmsIntegrationAccountSchema": {
4218+
"tag": "Integration Accounts",
4219+
"undo": {
4220+
"type": "safe"
4221+
}
4222+
},
4223+
"DeleteAmsIntegrationAccount": {
4224+
"tag": "Integration Accounts",
4225+
"undo": {
4226+
"type": "idempotent"
4227+
}
4228+
},
4229+
"GetAmsIntegrationAccount": {
4230+
"tag": "Integration Accounts",
4231+
"undo": {
4232+
"type": "safe"
4233+
}
4234+
},
4235+
"UpdateAmsIntegrationAccount": {
4236+
"tag": "Integration Accounts",
4237+
"undo": {
4238+
"type": "idempotent"
4239+
}
4240+
},
41944241
"GetIPAllowlist": {
41954242
"tag": "IP Allowlist",
41964243
"undo": {

packages/datadog-api-client/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,7 @@ apiInstance
409409
| High Availability MultiRegion | @datadog/datadog-api-client-high-availability-multi-region | [README.md](../../services/high-availability-multi-region/README.md) |
410410
| Hosts | @datadog/datadog-api-client-hosts | [README.md](../../services/hosts/README.md) |
411411
| Incidents | @datadog/datadog-api-client-incidents | [README.md](../../services/incidents/README.md) |
412+
| Integration Accounts | @datadog/datadog-api-client-integration-accounts | [README.md](../../services/integration-accounts/README.md) |
412413
| Integrations | @datadog/datadog-api-client-integrations | [README.md](../../services/integrations/README.md) |
413414
| IP Allowlist | @datadog/datadog-api-client-ip-allowlist | [README.md](../../services/ip-allowlist/README.md) |
414415
| IP Ranges | @datadog/datadog-api-client-ip-ranges | [README.md](../../services/ip-ranges/README.md) |

private/bdd_runner/src/support/scenarios_model_mapping.ts

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11177,6 +11177,68 @@ export const ScenariosModelMappings: { [key: string]: OperationMapping } = {
1117711177
},
1117811178
operationResponseType: "OktaAccountResponse",
1117911179
},
11180+
"IntegrationAccountsApi.V2.ListAmsIntegrationAccounts": {
11181+
integrationName: {
11182+
type: "string",
11183+
format: "",
11184+
},
11185+
operationResponseType: "AmsIntegrationAccountsResponse",
11186+
},
11187+
"IntegrationAccountsApi.V2.CreateAmsIntegrationAccount": {
11188+
integrationName: {
11189+
type: "string",
11190+
format: "",
11191+
},
11192+
body: {
11193+
type: "AmsIntegrationAccountCreateRequest",
11194+
format: "",
11195+
},
11196+
operationResponseType: "AmsIntegrationAccountResponse",
11197+
},
11198+
"IntegrationAccountsApi.V2.GetAmsIntegrationAccountSchema": {
11199+
integrationName: {
11200+
type: "string",
11201+
format: "",
11202+
},
11203+
operationResponseType: "AmsIntegrationAccountSchemaResponse",
11204+
},
11205+
"IntegrationAccountsApi.V2.GetAmsIntegrationAccount": {
11206+
integrationName: {
11207+
type: "string",
11208+
format: "",
11209+
},
11210+
accountId: {
11211+
type: "string",
11212+
format: "",
11213+
},
11214+
operationResponseType: "AmsIntegrationAccountResponse",
11215+
},
11216+
"IntegrationAccountsApi.V2.DeleteAmsIntegrationAccount": {
11217+
integrationName: {
11218+
type: "string",
11219+
format: "",
11220+
},
11221+
accountId: {
11222+
type: "string",
11223+
format: "",
11224+
},
11225+
operationResponseType: "{}",
11226+
},
11227+
"IntegrationAccountsApi.V2.UpdateAmsIntegrationAccount": {
11228+
integrationName: {
11229+
type: "string",
11230+
format: "",
11231+
},
11232+
accountId: {
11233+
type: "string",
11234+
format: "",
11235+
},
11236+
body: {
11237+
type: "AmsIntegrationAccountUpdateRequest",
11238+
format: "",
11239+
},
11240+
operationResponseType: "AmsIntegrationAccountResponse",
11241+
},
1118011242
"IPAllowlistApi.V2.GetIPAllowlist": {
1118111243
operationResponseType: "IPAllowlistResponse",
1118211244
},
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# @datadog/datadog-api-client-integration-accounts
2+
3+
## Description
4+
5+
Configure and manage third-party integrations with Datadog. This API provides a unified
6+
interface for managing integration accounts across various external services.
7+
8+
Each integration has its own unique schema that defines the required settings and secrets.
9+
Before creating or updating an account, use the schema endpoint to retrieve the specific
10+
requirements, field types, validation rules, and available configuration options for your
11+
integration.
12+
13+
**Note**: This API manages integration account configurations only. It does not support
14+
Grace Resources, Reference Tables, or Custom Queries CRUD operations. For those features,
15+
refer to each integration's dedicated documentation.
16+
17+
Supported Integrations:
18+
- [Twilio](https://docs.datadoghq.com/integrations/twilio/)
19+
- [Snowflake](https://docs.datadoghq.com/integrations/snowflake-web/)
20+
- [Databricks](https://docs.datadoghq.com/integrations/databricks/)
21+
22+
## Navigation
23+
24+
- [Installation](#installation)
25+
- [Getting Started](#getting-started)
26+
27+
## Installation
28+
29+
```sh
30+
# NPM
31+
npm install @datadog/datadog-api-client-integration-accounts
32+
# Yarn
33+
yarn add @datadog/datadog-api-client-integration-accounts
34+
```
35+
36+
## Getting Started
37+
```ts
38+
import { createConfiguration } from "@datadog/datadog-api-client";
39+
import { IntegrationAccountsApiV2 } from "@datadog/datadog-api-client-integration-accounts";
40+
import { v2 } from "@datadog/datadog-api-client-integration-accounts";
41+
42+
const configuration = createConfiguration();
43+
const apiInstance = new IntegrationAccountsApiV2(configuration);
44+
const params = {/* parameters */};
45+
46+
apiInstance.listAmsIntegrationAccounts(params).then((data) => {
47+
console.log("API called successfully. Returned data: " + JSON.stringify(data));
48+
}).catch((error) => {
49+
console.error("Error calling API: " + error);
50+
});
51+
```

0 commit comments

Comments
 (0)