Collector

Provides a [Sumologic (Hosted) Collector][1].

Example Usage

using System.Collections.Generic;
using Pulumi;
using SumoLogic = Pulumi.SumoLogic;

return await Deployment.RunAsync(() => 
{
    var collector = new SumoLogic.Collector("collector", new()
    {
        Description = "Just testing this",
        Fields = 
        {
            { "environment", "production" },
        },
    });

});
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.NewCollector(ctx, "collector", &sumologic.CollectorArgs{
			Description: pulumi.String("Just testing this"),
			Fields: pulumi.StringMap{
				"environment": pulumi.String("production"),
			},
		})
		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.Collector;
import com.pulumi.sumologic.CollectorArgs;
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()        
            .description("Just testing this")
            .fields(Map.of("environment", "production"))
            .build());

    }
}
import pulumi
import pulumi_sumologic as sumologic

collector = sumologic.Collector("collector",
    description="Just testing this",
    fields={
        "environment": "production",
    })
import * as pulumi from "@pulumi/pulumi";
import * as sumologic from "@pulumi/sumologic";

const collector = new sumologic.Collector("collector", {
    description: "Just testing this",
    fields: {
        environment: "production",
    },
});
resources:
  collector:
    type: sumologic:Collector
    properties:
      description: Just testing this
      fields:
        environment: production

Create Collector Resource

new Collector(name: string, args?: CollectorArgs, opts?: CustomResourceOptions);
@overload
def Collector(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              category: Optional[str] = None,
              description: Optional[str] = None,
              fields: Optional[Mapping[str, str]] = None,
              name: Optional[str] = None,
              timezone: Optional[str] = None)
@overload
def Collector(resource_name: str,
              args: Optional[CollectorArgs] = None,
              opts: Optional[ResourceOptions] = None)
func NewCollector(ctx *Context, name string, args *CollectorArgs, opts ...ResourceOption) (*Collector, error)
public Collector(string name, CollectorArgs? args = null, CustomResourceOptions? opts = null)
public Collector(String name, CollectorArgs args)
public Collector(String name, CollectorArgs args, CustomResourceOptions options)
type: sumologic:Collector
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args CollectorArgs
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 CollectorArgs
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 CollectorArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args CollectorArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args CollectorArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

Category string

The default source category for any source attached to this collector. Can be overridden in the configuration of said sources.

Description string

The description of the collector.

Fields Dictionary<string, string>

Map containing [key/value pairs][3].

Name string

The name of the collector. This is required, and has to be unique. Changing this will force recreation the collector.

Timezone string

The time zone to use for this collector. The value follows the tzdata naming convention.

Category string

The default source category for any source attached to this collector. Can be overridden in the configuration of said sources.

Description string

The description of the collector.

Fields map[string]string

Map containing [key/value pairs][3].

Name string

The name of the collector. This is required, and has to be unique. Changing this will force recreation the collector.

Timezone string

The time zone to use for this collector. The value follows the tzdata naming convention.

category String

The default source category for any source attached to this collector. Can be overridden in the configuration of said sources.

description String

The description of the collector.

fields Map<String,String>

Map containing [key/value pairs][3].

name String

The name of the collector. This is required, and has to be unique. Changing this will force recreation the collector.

timezone String

The time zone to use for this collector. The value follows the tzdata naming convention.

category string

The default source category for any source attached to this collector. Can be overridden in the configuration of said sources.

description string

The description of the collector.

fields {[key: string]: string}

Map containing [key/value pairs][3].

name string

The name of the collector. This is required, and has to be unique. Changing this will force recreation the collector.

timezone string

The time zone to use for this collector. The value follows the tzdata naming convention.

category str

The default source category for any source attached to this collector. Can be overridden in the configuration of said sources.

description str

The description of the collector.

fields Mapping[str, str]

Map containing [key/value pairs][3].

name str

The name of the collector. This is required, and has to be unique. Changing this will force recreation the collector.

timezone str

The time zone to use for this collector. The value follows the tzdata naming convention.

category String

The default source category for any source attached to this collector. Can be overridden in the configuration of said sources.

description String

The description of the collector.

fields Map<String>

Map containing [key/value pairs][3].

name String

The name of the collector. This is required, and has to be unique. Changing this will force recreation the collector.

timezone String

The time zone to use for this collector. The value follows the tzdata naming convention.

Outputs

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

Get an existing Collector 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?: CollectorState, opts?: CustomResourceOptions): Collector
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        category: Optional[str] = None,
        description: Optional[str] = None,
        fields: Optional[Mapping[str, str]] = None,
        name: Optional[str] = None,
        timezone: Optional[str] = None) -> Collector
func GetCollector(ctx *Context, name string, id IDInput, state *CollectorState, opts ...ResourceOption) (*Collector, error)
public static Collector Get(string name, Input<string> id, CollectorState? state, CustomResourceOptions? opts = null)
public static Collector get(String name, Output<String> id, CollectorState 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:
Category string

The default source category for any source attached to this collector. Can be overridden in the configuration of said sources.

Description string

The description of the collector.

Fields Dictionary<string, string>

Map containing [key/value pairs][3].

Name string

The name of the collector. This is required, and has to be unique. Changing this will force recreation the collector.

Timezone string

The time zone to use for this collector. The value follows the tzdata naming convention.

Category string

The default source category for any source attached to this collector. Can be overridden in the configuration of said sources.

Description string

The description of the collector.

Fields map[string]string

Map containing [key/value pairs][3].

Name string

The name of the collector. This is required, and has to be unique. Changing this will force recreation the collector.

Timezone string

The time zone to use for this collector. The value follows the tzdata naming convention.

category String

The default source category for any source attached to this collector. Can be overridden in the configuration of said sources.

description String

The description of the collector.

fields Map<String,String>

Map containing [key/value pairs][3].

name String

The name of the collector. This is required, and has to be unique. Changing this will force recreation the collector.

timezone String

The time zone to use for this collector. The value follows the tzdata naming convention.

category string

The default source category for any source attached to this collector. Can be overridden in the configuration of said sources.

description string

The description of the collector.

fields {[key: string]: string}

Map containing [key/value pairs][3].

name string

The name of the collector. This is required, and has to be unique. Changing this will force recreation the collector.

timezone string

The time zone to use for this collector. The value follows the tzdata naming convention.

category str

The default source category for any source attached to this collector. Can be overridden in the configuration of said sources.

description str

The description of the collector.

fields Mapping[str, str]

Map containing [key/value pairs][3].

name str

The name of the collector. This is required, and has to be unique. Changing this will force recreation the collector.

timezone str

The time zone to use for this collector. The value follows the tzdata naming convention.

category String

The default source category for any source attached to this collector. Can be overridden in the configuration of said sources.

description String

The description of the collector.

fields Map<String>

Map containing [key/value pairs][3].

name String

The name of the collector. This is required, and has to be unique. Changing this will force recreation the collector.

timezone String

The time zone to use for this collector. The value follows the tzdata naming convention.

Import

Collectors can be imported using the collector id, e.g.hcl

 $ pulumi import sumologic:index/collector:Collector test 1234567890

Collectors can also be imported using the collector name, which is unique per Sumo Logic account, e.g.hcl

 $ pulumi import sumologic:index/collector:Collector test my_test_collector

[1]https://help.sumologic.com/Send_Data/Hosted_Collectors [2]https://en.wikipedia.org/wiki/Tz_database [3]https://help.sumologic.com/Manage/Fields

Package Details

Repository
https://github.com/pulumi/pulumi-sumologic
License
Apache-2.0
Notes

This Pulumi package is based on the sumologic Terraform Provider.