Create a new Action Connection

POST https://api.ap1.datadoghq.com/api/v2/actions/connectionshttps://api.ap2.datadoghq.com/api/v2/actions/connectionshttps://api.datadoghq.eu/api/v2/actions/connectionshttps://api.ddog-gov.com/api/v2/actions/connectionshttps://api.us2.ddog-gov.com/api/v2/actions/connectionshttps://api.datadoghq.com/api/v2/actions/connectionshttps://api.us3.datadoghq.com/api/v2/actions/connectionshttps://api.us5.datadoghq.com/api/v2/actions/connections

Overview

Create a new Action Connection. This API requires a registered application key.

Request

Body Data (required)

Expand All

Field

Type

Description

data [required]

object

Data related to the connection.

attributes [required]

object

The definition of ActionConnectionAttributes object.

integration [required]

 <oneOf>

The definition of ActionConnectionIntegration object.

Option 1

object

The definition of AWSIntegration object.

credentials [required]

 <oneOf>

The definition of AWSCredentials object.

Option 1

object

The definition of AWSAssumeRole object.

account_id [required]

string

AWS account the connection is created for

external_id

string

External ID used to scope which connection can be used to assume the role

principal_id

string

AWS account that will assume the role

role [required]

string

Role to assume

type [required]

enum

The definition of AWSAssumeRoleType object. Allowed enum values: AWSAssumeRole

type [required]

enum

The definition of AWSIntegrationType object. Allowed enum values: AWS

Option 2

object

The definition of the AnthropicIntegration object.

credentials [required]

 <oneOf>

The definition of the AnthropicCredentials object.

Option 1

object

The definition of the AnthropicAPIKey object.

api_token [required]

string

The AnthropicAPIKey api_token.

type [required]

enum

The definition of the AnthropicAPIKey object. Allowed enum values: AnthropicAPIKey

type [required]

enum

The definition of the AnthropicIntegrationType object. Allowed enum values: Anthropic

Option 3

object

The definition of the AsanaIntegration object.

credentials [required]

 <oneOf>

The definition of the AsanaCredentials object.

Option 1

object

The definition of the AsanaAccessToken object.

access_token [required]

string

The AsanaAccessToken access_token.

type [required]

enum

The definition of the AsanaAccessToken object. Allowed enum values: AsanaAccessToken

type [required]

enum

The definition of the AsanaIntegrationType object. Allowed enum values: Asana

Option 4

object

The definition of the AzureIntegration object.

credentials [required]

 <oneOf>

The definition of the AzureCredentials object.

Option 1

object

The definition of the AzureTenant object.

app_client_id [required]

string

The Client ID, also known as the Application ID in Azure, is a unique identifier for an application. It's used to identify the application during the authentication process. Your Application (client) ID is listed in the application's overview page. You can navigate to your application via the Azure Directory.

client_secret [required]

string

The Client Secret is a confidential piece of information known only to the application and Azure AD. It's used to prove the application's identity. Your Client Secret is available from the application’s secrets page. You can navigate to your application via the Azure Directory.

custom_scopes

string

If provided, the custom scope to be requested from Microsoft when acquiring an OAuth 2 access token. This custom scope is used only in conjunction with the HTTP action. A resource's scope is constructed by using the identifier URI for the resource and .default, separated by a forward slash (/) as follows:{identifierURI}/.default.

tenant_id [required]

string

The Tenant ID, also known as the Directory ID in Azure, is a unique identifier that represents an Azure AD instance. Your Tenant ID (Directory ID) is listed in your Active Directory overview page under the 'Tenant information' section.

type [required]

enum

The definition of the AzureTenant object. Allowed enum values: AzureTenant

type [required]

enum

The definition of the AzureIntegrationType object. Allowed enum values: Azure

Option 5

object

The definition of the CircleCIIntegration object.

credentials [required]

 <oneOf>

The definition of the CircleCICredentials object.

Option 1

object

The definition of the CircleCIAPIKey object.

api_token [required]

string

The CircleCIAPIKey api_token.

type [required]

enum

The definition of the CircleCIAPIKey object. Allowed enum values: CircleCIAPIKey

type [required]

enum

The definition of the CircleCIIntegrationType object. Allowed enum values: CircleCI

Option 6

object

The definition of the ClickupIntegration object.

credentials [required]

 <oneOf>

The definition of the ClickupCredentials object.

Option 1

object

The definition of the ClickupAPIKey object.

api_token [required]

string

The ClickupAPIKey api_token.

type [required]

enum

The definition of the ClickupAPIKey object. Allowed enum values: ClickupAPIKey

type [required]

enum

The definition of the ClickupIntegrationType object. Allowed enum values: Clickup

Option 7

object

The definition of the CloudflareIntegration object.

credentials [required]

 <oneOf>

The definition of the CloudflareCredentials object.

Option 1

object

The definition of the CloudflareAPIToken object.

api_token [required]

string

The CloudflareAPIToken api_token.

type [required]

enum

The definition of the CloudflareAPIToken object. Allowed enum values: CloudflareAPIToken

Option 2

object

