Show / Hide Table of Contents

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 = "",
    });
}

}
Inheritance
System.Object
Resource
CustomResource
LogMetricFilter
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Aws.CloudWatch
Assembly: Pulumi.Aws.dll
Syntax
public class LogMetricFilter : CustomResource

Constructors

View Source

LogMetricFilter(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 Source

LogGroupName

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>
View Source

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>
View Source

Name

A name for the metric filter.

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

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 Source

Get(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
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.