Ready to level-up your engineering skills? Join a Pulumi Workshop. Register Now

getSecurityMonitoringRules

Use this data source to retrieve information about existing security monitoring rules for use in other resources.

Example Usage

using Pulumi;
using Datadog = Pulumi.Datadog;

class MyStack : Stack
{
    public MyStack()
    {
        var test = Output.Create(Datadog.GetSecurityMonitoringRules.InvokeAsync(new Datadog.GetSecurityMonitoringRulesArgs
        {
            DefaultOnlyFilter = true,
            NameFilter = "attack",
            TagsFilters = 
            {
                "foo:bar",
            },
        }));
    }

}
package main

import (
    "github.com/pulumi/pulumi-datadog/sdk/v2/go/datadog"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        opt0 := true
        opt1 := "attack"
        _, err := datadog.GetSecurityMonitoringRules(ctx, &datadog.GetSecurityMonitoringRulesArgs{
            DefaultOnlyFilter: &opt0,
            NameFilter:        &opt1,
            TagsFilters: []string{
                "foo:bar",
            },
        }, nil)
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_datadog as datadog

test = datadog.get_security_monitoring_rules(default_only_filter=True,
    name_filter="attack",
    tags_filters=["foo:bar"])
import * as pulumi from "@pulumi/pulumi";
import * as datadog from "@pulumi/datadog";

const test = pulumi.output(datadog.getSecurityMonitoringRules({
    defaultOnlyFilter: true,
    nameFilter: "attack",
    tagsFilters: ["foo:bar"],
}, { async: true }));

Using getSecurityMonitoringRules

function getSecurityMonitoringRules(args: GetSecurityMonitoringRulesArgs, opts?: InvokeOptions): Promise<GetSecurityMonitoringRulesResult>
def get_security_monitoring_rules(default_only_filter: Optional[bool] = None, name_filter: Optional[str] = None, tags_filters: Optional[Sequence[str]] = None, user_only_filter: Optional[bool] = None, opts: Optional[InvokeOptions] = None) -> GetSecurityMonitoringRulesResult
func GetSecurityMonitoringRules(ctx *Context, args *GetSecurityMonitoringRulesArgs, opts ...InvokeOption) (*GetSecurityMonitoringRulesResult, error)

Note: This function is named GetSecurityMonitoringRules in the Go SDK.

public static class GetSecurityMonitoringRules {
    public static Task<GetSecurityMonitoringRulesResult> InvokeAsync(GetSecurityMonitoringRulesArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

getSecurityMonitoringRules Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

RuleIds List<string>
Rules List<GetSecurityMonitoringRulesRule>
DefaultOnlyFilter bool
NameFilter string
TagsFilters List<string>
UserOnlyFilter bool
Id string

The provider-assigned unique ID for this managed resource.

RuleIds []string
Rules []GetSecurityMonitoringRulesRule
DefaultOnlyFilter bool
NameFilter string
TagsFilters []string
UserOnlyFilter bool
id string

The provider-assigned unique ID for this managed resource.

ruleIds string[]
rules GetSecurityMonitoringRulesRule[]
defaultOnlyFilter boolean
nameFilter string
tagsFilters string[]
userOnlyFilter boolean
id str

The provider-assigned unique ID for this managed resource.

rule_ids Sequence[str]
rules Sequence[GetSecurityMonitoringRulesRule]
default_only_filter bool
name_filter str
tags_filters Sequence[str]
user_only_filter bool

Supporting Types

GetSecurityMonitoringRulesRule

GetSecurityMonitoringRulesRuleCase

Status string
Condition string
Name string
Notifications List<string>
Status string
Condition string
Name string
Notifications []string
status string
condition string
name string
notifications string[]
status str
condition str
name str
notifications Sequence[str]

GetSecurityMonitoringRulesRuleOptions

GetSecurityMonitoringRulesRuleQuery

Query string
Aggregation string
DistinctFields List<string>
GroupByFields List<string>
Metric string
Name string
Query string
Aggregation string
DistinctFields []string
GroupByFields []string
Metric string
Name string
query string
aggregation string
distinctFields string[]
groupByFields string[]
metric string
name string
query str
aggregation str
distinct_fields Sequence[str]
group_by_fields Sequence[str]
metric str
name str

Package Details

Repository
https://github.com/pulumi/pulumi-datadog
License
Apache-2.0
Notes
This Pulumi package is based on the datadog Terraform Provider.