datadog.SecurityMonitoringFilter
Explore with Pulumi AI
Provides a Datadog Security Monitoring Rule API resource for security filters.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as datadog from "@pulumi/datadog";
const myFilter = new datadog.SecurityMonitoringFilter("my_filter", {
name: "My filter",
query: "The filter is filtering.",
isEnabled: true,
exclusionFilters: [
{
name: "first",
query: "exclude some logs",
},
{
name: "second",
query: "exclude some other logs",
},
],
});
import pulumi
import pulumi_datadog as datadog
my_filter = datadog.SecurityMonitoringFilter("my_filter",
name="My filter",
query="The filter is filtering.",
is_enabled=True,
exclusion_filters=[
datadog.SecurityMonitoringFilterExclusionFilterArgs(
name="first",
query="exclude some logs",
),
datadog.SecurityMonitoringFilterExclusionFilterArgs(
name="second",
query="exclude some other logs",
),
])
package main
import (
"github.com/pulumi/pulumi-datadog/sdk/v4/go/datadog"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := datadog.NewSecurityMonitoringFilter(ctx, "my_filter", &datadog.SecurityMonitoringFilterArgs{
Name: pulumi.String("My filter"),
Query: pulumi.String("The filter is filtering."),
IsEnabled: pulumi.Bool(true),
ExclusionFilters: datadog.SecurityMonitoringFilterExclusionFilterArray{
&datadog.SecurityMonitoringFilterExclusionFilterArgs{
Name: pulumi.String("first"),
Query: pulumi.String("exclude some logs"),
},
&datadog.SecurityMonitoringFilterExclusionFilterArgs{
Name: pulumi.String("second"),
Query: pulumi.String("exclude some other logs"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Datadog = Pulumi.Datadog;
return await Deployment.RunAsync(() =>
{
var myFilter = new Datadog.SecurityMonitoringFilter("my_filter", new()
{
Name = "My filter",
Query = "The filter is filtering.",
IsEnabled = true,
ExclusionFilters = new[]
{
new Datadog.Inputs.SecurityMonitoringFilterExclusionFilterArgs
{
Name = "first",
Query = "exclude some logs",
},
new Datadog.Inputs.SecurityMonitoringFilterExclusionFilterArgs
{
Name = "second",
Query = "exclude some other logs",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.datadog.SecurityMonitoringFilter;
import com.pulumi.datadog.SecurityMonitoringFilterArgs;
import com.pulumi.datadog.inputs.SecurityMonitoringFilterExclusionFilterArgs;
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 myFilter = new SecurityMonitoringFilter("myFilter", SecurityMonitoringFilterArgs.builder()
.name("My filter")
.query("The filter is filtering.")
.isEnabled(true)
.exclusionFilters(
SecurityMonitoringFilterExclusionFilterArgs.builder()
.name("first")
.query("exclude some logs")
.build(),
SecurityMonitoringFilterExclusionFilterArgs.builder()
.name("second")
.query("exclude some other logs")
.build())
.build());
}
}
resources:
myFilter:
type: datadog:SecurityMonitoringFilter
name: my_filter
properties:
name: My filter
query: The filter is filtering.
isEnabled: true
exclusionFilters:
- name: first
query: exclude some logs
- name: second
query: exclude some other logs
Create SecurityMonitoringFilter Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SecurityMonitoringFilter(name: string, args: SecurityMonitoringFilterArgs, opts?: CustomResourceOptions);
@overload
def SecurityMonitoringFilter(resource_name: str,
args: SecurityMonitoringFilterArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SecurityMonitoringFilter(resource_name: str,
opts: Optional[ResourceOptions] = None,
is_enabled: Optional[bool] = None,
name: Optional[str] = None,
query: Optional[str] = None,
exclusion_filters: Optional[Sequence[SecurityMonitoringFilterExclusionFilterArgs]] = None,
filtered_data_type: Optional[str] = None)
func NewSecurityMonitoringFilter(ctx *Context, name string, args SecurityMonitoringFilterArgs, opts ...ResourceOption) (*SecurityMonitoringFilter, error)
public SecurityMonitoringFilter(string name, SecurityMonitoringFilterArgs args, CustomResourceOptions? opts = null)
public SecurityMonitoringFilter(String name, SecurityMonitoringFilterArgs args)
public SecurityMonitoringFilter(String name, SecurityMonitoringFilterArgs args, CustomResourceOptions options)
type: datadog:SecurityMonitoringFilter
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 SecurityMonitoringFilterArgs
- 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 SecurityMonitoringFilterArgs
- 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 SecurityMonitoringFilterArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SecurityMonitoringFilterArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SecurityMonitoringFilterArgs
- 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 securityMonitoringFilterResource = new Datadog.SecurityMonitoringFilter("securityMonitoringFilterResource", new()
{
IsEnabled = false,
Name = "string",
Query = "string",
ExclusionFilters = new[]
{
new Datadog.Inputs.SecurityMonitoringFilterExclusionFilterArgs
{
Name = "string",
Query = "string",
},
},
FilteredDataType = "string",
});
example, err := datadog.NewSecurityMonitoringFilter(ctx, "securityMonitoringFilterResource", &datadog.SecurityMonitoringFilterArgs{
IsEnabled: pulumi.Bool(false),
Name: pulumi.String("string"),
Query: pulumi.String("string"),
ExclusionFilters: datadog.SecurityMonitoringFilterExclusionFilterArray{
&datadog.SecurityMonitoringFilterExclusionFilterArgs{
Name: pulumi.String("string"),
Query: pulumi.String("string"),
},
},
FilteredDataType: pulumi.String("string"),
})
var securityMonitoringFilterResource = new SecurityMonitoringFilter("securityMonitoringFilterResource", SecurityMonitoringFilterArgs.builder()
.isEnabled(false)
.name("string")
.query("string")
.exclusionFilters(SecurityMonitoringFilterExclusionFilterArgs.builder()
.name("string")
.query("string")
.build())
.filteredDataType("string")
.build());
security_monitoring_filter_resource = datadog.SecurityMonitoringFilter("securityMonitoringFilterResource",
is_enabled=False,
name="string",
query="string",
exclusion_filters=[datadog.SecurityMonitoringFilterExclusionFilterArgs(
name="string",
query="string",
)],
filtered_data_type="string")
const securityMonitoringFilterResource = new datadog.SecurityMonitoringFilter("securityMonitoringFilterResource", {
isEnabled: false,
name: "string",
query: "string",
exclusionFilters: [{
name: "string",
query: "string",
}],
filteredDataType: "string",
});
type: datadog:SecurityMonitoringFilter
properties:
exclusionFilters:
- name: string
query: string
filteredDataType: string
isEnabled: false
name: string
query: string
SecurityMonitoringFilter Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The SecurityMonitoringFilter resource accepts the following input properties:
- Is
Enabled bool - Whether the security filter is enabled.
- Name string
- The name of the security filter.
- Query string
- The query of the security filter.
- Exclusion
Filters List<SecurityMonitoring Filter Exclusion Filter> - Exclusion filters to exclude some logs from the security filter.
- Filtered
Data stringType - The filtered data type. Valid values are
logs
. Defaults to"logs"
.
- Is
Enabled bool - Whether the security filter is enabled.
- Name string
- The name of the security filter.
- Query string
- The query of the security filter.
- Exclusion
Filters []SecurityMonitoring Filter Exclusion Filter Args - Exclusion filters to exclude some logs from the security filter.
- Filtered
Data stringType - The filtered data type. Valid values are
logs
. Defaults to"logs"
.
- is
Enabled Boolean - Whether the security filter is enabled.
- name String
- The name of the security filter.
- query String
- The query of the security filter.
- exclusion
Filters List<SecurityMonitoring Filter Exclusion Filter> - Exclusion filters to exclude some logs from the security filter.
- filtered
Data StringType - The filtered data type. Valid values are
logs
. Defaults to"logs"
.
- is
Enabled boolean - Whether the security filter is enabled.
- name string
- The name of the security filter.
- query string
- The query of the security filter.
- exclusion
Filters SecurityMonitoring Filter Exclusion Filter[] - Exclusion filters to exclude some logs from the security filter.
- filtered
Data stringType - The filtered data type. Valid values are
logs
. Defaults to"logs"
.
- is_
enabled bool - Whether the security filter is enabled.
- name str
- The name of the security filter.
- query str
- The query of the security filter.
- exclusion_
filters Sequence[SecurityMonitoring Filter Exclusion Filter Args] - Exclusion filters to exclude some logs from the security filter.
- filtered_
data_ strtype - The filtered data type. Valid values are
logs
. Defaults to"logs"
.
- is
Enabled Boolean - Whether the security filter is enabled.
- name String
- The name of the security filter.
- query String
- The query of the security filter.
- exclusion
Filters List<Property Map> - Exclusion filters to exclude some logs from the security filter.
- filtered
Data StringType - The filtered data type. Valid values are
logs
. Defaults to"logs"
.
Outputs
All input properties are implicitly available as output properties. Additionally, the SecurityMonitoringFilter resource produces the following output properties:
Look up Existing SecurityMonitoringFilter Resource
Get an existing SecurityMonitoringFilter 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?: SecurityMonitoringFilterState, opts?: CustomResourceOptions): SecurityMonitoringFilter
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
exclusion_filters: Optional[Sequence[SecurityMonitoringFilterExclusionFilterArgs]] = None,
filtered_data_type: Optional[str] = None,
is_enabled: Optional[bool] = None,
name: Optional[str] = None,
query: Optional[str] = None,
version: Optional[int] = None) -> SecurityMonitoringFilter
func GetSecurityMonitoringFilter(ctx *Context, name string, id IDInput, state *SecurityMonitoringFilterState, opts ...ResourceOption) (*SecurityMonitoringFilter, error)
public static SecurityMonitoringFilter Get(string name, Input<string> id, SecurityMonitoringFilterState? state, CustomResourceOptions? opts = null)
public static SecurityMonitoringFilter get(String name, Output<String> id, SecurityMonitoringFilterState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Exclusion
Filters List<SecurityMonitoring Filter Exclusion Filter> - Exclusion filters to exclude some logs from the security filter.
- Filtered
Data stringType - The filtered data type. Valid values are
logs
. Defaults to"logs"
. - Is
Enabled bool - Whether the security filter is enabled.
- Name string
- The name of the security filter.
- Query string
- The query of the security filter.
- Version int
- The version of the security filter.
- Exclusion
Filters []SecurityMonitoring Filter Exclusion Filter Args - Exclusion filters to exclude some logs from the security filter.
- Filtered
Data stringType - The filtered data type. Valid values are
logs
. Defaults to"logs"
. - Is
Enabled bool - Whether the security filter is enabled.
- Name string
- The name of the security filter.
- Query string
- The query of the security filter.
- Version int
- The version of the security filter.
- exclusion
Filters List<SecurityMonitoring Filter Exclusion Filter> - Exclusion filters to exclude some logs from the security filter.
- filtered
Data StringType - The filtered data type. Valid values are
logs
. Defaults to"logs"
. - is
Enabled Boolean - Whether the security filter is enabled.
- name String
- The name of the security filter.
- query String
- The query of the security filter.
- version Integer
- The version of the security filter.
- exclusion
Filters SecurityMonitoring Filter Exclusion Filter[] - Exclusion filters to exclude some logs from the security filter.
- filtered
Data stringType - The filtered data type. Valid values are
logs
. Defaults to"logs"
. - is
Enabled boolean - Whether the security filter is enabled.
- name string
- The name of the security filter.
- query string
- The query of the security filter.
- version number
- The version of the security filter.
- exclusion_
filters Sequence[SecurityMonitoring Filter Exclusion Filter Args] - Exclusion filters to exclude some logs from the security filter.
- filtered_
data_ strtype - The filtered data type. Valid values are
logs
. Defaults to"logs"
. - is_
enabled bool - Whether the security filter is enabled.
- name str
- The name of the security filter.
- query str
- The query of the security filter.
- version int
- The version of the security filter.
- exclusion
Filters List<Property Map> - Exclusion filters to exclude some logs from the security filter.
- filtered
Data StringType - The filtered data type. Valid values are
logs
. Defaults to"logs"
. - is
Enabled Boolean - Whether the security filter is enabled.
- name String
- The name of the security filter.
- query String
- The query of the security filter.
- version Number
- The version of the security filter.
Supporting Types
SecurityMonitoringFilterExclusionFilter, SecurityMonitoringFilterExclusionFilterArgs
Import
Security monitoring filters can be imported using ID, e.g.
$ pulumi import datadog:index/securityMonitoringFilter:SecurityMonitoringFilter my_filter m0o-hto-lkb
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Datadog pulumi/pulumi-datadog
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
datadog
Terraform Provider.