datadog.getSecurityMonitoringRules
Explore with Pulumi AI
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:
- Default
Only boolFilter Limit the search to default rules
- Name
Filter string A rule name to limit the search
- List<string>
A list of tags to limit the search
- User
Only boolFilter Limit the search to user rules
- Default
Only boolFilter Limit the search to default rules
- Name
Filter string A rule name to limit the search
- []string
A list of tags to limit the search
- User
Only boolFilter Limit the search to user rules
- default
Only BooleanFilter Limit the search to default rules
- name
Filter String A rule name to limit the search
- List<String>
A list of tags to limit the search
- user
Only BooleanFilter Limit the search to user rules
- default
Only booleanFilter Limit the search to default rules
- name
Filter string A rule name to limit the search
- string[]
A list of tags to limit the search
- user
Only booleanFilter Limit the search to user rules
- default_
only_ boolfilter Limit the search to default rules
- name_
filter str A rule name to limit the search
- Sequence[str]
A list of tags to limit the search
- user_
only_ boolfilter Limit the search to user rules
- default
Only BooleanFilter Limit the search to default rules
- name
Filter String A rule name to limit the search
- List<String>
A list of tags to limit the search
- user
Only BooleanFilter 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.
- Rule
Ids List<string> List of IDs of the matched rules.
- Rules
List<Get
Security Monitoring Rules Rule> List of rules.
- Default
Only boolFilter Limit the search to default rules
- Name
Filter string A rule name to limit the search
- List<string>
A list of tags to limit the search
- User
Only boolFilter Limit the search to user rules
- Id string
The provider-assigned unique ID for this managed resource.
- Rule
Ids []string List of IDs of the matched rules.
- Rules
[]Get
Security Monitoring Rules Rule List of rules.
- Default
Only boolFilter Limit the search to default rules
- Name
Filter string A rule name to limit the search
- []string
A list of tags to limit the search
- User
Only boolFilter Limit the search to user rules
- id String
The provider-assigned unique ID for this managed resource.
- rule
Ids List<String> List of IDs of the matched rules.
- rules
List<Get
Security Monitoring Rules Rule> List of rules.
- default
Only BooleanFilter Limit the search to default rules
- name
Filter String A rule name to limit the search
- List<String>
A list of tags to limit the search
- user
Only BooleanFilter Limit the search to user rules
- id string
The provider-assigned unique ID for this managed resource.
- rule
Ids string[] List of IDs of the matched rules.
- rules
Get
Security Monitoring Rules Rule[] List of rules.
- default
Only booleanFilter Limit the search to default rules
- name
Filter string A rule name to limit the search
- string[]
A list of tags to limit the search
- user
Only booleanFilter 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[Get
Security Monitoring Rules Rule] List of rules.
- default_
only_ boolfilter Limit the search to default rules
- name_
filter str A rule name to limit the search
- Sequence[str]
A list of tags to limit the search
- user_
only_ boolfilter Limit the search to user rules
- id String
The provider-assigned unique ID for this managed resource.
- rule
Ids List<String> List of IDs of the matched rules.
- rules List<Property Map>
List of rules.
- default
Only BooleanFilter Limit the search to default rules
- name
Filter String A rule name to limit the search
- List<String>
A list of tags to limit the search
- user
Only BooleanFilter Limit the search to user rules
Supporting Types
GetSecurityMonitoringRulesRule
- Cases
List<Get
Security Monitoring Rules Rule Case> - Message string
- Name string
- Enabled bool
- Filters
List<Get
Security Monitoring Rules Rule Filter> - Has
Extended boolTitle - Options
Get
Security Monitoring Rules Rule Options - Queries
List<Get
Security Monitoring Rules Rule Query> - Signal
Queries List<GetSecurity Monitoring Rules Rule Signal Query> - List<string>
- Type string
- Cases
[]Get
Security Monitoring Rules Rule Case - Message string
- Name string
- Enabled bool
- Filters
[]Get
Security Monitoring Rules Rule Filter - Has
Extended boolTitle - Options
Get
Security Monitoring Rules Rule Options - Queries
[]Get
Security Monitoring Rules Rule Query - Signal
Queries []GetSecurity Monitoring Rules Rule Signal Query - []string
- Type string
- cases
List<Get
Security Monitoring Rules Rule Case> - message String
- name String
- enabled Boolean
- filters
List<Get
Security Monitoring Rules Rule Filter> - has
Extended BooleanTitle - options
Get
Security Monitoring Rules Rule Options - queries
List<Get
Security Monitoring Rules Rule Query> - signal
Queries List<GetSecurity Monitoring Rules Rule Signal Query> - List<String>
- type String
- cases
Get
Security Monitoring Rules Rule Case[] - message string
- name string
- enabled boolean
- filters
Get
Security Monitoring Rules Rule Filter[] - has
Extended booleanTitle - options
Get
Security Monitoring Rules Rule Options - queries
Get
Security Monitoring Rules Rule Query[] - signal
Queries GetSecurity Monitoring Rules Rule Signal Query[] - string[]
- type string
- cases
Sequence[Get
Security Monitoring Rules Rule Case] - message str
- name str
- enabled bool
- filters
Sequence[Get
Security Monitoring Rules Rule Filter] - has_
extended_ booltitle - options
Get
Security Monitoring Rules Rule Options - queries
Sequence[Get
Security Monitoring Rules Rule Query] - signal_
queries Sequence[GetSecurity Monitoring Rules Rule Signal Query] - Sequence[str]
- type str
- cases List<Property Map>
- message String
- name String
- enabled Boolean
- filters List<Property Map>
- has
Extended BooleanTitle - options Property Map
- queries List<Property Map>
- signal
Queries List<Property Map> - List<String>
- type String
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
GetSecurityMonitoringRulesRuleOptions
- keep
Alive Number - max
Signal NumberDuration - decrease
Criticality BooleanBased On Env - detection
Method String - evaluation
Window Number - impossible
Travel Property MapOptions - new
Value Property MapOptions
GetSecurityMonitoringRulesRuleOptionsImpossibleTravelOptions
- baseline
User BooleanLocations
- baseline
User booleanLocations
- baseline
User BooleanLocations
GetSecurityMonitoringRulesRuleOptionsNewValueOptions
- Forget
After int - Learning
Duration int - Learning
Method string - Learning
Threshold int
- Forget
After int - Learning
Duration int - Learning
Method string - Learning
Threshold int
- forget
After Integer - learning
Duration Integer - learning
Method String - learning
Threshold Integer
- forget
After number - learning
Duration number - learning
Method string - learning
Threshold number
- forget_
after int - learning_
duration int - learning_
method str - learning_
threshold int
- forget
After Number - learning
Duration Number - learning
Method String - learning
Threshold Number
GetSecurityMonitoringRulesRuleQuery
- Metrics List<string>
- Query string
- Agent
Rules List<GetSecurity Monitoring Rules Rule Query Agent Rule> agent_rule
has been deprecated in favor of new Agent Rule resource.- Aggregation string
- Distinct
Fields List<string> - Group
By List<string>Fields - Metric string
Configure
metrics
instead. This attribute will be removed in the next major version of the provider.- Name string
- Metrics []string
- Query string
- Agent
Rules []GetSecurity Monitoring Rules Rule Query Agent Rule agent_rule
has been deprecated in favor of new Agent Rule resource.- Aggregation string
- Distinct
Fields []string - Group
By []stringFields - Metric string
Configure
metrics
instead. This attribute will be removed in the next major version of the provider.- Name string
- metrics List<String>
- query String
- agent
Rules List<GetSecurity Monitoring Rules Rule Query Agent Rule> agent_rule
has been deprecated in favor of new Agent Rule resource.- aggregation String
- distinct
Fields List<String> - group
By List<String>Fields - metric String
Configure
metrics
instead. This attribute will be removed in the next major version of the provider.- name String
- metrics string[]
- query string
- agent
Rules GetSecurity Monitoring Rules Rule Query Agent Rule[] agent_rule
has been deprecated in favor of new Agent Rule resource.- aggregation string
- distinct
Fields string[] - group
By string[]Fields - metric string
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[GetSecurity Monitoring Rules Rule Query Agent Rule] agent_rule
has been deprecated in favor of new Agent Rule resource.- aggregation str
- distinct_
fields Sequence[str] - group_
by_ Sequence[str]fields - metric str
Configure
metrics
instead. This attribute will be removed in the next major version of the provider.- name str
- metrics List<String>
- query String
- agent
Rules List<Property Map> agent_rule
has been deprecated in favor of new Agent Rule resource.- aggregation String
- distinct
Fields List<String> - group
By List<String>Fields - metric String
Configure
metrics
instead. This attribute will be removed in the next major version of the provider.- name String
GetSecurityMonitoringRulesRuleQueryAgentRule
- Agent
Rule stringId - Expression string
- Agent
Rule stringId - Expression string
- agent
Rule StringId - expression String
- agent
Rule stringId - expression string
- agent_
rule_ strid - expression str
- agent
Rule StringId - expression String
GetSecurityMonitoringRulesRuleSignalQuery
- Rule
Id string - Aggregation string
- List<string>
- string
- Default
Rule stringId - Name string
- Rule
Id string - Aggregation string
- []string
- string
- Default
Rule stringId - Name string
- rule
Id String - aggregation String
- List<String>
- String
- default
Rule StringId - name String
- rule
Id string - aggregation string
- string[]
- string
- default
Rule stringId - name string
- rule_
id str - aggregation str
- Sequence[str]
- str
- default_
rule_ strid - name str
- rule
Id String - aggregation String
- List<String>
- String
- default
Rule StringId - name String
Package Details
- Repository
- Datadog pulumi/pulumi-datadog
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
datadog
Terraform Provider.