1. Packages
  2. Datadog
  3. API Docs
  4. getSecurityMonitoringRules
Datadog v4.23.0 published on Wednesday, Sep 27, 2023 by Pulumi

datadog.getSecurityMonitoringRules

Explore with Pulumi AI

datadog logo
Datadog v4.23.0 published on Wednesday, Sep 27, 2023 by Pulumi

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

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Datadog = Pulumi.Datadog;
    
    return await Deployment.RunAsync(() => 
    {
        var test = Datadog.GetSecurityMonitoringRules.Invoke(new()
        {
            DefaultOnlyFilter = true,
            NameFilter = "attack",
            TagsFilters = new[]
            {
                "foo:bar",
            },
        });
    
    });
    
    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.GetSecurityMonitoringRules(ctx, &datadog.GetSecurityMonitoringRulesArgs{
    			DefaultOnlyFilter: pulumi.BoolRef(true),
    			NameFilter:        pulumi.StringRef("attack"),
    			TagsFilters: []string{
    				"foo:bar",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.datadog.DatadogFunctions;
    import com.pulumi.datadog.inputs.GetSecurityMonitoringRulesArgs;
    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 test = DatadogFunctions.getSecurityMonitoringRules(GetSecurityMonitoringRulesArgs.builder()
                .defaultOnlyFilter(true)
                .nameFilter("attack")
                .tagsFilters("foo:bar")
                .build());
    
        }
    }
    
    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 = datadog.getSecurityMonitoringRules({
        defaultOnlyFilter: true,
        nameFilter: "attack",
        tagsFilters: ["foo:bar"],
    });
    
    variables:
      test:
        fn::invoke:
          Function: datadog:getSecurityMonitoringRules
          Arguments:
            defaultOnlyFilter: true
            nameFilter: attack
            tagsFilters:
              - foo:bar
    

    Using getSecurityMonitoringRules

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getSecurityMonitoringRules(args: GetSecurityMonitoringRulesArgs, opts?: InvokeOptions): Promise<GetSecurityMonitoringRulesResult>
    function getSecurityMonitoringRulesOutput(args: GetSecurityMonitoringRulesOutputArgs, opts?: InvokeOptions): Output<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
    def get_security_monitoring_rules_output(default_only_filter: Optional[pulumi.Input[bool]] = None,
                                      name_filter: Optional[pulumi.Input[str]] = None,
                                      tags_filters: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                      user_only_filter: Optional[pulumi.Input[bool]] = None,
                                      opts: Optional[InvokeOptions] = None) -> Output[GetSecurityMonitoringRulesResult]
    func GetSecurityMonitoringRules(ctx *Context, args *GetSecurityMonitoringRulesArgs, opts ...InvokeOption) (*GetSecurityMonitoringRulesResult, error)
    func GetSecurityMonitoringRulesOutput(ctx *Context, args *GetSecurityMonitoringRulesOutputArgs, opts ...InvokeOption) GetSecurityMonitoringRulesResultOutput

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

    public static class GetSecurityMonitoringRules 
    {
        public static Task<GetSecurityMonitoringRulesResult> InvokeAsync(GetSecurityMonitoringRulesArgs args, InvokeOptions? opts = null)
        public static Output<GetSecurityMonitoringRulesResult> Invoke(GetSecurityMonitoringRulesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetSecurityMonitoringRulesResult> getSecurityMonitoringRules(GetSecurityMonitoringRulesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: datadog:index/getSecurityMonitoringRules:getSecurityMonitoringRules
      arguments:
        # arguments dictionary

    The following arguments are supported:

    DefaultOnlyFilter bool

    Limit the search to default rules

    NameFilter string

    A rule name to limit the search

    TagsFilters List<string>

    A list of tags to limit the search

    UserOnlyFilter bool

    Limit the search to user rules

    DefaultOnlyFilter bool

    Limit the search to default rules

    NameFilter string

    A rule name to limit the search

    TagsFilters []string

    A list of tags to limit the search

    UserOnlyFilter bool

    Limit the search to user rules

    defaultOnlyFilter Boolean

    Limit the search to default rules

    nameFilter String

    A rule name to limit the search

    tagsFilters List<String>

    A list of tags to limit the search

    userOnlyFilter Boolean

    Limit the search to user rules

    defaultOnlyFilter boolean

    Limit the search to default rules

    nameFilter string

    A rule name to limit the search

    tagsFilters string[]

    A list of tags to limit the search

    userOnlyFilter boolean

    Limit the search to user rules

    default_only_filter bool

    Limit the search to default rules

    name_filter str

    A rule name to limit the search

    tags_filters Sequence[str]

    A list of tags to limit the search

    user_only_filter bool

    Limit the search to user rules

    defaultOnlyFilter Boolean

    Limit the search to default rules

    nameFilter String

    A rule name to limit the search

    tagsFilters List<String>

    A list of tags to limit the search

    userOnlyFilter Boolean

    Limit the search to user rules

    getSecurityMonitoringRules Result

    The following output properties are available:

    Id string

    The provider-assigned unique ID for this managed resource.

    RuleIds List<string>

    List of IDs of the matched rules.

    Rules List<GetSecurityMonitoringRulesRule>

    List of rules.

    DefaultOnlyFilter bool

    Limit the search to default rules

    NameFilter string

    A rule name to limit the search

    TagsFilters List<string>

    A list of tags to limit the search

    UserOnlyFilter bool

    Limit the search to user rules

    Id string

    The provider-assigned unique ID for this managed resource.

    RuleIds []string

    List of IDs of the matched rules.

    Rules []GetSecurityMonitoringRulesRule

    List of rules.

    DefaultOnlyFilter bool

    Limit the search to default rules

    NameFilter string

    A rule name to limit the search

    TagsFilters []string

    A list of tags to limit the search

    UserOnlyFilter bool

    Limit the search to user rules

    id String

    The provider-assigned unique ID for this managed resource.

    ruleIds List<String>

    List of IDs of the matched rules.

    rules List<GetSecurityMonitoringRulesRule>

    List of rules.

    defaultOnlyFilter Boolean

    Limit the search to default rules

    nameFilter String

    A rule name to limit the search

    tagsFilters List<String>

    A list of tags to limit the search

    userOnlyFilter Boolean

    Limit the search to user rules

    id string

    The provider-assigned unique ID for this managed resource.

    ruleIds string[]

    List of IDs of the matched rules.

    rules GetSecurityMonitoringRulesRule[]

    List of rules.

    defaultOnlyFilter boolean

    Limit the search to default rules

    nameFilter string

    A rule name to limit the search

    tagsFilters string[]

    A list of tags to limit the search

    userOnlyFilter boolean

    Limit the search to user rules

    id str

    The provider-assigned unique ID for this managed resource.

    rule_ids Sequence[str]

    List of IDs of the matched rules.

    rules Sequence[GetSecurityMonitoringRulesRule]

    List of rules.

    default_only_filter bool

    Limit the search to default rules

    name_filter str

    A rule name to limit the search

    tags_filters Sequence[str]

    A list of tags to limit the search

    user_only_filter bool

    Limit the search to user rules

    id String

    The provider-assigned unique ID for this managed resource.

    ruleIds List<String>

    List of IDs of the matched rules.

    rules List<Property Map>

    List of rules.

    defaultOnlyFilter Boolean

    Limit the search to default rules

    nameFilter String

    A rule name to limit the search

    tagsFilters List<String>

    A list of tags to limit the search

    userOnlyFilter Boolean

    Limit the search to user rules

    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 List<String>
    status string
    condition string
    name string
    notifications string[]
    status str
    condition str
    name str
    notifications Sequence[str]
    status String
    condition String
    name String
    notifications List<String>

    GetSecurityMonitoringRulesRuleFilter

    Action string
    Query string
    Action string
    Query string
    action String
    query String
    action string
    query string
    action str
    query str
    action String
    query String

    GetSecurityMonitoringRulesRuleOptions

    GetSecurityMonitoringRulesRuleOptionsImpossibleTravelOptions

    GetSecurityMonitoringRulesRuleOptionsNewValueOptions

    GetSecurityMonitoringRulesRuleQuery

    Metrics List<string>
    Query string
    AgentRules List<GetSecurityMonitoringRulesRuleQueryAgentRule>

    Deprecated:

    agent_rule has been deprecated in favor of new Agent Rule resource.

    Aggregation string
    DistinctFields List<string>
    GroupByFields List<string>
    Metric string

    Deprecated:

    Configure metrics instead. This attribute will be removed in the next major version of the provider.

    Name string
    Metrics []string
    Query string
    AgentRules []GetSecurityMonitoringRulesRuleQueryAgentRule

    Deprecated:

    agent_rule has been deprecated in favor of new Agent Rule resource.

    Aggregation string
    DistinctFields []string
    GroupByFields []string
    Metric string

    Deprecated:

    Configure metrics instead. This attribute will be removed in the next major version of the provider.

    Name string
    metrics List<String>
    query String
    agentRules List<GetSecurityMonitoringRulesRuleQueryAgentRule>

    Deprecated:

    agent_rule has been deprecated in favor of new Agent Rule resource.

    aggregation String
    distinctFields List<String>
    groupByFields List<String>
    metric String

    Deprecated:

    Configure metrics instead. This attribute will be removed in the next major version of the provider.

    name String
    metrics string[]
    query string
    agentRules GetSecurityMonitoringRulesRuleQueryAgentRule[]

    Deprecated:

    agent_rule has been deprecated in favor of new Agent Rule resource.

    aggregation string
    distinctFields string[]
    groupByFields string[]
    metric string

    Deprecated:

    Configure metrics instead. This attribute will be removed in the next major version of the provider.

    name string
    metrics Sequence[str]
    query str
    agent_rules Sequence[GetSecurityMonitoringRulesRuleQueryAgentRule]

    Deprecated:

    agent_rule has been deprecated in favor of new Agent Rule resource.

    aggregation str
    distinct_fields Sequence[str]
    group_by_fields Sequence[str]
    metric str

    Deprecated:

    Configure metrics instead. This attribute will be removed in the next major version of the provider.

    name str
    metrics List<String>
    query String
    agentRules List<Property Map>

    Deprecated:

    agent_rule has been deprecated in favor of new Agent Rule resource.

    aggregation String
    distinctFields List<String>
    groupByFields List<String>
    metric String

    Deprecated:

    Configure metrics instead. This attribute will be removed in the next major version of the provider.

    name String

    GetSecurityMonitoringRulesRuleQueryAgentRule

    AgentRuleId string
    Expression string
    AgentRuleId string
    Expression string
    agentRuleId String
    expression String
    agentRuleId string
    expression string
    agentRuleId String
    expression String

    GetSecurityMonitoringRulesRuleSignalQuery

    RuleId string
    Aggregation string
    CorrelatedByFields List<string>
    CorrelatedQueryIndex string
    DefaultRuleId string
    Name string
    ruleId String
    aggregation String
    correlatedByFields List<String>
    correlatedQueryIndex String
    defaultRuleId String
    name String
    ruleId String
    aggregation String
    correlatedByFields List<String>
    correlatedQueryIndex String
    defaultRuleId String
    name String

    Package Details

    Repository
    Datadog pulumi/pulumi-datadog
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the datadog Terraform Provider.

    datadog logo
    Datadog v4.23.0 published on Wednesday, Sep 27, 2023 by Pulumi