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.

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

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::IntegrationAccountsAPI.new

body = DatadogAPIClient::V2::AmsIntegrationAccountCreateRequest.new({
data: DatadogAPIClient::V2::AmsIntegrationAccountCreateRequestData.new({
attributes: DatadogAPIClient::V2::AmsIntegrationAccountCreateRequestAttributes.new({
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: DatadogAPIClient::V2::AmsIntegrationAccountType::ACCOUNT,
}),
})
p api_instance.create_ams_integration_account("integration_name", "interface_id", body)
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Delete integration account returns "OK: The account was successfully deleted." response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::IntegrationAccountsAPI.new
p api_instance.delete_ams_integration_account("integration_name", "interface_id", "account_id")
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Get integration account returns "OK: The account details for the specified integration." response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::IntegrationAccountsAPI.new
p api_instance.get_ams_integration_account("integration_name", "interface_id", "account_id")
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Get account schema for an integration returns "OK: The JSON schema for the integration's account configuration."
# response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::IntegrationAccountsAPI.new
p api_instance.get_ams_integration_account_schema("integration_name", "interface_id")
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# List integration accounts returns "OK: List of all accounts for the specified integration." response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::IntegrationAccountsAPI.new
p api_instance.list_ams_integration_accounts("integration_name", "interface_id")
20 changes: 20 additions & 0 deletions examples/v2/integration-accounts/UpdateAmsIntegrationAccount.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Update integration account returns "OK: The account was successfully updated." response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::IntegrationAccountsAPI.new

body = DatadogAPIClient::V2::AmsIntegrationAccountUpdateRequest.new({
data: DatadogAPIClient::V2::AmsIntegrationAccountUpdateRequestData.new({
attributes: DatadogAPIClient::V2::AmsIntegrationAccountUpdateRequestAttributes.new({
name: "My Production Account (Updated)",
secrets: {
"api_key_token": "new_secret_token_value",
},
settings: {
"ccm_enabled": "True", "events": "True", "messages": "False",
},
}),
type: DatadogAPIClient::V2::AmsIntegrationAccountType::ACCOUNT,
}),
})
p api_instance.update_ams_integration_account("integration_name", "interface_id", "account_id", body)
29 changes: 29 additions & 0 deletions features/scenarios_model_mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3950,6 +3950,35 @@
"account_id" => "String",
"body" => "OktaAccountUpdateRequest",
},
"v2.ListAmsIntegrationAccounts" => {
"integration_name" => "String",
"interface_id" => "String",
},
"v2.CreateAmsIntegrationAccount" => {
"integration_name" => "String",
"interface_id" => "String",
"body" => "AmsIntegrationAccountCreateRequest",
},
"v2.GetAmsIntegrationAccountSchema" => {
"integration_name" => "String",
"interface_id" => "String",
},
"v2.DeleteAmsIntegrationAccount" => {
"integration_name" => "String",
"interface_id" => "String",
"account_id" => "String",
},
"v2.GetAmsIntegrationAccount" => {
"integration_name" => "String",
"interface_id" => "String",
"account_id" => "String",
},
"v2.UpdateAmsIntegrationAccount" => {
"integration_name" => "String",
"interface_id" => "String",
"account_id" => "String",
"body" => "AmsIntegrationAccountUpdateRequest",
},
"v2.UpdateIPAllowlist" => {
"body" => "IPAllowlistUpdateRequest",
},
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
199 changes: 199 additions & 0 deletions features/v2/integration_accounts.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,199 @@
@endpoint(integration-accounts) @endpoint(integration-accounts-v2)
Feature: Integration Accounts
Configure and manage third-party integrations with Datadog. This API
provides a unified interface for managing integration accounts across
various external services. Each integration has its own unique schema
that defines the required settings and secrets. Before creating or
updating an account, use the schema endpoint to retrieve the specific
requirements, field types, validation rules, and available configuration
options for your integration. **Note**: This API manages integration
account configurations only. It does not support Grace Resources,
Reference Tables, or Custom Queries CRUD operations. For those features,
refer to each integration's dedicated documentation. Supported
Integrations: -
[Twilio](https://docs.datadoghq.com/integrations/twilio/) -
[Snowflake](https://docs.datadoghq.com/integrations/snowflake-web/) -
[Databricks](https://docs.datadoghq.com/integrations/databricks/)

Background:
Given a valid "apiKeyAuth" key in the system
And a valid "appKeyAuth" key in the system
And an instance of "IntegrationAccounts" API

@generated @skip @team:DataDog/saas-integrations
Scenario: Create integration account returns "Bad Request: The request body is malformed or the integration name format is invalid." response
Given new "CreateAmsIntegrationAccount" request
And request contains "integration_name" parameter from "REPLACE.ME"
And request contains "interface_id" parameter from "REPLACE.ME"
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"}}
When the request is sent
Then the response status is 400 Bad Request: The request body is malformed or the integration name format is invalid.

@generated @skip @team:DataDog/saas-integrations
Scenario: Create integration account returns "Created: The account was successfully created." response
Given new "CreateAmsIntegrationAccount" request
And request contains "integration_name" parameter from "REPLACE.ME"
And request contains "interface_id" parameter from "REPLACE.ME"
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"}}
When the request is sent
Then the response status is 201 Created: The account was successfully created.

@generated @skip @team:DataDog/saas-integrations
Scenario: Create integration account returns "Not Found: The integration does not exist." response
Given new "CreateAmsIntegrationAccount" request
And request contains "integration_name" parameter from "REPLACE.ME"
And request contains "interface_id" parameter from "REPLACE.ME"
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"}}
When the request is sent
Then the response status is 404 Not Found: The integration does not exist.

@generated @skip @team:DataDog/saas-integrations
Scenario: Create integration account returns "Unprocessable Entity: The account configuration does not match the integration schema." response
Given new "CreateAmsIntegrationAccount" request
And request contains "integration_name" parameter from "REPLACE.ME"
And request contains "interface_id" parameter from "REPLACE.ME"
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"}}
When the request is sent
Then the response status is 422 Unprocessable Entity: The account configuration does not match the integration schema.

@generated @skip @team:DataDog/saas-integrations
Scenario: Delete integration account returns "Bad Request: The integration name or account ID format is invalid." response
Given new "DeleteAmsIntegrationAccount" request
And request contains "integration_name" parameter from "REPLACE.ME"
And request contains "interface_id" parameter from "REPLACE.ME"
And request contains "account_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request: The integration name or account ID format is invalid.

@generated @skip @team:DataDog/saas-integrations
Scenario: Delete integration account returns "Not Found: The integration or account does not exist." response
Given new "DeleteAmsIntegrationAccount" request
And request contains "integration_name" parameter from "REPLACE.ME"
And request contains "interface_id" parameter from "REPLACE.ME"
And request contains "account_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found: The integration or account does not exist.

@generated @skip @team:DataDog/saas-integrations
Scenario: Delete integration account returns "OK: The account was successfully deleted." response
Given new "DeleteAmsIntegrationAccount" request
And request contains "integration_name" parameter from "REPLACE.ME"
And request contains "interface_id" parameter from "REPLACE.ME"
And request contains "account_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK: The account was successfully deleted.

@generated @skip @team:DataDog/saas-integrations
Scenario: Get account schema for an integration returns "Bad Request: The integration name format is invalid." response
Given new "GetAmsIntegrationAccountSchema" request
And request contains "integration_name" parameter from "REPLACE.ME"
And request contains "interface_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request: The integration name format is invalid.

@generated @skip @team:DataDog/saas-integrations
Scenario: Get account schema for an integration returns "Not Found: The integration does not exist or has no schema available." response
Given new "GetAmsIntegrationAccountSchema" request
And request contains "integration_name" parameter from "REPLACE.ME"
And request contains "interface_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found: The integration does not exist or has no schema available.

@generated @skip @team:DataDog/saas-integrations
Scenario: Get account schema for an integration returns "OK: The JSON schema for the integration's account configuration." response
Given new "GetAmsIntegrationAccountSchema" request
And request contains "integration_name" parameter from "REPLACE.ME"
And request contains "interface_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK: The JSON schema for the integration's account configuration.

@generated @skip @team:DataDog/saas-integrations
Scenario: Get integration account returns "Bad Request: The integration name or account ID format is invalid." response
Given new "GetAmsIntegrationAccount" request
And request contains "integration_name" parameter from "REPLACE.ME"
And request contains "interface_id" parameter from "REPLACE.ME"
And request contains "account_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request: The integration name or account ID format is invalid.

@generated @skip @team:DataDog/saas-integrations
Scenario: Get integration account returns "Not Found: The integration or account does not exist." response
Given new "GetAmsIntegrationAccount" request
And request contains "integration_name" parameter from "REPLACE.ME"
And request contains "interface_id" parameter from "REPLACE.ME"
And request contains "account_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found: The integration or account does not exist.

@generated @skip @team:DataDog/saas-integrations
Scenario: Get integration account returns "OK: The account details for the specified integration." response
Given new "GetAmsIntegrationAccount" request
And request contains "integration_name" parameter from "REPLACE.ME"
And request contains "interface_id" parameter from "REPLACE.ME"
And request contains "account_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK: The account details for the specified integration.

@generated @skip @team:DataDog/saas-integrations
Scenario: List integration accounts returns "Bad Request: The integration name format is invalid." response
Given new "ListAmsIntegrationAccounts" request
And request contains "integration_name" parameter from "REPLACE.ME"
And request contains "interface_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request: The integration name format is invalid.

@generated @skip @team:DataDog/saas-integrations
Scenario: List integration accounts returns "Not Found: The integration does not exist." response
Given new "ListAmsIntegrationAccounts" request
And request contains "integration_name" parameter from "REPLACE.ME"
And request contains "interface_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found: The integration does not exist.

@generated @skip @team:DataDog/saas-integrations
Scenario: List integration accounts returns "OK: List of all accounts for the specified integration." response
Given new "ListAmsIntegrationAccounts" request
And request contains "integration_name" parameter from "REPLACE.ME"
And request contains "interface_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK: List of all accounts for the specified integration.

@generated @skip @team:DataDog/saas-integrations
Scenario: Update integration account returns "Bad Request: The request body is malformed or the integration name/account ID format is invalid." response
Given new "UpdateAmsIntegrationAccount" request
And request contains "integration_name" parameter from "REPLACE.ME"
And request contains "interface_id" parameter from "REPLACE.ME"
And request contains "account_id" parameter from "REPLACE.ME"
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"}}
When the request is sent
Then the response status is 400 Bad Request: The request body is malformed or the integration name/account ID format is invalid.

@generated @skip @team:DataDog/saas-integrations
Scenario: Update integration account returns "Not Found: The integration or account does not exist." response
Given new "UpdateAmsIntegrationAccount" request
And request contains "integration_name" parameter from "REPLACE.ME"
And request contains "interface_id" parameter from "REPLACE.ME"
And request contains "account_id" parameter from "REPLACE.ME"
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"}}
When the request is sent
Then the response status is 404 Not Found: The integration or account does not exist.

@generated @skip @team:DataDog/saas-integrations
Scenario: Update integration account returns "OK: The account was successfully updated." response
Given new "UpdateAmsIntegrationAccount" request
And request contains "integration_name" parameter from "REPLACE.ME"
And request contains "interface_id" parameter from "REPLACE.ME"
And request contains "account_id" parameter from "REPLACE.ME"
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"}}
When the request is sent
Then the response status is 200 OK: The account was successfully updated.

@generated @skip @team:DataDog/saas-integrations
Scenario: Update integration account returns "Unprocessable Entity: The account configuration does not match the integration schema." response
Given new "UpdateAmsIntegrationAccount" request
And request contains "integration_name" parameter from "REPLACE.ME"
And request contains "interface_id" parameter from "REPLACE.ME"
And request contains "account_id" parameter from "REPLACE.ME"
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"}}
When the request is sent
Then the response status is 422 Unprocessable Entity: The account configuration does not match the integration schema.
Loading
Loading