-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Regenerate client from commit a7ed33a4 of spec repo
- Loading branch information
ci.datadog-api-spec
committed
Mar 1, 2024
1 parent
8707a2c
commit 81ce634
Showing
12 changed files
with
672 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
examples/v2/cloud-workload-security/CreateCSMThreatsAgentRule.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Create a CSM Threats 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: "My Agent rule", | ||
enabled: true, | ||
expression: 'exec.file.name == \\"sh\\"', | ||
name: "my_agent_rule", | ||
}), | ||
type: DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleType::AGENT_RULE, | ||
}), | ||
}) | ||
p api_instance.create_csm_threats_agent_rule(body) |
5 changes: 5 additions & 0 deletions
5
examples/v2/cloud-workload-security/DeleteCSMThreatsAgentRule.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Delete a CSM Threats Agent rule returns "OK" response | ||
|
||
require "datadog_api_client" | ||
api_instance = DatadogAPIClient::V2::CloudWorkloadSecurityAPI.new | ||
api_instance.delete_csm_threats_agent_rule("agent_rule_id") |
5 changes: 5 additions & 0 deletions
5
examples/v2/cloud-workload-security/GetCSMThreatsAgentRule.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Get a CSM Threats Agent rule returns "OK" response | ||
|
||
require "datadog_api_client" | ||
api_instance = DatadogAPIClient::V2::CloudWorkloadSecurityAPI.new | ||
p api_instance.get_csm_threats_agent_rule("agent_rule_id") |
5 changes: 5 additions & 0 deletions
5
examples/v2/cloud-workload-security/ListCSMThreatsAgentRules.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Get all CSM Threats Agent rules returns "OK" response | ||
|
||
require "datadog_api_client" | ||
api_instance = DatadogAPIClient::V2::CloudWorkloadSecurityAPI.new | ||
p api_instance.list_csm_threats_agent_rules() |
16 changes: 16 additions & 0 deletions
16
examples/v2/cloud-workload-security/UpdateCSMThreatsAgentRule.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Update a CSM Threats Agent rule returns "OK" response | ||
|
||
require "datadog_api_client" | ||
api_instance = DatadogAPIClient::V2::CloudWorkloadSecurityAPI.new | ||
|
||
body = DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleUpdateRequest.new({ | ||
data: DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleUpdateData.new({ | ||
attributes: DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleUpdateAttributes.new({ | ||
description: "My Agent rule", | ||
enabled: true, | ||
expression: 'exec.file.name == \\"sh\\"', | ||
}), | ||
type: DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleType::AGENT_RULE, | ||
}), | ||
}) | ||
p api_instance.update_csm_threats_agent_rule("agent_rule_id", body) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.