1. Packages
  2. Logzio Provider
  3. API Docs
  4. DropMetrics
logzio 1.20.0 published on Wednesday, Aug 13, 2025 by logzio

logzio.DropMetrics

Explore with Pulumi AI

logzio logo
logzio 1.20.0 published on Wednesday, Aug 13, 2025 by logzio

    # Metrics Drop Filter Provider

    Provides a Logz.io metrics drop filter resource. This can be used to create and manage Logz.io metrics drop filters.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as logzio from "@pulumi/logzio";
    
    const config = new pulumi.Config();
    const apiToken = config.require("apiToken");
    const testFilter = new logzio.DropMetrics("testFilter", {
        accountId: 1234,
        filters: [
            {
                name: "__name__",
                value: "my_metric_name",
                condition: "EQ",
            },
            {
                name: "my_label_name",
                value: "value_to_match",
                condition: "EQ",
            },
        ],
    });
    
    import pulumi
    import pulumi_logzio as logzio
    
    config = pulumi.Config()
    api_token = config.require("apiToken")
    test_filter = logzio.DropMetrics("testFilter",
        account_id=1234,
        filters=[
            {
                "name": "__name__",
                "value": "my_metric_name",
                "condition": "EQ",
            },
            {
                "name": "my_label_name",
                "value": "value_to_match",
                "condition": "EQ",
            },
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/logzio/logzio"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		apiToken := cfg.Require("apiToken")
    		_, err := logzio.NewDropMetrics(ctx, "testFilter", &logzio.DropMetricsArgs{
    			AccountId: pulumi.Float64(1234),
    			Filters: logzio.DropMetricsFilterArray{
    				&logzio.DropMetricsFilterArgs{
    					Name:      pulumi.String("__name__"),
    					Value:     pulumi.String("my_metric_name"),
    					Condition: pulumi.String("EQ"),
    				},
    				&logzio.DropMetricsFilterArgs{
    					Name:      pulumi.String("my_label_name"),
    					Value:     pulumi.String("value_to_match"),
    					Condition: pulumi.String("EQ"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Logzio = Pulumi.Logzio;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var apiToken = config.Require("apiToken");
        var testFilter = new Logzio.DropMetrics("testFilter", new()
        {
            AccountId = 1234,
            Filters = new[]
            {
                new Logzio.Inputs.DropMetricsFilterArgs
                {
                    Name = "__name__",
                    Value = "my_metric_name",
                    Condition = "EQ",
                },
                new Logzio.Inputs.DropMetricsFilterArgs
                {
                    Name = "my_label_name",
                    Value = "value_to_match",
                    Condition = "EQ",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.logzio.DropMetrics;
    import com.pulumi.logzio.DropMetricsArgs;
    import com.pulumi.logzio.inputs.DropMetricsFilterArgs;
    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) {
            final var config = ctx.config();
            final var apiToken = config.get("apiToken");
            var testFilter = new DropMetrics("testFilter", DropMetricsArgs.builder()
                .accountId(1234)
                .filters(            
                    DropMetricsFilterArgs.builder()
                        .name("__name__")
                        .value("my_metric_name")
                        .condition("EQ")
                        .build(),
                    DropMetricsFilterArgs.builder()
                        .name("my_label_name")
                        .value("value_to_match")
                        .condition("EQ")
                        .build())
                .build());
    
        }
    }
    
    configuration:
      apiToken:
        type: string
    resources:
      testFilter:
        type: logzio:DropMetrics
        properties:
          accountId: 1234
          filters:
            - name: __name__
              value: my_metric_name
              condition: EQ
            - name: my_label_name
              value: value_to_match
              condition: EQ
    

    Create DropMetrics Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new DropMetrics(name: string, args: DropMetricsArgs, opts?: CustomResourceOptions);
    @overload
    def DropMetrics(resource_name: str,
                    args: DropMetricsArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def DropMetrics(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    account_id: Optional[float] = None,
                    filters: Optional[Sequence[DropMetricsFilterArgs]] = None,
                    active: Optional[bool] = None,
                    drop_metric_id: Optional[float] = None,
                    drop_metrics_id: Optional[str] = None,
                    operator: Optional[str] = None)
    func NewDropMetrics(ctx *Context, name string, args DropMetricsArgs, opts ...ResourceOption) (*DropMetrics, error)
    public DropMetrics(string name, DropMetricsArgs args, CustomResourceOptions? opts = null)
    public DropMetrics(String name, DropMetricsArgs args)
    public DropMetrics(String name, DropMetricsArgs args, CustomResourceOptions options)
    
    type: logzio:DropMetrics
    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 DropMetricsArgs
    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 DropMetricsArgs
    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 DropMetricsArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DropMetricsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DropMetricsArgs
    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 dropMetricsResource = new Logzio.DropMetrics("dropMetricsResource", new()
    {
        AccountId = 0,
        Filters = new[]
        {
            new Logzio.Inputs.DropMetricsFilterArgs
            {
                Condition = "string",
                Name = "string",
                Value = "string",
            },
        },
        Active = false,
        DropMetricId = 0,
        DropMetricsId = "string",
        Operator = "string",
    });
    
    example, err := logzio.NewDropMetrics(ctx, "dropMetricsResource", &logzio.DropMetricsArgs{
    	AccountId: pulumi.Float64(0),
    	Filters: logzio.DropMetricsFilterArray{
    		&logzio.DropMetricsFilterArgs{
    			Condition: pulumi.String("string"),
    			Name:      pulumi.String("string"),
    			Value:     pulumi.String("string"),
    		},
    	},
    	Active:        pulumi.Bool(false),
    	DropMetricId:  pulumi.Float64(0),
    	DropMetricsId: pulumi.String("string"),
    	Operator:      pulumi.String("string"),
    })
    
    var dropMetricsResource = new DropMetrics("dropMetricsResource", DropMetricsArgs.builder()
        .accountId(0.0)
        .filters(DropMetricsFilterArgs.builder()
            .condition("string")
            .name("string")
            .value("string")
            .build())
        .active(false)
        .dropMetricId(0.0)
        .dropMetricsId("string")
        .operator("string")
        .build());
    
    drop_metrics_resource = logzio.DropMetrics("dropMetricsResource",
        account_id=0,
        filters=[{
            "condition": "string",
            "name": "string",
            "value": "string",
        }],
        active=False,
        drop_metric_id=0,
        drop_metrics_id="string",
        operator="string")
    
    const dropMetricsResource = new logzio.DropMetrics("dropMetricsResource", {
        accountId: 0,
        filters: [{
            condition: "string",
            name: "string",
            value: "string",
        }],
        active: false,
        dropMetricId: 0,
        dropMetricsId: "string",
        operator: "string",
    });
    
    type: logzio:DropMetrics
    properties:
        accountId: 0
        active: false
        dropMetricId: 0
        dropMetricsId: string
        filters:
            - condition: string
              name: string
              value: string
        operator: string
    

    DropMetrics 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 DropMetrics resource accepts the following input properties:

    AccountId double
    The Logz.io metrics account ID to which the drop filter applies.
    Filters List<DropMetricsFilter>
    Active bool
    If true, the drop filter is active and metrics that match the filter are dropped before indexing. If false, the drop filter is disabled. Defaults to true.
    DropMetricId double
    (String) The unique identifier of the drop filter in the Logz.io database.
    DropMetricsId string
    Operator string
    The logical operator for combining filter expressions. Supported value is AND.
    AccountId float64
    The Logz.io metrics account ID to which the drop filter applies.
    Filters []DropMetricsFilterArgs
    Active bool
    If true, the drop filter is active and metrics that match the filter are dropped before indexing. If false, the drop filter is disabled. Defaults to true.
    DropMetricId float64
    (String) The unique identifier of the drop filter in the Logz.io database.
    DropMetricsId string
    Operator string
    The logical operator for combining filter expressions. Supported value is AND.
    accountId Double
    The Logz.io metrics account ID to which the drop filter applies.
    filters List<DropMetricsFilter>
    active Boolean
    If true, the drop filter is active and metrics that match the filter are dropped before indexing. If false, the drop filter is disabled. Defaults to true.
    dropMetricId Double
    (String) The unique identifier of the drop filter in the Logz.io database.
    dropMetricsId String
    operator String
    The logical operator for combining filter expressions. Supported value is AND.
    accountId number
    The Logz.io metrics account ID to which the drop filter applies.
    filters DropMetricsFilter[]
    active boolean
    If true, the drop filter is active and metrics that match the filter are dropped before indexing. If false, the drop filter is disabled. Defaults to true.
    dropMetricId number
    (String) The unique identifier of the drop filter in the Logz.io database.
    dropMetricsId string
    operator string
    The logical operator for combining filter expressions. Supported value is AND.
    account_id float
    The Logz.io metrics account ID to which the drop filter applies.
    filters Sequence[DropMetricsFilterArgs]
    active bool
    If true, the drop filter is active and metrics that match the filter are dropped before indexing. If false, the drop filter is disabled. Defaults to true.
    drop_metric_id float
    (String) The unique identifier of the drop filter in the Logz.io database.
    drop_metrics_id str
    operator str
    The logical operator for combining filter expressions. Supported value is AND.
    accountId Number
    The Logz.io metrics account ID to which the drop filter applies.
    filters List<Property Map>
    active Boolean
    If true, the drop filter is active and metrics that match the filter are dropped before indexing. If false, the drop filter is disabled. Defaults to true.
    dropMetricId Number
    (String) The unique identifier of the drop filter in the Logz.io database.
    dropMetricsId String
    operator String
    The logical operator for combining filter expressions. Supported value is AND.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the DropMetrics resource produces the following output properties:

    CreatedAt string
    (String) The timestamp when the drop filter was created.
    CreatedBy string
    (String) The user who created the drop filter.
    Id string
    The provider-assigned unique ID for this managed resource.
    ModifiedAt string
    (String) The timestamp when the drop filter was last modified.
    ModifiedBy string
    (String) The user who last updated the drop filter.
    CreatedAt string
    (String) The timestamp when the drop filter was created.
    CreatedBy string
    (String) The user who created the drop filter.
    Id string
    The provider-assigned unique ID for this managed resource.
    ModifiedAt string
    (String) The timestamp when the drop filter was last modified.
    ModifiedBy string
    (String) The user who last updated the drop filter.
    createdAt String
    (String) The timestamp when the drop filter was created.
    createdBy String
    (String) The user who created the drop filter.
    id String
    The provider-assigned unique ID for this managed resource.
    modifiedAt String
    (String) The timestamp when the drop filter was last modified.
    modifiedBy String
    (String) The user who last updated the drop filter.
    createdAt string
    (String) The timestamp when the drop filter was created.
    createdBy string
    (String) The user who created the drop filter.
    id string
    The provider-assigned unique ID for this managed resource.
    modifiedAt string
    (String) The timestamp when the drop filter was last modified.
    modifiedBy string
    (String) The user who last updated the drop filter.
    created_at str
    (String) The timestamp when the drop filter was created.
    created_by str
    (String) The user who created the drop filter.
    id str
    The provider-assigned unique ID for this managed resource.
    modified_at str
    (String) The timestamp when the drop filter was last modified.
    modified_by str
    (String) The user who last updated the drop filter.
    createdAt String
    (String) The timestamp when the drop filter was created.
    createdBy String
    (String) The user who created the drop filter.
    id String
    The provider-assigned unique ID for this managed resource.
    modifiedAt String
    (String) The timestamp when the drop filter was last modified.
    modifiedBy String
    (String) The user who last updated the drop filter.

    Look up Existing DropMetrics Resource

    Get an existing DropMetrics 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?: DropMetricsState, opts?: CustomResourceOptions): DropMetrics
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_id: Optional[float] = None,
            active: Optional[bool] = None,
            created_at: Optional[str] = None,
            created_by: Optional[str] = None,
            drop_metric_id: Optional[float] = None,
            drop_metrics_id: Optional[str] = None,
            filters: Optional[Sequence[DropMetricsFilterArgs]] = None,
            modified_at: Optional[str] = None,
            modified_by: Optional[str] = None,
            operator: Optional[str] = None) -> DropMetrics
    func GetDropMetrics(ctx *Context, name string, id IDInput, state *DropMetricsState, opts ...ResourceOption) (*DropMetrics, error)
    public static DropMetrics Get(string name, Input<string> id, DropMetricsState? state, CustomResourceOptions? opts = null)
    public static DropMetrics get(String name, Output<String> id, DropMetricsState state, CustomResourceOptions options)
    resources:  _:    type: logzio:DropMetrics    get:      id: ${id}
    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.
    The following state arguments are supported:
    AccountId double
    The Logz.io metrics account ID to which the drop filter applies.
    Active bool
    If true, the drop filter is active and metrics that match the filter are dropped before indexing. If false, the drop filter is disabled. Defaults to true.
    CreatedAt string
    (String) The timestamp when the drop filter was created.
    CreatedBy string
    (String) The user who created the drop filter.
    DropMetricId double
    (String) The unique identifier of the drop filter in the Logz.io database.
    DropMetricsId string
    Filters List<DropMetricsFilter>
    ModifiedAt string
    (String) The timestamp when the drop filter was last modified.
    ModifiedBy string
    (String) The user who last updated the drop filter.
    Operator string
    The logical operator for combining filter expressions. Supported value is AND.
    AccountId float64
    The Logz.io metrics account ID to which the drop filter applies.
    Active bool
    If true, the drop filter is active and metrics that match the filter are dropped before indexing. If false, the drop filter is disabled. Defaults to true.
    CreatedAt string
    (String) The timestamp when the drop filter was created.
    CreatedBy string
    (String) The user who created the drop filter.
    DropMetricId float64
    (String) The unique identifier of the drop filter in the Logz.io database.
    DropMetricsId string
    Filters []DropMetricsFilterArgs
    ModifiedAt string
    (String) The timestamp when the drop filter was last modified.
    ModifiedBy string
    (String) The user who last updated the drop filter.
    Operator string
    The logical operator for combining filter expressions. Supported value is AND.
    accountId Double
    The Logz.io metrics account ID to which the drop filter applies.
    active Boolean
    If true, the drop filter is active and metrics that match the filter are dropped before indexing. If false, the drop filter is disabled. Defaults to true.
    createdAt String
    (String) The timestamp when the drop filter was created.
    createdBy String
    (String) The user who created the drop filter.
    dropMetricId Double
    (String) The unique identifier of the drop filter in the Logz.io database.
    dropMetricsId String
    filters List<DropMetricsFilter>
    modifiedAt String
    (String) The timestamp when the drop filter was last modified.
    modifiedBy String
    (String) The user who last updated the drop filter.
    operator String
    The logical operator for combining filter expressions. Supported value is AND.
    accountId number
    The Logz.io metrics account ID to which the drop filter applies.
    active boolean
    If true, the drop filter is active and metrics that match the filter are dropped before indexing. If false, the drop filter is disabled. Defaults to true.
    createdAt string
    (String) The timestamp when the drop filter was created.
    createdBy string
    (String) The user who created the drop filter.
    dropMetricId number
    (String) The unique identifier of the drop filter in the Logz.io database.
    dropMetricsId string
    filters DropMetricsFilter[]
    modifiedAt string
    (String) The timestamp when the drop filter was last modified.
    modifiedBy string
    (String) The user who last updated the drop filter.
    operator string
    The logical operator for combining filter expressions. Supported value is AND.
    account_id float
    The Logz.io metrics account ID to which the drop filter applies.
    active bool
    If true, the drop filter is active and metrics that match the filter are dropped before indexing. If false, the drop filter is disabled. Defaults to true.
    created_at str
    (String) The timestamp when the drop filter was created.
    created_by str
    (String) The user who created the drop filter.
    drop_metric_id float
    (String) The unique identifier of the drop filter in the Logz.io database.
    drop_metrics_id str
    filters Sequence[DropMetricsFilterArgs]
    modified_at str
    (String) The timestamp when the drop filter was last modified.
    modified_by str
    (String) The user who last updated the drop filter.
    operator str
    The logical operator for combining filter expressions. Supported value is AND.
    accountId Number
    The Logz.io metrics account ID to which the drop filter applies.
    active Boolean
    If true, the drop filter is active and metrics that match the filter are dropped before indexing. If false, the drop filter is disabled. Defaults to true.
    createdAt String
    (String) The timestamp when the drop filter was created.
    createdBy String
    (String) The user who created the drop filter.
    dropMetricId Number
    (String) The unique identifier of the drop filter in the Logz.io database.
    dropMetricsId String
    filters List<Property Map>
    modifiedAt String
    (String) The timestamp when the drop filter was last modified.
    modifiedBy String
    (String) The user who last updated the drop filter.
    operator String
    The logical operator for combining filter expressions. Supported value is AND.

    Supporting Types

    DropMetricsFilter, DropMetricsFilterArgs

    Condition string
    The comparison operator to use for the filter. Supported values are EQ, NOT_EQ, REGEX_MATCH, and REGEX_NO_MATCH.
    Name string
    The name of the metric label to filter on.
    Value string
    The value of the metric label to match against.
    Condition string
    The comparison operator to use for the filter. Supported values are EQ, NOT_EQ, REGEX_MATCH, and REGEX_NO_MATCH.
    Name string
    The name of the metric label to filter on.
    Value string
    The value of the metric label to match against.
    condition String
    The comparison operator to use for the filter. Supported values are EQ, NOT_EQ, REGEX_MATCH, and REGEX_NO_MATCH.
    name String
    The name of the metric label to filter on.
    value String
    The value of the metric label to match against.
    condition string
    The comparison operator to use for the filter. Supported values are EQ, NOT_EQ, REGEX_MATCH, and REGEX_NO_MATCH.
    name string
    The name of the metric label to filter on.
    value string
    The value of the metric label to match against.
    condition str
    The comparison operator to use for the filter. Supported values are EQ, NOT_EQ, REGEX_MATCH, and REGEX_NO_MATCH.
    name str
    The name of the metric label to filter on.
    value str
    The value of the metric label to match against.
    condition String
    The comparison operator to use for the filter. Supported values are EQ, NOT_EQ, REGEX_MATCH, and REGEX_NO_MATCH.
    name String
    The name of the metric label to filter on.
    value String
    The value of the metric label to match against.

    Package Details

    Repository
    logzio logzio/terraform-provider-logzio
    License
    Notes
    This Pulumi package is based on the logzio Terraform Provider.
    logzio logo
    logzio 1.20.0 published on Wednesday, Aug 13, 2025 by logzio