Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54350,6 +54350,39 @@ components:
- MEDIUM
- HIGH
- CRITICAL
SecurityMonitoringRuleSort:
description: The sort parameters used for querying security monitoring rules.
enum:
- name
- creation_date
- update_date
- enabled
- type
- highest_severity
- source
- -name
- -creation_date
- -update_date
- -enabled
- -type
- -highest_severity
- -source
type: string
x-enum-varnames:
- NAME
- CREATION_DATE
- UPDATE_DATE
- ENABLED
- TYPE
- HIGHEST_SEVERITY
- SOURCE
- NAME_DESCENDING
- CREATION_DATE_DESCENDING
- UPDATE_DATE_DESCENDING
- ENABLED_DESCENDING
- TYPE_DESCENDING
- HIGHEST_SEVERITY_DESCENDING
- SOURCE_DESCENDING
SecurityMonitoringRuleTestPayload:
description: Test a rule.
oneOf:
Expand Down Expand Up @@ -95842,6 +95875,13 @@ paths:
required: false
schema:
type: string
- description: Attribute used to sort rules. Prefix with `-` to sort in descending
order.
in: query
name: sort
required: false
schema:
$ref: '#/components/schemas/SecurityMonitoringRuleSort'
responses:
'200':
content:
Expand Down
1 change: 1 addition & 0 deletions features/scenarios_model_mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1650,6 +1650,7 @@
"page_size" => "Integer",
"page_number" => "Integer",
"query" => "String",
"sort" => "SecurityMonitoringRuleSort",
},
"v2.CreateSecurityMonitoringRule" => {
"body" => "SecurityMonitoringRuleCreatePayload",
Expand Down
1 change: 1 addition & 0 deletions lib/datadog_api_client/inflector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4386,6 +4386,7 @@ def overrides
"v2.security_monitoring_rule_sequence_detection_step" => "SecurityMonitoringRuleSequenceDetectionStep",
"v2.security_monitoring_rule_sequence_detection_step_transition" => "SecurityMonitoringRuleSequenceDetectionStepTransition",
"v2.security_monitoring_rule_severity" => "SecurityMonitoringRuleSeverity",
"v2.security_monitoring_rule_sort" => "SecurityMonitoringRuleSort",
"v2.security_monitoring_rule_test_payload" => "SecurityMonitoringRuleTestPayload",
"v2.security_monitoring_rule_test_request" => "SecurityMonitoringRuleTestRequest",
"v2.security_monitoring_rule_test_response" => "SecurityMonitoringRuleTestResponse",
Expand Down
6 changes: 6 additions & 0 deletions lib/datadog_api_client/v2/api/security_monitoring_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4476,12 +4476,17 @@ def list_security_monitoring_rules(opts = {})
# @option opts [Integer] :page_size Size for a given page. The maximum allowed value is 100.
# @option opts [Integer] :page_number Specific page number to return.
# @option opts [String] :query A search query to filter security rules. You can filter by attributes such as `type`, `source`, `tags`.
# @option opts [SecurityMonitoringRuleSort] :sort Attribute used to sort rules. Prefix with `-` to sort in descending order.
# @return [Array<(SecurityMonitoringListRulesResponse, Integer, Hash)>] SecurityMonitoringListRulesResponse data, response status code and response headers
def list_security_monitoring_rules_with_http_info(opts = {})

if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.list_security_monitoring_rules ...'
end
allowable_values = ['name', 'creation_date', 'update_date', 'enabled', 'type', 'highest_severity', 'source', '-name', '-creation_date', '-update_date', '-enabled', '-type', '-highest_severity', '-source']
if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
end
# resource path
local_var_path = '/api/v2/security_monitoring/rules'

Expand All @@ -4490,6 +4495,7 @@ def list_security_monitoring_rules_with_http_info(opts = {})
query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil?
query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?

# header parameters
header_params = opts[:header_params] || {}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
=begin
#Datadog API V2 Collection

#Collection of all Datadog Public endpoints.

The version of the OpenAPI document: 1.0
Contact: support@datadoghq.com
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator

Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
This product includes software developed at Datadog (https://www.datadoghq.com/).
Copyright 2020-Present Datadog, Inc.

=end

require 'date'
require 'time'

module DatadogAPIClient::V2
# The sort parameters used for querying security monitoring rules.
class SecurityMonitoringRuleSort
include BaseEnumModel

NAME = "name".freeze
CREATION_DATE = "creation_date".freeze
UPDATE_DATE = "update_date".freeze
ENABLED = "enabled".freeze
TYPE = "type".freeze
HIGHEST_SEVERITY = "highest_severity".freeze
SOURCE = "source".freeze
NAME_DESCENDING = "-name".freeze
CREATION_DATE_DESCENDING = "-creation_date".freeze
UPDATE_DATE_DESCENDING = "-update_date".freeze
ENABLED_DESCENDING = "-enabled".freeze
TYPE_DESCENDING = "-type".freeze
HIGHEST_SEVERITY_DESCENDING = "-highest_severity".freeze
SOURCE_DESCENDING = "-source".freeze
end
end
Loading