The definition of the CloudflareGlobalAPIToken object.

auth_email [required]

string

The CloudflareGlobalAPIToken auth_email.

global_api_key [required]

string

The CloudflareGlobalAPIToken global_api_key.

type [required]

enum

The definition of the CloudflareGlobalAPIToken object. Allowed enum values: CloudflareGlobalAPIToken

type [required]

enum

The definition of the CloudflareIntegrationType object. Allowed enum values: Cloudflare

Option 8

object

The definition of the ConfigCatIntegration object.

credentials [required]

 <oneOf>

The definition of the ConfigCatCredentials object.

Option 1

object

The definition of the ConfigCatSDKKey object.

api_password [required]

string

The ConfigCatSDKKey api_password.

api_username [required]

string

The ConfigCatSDKKey api_username.

sdk_key [required]

string

The ConfigCatSDKKey sdk_key.

type [required]

enum

The definition of the ConfigCatSDKKey object. Allowed enum values: ConfigCatSDKKey

type [required]

enum

The definition of the ConfigCatIntegrationType object. Allowed enum values: ConfigCat

Option 9

object

The definition of the DatadogIntegration object.

credentials [required]

 <oneOf>

The definition of the DatadogCredentials object.

Option 1

object

The definition of the DatadogAPIKey object.

api_key [required]

string

The DatadogAPIKey api_key.

app_key [required]

string

The DatadogAPIKey app_key.

datacenter [required]

string

The DatadogAPIKey datacenter.

subdomain

string

Custom subdomain used for Datadog URLs generated with this Connection. For example, if this org uses https://acme.datadoghq.com to access Datadog, set this field to acme. If this field is omitted, generated URLs will use the default site URL for its datacenter (see https://docs.datadoghq.com/getting_started/site).

type [required]

enum

The definition of the DatadogAPIKey object. Allowed enum values: DatadogAPIKey

type [required]

enum

The definition of the DatadogIntegrationType object. Allowed enum values: Datadog

Option 10

object

The definition of the FastlyIntegration object.

credentials [required]

 <oneOf>

The definition of the FastlyCredentials object.

Option 1

object

The definition of the FastlyAPIKey object.

api_key [required]

string

The FastlyAPIKey api_key.

type [required]

enum

The definition of the FastlyAPIKey object. Allowed enum values: FastlyAPIKey

type [required]

enum

The definition of the FastlyIntegrationType object. Allowed enum values: Fastly

Option 11

object

The definition of the FreshserviceIntegration object.

credentials [required]

 <oneOf>

The definition of the FreshserviceCredentials object.

Option 1

object

The definition of the FreshserviceAPIKey object.

api_key [required]

string

The FreshserviceAPIKey api_key.

domain [required]

string

The FreshserviceAPIKey domain.

type [required]

enum

The definition of the FreshserviceAPIKey object. Allowed enum values: FreshserviceAPIKey

type [required]

enum

The definition of the FreshserviceIntegrationType object. Allowed enum values: Freshservice

Option 12

object

The definition of the GCPIntegration object.

credentials [required]

 <oneOf>

The definition of the GCPCredentials object.

Option 1

object

The definition of the GCPServiceAccount object.

private_key [required]

string

The GCPServiceAccount private_key.

service_account_email [required]

string

The GCPServiceAccount service_account_email.

type [required]

enum

The definition of the GCPServiceAccount object. Allowed enum values: GCPServiceAccount

type [required]

enum

The definition of the GCPIntegrationType object. Allowed enum values: GCP

Option 13

object

The definition of the GeminiIntegration object.

credentials [required]

 <oneOf>

The definition of the GeminiCredentials object.

Option 1

object

The definition of the GeminiAPIKey object.

api_key [required]

string

The GeminiAPIKey api_key.

type [required]

enum

The definition of the GeminiAPIKey object. Allowed enum values: GeminiAPIKey

type [required]

enum

The definition of the GeminiIntegrationType object. Allowed enum values: Gemini

Option 14

object

The definition of the GitlabIntegration object.

credentials [required]

 <oneOf>

The definition of the GitlabCredentials object.

Option 1

object

The definition of the GitlabAPIKey object.

api_token [required]

string

The GitlabAPIKey api_token.

type [required]

enum

The definition of the GitlabAPIKey object. Allowed enum values: GitlabAPIKey

type [required]

enum

The definition of the GitlabIntegrationType object. Allowed enum values: Gitlab

Option 15

object

The definition of the GreyNoiseIntegration object.

credentials [required]

 <oneOf>

The definition of the GreyNoiseCredentials object.

Option 1

object

The definition of the GreyNoiseAPIKey object.

api_key [required]

string

The GreyNoiseAPIKey api_key.

type [required]

enum

The definition of the GreyNoiseAPIKey object. Allowed enum values: GreyNoiseAPIKey

type [required]

enum

The definition of the GreyNoiseIntegrationType object. Allowed enum values: GreyNoise

Option 16

object

The definition of HTTPIntegration object.

base_url [required]

string

Base HTTP url for the integration

credentials [required]

 <oneOf>

