1. Packages
  2. Datadog Provider
  3. API Docs
  4. ActionConnection
Datadog v4.48.1 published on Saturday, Apr 5, 2025 by Pulumi

datadog.ActionConnection

Explore with Pulumi AI

A connection that can be used in Actions, including in the Workflow Automation and App Builder products.

Example Usage

Coming soon!
Coming soon!
Coming soon!
Coming soon!
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.datadog.ActionConnection;
import com.pulumi.datadog.ActionConnectionArgs;
import static com.pulumi.codegen.internal.Serialization.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var config = ctx.config();
        var awsConnection = new ActionConnection("awsConnection", ActionConnectionArgs.builder()
            .name("My AWS Connection")
            .aws(ActionConnectionAwsArgs.builder()
                .assumeRole(ActionConnectionAwsAssumeRoleArgs.builder()
                    .accountId("123456789012")
                    .role("role2")
                    .build())
                .build())
            .build());

        final var token1 = config.get("token1");
        final var token2 = config.get("token2");
        var httpConnection = new ActionConnection("httpConnection", ActionConnectionArgs.builder()
            .name("My HTTP connection with token auth")
            .http(ActionConnectionHttpArgs.builder()
                .baseUrl("https://catfact.ninja")
                .tokenAuth(ActionConnectionHttpTokenAuthArgs.builder()
                    .tokens(                    
                        ActionConnectionHttpTokenAuthTokenArgs.builder()
                            .type("SECRET")
                            .name("token1")
                            .value(token1)
                            .build(),
                        ActionConnectionHttpTokenAuthTokenArgs.builder()
                            .type("SECRET")
                            .name("token2")
                            .value(token2)
                            .build())
                    .headers(                    
                        ActionConnectionHttpTokenAuthHeaderArgs.builder()
                            .name("header-one")
                            .value("headerval")
                            .build(),
                        ActionConnectionHttpTokenAuthHeaderArgs.builder()
                            .name("h2")
                            .value("{{ token1 }} test")
                            .build())
                    .urlParameters(                    
                        ActionConnectionHttpTokenAuthUrlParameterArgs.builder()
                            .name("param1")
                            .value("{{ token1 }}")
                            .build(),
                        ActionConnectionHttpTokenAuthUrlParameterArgs.builder()
                            .name("param2")
                            .value("paramVal2")
                            .build())
                    .body(ActionConnectionHttpTokenAuthBodyArgs.builder()
                        .contentType("application/json")
                        .content(serializeJson(
                            jsonObject(
                                jsonProperty("key", "mykey"),
                                jsonProperty("value", "maybe with a secret: {{ token2 }}")
                            )))
                        .build())
                    .build())
                .build())
            .build());

    }
}
Copy
configuration:
  token1:
    type: string
  token2:
    type: string
resources:
  awsConnection:
    type: datadog:ActionConnection
    name: aws_connection
    properties:
      name: My AWS Connection
      aws:
        - assumeRole:
            - accountId: '123456789012'
              role: role2
  httpConnection:
    type: datadog:ActionConnection
    name: http_connection
    properties:
      name: My HTTP connection with token auth
      http:
        - baseUrl: https://catfact.ninja
          tokenAuth:
            - tokens:
                - type: SECRET
                  name: token1
                  value: ${token1}
                - type: SECRET
                  name: token2
                  value: ${token2}
              headers:
                - name: header-one
                  value: headerval
                - name: h2
                  value: '{{ token1 }} test'
              urlParameters:
                - name: param1
                  value: '{{ token1 }}'
                - name: param2
                  value: paramVal2
              body:
                - contentType: application/json
                  content:
                    fn::toJSON:
                      key: mykey
                      value: 'maybe with a secret: {{ token2 }}'
Copy

Create ActionConnection Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new ActionConnection(name: string, args: ActionConnectionArgs, opts?: CustomResourceOptions);
@overload
def ActionConnection(resource_name: str,
                     args: ActionConnectionArgs,
                     opts: Optional[ResourceOptions] = None)

@overload
def ActionConnection(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     name: Optional[str] = None,
                     aws: Optional[ActionConnectionAwsArgs] = None,
                     http: Optional[ActionConnectionHttpArgs] = None)
