logzio.DropMetrics
Explore with Pulumi AI
# 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.
- 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.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:
- Account
Id double - The Logz.io metrics account ID to which the drop filter applies.
- Filters
List<Drop
Metrics Filter> - 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 doubleId - (String) The unique identifier of the drop filter in the Logz.io database.
- Drop
Metrics stringId - Operator string
- The logical operator for combining filter expressions. Supported value is
AND
.
- Account
Id float64 - The Logz.io metrics account ID to which the drop filter applies.
- Filters
[]Drop
Metrics Filter Args - 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 float64Id - (String) The unique identifier of the drop filter in the Logz.io database.
- Drop
Metrics stringId - Operator string
- The logical operator for combining filter expressions. Supported value is
AND
.
- account
Id Double - The Logz.io metrics account ID to which the drop filter applies.
- filters
List<Drop
Metrics Filter> - 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.
- drop
Metric DoubleId - (String) The unique identifier of the drop filter in the Logz.io database.
- drop
Metrics StringId - operator String
- The logical operator for combining filter expressions. Supported value is
AND
.
- account
Id number - The Logz.io metrics account ID to which the drop filter applies.
- filters
Drop
Metrics Filter[] - 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.
- drop
Metric numberId - (String) The unique identifier of the drop filter in the Logz.io database.
- drop
Metrics stringId - 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[Drop
Metrics Filter Args] - 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_ floatid - (String) The unique identifier of the drop filter in the Logz.io database.
- drop_
metrics_ strid - operator str
- The logical operator for combining filter expressions. Supported value is
AND
.
- account
Id 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.
- drop
Metric NumberId - (String) The unique identifier of the drop filter in the Logz.io database.
- drop
Metrics StringId - 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:
- Created
At string - (String) The timestamp when the drop filter was created.
- Created
By string - (String) The user who created the drop filter.
- Id string
- The provider-assigned unique ID for this managed resource.
- Modified
At string - (String) The timestamp when the drop filter was last modified.
- Modified
By string - (String) The user who last updated the drop filter.
- Created
At string - (String) The timestamp when the drop filter was created.
- Created
By string - (String) The user who created the drop filter.
- Id string
- The provider-assigned unique ID for this managed resource.
- Modified
At string - (String) The timestamp when the drop filter was last modified.
- Modified
By string - (String) The user who last updated the drop filter.
- created
At String - (String) The timestamp when the drop filter was created.
- created
By String - (String) The user who created the drop filter.
- id String
- The provider-assigned unique ID for this managed resource.
- modified
At String - (String) The timestamp when the drop filter was last modified.
- modified
By String - (String) The user who last updated the drop filter.
- created
At string - (String) The timestamp when the drop filter was created.
- created
By string - (String) The user who created the drop filter.
- id string
- The provider-assigned unique ID for this managed resource.
- modified
At string - (String) The timestamp when the drop filter was last modified.
- modified
By 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.
- created
At String - (String) The timestamp when the drop filter was created.
- created
By String - (String) The user who created the drop filter.
- id String
- The provider-assigned unique ID for this managed resource.
- modified
At String - (String) The timestamp when the drop filter was last modified.
- modified
By 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.
- Account
Id 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.
- Created
At string - (String) The timestamp when the drop filter was created.
- Created
By string - (String) The user who created the drop filter.
- Drop
Metric doubleId - (String) The unique identifier of the drop filter in the Logz.io database.
- Drop
Metrics stringId - Filters
List<Drop
Metrics Filter> - Modified
At string - (String) The timestamp when the drop filter was last modified.
- Modified
By 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 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.
- Created
At string - (String) The timestamp when the drop filter was created.
- Created
By string - (String) The user who created the drop filter.
- Drop
Metric float64Id - (String) The unique identifier of the drop filter in the Logz.io database.
- Drop
Metrics stringId - Filters
[]Drop
Metrics Filter Args - Modified
At string - (String) The timestamp when the drop filter was last modified.
- Modified
By 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 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.
- created
At String - (String) The timestamp when the drop filter was created.
- created
By String - (String) The user who created the drop filter.
- drop
Metric DoubleId - (String) The unique identifier of the drop filter in the Logz.io database.
- drop
Metrics StringId - filters
List<Drop
Metrics Filter> - modified
At String - (String) The timestamp when the drop filter was last modified.
- modified
By 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 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.
- created
At string - (String) The timestamp when the drop filter was created.
- created
By string - (String) The user who created the drop filter.
- drop
Metric numberId - (String) The unique identifier of the drop filter in the Logz.io database.
- drop
Metrics stringId - filters
Drop
Metrics Filter[] - modified
At string - (String) The timestamp when the drop filter was last modified.
- modified
By 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_ floatid - (String) The unique identifier of the drop filter in the Logz.io database.
- drop_
metrics_ strid - filters
Sequence[Drop
Metrics Filter Args] - 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
.
- account
Id 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.
- created
At String - (String) The timestamp when the drop filter was created.
- created
By String - (String) The user who created the drop filter.
- drop
Metric NumberId - (String) The unique identifier of the drop filter in the Logz.io database.
- drop
Metrics StringId - filters List<Property Map>
- modified
At String - (String) The timestamp when the drop filter was last modified.
- modified
By 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
Package Details
- Repository
- logzio logzio/terraform-provider-logzio
- License
- Notes
- This Pulumi package is based on the
logzio
Terraform Provider.