1. Packages
  2. Sumologic Provider
  3. API Docs
  4. CloudSyslogSource
Sumo Logic v1.0.7 published on Friday, Apr 11, 2025 by Pulumi

sumologic.CloudSyslogSource

Explore with Pulumi AI

Provides a Sumo Logic Cloud Syslog source.

IMPORTANT: The token is stored in plain-text in the state. This is a potential security issue.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as sumologic from "@pulumi/sumologic";

const collector = new sumologic.Collector("collector", {
    name: "my-collector",
    description: "Just testing this",
});
const cloudsyslogSource = new sumologic.CloudSyslogSource("cloudsyslog_source", {
    name: "CLOUDSYSLOG",
    description: "My description",
    category: "my/source/category",
    collectorId: collector.id,
});
Copy
import pulumi
import pulumi_sumologic as sumologic

collector = sumologic.Collector("collector",
    name="my-collector",
    description="Just testing this")
cloudsyslog_source = sumologic.CloudSyslogSource("cloudsyslog_source",
    name="CLOUDSYSLOG",
    description="My description",
    category="my/source/category",
    collector_id=collector.id)
Copy
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 {
		collector, err := sumologic.NewCollector(ctx, "collector", &sumologic.CollectorArgs{
			Name:        pulumi.String("my-collector"),
			Description: pulumi.String("Just testing this"),
		})
		if err != nil {
			return err
		}
		_, err = sumologic.NewCloudSyslogSource(ctx, "cloudsyslog_source", &sumologic.CloudSyslogSourceArgs{
			Name:        pulumi.String("CLOUDSYSLOG"),
			Description: pulumi.String("My description"),
			Category:    pulumi.String("my/source/category"),
			CollectorId: collector.ID(),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using SumoLogic = Pulumi.SumoLogic;

return await Deployment.RunAsync(() => 
{
    var collector = new SumoLogic.Collector("collector", new()
    {
        Name = "my-collector",
        Description = "Just testing this",
    });

    var cloudsyslogSource = new SumoLogic.CloudSyslogSource("cloudsyslog_source", new()
    {
        Name = "CLOUDSYSLOG",
        Description = "My description",
        Category = "my/source/category",
        CollectorId = collector.Id,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.sumologic.Collector;
import com.pulumi.sumologic.CollectorArgs;
import com.pulumi.sumologic.CloudSyslogSource;
import com.pulumi.sumologic.CloudSyslogSourceArgs;
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 collector = new Collector("collector", CollectorArgs.builder()
            .name("my-collector")
            .description("Just testing this")
            .build());

        var cloudsyslogSource = new CloudSyslogSource("cloudsyslogSource", CloudSyslogSourceArgs.builder()
            .name("CLOUDSYSLOG")
            .description("My description")
            .category("my/source/category")
            .collectorId(collector.id())
            .build());

    }
}
Copy
resources:
  cloudsyslogSource:
    type: sumologic:CloudSyslogSource
    name: cloudsyslog_source
    properties:
      name: CLOUDSYSLOG
      description: My description
      category: my/source/category
      collectorId: ${collector.id}
  collector:
    type: sumologic:Collector
    properties:
      name: my-collector
      description: Just testing this
Copy

Attributes reference

The following attributes are exported:

  • id - The internal ID of the source.
  • token - The token to use for sending data to this source.

Create CloudSyslogSource Resource

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

Constructor syntax

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

@overload
def CloudSyslogSource(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      collector_id: Optional[int] = None,
                      fields: Optional[Mapping[str, str]] = None,
                      force_timezone: Optional[bool] = None,
                      content_type: Optional[str] = None,
                      cutoff_relative_time: Optional[str] = None,
                      cutoff_timestamp: Optional[int] = None,
                      default_date_formats: Optional[Sequence[CloudSyslogSourceDefaultDateFormatArgs]] = None,
                      description: Optional[str] = None,
                      automatic_date_parsing: Optional[bool] = None,
                      category: Optional[str] = None,
                      hash_algorithm: Optional[str] = None,
                      filters: Optional[Sequence[CloudSyslogSourceFilterArgs]] = None,
                      host_name: Optional[str] = None,
                      manual_prefix_regexp: Optional[str] = None,
                      multiline_processing_enabled: Optional[bool] = None,
                      name: Optional[str] = None,
                      timezone: Optional[str] = None,
                      use_autoline_matching: Optional[bool] = None)
func NewCloudSyslogSource(ctx *Context, name string, args CloudSyslogSourceArgs, opts ...ResourceOption) (*CloudSyslogSource, error)
public CloudSyslogSource(string name, CloudSyslogSourceArgs args, CustomResourceOptions? opts = null)
public CloudSyslogSource(String name, CloudSyslogSourceArgs args)
public CloudSyslogSource(String name, CloudSyslogSourceArgs args, CustomResourceOptions options)
type: sumologic:CloudSyslogSource
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. CloudSyslogSourceArgs
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. CloudSyslogSourceArgs
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. CloudSyslogSourceArgs
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. CloudSyslogSourceArgs
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. CloudSyslogSourceArgs
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 cloudSyslogSourceResource = new SumoLogic.CloudSyslogSource("cloudSyslogSourceResource", new()
{
    CollectorId = 0,
    Fields = 
    {
        { "string", "string" },
    },
    ForceTimezone = false,
    ContentType = "string",
    CutoffRelativeTime = "string",
    CutoffTimestamp = 0,
    DefaultDateFormats = new[]
    {
        new SumoLogic.Inputs.CloudSyslogSourceDefaultDateFormatArgs
        {
            Format = "string",
            Locator = "string",
        },
    },
    Description = "string",
    AutomaticDateParsing = false,
    Category = "string",
    HashAlgorithm = "string",
    Filters = new[]
    {
        new SumoLogic.Inputs.CloudSyslogSourceFilterArgs
        {
            FilterType = "string",
            Name = "string",
            Regexp = "string",
            Mask = "string",
        },
    },
    HostName = "string",
    ManualPrefixRegexp = "string",
    MultilineProcessingEnabled = false,
    Name = "string",
    Timezone = "string",
    UseAutolineMatching = false,
});
Copy
example, err := sumologic.NewCloudSyslogSource(ctx, "cloudSyslogSourceResource", &sumologic.CloudSyslogSourceArgs{
	CollectorId: pulumi.Int(0),
	Fields: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	ForceTimezone:      pulumi.Bool(false),
	ContentType:        pulumi.String("string"),
	CutoffRelativeTime: pulumi.String("string"),
	CutoffTimestamp:    pulumi.Int(0),
	DefaultDateFormats: sumologic.CloudSyslogSourceDefaultDateFormatArray{
		&sumologic.CloudSyslogSourceDefaultDateFormatArgs{
			Format:  pulumi.String("string"),
			Locator: pulumi.String("string"),
		},
	},
	Description:          pulumi.String("string"),
	AutomaticDateParsing: pulumi.Bool(false),
	Category:             pulumi.String("string"),
	HashAlgorithm:        pulumi.String("string"),
	Filters: sumologic.CloudSyslogSourceFilterArray{
		&sumologic.CloudSyslogSourceFilterArgs{
			FilterType: pulumi.String("string"),
			Name:       pulumi.String("string"),
			Regexp:     pulumi.String("string"),
			Mask:       pulumi.String("string"),
		},
	},
	HostName:                   pulumi.String("string"),
	ManualPrefixRegexp:         pulumi.String("string"),
	MultilineProcessingEnabled: pulumi.Bool(false),
	Name:                       pulumi.String("string"),
	Timezone:                   pulumi.String("string"),
	UseAutolineMatching:        pulumi.Bool(false),
})
Copy
var cloudSyslogSourceResource = new CloudSyslogSource("cloudSyslogSourceResource", CloudSyslogSourceArgs.builder()
    .collectorId(0)
    .fields(Map.of("string", "string"))
    .forceTimezone(false)
    .contentType("string")
    .cutoffRelativeTime("string")
    .cutoffTimestamp(0)
    .defaultDateFormats(CloudSyslogSourceDefaultDateFormatArgs.builder()
        .format("string")
        .locator("string")
        .build())
    .description("string")
    .automaticDateParsing(false)
    .category("string")
    .hashAlgorithm("string")
    .filters(CloudSyslogSourceFilterArgs.builder()
        .filterType("string")
        .name("string")
        .regexp("string")
        .mask("string")
        .build())
    .hostName("string")
    .manualPrefixRegexp("string")
    .multilineProcessingEnabled(false)
    .name("string")
    .timezone("string")
    .useAutolineMatching(false)
    .build());
Copy
cloud_syslog_source_resource = sumologic.CloudSyslogSource("cloudSyslogSourceResource",
    collector_id=0,
    fields={
        "string": "string",
    },
    force_timezone=False,
    content_type="string",
    cutoff_relative_time="string",
    cutoff_timestamp=0,
    default_date_formats=[{
        "format": "string",
        "locator": "string",
    }],
    description="string",
    automatic_date_parsing=False,
    category="string",
    hash_algorithm="string",
    filters=[{
        "filter_type": "string",
        "name": "string",
        "regexp": "string",
        "mask": "string",
    }],
    host_name="string",
    manual_prefix_regexp="string",
    multiline_processing_enabled=False,
    name="string",
    timezone="string",
    use_autoline_matching=False)
Copy
const cloudSyslogSourceResource = new sumologic.CloudSyslogSource("cloudSyslogSourceResource", {
    collectorId: 0,
    fields: {
        string: "string",
    },
    forceTimezone: false,
    contentType: "string",
    cutoffRelativeTime: "string",
    cutoffTimestamp: 0,
    defaultDateFormats: [{
        format: "string",
        locator: "string",
    }],
    description: "string",
    automaticDateParsing: false,
    category: "string",
    hashAlgorithm: "string",
    filters: [{
        filterType: "string",
        name: "string",
        regexp: "string",
        mask: "string",
    }],
    hostName: "string",
    manualPrefixRegexp: "string",
    multilineProcessingEnabled: false,
    name: "string",
    timezone: "string",
    useAutolineMatching: false,
});
Copy
type: sumologic:CloudSyslogSource
properties:
    automaticDateParsing: false
    category: string
    collectorId: 0
    contentType: string
    cutoffRelativeTime: string
    cutoffTimestamp: 0
    defaultDateFormats:
        - format: string
          locator: string
    description: string
    fields:
        string: string
    filters:
        - filterType: string
          mask: string
          name: string
          regexp: string
    forceTimezone: false
    hashAlgorithm: string
    hostName: string
    manualPrefixRegexp: string
    multilineProcessingEnabled: false
    name: string
    timezone: string
    useAutolineMatching: false
Copy

CloudSyslogSource 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 CloudSyslogSource resource accepts the following input properties:

CollectorId
This property is required.
Changes to this property will trigger replacement.
int
AutomaticDateParsing bool
Category string
ContentType string
CutoffRelativeTime Changes to this property will trigger replacement. string
CutoffTimestamp int
DefaultDateFormats List<Pulumi.SumoLogic.Inputs.CloudSyslogSourceDefaultDateFormat>
Description string
Fields Dictionary<string, string>
Filters List<Pulumi.SumoLogic.Inputs.CloudSyslogSourceFilter>
ForceTimezone bool
HashAlgorithm string
HostName string
ManualPrefixRegexp string
MultilineProcessingEnabled bool
Name string
Timezone string
UseAutolineMatching bool
CollectorId
This property is required.
Changes to this property will trigger replacement.
int
AutomaticDateParsing bool
Category string
ContentType string
CutoffRelativeTime Changes to this property will trigger replacement. string
CutoffTimestamp int
DefaultDateFormats []CloudSyslogSourceDefaultDateFormatArgs
Description string
Fields map[string]string
Filters []CloudSyslogSourceFilterArgs
ForceTimezone bool
HashAlgorithm string
HostName string
ManualPrefixRegexp string
MultilineProcessingEnabled bool
Name string
Timezone string
UseAutolineMatching bool
collectorId
This property is required.
Changes to this property will trigger replacement.
Integer
automaticDateParsing Boolean
category String
contentType String
cutoffRelativeTime Changes to this property will trigger replacement. String
cutoffTimestamp Integer
defaultDateFormats List<CloudSyslogSourceDefaultDateFormat>
description String
fields Map<String,String>
filters List<CloudSyslogSourceFilter>
forceTimezone Boolean
hashAlgorithm String
hostName String
manualPrefixRegexp String
multilineProcessingEnabled Boolean
name String
timezone String
useAutolineMatching Boolean
collectorId
This property is required.
Changes to this property will trigger replacement.
number
automaticDateParsing boolean
category string
contentType string
cutoffRelativeTime Changes to this property will trigger replacement. string
cutoffTimestamp number
defaultDateFormats CloudSyslogSourceDefaultDateFormat[]
description string
fields {[key: string]: string}
filters CloudSyslogSourceFilter[]
forceTimezone boolean
hashAlgorithm string
hostName string
manualPrefixRegexp string
multilineProcessingEnabled boolean
name string
timezone string
useAutolineMatching boolean
collectorId
This property is required.
Changes to this property will trigger replacement.
Number
automaticDateParsing Boolean
category String
contentType String
cutoffRelativeTime Changes to this property will trigger replacement. String
cutoffTimestamp Number
defaultDateFormats List<Property Map>
description String
fields Map<String>
filters List<Property Map>
forceTimezone Boolean
hashAlgorithm String
hostName String
manualPrefixRegexp String
multilineProcessingEnabled Boolean
name String
timezone String
useAutolineMatching Boolean

Outputs

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

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

Look up Existing CloudSyslogSource Resource

Get an existing CloudSyslogSource 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?: CloudSyslogSourceState, opts?: CustomResourceOptions): CloudSyslogSource
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        automatic_date_parsing: Optional[bool] = None,
        category: Optional[str] = None,
        collector_id: Optional[int] = None,
        content_type: Optional[str] = None,
        cutoff_relative_time: Optional[str] = None,
        cutoff_timestamp: Optional[int] = None,
        default_date_formats: Optional[Sequence[CloudSyslogSourceDefaultDateFormatArgs]] = None,
        description: Optional[str] = None,
        fields: Optional[Mapping[str, str]] = None,
        filters: Optional[Sequence[CloudSyslogSourceFilterArgs]] = None,
        force_timezone: Optional[bool] = None,
        hash_algorithm: Optional[str] = None,
        host_name: Optional[str] = None,
        manual_prefix_regexp: Optional[str] = None,
        multiline_processing_enabled: Optional[bool] = None,
        name: Optional[str] = None,
        timezone: Optional[str] = None,
        token: Optional[str] = None,
        use_autoline_matching: Optional[bool] = None) -> CloudSyslogSource
func GetCloudSyslogSource(ctx *Context, name string, id IDInput, state *CloudSyslogSourceState, opts ...ResourceOption) (*CloudSyslogSource, error)
public static CloudSyslogSource Get(string name, Input<string> id, CloudSyslogSourceState? state, CustomResourceOptions? opts = null)
public static CloudSyslogSource get(String name, Output<String> id, CloudSyslogSourceState state, CustomResourceOptions options)
resources:  _:    type: sumologic:CloudSyslogSource    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:
AutomaticDateParsing bool
Category string
CollectorId Changes to this property will trigger replacement. int
ContentType string
CutoffRelativeTime Changes to this property will trigger replacement. string
CutoffTimestamp int
DefaultDateFormats []CloudSyslogSourceDefaultDateFormatArgs
Description string
Fields map[string]string
Filters []CloudSyslogSourceFilterArgs
ForceTimezone bool
HashAlgorithm string
HostName string
ManualPrefixRegexp string
MultilineProcessingEnabled bool
Name string
Timezone string
Token string
UseAutolineMatching bool
automaticDateParsing Boolean
category String
collectorId Changes to this property will trigger replacement. Integer
contentType String
cutoffRelativeTime Changes to this property will trigger replacement. String
cutoffTimestamp Integer
defaultDateFormats List<CloudSyslogSourceDefaultDateFormat>
description String
fields Map<String,String>
filters List<CloudSyslogSourceFilter>
forceTimezone Boolean
hashAlgorithm String
hostName String
manualPrefixRegexp String
multilineProcessingEnabled Boolean
name String
timezone String
token String
useAutolineMatching Boolean
automaticDateParsing boolean
category string
collectorId Changes to this property will trigger replacement. number
contentType string
cutoffRelativeTime Changes to this property will trigger replacement. string
cutoffTimestamp number
defaultDateFormats CloudSyslogSourceDefaultDateFormat[]
description string
fields {[key: string]: string}
filters CloudSyslogSourceFilter[]
forceTimezone boolean
hashAlgorithm string
hostName string
manualPrefixRegexp string
multilineProcessingEnabled boolean
name string
timezone string
token string
useAutolineMatching boolean
automaticDateParsing Boolean
category String
collectorId Changes to this property will trigger replacement. Number
contentType String
cutoffRelativeTime Changes to this property will trigger replacement. String
cutoffTimestamp Number
defaultDateFormats List<Property Map>
description String
fields Map<String>
filters List<Property Map>
forceTimezone Boolean
hashAlgorithm String
hostName String
manualPrefixRegexp String
multilineProcessingEnabled Boolean
name String
timezone String
token String
useAutolineMatching Boolean

Supporting Types

CloudSyslogSourceDefaultDateFormat
, CloudSyslogSourceDefaultDateFormatArgs

Format This property is required. string
Locator string
Format This property is required. string
Locator string
format This property is required. String
locator String
format This property is required. string
locator string
format This property is required. str
locator str
format This property is required. String
locator String

CloudSyslogSourceFilter
, CloudSyslogSourceFilterArgs

FilterType This property is required. string
Name This property is required. string
Regexp This property is required. string
Mask string
FilterType This property is required. string
Name This property is required. string
Regexp This property is required. string
Mask string
filterType This property is required. String
name This property is required. String
regexp This property is required. String
mask String
filterType This property is required. string
name This property is required. string
regexp This property is required. string
mask string
filter_type This property is required. str
name This property is required. str
regexp This property is required. str
mask str
filterType This property is required. String
name This property is required. String
regexp This property is required. String
mask String

Import

Cloud Syslog sources can be imported using the collector and source IDs (collector/source), e.g.:

hcl

$ pulumi import sumologic:index/cloudSyslogSource:CloudSyslogSource test 123/456
Copy

HTTP sources can be imported using the collector name and source name (collectorName/sourceName), e.g.:

hcl

$ pulumi import sumologic:index/cloudSyslogSource:CloudSyslogSource test my-test-collector/my-test-source
Copy

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.