import * as pulumi from "@pulumi/pulumi"; /** * Use this resource to create, update and delete New Relic Log Parsing Rule. * * ## Example Usage * * Use this example to create the log parse rule. * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as newrelic from "@pulumi/newrelic"; * * const foo = new newrelic.LogParsingRule("foo", { * name: "log_parse_rule", * attribute: "message", * enabled: true, * grok: "sampleattribute='%{NUMBER:test:int}'", * lucene: "logtype:linux_messages", * nrql: "SELECT * FROM Log WHERE logtype = 'linux_messages'", * }); * ``` * * ## Additional Example * * Use this example to validate a grok pattern and create the log parse rule. More * information on grok pattern can be found [here](https://docs.newrelic.com/docs/logs/ui-data/parsing/#grok) * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as newrelic from "@pulumi/newrelic"; * * const grok = newrelic.getTestGrokPattern({ * grok: "%{IP:host_ip}", * logLines: ["host_ip: 43.3.120.2"], * }); * const foo = new newrelic.LogParsingRule("foo", { * name: "log_parse_rule", * attribute: "message", * enabled: true, * grok: grok.then(grok => grok.grok), * lucene: "logtype:linux_messages", * nrql: "SELECT * FROM Log WHERE logtype = 'linux_messages'", * matched: grok.then(grok => grok.testGroks?.[0]?.matched), * }); * ``` * * ## Import * * New Relic log parsing rule can be imported using the rule ID, e.g. * * ```sh * $ pulumi import newrelic:index/logParsingRule:LogParsingRule foo 3456789 * ``` */ export declare class LogParsingRule extends pulumi.CustomResource { /** * Get an existing LogParsingRule resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: LogParsingRuleState, opts?: pulumi.CustomResourceOptions): LogParsingRule; /** * Returns true if the given object is an instance of LogParsingRule. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is LogParsingRule; /** * The account id associated with the obfuscation rule. */ readonly accountId: pulumi.Output; /** * The parsing rule will apply to value of this attribute. If field is not provided, value will default to message. */ readonly attribute: pulumi.Output; /** * Whether or not this rule is deleted. */ readonly deleted: pulumi.Output; /** * Whether the rule should be applied or not to incoming data. */ readonly enabled: pulumi.Output; /** * The Grok of what to parse. */ readonly grok: pulumi.Output; /** * The Lucene to match events to the parsing rule. */ readonly lucene: pulumi.Output; /** * Whether the Grok pattern matched. */ readonly matched: pulumi.Output; /** * Name of rule. */ readonly name: pulumi.Output; /** * The NRQL to match events to the parsing rule. */ readonly nrql: pulumi.Output; /** * Create a LogParsingRule resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: LogParsingRuleArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering LogParsingRule resources. */ export interface LogParsingRuleState { /** * The account id associated with the obfuscation rule. */ accountId?: pulumi.Input; /** * The parsing rule will apply to value of this attribute. If field is not provided, value will default to message. */ attribute?: pulumi.Input; /** * Whether or not this rule is deleted. */ deleted?: pulumi.Input; /** * Whether the rule should be applied or not to incoming data. */ enabled?: pulumi.Input; /** * The Grok of what to parse. */ grok?: pulumi.Input; /** * The Lucene to match events to the parsing rule. */ lucene?: pulumi.Input; /** * Whether the Grok pattern matched. */ matched?: pulumi.Input; /** * Name of rule. */ name?: pulumi.Input; /** * The NRQL to match events to the parsing rule. */ nrql?: pulumi.Input; } /** * The set of arguments for constructing a LogParsingRule resource. */ export interface LogParsingRuleArgs { /** * The account id associated with the obfuscation rule. */ accountId?: pulumi.Input; /** * The parsing rule will apply to value of this attribute. If field is not provided, value will default to message. */ attribute?: pulumi.Input; /** * Whether the rule should be applied or not to incoming data. */ enabled: pulumi.Input; /** * The Grok of what to parse. */ grok: pulumi.Input; /** * The Lucene to match events to the parsing rule. */ lucene: pulumi.Input; /** * Whether the Grok pattern matched. */ matched?: pulumi.Input; /** * Name of rule. */ name?: pulumi.Input; /** * The NRQL to match events to the parsing rule. */ nrql: pulumi.Input; } //# sourceMappingURL=logParsingRule.d.ts.map