Sha256: 3b2964661945b4cb0040e040e17b8e7dfbfa5c96505ec7aa7aaefe3f2bb82dee

Contents?: true

Size: 867 Bytes

Versions: 1

Compression:

Stored size: 867 Bytes

Contents

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::CloudWorkloadSecurityAPI.new
agent_rule_id = "3b5-v82-ns6" # String | The ID of the Agent rule.
body = DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleUpdateRequest.new({ data: DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleUpdateData.new({ attributes: DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleUpdateAttributes.new, type: DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleType::AGENT_RULE }) }) # CloudWorkloadSecurityAgentRuleUpdateRequest | New definition of the Agent rule.

begin
  # Update a Cloud Workload Security Agent rule
  result = api_instance.update_cloud_workload_security_agent_rule(agent_rule_id, body)
  p result
rescue DatadogAPIClient::V2::APIError => e
  puts "Error when calling CloudWorkloadSecurityAPI->update_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/UpdateCloudWorkloadSecurityAgentRule.rb