logdna.IngestionExclusion
Explore with Pulumi AI
# Resource: logdna.IngestionExclusion
The resource allows you to filter out logs that you don’t need to store, preventing lines from being ingested in our searchable database. You can define exclusion rules by application, hostname, and patterns within log lines.
Example
import * as pulumi from "@pulumi/pulumi";
import * as logdna from "@pulumi/logdna";
const http_success = new logdna.IngestionExclusion("http-success", {
active: true,
apps: [
"nginx",
"apache",
],
indexonly: false,
query: "response:(>=200 <300)",
title: "HTTP 2XX",
});
const http_noise = new logdna.IngestionExclusion("http-noise", {
active: true,
apps: [
"nginx",
"apache",
],
indexonly: true,
query: "robots.txt OR favicon.ico OR .well-known",
title: "Noisy HTTP Paths",
});
import pulumi
import pulumi_logdna as logdna
http_success = logdna.IngestionExclusion("http-success",
active=True,
apps=[
"nginx",
"apache",
],
indexonly=False,
query="response:(>=200 <300)",
title="HTTP 2XX")
http_noise = logdna.IngestionExclusion("http-noise",
active=True,
apps=[
"nginx",
"apache",
],
indexonly=True,
query="robots.txt OR favicon.ico OR .well-known",
title="Noisy HTTP Paths")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/logdna/logdna"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := logdna.NewIngestionExclusion(ctx, "http-success", &logdna.IngestionExclusionArgs{
Active: pulumi.Bool(true),
Apps: pulumi.StringArray{
pulumi.String("nginx"),
pulumi.String("apache"),
},
Indexonly: pulumi.Bool(false),
Query: pulumi.String("response:(>=200 <300)"),
Title: pulumi.String("HTTP 2XX"),
})
if err != nil {
return err
}
_, err = logdna.NewIngestionExclusion(ctx, "http-noise", &logdna.IngestionExclusionArgs{
Active: pulumi.Bool(true),
Apps: pulumi.StringArray{
pulumi.String("nginx"),
pulumi.String("apache"),
},
Indexonly: pulumi.Bool(true),
Query: pulumi.String("robots.txt OR favicon.ico OR .well-known"),
Title: pulumi.String("Noisy HTTP Paths"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Logdna = Pulumi.Logdna;
return await Deployment.RunAsync(() =>
{
var http_success = new Logdna.IngestionExclusion("http-success", new()
{
Active = true,
Apps = new[]
{
"nginx",
"apache",
},
Indexonly = false,
Query = "response:(>=200 <300)",
Title = "HTTP 2XX",
});
var http_noise = new Logdna.IngestionExclusion("http-noise", new()
{
Active = true,
Apps = new[]
{
"nginx",
"apache",
},
Indexonly = true,
Query = "robots.txt OR favicon.ico OR .well-known",
Title = "Noisy HTTP Paths",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.logdna.IngestionExclusion;
import com.pulumi.logdna.IngestionExclusionArgs;
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) {
var http_success = new IngestionExclusion("http-success", IngestionExclusionArgs.builder()
.active(true)
.apps(
"nginx",
"apache")
.indexonly(false)
.query("response:(>=200 <300)")
.title("HTTP 2XX")
.build());
var http_noise = new IngestionExclusion("http-noise", IngestionExclusionArgs.builder()
.active(true)
.apps(
"nginx",
"apache")
.indexonly(true)
.query("robots.txt OR favicon.ico OR .well-known")
.title("Noisy HTTP Paths")
.build());
}
}
resources:
http-success:
type: logdna:IngestionExclusion
properties:
active: true
apps:
- nginx
- apache
indexonly: false
query: response:(>=200 <300)
title: HTTP 2XX
http-noise:
type: logdna:IngestionExclusion
properties:
active: true
apps:
- nginx
- apache
indexonly: true
query: robots.txt OR favicon.ico OR .well-known
title: Noisy HTTP Paths
Create IngestionExclusion Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new IngestionExclusion(name: string, args?: IngestionExclusionArgs, opts?: CustomResourceOptions);
@overload
def IngestionExclusion(resource_name: str,
args: Optional[IngestionExclusionArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def IngestionExclusion(resource_name: str,
opts: Optional[ResourceOptions] = None,
active: Optional[bool] = None,
apps: Optional[Sequence[str]] = None,
hosts: Optional[Sequence[str]] = None,
indexonly: Optional[bool] = None,
query: Optional[str] = None,
title: Optional[str] = None)
func NewIngestionExclusion(ctx *Context, name string, args *IngestionExclusionArgs, opts ...ResourceOption) (*IngestionExclusion, error)
public IngestionExclusion(string name, IngestionExclusionArgs? args = null, CustomResourceOptions? opts = null)
public IngestionExclusion(String name, IngestionExclusionArgs args)
public IngestionExclusion(String name, IngestionExclusionArgs args, CustomResourceOptions options)
type: logdna:IngestionExclusion
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 IngestionExclusionArgs
- 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 IngestionExclusionArgs
- 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 IngestionExclusionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args IngestionExclusionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args IngestionExclusionArgs
- 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 ingestionExclusionResource = new Logdna.IngestionExclusion("ingestionExclusionResource", new()
{
Active = false,
Apps = new[]
{
"string",
},
Hosts = new[]
{
"string",
},
Indexonly = false,
Query = "string",
Title = "string",
});
example, err := logdna.NewIngestionExclusion(ctx, "ingestionExclusionResource", &logdna.IngestionExclusionArgs{
Active: pulumi.Bool(false),
Apps: pulumi.StringArray{
pulumi.String("string"),
},
Hosts: pulumi.StringArray{
pulumi.String("string"),
},
Indexonly: pulumi.Bool(false),
Query: pulumi.String("string"),
Title: pulumi.String("string"),
})
var ingestionExclusionResource = new IngestionExclusion("ingestionExclusionResource", IngestionExclusionArgs.builder()
.active(false)
.apps("string")
.hosts("string")
.indexonly(false)
.query("string")
.title("string")
.build());
ingestion_exclusion_resource = logdna.IngestionExclusion("ingestionExclusionResource",
active=False,
apps=["string"],
hosts=["string"],
indexonly=False,
query="string",
title="string")
const ingestionExclusionResource = new logdna.IngestionExclusion("ingestionExclusionResource", {
active: false,
apps: ["string"],
hosts: ["string"],
indexonly: false,
query: "string",
title: "string",
});
type: logdna:IngestionExclusion
properties:
active: false
apps:
- string
hosts:
- string
indexonly: false
query: string
title: string
IngestionExclusion 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 IngestionExclusion resource accepts the following input properties:
Outputs
All input properties are implicitly available as output properties. Additionally, the IngestionExclusion 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 IngestionExclusion Resource
Get an existing IngestionExclusion 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?: IngestionExclusionState, opts?: CustomResourceOptions): IngestionExclusion
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
active: Optional[bool] = None,
apps: Optional[Sequence[str]] = None,
hosts: Optional[Sequence[str]] = None,
indexonly: Optional[bool] = None,
query: Optional[str] = None,
title: Optional[str] = None) -> IngestionExclusion
func GetIngestionExclusion(ctx *Context, name string, id IDInput, state *IngestionExclusionState, opts ...ResourceOption) (*IngestionExclusion, error)
public static IngestionExclusion Get(string name, Input<string> id, IngestionExclusionState? state, CustomResourceOptions? opts = null)
public static IngestionExclusion get(String name, Output<String> id, IngestionExclusionState state, CustomResourceOptions options)
resources: _: type: logdna:IngestionExclusion 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.
Package Details
- Repository
- logdna logdna/terraform-provider-logdna
- License
- Notes
- This Pulumi package is based on the
logdna
Terraform Provider.