1. Packages
  2. Sumo Logic
  3. API Docs
  4. GcpSource
Sumo Logic v0.22.1 published on Sunday, Jun 9, 2024 by Pulumi

sumologic.GcpSource

Explore with Pulumi AI

sumologic logo
Sumo Logic v0.22.1 published on Sunday, Jun 9, 2024 by Pulumi

    Provides a Sumo Logic Google Cloud Platform Source.

    Note: Google no longer requires a pub/sub domain to be verified. You no longer have to set up domain verification with your GCP Source endpoint.

    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 gcpSource = new sumologic.GcpSource("gcp_source", {
        name: "GCP Source",
        description: "My description",
        category: "gcp",
        collectorId: collector.id,
    });
    
    import pulumi
    import pulumi_sumologic as sumologic
    
    collector = sumologic.Collector("collector",
        name="my-collector",
        description="Just testing this")
    gcp_source = sumologic.GcpSource("gcp_source",
        name="GCP Source",
        description="My description",
        category="gcp",
        collector_id=collector.id)
    
    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.NewGcpSource(ctx, "gcp_source", &sumologic.GcpSourceArgs{
    			Name:        pulumi.String("GCP Source"),
    			Description: pulumi.String("My description"),
    			Category:    pulumi.String("gcp"),
    			CollectorId: collector.ID(),
    		})
    		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",
        });
    
        var gcpSource = new SumoLogic.GcpSource("gcp_source", new()
        {
            Name = "GCP Source",
            Description = "My description",
            Category = "gcp",
            CollectorId = collector.Id,
        });
    
    });
    
    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.GcpSource;
    import com.pulumi.sumologic.GcpSourceArgs;
    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 gcpSource = new GcpSource("gcpSource", GcpSourceArgs.builder()
                .name("GCP Source")
                .description("My description")
                .category("gcp")
                .collectorId(collector.id())
                .build());
    
        }
    }
    
    resources:
      gcpSource:
        type: sumologic:GcpSource
        name: gcp_source
        properties:
          name: GCP Source
          description: My description
          category: gcp
          collectorId: ${collector.id}
      collector:
        type: sumologic:Collector
        properties:
          name: my-collector
          description: Just testing this
    

    Create GcpSource Resource

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

    Constructor syntax

    new GcpSource(name: string, args: GcpSourceArgs, opts?: CustomResourceOptions);
    @overload
    def GcpSource(resource_name: str,
                  args: GcpSourceArgs,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def GcpSource(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  collector_id: Optional[int] = None,
                  filters: Optional[Sequence[GcpSourceFilterArgs]] = None,
                  use_autoline_matching: Optional[bool] = None,
                  fields: Optional[Mapping[str, str]] = None,
                  content_type: Optional[str] = None,
                  cutoff_relative_time: Optional[str] = None,
                  cutoff_timestamp: Optional[int] = None,
                  default_date_formats: Optional[Sequence[GcpSourceDefaultDateFormatArgs]] = None,
                  description: Optional[str] = None,
                  automatic_date_parsing: Optional[bool] = None,
                  category: Optional[str] = None,
                  host_name: Optional[str] = None,
                  force_timezone: Optional[bool] = None,
                  manual_prefix_regexp: Optional[str] = None,
                  message_per_request: Optional[bool] = None,
                  multiline_processing_enabled: Optional[bool] = None,
                  name: Optional[str] = None,
                  path: Optional[GcpSourcePathArgs] = None,
                  timezone: Optional[str] = None,
                  authentication: Optional[GcpSourceAuthenticationArgs] = None)
    func NewGcpSource(ctx *Context, name string, args GcpSourceArgs, opts ...ResourceOption) (*GcpSource, error)
    public GcpSource(string name, GcpSourceArgs args, CustomResourceOptions? opts = null)
    public GcpSource(String name, GcpSourceArgs args)
    public GcpSource(String name, GcpSourceArgs args, CustomResourceOptions options)
    
    type: sumologic:GcpSource
    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 GcpSourceArgs
    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 GcpSourceArgs
    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 GcpSourceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args GcpSourceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args GcpSourceArgs
    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 gcpSourceResource = new SumoLogic.GcpSource("gcpSourceResource", new()
    {
        CollectorId = 0,
        Filters = new[]
        {
            new SumoLogic.Inputs.GcpSourceFilterArgs
            {
                FilterType = "string",
                Name = "string",
                Regexp = "string",
                Mask = "string",
            },
        },
        UseAutolineMatching = false,
        Fields = 
        {
            { "string", "string" },
        },
        ContentType = "string",
        CutoffRelativeTime = "string",
        CutoffTimestamp = 0,
        DefaultDateFormats = new[]
        {
            new SumoLogic.Inputs.GcpSourceDefaultDateFormatArgs
            {
                Format = "string",
                Locator = "string",
            },
        },
        Description = "string",
        AutomaticDateParsing = false,
        Category = "string",
        HostName = "string",
        ForceTimezone = false,
        ManualPrefixRegexp = "string",
        MessagePerRequest = false,
        MultilineProcessingEnabled = false,
        Name = "string",
        Path = new SumoLogic.Inputs.GcpSourcePathArgs
        {
            Type = "string",
        },
        Timezone = "string",
        Authentication = new SumoLogic.Inputs.GcpSourceAuthenticationArgs
        {
            Type = "string",
        },
    });
    
    example, err := sumologic.NewGcpSource(ctx, "gcpSourceResource", &sumologic.GcpSourceArgs{
    	CollectorId: pulumi.Int(0),
    	Filters: sumologic.GcpSourceFilterArray{
    		&sumologic.GcpSourceFilterArgs{
    			FilterType: pulumi.String("string"),
    			Name:       pulumi.String("string"),
    			Regexp:     pulumi.String("string"),
    			Mask:       pulumi.String("string"),
    		},
    	},
    	UseAutolineMatching: pulumi.Bool(false),
    	Fields: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	ContentType:        pulumi.String("string"),
    	CutoffRelativeTime: pulumi.String("string"),
    	CutoffTimestamp:    pulumi.Int(0),
    	DefaultDateFormats: sumologic.GcpSourceDefaultDateFormatArray{
    		&sumologic.GcpSourceDefaultDateFormatArgs{
    			Format:  pulumi.String("string"),
    			Locator: pulumi.String("string"),
    		},
    	},
    	Description:                pulumi.String("string"),
    	AutomaticDateParsing:       pulumi.Bool(false),
    	Category:                   pulumi.String("string"),
    	HostName:                   pulumi.String("string"),
    	ForceTimezone:              pulumi.Bool(false),
    	ManualPrefixRegexp:         pulumi.String("string"),
    	MessagePerRequest:          pulumi.Bool(false),
    	MultilineProcessingEnabled: pulumi.Bool(false),
    	Name:                       pulumi.String("string"),
    	Path: &sumologic.GcpSourcePathArgs{
    		Type: pulumi.String("string"),
    	},
    	Timezone: pulumi.String("string"),
    	Authentication: &sumologic.GcpSourceAuthenticationArgs{
    		Type: pulumi.String("string"),
    	},
    })
    
    var gcpSourceResource = new GcpSource("gcpSourceResource", GcpSourceArgs.builder()
        .collectorId(0)
        .filters(GcpSourceFilterArgs.builder()
            .filterType("string")
            .name("string")
            .regexp("string")
            .mask("string")
            .build())
        .useAutolineMatching(false)
        .fields(Map.of("string", "string"))
        .contentType("string")
        .cutoffRelativeTime("string")
        .cutoffTimestamp(0)
        .defaultDateFormats(GcpSourceDefaultDateFormatArgs.builder()
            .format("string")
            .locator("string")
            .build())
        .description("string")
        .automaticDateParsing(false)
        .category("string")
        .hostName("string")
        .forceTimezone(false)
        .manualPrefixRegexp("string")
        .messagePerRequest(false)
        .multilineProcessingEnabled(false)
        .name("string")
        .path(GcpSourcePathArgs.builder()
            .type("string")
            .build())
        .timezone("string")
        .authentication(GcpSourceAuthenticationArgs.builder()
            .type("string")
            .build())
        .build());
    
    gcp_source_resource = sumologic.GcpSource("gcpSourceResource",
        collector_id=0,
        filters=[sumologic.GcpSourceFilterArgs(
            filter_type="string",
            name="string",
            regexp="string",
            mask="string",
        )],
        use_autoline_matching=False,
        fields={
            "string": "string",
        },
        content_type="string",
        cutoff_relative_time="string",
        cutoff_timestamp=0,
        default_date_formats=[sumologic.GcpSourceDefaultDateFormatArgs(
            format="string",
            locator="string",
        )],
        description="string",
        automatic_date_parsing=False,
        category="string",
        host_name="string",
        force_timezone=False,
        manual_prefix_regexp="string",
        message_per_request=False,
        multiline_processing_enabled=False,
        name="string",
        path=sumologic.GcpSourcePathArgs(
            type="string",
        ),
        timezone="string",
        authentication=sumologic.GcpSourceAuthenticationArgs(
            type="string",
        ))
    
    const gcpSourceResource = new sumologic.GcpSource("gcpSourceResource", {
        collectorId: 0,
        filters: [{
            filterType: "string",
            name: "string",
            regexp: "string",
            mask: "string",
        }],
        useAutolineMatching: false,
        fields: {
            string: "string",
        },
        contentType: "string",
        cutoffRelativeTime: "string",
        cutoffTimestamp: 0,
        defaultDateFormats: [{
            format: "string",
            locator: "string",
        }],
        description: "string",
        automaticDateParsing: false,
        category: "string",
        hostName: "string",
        forceTimezone: false,
        manualPrefixRegexp: "string",
        messagePerRequest: false,
        multilineProcessingEnabled: false,
        name: "string",
        path: {
            type: "string",
        },
        timezone: "string",
        authentication: {
            type: "string",
        },
    });
    
    type: sumologic:GcpSource
    properties:
        authentication:
            type: string
        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
        hostName: string
        manualPrefixRegexp: string
        messagePerRequest: false
        multilineProcessingEnabled: false
        name: string
        path:
            type: string
        timezone: string
        useAutolineMatching: false
    

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

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Url string
    The HTTP endpoint to use for sending data to this source.
    Id string
    The provider-assigned unique ID for this managed resource.
    Url string
    The HTTP endpoint to use for sending data to this source.
    id String
    The provider-assigned unique ID for this managed resource.
    url String
    The HTTP endpoint to use for sending data to this source.
    id string
    The provider-assigned unique ID for this managed resource.
    url string
    The HTTP endpoint to use for sending data to this source.
    id str
    The provider-assigned unique ID for this managed resource.
    url str
    The HTTP endpoint to use for sending data to this source.
    id String
    The provider-assigned unique ID for this managed resource.
    url String
    The HTTP endpoint to use for sending data to this source.

    Look up Existing GcpSource Resource

    Get an existing GcpSource 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?: GcpSourceState, opts?: CustomResourceOptions): GcpSource
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            authentication: Optional[GcpSourceAuthenticationArgs] = 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[GcpSourceDefaultDateFormatArgs]] = None,
            description: Optional[str] = None,
            fields: Optional[Mapping[str, str]] = None,
            filters: Optional[Sequence[GcpSourceFilterArgs]] = None,
            force_timezone: Optional[bool] = None,
            host_name: Optional[str] = None,
            manual_prefix_regexp: Optional[str] = None,
            message_per_request: Optional[bool] = None,
            multiline_processing_enabled: Optional[bool] = None,
            name: Optional[str] = None,
            path: Optional[GcpSourcePathArgs] = None,
            timezone: Optional[str] = None,
            url: Optional[str] = None,
            use_autoline_matching: Optional[bool] = None) -> GcpSource
    func GetGcpSource(ctx *Context, name string, id IDInput, state *GcpSourceState, opts ...ResourceOption) (*GcpSource, error)
    public static GcpSource Get(string name, Input<string> id, GcpSourceState? state, CustomResourceOptions? opts = null)
    public static GcpSource get(String name, Output<String> id, GcpSourceState 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:

    Supporting Types

    GcpSourceAuthentication, GcpSourceAuthenticationArgs

    Type string
    Type string
    type String
    type string
    type str
    type String

    GcpSourceDefaultDateFormat, GcpSourceDefaultDateFormatArgs

    Format string
    Locator string
    Format string
    Locator string
    format String
    locator String
    format string
    locator string
    format String
    locator String

    GcpSourceFilter, GcpSourceFilterArgs

    FilterType string
    Name string
    Regexp string
    Mask string
    FilterType string
    Name string
    Regexp string
    Mask string
    filterType String
    name String
    regexp String
    mask String
    filterType string
    name string
    regexp string
    mask string
    filterType String
    name String
    regexp String
    mask String

    GcpSourcePath, GcpSourcePathArgs

    Type string
    Type string
    type String
    type string
    type str
    type String

    Import

    Sumo Logic Google Cloud Platform sources can be imported using the collector and source IDs (collector/source), e.g.:

    hcl

    $ pulumi import sumologic:index/gcpSource:GcpSource test 100000001/100000001
    

    Sumo Logic Google Cloud Platform sources can be imported using the collector name and source name (collectorName/sourceName), e.g.:

    hcl

    $ pulumi import sumologic:index/gcpSource:GcpSource test my-test-collector/my-test-source
    

    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.
    sumologic logo
    Sumo Logic v0.22.1 published on Sunday, Jun 9, 2024 by Pulumi