1. Packages
  2. Sumo Logic
  3. API Docs
  4. Connection
Sumo Logic v0.20.3 published on Wednesday, Mar 6, 2024 by Pulumi

sumologic.Connection

Explore with Pulumi AI

sumologic logo
Sumo Logic v0.20.3 published on Wednesday, Mar 6, 2024 by Pulumi

    Provides the ability to create, read, delete, update connections.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using SumoLogic = Pulumi.SumoLogic;
    
    return await Deployment.RunAsync(() => 
    {
        var connection = new SumoLogic.Connection("connection", new()
        {
            Type = "WebhookConnection",
            Description = "My description",
            Url = "https://connection-endpoint.com",
            Headers = 
            {
                { "X-Header", "my-header" },
            },
            CustomHeaders = 
            {
                { "X-custom", "my-custom-header" },
            },
            DefaultPayload = @"{
      ""client"" : ""Sumo Logic"",
      ""eventType"" : ""{{Name}}"",
      ""description"" : ""{{Description}}"",
      ""search_url"" : ""{{QueryUrl}}"",
      ""num_records"" : ""{{NumRawResults}}"",
      ""search_results"" : ""{{AggregateResultsJson}}""
    }
    ",
            ResolutionPayload = @"{
      ""client"" : ""Sumo Logic"",
      ""eventType"" : ""{{Name}}"",
      ""description"" : ""{{Description}}"",
      ""search_url"" : ""{{QueryUrl}}"",
    }
    ",
            WebhookType = "Webhook",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-sumologic/sdk/go/sumologic"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := sumologic.NewConnection(ctx, "connection", &sumologic.ConnectionArgs{
    			Type:        pulumi.String("WebhookConnection"),
    			Description: pulumi.String("My description"),
    			Url:         pulumi.String("https://connection-endpoint.com"),
    			Headers: pulumi.StringMap{
    				"X-Header": pulumi.String("my-header"),
    			},
    			CustomHeaders: pulumi.StringMap{
    				"X-custom": pulumi.String("my-custom-header"),
    			},
    			DefaultPayload: pulumi.String(`{
      "client" : "Sumo Logic",
      "eventType" : "{{Name}}",
      "description" : "{{Description}}",
      "search_url" : "{{QueryUrl}}",
      "num_records" : "{{NumRawResults}}",
      "search_results" : "{{AggregateResultsJson}}"
    }
    `),
    			ResolutionPayload: pulumi.String(`{
      "client" : "Sumo Logic",
      "eventType" : "{{Name}}",
      "description" : "{{Description}}",
      "search_url" : "{{QueryUrl}}",
    }
    `),
    			WebhookType: pulumi.String("Webhook"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.sumologic.Connection;
    import com.pulumi.sumologic.ConnectionArgs;
    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) {
            var connection = new Connection("connection", ConnectionArgs.builder()        
                .type("WebhookConnection")
                .description("My description")
                .url("https://connection-endpoint.com")
                .headers(Map.of("X-Header", "my-header"))
                .customHeaders(Map.of("X-custom", "my-custom-header"))
                .defaultPayload("""
    {
      "client" : "Sumo Logic",
      "eventType" : "{{Name}}",
      "description" : "{{Description}}",
      "search_url" : "{{QueryUrl}}",
      "num_records" : "{{NumRawResults}}",
      "search_results" : "{{AggregateResultsJson}}"
    }
                """)
                .resolutionPayload("""
    {
      "client" : "Sumo Logic",
      "eventType" : "{{Name}}",
      "description" : "{{Description}}",
      "search_url" : "{{QueryUrl}}",
    }
                """)
                .webhookType("Webhook")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_sumologic as sumologic
    
    connection = sumologic.Connection("connection",
        type="WebhookConnection",
        description="My description",
        url="https://connection-endpoint.com",
        headers={
            "X-Header": "my-header",
        },
        custom_headers={
            "X-custom": "my-custom-header",
        },
        default_payload="""{
      "client" : "Sumo Logic",
      "eventType" : "{{Name}}",
      "description" : "{{Description}}",
      "search_url" : "{{QueryUrl}}",
      "num_records" : "{{NumRawResults}}",
      "search_results" : "{{AggregateResultsJson}}"
    }
    """,
        resolution_payload="""{
      "client" : "Sumo Logic",
      "eventType" : "{{Name}}",
      "description" : "{{Description}}",
      "search_url" : "{{QueryUrl}}",
    }
    """,
        webhook_type="Webhook")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as sumologic from "@pulumi/sumologic";
    
    const connection = new sumologic.Connection("connection", {
        type: "WebhookConnection",
        description: "My description",
        url: "https://connection-endpoint.com",
        headers: {
            "X-Header": "my-header",
        },
        customHeaders: {
            "X-custom": "my-custom-header",
        },
        defaultPayload: `{
      "client" : "Sumo Logic",
      "eventType" : "{{Name}}",
      "description" : "{{Description}}",
      "search_url" : "{{QueryUrl}}",
      "num_records" : "{{NumRawResults}}",
      "search_results" : "{{AggregateResultsJson}}"
    }
    `,
        resolutionPayload: `{
      "client" : "Sumo Logic",
      "eventType" : "{{Name}}",
      "description" : "{{Description}}",
      "search_url" : "{{QueryUrl}}",
    }
    `,
        webhookType: "Webhook",
    });
    
    resources:
      connection:
        type: sumologic:Connection
        properties:
          type: WebhookConnection
          description: My description
          url: https://connection-endpoint.com
          headers:
            X-Header: my-header
          customHeaders:
            X-custom: my-custom-header
          defaultPayload: |
            {
              "client" : "Sumo Logic",
              "eventType" : "{{Name}}",
              "description" : "{{Description}}",
              "search_url" : "{{QueryUrl}}",
              "num_records" : "{{NumRawResults}}",
              "search_results" : "{{AggregateResultsJson}}"
            }        
          resolutionPayload: |
            {
              "client" : "Sumo Logic",
              "eventType" : "{{Name}}",
              "description" : "{{Description}}",
              "search_url" : "{{QueryUrl}}",
            }        
          webhookType: Webhook
    

    Create Connection Resource

    new Connection(name: string, args: ConnectionArgs, opts?: CustomResourceOptions);
    @overload
    def Connection(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   connection_subtype: Optional[str] = None,
                   custom_headers: Optional[Mapping[str, str]] = None,
                   default_payload: Optional[str] = None,
                   description: Optional[str] = None,
                   headers: Optional[Mapping[str, str]] = None,
                   name: Optional[str] = None,
                   resolution_payload: Optional[str] = None,
                   type: Optional[str] = None,
                   url: Optional[str] = None,
                   webhook_type: Optional[str] = None)
    @overload
    def Connection(resource_name: str,
                   args: ConnectionArgs,
                   opts: Optional[ResourceOptions] = None)
    func NewConnection(ctx *Context, name string, args ConnectionArgs, opts ...ResourceOption) (*Connection, error)
    public Connection(string name, ConnectionArgs args, CustomResourceOptions? opts = null)
    public Connection(String name, ConnectionArgs args)
    public Connection(String name, ConnectionArgs args, CustomResourceOptions options)
    
    type: sumologic:Connection
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args ConnectionArgs
    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 ConnectionArgs
    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 ConnectionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ConnectionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ConnectionArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Connection Resource Properties

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

    Inputs

    The Connection resource accepts the following input properties:

    DefaultPayload string
    Default payload of the webhook.
    Type string
    Type of connection. Only WebhookConnection is implemented right now.
    Url string
    URL for the webhook connection.
    ConnectionSubtype string
    The subtype of the connection. Valid values are Incident and Event. NOTE: This is only used for the ServiceNow webhook type.
    CustomHeaders Dictionary<string, string>
    Map of custom webhook headers
    Description string
    Description of the connection.
    Headers Dictionary<string, string>
    Map of access authorization headers.
    Name string
    Name of connection. Name should be a valid alphanumeric value.
    ResolutionPayload string
    Resolution payload of the webhook.
    WebhookType string

    Type of webhook. Valid values are AWSLambda, Azure, Datadog, HipChat, Jira, PagerDuty, Slack, Webhook, NewRelic, MicrosoftTeams, ServiceNow, and SumoCloudSOAR. Default: Webhook

    Additional data provided in state

    DefaultPayload string
    Default payload of the webhook.
    Type string
    Type of connection. Only WebhookConnection is implemented right now.
    Url string
    URL for the webhook connection.
    ConnectionSubtype string
    The subtype of the connection. Valid values are Incident and Event. NOTE: This is only used for the ServiceNow webhook type.
    CustomHeaders map[string]string
    Map of custom webhook headers
    Description string
    Description of the connection.
    Headers map[string]string
    Map of access authorization headers.
    Name string
    Name of connection. Name should be a valid alphanumeric value.
    ResolutionPayload string
    Resolution payload of the webhook.
    WebhookType string

    Type of webhook. Valid values are AWSLambda, Azure, Datadog, HipChat, Jira, PagerDuty, Slack, Webhook, NewRelic, MicrosoftTeams, ServiceNow, and SumoCloudSOAR. Default: Webhook

    Additional data provided in state

    defaultPayload String
    Default payload of the webhook.
    type String
    Type of connection. Only WebhookConnection is implemented right now.
    url String
    URL for the webhook connection.
    connectionSubtype String
    The subtype of the connection. Valid values are Incident and Event. NOTE: This is only used for the ServiceNow webhook type.
    customHeaders Map<String,String>
    Map of custom webhook headers
    description String
    Description of the connection.
    headers Map<String,String>
    Map of access authorization headers.
    name String
    Name of connection. Name should be a valid alphanumeric value.
    resolutionPayload String
    Resolution payload of the webhook.
    webhookType String

    Type of webhook. Valid values are AWSLambda, Azure, Datadog, HipChat, Jira, PagerDuty, Slack, Webhook, NewRelic, MicrosoftTeams, ServiceNow, and SumoCloudSOAR. Default: Webhook

    Additional data provided in state

    defaultPayload string
    Default payload of the webhook.
    type string
    Type of connection. Only WebhookConnection is implemented right now.
    url string
    URL for the webhook connection.
    connectionSubtype string
    The subtype of the connection. Valid values are Incident and Event. NOTE: This is only used for the ServiceNow webhook type.
    customHeaders {[key: string]: string}
    Map of custom webhook headers
    description string
    Description of the connection.
    headers {[key: string]: string}
    Map of access authorization headers.
    name string
    Name of connection. Name should be a valid alphanumeric value.
    resolutionPayload string
    Resolution payload of the webhook.
    webhookType string

    Type of webhook. Valid values are AWSLambda, Azure, Datadog, HipChat, Jira, PagerDuty, Slack, Webhook, NewRelic, MicrosoftTeams, ServiceNow, and SumoCloudSOAR. Default: Webhook

    Additional data provided in state

    default_payload str
    Default payload of the webhook.
    type str
    Type of connection. Only WebhookConnection is implemented right now.
    url str
    URL for the webhook connection.
    connection_subtype str
    The subtype of the connection. Valid values are Incident and Event. NOTE: This is only used for the ServiceNow webhook type.
    custom_headers Mapping[str, str]
    Map of custom webhook headers
    description str
    Description of the connection.
    headers Mapping[str, str]
    Map of access authorization headers.
    name str
    Name of connection. Name should be a valid alphanumeric value.
    resolution_payload str
    Resolution payload of the webhook.
    webhook_type str

    Type of webhook. Valid values are AWSLambda, Azure, Datadog, HipChat, Jira, PagerDuty, Slack, Webhook, NewRelic, MicrosoftTeams, ServiceNow, and SumoCloudSOAR. Default: Webhook

    Additional data provided in state

    defaultPayload String
    Default payload of the webhook.
    type String
    Type of connection. Only WebhookConnection is implemented right now.
    url String
    URL for the webhook connection.
    connectionSubtype String
    The subtype of the connection. Valid values are Incident and Event. NOTE: This is only used for the ServiceNow webhook type.
    customHeaders Map<String>
    Map of custom webhook headers
    description String
    Description of the connection.
    headers Map<String>
    Map of access authorization headers.
    name String
    Name of connection. Name should be a valid alphanumeric value.
    resolutionPayload String
    Resolution payload of the webhook.
    webhookType String

    Type of webhook. Valid values are AWSLambda, Azure, Datadog, HipChat, Jira, PagerDuty, Slack, Webhook, NewRelic, MicrosoftTeams, ServiceNow, and SumoCloudSOAR. Default: Webhook

    Additional data provided in state

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Connection 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 Connection Resource

    Get an existing Connection 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?: ConnectionState, opts?: CustomResourceOptions): Connection
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            connection_subtype: Optional[str] = None,
            custom_headers: Optional[Mapping[str, str]] = None,
            default_payload: Optional[str] = None,
            description: Optional[str] = None,
            headers: Optional[Mapping[str, str]] = None,
            name: Optional[str] = None,
            resolution_payload: Optional[str] = None,
            type: Optional[str] = None,
            url: Optional[str] = None,
            webhook_type: Optional[str] = None) -> Connection
    func GetConnection(ctx *Context, name string, id IDInput, state *ConnectionState, opts ...ResourceOption) (*Connection, error)
    public static Connection Get(string name, Input<string> id, ConnectionState? state, CustomResourceOptions? opts = null)
    public static Connection get(String name, Output<String> id, ConnectionState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    The following state arguments are supported:
    ConnectionSubtype string
    The subtype of the connection. Valid values are Incident and Event. NOTE: This is only used for the ServiceNow webhook type.
    CustomHeaders Dictionary<string, string>
    Map of custom webhook headers
    DefaultPayload string
    Default payload of the webhook.
    Description string
    Description of the connection.
    Headers Dictionary<string, string>
    Map of access authorization headers.
    Name string
    Name of connection. Name should be a valid alphanumeric value.
    ResolutionPayload string
    Resolution payload of the webhook.
    Type string
    Type of connection. Only WebhookConnection is implemented right now.
    Url string
    URL for the webhook connection.
    WebhookType string

    Type of webhook. Valid values are AWSLambda, Azure, Datadog, HipChat, Jira, PagerDuty, Slack, Webhook, NewRelic, MicrosoftTeams, ServiceNow, and SumoCloudSOAR. Default: Webhook

    Additional data provided in state

    ConnectionSubtype string
    The subtype of the connection. Valid values are Incident and Event. NOTE: This is only used for the ServiceNow webhook type.
    CustomHeaders map[string]string
    Map of custom webhook headers
    DefaultPayload string
    Default payload of the webhook.
    Description string
    Description of the connection.
    Headers map[string]string
    Map of access authorization headers.
    Name string
    Name of connection. Name should be a valid alphanumeric value.
    ResolutionPayload string
    Resolution payload of the webhook.
    Type string
    Type of connection. Only WebhookConnection is implemented right now.
    Url string
    URL for the webhook connection.
    WebhookType string

    Type of webhook. Valid values are AWSLambda, Azure, Datadog, HipChat, Jira, PagerDuty, Slack, Webhook, NewRelic, MicrosoftTeams, ServiceNow, and SumoCloudSOAR. Default: Webhook

    Additional data provided in state

    connectionSubtype String
    The subtype of the connection. Valid values are Incident and Event. NOTE: This is only used for the ServiceNow webhook type.
    customHeaders Map<String,String>
    Map of custom webhook headers
    defaultPayload String
    Default payload of the webhook.
    description String
    Description of the connection.
    headers Map<String,String>
    Map of access authorization headers.
    name String
    Name of connection. Name should be a valid alphanumeric value.
    resolutionPayload String
    Resolution payload of the webhook.
    type String
    Type of connection. Only WebhookConnection is implemented right now.
    url String
    URL for the webhook connection.
    webhookType String

    Type of webhook. Valid values are AWSLambda, Azure, Datadog, HipChat, Jira, PagerDuty, Slack, Webhook, NewRelic, MicrosoftTeams, ServiceNow, and SumoCloudSOAR. Default: Webhook

    Additional data provided in state

    connectionSubtype string
    The subtype of the connection. Valid values are Incident and Event. NOTE: This is only used for the ServiceNow webhook type.
    customHeaders {[key: string]: string}
    Map of custom webhook headers
    defaultPayload string
    Default payload of the webhook.
    description string
    Description of the connection.
    headers {[key: string]: string}
    Map of access authorization headers.
    name string
    Name of connection. Name should be a valid alphanumeric value.
    resolutionPayload string
    Resolution payload of the webhook.
    type string
    Type of connection. Only WebhookConnection is implemented right now.
    url string
    URL for the webhook connection.
    webhookType string

    Type of webhook. Valid values are AWSLambda, Azure, Datadog, HipChat, Jira, PagerDuty, Slack, Webhook, NewRelic, MicrosoftTeams, ServiceNow, and SumoCloudSOAR. Default: Webhook

    Additional data provided in state

    connection_subtype str
    The subtype of the connection. Valid values are Incident and Event. NOTE: This is only used for the ServiceNow webhook type.
    custom_headers Mapping[str, str]
    Map of custom webhook headers
    default_payload str
    Default payload of the webhook.
    description str
    Description of the connection.
    headers Mapping[str, str]
    Map of access authorization headers.
    name str
    Name of connection. Name should be a valid alphanumeric value.
    resolution_payload str
    Resolution payload of the webhook.
    type str
    Type of connection. Only WebhookConnection is implemented right now.
    url str
    URL for the webhook connection.
    webhook_type str

    Type of webhook. Valid values are AWSLambda, Azure, Datadog, HipChat, Jira, PagerDuty, Slack, Webhook, NewRelic, MicrosoftTeams, ServiceNow, and SumoCloudSOAR. Default: Webhook

    Additional data provided in state

    connectionSubtype String
    The subtype of the connection. Valid values are Incident and Event. NOTE: This is only used for the ServiceNow webhook type.
    customHeaders Map<String>
    Map of custom webhook headers
    defaultPayload String
    Default payload of the webhook.
    description String
    Description of the connection.
    headers Map<String>
    Map of access authorization headers.
    name String
    Name of connection. Name should be a valid alphanumeric value.
    resolutionPayload String
    Resolution payload of the webhook.
    type String
    Type of connection. Only WebhookConnection is implemented right now.
    url String
    URL for the webhook connection.
    webhookType String

    Type of webhook. Valid values are AWSLambda, Azure, Datadog, HipChat, Jira, PagerDuty, Slack, Webhook, NewRelic, MicrosoftTeams, ServiceNow, and SumoCloudSOAR. Default: Webhook

    Additional data provided in state

    Import

    Connections can be imported using the connection id, e.g.:

    hcl

    $ pulumi import sumologic:index/connection:Connection test 1234567890
    

    Package Details

    Repository
    Sumo Logic pulumi/pulumi-sumologic
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the sumologic Terraform Provider.
    sumologic logo
    Sumo Logic v0.20.3 published on Wednesday, Mar 6, 2024 by Pulumi