The definition of HTTPCredentials object.

Option 1

object

The definition of HTTPTokenAuth object.

body

object

The definition of HTTPBody object.

content

string

Serialized body content

content_type

string

Content type of the body

headers

[object]

The HTTPTokenAuth headers.

name [required]

string

The HTTPHeader name.

value [required]

string

The HTTPHeader value.

tokens

[object]

The HTTPTokenAuth tokens.

name [required]

string

The HTTPToken name.

type [required]

enum

The definition of TokenType object. Allowed enum values: SECRET

value [required]

string

The HTTPToken value.

type [required]

enum

The definition of HTTPTokenAuthType object. Allowed enum values: HTTPTokenAuth

url_parameters

[object]

The HTTPTokenAuth url_parameters.

name [required]

string

Name for tokens.

value [required]

string

The UrlParam value.

type [required]

enum

The definition of HTTPIntegrationType object. Allowed enum values: HTTP

Option 17

object

The definition of the LaunchDarklyIntegration object.

credentials [required]

 <oneOf>

The definition of the LaunchDarklyCredentials object.

Option 1

object

The definition of the LaunchDarklyAPIKey object.

api_token [required]

string

The LaunchDarklyAPIKey api_token.

type [required]

enum

The definition of the LaunchDarklyAPIKey object. Allowed enum values: LaunchDarklyAPIKey

type [required]

enum

The definition of the LaunchDarklyIntegrationType object. Allowed enum values: LaunchDarkly

Option 18

object

The definition of the NotionIntegration object.

credentials [required]

 <oneOf>

The definition of the NotionCredentials object.

Option 1

object

The definition of the NotionAPIKey object.

api_token [required]

string

The NotionAPIKey api_token.

type [required]

enum

The definition of the NotionAPIKey object. Allowed enum values: NotionAPIKey

type [required]

enum

The definition of the NotionIntegrationType object. Allowed enum values: Notion

Option 19

object

The definition of the OktaIntegration object.

credentials [required]

 <oneOf>

The definition of the OktaCredentials object.

Option 1

object

The definition of the OktaAPIToken object.

api_token [required]

string

The OktaAPIToken api_token.

domain [required]

string

The OktaAPIToken domain.

type [required]

enum

The definition of the OktaAPIToken object. Allowed enum values: OktaAPIToken

type [required]

enum

The definition of the OktaIntegrationType object. Allowed enum values: Okta

Option 20

object

The definition of the OpenAIIntegration object.

credentials [required]

 <oneOf>

The definition of the OpenAICredentials object.

Option 1

object

The definition of the OpenAIAPIKey object.

api_token [required]

string

The OpenAIAPIKey api_token.

type [required]

enum

The definition of the OpenAIAPIKey object. Allowed enum values: OpenAIAPIKey

type [required]

enum

The definition of the OpenAIIntegrationType object. Allowed enum values: OpenAI

Option 21

object

The definition of the ServiceNowIntegration object.

credentials [required]

 <oneOf>

The definition of the ServiceNowCredentials object.

Option 1

object

The definition of the ServiceNowBasicAuth object.

instance [required]

string

The ServiceNowBasicAuth instance.

password [required]

string

The ServiceNowBasicAuth password.

type [required]

enum

The definition of the ServiceNowBasicAuth object. Allowed enum values: ServiceNowBasicAuth

username [required]

string

The ServiceNowBasicAuth username.

type [required]

enum

The definition of the ServiceNowIntegrationType object. Allowed enum values: ServiceNow

Option 22

object

The definition of the SplitIntegration object.

credentials [required]

 <oneOf>

The definition of the SplitCredentials object.

Option 1

object

The definition of the SplitAPIKey object.

api_key [required]

string

The SplitAPIKey api_key.

type [required]

enum

The definition of the SplitAPIKey object. Allowed enum values: SplitAPIKey

type [required]

enum

The definition of the SplitIntegrationType object. Allowed enum values: Split

Option 23

object

The definition of the StatsigIntegration object.

credentials [required]

 <oneOf>

The definition of the StatsigCredentials object.

Option 1

object

The definition of the StatsigAPIKey object.

api_key [required]

string

The StatsigAPIKey api_key.

type [required]

enum

The definition of the StatsigAPIKey object. Allowed enum values: StatsigAPIKey

type [required]

enum

The definition of the StatsigIntegrationType object. Allowed enum values: Statsig

Option 24

object

The definition of the VirusTotalIntegration object.

credentials [required]

 <oneOf>

The definition of the VirusTotalCredentials object.

Option 1

object

The definition of the VirusTotalAPIKey object.

api_key [required]

string

The VirusTotalAPIKey api_key.

type [required]

enum

The definition of the VirusTotalAPIKey object. Allowed enum values: VirusTotalAPIKey

type [required]

enum

The definition of the VirusTotalIntegrationType object. Allowed enum values: VirusTotal

name [required]

string

Name of the connection

id

string

The connection identifier

type [required]

enum

The definition of ActionConnectionDataType object. Allowed enum values: action_connection

