1. Packages
  2. Datadog Provider
  3. API Docs
  4. SecurityMonitoringRuleJson
Datadog v4.51.0 published on Wednesday, Jun 11, 2025 by Pulumi

datadog.SecurityMonitoringRuleJson

Explore with Pulumi AI

datadog logo
Datadog v4.51.0 published on Wednesday, Jun 11, 2025 by Pulumi

    Provides a Datadog Security Monitoring Rule JSON resource. This can be used to create and manage Datadog security monitoring rules using raw JSON.

    Example Usage

    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    resources:
      # Example Security Monitoring Rule JSON
      securityRuleJson:
        type: datadog:SecurityMonitoringRuleJson
        name: security_rule_json
        properties:
          rule: |
            {
              "name": "High error rate security monitoring",
              "isEnabled": true,
              "type": "log_detection",
              "message": "High error rate detected in logs",
              "tags": ["env:prod", "security"],
              "cases": [
                {
                  "name": "high case",
                  "status": "high",
                  "condition": "errors > 100 && warnings > 1000",
                  "notifications": ["@security-team"]
                }
              ],
              "queries": [
                {
                  "name": "errors",
                  "query": "status:error",
                  "aggregation": "count",
                  "dataSource": "logs",
                  "groupByFields": ["service", "env"]
                },
                {
                  "name": "warnings",
                  "query": "status:warning",
                  "aggregation": "count",
                  "dataSource": "logs",
                  "groupByFields": ["service", "env"]
                }
              ],
              "options": {
                "evaluationWindow": 300,
                "keepAlive": 600,
                "maxSignalDuration": 900,
                "detectionMethod": "threshold"
              }
            }        
    

    Create SecurityMonitoringRuleJson Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new SecurityMonitoringRuleJson(name: string, args: SecurityMonitoringRuleJsonArgs, opts?: CustomResourceOptions);
    @overload
    def SecurityMonitoringRuleJson(resource_name: str,
                                   args: SecurityMonitoringRuleJsonArgs,
                                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def SecurityMonitoringRuleJson(resource_name: str,
                                   opts: Optional[ResourceOptions] = None,
                                   json: Optional[str] = None)
    func NewSecurityMonitoringRuleJson(ctx *Context, name string, args SecurityMonitoringRuleJsonArgs, opts ...ResourceOption) (*SecurityMonitoringRuleJson, error)
    public SecurityMonitoringRuleJson(string name, SecurityMonitoringRuleJsonArgs args, CustomResourceOptions? opts = null)
    public SecurityMonitoringRuleJson(String name, SecurityMonitoringRuleJsonArgs args)
    public SecurityMonitoringRuleJson(String name, SecurityMonitoringRuleJsonArgs args, CustomResourceOptions options)
    
    type: datadog:SecurityMonitoringRuleJson
    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 SecurityMonitoringRuleJsonArgs
    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 SecurityMonitoringRuleJsonArgs
    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 SecurityMonitoringRuleJsonArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SecurityMonitoringRuleJsonArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SecurityMonitoringRuleJsonArgs
    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 securityMonitoringRuleJsonResource = new Datadog.SecurityMonitoringRuleJson("securityMonitoringRuleJsonResource", new()
    {
        Json = "string",
    });
    
    example, err := datadog.NewSecurityMonitoringRuleJson(ctx, "securityMonitoringRuleJsonResource", &datadog.SecurityMonitoringRuleJsonArgs{
    	Json: pulumi.String("string"),
    })
    
    var securityMonitoringRuleJsonResource = new SecurityMonitoringRuleJson("securityMonitoringRuleJsonResource", SecurityMonitoringRuleJsonArgs.builder()
        .json("string")
        .build());
    
    security_monitoring_rule_json_resource = datadog.SecurityMonitoringRuleJson("securityMonitoringRuleJsonResource", json="string")
    
    const securityMonitoringRuleJsonResource = new datadog.SecurityMonitoringRuleJson("securityMonitoringRuleJsonResource", {json: "string"});
    
    type: datadog:SecurityMonitoringRuleJson
    properties:
        json: string
    

    SecurityMonitoringRuleJson 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 SecurityMonitoringRuleJson resource accepts the following input properties:

    Json string
    The JSON definition of the Security Monitoring Rule.
    Json string
    The JSON definition of the Security Monitoring Rule.
    json String
    The JSON definition of the Security Monitoring Rule.
    json string
    The JSON definition of the Security Monitoring Rule.
    json str
    The JSON definition of the Security Monitoring Rule.
    json String
    The JSON definition of the Security Monitoring Rule.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the SecurityMonitoringRuleJson resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing SecurityMonitoringRuleJson Resource

    Get an existing SecurityMonitoringRuleJson 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?: SecurityMonitoringRuleJsonState, opts?: CustomResourceOptions): SecurityMonitoringRuleJson
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            json: Optional[str] = None) -> SecurityMonitoringRuleJson
    func GetSecurityMonitoringRuleJson(ctx *Context, name string, id IDInput, state *SecurityMonitoringRuleJsonState, opts ...ResourceOption) (*SecurityMonitoringRuleJson, error)
    public static SecurityMonitoringRuleJson Get(string name, Input<string> id, SecurityMonitoringRuleJsonState? state, CustomResourceOptions? opts = null)
    public static SecurityMonitoringRuleJson get(String name, Output<String> id, SecurityMonitoringRuleJsonState state, CustomResourceOptions options)
    resources:  _:    type: datadog:SecurityMonitoringRuleJson    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.
    The following state arguments are supported:
    Json string
    The JSON definition of the Security Monitoring Rule.
    Json string
    The JSON definition of the Security Monitoring Rule.
    json String
    The JSON definition of the Security Monitoring Rule.
    json string
    The JSON definition of the Security Monitoring Rule.
    json str
    The JSON definition of the Security Monitoring Rule.
    json String
    The JSON definition of the Security Monitoring Rule.

    Import

    $ pulumi import datadog:index/securityMonitoringRuleJson:SecurityMonitoringRuleJson security_rule_json aaa-yyy-vvv
    

    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.
    datadog logo
    Datadog v4.51.0 published on Wednesday, Jun 11, 2025 by Pulumi