func NewActionConnection(ctx *Context, name string, args ActionConnectionArgs, opts ...ResourceOption) (*ActionConnection, error)
public ActionConnection(string name, ActionConnectionArgs args, CustomResourceOptions? opts = null)
public ActionConnection(String name, ActionConnectionArgs args)
public ActionConnection(String name, ActionConnectionArgs args, CustomResourceOptions options)
type: datadog:ActionConnection
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ActionConnectionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ActionConnectionArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ActionConnectionArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ActionConnectionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ActionConnectionArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var actionConnectionResource = new Datadog.ActionConnection("actionConnectionResource", new()
{
    Name = "string",
    Aws = new Datadog.Inputs.ActionConnectionAwsArgs
    {
        AssumeRole = new Datadog.Inputs.ActionConnectionAwsAssumeRoleArgs
        {
            AccountId = "string",
            ExternalId = "string",
            PrincipalId = "string",
            Role = "string",
        },
    },
    Http = new Datadog.Inputs.ActionConnectionHttpArgs
    {
        BaseUrl = "string",
        TokenAuth = new Datadog.Inputs.ActionConnectionHttpTokenAuthArgs
        {
            Body = new Datadog.Inputs.ActionConnectionHttpTokenAuthBodyArgs
            {
                Content = "string",
                ContentType = "string",
            },
            Headers = new[]
            {
                new Datadog.Inputs.ActionConnectionHttpTokenAuthHeaderArgs
                {
                    Name = "string",
                    Value = "string",
                },
            },
            Tokens = new[]
            {
                new Datadog.Inputs.ActionConnectionHttpTokenAuthTokenArgs
                {
                    Name = "string",
                    Type = "string",
                    Value = "string",
                },
            },
            UrlParameters = new[]
            {
                new Datadog.Inputs.ActionConnectionHttpTokenAuthUrlParameterArgs
                {
                    Name = "string",
                    Value = "string",
                },
            },
        },
    },
});
Copy
example, err := datadog.NewActionConnection(ctx, "actionConnectionResource", &datadog.ActionConnectionArgs{
	Name: pulumi.String("string"),
	Aws: &datadog.ActionConnectionAwsArgs{
		AssumeRole: &datadog.ActionConnectionAwsAssumeRoleArgs{
			AccountId:   pulumi.String("string"),
			ExternalId:  pulumi.String("string"),
			PrincipalId: pulumi.String("string"),
			Role:        pulumi.String("string"),
		},
	},
	Http: &datadog.ActionConnectionHttpArgs{
		BaseUrl: pulumi.String("string"),
		TokenAuth: &datadog.ActionConnectionHttpTokenAuthArgs{
			Body: &datadog.ActionConnectionHttpTokenAuthBodyArgs{
				Content:     pulumi.String("string"),
				ContentType: pulumi.String("string"),
			},
			Headers: datadog.ActionConnectionHttpTokenAuthHeaderArray{
				&datadog.ActionConnectionHttpTokenAuthHeaderArgs{
					Name:  pulumi.String("string"),
					Value: pulumi.String("string"),
				},
			},
			Tokens: datadog.ActionConnectionHttpTokenAuthTokenArray{
				&datadog.ActionConnectionHttpTokenAuthTokenArgs{
					Name:  pulumi.String("string"),
					Type:  pulumi.String("string"),
					Value: pulumi.String("string"),
				},
			},
			UrlParameters: datadog.ActionConnectionHttpTokenAuthUrlParameterArray{
				&datadog.ActionConnectionHttpTokenAuthUrlParameterArgs{
					Name:  pulumi.String("string"),
					Value: pulumi.String("string"),
				},
			},
		},
	},
})
Copy
var actionConnectionResource = new ActionConnection("actionConnectionResource", ActionConnectionArgs.builder()
    .name("string")
    .aws(ActionConnectionAwsArgs.builder()
        .assumeRole(ActionConnectionAwsAssumeRoleArgs.builder()
            .accountId("string")
            .externalId("string")
            .principalId("string")
            .role("string")
            .build())
        .build())
    .http(ActionConnectionHttpArgs.builder()
        .baseUrl("string")
        .tokenAuth(ActionConnectionHttpTokenAuthArgs.builder()
            .body(ActionConnectionHttpTokenAuthBodyArgs.builder()
                .content("string")
                .contentType("string")
                .build())
            .headers(ActionConnectionHttpTokenAuthHeaderArgs.builder()
                .name("string")
                .value("string")
                .build())
            .tokens(ActionConnectionHttpTokenAuthTokenArgs.builder()
                .name("string")
                .type("string")
                .value("string")
                .build())
            .urlParameters(ActionConnectionHttpTokenAuthUrlParameterArgs.builder()
                .name("string")
                .value("string")
                .build())
            .build())
        .build())
    .build());