{
  "data": {
    "type": "action_connection",
    "attributes": {
      "name": "Cassette Connection exampleactionconnection",
      "integration": {
        "type": "AWS",
        "credentials": {
          "type": "AWSAssumeRole",
          "role": "MyRoleUpdated",
          "account_id": "123456789123"
        }
      }
    }
  }
}

Response

Successfully created Action Connection

The response for a created connection

Expand All

Field

Type

Description

data

object

Data related to the connection.

attributes [required]

object

The definition of ActionConnectionAttributes object.

integration [required]

 <oneOf>

The definition of ActionConnectionIntegration object.

Option 1

object

The definition of AWSIntegration object.

credentials [required]

 <oneOf>

The definition of AWSCredentials object.

Option 1

object

The definition of AWSAssumeRole object.

account_id [required]

string

AWS account the connection is created for

external_id

string

External ID used to scope which connection can be used to assume the role

principal_id

string

AWS account that will assume the role

role [required]

string

Role to assume

type [required]

enum

The definition of AWSAssumeRoleType object. Allowed enum values: AWSAssumeRole

type [required]

enum

The definition of AWSIntegrationType object. Allowed enum values: AWS

Option 2

object

The definition of the AnthropicIntegration object.

credentials [required]

 <oneOf>

The definition of the AnthropicCredentials object.

Option 1

object

The definition of the AnthropicAPIKey object.

api_token [required]

string

The AnthropicAPIKey api_token.

type [required]

enum

The definition of the AnthropicAPIKey object. Allowed enum values: AnthropicAPIKey

type [required]

enum

The definition of the AnthropicIntegrationType object. Allowed enum values: Anthropic

Option 3

object

The definition of the AsanaIntegration object.

credentials [required]

 <oneOf>

The definition of the AsanaCredentials object.

Option 1

object

The definition of the AsanaAccessToken object.

access_token [required]

string

The AsanaAccessToken access_token.

type [required]

enum

The definition of the AsanaAccessToken object. Allowed enum values: AsanaAccessToken

type [required]

enum

The definition of the AsanaIntegrationType object. Allowed enum values: Asana

Option 4

object

The definition of the AzureIntegration object.

credentials [required]

 <oneOf>

The definition of the AzureCredentials object.

Option 1

object

The definition of the AzureTenant object.

app_client_id [required]

string

The Client ID, also known as the Application ID in Azure, is a unique identifier for an application. It's used to identify the application during the authentication process. Your Application (client) ID is listed in the application's overview page. You can navigate to your application via the Azure Directory.

client_secret [required]

string

The Client Secret is a confidential piece of information known only to the application and Azure AD. It's used to prove the application's identity. Your Client Secret is available from the application’s secrets page. You can navigate to your application via the Azure Directory.

custom_scopes

string

If provided, the custom scope to be requested from Microsoft when acquiring an OAuth 2 access token. This custom scope is used only in conjunction with the HTTP action. A resource's scope is constructed by using the identifier URI for the resource and .default, separated by a forward slash (/) as follows:{identifierURI}/.default.

tenant_id [required]

string

The Tenant ID, also known as the Directory ID in Azure, is a unique identifier that represents an Azure AD instance. Your Tenant ID (Directory ID) is listed in your Active Directory overview page under the 'Tenant information' section.

type [required]

enum

The definition of the AzureTenant object. Allowed enum values: AzureTenant

type [required]

enum

The definition of the AzureIntegrationType object. Allowed enum values: Azure

Option 5

object

The definition of the CircleCIIntegration object.

credentials [required]

 <oneOf>

The definition of the CircleCICredentials object.

Option 1

object

The definition of the CircleCIAPIKey object.

api_token [required]

string

The CircleCIAPIKey api_token.

type [required]

enum

The definition of the CircleCIAPIKey object. Allowed enum values: CircleCIAPIKey

type [required]

enum

The definition of the CircleCIIntegrationType object. Allowed enum values: CircleCI

Option 6

object

The definition of the ClickupIntegration object.

credentials [required]

 <oneOf>

The definition of the ClickupCredentials object.

Option 1

object

The definition of the ClickupAPIKey object.

api_token [required]

string

The ClickupAPIKey api_token.

type [required]

enum

The definition of the ClickupAPIKey object. Allowed enum values: ClickupAPIKey

type [required]

enum

The definition of the ClickupIntegrationType object. Allowed enum values: Clickup

Option 7

object

The definition of the CloudflareIntegration object.

credentials [required]

 <oneOf>

The definition of the CloudflareCredentials object.

Option 1

object

The definition of the CloudflareAPIToken object.

api_token [required]

string

The CloudflareAPIToken api_token.

type [required]

enum

The definition of the CloudflareAPIToken object. Allowed enum values: CloudflareAPIToken

Option 2

object

The definition of the CloudflareGlobalAPIToken object.

auth_email [required]

string

The CloudflareGlobalAPIToken auth_email.

global_api_key [required]

string

The CloudflareGlobalAPIToken global_api_key.

type [required]

enum

The definition of the CloudflareGlobalAPIToken object. Allowed enum values: CloudflareGlobalAPIToken

type [required]

