import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Provides a CloudWatch Log Metric Filter resource. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const dada = new aws.cloudwatch.LogGroup("dada", {name: "MyApp/access.log"}); * const yada = new aws.cloudwatch.LogMetricFilter("yada", { * metricTransformation: { * name: "EventCount", * namespace: "YourNamespace", * value: "1", * }, * name: "MyAppAccessCount", * pattern: "", * logGroupName: dada.name, * }); * ``` * * ## Import * * ### Identity Schema * * #### Required * * * `logGroupName` (String) Name of the log group. * * `name` (String) Name of the metric filter. * * #### Optional * * * `accountId` (String) AWS Account where this resource is managed. * * `region` (String) Region where this resource is managed. * * Using `pulumi import`, import Metric Filters using `logGroupName` and `name` separated by a colon (`:`). For example: * * ```sh * $ pulumi import aws:cloudwatch/logMetricFilter:LogMetricFilter example example-group:example-filter * ``` */ export declare class LogMetricFilter extends pulumi.CustomResource { /** * Get an existing LogMetricFilter 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?: LogMetricFilterState, opts?: pulumi.CustomResourceOptions): LogMetricFilter; /** * Returns true if the given object is an instance of LogMetricFilter. 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 LogMetricFilter; /** * Whether the metric filter will be applied on the transformed version of the log events instead of the original ingested log events. Defaults to `false`. Valid only for log groups that have an active log transformer. */ readonly applyOnTransformedLogs: pulumi.Output; /** * The name of the log group to associate the metric filter with. */ readonly logGroupName: pulumi.Output; /** * A block defining collection of information needed to define how metric data gets emitted. See below. */ readonly metricTransformation: pulumi.Output; /** * A name for the metric filter. */ readonly name: pulumi.Output; /** * A valid [CloudWatch Logs filter pattern](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/FilterAndPatternSyntax.html) * for extracting metric data out of ingested log events. */ readonly pattern: pulumi.Output; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ readonly region: pulumi.Output; /** * Create a LogMetricFilter 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: LogMetricFilterArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering LogMetricFilter resources. */ export interface LogMetricFilterState { /** * Whether the metric filter will be applied on the transformed version of the log events instead of the original ingested log events. Defaults to `false`. Valid only for log groups that have an active log transformer. */ applyOnTransformedLogs?: pulumi.Input; /** * The name of the log group to associate the metric filter with. */ logGroupName?: pulumi.Input; /** * A block defining collection of information needed to define how metric data gets emitted. See below. */ metricTransformation?: pulumi.Input; /** * A name for the metric filter. */ name?: pulumi.Input; /** * A valid [CloudWatch Logs filter pattern](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/FilterAndPatternSyntax.html) * for extracting metric data out of ingested log events. */ pattern?: pulumi.Input; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; } /** * The set of arguments for constructing a LogMetricFilter resource. */ export interface LogMetricFilterArgs { /** * Whether the metric filter will be applied on the transformed version of the log events instead of the original ingested log events. Defaults to `false`. Valid only for log groups that have an active log transformer. */ applyOnTransformedLogs?: pulumi.Input; /** * The name of the log group to associate the metric filter with. */ logGroupName: pulumi.Input; /** * A block defining collection of information needed to define how metric data gets emitted. See below. */ metricTransformation: pulumi.Input; /** * A name for the metric filter. */ name?: pulumi.Input; /** * A valid [CloudWatch Logs filter pattern](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/FilterAndPatternSyntax.html) * for extracting metric data out of ingested log events. */ pattern: pulumi.Input; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; } //# sourceMappingURL=logMetricFilter.d.ts.map