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());
    }
}
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 }}'
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 string
- The unique name of the resource.
- args ActionConnectionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args 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 string
- The unique name of the resource.
- args ActionConnectionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ActionConnectionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
                },
            },
        },
    },
});
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"),
				},
			},
		},
	},
})
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());
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",
            }],
        },
    })
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",
            }],
        },
    },
});
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
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 string
- Name of the connection
- Aws
ActionConnection Aws 
- Configuration for an AWS connection
- Http
ActionConnection Http 
- Configuration for an HTTP connection
- Name string
- Name of the connection
- Aws
ActionConnection Aws Args 
- Configuration for an AWS connection
- Http
ActionConnection Http Args 
- Configuration for an HTTP connection
- name String
- Name of the connection
- aws
ActionConnection Aws 
- Configuration for an AWS connection
- http
ActionConnection Http 
- Configuration for an HTTP connection
- name string
- Name of the connection
- aws
ActionConnection Aws 
- Configuration for an AWS connection
- http
ActionConnection Http 
- Configuration for an HTTP connection
- name str
- Name of the connection
- aws
ActionConnection Aws Args 
- Configuration for an AWS connection
- http
ActionConnection Http Args 
- Configuration for an HTTP connection
- name 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) -> ActionConnectionfunc 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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.
- Aws
ActionConnection Aws 
- Configuration for an AWS connection
- Http
ActionConnection Http 
- Configuration for an HTTP connection
- Name string
- Name of the connection
- Aws
ActionConnection Aws Args 
- Configuration for an AWS connection
- Http
ActionConnection Http Args 
- Configuration for an HTTP connection
- Name string
- Name of the connection
- aws
ActionConnection Aws 
- Configuration for an AWS connection
- http
ActionConnection Http 
- Configuration for an HTTP connection
- name String
- Name of the connection
- aws
ActionConnection Aws 
- Configuration for an AWS connection
- http
ActionConnection Http 
- Configuration for an HTTP connection
- name string
- Name of the connection
- aws
ActionConnection Aws Args 
- Configuration for an AWS connection
- http
ActionConnection Http Args 
- 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 ActionConnection Aws Assume Role 
- Configuration for an assume role AWS connection
- AssumeRole ActionConnection Aws Assume Role 
- Configuration for an assume role AWS connection
- assumeRole ActionConnection Aws Assume Role 
- Configuration for an assume role AWS connection
- assumeRole ActionConnection Aws Assume Role 
- Configuration for an assume role AWS connection
- assume_role ActionConnection Aws Assume Role 
- 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
- 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
- AccountId string
- AWS account that the connection is created for
- 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
- accountId String
- AWS account that the connection is created for
- 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
- accountId string
- AWS account that the connection is created for
- 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
- account_id str
- AWS account that the connection is created for
- 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
- accountId String
- AWS account that the connection is created for
- 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
ActionConnectionHttp, ActionConnectionHttpArgs      
- BaseUrl string
- Base HTTP url for the integration
- TokenAuth ActionConnection Http Token Auth 
- Configuration for an HTTP connection that uses token auth
- BaseUrl string
- Base HTTP url for the integration
- TokenAuth ActionConnection Http Token Auth 
- Configuration for an HTTP connection that uses token auth
- baseUrl String
- Base HTTP url for the integration
- tokenAuth ActionConnection Http Token Auth 
- Configuration for an HTTP connection that uses token auth
- baseUrl string
- Base HTTP url for the integration
- tokenAuth ActionConnection Http Token Auth 
- Configuration for an HTTP connection that uses token auth
- base_url str
- Base HTTP url for the integration
- token_auth ActionConnection Http Token Auth 
- Configuration for an HTTP connection that uses token auth
- baseUrl String
- Base HTTP url for the integration
- tokenAuth Property Map
- Configuration for an HTTP connection that uses token auth
ActionConnectionHttpTokenAuth, ActionConnectionHttpTokenAuthArgs          
- Body
ActionConnection Http Token Auth Body 
- Body for HTTP authentication
- Headers
List<ActionConnection Http Token Auth Header> 
- Header for HTTP authentication
- Tokens
List<ActionConnection Http Token Auth Token> 
- Token for HTTP authentication
- UrlParameters List<ActionConnection Http Token Auth Url Parameter> 
- URL parameter for HTTP authentication
- Body
ActionConnection Http Token Auth Body 
- Body for HTTP authentication
- Headers
[]ActionConnection Http Token Auth Header 
- Header for HTTP authentication
- Tokens
[]ActionConnection Http Token Auth Token 
- Token for HTTP authentication
- UrlParameters []ActionConnection Http Token Auth Url Parameter 
- URL parameter for HTTP authentication
- body
ActionConnection Http Token Auth Body 
- Body for HTTP authentication
- headers
List<ActionConnection Http Token Auth Header> 
- Header for HTTP authentication
- tokens
List<ActionConnection Http Token Auth Token> 
- Token for HTTP authentication
- urlParameters List<ActionConnection Http Token Auth Url Parameter> 
- URL parameter for HTTP authentication
- body
ActionConnection Http Token Auth Body 
- Body for HTTP authentication
- headers
ActionConnection Http Token Auth Header[] 
- Header for HTTP authentication
- tokens
ActionConnection Http Token Auth Token[] 
- Token for HTTP authentication
- urlParameters ActionConnection Http Token Auth Url Parameter[] 
- URL parameter for HTTP authentication
- body
ActionConnection Http Token Auth Body 
- Body for HTTP authentication
- headers
Sequence[ActionConnection Http Token Auth Header] 
- Header for HTTP authentication
- tokens
Sequence[ActionConnection Http Token Auth Token] 
- Token for HTTP authentication
- url_parameters Sequence[ActionConnection Http Token Auth Url Parameter] 
- 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
- ContentType string
- Content type of the body
- Content string
- Serialized body content
- ContentType string
- Content type of the body
- content String
- Serialized body content
- contentType String
- Content type of the body
- content string
- Serialized body content
- contentType string
- Content type of the body
- content str
- Serialized body content
- content_type str
- Content type of the body
- content String
- Serialized body content
- contentType String
- Content type of the body
ActionConnectionHttpTokenAuthHeader, ActionConnectionHttpTokenAuthHeaderArgs            
ActionConnectionHttpTokenAuthToken, ActionConnectionHttpTokenAuthTokenArgs            
ActionConnectionHttpTokenAuthUrlParameter, ActionConnectionHttpTokenAuthUrlParameterArgs              
Import
$ pulumi import datadog:index/actionConnection:ActionConnection my_connection 11111111-2222-3333-4444-555555555555
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 datadogTerraform Provider.