enum

The definition of the CloudflareIntegrationType object. Allowed enum values: Cloudflare

Option 8

object

The definition of the ConfigCatIntegration object.

credentials [required]

 <oneOf>

The definition of the ConfigCatCredentials object.

Option 1

object

The definition of the ConfigCatSDKKey object.

api_password [required]

string

The ConfigCatSDKKey api_password.

api_username [required]

string

The ConfigCatSDKKey api_username.

sdk_key [required]

string

The ConfigCatSDKKey sdk_key.

type [required]

enum

The definition of the ConfigCatSDKKey object. Allowed enum values: ConfigCatSDKKey

type [required]

enum

The definition of the ConfigCatIntegrationType object. Allowed enum values: ConfigCat

Option 9

object

The definition of the DatadogIntegration object.

credentials [required]

 <oneOf>

The definition of the DatadogCredentials object.

Option 1

object

The definition of the DatadogAPIKey object.

api_key [required]

string

The DatadogAPIKey api_key.

app_key [required]

string

The DatadogAPIKey app_key.

datacenter [required]

string

The DatadogAPIKey datacenter.

subdomain

string

Custom subdomain used for Datadog URLs generated with this Connection. For example, if this org uses https://acme.datadoghq.com to access Datadog, set this field to acme. If this field is omitted, generated URLs will use the default site URL for its datacenter (see https://docs.datadoghq.com/getting_started/site).

type [required]

enum

The definition of the DatadogAPIKey object. Allowed enum values: DatadogAPIKey

type [required]

enum

The definition of the DatadogIntegrationType object. Allowed enum values: Datadog

Option 10

object

The definition of the FastlyIntegration object.

credentials [required]

 <oneOf>

The definition of the FastlyCredentials object.

Option 1

object

The definition of the FastlyAPIKey object.

api_key [required]

string

The FastlyAPIKey api_key.

type [required]

enum

The definition of the FastlyAPIKey object. Allowed enum values: FastlyAPIKey

type [required]

enum

The definition of the FastlyIntegrationType object. Allowed enum values: Fastly

Option 11

object

The definition of the FreshserviceIntegration object.

credentials [required]

 <oneOf>

The definition of the FreshserviceCredentials object.

Option 1

object

The definition of the FreshserviceAPIKey object.

api_key [required]

string

The FreshserviceAPIKey api_key.

domain [required]

string

The FreshserviceAPIKey domain.

type [required]

enum

The definition of the FreshserviceAPIKey object. Allowed enum values: FreshserviceAPIKey

type [required]

enum

The definition of the FreshserviceIntegrationType object. Allowed enum values: Freshservice

Option 12

object

The definition of the GCPIntegration object.

credentials [required]

 <oneOf>

The definition of the GCPCredentials object.

Option 1

object

The definition of the GCPServiceAccount object.

private_key [required]

string

The GCPServiceAccount private_key.

service_account_email [required]

string

The GCPServiceAccount service_account_email.

type [required]

enum

The definition of the GCPServiceAccount object. Allowed enum values: GCPServiceAccount

type [required]

enum

The definition of the GCPIntegrationType object. Allowed enum values: GCP

Option 13

object

The definition of the GeminiIntegration object.

credentials [required]

 <oneOf>

The definition of the GeminiCredentials object.

Option 1

object

The definition of the GeminiAPIKey object.

api_key [required]

string

The GeminiAPIKey api_key.

type [required]

enum

The definition of the GeminiAPIKey object. Allowed enum values: GeminiAPIKey

type [required]

enum

The definition of the GeminiIntegrationType object. Allowed enum values: Gemini

Option 14

object

The definition of the GitlabIntegration object.

credentials [required]

 <oneOf>

The definition of the GitlabCredentials object.

Option 1

object

The definition of the GitlabAPIKey object.

api_token [required]

string

The GitlabAPIKey api_token.

type [required]

enum

The definition of the GitlabAPIKey object. Allowed enum values: GitlabAPIKey

type [required]

enum

The definition of the GitlabIntegrationType object. Allowed enum values: Gitlab

Option 15

object

The definition of the GreyNoiseIntegration object.

credentials [required]

 <oneOf>

The definition of the GreyNoiseCredentials object.

Option 1

object

The definition of the GreyNoiseAPIKey object.

api_key [required]

string

The GreyNoiseAPIKey api_key.

type [required]

enum

The definition of the GreyNoiseAPIKey object. Allowed enum values: GreyNoiseAPIKey

type [required]

enum

The definition of the GreyNoiseIntegrationType object. Allowed enum values: GreyNoise

Option 16

object

The definition of HTTPIntegration object.

base_url [required]

string

Base HTTP url for the integration

credentials [required]

 <oneOf>

The definition of HTTPCredentials object.

Option 1

object

The definition of HTTPTokenAuth object.

body

object

The definition of HTTPBody object.

content

string

Serialized body content

content_type

string

Content type of the body

headers

[object]

The HTTPTokenAuth headers.

name [required]

string

The HTTPHeader name.

value [required]

string

The HTTPHeader value.

tokens

[object]

