datadog.CloudWorkloadSecurityAgentRule
Explore with Pulumi AI
Provides a Datadog Cloud Workload Security Agent Rule API resource for agent rules.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Datadog = Pulumi.Datadog;
return await Deployment.RunAsync(() =>
{
var myAgentRule = new Datadog.CloudWorkloadSecurityAgentRule("myAgentRule", new()
{
Description = "My agent rule",
Enabled = true,
Expression = "exec.file.name == \"java\"",
Name = "my_agent_rule",
});
});
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.NewCloudWorkloadSecurityAgentRule(ctx, "myAgentRule", &datadog.CloudWorkloadSecurityAgentRuleArgs{
Description: pulumi.String("My agent rule"),
Enabled: pulumi.Bool(true),
Expression: pulumi.String("exec.file.name == \"java\""),
Name: pulumi.String("my_agent_rule"),
})
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.CloudWorkloadSecurityAgentRule;
import com.pulumi.datadog.CloudWorkloadSecurityAgentRuleArgs;
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 myAgentRule = new CloudWorkloadSecurityAgentRule("myAgentRule", CloudWorkloadSecurityAgentRuleArgs.builder()
.description("My agent rule")
.enabled(true)
.expression("exec.file.name == \"java\"")
.name("my_agent_rule")
.build());
}
}
import pulumi
import pulumi_datadog as datadog
my_agent_rule = datadog.CloudWorkloadSecurityAgentRule("myAgentRule",
description="My agent rule",
enabled=True,
expression="exec.file.name == \"java\"",
name="my_agent_rule")
import * as pulumi from "@pulumi/pulumi";
import * as datadog from "@pulumi/datadog";
const myAgentRule = new datadog.CloudWorkloadSecurityAgentRule("myAgentRule", {
description: "My agent rule",
enabled: true,
expression: "exec.file.name == \"java\"",
name: "my_agent_rule",
});
resources:
myAgentRule:
type: datadog:CloudWorkloadSecurityAgentRule
properties:
description: My agent rule
enabled: true
expression: exec.file.name == "java"
name: my_agent_rule
Create CloudWorkloadSecurityAgentRule Resource
new CloudWorkloadSecurityAgentRule(name: string, args: CloudWorkloadSecurityAgentRuleArgs, opts?: CustomResourceOptions);
@overload
def CloudWorkloadSecurityAgentRule(resource_name: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
enabled: Optional[bool] = None,
expression: Optional[str] = None,
name: Optional[str] = None)
@overload
def CloudWorkloadSecurityAgentRule(resource_name: str,
args: CloudWorkloadSecurityAgentRuleArgs,
opts: Optional[ResourceOptions] = None)
func NewCloudWorkloadSecurityAgentRule(ctx *Context, name string, args CloudWorkloadSecurityAgentRuleArgs, opts ...ResourceOption) (*CloudWorkloadSecurityAgentRule, error)
public CloudWorkloadSecurityAgentRule(string name, CloudWorkloadSecurityAgentRuleArgs args, CustomResourceOptions? opts = null)
public CloudWorkloadSecurityAgentRule(String name, CloudWorkloadSecurityAgentRuleArgs args)
public CloudWorkloadSecurityAgentRule(String name, CloudWorkloadSecurityAgentRuleArgs args, CustomResourceOptions options)
type: datadog:CloudWorkloadSecurityAgentRule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CloudWorkloadSecurityAgentRuleArgs
- 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 CloudWorkloadSecurityAgentRuleArgs
- 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 CloudWorkloadSecurityAgentRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CloudWorkloadSecurityAgentRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CloudWorkloadSecurityAgentRuleArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
CloudWorkloadSecurityAgentRule 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 CloudWorkloadSecurityAgentRule resource accepts the following input properties:
- Expression string
The SECL expression of the Agent rule.
- Name string
The name of the Agent rule.
- Description string
The description of the Agent rule.
- Enabled bool
Whether the Agent rule is enabled.
- Expression string
The SECL expression of the Agent rule.
- Name string
The name of the Agent rule.
- Description string
The description of the Agent rule.
- Enabled bool
Whether the Agent rule is enabled.
- expression String
The SECL expression of the Agent rule.
- name String
The name of the Agent rule.
- description String
The description of the Agent rule.
- enabled Boolean
Whether the Agent rule is enabled.
- expression string
The SECL expression of the Agent rule.
- name string
The name of the Agent rule.
- description string
The description of the Agent rule.
- enabled boolean
Whether the Agent rule is enabled.
- expression str
The SECL expression of the Agent rule.
- name str
The name of the Agent rule.
- description str
The description of the Agent rule.
- enabled bool
Whether the Agent rule is enabled.
- expression String
The SECL expression of the Agent rule.
- name String
The name of the Agent rule.
- description String
The description of the Agent rule.
- enabled Boolean
Whether the Agent rule is enabled.
Outputs
All input properties are implicitly available as output properties. Additionally, the CloudWorkloadSecurityAgentRule 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 CloudWorkloadSecurityAgentRule Resource
Get an existing CloudWorkloadSecurityAgentRule 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?: CloudWorkloadSecurityAgentRuleState, opts?: CustomResourceOptions): CloudWorkloadSecurityAgentRule
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
enabled: Optional[bool] = None,
expression: Optional[str] = None,
name: Optional[str] = None) -> CloudWorkloadSecurityAgentRule
func GetCloudWorkloadSecurityAgentRule(ctx *Context, name string, id IDInput, state *CloudWorkloadSecurityAgentRuleState, opts ...ResourceOption) (*CloudWorkloadSecurityAgentRule, error)
public static CloudWorkloadSecurityAgentRule Get(string name, Input<string> id, CloudWorkloadSecurityAgentRuleState? state, CustomResourceOptions? opts = null)
public static CloudWorkloadSecurityAgentRule get(String name, Output<String> id, CloudWorkloadSecurityAgentRuleState 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.
- Description string
The description of the Agent rule.
- Enabled bool
Whether the Agent rule is enabled.
- Expression string
The SECL expression of the Agent rule.
- Name string
The name of the Agent rule.
- Description string
The description of the Agent rule.
- Enabled bool
Whether the Agent rule is enabled.
- Expression string
The SECL expression of the Agent rule.
- Name string
The name of the Agent rule.
- description String
The description of the Agent rule.
- enabled Boolean
Whether the Agent rule is enabled.
- expression String
The SECL expression of the Agent rule.
- name String
The name of the Agent rule.
- description string
The description of the Agent rule.
- enabled boolean
Whether the Agent rule is enabled.
- expression string
The SECL expression of the Agent rule.
- name string
The name of the Agent rule.
- description str
The description of the Agent rule.
- enabled bool
Whether the Agent rule is enabled.
- expression str
The SECL expression of the Agent rule.
- name str
The name of the Agent rule.
- description String
The description of the Agent rule.
- enabled Boolean
Whether the Agent rule is enabled.
- expression String
The SECL expression of the Agent rule.
- name String
The name of the Agent rule.
Import
Cloud Workload Security Agent rules can be imported using ID, e.g.
$ pulumi import datadog:index/cloudWorkloadSecurityAgentRule:CloudWorkloadSecurityAgentRule my_agent_rule m0o-hto-lkb
Package Details
- Repository
- Datadog pulumi/pulumi-datadog
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
datadog
Terraform Provider.