Sha256: c34053886736b2c7b2b81d946c13c88ea3661caccf22dbeec282c44119c64f22

Contents?: true

Size: 752 Bytes

Versions: 18

Compression:

Stored size: 752 Bytes

Contents

# Create a Cloud Workload Security Agent rule returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::CloudWorkloadSecurityAPI.new

body = DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleCreateRequest.new({
  data: DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleCreateData.new({
    attributes: DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleCreateAttributes.new({
      description: "Test Agent rule",
      enabled: true,
      expression: 'exec.file.name == "sh"',
      name: "examplecreateacloudworkloadsecurityagentrulereturnsokresponse",
    }),
    type: DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleType::AGENT_RULE,
  }),
})
p api_instance.create_cloud_workload_security_agent_rule(body)

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
datadog_api_client-2.9.0 examples/v2/cloud-workload-security/CreateCloudWorkloadSecurityAgentRule.rb
datadog_api_client-2.8.0 examples/v2/cloud-workload-security/CreateCloudWorkloadSecurityAgentRule.rb
datadog_api_client-2.7.0 examples/v2/cloud-workload-security/CreateCloudWorkloadSecurityAgentRule.rb
datadog_api_client-2.6.0 examples/v2/cloud-workload-security/CreateCloudWorkloadSecurityAgentRule.rb
datadog_api_client-2.5.0 examples/v2/cloud-workload-security/CreateCloudWorkloadSecurityAgentRule.rb
datadog_api_client-2.4.0 examples/v2/cloud-workload-security/CreateCloudWorkloadSecurityAgentRule.rb
datadog_api_client-2.3.0 examples/v2/cloud-workload-security/CreateCloudWorkloadSecurityAgentRule.rb
datadog_api_client-2.2.0 examples/v2/cloud-workload-security/CreateCloudWorkloadSecurityAgentRule.rb
datadog_api_client-2.1.0 examples/v2/cloud-workload-security/CreateCloudWorkloadSecurityAgentRule.rb
datadog_api_client-2.0.2 examples/v2/cloud-workload-security/CreateCloudWorkloadSecurityAgentRule.rb
datadog_api_client-2.0.1 examples/v2/cloud-workload-security/CreateCloudWorkloadSecurityAgentRule.rb
datadog_api_client-2.0.0 examples/v2/cloud-workload-security/CreateCloudWorkloadSecurityAgentRule.rb
datadog_api_client-1.11.0 examples/v2/cloud-workload-security/CreateCloudWorkloadSecurityAgentRule.rb
datadog_api_client-1.10.0 examples/v2/cloud-workload-security/CreateCloudWorkloadSecurityAgentRule.rb
datadog_api_client-1.9.0 examples/v2/cloud-workload-security/CreateCloudWorkloadSecurityAgentRule.rb
datadog_api_client-1.8.0 examples/v2/cloud-workload-security/CreateCloudWorkloadSecurityAgentRule.rb
datadog_api_client-1.7.0 examples/v2/cloud-workload-security/CreateCloudWorkloadSecurityAgentRule.rb
datadog_api_client-1.6.0 examples/v2/cloud-workload-security/CreateCloudWorkloadSecurityAgentRule.rb