The HTTPTokenAuth tokens.

name [required]

string

The HTTPToken name.

type [required]

enum

The definition of TokenType object. Allowed enum values: SECRET

value [required]

string

The HTTPToken value.

type [required]

enum

The definition of HTTPTokenAuthType object. Allowed enum values: HTTPTokenAuth

url_parameters

[object]

The HTTPTokenAuth url_parameters.

name [required]

string

Name for tokens.

value [required]

string

The UrlParam value.

type [required]

enum

The definition of HTTPIntegrationType object. Allowed enum values: HTTP

Option 17

object

The definition of the LaunchDarklyIntegration object.

credentials [required]

 <oneOf>

The definition of the LaunchDarklyCredentials object.

Option 1

object

The definition of the LaunchDarklyAPIKey object.

api_token [required]

string

The LaunchDarklyAPIKey api_token.

type [required]

enum

The definition of the LaunchDarklyAPIKey object. Allowed enum values: LaunchDarklyAPIKey

type [required]

enum

The definition of the LaunchDarklyIntegrationType object. Allowed enum values: LaunchDarkly

Option 18

object

The definition of the NotionIntegration object.

credentials [required]

 <oneOf>

The definition of the NotionCredentials object.

Option 1

object

The definition of the NotionAPIKey object.

api_token [required]

string

The NotionAPIKey api_token.

type [required]

enum

The definition of the NotionAPIKey object. Allowed enum values: NotionAPIKey

type [required]

enum

The definition of the NotionIntegrationType object. Allowed enum values: Notion

Option 19

object

The definition of the OktaIntegration object.

credentials [required]

 <oneOf>

The definition of the OktaCredentials object.

Option 1

object

The definition of the OktaAPIToken object.

api_token [required]

string

The OktaAPIToken api_token.

domain [required]

string

The OktaAPIToken domain.

type [required]

enum

The definition of the OktaAPIToken object. Allowed enum values: OktaAPIToken

type [required]

enum

The definition of the OktaIntegrationType object. Allowed enum values: Okta

Option 20

object

The definition of the OpenAIIntegration object.

credentials [required]

 <oneOf>

The definition of the OpenAICredentials object.

Option 1

object

The definition of the OpenAIAPIKey object.

api_token [required]

string

The OpenAIAPIKey api_token.

type [required]

enum

The definition of the OpenAIAPIKey object. Allowed enum values: OpenAIAPIKey

type [required]

enum

The definition of the OpenAIIntegrationType object. Allowed enum values: OpenAI

Option 21

object

The definition of the ServiceNowIntegration object.

credentials [required]

 <oneOf>

The definition of the ServiceNowCredentials object.

Option 1

object

The definition of the ServiceNowBasicAuth object.

instance [required]

string

The ServiceNowBasicAuth instance.

password [required]

string

The ServiceNowBasicAuth password.

type [required]

enum

The definition of the ServiceNowBasicAuth object. Allowed enum values: ServiceNowBasicAuth

username [required]

string

The ServiceNowBasicAuth username.

type [required]

enum

The definition of the ServiceNowIntegrationType object. Allowed enum values: ServiceNow

Option 22

object

The definition of the SplitIntegration object.

credentials [required]

 <oneOf>

The definition of the SplitCredentials object.

Option 1

object

The definition of the SplitAPIKey object.

api_key [required]

string

The SplitAPIKey api_key.

type [required]

enum

The definition of the SplitAPIKey object. Allowed enum values: SplitAPIKey

type [required]

enum

The definition of the SplitIntegrationType object. Allowed enum values: Split

Option 23

object

The definition of the StatsigIntegration object.

credentials [required]

 <oneOf>

The definition of the StatsigCredentials object.

Option 1

object

The definition of the StatsigAPIKey object.

api_key [required]

string

The StatsigAPIKey api_key.

type [required]

enum

The definition of the StatsigAPIKey object. Allowed enum values: StatsigAPIKey

type [required]

enum

The definition of the StatsigIntegrationType object. Allowed enum values: Statsig

Option 24

object

The definition of the VirusTotalIntegration object.

credentials [required]

 <oneOf>

The definition of the VirusTotalCredentials object.

Option 1

object

The definition of the VirusTotalAPIKey object.

api_key [required]

string

The VirusTotalAPIKey api_key.

type [required]

enum

The definition of the VirusTotalAPIKey object. Allowed enum values: VirusTotalAPIKey

type [required]

enum

The definition of the VirusTotalIntegrationType object. Allowed enum values: VirusTotal

name [required]

string

Name of the connection

id

string

The connection identifier

type [required]

enum

The definition of ActionConnectionDataType object. Allowed enum values: action_connection

{
  "data": {
    "attributes": {
      "integration": {
        "credentials": {
          "account_id": "111222333444",
          "external_id": "33a1011635c44b38a064cf14e82e1d8f",
          "principal_id": "123456789012",
          "role": "my-role",
          "type": "AWSAssumeRole"
        },
        "type": "AWS"
      },
      "name": "My AWS Connection"
    },
    "id": "string",
    "type": "action_connection"
  }
}

