1. Packages
  2. Sumo Logic
  3. API Docs
  4. CloudToCloudSource
Sumo Logic v0.23.4 published on Friday, Sep 20, 2024 by Pulumi

sumologic.CloudToCloudSource

Explore with Pulumi AI

sumologic logo
Sumo Logic v0.23.4 published on Friday, Sep 20, 2024 by Pulumi

    Provides a Sumologic Cloud-to-Cloud source.

    Supported Integrations

    List of available integrations along with their corresponding JSON templates is present here

    IMPORTANT: The API credentials are 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 oktaSource = new sumologic.CloudToCloudSource("okta_source", {
        collectorId: collector.id,
        schemaRef: {
            type: "Okta",
        },
        config: JSON.stringify({
            name: "okta source",
            domain: "dev-xxx-admin.okta.com",
            collectAll: true,
            apiKey: "xxx",
            fields: {
                _siemForward: false,
            },
            pollingInterval: 30,
        }),
    });
    
    import pulumi
    import json
    import pulumi_sumologic as sumologic
    
    collector = sumologic.Collector("collector",
        name="my-collector",
        description="Just testing this")
    okta_source = sumologic.CloudToCloudSource("okta_source",
        collector_id=collector.id,
        schema_ref={
            "type": "Okta",
        },
        config=json.dumps({
            "name": "okta source",
            "domain": "dev-xxx-admin.okta.com",
            "collectAll": True,
            "apiKey": "xxx",
            "fields": {
                "_siemForward": False,
            },
            "pollingInterval": 30,
        }))
    
    package main
    
    import (
    	"encoding/json"
    
    	"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
    		}
    		tmpJSON0, err := json.Marshal(map[string]interface{}{
    			"name":       "okta source",
    			"domain":     "dev-xxx-admin.okta.com",
    			"collectAll": true,
    			"apiKey":     "xxx",
    			"fields": map[string]interface{}{
    				"_siemForward": false,
    			},
    			"pollingInterval": 30,
    		})
    		if err != nil {
    			return err
    		}
    		json0 := string(tmpJSON0)
    		_, err = sumologic.NewCloudToCloudSource(ctx, "okta_source", &sumologic.CloudToCloudSourceArgs{
    			CollectorId: collector.ID(),
    			SchemaRef: pulumi.StringMap{
    				"type": pulumi.String("Okta"),
    			},
    			Config: pulumi.String(json0),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using System.Text.Json;
    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 oktaSource = new SumoLogic.CloudToCloudSource("okta_source", new()
        {
            CollectorId = collector.Id,
            SchemaRef = 
            {
                { "type", "Okta" },
            },
            Config = JsonSerializer.Serialize(new Dictionary<string, object?>
            {
                ["name"] = "okta source",
                ["domain"] = "dev-xxx-admin.okta.com",
                ["collectAll"] = true,
                ["apiKey"] = "xxx",
                ["fields"] = new Dictionary<string, object?>
                {
                    ["_siemForward"] = false,
                },
                ["pollingInterval"] = 30,
            }),
        });
    
    });
    
    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.CloudToCloudSource;
    import com.pulumi.sumologic.CloudToCloudSourceArgs;
    import static com.pulumi.codegen.internal.Serialization.*;
    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 oktaSource = new CloudToCloudSource("oktaSource", CloudToCloudSourceArgs.builder()
                .collectorId(collector.id())
                .schemaRef(Map.of("type", "Okta"))
                .config(serializeJson(
                    jsonObject(
                        jsonProperty("name", "okta source"),
                        jsonProperty("domain", "dev-xxx-admin.okta.com"),
                        jsonProperty("collectAll", true),
                        jsonProperty("apiKey", "xxx"),
                        jsonProperty("fields", jsonObject(
                            jsonProperty("_siemForward", false)
                        )),
                        jsonProperty("pollingInterval", 30)
                    )))
                .build());
    
        }
    }
    
    resources:
      oktaSource:
        type: sumologic:CloudToCloudSource
        name: okta_source
        properties:
          collectorId: ${collector.id}
          schemaRef:
            type: Okta
          config:
            fn::toJSON:
              name: okta source
              domain: dev-xxx-admin.okta.com
              collectAll: true
              apiKey: xxx
              fields:
                _siemForward: false
              pollingInterval: 30
      collector:
        type: sumologic:Collector
        properties:
          name: my-collector
          description: Just testing this
    

    Create CloudToCloudSource Resource

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

    Constructor syntax

    new CloudToCloudSource(name: string, args: CloudToCloudSourceArgs, opts?: CustomResourceOptions);
    @overload
    def CloudToCloudSource(resource_name: str,
                           args: CloudToCloudSourceArgs,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def CloudToCloudSource(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           collector_id: Optional[int] = None,
                           config: Optional[str] = None,
                           schema_ref: Optional[Mapping[str, str]] = None)
    func NewCloudToCloudSource(ctx *Context, name string, args CloudToCloudSourceArgs, opts ...ResourceOption) (*CloudToCloudSource, error)
    public CloudToCloudSource(string name, CloudToCloudSourceArgs args, CustomResourceOptions? opts = null)
    public CloudToCloudSource(String name, CloudToCloudSourceArgs args)
    public CloudToCloudSource(String name, CloudToCloudSourceArgs args, CustomResourceOptions options)
    
    type: sumologic:CloudToCloudSource
    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 CloudToCloudSourceArgs
    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 CloudToCloudSourceArgs
    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 CloudToCloudSourceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CloudToCloudSourceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CloudToCloudSourceArgs
    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 cloudToCloudSourceResource = new SumoLogic.CloudToCloudSource("cloudToCloudSourceResource", new()
    {
        CollectorId = 0,
        Config = "string",
        SchemaRef = 
        {
            { "string", "string" },
        },
    });
    
    example, err := sumologic.NewCloudToCloudSource(ctx, "cloudToCloudSourceResource", &sumologic.CloudToCloudSourceArgs{
    	CollectorId: pulumi.Int(0),
    	Config:      pulumi.String("string"),
    	SchemaRef: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var cloudToCloudSourceResource = new CloudToCloudSource("cloudToCloudSourceResource", CloudToCloudSourceArgs.builder()
        .collectorId(0)
        .config("string")
        .schemaRef(Map.of("string", "string"))
        .build());
    
    cloud_to_cloud_source_resource = sumologic.CloudToCloudSource("cloudToCloudSourceResource",
        collector_id=0,
        config="string",
        schema_ref={
            "string": "string",
        })
    
    const cloudToCloudSourceResource = new sumologic.CloudToCloudSource("cloudToCloudSourceResource", {
        collectorId: 0,
        config: "string",
        schemaRef: {
            string: "string",
        },
    });
    
    type: sumologic:CloudToCloudSource
    properties:
        collectorId: 0
        config: string
        schemaRef:
            string: string
    

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

    CollectorId int
    Config string
    This is a JSON object which contains the configuration parameters for the Source. Each schema type requires different JSON parameters. Refer to JSON Configuration and Config Parameters sections in the integration page for the specific type you have chosen to create.
    SchemaRef Dictionary<string, string>
    Source schema details.
    CollectorId int
    Config string
    This is a JSON object which contains the configuration parameters for the Source. Each schema type requires different JSON parameters. Refer to JSON Configuration and Config Parameters sections in the integration page for the specific type you have chosen to create.
    SchemaRef map[string]string
    Source schema details.
    collectorId Integer
    config String
    This is a JSON object which contains the configuration parameters for the Source. Each schema type requires different JSON parameters. Refer to JSON Configuration and Config Parameters sections in the integration page for the specific type you have chosen to create.
    schemaRef Map<String,String>
    Source schema details.
    collectorId number
    config string
    This is a JSON object which contains the configuration parameters for the Source. Each schema type requires different JSON parameters. Refer to JSON Configuration and Config Parameters sections in the integration page for the specific type you have chosen to create.
    schemaRef {[key: string]: string}
    Source schema details.
    collector_id int
    config str
    This is a JSON object which contains the configuration parameters for the Source. Each schema type requires different JSON parameters. Refer to JSON Configuration and Config Parameters sections in the integration page for the specific type you have chosen to create.
    schema_ref Mapping[str, str]
    Source schema details.
    collectorId Number
    config String
    This is a JSON object which contains the configuration parameters for the Source. Each schema type requires different JSON parameters. Refer to JSON Configuration and Config Parameters sections in the integration page for the specific type you have chosen to create.
    schemaRef Map<String>
    Source schema details.

    Outputs

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

    Get an existing CloudToCloudSource 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?: CloudToCloudSourceState, opts?: CustomResourceOptions): CloudToCloudSource
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            collector_id: Optional[int] = None,
            config: Optional[str] = None,
            schema_ref: Optional[Mapping[str, str]] = None) -> CloudToCloudSource
    func GetCloudToCloudSource(ctx *Context, name string, id IDInput, state *CloudToCloudSourceState, opts ...ResourceOption) (*CloudToCloudSource, error)
    public static CloudToCloudSource Get(string name, Input<string> id, CloudToCloudSourceState? state, CustomResourceOptions? opts = null)
    public static CloudToCloudSource get(String name, Output<String> id, CloudToCloudSourceState 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:
    CollectorId int
    Config string
    This is a JSON object which contains the configuration parameters for the Source. Each schema type requires different JSON parameters. Refer to JSON Configuration and Config Parameters sections in the integration page for the specific type you have chosen to create.
    SchemaRef Dictionary<string, string>
    Source schema details.
    CollectorId int
    Config string
    This is a JSON object which contains the configuration parameters for the Source. Each schema type requires different JSON parameters. Refer to JSON Configuration and Config Parameters sections in the integration page for the specific type you have chosen to create.
    SchemaRef map[string]string
    Source schema details.
    collectorId Integer
    config String
    This is a JSON object which contains the configuration parameters for the Source. Each schema type requires different JSON parameters. Refer to JSON Configuration and Config Parameters sections in the integration page for the specific type you have chosen to create.
    schemaRef Map<String,String>
    Source schema details.
    collectorId number
    config string
    This is a JSON object which contains the configuration parameters for the Source. Each schema type requires different JSON parameters. Refer to JSON Configuration and Config Parameters sections in the integration page for the specific type you have chosen to create.
    schemaRef {[key: string]: string}
    Source schema details.
    collector_id int
    config str
    This is a JSON object which contains the configuration parameters for the Source. Each schema type requires different JSON parameters. Refer to JSON Configuration and Config Parameters sections in the integration page for the specific type you have chosen to create.
    schema_ref Mapping[str, str]
    Source schema details.
    collectorId Number
    config String
    This is a JSON object which contains the configuration parameters for the Source. Each schema type requires different JSON parameters. Refer to JSON Configuration and Config Parameters sections in the integration page for the specific type you have chosen to create.
    schemaRef Map<String>
    Source schema details.

    Import

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

    hcl

    $ pulumi import sumologic:index/cloudToCloudSource:CloudToCloudSource test 100000001/100000001
    

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

    hcl

    $ pulumi import sumologic:index/cloudToCloudSource:CloudToCloudSource 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.23.4 published on Friday, Sep 20, 2024 by Pulumi