sumologic.FieldExtractionRule
Explore with Pulumi AI
Provides a Sumologic Field Extraction Rule.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as sumologic from "@pulumi/sumologic";
const fieldExtractionRule = new sumologic.FieldExtractionRule("fieldExtractionRule", {
name: "exampleFieldExtractionRule",
scope: "_sourceHost=127.0.0.1",
parseExpression: "csv _raw extract 1 as f1",
enabled: true,
});
import pulumi
import pulumi_sumologic as sumologic
field_extraction_rule = sumologic.FieldExtractionRule("fieldExtractionRule",
name="exampleFieldExtractionRule",
scope="_sourceHost=127.0.0.1",
parse_expression="csv _raw extract 1 as f1",
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.NewFieldExtractionRule(ctx, "fieldExtractionRule", &sumologic.FieldExtractionRuleArgs{
Name: pulumi.String("exampleFieldExtractionRule"),
Scope: pulumi.String("_sourceHost=127.0.0.1"),
ParseExpression: pulumi.String("csv _raw extract 1 as f1"),
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 fieldExtractionRule = new SumoLogic.FieldExtractionRule("fieldExtractionRule", new()
{
Name = "exampleFieldExtractionRule",
Scope = "_sourceHost=127.0.0.1",
ParseExpression = "csv _raw extract 1 as f1",
Enabled = true,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.sumologic.FieldExtractionRule;
import com.pulumi.sumologic.FieldExtractionRuleArgs;
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 fieldExtractionRule = new FieldExtractionRule("fieldExtractionRule", FieldExtractionRuleArgs.builder()
.name("exampleFieldExtractionRule")
.scope("_sourceHost=127.0.0.1")
.parseExpression("csv _raw extract 1 as f1")
.enabled(true)
.build());
}
}
resources:
fieldExtractionRule:
type: sumologic:FieldExtractionRule
properties:
name: exampleFieldExtractionRule
scope: _sourceHost=127.0.0.1
parseExpression: csv _raw extract 1 as f1
enabled: true
Attributes reference
The following attributes are exported:
id
- Unique identifier for the field extraction rule.
Create FieldExtractionRule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new FieldExtractionRule(name: string, args: FieldExtractionRuleArgs, opts?: CustomResourceOptions);
@overload
def FieldExtractionRule(resource_name: str,
args: FieldExtractionRuleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def FieldExtractionRule(resource_name: str,
opts: Optional[ResourceOptions] = None,
enabled: Optional[bool] = None,
parse_expression: Optional[str] = None,
scope: Optional[str] = None,
name: Optional[str] = None)
func NewFieldExtractionRule(ctx *Context, name string, args FieldExtractionRuleArgs, opts ...ResourceOption) (*FieldExtractionRule, error)
public FieldExtractionRule(string name, FieldExtractionRuleArgs args, CustomResourceOptions? opts = null)
public FieldExtractionRule(String name, FieldExtractionRuleArgs args)
public FieldExtractionRule(String name, FieldExtractionRuleArgs args, CustomResourceOptions options)
type: sumologic:FieldExtractionRule
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 FieldExtractionRuleArgs
- 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 FieldExtractionRuleArgs
- 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 FieldExtractionRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args FieldExtractionRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args FieldExtractionRuleArgs
- 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 fieldExtractionRuleResource = new SumoLogic.FieldExtractionRule("fieldExtractionRuleResource", new()
{
Enabled = false,
ParseExpression = "string",
Scope = "string",
Name = "string",
});
example, err := sumologic.NewFieldExtractionRule(ctx, "fieldExtractionRuleResource", &sumologic.FieldExtractionRuleArgs{
Enabled: pulumi.Bool(false),
ParseExpression: pulumi.String("string"),
Scope: pulumi.String("string"),
Name: pulumi.String("string"),
})
var fieldExtractionRuleResource = new FieldExtractionRule("fieldExtractionRuleResource", FieldExtractionRuleArgs.builder()
.enabled(false)
.parseExpression("string")
.scope("string")
.name("string")
.build());
field_extraction_rule_resource = sumologic.FieldExtractionRule("fieldExtractionRuleResource",
enabled=False,
parse_expression="string",
scope="string",
name="string")
const fieldExtractionRuleResource = new sumologic.FieldExtractionRule("fieldExtractionRuleResource", {
enabled: false,
parseExpression: "string",
scope: "string",
name: "string",
});
type: sumologic:FieldExtractionRule
properties:
enabled: false
name: string
parseExpression: string
scope: string
FieldExtractionRule 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 FieldExtractionRule resource accepts the following input properties:
- Enabled bool
- Is the field extraction rule enabled.
- Parse
Expression string - Describes the fields to be parsed.
- Scope string
- Scope of the field extraction rule. This could be a sourceCategory, sourceHost, or any other metadata that describes the data you want to extract from. Think of the Scope as the first portion of an ad hoc search, before the first pipe ( | ). You'll use the Scope to run a search against the rule.
- Name string
- Name of the field extraction rule. Use a name that makes it easy to identify the rule.
- Enabled bool
- Is the field extraction rule enabled.
- Parse
Expression string - Describes the fields to be parsed.
- Scope string
- Scope of the field extraction rule. This could be a sourceCategory, sourceHost, or any other metadata that describes the data you want to extract from. Think of the Scope as the first portion of an ad hoc search, before the first pipe ( | ). You'll use the Scope to run a search against the rule.
- Name string
- Name of the field extraction rule. Use a name that makes it easy to identify the rule.
- enabled Boolean
- Is the field extraction rule enabled.
- parse
Expression String - Describes the fields to be parsed.
- scope String
- Scope of the field extraction rule. This could be a sourceCategory, sourceHost, or any other metadata that describes the data you want to extract from. Think of the Scope as the first portion of an ad hoc search, before the first pipe ( | ). You'll use the Scope to run a search against the rule.
- name String
- Name of the field extraction rule. Use a name that makes it easy to identify the rule.
- enabled boolean
- Is the field extraction rule enabled.
- parse
Expression string - Describes the fields to be parsed.
- scope string
- Scope of the field extraction rule. This could be a sourceCategory, sourceHost, or any other metadata that describes the data you want to extract from. Think of the Scope as the first portion of an ad hoc search, before the first pipe ( | ). You'll use the Scope to run a search against the rule.
- name string
- Name of the field extraction rule. Use a name that makes it easy to identify the rule.
- enabled bool
- Is the field extraction rule enabled.
- parse_
expression str - Describes the fields to be parsed.
- scope str
- Scope of the field extraction rule. This could be a sourceCategory, sourceHost, or any other metadata that describes the data you want to extract from. Think of the Scope as the first portion of an ad hoc search, before the first pipe ( | ). You'll use the Scope to run a search against the rule.
- name str
- Name of the field extraction rule. Use a name that makes it easy to identify the rule.
- enabled Boolean
- Is the field extraction rule enabled.
- parse
Expression String - Describes the fields to be parsed.
- scope String
- Scope of the field extraction rule. This could be a sourceCategory, sourceHost, or any other metadata that describes the data you want to extract from. Think of the Scope as the first portion of an ad hoc search, before the first pipe ( | ). You'll use the Scope to run a search against the rule.
- name String
- Name of the field extraction rule. Use a name that makes it easy to identify the rule.
Outputs
All input properties are implicitly available as output properties. Additionally, the FieldExtractionRule 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 FieldExtractionRule Resource
Get an existing FieldExtractionRule 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?: FieldExtractionRuleState, opts?: CustomResourceOptions): FieldExtractionRule
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
enabled: Optional[bool] = None,
name: Optional[str] = None,
parse_expression: Optional[str] = None,
scope: Optional[str] = None) -> FieldExtractionRule
func GetFieldExtractionRule(ctx *Context, name string, id IDInput, state *FieldExtractionRuleState, opts ...ResourceOption) (*FieldExtractionRule, error)
public static FieldExtractionRule Get(string name, Input<string> id, FieldExtractionRuleState? state, CustomResourceOptions? opts = null)
public static FieldExtractionRule get(String name, Output<String> id, FieldExtractionRuleState 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.
- Enabled bool
- Is the field extraction rule enabled.
- Name string
- Name of the field extraction rule. Use a name that makes it easy to identify the rule.
- Parse
Expression string - Describes the fields to be parsed.
- Scope string
- Scope of the field extraction rule. This could be a sourceCategory, sourceHost, or any other metadata that describes the data you want to extract from. Think of the Scope as the first portion of an ad hoc search, before the first pipe ( | ). You'll use the Scope to run a search against the rule.
- Enabled bool
- Is the field extraction rule enabled.
- Name string
- Name of the field extraction rule. Use a name that makes it easy to identify the rule.
- Parse
Expression string - Describes the fields to be parsed.
- Scope string
- Scope of the field extraction rule. This could be a sourceCategory, sourceHost, or any other metadata that describes the data you want to extract from. Think of the Scope as the first portion of an ad hoc search, before the first pipe ( | ). You'll use the Scope to run a search against the rule.
- enabled Boolean
- Is the field extraction rule enabled.
- name String
- Name of the field extraction rule. Use a name that makes it easy to identify the rule.
- parse
Expression String - Describes the fields to be parsed.
- scope String
- Scope of the field extraction rule. This could be a sourceCategory, sourceHost, or any other metadata that describes the data you want to extract from. Think of the Scope as the first portion of an ad hoc search, before the first pipe ( | ). You'll use the Scope to run a search against the rule.
- enabled boolean
- Is the field extraction rule enabled.
- name string
- Name of the field extraction rule. Use a name that makes it easy to identify the rule.
- parse
Expression string - Describes the fields to be parsed.
- scope string
- Scope of the field extraction rule. This could be a sourceCategory, sourceHost, or any other metadata that describes the data you want to extract from. Think of the Scope as the first portion of an ad hoc search, before the first pipe ( | ). You'll use the Scope to run a search against the rule.
- enabled bool
- Is the field extraction rule enabled.
- name str
- Name of the field extraction rule. Use a name that makes it easy to identify the rule.
- parse_
expression str - Describes the fields to be parsed.
- scope str
- Scope of the field extraction rule. This could be a sourceCategory, sourceHost, or any other metadata that describes the data you want to extract from. Think of the Scope as the first portion of an ad hoc search, before the first pipe ( | ). You'll use the Scope to run a search against the rule.
- enabled Boolean
- Is the field extraction rule enabled.
- name String
- Name of the field extraction rule. Use a name that makes it easy to identify the rule.
- parse
Expression String - Describes the fields to be parsed.
- scope String
- Scope of the field extraction rule. This could be a sourceCategory, sourceHost, or any other metadata that describes the data you want to extract from. Think of the Scope as the first portion of an ad hoc search, before the first pipe ( | ). You'll use the Scope to run a search against the rule.
Import
Extraction Rules can be imported using the extraction rule id, e.g.:
hcl
$ pulumi import sumologic:index/fieldExtractionRule:FieldExtractionRule fieldExtractionRule 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.