Skip to content

Commit 2cfb20d

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 3661c59 of spec repo
1 parent 6f031eb commit 2cfb20d

30 files changed

Lines changed: 3854 additions & 0 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 1182 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/**
2+
* Create integration account returns "Created: The account was successfully created." response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.IntegrationAccountsApi(configuration);
9+
10+
const params: v2.IntegrationAccountsApiCreateAmsIntegrationAccountRequest = {
11+
body: {
12+
data: {
13+
attributes: {
14+
name: "My Production Account",
15+
secrets: {
16+
api_key_token: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
17+
},
18+
settings: {
19+
account_sid: "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
20+
alerts: "True",
21+
api_key: "SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
22+
call_summaries: "True",
23+
ccm_enabled: "True",
24+
censor_logs: "True",
25+
events: "True",
26+
messages: "True",
27+
},
28+
},
29+
type: "Account",
30+
},
31+
},
32+
integrationName: "integration_name",
33+
interfaceId: "interface_id",
34+
};
35+
36+
apiInstance
37+
.createAmsIntegrationAccount(params)
38+
.then((data: v2.AmsIntegrationAccountResponse) => {
39+
console.log(
40+
"API called successfully. Returned data: " + JSON.stringify(data)
41+
);
42+
})
43+
.catch((error: any) => console.error(error));
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/**
2+
* Delete integration account returns "OK: The account was successfully deleted." response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.IntegrationAccountsApi(configuration);
9+
10+
const params: v2.IntegrationAccountsApiDeleteAmsIntegrationAccountRequest = {
11+
integrationName: "integration_name",
12+
interfaceId: "interface_id",
13+
accountId: "account_id",
14+
};
15+
16+
apiInstance
17+
.deleteAmsIntegrationAccount(params)
18+
.then((data: any) => {
19+
console.log(
20+
"API called successfully. Returned data: " + JSON.stringify(data)
21+
);
22+
})
23+
.catch((error: any) => console.error(error));
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/**
2+
* Get integration account returns "OK: The account details for the specified integration." response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.IntegrationAccountsApi(configuration);
9+
10+
const params: v2.IntegrationAccountsApiGetAmsIntegrationAccountRequest = {
11+
integrationName: "integration_name",
12+
interfaceId: "interface_id",
13+
accountId: "account_id",
14+
};
15+
16+
apiInstance
17+
.getAmsIntegrationAccount(params)
18+
.then((data: v2.AmsIntegrationAccountResponse) => {
19+
console.log(
20+
"API called successfully. Returned data: " + JSON.stringify(data)
21+
);
22+
})
23+
.catch((error: any) => console.error(error));
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/**
2+
* Get account schema for an integration returns "OK: The JSON schema for the integration's account configuration."
3+
* response
4+
*/
5+
6+
import { client, v2 } from "@datadog/datadog-api-client";
7+
8+
const configuration = client.createConfiguration();
9+
const apiInstance = new v2.IntegrationAccountsApi(configuration);
10+
11+
const params: v2.IntegrationAccountsApiGetAmsIntegrationAccountSchemaRequest = {
12+
integrationName: "integration_name",
13+
interfaceId: "interface_id",
14+
};
15+
16+
apiInstance
17+
.getAmsIntegrationAccountSchema(params)
18+
.then((data: v2.AmsIntegrationAccountSchemaResponse) => {
19+
console.log(
20+
"API called successfully. Returned data: " + JSON.stringify(data)
21+
);
22+
})
23+
.catch((error: any) => console.error(error));
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/**
2+
* List integration accounts returns "OK: List of all accounts for the specified integration." response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.IntegrationAccountsApi(configuration);
9+
10+
const params: v2.IntegrationAccountsApiListAmsIntegrationAccountsRequest = {
11+
integrationName: "integration_name",
12+
interfaceId: "interface_id",
13+
};
14+
15+
apiInstance
16+
.listAmsIntegrationAccounts(params)
17+
.then((data: v2.AmsIntegrationAccountsResponse) => {
18+
console.log(
19+
"API called successfully. Returned data: " + JSON.stringify(data)
20+
);
21+
})
22+
.catch((error: any) => console.error(error));
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/**
2+
* Update integration account returns "OK: The account was successfully updated." response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.IntegrationAccountsApi(configuration);
9+
10+
const params: v2.IntegrationAccountsApiUpdateAmsIntegrationAccountRequest = {
11+
body: {
12+
data: {
13+
attributes: {
14+
name: "My Production Account (Updated)",
15+
secrets: {
16+
api_key_token: "new_secret_token_value",
17+
},
18+
settings: {
19+
ccm_enabled: "True",
20+
events: "True",
21+
messages: "False",
22+
},
23+
},
24+
type: "Account",
25+
},
26+
},
27+
integrationName: "integration_name",
28+
interfaceId: "interface_id",
29+
accountId: "account_id",
30+
};
31+
32+
apiInstance
33+
.updateAmsIntegrationAccount(params)
34+
.then((data: v2.AmsIntegrationAccountResponse) => {
35+
console.log(
36+
"API called successfully. Returned data: " + JSON.stringify(data)
37+
);
38+
})
39+
.catch((error: any) => console.error(error));

features/support/scenarios_model_mapping.ts

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11160,6 +11160,92 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
1116011160
},
1116111161
"operationResponseType": "OktaAccountResponse",
1116211162
},
11163+
"v2.ListAmsIntegrationAccounts": {
11164+
"integrationName": {
11165+
"type": "string",
11166+
"format": "",
11167+
},
11168+
"interfaceId": {
11169+
"type": "string",
11170+
"format": "",
11171+
},
11172+
"operationResponseType": "AmsIntegrationAccountsResponse",
11173+
},
11174+
"v2.CreateAmsIntegrationAccount": {
11175+
"integrationName": {
11176+
"type": "string",
11177+
"format": "",
11178+
},
11179+
"interfaceId": {
11180+
"type": "string",
11181+
"format": "",
11182+
},
11183+
"body": {
11184+
"type": "AmsIntegrationAccountCreateRequest",
11185+
"format": "",
11186+
},
11187+
"operationResponseType": "AmsIntegrationAccountResponse",
11188+
},
11189+
"v2.GetAmsIntegrationAccountSchema": {
11190+
"integrationName": {
11191+
"type": "string",
11192+
"format": "",
11193+
},
11194+
"interfaceId": {
11195+
"type": "string",
11196+
"format": "",
11197+
},
11198+
"operationResponseType": "AmsIntegrationAccountSchemaResponse",
11199+
},
11200+
"v2.GetAmsIntegrationAccount": {
11201+
"integrationName": {
11202+
"type": "string",
11203+
"format": "",
11204+
},
11205+
"interfaceId": {
11206+
"type": "string",
11207+
"format": "",
11208+
},
11209+
"accountId": {
11210+
"type": "string",
11211+
"format": "",
11212+
},
11213+
"operationResponseType": "AmsIntegrationAccountResponse",
11214+
},
11215+
"v2.DeleteAmsIntegrationAccount": {
11216+
"integrationName": {
11217+
"type": "string",
11218+
"format": "",
11219+
},
11220+
"interfaceId": {
11221+
"type": "string",
11222+
"format": "",
11223+
},
11224+
"accountId": {
11225+
"type": "string",
11226+
"format": "",
11227+
},
11228+
"operationResponseType": "{}",
11229+
},
11230+
"v2.UpdateAmsIntegrationAccount": {
11231+
"integrationName": {
11232+
"type": "string",
11233+
"format": "",
11234+
},
11235+
"interfaceId": {
11236+
"type": "string",
11237+
"format": "",
11238+
},
11239+
"accountId": {
11240+
"type": "string",
11241+
"format": "",
11242+
},
11243+
"body": {
11244+
"type": "AmsIntegrationAccountUpdateRequest",
11245+
"format": "",
11246+
},
11247+
"operationResponseType": "AmsIntegrationAccountResponse",
11248+
},
1116311249
"v2.GetIPAllowlist": {
1116411250
"operationResponseType": "IPAllowlistResponse",
1116511251
},

features/v2/given.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -834,6 +834,26 @@
834834
"tag": "Okta Integration",
835835
"operationId": "CreateOktaAccount"
836836
},
837+
{
838+
"parameters": [
839+
{
840+
"name": "integration_name",
841+
"value": "\"twilio\""
842+
},
843+
{
844+
"name": "interface_id",
845+
"value": "\"twilio.messaging\""
846+
},
847+
{
848+
"name": "body",
849+
"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}"
850+
}
851+
],
852+
"step": "there is a valid \"web_integration_account\" in the system",
853+
"key": "web_integration_account",
854+
"tag": "Integration Accounts",
855+
"operationId": "CreateAmsIntegrationAccount"
856+
},
837857
{
838858
"parameters": [
839859
{

0 commit comments

Comments
 (0)