logzio.DropFilter
Explore with Pulumi AI
# Drop Filter Provider
Provides a Logz.io drop filter resource. This can be used to create and manage Logz.io drop filters.
- Learn more about drop filters in the Logz.io Docs.
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.DropFilter("testFilter", {
    logType: "some_type",
    fieldConditions: [
        {
            fieldName: "some_field",
            value: "string_value",
        },
        {
            fieldName: "other_field_int",
            value: "200",
        },
    ],
});
import pulumi
import pulumi_logzio as logzio
config = pulumi.Config()
api_token = config.require("apiToken")
test_filter = logzio.DropFilter("testFilter",
    log_type="some_type",
    field_conditions=[
        {
            "field_name": "some_field",
            "value": "string_value",
        },
        {
            "field_name": "other_field_int",
            "value": "200",
        },
    ])
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.NewDropFilter(ctx, "testFilter", &logzio.DropFilterArgs{
			LogType: pulumi.String("some_type"),
			FieldConditions: logzio.DropFilterFieldConditionArray{
				&logzio.DropFilterFieldConditionArgs{
					FieldName: pulumi.String("some_field"),
					Value:     pulumi.String("string_value"),
				},
				&logzio.DropFilterFieldConditionArgs{
					FieldName: pulumi.String("other_field_int"),
					Value:     pulumi.String("200"),
				},
			},
		})
		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.DropFilter("testFilter", new()
    {
        LogType = "some_type",
        FieldConditions = new[]
        {
            new Logzio.Inputs.DropFilterFieldConditionArgs
            {
                FieldName = "some_field",
                Value = "string_value",
            },
            new Logzio.Inputs.DropFilterFieldConditionArgs
            {
                FieldName = "other_field_int",
                Value = "200",
            },
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.logzio.DropFilter;
import com.pulumi.logzio.DropFilterArgs;
import com.pulumi.logzio.inputs.DropFilterFieldConditionArgs;
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 DropFilter("testFilter", DropFilterArgs.builder()
            .logType("some_type")
            .fieldConditions(            
                DropFilterFieldConditionArgs.builder()
                    .fieldName("some_field")
                    .value("string_value")
                    .build(),
                DropFilterFieldConditionArgs.builder()
                    .fieldName("other_field_int")
                    .value(200)
                    .build())
            .build());
    }
}
configuration:
  apiToken:
    type: string
resources:
  testFilter:
    type: logzio:DropFilter
    properties:
      logType: some_type
      fieldConditions:
        - fieldName: some_field
          value: string_value
        - fieldName: other_field_int
          value: 200
Attribute Reference
- drop_filter_id- (String) Drop filter ID in the Logz.io database.
Import drop filter as resource
You can import drop filters as follows:
terraform import logzio_drop_filter.my_filter <DROP-FILTER-ID>
Create DropFilter Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DropFilter(name: string, args: DropFilterArgs, opts?: CustomResourceOptions);@overload
def DropFilter(resource_name: str,
               args: DropFilterArgs,
               opts: Optional[ResourceOptions] = None)
@overload
def DropFilter(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               field_conditions: Optional[Sequence[DropFilterFieldConditionArgs]] = None,
               active: Optional[bool] = None,
               drop_filter_id: Optional[str] = None,
               log_type: Optional[str] = None,
               logzio_drop_filter_id: Optional[str] = None)func NewDropFilter(ctx *Context, name string, args DropFilterArgs, opts ...ResourceOption) (*DropFilter, error)public DropFilter(string name, DropFilterArgs args, CustomResourceOptions? opts = null)
public DropFilter(String name, DropFilterArgs args)
public DropFilter(String name, DropFilterArgs args, CustomResourceOptions options)
type: logzio:DropFilter
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 DropFilterArgs
- 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 DropFilterArgs
- 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 DropFilterArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DropFilterArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DropFilterArgs
- 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 dropFilterResource = new Logzio.DropFilter("dropFilterResource", new()
{
    FieldConditions = new[]
    {
        new Logzio.Inputs.DropFilterFieldConditionArgs
        {
            FieldName = "string",
            Value = "string",
        },
    },
    Active = false,
    DropFilterId = "string",
    LogType = "string",
    LogzioDropFilterId = "string",
});
example, err := logzio.NewDropFilter(ctx, "dropFilterResource", &logzio.DropFilterArgs{
	FieldConditions: logzio.DropFilterFieldConditionArray{
		&logzio.DropFilterFieldConditionArgs{
			FieldName: pulumi.String("string"),
			Value:     pulumi.String("string"),
		},
	},
	Active:             pulumi.Bool(false),
	DropFilterId:       pulumi.String("string"),
	LogType:            pulumi.String("string"),
	LogzioDropFilterId: pulumi.String("string"),
})
var dropFilterResource = new DropFilter("dropFilterResource", DropFilterArgs.builder()
    .fieldConditions(DropFilterFieldConditionArgs.builder()
        .fieldName("string")
        .value("string")
        .build())
    .active(false)
    .dropFilterId("string")
    .logType("string")
    .logzioDropFilterId("string")
    .build());
drop_filter_resource = logzio.DropFilter("dropFilterResource",
    field_conditions=[{
        "field_name": "string",
        "value": "string",
    }],
    active=False,
    drop_filter_id="string",
    log_type="string",
    logzio_drop_filter_id="string")
const dropFilterResource = new logzio.DropFilter("dropFilterResource", {
    fieldConditions: [{
        fieldName: "string",
        value: "string",
    }],
    active: false,
    dropFilterId: "string",
    logType: "string",
    logzioDropFilterId: "string",
});
type: logzio:DropFilter
properties:
    active: false
    dropFilterId: string
    fieldConditions:
        - fieldName: string
          value: string
    logType: string
    logzioDropFilterId: string
DropFilter 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 DropFilter resource accepts the following input properties:
- FieldConditions List<DropFilter Field Condition> 
- Active bool
- DropFilter stringId 
- LogType string
- LogzioDrop stringFilter Id 
- FieldConditions []DropFilter Field Condition Args 
- Active bool
- DropFilter stringId 
- LogType string
- LogzioDrop stringFilter Id 
- fieldConditions List<DropFilter Field Condition> 
- active Boolean
- dropFilter StringId 
- logType String
- logzioDrop StringFilter Id 
- fieldConditions DropFilter Field Condition[] 
- active boolean
- dropFilter stringId 
- logType string
- logzioDrop stringFilter Id 
- fieldConditions List<Property Map>
- active Boolean
- dropFilter StringId 
- logType String
- logzioDrop StringFilter Id 
Outputs
All input properties are implicitly available as output properties. Additionally, the DropFilter resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing DropFilter Resource
Get an existing DropFilter 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?: DropFilterState, opts?: CustomResourceOptions): DropFilter@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        active: Optional[bool] = None,
        drop_filter_id: Optional[str] = None,
        field_conditions: Optional[Sequence[DropFilterFieldConditionArgs]] = None,
        log_type: Optional[str] = None,
        logzio_drop_filter_id: Optional[str] = None) -> DropFilterfunc GetDropFilter(ctx *Context, name string, id IDInput, state *DropFilterState, opts ...ResourceOption) (*DropFilter, error)public static DropFilter Get(string name, Input<string> id, DropFilterState? state, CustomResourceOptions? opts = null)public static DropFilter get(String name, Output<String> id, DropFilterState state, CustomResourceOptions options)resources:  _:    type: logzio:DropFilter    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.
