sumologic.Connection
Explore with Pulumi AI
Provides the ability to create, read, delete, update connections.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as sumologic from "@pulumi/sumologic";
const connection = new sumologic.Connection("connection", {
type: "WebhookConnection",
name: "test-connection",
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",
});
import pulumi
import pulumi_sumologic as sumologic
connection = sumologic.Connection("connection",
type="WebhookConnection",
name="test-connection",
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")
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"),
Name: pulumi.String("test-connection"),
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
})
}
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",
Name = "test-connection",
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 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")
.name("test-connection")
.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());
}
}
resources:
connection:
type: sumologic:Connection
properties:
type: WebhookConnection
name: test-connection
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
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Connection(name: string, args: ConnectionArgs, opts?: CustomResourceOptions);
@overload
def Connection(resource_name: str,
args: ConnectionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Connection(resource_name: str,
opts: Optional[ResourceOptions] = None,
default_payload: Optional[str] = None,
type: Optional[str] = None,
url: Optional[str] = None,
connection_subtype: Optional[str] = None,
custom_headers: Optional[Mapping[str, str]] = None,
description: Optional[str] = None,
headers: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
resolution_payload: Optional[str] = None,
webhook_type: Optional[str] = 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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var connectionResource = new SumoLogic.Connection("connectionResource", new()
{
DefaultPayload = "string",
Type = "string",
Url = "string",
ConnectionSubtype = "string",
CustomHeaders =
{
{ "string", "string" },
},
Description = "string",
Headers =
{
{ "string", "string" },
},
Name = "string",
ResolutionPayload = "string",
WebhookType = "string",
});
example, err := sumologic.NewConnection(ctx, "connectionResource", &sumologic.ConnectionArgs{
DefaultPayload: pulumi.String("string"),
Type: pulumi.String("string"),
Url: pulumi.String("string"),
ConnectionSubtype: pulumi.String("string"),
CustomHeaders: pulumi.StringMap{
"string": pulumi.String("string"),
},
Description: pulumi.String("string"),
Headers: pulumi.StringMap{
"string": pulumi.String("string"),
},
Name: pulumi.String("string"),
ResolutionPayload: pulumi.String("string"),
WebhookType: pulumi.String("string"),
})
var connectionResource = new Connection("connectionResource", ConnectionArgs.builder()
.defaultPayload("string")
.type("string")
.url("string")
.connectionSubtype("string")
.customHeaders(Map.of("string", "string"))
.description("string")
.headers(Map.of("string", "string"))
.name("string")
.resolutionPayload("string")
.webhookType("string")
.build());
connection_resource = sumologic.Connection("connectionResource",
default_payload="string",
type="string",
url="string",
connection_subtype="string",
custom_headers={
"string": "string",
},
description="string",
headers={
"string": "string",
},
name="string",
resolution_payload="string",
webhook_type="string")
const connectionResource = new sumologic.Connection("connectionResource", {
defaultPayload: "string",
type: "string",
url: "string",
connectionSubtype: "string",
customHeaders: {
string: "string",
},
description: "string",
headers: {
string: "string",
},
name: "string",
resolutionPayload: "string",
webhookType: "string",
});
type: sumologic:Connection
properties:
connectionSubtype: string
customHeaders:
string: string
defaultPayload: string
description: string
headers:
string: string
name: string
resolutionPayload: string
type: string
url: string
webhookType: string
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Connection resource accepts the following input properties:
- Default
Payload string - Default payload of the webhook.
- Type string
- Type of connection. Only
WebhookConnection
is implemented right now. - Url string
- URL for the webhook connection.
- Connection
Subtype string - The subtype of the connection. Valid values are
Incident
andEvent
. NOTE: This is only used for theServiceNow
webhook type. - Custom
Headers 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.
- Resolution
Payload string - Resolution payload of the webhook.
- Webhook
Type string Type of webhook. Valid values are
AWSLambda
,Azure
,Datadog
,HipChat
,Jira
,PagerDuty
,Slack
,Webhook
,NewRelic
,MicrosoftTeams
,ServiceNow
, andSumoCloudSOAR
. Default:Webhook
Additional data provided in state
- Default
Payload string - Default payload of the webhook.
- Type string
- Type of connection. Only
WebhookConnection
is implemented right now. - Url string
- URL for the webhook connection.
- Connection
Subtype string - The subtype of the connection. Valid values are
Incident
andEvent
. NOTE: This is only used for theServiceNow
webhook type. - Custom
Headers 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.
- Resolution
Payload string - Resolution payload of the webhook.
- Webhook
Type string Type of webhook. Valid values are
AWSLambda
,Azure
,Datadog
,HipChat
,Jira
,PagerDuty
,Slack
,Webhook
,NewRelic
,MicrosoftTeams
,ServiceNow
, andSumoCloudSOAR
. Default:Webhook
Additional data provided in state
- default
Payload String - Default payload of the webhook.
- type String
- Type of connection. Only
WebhookConnection
is implemented right now. - url String
- URL for the webhook connection.
- connection
Subtype String - The subtype of the connection. Valid values are
Incident
andEvent
. NOTE: This is only used for theServiceNow
webhook type. - custom
Headers 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.
- resolution
Payload String - Resolution payload of the webhook.
- webhook
Type String Type of webhook. Valid values are
AWSLambda
,Azure
,Datadog
,HipChat
,Jira
,PagerDuty
,Slack
,Webhook
,NewRelic
,MicrosoftTeams
,ServiceNow
, andSumoCloudSOAR
. Default:Webhook
Additional data provided in state
- default
Payload string - Default payload of the webhook.
- type string
- Type of connection. Only
WebhookConnection
is implemented right now. - url string
- URL for the webhook connection.
- connection
Subtype string - The subtype of the connection. Valid values are
Incident
andEvent
. NOTE: This is only used for theServiceNow
webhook type. - custom
Headers {[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.
- resolution
Payload string - Resolution payload of the webhook.
- webhook
Type string Type of webhook. Valid values are
AWSLambda
,Azure
,Datadog
,HipChat
,Jira
,PagerDuty
,Slack
,Webhook
,NewRelic
,MicrosoftTeams
,ServiceNow
, andSumoCloudSOAR
. 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
andEvent
. NOTE: This is only used for theServiceNow
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
, andSumoCloudSOAR
. Default:Webhook
Additional data provided in state
- default
Payload String - Default payload of the webhook.
- type String
- Type of connection. Only
WebhookConnection
is implemented right now. - url String
- URL for the webhook connection.
- connection
Subtype String - The subtype of the connection. Valid values are
Incident
andEvent
. NOTE: This is only used for theServiceNow
webhook type. - custom
Headers 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.
- resolution
Payload String - Resolution payload of the webhook.
- webhook
Type String Type of webhook. Valid values are
AWSLambda
,Azure
,Datadog
,HipChat
,Jira
,PagerDuty
,Slack
,Webhook
,NewRelic
,MicrosoftTeams
,ServiceNow
, andSumoCloudSOAR
. 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.
- Connection
Subtype string - The subtype of the connection. Valid values are
Incident
andEvent
. NOTE: This is only used for theServiceNow
webhook type. - Custom
Headers Dictionary<string, string> - Map of custom webhook headers
- Default
Payload 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.
- Resolution
Payload string - Resolution payload of the webhook.
- Type string
- Type of connection. Only
WebhookConnection
is implemented right now. - Url string
- URL for the webhook connection.
- Webhook
Type string Type of webhook. Valid values are
AWSLambda
,Azure
,Datadog
,HipChat
,Jira
,PagerDuty
,Slack
,Webhook
,NewRelic
,MicrosoftTeams
,ServiceNow
, andSumoCloudSOAR
. Default:Webhook
Additional data provided in state
- Connection
Subtype string - The subtype of the connection. Valid values are
Incident
andEvent
. NOTE: This is only used for theServiceNow
webhook type. - Custom
Headers map[string]string - Map of custom webhook headers
- Default
Payload 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.
- Resolution
Payload string - Resolution payload of the webhook.
- Type string
- Type of connection. Only
WebhookConnection
is implemented right now. - Url string
- URL for the webhook connection.
- Webhook
Type string Type of webhook. Valid values are
AWSLambda
,Azure
,Datadog
,HipChat
,Jira
,PagerDuty
,Slack
,Webhook
,NewRelic
,MicrosoftTeams
,ServiceNow
, andSumoCloudSOAR
. Default:Webhook
Additional data provided in state
- connection
Subtype String - The subtype of the connection. Valid values are
Incident
andEvent
. NOTE: This is only used for theServiceNow
webhook type. - custom
Headers Map<String,String> - Map of custom webhook headers
- default
Payload 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.
- resolution
Payload String - Resolution payload of the webhook.
- type String
- Type of connection. Only
WebhookConnection
is implemented right now. - url String
- URL for the webhook connection.
- webhook
Type String Type of webhook. Valid values are
AWSLambda
,Azure
,Datadog
,HipChat
,Jira
,PagerDuty
,Slack
,Webhook
,NewRelic
,MicrosoftTeams
,ServiceNow
, andSumoCloudSOAR
. Default:Webhook
Additional data provided in state
- connection
Subtype string - The subtype of the connection. Valid values are
Incident
andEvent
. NOTE: This is only used for theServiceNow
webhook type. - custom
Headers {[key: string]: string} - Map of custom webhook headers
- default
Payload 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.
- resolution
Payload string - Resolution payload of the webhook.
- type string
- Type of connection. Only
WebhookConnection
is implemented right now. - url string
- URL for the webhook connection.
- webhook
Type string Type of webhook. Valid values are
AWSLambda
,Azure
,Datadog
,HipChat
,Jira
,PagerDuty
,Slack
,Webhook
,NewRelic
,MicrosoftTeams
,ServiceNow
, andSumoCloudSOAR
. Default:Webhook
Additional data provided in state
- connection_
subtype str - The subtype of the connection. Valid values are
Incident
andEvent
. NOTE: This is only used for theServiceNow
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
, andSumoCloudSOAR
. Default:Webhook
Additional data provided in state
- connection
Subtype String - The subtype of the connection. Valid values are
Incident
andEvent
. NOTE: This is only used for theServiceNow
webhook type. - custom
Headers Map<String> - Map of custom webhook headers
- default
Payload 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.
- resolution
Payload String - Resolution payload of the webhook.
- type String
- Type of connection. Only
WebhookConnection
is implemented right now. - url String
- URL for the webhook connection.
- webhook
Type String Type of webhook. Valid values are
AWSLambda
,Azure
,Datadog
,HipChat
,Jira
,PagerDuty
,Slack
,Webhook
,NewRelic
,MicrosoftTeams
,ServiceNow
, andSumoCloudSOAR
. 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
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Sumo Logic pulumi/pulumi-sumologic
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
sumologic
Terraform Provider.