-
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 6e838a18 of spec repo
- Loading branch information
ci.datadog-api-spec
committed
Feb 7, 2025
1 parent
84247d8
commit a3749f5
Showing
19 changed files
with
584 additions
and
21 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
1 change: 1 addition & 0 deletions
1
...itoring/Create-a-detection-rule-with-type-application-security-returns-OK-response.frozen
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 @@ | ||
2025-02-06T16:50:39.787Z |
46 changes: 46 additions & 0 deletions
46
...monitoring/Create-a-detection-rule-with-type-application-security-returns-OK-response.yml
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
50 changes: 50 additions & 0 deletions
50
examples/v2/security-monitoring/CreateSecurityMonitoringRule_1965169892.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,50 @@ | ||
# Create a detection rule with type 'application_security 'returns "OK" response | ||
|
||
require "datadog_api_client" | ||
api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new | ||
|
||
body = DatadogAPIClient::V2::SecurityMonitoringStandardRuleCreatePayload.new({ | ||
type: DatadogAPIClient::V2::SecurityMonitoringRuleTypeCreate::APPLICATION_SECURITY, | ||
name: "Example-Security-Monitoring_appsec_rule", | ||
queries: [ | ||
DatadogAPIClient::V2::SecurityMonitoringStandardRuleQuery.new({ | ||
query: "@appsec.security_activity:business_logic.users.login.failure", | ||
aggregation: DatadogAPIClient::V2::SecurityMonitoringRuleQueryAggregation::COUNT, | ||
group_by_fields: [ | ||
"service", | ||
"@http.client_ip", | ||
], | ||
distinct_fields: [], | ||
}), | ||
], | ||
filters: [], | ||
cases: [ | ||
DatadogAPIClient::V2::SecurityMonitoringRuleCaseCreate.new({ | ||
name: "", | ||
status: DatadogAPIClient::V2::SecurityMonitoringRuleSeverity::INFO, | ||
notifications: [], | ||
condition: "a > 100000", | ||
actions: [ | ||
DatadogAPIClient::V2::SecurityMonitoringRuleCaseAction.new({ | ||
type: DatadogAPIClient::V2::SecurityMonitoringRuleCaseActionType::BLOCK_IP, | ||
options: DatadogAPIClient::V2::SecurityMonitoringRuleCaseActionOptions.new({ | ||
duration: 900, | ||
}), | ||
}), | ||
], | ||
}), | ||
], | ||
options: DatadogAPIClient::V2::SecurityMonitoringRuleOptions.new({ | ||
keep_alive: DatadogAPIClient::V2::SecurityMonitoringRuleKeepAlive::ONE_HOUR, | ||
max_signal_duration: DatadogAPIClient::V2::SecurityMonitoringRuleMaxSignalDuration::ONE_DAY, | ||
evaluation_window: DatadogAPIClient::V2::SecurityMonitoringRuleEvaluationWindow::FIFTEEN_MINUTES, | ||
detection_method: DatadogAPIClient::V2::SecurityMonitoringRuleDetectionMethod::THRESHOLD, | ||
}), | ||
is_enabled: true, | ||
message: "Test rule", | ||
tags: [], | ||
group_signals_by: [ | ||
"service", | ||
], | ||
}) | ||
p api_instance.create_security_monitoring_rule(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
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.