sumologic.Collector
Explore with Pulumi AI
Provides a Sumologic (Hosted) Collector.
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",
fields: {
environment: "production",
},
});
import pulumi
import pulumi_sumologic as sumologic
collector = sumologic.Collector("collector",
name="my-collector",
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{
Name: pulumi.String("my-collector"),
Description: pulumi.String("Just testing this"),
Fields: pulumi.StringMap{
"environment": pulumi.String("production"),
},
})
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 collector = new SumoLogic.Collector("collector", new()
{
Name = "my-collector",
Description = "Just testing this",
Fields =
{
{ "environment", "production" },
},
});
});
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()
.name("my-collector")
.description("Just testing this")
.fields(Map.of("environment", "production"))
.build());
}
}
resources:
collector:
type: sumologic:Collector
properties:
name: my-collector
description: Just testing this
fields:
environment: production
Create Collector Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Collector(name: string, args?: CollectorArgs, opts?: CustomResourceOptions);
@overload
def Collector(resource_name: str,
args: Optional[CollectorArgs] = None,
opts: Optional[ResourceOptions] = None)
@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)
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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var collectorResource = new SumoLogic.Collector("collectorResource", new()
{
Category = "string",
Description = "string",
Fields =
{
{ "string", "string" },
},
Name = "string",
Timezone = "string",
});
example, err := sumologic.NewCollector(ctx, "collectorResource", &sumologic.CollectorArgs{
Category: pulumi.String("string"),
Description: pulumi.String("string"),
Fields: pulumi.StringMap{
"string": pulumi.String("string"),
},
Name: pulumi.String("string"),
Timezone: pulumi.String("string"),
})
var collectorResource = new Collector("collectorResource", CollectorArgs.builder()
.category("string")
.description("string")
.fields(Map.of("string", "string"))
.name("string")
.timezone("string")
.build());
collector_resource = sumologic.Collector("collectorResource",
category="string",
description="string",
fields={
"string": "string",
},
name="string",
timezone="string")
const collectorResource = new sumologic.Collector("collectorResource", {
category: "string",
description: "string",
fields: {
string: "string",
},
name: "string",
timezone: "string",
});
type: sumologic:Collector
properties:
category: string
description: string
fields:
string: string
name: string
timezone: string
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
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.
- 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
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.