datadog.CloudWorkloadSecurityAgentRule
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as datadog from "@pulumi/datadog";
const myAgentRule = new datadog.CloudWorkloadSecurityAgentRule("my_agent_rule", {
name: "my_agent_rule",
description: "My agent rule",
enabled: true,
expression: "exec.file.name == \"java\"",
});
import pulumi
import pulumi_datadog as datadog
my_agent_rule = datadog.CloudWorkloadSecurityAgentRule("my_agent_rule",
name="my_agent_rule",
description="My agent rule",
enabled=True,
expression="exec.file.name == \"java\"")
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, "my_agent_rule", &datadog.CloudWorkloadSecurityAgentRuleArgs{
Name: pulumi.String("my_agent_rule"),
Description: pulumi.String("My agent rule"),
Enabled: pulumi.Bool(true),
Expression: pulumi.String("exec.file.name == \"java\""),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Datadog = Pulumi.Datadog;
return await Deployment.RunAsync(() =>
{
var myAgentRule = new Datadog.CloudWorkloadSecurityAgentRule("my_agent_rule", new()
{
Name = "my_agent_rule",
Description = "My agent rule",
Enabled = true,
Expression = "exec.file.name == \"java\"",
});
});
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()
.name("my_agent_rule")
.description("My agent rule")
.enabled(true)
.expression("exec.file.name == \"java\"")
.build());
}
}
resources:
myAgentRule:
type: datadog:CloudWorkloadSecurityAgentRule
name: my_agent_rule
properties:
name: my_agent_rule
description: My agent rule
enabled: true
expression: exec.file.name == "java"
Create CloudWorkloadSecurityAgentRule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CloudWorkloadSecurityAgentRule(name: string, args: CloudWorkloadSecurityAgentRuleArgs, opts?: CustomResourceOptions);
@overload
def CloudWorkloadSecurityAgentRule(resource_name: str,
args: CloudWorkloadSecurityAgentRuleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CloudWorkloadSecurityAgentRule(resource_name: str,
opts: Optional[ResourceOptions] = None,
expression: Optional[str] = None,
name: Optional[str] = None,
description: Optional[str] = None,
enabled: Optional[bool] = 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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var cloudWorkloadSecurityAgentRuleResource = new Datadog.CloudWorkloadSecurityAgentRule("cloudWorkloadSecurityAgentRuleResource", new()
{
Expression = "string",
Name = "string",
Description = "string",
Enabled = false,
});
example, err := datadog.NewCloudWorkloadSecurityAgentRule(ctx, "cloudWorkloadSecurityAgentRuleResource", &datadog.CloudWorkloadSecurityAgentRuleArgs{
Expression: pulumi.String("string"),
Name: pulumi.String("string"),
Description: pulumi.String("string"),
Enabled: pulumi.Bool(false),
})
var cloudWorkloadSecurityAgentRuleResource = new CloudWorkloadSecurityAgentRule("cloudWorkloadSecurityAgentRuleResource", CloudWorkloadSecurityAgentRuleArgs.builder()
.expression("string")
.name("string")
.description("string")
.enabled(false)
.build());
cloud_workload_security_agent_rule_resource = datadog.CloudWorkloadSecurityAgentRule("cloudWorkloadSecurityAgentRuleResource",
expression="string",
name="string",
description="string",
enabled=False)
const cloudWorkloadSecurityAgentRuleResource = new datadog.CloudWorkloadSecurityAgentRule("cloudWorkloadSecurityAgentRuleResource", {
expression: "string",
name: "string",
description: "string",
enabled: false,
});
type: datadog:CloudWorkloadSecurityAgentRule
properties:
description: string
enabled: false
expression: string
name: string
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
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. Defaults to
""
. - Enabled bool
- Whether the Agent rule is enabled. Defaults to
true
.
- 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. Defaults to
""
. - Enabled bool
- Whether the Agent rule is enabled. Defaults to
true
.
- 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. Defaults to
""
. - enabled Boolean
- Whether the Agent rule is enabled. Defaults to
true
.
- 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. Defaults to
""
. - enabled boolean
- Whether the Agent rule is enabled. Defaults to
true
.
- 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. Defaults to
""
. - enabled bool
- Whether the Agent rule is enabled. Defaults to
true
.
- 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. Defaults to
""
. - enabled Boolean
- Whether the Agent rule is enabled. Defaults to
true
.
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. Defaults to
""
. - Enabled bool
- Whether the Agent rule is enabled. Defaults to
true
. - 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. Defaults to
""
. - Enabled bool
- Whether the Agent rule is enabled. Defaults to
true
. - 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. Defaults to
""
. - enabled Boolean
- Whether the Agent rule is enabled. Defaults to
true
. - 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. Defaults to
""
. - enabled boolean
- Whether the Agent rule is enabled. Defaults to
true
. - 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. Defaults to
""
. - enabled bool
- Whether the Agent rule is enabled. Defaults to
true
. - 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. Defaults to
""
. - enabled Boolean
- Whether the Agent rule is enabled. Defaults to
true
. - 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
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.