Skip to content
Open
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
1,182 changes: 1,182 additions & 0 deletions .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

43 changes: 43 additions & 0 deletions examples/v2/integration-accounts/CreateAmsIntegrationAccount.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/**
* Create integration account returns "Created: The account was successfully created." response
*/

import { client, v2 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v2.IntegrationAccountsApi(configuration);

const params: v2.IntegrationAccountsApiCreateAmsIntegrationAccountRequest = {
body: {
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",
},
},
integrationName: "integration_name",
interfaceId: "interface_id",
};

apiInstance
.createAmsIntegrationAccount(params)
.then((data: v2.AmsIntegrationAccountResponse) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
})
.catch((error: any) => console.error(error));
23 changes: 23 additions & 0 deletions examples/v2/integration-accounts/DeleteAmsIntegrationAccount.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* Delete integration account returns "OK: The account was successfully deleted." response
*/

import { client, v2 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v2.IntegrationAccountsApi(configuration);

const params: v2.IntegrationAccountsApiDeleteAmsIntegrationAccountRequest = {
integrationName: "integration_name",
interfaceId: "interface_id",
accountId: "account_id",
};

apiInstance
.deleteAmsIntegrationAccount(params)
.then((data: any) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
})
.catch((error: any) => console.error(error));
23 changes: 23 additions & 0 deletions examples/v2/integration-accounts/GetAmsIntegrationAccount.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* Get integration account returns "OK: The account details for the specified integration." response
*/

import { client, v2 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v2.IntegrationAccountsApi(configuration);

const params: v2.IntegrationAccountsApiGetAmsIntegrationAccountRequest = {
integrationName: "integration_name",
interfaceId: "interface_id",
accountId: "account_id",
};

apiInstance
.getAmsIntegrationAccount(params)
.then((data: v2.AmsIntegrationAccountResponse) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
})
.catch((error: any) => console.error(error));
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* Get account schema for an integration returns "OK: The JSON schema for the integration's account configuration."
* response
*/

import { client, v2 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v2.IntegrationAccountsApi(configuration);

const params: v2.IntegrationAccountsApiGetAmsIntegrationAccountSchemaRequest = {
integrationName: "integration_name",
interfaceId: "interface_id",
};

apiInstance
.getAmsIntegrationAccountSchema(params)
.then((data: v2.AmsIntegrationAccountSchemaResponse) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
})
.catch((error: any) => console.error(error));
22 changes: 22 additions & 0 deletions examples/v2/integration-accounts/ListAmsIntegrationAccounts.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/**
* List integration accounts returns "OK: List of all accounts for the specified integration." response
*/

import { client, v2 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v2.IntegrationAccountsApi(configuration);

const params: v2.IntegrationAccountsApiListAmsIntegrationAccountsRequest = {
integrationName: "integration_name",
interfaceId: "interface_id",
};

apiInstance
.listAmsIntegrationAccounts(params)
.then((data: v2.AmsIntegrationAccountsResponse) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
})
.catch((error: any) => console.error(error));
39 changes: 39 additions & 0 deletions examples/v2/integration-accounts/UpdateAmsIntegrationAccount.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/**
* Update integration account returns "OK: The account was successfully updated." response
*/

import { client, v2 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v2.IntegrationAccountsApi(configuration);

const params: v2.IntegrationAccountsApiUpdateAmsIntegrationAccountRequest = {
body: {
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",
},
},
integrationName: "integration_name",
interfaceId: "interface_id",
accountId: "account_id",
};

apiInstance
.updateAmsIntegrationAccount(params)
.then((data: v2.AmsIntegrationAccountResponse) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
})
.catch((error: any) => console.error(error));
86 changes: 86 additions & 0 deletions features/support/scenarios_model_mapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11160,6 +11160,92 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
},
"operationResponseType": "OktaAccountResponse",
},
"v2.ListAmsIntegrationAccounts": {
"integrationName": {
"type": "string",
"format": "",
},
"interfaceId": {
"type": "string",
"format": "",
},
"operationResponseType": "AmsIntegrationAccountsResponse",
},
"v2.CreateAmsIntegrationAccount": {
"integrationName": {
"type": "string",
"format": "",
},
"interfaceId": {
"type": "string",
"format": "",
},
"body": {
"type": "AmsIntegrationAccountCreateRequest",
"format": "",
},
"operationResponseType": "AmsIntegrationAccountResponse",
},
"v2.GetAmsIntegrationAccountSchema": {
"integrationName": {
"type": "string",
"format": "",
},
"interfaceId": {
"type": "string",
"format": "",
},
"operationResponseType": "AmsIntegrationAccountSchemaResponse",
},
"v2.GetAmsIntegrationAccount": {
"integrationName": {
"type": "string",
"format": "",
},
"interfaceId": {
"type": "string",
"format": "",
},
"accountId": {
"type": "string",
"format": "",
},
"operationResponseType": "AmsIntegrationAccountResponse",
},
"v2.DeleteAmsIntegrationAccount": {
"integrationName": {
"type": "string",
"format": "",
},
"interfaceId": {
"type": "string",
"format": "",
},
"accountId": {
"type": "string",
"format": "",
},
"operationResponseType": "{}",
},
"v2.UpdateAmsIntegrationAccount": {
"integrationName": {
"type": "string",
"format": "",
},
"interfaceId": {
"type": "string",
"format": "",
},
"accountId": {
"type": "string",
"format": "",
},
"body": {
"type": "AmsIntegrationAccountUpdateRequest",
"format": "",
},
"operationResponseType": "AmsIntegrationAccountResponse",
},
"v2.GetIPAllowlist": {
"operationResponseType": "IPAllowlistResponse",
},
Expand Down
20 changes: 20 additions & 0 deletions features/v2/given.json
Original file line number Diff line number Diff line change
Expand Up @@ -834,6 +834,26 @@
"tag": "Okta Integration",
"operationId": "CreateOktaAccount"
},
{
"parameters": [
{
"name": "integration_name",
"value": "\"twilio\""
},
{
"name": "interface_id",
"value": "\"twilio.messaging\""
},
{
"name": "body",
"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}"
}
],
"step": "there is a valid \"web_integration_account\" in the system",
"key": "web_integration_account",
"tag": "Integration Accounts",
"operationId": "CreateAmsIntegrationAccount"
},
{
"parameters": [
{
Expand Down
Loading
Loading