Sha256: 0cf3ec4aebdd3ce8d0abe649cfa7da833f2af0267521ad40995ae533a4ef8db1
Contents?: true
Size: 856 Bytes
Versions: 1
Compression:
Stored size: 856 Bytes
Contents
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({ expression: 'exec.file.name == \"sh\"', name: "my_agent_rule" }), type: DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleType::AGENT_RULE }) }) # CloudWorkloadSecurityAgentRuleCreateRequest | The definition of the new Agent rule. begin # Create a Cloud Workload Security Agent rule result = api_instance.create_cloud_workload_security_agent_rule(body) p result rescue DatadogAPIClient::V2::APIError => e puts "Error when calling CloudWorkloadSecurityAPI->create_cloud_workload_security_agent_rule: #{e}" end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
datadog_api_client-1.7.0 | examples/generated/v2/cloud-workload-security/CreateCloudWorkloadSecurityAgentRule.rb |