- Active bool
- DropFilter stringId 
- FieldConditions List<DropFilter Field Condition> 
- LogType string
- LogzioDrop stringFilter Id 
- Active bool
- DropFilter stringId 
- FieldConditions []DropFilter Field Condition Args 
- LogType string
- LogzioDrop stringFilter Id 
- active Boolean
- dropFilter StringId 
- fieldConditions List<DropFilter Field Condition> 
- logType String
- logzioDrop StringFilter Id 
- active boolean
- dropFilter stringId 
- fieldConditions DropFilter Field Condition[] 
- logType string
- logzioDrop stringFilter Id 
- active Boolean
- dropFilter StringId 
- fieldConditions List<Property Map>
- logType String
- logzioDrop StringFilter Id 
Supporting Types
DropFilterFieldCondition, DropFilterFieldConditionArgs        
- FieldName string
- Exact field name in your Kibana mapping for the selected log_type. Note that changing this field after creation will cause the resource to be destroyed and re-created.
- Value string
- Exact field value. The filter looks for an exact value match of the entire object. Note that changing this field after creation will cause the resource to be destroyed and re-created.
- FieldName string
- Exact field name in your Kibana mapping for the selected log_type. Note that changing this field after creation will cause the resource to be destroyed and re-created.
- Value string
- Exact field value. The filter looks for an exact value match of the entire object. Note that changing this field after creation will cause the resource to be destroyed and re-created.
- fieldName String
- Exact field name in your Kibana mapping for the selected log_type. Note that changing this field after creation will cause the resource to be destroyed and re-created.
- value String
- Exact field value. The filter looks for an exact value match of the entire object. Note that changing this field after creation will cause the resource to be destroyed and re-created.
- fieldName string
- Exact field name in your Kibana mapping for the selected log_type. Note that changing this field after creation will cause the resource to be destroyed and re-created.
- value string
- Exact field value. The filter looks for an exact value match of the entire object. Note that changing this field after creation will cause the resource to be destroyed and re-created.
- field_name str
- Exact field name in your Kibana mapping for the selected log_type. Note that changing this field after creation will cause the resource to be destroyed and re-created.
- value str
- Exact field value. The filter looks for an exact value match of the entire object. Note that changing this field after creation will cause the resource to be destroyed and re-created.
- fieldName String
- Exact field name in your Kibana mapping for the selected log_type. Note that changing this field after creation will cause the resource to be destroyed and re-created.
- value String
- Exact field value. The filter looks for an exact value match of the entire object. Note that changing this field after creation will cause the resource to be destroyed and re-created.
Package Details
- Repository
- logzio logzio/terraform-provider-logzio
- License
- Notes
- This Pulumi package is based on the logzioTerraform Provider.