Class LogMetricFilter
Provides a CloudWatch Log Metric Filter resource.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var dada = new Aws.CloudWatch.LogGroup("dada", new Aws.CloudWatch.LogGroupArgs
{
});
var yada = new Aws.CloudWatch.LogMetricFilter("yada", new Aws.CloudWatch.LogMetricFilterArgs
{
LogGroupName = dada.Name,
MetricTransformation = new Aws.CloudWatch.Inputs.LogMetricFilterMetricTransformationArgs
{
Name = "EventCount",
Namespace = "YourNamespace",
Value = "1",
},
Pattern = "",
});
}
}
Inherited Members
Namespace: Pulumi.Aws.CloudWatch
Assembly: Pulumi.Aws.dll
Syntax
public class LogMetricFilter : CustomResource
Constructors
View SourceLogMetricFilter(String, LogMetricFilterArgs, CustomResourceOptions)
Create a LogMetricFilter resource with the given unique name, arguments, and options.
Declaration
public LogMetricFilter(string name, LogMetricFilterArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| LogMetricFilterArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceLogGroupName
The name of the log group to associate the metric filter with.
Declaration
public Output<string> LogGroupName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
MetricTransformation
A block defining collection of information needed to define how metric data gets emitted. See below.
Declaration
public Output<LogMetricFilterMetricTransformation> MetricTransformation { get; }
Property Value
| Type | Description |
|---|---|
| Output<LogMetricFilterMetricTransformation> |
Name
A name for the metric filter.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Pattern
A valid CloudWatch Logs filter pattern for extracting metric data out of ingested log events.
Declaration
public Output<string> Pattern { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, LogMetricFilterState, CustomResourceOptions)
Get an existing LogMetricFilter resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static LogMetricFilter Get(string name, Input<string> id, LogMetricFilterState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| LogMetricFilterState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| LogMetricFilter |