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 AnthropicAPIKeyapi_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 AsanaAccessTokenaccess_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 CircleCIAPIKeyapi_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 ClickupAPIKeyapi_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 CloudflareAPITokenapi_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 CloudflareGlobalAPITokenauth_email.
global_api_key [required]
string
The CloudflareGlobalAPITokenglobal_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 ConfigCatSDKKeyapi_password.
api_username [required]
string
The ConfigCatSDKKeyapi_username.
sdk_key [required]
string
The ConfigCatSDKKeysdk_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
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 AnthropicAPIKeyapi_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 AsanaAccessTokenaccess_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 CircleCIAPIKeyapi_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 ClickupAPIKeyapi_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 CloudflareAPITokenapi_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 CloudflareGlobalAPITokenauth_email.
global_api_key [required]
string
The CloudflareGlobalAPITokenglobal_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 ConfigCatSDKKeyapi_password.
api_username [required]
string
The ConfigCatSDKKeyapi_username.
sdk_key [required]
string
The ConfigCatSDKKeysdk_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
// Create a new Action Connection returns "Successfully created Action Connection" responsepackagemainimport("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")funcmain(){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)iferr!=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)}
"""
Create a new Action Connection returns "Successfully created Action Connection" response
"""fromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.action_connection_apiimportActionConnectionApifromdatadog_api_client.v2.model.action_connection_attributesimportActionConnectionAttributesfromdatadog_api_client.v2.model.action_connection_dataimportActionConnectionDatafromdatadog_api_client.v2.model.action_connection_data_typeimportActionConnectionDataTypefromdatadog_api_client.v2.model.aws_assume_roleimportAWSAssumeRolefromdatadog_api_client.v2.model.aws_assume_role_typeimportAWSAssumeRoleTypefromdatadog_api_client.v2.model.aws_integrationimportAWSIntegrationfromdatadog_api_client.v2.model.aws_integration_typeimportAWSIntegrationTypefromdatadog_api_client.v2.model.create_action_connection_requestimportCreateActionConnectionRequestbody=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()withApiClient(configuration)asapi_client:api_instance=ActionConnectionApi(api_client)response=api_instance.create_action_connection(body=body)print(response)
# Create a new Action Connection returns "Successfully created Action Connection" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V2::ActionConnectionAPI.newbody=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",}),}),}),}),})papi_instance.create_action_connection(body)
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.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";constconfiguration=client.createConfiguration();constapiInstance=newv2.ActionConnectionApi(configuration);constparams: 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));