Copy
action_connection_resource = datadog.ActionConnection("actionConnectionResource",
    name="string",
    aws={
        "assume_role": {
            "account_id": "string",
            "external_id": "string",
            "principal_id": "string",
            "role": "string",
        },
    },
    http={
        "base_url": "string",
        "token_auth": {
            "body": {
                "content": "string",
                "content_type": "string",
            },
            "headers": [{
                "name": "string",
                "value": "string",
            }],
            "tokens": [{
                "name": "string",
                "type": "string",
                "value": "string",
            }],
            "url_parameters": [{
                "name": "string",
                "value": "string",
            }],
        },
    })
Copy
const actionConnectionResource = new datadog.ActionConnection("actionConnectionResource", {
    name: "string",
    aws: {
        assumeRole: {
            accountId: "string",
            externalId: "string",
            principalId: "string",
            role: "string",
        },
    },
    http: {
        baseUrl: "string",
        tokenAuth: {
            body: {
                content: "string",
                contentType: "string",
            },
            headers: [{
                name: "string",
                value: "string",
            }],
            tokens: [{
                name: "string",
                type: "string",
                value: "string",
            }],
            urlParameters: [{
                name: "string",
                value: "string",
            }],
        },
    },
});
Copy
type: datadog:ActionConnection
properties:
    aws:
        assumeRole:
            accountId: string
            externalId: string
            principalId: string
            role: string
    http:
        baseUrl: string
        tokenAuth:
            body:
                content: string
                contentType: string
            headers:
                - name: string
                  value: string
            tokens:
                - name: string
                  type: string
                  value: string
            urlParameters:
                - name: string
                  value: string
    name: string
Copy

ActionConnection Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The ActionConnection resource accepts the following input properties:

Name This property is required. string
Name of the connection
Aws ActionConnectionAws
Configuration for an AWS connection
Http ActionConnectionHttp
Configuration for an HTTP connection
Name This property is required. string
Name of the connection
Aws ActionConnectionAwsArgs
Configuration for an AWS connection
Http ActionConnectionHttpArgs
Configuration for an HTTP connection
name This property is required. String
Name of the connection
aws ActionConnectionAws
Configuration for an AWS connection
http ActionConnectionHttp
Configuration for an HTTP connection
name This property is required. string
Name of the connection
aws ActionConnectionAws
Configuration for an AWS connection
http ActionConnectionHttp
Configuration for an HTTP connection
name This property is required. str
Name of the connection
aws ActionConnectionAwsArgs
Configuration for an AWS connection
http ActionConnectionHttpArgs
Configuration for an HTTP connection
name This property is required. String
Name of the connection
aws Property Map
Configuration for an AWS connection
http Property Map
Configuration for an HTTP connection

Outputs

All input properties are implicitly available as output properties. Additionally, the ActionConnection resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing ActionConnection Resource

Get an existing ActionConnection resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: ActionConnectionState, opts?: CustomResourceOptions): ActionConnection
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        aws: Optional[ActionConnectionAwsArgs] = None,
        http: Optional[ActionConnectionHttpArgs] = None,
        name: Optional[str] = None) -> ActionConnection
func GetActionConnection(ctx *Context, name string, id IDInput, state *ActionConnectionState, opts ...ResourceOption) (*ActionConnection, error)
public static ActionConnection Get(string name, Input<string> id, ActionConnectionState? state, CustomResourceOptions? opts = null)
public static ActionConnection get(String name, Output<String> id, ActionConnectionState state, CustomResourceOptions options)
resources:  _:    type: datadog:ActionConnection    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Aws ActionConnectionAws
Configuration for an AWS connection
Http ActionConnectionHttp
Configuration for an HTTP connection
Name string
Name of the connection
Aws ActionConnectionAwsArgs
Configuration for an AWS connection
Http ActionConnectionHttpArgs
Configuration for an HTTP connection
Name string
Name of the connection
aws ActionConnectionAws
Configuration for an AWS connection
http ActionConnectionHttp
Configuration for an HTTP connection
name String
Name of the connection
aws ActionConnectionAws
Configuration for an AWS connection
http ActionConnectionHttp
Configuration for an HTTP connection
name string
Name of the connection
aws ActionConnectionAwsArgs
Configuration for an AWS connection
http ActionConnectionHttpArgs
Configuration for an HTTP connection
name str
Name of the connection
aws Property Map
Configuration for an AWS connection
http Property Map
Configuration for an HTTP connection
name String
Name of the connection