Bad Request

API error response.

Expand All

Field

Type

Description

errors [required]

[object]

A list of errors.

detail

string

A human-readable explanation specific to this occurrence of the error.

meta

object

Non-standard meta-information about the error

source

object

References to the source of the error.

header

string

A string indicating the name of a single request header which caused the error.

parameter

string

A string indicating which URI query parameter caused the error.

pointer

string

A JSON pointer to the value in the request document that caused the error.

status

string

Status code of the response.

title

string

Short human-readable summary of the error.

{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}

Forbidden

API error response.

Expand All

Field

Type

Description

errors [required]

[object]

A list of errors.

detail

string

A human-readable explanation specific to this occurrence of the error.

meta

object

Non-standard meta-information about the error

source

object

References to the source of the error.

header

string

A string indicating the name of a single request header which caused the error.

parameter

string

A string indicating which URI query parameter caused the error.

pointer

string

A JSON pointer to the value in the request document that caused the error.

status

string

Status code of the response.

title

string

Short human-readable summary of the error.

{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}

Too Many Request

API error response.

Expand All

Field

Type

Description

errors [required]

[object]

A list of errors.

detail

string

A human-readable explanation specific to this occurrence of the error.

meta

object

Non-standard meta-information about the error

source

object

References to the source of the error.

header

string

A string indicating the name of a single request header which caused the error.

parameter

string

A string indicating which URI query parameter caused the error.

pointer

string

A JSON pointer to the value in the request document that caused the error.

status

string

Status code of the response.

title

string

Short human-readable summary of the error.

{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}

Code Example

                          ## default
# 

# Curl command
curl -X POST "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.us2.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/actions/connections" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \ -d @- << EOF { "data": { "attributes": { "integration": { "credentials": { "account_id": "123456789123", "role": "MyRoleUpdated", "type": "AWSAssumeRole" }, "type": "AWS" }, "name": "My AWS Connection" }, "type": "action_connection" } } EOF
// Create a new Action Connection returns "Successfully created Action Connection" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
)

