1. Packages
  2. Sumologic Provider
  3. API Docs
  4. CseContextAction
Sumo Logic v1.0.0 published on Wednesday, Dec 11, 2024 by Pulumi

sumologic.CseContextAction

Explore with Pulumi AI

sumologic logo
Sumo Logic v1.0.0 published on Wednesday, Dec 11, 2024 by Pulumi

    Provides a Sumologic CSE Context Action.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as sumologic from "@pulumi/sumologic";
    
    const contextAction = new sumologic.CseContextAction("context_action", {
        name: "Context Action Name",
        type: "URL",
        template: "https://bar.com/?q={{value}}",
        iocTypes: ["IP_ADDRESS"],
        entityTypes: ["_hostname"],
        recordFields: ["request_url"],
        allRecordFields: false,
        enabled: true,
    });
    
    import pulumi
    import pulumi_sumologic as sumologic
    
    context_action = sumologic.CseContextAction("context_action",
        name="Context Action Name",
        type="URL",
        template="https://bar.com/?q={{value}}",
        ioc_types=["IP_ADDRESS"],
        entity_types=["_hostname"],
        record_fields=["request_url"],
        all_record_fields=False,
        enabled=True)
    
    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.NewCseContextAction(ctx, "context_action", &sumologic.CseContextActionArgs{
    			Name:     pulumi.String("Context Action Name"),
    			Type:     pulumi.String("URL"),
    			Template: pulumi.String("https://bar.com/?q={{value}}"),
    			IocTypes: pulumi.StringArray{
    				pulumi.String("IP_ADDRESS"),
    			},
    			EntityTypes: pulumi.StringArray{
    				pulumi.String("_hostname"),
    			},
    			RecordFields: pulumi.StringArray{
    				pulumi.String("request_url"),
    			},
    			AllRecordFields: pulumi.Bool(false),
    			Enabled:         pulumi.Bool(true),
    		})
    		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 contextAction = new SumoLogic.CseContextAction("context_action", new()
        {
            Name = "Context Action Name",
            Type = "URL",
            Template = "https://bar.com/?q={{value}}",
            IocTypes = new[]
            {
                "IP_ADDRESS",
            },
            EntityTypes = new[]
            {
                "_hostname",
            },
            RecordFields = new[]
            {
                "request_url",
            },
            AllRecordFields = false,
            Enabled = true,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.sumologic.CseContextAction;
    import com.pulumi.sumologic.CseContextActionArgs;
    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 contextAction = new CseContextAction("contextAction", CseContextActionArgs.builder()
                .name("Context Action Name")
                .type("URL")
                .template("https://bar.com/?q={{value}}")
                .iocTypes("IP_ADDRESS")
                .entityTypes("_hostname")
                .recordFields("request_url")
                .allRecordFields(false)
                .enabled(true)
                .build());
    
        }
    }
    
    resources:
      contextAction:
        type: sumologic:CseContextAction
        name: context_action
        properties:
          name: Context Action Name
          type: URL
          template: https://bar.com/?q={{value}}
          iocTypes:
            - IP_ADDRESS
          entityTypes:
            - _hostname
          recordFields:
            - request_url
          allRecordFields: false
          enabled: true
    

    Create CseContextAction Resource

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

    Constructor syntax

    new CseContextAction(name: string, args: CseContextActionArgs, opts?: CustomResourceOptions);
    @overload
    def CseContextAction(resource_name: str,
                         args: CseContextActionArgs,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def CseContextAction(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         ioc_types: Optional[Sequence[str]] = None,
                         all_record_fields: Optional[bool] = None,
                         enabled: Optional[bool] = None,
                         entity_types: Optional[Sequence[str]] = None,
                         name: Optional[str] = None,
                         record_fields: Optional[Sequence[str]] = None,
                         template: Optional[str] = None,
                         type: Optional[str] = None)
    func NewCseContextAction(ctx *Context, name string, args CseContextActionArgs, opts ...ResourceOption) (*CseContextAction, error)
    public CseContextAction(string name, CseContextActionArgs args, CustomResourceOptions? opts = null)
    public CseContextAction(String name, CseContextActionArgs args)
    public CseContextAction(String name, CseContextActionArgs args, CustomResourceOptions options)
    
    type: sumologic:CseContextAction
    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 CseContextActionArgs
    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 CseContextActionArgs
    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 CseContextActionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CseContextActionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CseContextActionArgs
    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 cseContextActionResource = new SumoLogic.CseContextAction("cseContextActionResource", new()
    {
        IocTypes = new[]
        {
            "string",
        },
        AllRecordFields = false,
        Enabled = false,
        EntityTypes = new[]
        {
            "string",
        },
        Name = "string",
        RecordFields = new[]
        {
            "string",
        },
        Template = "string",
        Type = "string",
    });
    
    example, err := sumologic.NewCseContextAction(ctx, "cseContextActionResource", &sumologic.CseContextActionArgs{
    	IocTypes: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	AllRecordFields: pulumi.Bool(false),
    	Enabled:         pulumi.Bool(false),
    	EntityTypes: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Name: pulumi.String("string"),
    	RecordFields: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Template: pulumi.String("string"),
    	Type:     pulumi.String("string"),
    })
    
    var cseContextActionResource = new CseContextAction("cseContextActionResource", CseContextActionArgs.builder()
        .iocTypes("string")
        .allRecordFields(false)
        .enabled(false)
        .entityTypes("string")
        .name("string")
        .recordFields("string")
        .template("string")
        .type("string")
        .build());
    
    cse_context_action_resource = sumologic.CseContextAction("cseContextActionResource",
        ioc_types=["string"],
        all_record_fields=False,
        enabled=False,
        entity_types=["string"],
        name="string",
        record_fields=["string"],
        template="string",
        type="string")
    
    const cseContextActionResource = new sumologic.CseContextAction("cseContextActionResource", {
        iocTypes: ["string"],
        allRecordFields: false,
        enabled: false,
        entityTypes: ["string"],
        name: "string",
        recordFields: ["string"],
        template: "string",
        type: "string",
    });
    
    type: sumologic:CseContextAction
    properties:
        allRecordFields: false
        enabled: false
        entityTypes:
            - string
        iocTypes:
            - string
        name: string
        recordFields:
            - string
        template: string
        type: string
    

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

    IocTypes List<string>
    IOC Data types. Valid values: "ASN", "DOMAIN", "HASH", "IP_ADDRESS", "MAC_ADDRESS", "PORT", "RECORD_PROPERTY", "URL".
    AllRecordFields bool
    Use all record fields.
    Enabled bool

    Whether the context action is enabled.

    The following attributes are exported:

    EntityTypes List<string>
    Applicable to given entity types.
    Name string
    Context Action name.
    RecordFields List<string>
    Specific record fields.
    Template string
    The URL/QUERY template.
    Type string
    Context Action type. Valid values: "URL", "QUERY".
    IocTypes []string
    IOC Data types. Valid values: "ASN", "DOMAIN", "HASH", "IP_ADDRESS", "MAC_ADDRESS", "PORT", "RECORD_PROPERTY", "URL".
    AllRecordFields bool
    Use all record fields.
    Enabled bool

    Whether the context action is enabled.

    The following attributes are exported:

    EntityTypes []string
    Applicable to given entity types.
    Name string
    Context Action name.
    RecordFields []string
    Specific record fields.
    Template string
    The URL/QUERY template.
    Type string
    Context Action type. Valid values: "URL", "QUERY".
    iocTypes List<String>
    IOC Data types. Valid values: "ASN", "DOMAIN", "HASH", "IP_ADDRESS", "MAC_ADDRESS", "PORT", "RECORD_PROPERTY", "URL".
    allRecordFields Boolean
    Use all record fields.
    enabled Boolean

    Whether the context action is enabled.

    The following attributes are exported:

    entityTypes List<String>
    Applicable to given entity types.
    name String
    Context Action name.
    recordFields List<String>
    Specific record fields.
    template String
    The URL/QUERY template.
    type String
    Context Action type. Valid values: "URL", "QUERY".
    iocTypes string[]
    IOC Data types. Valid values: "ASN", "DOMAIN", "HASH", "IP_ADDRESS", "MAC_ADDRESS", "PORT", "RECORD_PROPERTY", "URL".
    allRecordFields boolean
    Use all record fields.
    enabled boolean

    Whether the context action is enabled.

    The following attributes are exported:

    entityTypes string[]
    Applicable to given entity types.
    name string
    Context Action name.
    recordFields string[]
    Specific record fields.
    template string
    The URL/QUERY template.
    type string
    Context Action type. Valid values: "URL", "QUERY".
    ioc_types Sequence[str]
    IOC Data types. Valid values: "ASN", "DOMAIN", "HASH", "IP_ADDRESS", "MAC_ADDRESS", "PORT", "RECORD_PROPERTY", "URL".
    all_record_fields bool
    Use all record fields.
    enabled bool

    Whether the context action is enabled.

    The following attributes are exported:

    entity_types Sequence[str]
    Applicable to given entity types.
    name str
    Context Action name.
    record_fields Sequence[str]
    Specific record fields.
    template str
    The URL/QUERY template.
    type str
    Context Action type. Valid values: "URL", "QUERY".
    iocTypes List<String>
    IOC Data types. Valid values: "ASN", "DOMAIN", "HASH", "IP_ADDRESS", "MAC_ADDRESS", "PORT", "RECORD_PROPERTY", "URL".
    allRecordFields Boolean
    Use all record fields.
    enabled Boolean

    Whether the context action is enabled.

    The following attributes are exported:

    entityTypes List<String>
    Applicable to given entity types.
    name String
    Context Action name.
    recordFields List<String>
    Specific record fields.
    template String
    The URL/QUERY template.
    type String
    Context Action type. Valid values: "URL", "QUERY".

    Outputs

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

    Get an existing CseContextAction 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?: CseContextActionState, opts?: CustomResourceOptions): CseContextAction
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            all_record_fields: Optional[bool] = None,
            enabled: Optional[bool] = None,
            entity_types: Optional[Sequence[str]] = None,
            ioc_types: Optional[Sequence[str]] = None,
            name: Optional[str] = None,
            record_fields: Optional[Sequence[str]] = None,
            template: Optional[str] = None,
            type: Optional[str] = None) -> CseContextAction
    func GetCseContextAction(ctx *Context, name string, id IDInput, state *CseContextActionState, opts ...ResourceOption) (*CseContextAction, error)
    public static CseContextAction Get(string name, Input<string> id, CseContextActionState? state, CustomResourceOptions? opts = null)
    public static CseContextAction get(String name, Output<String> id, CseContextActionState 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:
    AllRecordFields bool
    Use all record fields.
    Enabled bool

    Whether the context action is enabled.

    The following attributes are exported:

    EntityTypes List<string>
    Applicable to given entity types.
    IocTypes List<string>
    IOC Data types. Valid values: "ASN", "DOMAIN", "HASH", "IP_ADDRESS", "MAC_ADDRESS", "PORT", "RECORD_PROPERTY", "URL".
    Name string
    Context Action name.
    RecordFields List<string>
    Specific record fields.
    Template string
    The URL/QUERY template.
    Type string
    Context Action type. Valid values: "URL", "QUERY".
    AllRecordFields bool
    Use all record fields.
    Enabled bool

    Whether the context action is enabled.

    The following attributes are exported:

    EntityTypes []string
    Applicable to given entity types.
    IocTypes []string
    IOC Data types. Valid values: "ASN", "DOMAIN", "HASH", "IP_ADDRESS", "MAC_ADDRESS", "PORT", "RECORD_PROPERTY", "URL".
    Name string
    Context Action name.
    RecordFields []string
    Specific record fields.
    Template string
    The URL/QUERY template.
    Type string
    Context Action type. Valid values: "URL", "QUERY".
    allRecordFields Boolean
    Use all record fields.
    enabled Boolean

    Whether the context action is enabled.

    The following attributes are exported:

    entityTypes List<String>
    Applicable to given entity types.
    iocTypes List<String>
    IOC Data types. Valid values: "ASN", "DOMAIN", "HASH", "IP_ADDRESS", "MAC_ADDRESS", "PORT", "RECORD_PROPERTY", "URL".
    name String
    Context Action name.
    recordFields List<String>
    Specific record fields.
    template String
    The URL/QUERY template.
    type String
    Context Action type. Valid values: "URL", "QUERY".
    allRecordFields boolean
    Use all record fields.
    enabled boolean

    Whether the context action is enabled.

    The following attributes are exported:

    entityTypes string[]
    Applicable to given entity types.
    iocTypes string[]
    IOC Data types. Valid values: "ASN", "DOMAIN", "HASH", "IP_ADDRESS", "MAC_ADDRESS", "PORT", "RECORD_PROPERTY", "URL".
    name string
    Context Action name.
    recordFields string[]
    Specific record fields.
    template string
    The URL/QUERY template.
    type string
    Context Action type. Valid values: "URL", "QUERY".
    all_record_fields bool
    Use all record fields.
    enabled bool

    Whether the context action is enabled.

    The following attributes are exported:

    entity_types Sequence[str]
    Applicable to given entity types.
    ioc_types Sequence[str]
    IOC Data types. Valid values: "ASN", "DOMAIN", "HASH", "IP_ADDRESS", "MAC_ADDRESS", "PORT", "RECORD_PROPERTY", "URL".
    name str
    Context Action name.
    record_fields Sequence[str]
    Specific record fields.
    template str
    The URL/QUERY template.
    type str
    Context Action type. Valid values: "URL", "QUERY".
    allRecordFields Boolean
    Use all record fields.
    enabled Boolean

    Whether the context action is enabled.

    The following attributes are exported:

    entityTypes List<String>
    Applicable to given entity types.
    iocTypes List<String>
    IOC Data types. Valid values: "ASN", "DOMAIN", "HASH", "IP_ADDRESS", "MAC_ADDRESS", "PORT", "RECORD_PROPERTY", "URL".
    name String
    Context Action name.
    recordFields List<String>
    Specific record fields.
    template String
    The URL/QUERY template.
    type String
    Context Action type. Valid values: "URL", "QUERY".

    Import

    Context Action can be imported using the field id, e.g.:

    hcl

    $ pulumi import sumologic:index/cseContextAction:CseContextAction context_action id
    

    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 v1.0.0 published on Wednesday, Dec 11, 2024 by Pulumi