Supporting Types

ActionConnectionAws
, ActionConnectionAwsArgs

AssumeRole ActionConnectionAwsAssumeRole
Configuration for an assume role AWS connection
AssumeRole ActionConnectionAwsAssumeRole
Configuration for an assume role AWS connection
assumeRole ActionConnectionAwsAssumeRole
Configuration for an assume role AWS connection
assumeRole ActionConnectionAwsAssumeRole
Configuration for an assume role AWS connection
assume_role ActionConnectionAwsAssumeRole
Configuration for an assume role AWS connection
assumeRole Property Map
Configuration for an assume role AWS connection

ActionConnectionAwsAssumeRole
, ActionConnectionAwsAssumeRoleArgs

AccountId string
AWS account that the connection is created for. String length must be at least 1.
ExternalId string
External ID that specifies which connection can be used to assume the role
PrincipalId string
AWS account that will assume the role
Role string
Role to assume. String length must be at least 1.
AccountId string
AWS account that the connection is created for. String length must be at least 1.
ExternalId string
External ID that specifies which connection can be used to assume the role
PrincipalId string
AWS account that will assume the role
Role string
Role to assume. String length must be at least 1.
accountId String
AWS account that the connection is created for. String length must be at least 1.
externalId String
External ID that specifies which connection can be used to assume the role
principalId String
AWS account that will assume the role
role String
Role to assume. String length must be at least 1.
accountId string
AWS account that the connection is created for. String length must be at least 1.
externalId string
External ID that specifies which connection can be used to assume the role
principalId string
AWS account that will assume the role
role string
Role to assume. String length must be at least 1.
account_id str
AWS account that the connection is created for. String length must be at least 1.
external_id str
External ID that specifies which connection can be used to assume the role
principal_id str
AWS account that will assume the role
role str
Role to assume. String length must be at least 1.
accountId String
AWS account that the connection is created for. String length must be at least 1.
externalId String
External ID that specifies which connection can be used to assume the role
principalId String
AWS account that will assume the role
role String
Role to assume. String length must be at least 1.

ActionConnectionHttp
, ActionConnectionHttpArgs

BaseUrl string
Base HTTP url for the integration. String length must be at least 1.
TokenAuth ActionConnectionHttpTokenAuth
Configuration for an HTTP connection that uses token auth
BaseUrl string
Base HTTP url for the integration. String length must be at least 1.
TokenAuth ActionConnectionHttpTokenAuth
Configuration for an HTTP connection that uses token auth
baseUrl String
Base HTTP url for the integration. String length must be at least 1.
tokenAuth ActionConnectionHttpTokenAuth
Configuration for an HTTP connection that uses token auth
baseUrl string
Base HTTP url for the integration. String length must be at least 1.
tokenAuth ActionConnectionHttpTokenAuth
Configuration for an HTTP connection that uses token auth
base_url str
Base HTTP url for the integration. String length must be at least 1.
token_auth ActionConnectionHttpTokenAuth
Configuration for an HTTP connection that uses token auth
baseUrl String
Base HTTP url for the integration. String length must be at least 1.
tokenAuth Property Map
Configuration for an HTTP connection that uses token auth

ActionConnectionHttpTokenAuth
, ActionConnectionHttpTokenAuthArgs