func main() {
	body := datadogV2.CreateActionConnectionRequest{
		Data: datadogV2.ActionConnectionData{
			Type: datadogV2.ACTIONCONNECTIONDATATYPE_ACTION_CONNECTION,
			Attributes: datadogV2.ActionConnectionAttributes{
				Name: "Cassette Connection exampleactionconnection",
				Integration: datadogV2.ActionConnectionIntegration{
					AWSIntegration: &datadogV2.AWSIntegration{
						Type: datadogV2.AWSINTEGRATIONTYPE_AWS,
						Credentials: datadogV2.AWSCredentials{
							AWSAssumeRole: &datadogV2.AWSAssumeRole{
								Type:      datadogV2.AWSASSUMEROLETYPE_AWSASSUMEROLE,
								Role:      "MyRoleUpdated",
								AccountId: "123456789123",
							}},
					}},
			},
		},
	}
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV2.NewActionConnectionApi(apiClient)
	resp, r, err := api.CreateActionConnection(ctx, body)

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ActionConnectionApi.CreateActionConnection`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `ActionConnectionApi.CreateActionConnection`:\n%s\n", responseContent)
}

Instructions

First install the library and its dependencies and then save the example to main.go and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" go run "main.go"
// Create a new Action Connection returns "Successfully created Action Connection" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.ActionConnectionApi;
import com.datadog.api.client.v2.model.AWSAssumeRole;
import com.datadog.api.client.v2.model.AWSAssumeRoleType;
import com.datadog.api.client.v2.model.AWSCredentials;
import com.datadog.api.client.v2.model.AWSIntegration;
import com.datadog.api.client.v2.model.AWSIntegrationType;
import com.datadog.api.client.v2.model.ActionConnectionAttributes;
import com.datadog.api.client.v2.model.ActionConnectionData;
import com.datadog.api.client.v2.model.ActionConnectionDataType;
import com.datadog.api.client.v2.model.ActionConnectionIntegration;
import com.datadog.api.client.v2.model.CreateActionConnectionRequest;
import com.datadog.api.client.v2.model.CreateActionConnectionResponse;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    ActionConnectionApi apiInstance = new ActionConnectionApi(defaultClient);

    CreateActionConnectionRequest body =
        new CreateActionConnectionRequest()
            .data(
                new ActionConnectionData()
                    .type(ActionConnectionDataType.ACTION_CONNECTION)
                    .attributes(
                        new ActionConnectionAttributes()
                            .name("Cassette Connection exampleactionconnection")
                            .integration(
                                new ActionConnectionIntegration(
                                    new AWSIntegration()
                                        .type(AWSIntegrationType.AWS)
                                        .credentials(
                                            new AWSCredentials(
                                                new AWSAssumeRole()
                                                    .type(AWSAssumeRoleType.AWSASSUMEROLE)
                                                    .role("MyRoleUpdated")
                                                    .accountId("123456789123")))))));

    try {
      CreateActionConnectionResponse result = apiInstance.createActionConnection(body);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling ActionConnectionApi#createActionConnection");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Instructions

First install the library and its dependencies and then save the example to Example.java and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" java "Example.java"
"""
Create a new Action Connection returns "Successfully created Action Connection" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.action_connection_api import ActionConnectionApi
from datadog_api_client.v2.model.action_connection_attributes import ActionConnectionAttributes
from datadog_api_client.v2.model.action_connection_data import ActionConnectionData
from datadog_api_client.v2.model.action_connection_data_type import ActionConnectionDataType
from datadog_api_client.v2.model.aws_assume_role import AWSAssumeRole
from datadog_api_client.v2.model.aws_assume_role_type import AWSAssumeRoleType
from datadog_api_client.v2.model.aws_integration import AWSIntegration
from datadog_api_client.v2.model.aws_integration_type import AWSIntegrationType
from datadog_api_client.v2.model.create_action_connection_request import CreateActionConnectionRequest

body = CreateActionConnectionRequest(
    data=ActionConnectionData(
        type=ActionConnectionDataType.ACTION_CONNECTION,
        attributes=ActionConnectionAttributes(
            name="Cassette Connection exampleactionconnection",
            integration=AWSIntegration(
                type=AWSIntegrationType.AWS,
                credentials=AWSAssumeRole(
                    type=AWSAssumeRoleType.AWSASSUMEROLE,
                    role="MyRoleUpdated",
                    account_id="123456789123",
                ),
            ),
        ),
    ),
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = ActionConnectionApi(api_client)
    response = api_instance.create_action_connection(body=body)

    print(response)

Instructions

First install the library and its dependencies and then save the example to example.py and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" python3 "example.py"
# Create a new Action Connection returns "Successfully created Action Connection" response

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

body = DatadogAPIClient::V2::CreateActionConnectionRequest.new({
  data: DatadogAPIClient::V2::ActionConnectionData.new({
    type: DatadogAPIClient::V2::ActionConnectionDataType::ACTION_CONNECTION,
    attributes: DatadogAPIClient::V2::ActionConnectionAttributes.new({
      name: "Cassette Connection exampleactionconnection",
      integration: DatadogAPIClient::V2::AWSIntegration.new({
        type: DatadogAPIClient::V2::AWSIntegrationType::AWS,
        credentials: DatadogAPIClient::V2::AWSAssumeRole.new({
          type: DatadogAPIClient::V2::AWSAssumeRoleType::AWSASSUMEROLE,
          role: "MyRoleUpdated",
          account_id: "123456789123",
        }),
      }),
    }),
  }),
})
p api_instance.create_action_connection(body)

Instructions

First install the library and its dependencies and then save the example to example.rb and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" rb "example.rb"
// Create a new Action Connection returns "Successfully created Action Connection"
// response
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_action_connection::ActionConnectionAPI;
use datadog_api_client::datadogV2::model::AWSAssumeRole;
use datadog_api_client::datadogV2::model::AWSAssumeRoleType;
use datadog_api_client::datadogV2::model::AWSCredentials;
use datadog_api_client::datadogV2::model::AWSIntegration;
use datadog_api_client::datadogV2::model::AWSIntegrationType;
use datadog_api_client::datadogV2::model::ActionConnectionAttributes;
use datadog_api_client::datadogV2::model::ActionConnectionData;
use datadog_api_client::datadogV2::model::ActionConnectionDataType;
use datadog_api_client::datadogV2::model::ActionConnectionIntegration;
use datadog_api_client::datadogV2::model::CreateActionConnectionRequest;

#[tokio::main]
async fn main() {
    let body = CreateActionConnectionRequest::new(ActionConnectionData::new(
        ActionConnectionAttributes::new(
            ActionConnectionIntegration::AWSIntegration(Box::new(AWSIntegration::new(
                AWSCredentials::AWSAssumeRole(Box::new(AWSAssumeRole::new(
                    "123456789123".to_string(),
                    "MyRoleUpdated".to_string(),
                    AWSAssumeRoleType::AWSASSUMEROLE,
                ))),
                AWSIntegrationType::AWS,
            ))),
            "Cassette Connection exampleactionconnection".to_string(),
        ),
        ActionConnectionDataType::ACTION_CONNECTION,
    ));
    let configuration = datadog::Configuration::new();
    let api = ActionConnectionAPI::with_config(configuration);
    let resp = api.create_action_connection(body).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}

Instructions

First install the library and its dependencies and then save the example to src/main.rs and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo run
/**
 * Create a new Action Connection returns "Successfully created Action Connection" response
 */

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

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

const params: v2.ActionConnectionApiCreateActionConnectionRequest = {
  body: {
    data: {
      type: "action_connection",
      attributes: {
        name: "Cassette Connection exampleactionconnection",
        integration: {
          type: "AWS",
          credentials: {
            type: "AWSAssumeRole",
            role: "MyRoleUpdated",
            accountId: "123456789123",
          },
        },
      },
    },
  },
};

apiInstance
  .createActionConnection(params)
  .then((data: v2.CreateActionConnectionResponse) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));

Instructions

First install the library and its dependencies and then save the example to example.ts and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" tsc "example.ts"