Skip to content

Commit 57faf9e

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 99d9905 of spec repo
1 parent 6f031eb commit 57faf9e

30 files changed

Lines changed: 3673 additions & 0 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 1140 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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+
};
34+
35+
apiInstance
36+
.createAmsIntegrationAccount(params)
37+
.then((data: v2.AmsIntegrationAccountResponse) => {
38+
console.log(
39+
"API called successfully. Returned data: " + JSON.stringify(data)
40+
);
41+
})
42+
.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+
* 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+
accountId: "account_id",
13+
};
14+
15+
apiInstance
16+
.deleteAmsIntegrationAccount(params)
17+
.then((data: any) => {
18+
console.log(
19+
"API called successfully. Returned data: " + JSON.stringify(data)
20+
);
21+
})
22+
.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+
* 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+
accountId: "account_id",
13+
};
14+
15+
apiInstance
16+
.getAmsIntegrationAccount(params)
17+
.then((data: v2.AmsIntegrationAccountResponse) => {
18+
console.log(
19+
"API called successfully. Returned data: " + JSON.stringify(data)
20+
);
21+
})
22+
.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+
* 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+
};
14+
15+
apiInstance
16+
.getAmsIntegrationAccountSchema(params)
17+
.then((data: v2.AmsIntegrationAccountSchemaResponse) => {
18+
console.log(
19+
"API called successfully. Returned data: " + JSON.stringify(data)
20+
);
21+
})
22+
.catch((error: any) => console.error(error));
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
};
13+
14+
apiInstance
15+
.listAmsIntegrationAccounts(params)
16+
.then((data: v2.AmsIntegrationAccountsResponse) => {
17+
console.log(
18+
"API called successfully. Returned data: " + JSON.stringify(data)
19+
);
20+
})
21+
.catch((error: any) => console.error(error));
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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+
accountId: "account_id",
29+
};
30+
31+
apiInstance
32+
.updateAmsIntegrationAccount(params)
33+
.then((data: v2.AmsIntegrationAccountResponse) => {
34+
console.log(
35+
"API called successfully. Returned data: " + JSON.stringify(data)
36+
);
37+
})
38+
.catch((error: any) => console.error(error));

features/support/scenarios_model_mapping.ts

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11160,6 +11160,68 @@ 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+
"operationResponseType": "AmsIntegrationAccountsResponse",
11169+
},
11170+
"v2.CreateAmsIntegrationAccount": {
11171+
"integrationName": {
11172+
"type": "string",
11173+
"format": "",
11174+
},
11175+
"body": {
11176+
"type": "AmsIntegrationAccountCreateRequest",
11177+
"format": "",
11178+
},
11179+
"operationResponseType": "AmsIntegrationAccountResponse",
11180+
},
11181+
"v2.GetAmsIntegrationAccountSchema": {
11182+
"integrationName": {
11183+
"type": "string",
11184+
"format": "",
11185+
},
11186+
"operationResponseType": "AmsIntegrationAccountSchemaResponse",
11187+
},
11188+
"v2.GetAmsIntegrationAccount": {
11189+
"integrationName": {
11190+
"type": "string",
11191+
"format": "",
11192+
},
11193+
"accountId": {
11194+
"type": "string",
11195+
"format": "",
11196+
},
11197+
"operationResponseType": "AmsIntegrationAccountResponse",
11198+
},
11199+
"v2.DeleteAmsIntegrationAccount": {
11200+
"integrationName": {
11201+
"type": "string",
11202+
"format": "",
11203+
},
11204+
"accountId": {
11205+
"type": "string",
11206+
"format": "",
11207+
},
11208+
"operationResponseType": "{}",
11209+
},
11210+
"v2.UpdateAmsIntegrationAccount": {
11211+
"integrationName": {
11212+
"type": "string",
11213+
"format": "",
11214+
},
11215+
"accountId": {
11216+
"type": "string",
11217+
"format": "",
11218+
},
11219+
"body": {
11220+
"type": "AmsIntegrationAccountUpdateRequest",
11221+
"format": "",
11222+
},
11223+
"operationResponseType": "AmsIntegrationAccountResponse",
11224+
},
1116311225
"v2.GetIPAllowlist": {
1116411226
"operationResponseType": "IPAllowlistResponse",
1116511227
},

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
{

0 commit comments

Comments
 (0)