Body ActionConnectionHttpTokenAuthBody
Body for HTTP authentication
Headers List<ActionConnectionHttpTokenAuthHeader>
Header for HTTP authentication
Tokens List<ActionConnectionHttpTokenAuthToken>
Token for HTTP authentication
UrlParameters List<ActionConnectionHttpTokenAuthUrlParameter>
URL parameter for HTTP authentication
Body ActionConnectionHttpTokenAuthBody
Body for HTTP authentication
Headers []ActionConnectionHttpTokenAuthHeader
Header for HTTP authentication
Tokens []ActionConnectionHttpTokenAuthToken
Token for HTTP authentication
UrlParameters []ActionConnectionHttpTokenAuthUrlParameter
URL parameter for HTTP authentication
body ActionConnectionHttpTokenAuthBody
Body for HTTP authentication
headers List<ActionConnectionHttpTokenAuthHeader>
Header for HTTP authentication
tokens List<ActionConnectionHttpTokenAuthToken>
Token for HTTP authentication
urlParameters List<ActionConnectionHttpTokenAuthUrlParameter>
URL parameter for HTTP authentication
body ActionConnectionHttpTokenAuthBody
Body for HTTP authentication
headers ActionConnectionHttpTokenAuthHeader[]
Header for HTTP authentication
tokens ActionConnectionHttpTokenAuthToken[]
Token for HTTP authentication
urlParameters ActionConnectionHttpTokenAuthUrlParameter[]
URL parameter for HTTP authentication
body Property Map
Body for HTTP authentication
headers List<Property Map>
Header for HTTP authentication
tokens List<Property Map>
Token for HTTP authentication
urlParameters List<Property Map>
URL parameter for HTTP authentication

ActionConnectionHttpTokenAuthBody
, ActionConnectionHttpTokenAuthBodyArgs

Content string
Serialized body content. String length must be at least 1.
ContentType string
Content type of the body. String length must be at least 1.
Content string
Serialized body content. String length must be at least 1.
ContentType string
Content type of the body. String length must be at least 1.
content String
Serialized body content. String length must be at least 1.
contentType String
Content type of the body. String length must be at least 1.
content string
Serialized body content. String length must be at least 1.
contentType string
Content type of the body. String length must be at least 1.
content str
Serialized body content. String length must be at least 1.
content_type str
Content type of the body. String length must be at least 1.
content String
Serialized body content. String length must be at least 1.
contentType String
Content type of the body. String length must be at least 1.

ActionConnectionHttpTokenAuthHeader
, ActionConnectionHttpTokenAuthHeaderArgs

Name string
Header name. String length must be at least 1.
Value string
String length must be at least 1.
Name string
Header name. String length must be at least 1.
Value string
String length must be at least 1.
name String
Header name. String length must be at least 1.
value String
String length must be at least 1.
name string
Header name. String length must be at least 1.
value string
String length must be at least 1.
name str
Header name. String length must be at least 1.
value str
String length must be at least 1.
name String
Header name. String length must be at least 1.
value String
String length must be at least 1.

ActionConnectionHttpTokenAuthToken
, ActionConnectionHttpTokenAuthTokenArgs

Name string
Token name. String length must be at least 1.
Type string
Token type Valid values are SECRET.
Value string
Token value. String length must be at least 1.
Name string
Token name. String length must be at least 1.
Type string
Token type Valid values are SECRET.
Value string
Token value. String length must be at least 1.
name String
Token name. String length must be at least 1.
type String
Token type Valid values are SECRET.
value String
Token value. String length must be at least 1.
name string
Token name. String length must be at least 1.
type string
Token type Valid values are SECRET.
value string
Token value. String length must be at least 1.
name str
Token name. String length must be at least 1.
type str
Token type Valid values are SECRET.
value str
Token value. String length must be at least 1.
name String
Token name. String length must be at least 1.
type String
Token type Valid values are SECRET.
value String
Token value. String length must be at least 1.

ActionConnectionHttpTokenAuthUrlParameter
, ActionConnectionHttpTokenAuthUrlParameterArgs

Name string
URL parameter name. String length must be at least 1.
Value string
URL parameter value. String length must be at least 1.
Name string
URL parameter name. String length must be at least 1.
Value string
URL parameter value. String length must be at least 1.
name String
URL parameter name. String length must be at least 1.
value String
URL parameter value. String length must be at least 1.
name string
URL parameter name. String length must be at least 1.
value string
URL parameter value. String length must be at least 1.
name str
URL parameter name. String length must be at least 1.
value str
URL parameter value. String length must be at least 1.
name String
URL parameter name. String length must be at least 1.
value String
URL parameter value. String length must be at least 1.

Import

$ pulumi import datadog:index/actionConnection:ActionConnection my_connection 11111111-2222-3333-4444-555555555555
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Datadog pulumi/pulumi-datadog
License
Apache-2.0
Notes
This Pulumi package is based on the datadog Terraform Provider.