From 994ce71a4c31eb8e8b33df7484f32f14264e97a0 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Thu, 2 Jan 2025 14:40:06 +0000 Subject: [PATCH] Regenerate client from commit b4e964b3 of spec repo --- .apigentools-info | 8 +++--- .generator/schemas/v2/openapi.yaml | 21 +++++++++++++++ ...uppression-rule-returns-OK-response.frozen | 2 +- ...a-suppression-rule-returns-OK-response.yml | 26 +++++++++---------- ...exclusion-query-returns-OK-response.frozen | 2 +- ...an-exclusion-query-returns-OK-response.yml | 24 +++++++---------- .../CreateSecurityMonitoringSuppression.rb | 1 + ...ecurityMonitoringSuppression_3192265332.rb | 1 + features/v2/security_monitoring.feature | 14 +++++----- ...urity_monitoring_suppression_attributes.rb | 12 ++++++++- ...onitoring_suppression_create_attributes.rb | 12 ++++++++- ...onitoring_suppression_update_attributes.rb | 13 +++++++++- 12 files changed, 92 insertions(+), 44 deletions(-) diff --git a/.apigentools-info b/.apigentools-info index e1598b667a66..4ba992789367 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2024-12-26 16:01:44.053811", - "spec_repo_commit": "f2e98b01" + "regenerated": "2025-01-02 14:39:40.447374", + "spec_repo_commit": "b4e964b3" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2024-12-26 16:01:44.071562", - "spec_repo_commit": "f2e98b01" + "regenerated": "2025-01-02 14:39:40.463809", + "spec_repo_commit": "b4e964b3" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 3e1d95e9a261..5c7885313ee8 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -24825,6 +24825,12 @@ components: as the search bar for detection rules. example: type:log_detection source:cloudtrail type: string + start_date: + description: A Unix millisecond timestamp giving the start date for the + suppression rule. After this date, it starts suppressing signals. + example: 1703187336000 + format: int64 + type: integer suppression_query: description: The suppression query of the suppression rule. If a signal matches this query, it is suppressed and not triggered. Same syntax as @@ -24880,6 +24886,12 @@ components: as the search bar for detection rules. example: type:log_detection source:cloudtrail type: string + start_date: + description: A Unix millisecond timestamp giving the start date for the + suppression rule. After this date, it starts suppressing signals. + example: 1703187336000 + format: int64 + type: integer suppression_query: description: The suppression query of the suppression rule. If a signal matches this query, it is suppressed and is not triggered. It uses the @@ -24966,6 +24978,15 @@ components: as the search bar for detection rules. example: type:log_detection source:cloudtrail type: string + start_date: + description: A Unix millisecond timestamp giving the start date for the + suppression rule. After this date, it starts suppressing signals. If unset, + the start date of the suppression rule is left untouched. If set to `null`, + the start date is removed. + example: 1703187336000 + format: int64 + nullable: true + type: integer suppression_query: description: The suppression query of the suppression rule. If a signal matches this query, it is suppressed and not triggered. Same syntax as diff --git a/cassettes/features/v2/security_monitoring/Create-a-suppression-rule-returns-OK-response.frozen b/cassettes/features/v2/security_monitoring/Create-a-suppression-rule-returns-OK-response.frozen index 5ff3562b5a8b..28bfbcc2df0d 100644 --- a/cassettes/features/v2/security_monitoring/Create-a-suppression-rule-returns-OK-response.frozen +++ b/cassettes/features/v2/security_monitoring/Create-a-suppression-rule-returns-OK-response.frozen @@ -1 +1 @@ -2024-05-20T17:07:03.155Z \ No newline at end of file +2024-11-27T15:22:34.711Z \ No newline at end of file diff --git a/cassettes/features/v2/security_monitoring/Create-a-suppression-rule-returns-OK-response.yml b/cassettes/features/v2/security_monitoring/Create-a-suppression-rule-returns-OK-response.yml index 0930977c7280..f3167ba68135 100644 --- a/cassettes/features/v2/security_monitoring/Create-a-suppression-rule-returns-OK-response.yml +++ b/cassettes/features/v2/security_monitoring/Create-a-suppression-rule-returns-OK-response.yml @@ -1,11 +1,12 @@ http_interactions: -- recorded_at: Mon, 20 May 2024 17:07:03 GMT +- recorded_at: Wed, 27 Nov 2024 15:22:34 GMT request: body: encoding: UTF-8 string: '{"data":{"attributes":{"description":"This rule suppresses low-severity - signals in staging environments.","enabled":true,"expiration_date":1718039223000,"name":"Test-Create_a_suppression_rule_returns_OK_response-1716224823","rule_query":"type:log_detection - source:cloudtrail","suppression_query":"env:staging status:low"},"type":"suppressions"}}' + signals in staging environments.","enabled":true,"expiration_date":1734535354000,"name":"Test-Create_a_suppression_rule_returns_OK_response-1732720954","rule_query":"type:log_detection + source:cloudtrail","start_date":1733584954000,"suppression_query":"env:staging + status:low"},"type":"suppressions"}}' headers: Accept: - application/json @@ -16,32 +17,29 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"8qj-mmz-zym","attributes":{"name":"Test-Create_a_suppression_rule_returns_OK_response-1716224823","enabled":true,"description":"This - rule suppresses low-severity signals in staging environments.","rule_query":"type:log_detection - source:cloudtrail","suppression_query":"env:staging status:low","data_exclusion_query":"","expiration_date":1718039223000,"version":1,"creation_date":1716224823374,"update_date":1716224823374,"creator":{"name":null,"handle":"frog@datadoghq.com"},"updater":{"name":null,"handle":"frog@datadoghq.com"}},"type":"suppressions"}} - - ' + string: '{"data":{"id":"ejv-ksi-r4j","type":"suppressions","attributes":{"creation_date":1732720954868,"creator":{"handle":"frog@datadoghq.com","name":""},"data_exclusion_query":"","description":"This + rule suppresses low-severity signals in staging environments.","editable":true,"enabled":true,"expiration_date":1734535354000,"name":"Test-Create_a_suppression_rule_returns_OK_response-1732720954","rule_query":"type:log_detection + source:cloudtrail","start_date":1733584954000,"suppression_query":"env:staging + status:low","update_date":1732720954868,"updater":{"handle":"frog@datadoghq.com","name":""},"version":1}}}' headers: Content-Type: - - application/json + - application/vnd.api+json status: code: 200 message: OK -- recorded_at: Mon, 20 May 2024 17:07:03 GMT +- recorded_at: Wed, 27 Nov 2024 15:22:34 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/8qj-mmz-zym + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/ejv-ksi-r4j response: body: encoding: UTF-8 string: '' - headers: - Content-Type: - - text/html; charset=utf-8 + headers: {} status: code: 204 message: No Content diff --git a/cassettes/features/v2/security_monitoring/Create-a-suppression-rule-with-an-exclusion-query-returns-OK-response.frozen b/cassettes/features/v2/security_monitoring/Create-a-suppression-rule-with-an-exclusion-query-returns-OK-response.frozen index c745e451305a..73982716b61d 100644 --- a/cassettes/features/v2/security_monitoring/Create-a-suppression-rule-with-an-exclusion-query-returns-OK-response.frozen +++ b/cassettes/features/v2/security_monitoring/Create-a-suppression-rule-with-an-exclusion-query-returns-OK-response.frozen @@ -1 +1 @@ -2024-05-20T17:07:12.131Z \ No newline at end of file +2024-11-27T15:24:35.169Z \ No newline at end of file diff --git a/cassettes/features/v2/security_monitoring/Create-a-suppression-rule-with-an-exclusion-query-returns-OK-response.yml b/cassettes/features/v2/security_monitoring/Create-a-suppression-rule-with-an-exclusion-query-returns-OK-response.yml index bc7d65503364..526133674580 100644 --- a/cassettes/features/v2/security_monitoring/Create-a-suppression-rule-with-an-exclusion-query-returns-OK-response.yml +++ b/cassettes/features/v2/security_monitoring/Create-a-suppression-rule-with-an-exclusion-query-returns-OK-response.yml @@ -1,11 +1,11 @@ http_interactions: -- recorded_at: Mon, 20 May 2024 17:07:12 GMT +- recorded_at: Wed, 27 Nov 2024 15:24:35 GMT request: body: encoding: UTF-8 string: '{"data":{"attributes":{"data_exclusion_query":"account_id:12345","description":"This - rule suppresses low-severity signals in staging environments.","enabled":true,"expiration_date":1718039232000,"name":"Test-Create_a_suppression_rule_with_an_exclusion_query_returns_OK_response-1716224832","rule_query":"type:log_detection - source:cloudtrail"},"type":"suppressions"}}' + rule suppresses low-severity signals in staging environments.","enabled":true,"expiration_date":1734535475000,"name":"Test-Create_a_suppression_rule_with_an_exclusion_query_returns_OK_response-1732721075","rule_query":"type:log_detection + source:cloudtrail","start_date":1733585075000},"type":"suppressions"}}' headers: Accept: - application/json @@ -16,32 +16,28 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"i9m-nqb-ets","attributes":{"name":"Test-Create_a_suppression_rule_with_an_exclusion_query_returns_OK_response-1716224832","enabled":true,"description":"This - rule suppresses low-severity signals in staging environments.","rule_query":"type:log_detection - source:cloudtrail","suppression_query":"","data_exclusion_query":"account_id:12345","expiration_date":1718039232000,"version":1,"creation_date":1716224832354,"update_date":1716224832355,"creator":{"name":null,"handle":"frog@datadoghq.com"},"updater":{"name":null,"handle":"frog@datadoghq.com"}},"type":"suppressions"}} - - ' + string: '{"data":{"id":"rv5-3sh-tvp","type":"suppressions","attributes":{"creation_date":1732721075298,"creator":{"handle":"frog@datadoghq.com","name":""},"data_exclusion_query":"account_id:12345","description":"This + rule suppresses low-severity signals in staging environments.","editable":true,"enabled":true,"expiration_date":1734535475000,"name":"Test-Create_a_suppression_rule_with_an_exclusion_query_returns_OK_response-1732721075","rule_query":"type:log_detection + source:cloudtrail","start_date":1733585075000,"suppression_query":"","update_date":1732721075298,"updater":{"handle":"frog@datadoghq.com","name":""},"version":1}}}' headers: Content-Type: - - application/json + - application/vnd.api+json status: code: 200 message: OK -- recorded_at: Mon, 20 May 2024 17:07:12 GMT +- recorded_at: Wed, 27 Nov 2024 15:24:35 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/i9m-nqb-ets + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/suppressions/rv5-3sh-tvp response: body: encoding: UTF-8 string: '' - headers: - Content-Type: - - text/html; charset=utf-8 + headers: {} status: code: 204 message: No Content diff --git a/examples/v2/security-monitoring/CreateSecurityMonitoringSuppression.rb b/examples/v2/security-monitoring/CreateSecurityMonitoringSuppression.rb index cee561939ef9..641d2e65d875 100644 --- a/examples/v2/security-monitoring/CreateSecurityMonitoringSuppression.rb +++ b/examples/v2/security-monitoring/CreateSecurityMonitoringSuppression.rb @@ -8,6 +8,7 @@ attributes: DatadogAPIClient::V2::SecurityMonitoringSuppressionCreateAttributes.new({ description: "This rule suppresses low-severity signals in staging environments.", enabled: true, + start_date: 1637493071000, expiration_date: 1638443471000, name: "Example-Security-Monitoring", rule_query: "type:log_detection source:cloudtrail", diff --git a/examples/v2/security-monitoring/CreateSecurityMonitoringSuppression_3192265332.rb b/examples/v2/security-monitoring/CreateSecurityMonitoringSuppression_3192265332.rb index 505a744b4e83..ce274a978d15 100644 --- a/examples/v2/security-monitoring/CreateSecurityMonitoringSuppression_3192265332.rb +++ b/examples/v2/security-monitoring/CreateSecurityMonitoringSuppression_3192265332.rb @@ -8,6 +8,7 @@ attributes: DatadogAPIClient::V2::SecurityMonitoringSuppressionCreateAttributes.new({ description: "This rule suppresses low-severity signals in staging environments.", enabled: true, + start_date: 1637493071000, expiration_date: 1638443471000, name: "Example-Security-Monitoring", rule_query: "type:log_detection source:cloudtrail", diff --git a/features/v2/security_monitoring.feature b/features/v2/security_monitoring.feature index 1c3c32c5a853..362378f63492 100644 --- a/features/v2/security_monitoring.feature +++ b/features/v2/security_monitoring.feature @@ -264,21 +264,21 @@ Feature: Security Monitoring @generated @skip @team:DataDog/k9-cloud-security-platform Scenario: Create a suppression rule returns "Bad Request" response Given new "CreateSecurityMonitoringSuppression" request - And body with value {"data": {"attributes": {"data_exclusion_query": "source:cloudtrail account_id:12345", "description": "This rule suppresses low-severity signals in staging environments.", "enabled": true, "expiration_date": 1703187336000, "name": "Custom suppression", "rule_query": "type:log_detection source:cloudtrail", "suppression_query": "env:staging status:low"}, "type": "suppressions"}} + And body with value {"data": {"attributes": {"data_exclusion_query": "source:cloudtrail account_id:12345", "description": "This rule suppresses low-severity signals in staging environments.", "enabled": true, "expiration_date": 1703187336000, "name": "Custom suppression", "rule_query": "type:log_detection source:cloudtrail", "start_date": 1703187336000, "suppression_query": "env:staging status:low"}, "type": "suppressions"}} When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/k9-cloud-security-platform Scenario: Create a suppression rule returns "Conflict" response Given new "CreateSecurityMonitoringSuppression" request - And body with value {"data": {"attributes": {"data_exclusion_query": "source:cloudtrail account_id:12345", "description": "This rule suppresses low-severity signals in staging environments.", "enabled": true, "expiration_date": 1703187336000, "name": "Custom suppression", "rule_query": "type:log_detection source:cloudtrail", "suppression_query": "env:staging status:low"}, "type": "suppressions"}} + And body with value {"data": {"attributes": {"data_exclusion_query": "source:cloudtrail account_id:12345", "description": "This rule suppresses low-severity signals in staging environments.", "enabled": true, "expiration_date": 1703187336000, "name": "Custom suppression", "rule_query": "type:log_detection source:cloudtrail", "start_date": 1703187336000, "suppression_query": "env:staging status:low"}, "type": "suppressions"}} When the request is sent Then the response status is 409 Conflict @skip-validation @team:DataDog/k9-cloud-security-platform Scenario: Create a suppression rule returns "OK" response Given new "CreateSecurityMonitoringSuppression" request - And body with value {"data": {"attributes": {"description": "This rule suppresses low-severity signals in staging environments.", "enabled": true, "expiration_date": {{ timestamp('now + 21d') }}000, "name": "{{ unique }}", "rule_query": "type:log_detection source:cloudtrail", "suppression_query": "env:staging status:low"}, "type": "suppressions"}} + And body with value {"data": {"attributes": {"description": "This rule suppresses low-severity signals in staging environments.", "enabled": true, "start_date": {{ timestamp('now + 10d') }}000, "expiration_date": {{ timestamp('now + 21d') }}000, "name": "{{ unique }}", "rule_query": "type:log_detection source:cloudtrail", "suppression_query": "env:staging status:low"}, "type": "suppressions"}} When the request is sent Then the response status is 200 OK And the response "data.type" is equal to "suppressions" @@ -288,7 +288,7 @@ Feature: Security Monitoring @skip-validation @team:DataDog/k9-cloud-security-platform Scenario: Create a suppression rule with an exclusion query returns "OK" response Given new "CreateSecurityMonitoringSuppression" request - And body with value {"data": {"attributes": {"description": "This rule suppresses low-severity signals in staging environments.", "enabled": true, "expiration_date": {{ timestamp('now + 21d') }}000, "name": "{{ unique }}", "rule_query": "type:log_detection source:cloudtrail", "data_exclusion_query": "account_id:12345"}, "type": "suppressions"}} + And body with value {"data": {"attributes": {"description": "This rule suppresses low-severity signals in staging environments.", "enabled": true, "start_date": {{ timestamp('now + 10d') }}000, "expiration_date": {{ timestamp('now + 21d') }}000, "name": "{{ unique }}", "rule_query": "type:log_detection source:cloudtrail", "data_exclusion_query": "account_id:12345"}, "type": "suppressions"}} When the request is sent Then the response status is 200 OK And the response "data.type" is equal to "suppressions" @@ -867,7 +867,7 @@ Feature: Security Monitoring Scenario: Update a suppression rule returns "Bad Request" response Given new "UpdateSecurityMonitoringSuppression" request And request contains "suppression_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"data_exclusion_query": "source:cloudtrail account_id:12345", "description": "This rule suppresses low-severity signals in staging environments.", "enabled": true, "expiration_date": 1703187336000, "name": "Custom suppression", "rule_query": "type:log_detection source:cloudtrail", "suppression_query": "env:staging status:low"}, "type": "suppressions"}} + And body with value {"data": {"attributes": {"data_exclusion_query": "source:cloudtrail account_id:12345", "description": "This rule suppresses low-severity signals in staging environments.", "enabled": true, "expiration_date": 1703187336000, "name": "Custom suppression", "rule_query": "type:log_detection source:cloudtrail", "start_date": 1703187336000, "suppression_query": "env:staging status:low"}, "type": "suppressions"}} When the request is sent Then the response status is 400 Bad Request @@ -875,7 +875,7 @@ Feature: Security Monitoring Scenario: Update a suppression rule returns "Concurrent Modification" response Given new "UpdateSecurityMonitoringSuppression" request And request contains "suppression_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"data_exclusion_query": "source:cloudtrail account_id:12345", "description": "This rule suppresses low-severity signals in staging environments.", "enabled": true, "expiration_date": 1703187336000, "name": "Custom suppression", "rule_query": "type:log_detection source:cloudtrail", "suppression_query": "env:staging status:low"}, "type": "suppressions"}} + And body with value {"data": {"attributes": {"data_exclusion_query": "source:cloudtrail account_id:12345", "description": "This rule suppresses low-severity signals in staging environments.", "enabled": true, "expiration_date": 1703187336000, "name": "Custom suppression", "rule_query": "type:log_detection source:cloudtrail", "start_date": 1703187336000, "suppression_query": "env:staging status:low"}, "type": "suppressions"}} When the request is sent Then the response status is 409 Concurrent Modification @@ -883,7 +883,7 @@ Feature: Security Monitoring Scenario: Update a suppression rule returns "Not Found" response Given new "UpdateSecurityMonitoringSuppression" request And request contains "suppression_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"data_exclusion_query": "source:cloudtrail account_id:12345", "description": "This rule suppresses low-severity signals in staging environments.", "enabled": true, "expiration_date": 1703187336000, "name": "Custom suppression", "rule_query": "type:log_detection source:cloudtrail", "suppression_query": "env:staging status:low"}, "type": "suppressions"}} + And body with value {"data": {"attributes": {"data_exclusion_query": "source:cloudtrail account_id:12345", "description": "This rule suppresses low-severity signals in staging environments.", "enabled": true, "expiration_date": 1703187336000, "name": "Custom suppression", "rule_query": "type:log_detection source:cloudtrail", "start_date": 1703187336000, "suppression_query": "env:staging status:low"}, "type": "suppressions"}} When the request is sent Then the response status is 404 Not Found diff --git a/lib/datadog_api_client/v2/models/security_monitoring_suppression_attributes.rb b/lib/datadog_api_client/v2/models/security_monitoring_suppression_attributes.rb index a62eac0d38b8..ba252144d97a 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_suppression_attributes.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_suppression_attributes.rb @@ -48,6 +48,9 @@ class SecurityMonitoringSuppressionAttributes # The rule query of the suppression rule, with the same syntax as the search bar for detection rules. attr_accessor :rule_query + # A Unix millisecond timestamp giving the start date for the suppression rule. After this date, it starts suppressing signals. + attr_accessor :start_date + # The suppression query of the suppression rule. If a signal matches this query, it is suppressed and not triggered. Same syntax as the queries to search signals in the signal explorer. attr_accessor :suppression_query @@ -75,6 +78,7 @@ def self.attribute_map :'expiration_date' => :'expiration_date', :'name' => :'name', :'rule_query' => :'rule_query', + :'start_date' => :'start_date', :'suppression_query' => :'suppression_query', :'update_date' => :'update_date', :'updater' => :'updater', @@ -95,6 +99,7 @@ def self.openapi_types :'expiration_date' => :'Integer', :'name' => :'String', :'rule_query' => :'String', + :'start_date' => :'Integer', :'suppression_query' => :'String', :'update_date' => :'Integer', :'updater' => :'SecurityMonitoringUser', @@ -156,6 +161,10 @@ def initialize(attributes = {}) self.rule_query = attributes[:'rule_query'] end + if attributes.key?(:'start_date') + self.start_date = attributes[:'start_date'] + end + if attributes.key?(:'suppression_query') self.suppression_query = attributes[:'suppression_query'] end @@ -226,6 +235,7 @@ def ==(o) expiration_date == o.expiration_date && name == o.name && rule_query == o.rule_query && + start_date == o.start_date && suppression_query == o.suppression_query && update_date == o.update_date && updater == o.updater && @@ -237,7 +247,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [creation_date, creator, data_exclusion_query, description, editable, enabled, expiration_date, name, rule_query, suppression_query, update_date, updater, version, additional_properties].hash + [creation_date, creator, data_exclusion_query, description, editable, enabled, expiration_date, name, rule_query, start_date, suppression_query, update_date, updater, version, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_suppression_create_attributes.rb b/lib/datadog_api_client/v2/models/security_monitoring_suppression_create_attributes.rb index 828955b4b378..d0cbca049db2 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_suppression_create_attributes.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_suppression_create_attributes.rb @@ -39,6 +39,9 @@ class SecurityMonitoringSuppressionCreateAttributes # The rule query of the suppression rule, with the same syntax as the search bar for detection rules. attr_reader :rule_query + # A Unix millisecond timestamp giving the start date for the suppression rule. After this date, it starts suppressing signals. + attr_accessor :start_date + # The suppression query of the suppression rule. If a signal matches this query, it is suppressed and is not triggered. It uses the same syntax as the queries to search signals in the Signals Explorer. attr_accessor :suppression_query @@ -54,6 +57,7 @@ def self.attribute_map :'expiration_date' => :'expiration_date', :'name' => :'name', :'rule_query' => :'rule_query', + :'start_date' => :'start_date', :'suppression_query' => :'suppression_query' } end @@ -68,6 +72,7 @@ def self.openapi_types :'expiration_date' => :'Integer', :'name' => :'String', :'rule_query' => :'String', + :'start_date' => :'Integer', :'suppression_query' => :'String' } end @@ -114,6 +119,10 @@ def initialize(attributes = {}) self.rule_query = attributes[:'rule_query'] end + if attributes.key?(:'start_date') + self.start_date = attributes[:'start_date'] + end + if attributes.key?(:'suppression_query') self.suppression_query = attributes[:'suppression_query'] end @@ -191,6 +200,7 @@ def ==(o) expiration_date == o.expiration_date && name == o.name && rule_query == o.rule_query && + start_date == o.start_date && suppression_query == o.suppression_query && additional_properties == o.additional_properties end @@ -199,7 +209,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [data_exclusion_query, description, enabled, expiration_date, name, rule_query, suppression_query, additional_properties].hash + [data_exclusion_query, description, enabled, expiration_date, name, rule_query, start_date, suppression_query, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_suppression_update_attributes.rb b/lib/datadog_api_client/v2/models/security_monitoring_suppression_update_attributes.rb index 88fb00aa2c16..051d273c1728 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_suppression_update_attributes.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_suppression_update_attributes.rb @@ -39,6 +39,9 @@ class SecurityMonitoringSuppressionUpdateAttributes # The rule query of the suppression rule, with the same syntax as the search bar for detection rules. attr_accessor :rule_query + # A Unix millisecond timestamp giving the start date for the suppression rule. After this date, it starts suppressing signals. If unset, the start date of the suppression rule is left untouched. If set to `null`, the start date is removed. + attr_accessor :start_date + # The suppression query of the suppression rule. If a signal matches this query, it is suppressed and not triggered. Same syntax as the queries to search signals in the signal explorer. attr_accessor :suppression_query @@ -57,6 +60,7 @@ def self.attribute_map :'expiration_date' => :'expiration_date', :'name' => :'name', :'rule_query' => :'rule_query', + :'start_date' => :'start_date', :'suppression_query' => :'suppression_query', :'version' => :'version' } @@ -72,6 +76,7 @@ def self.openapi_types :'expiration_date' => :'Integer', :'name' => :'String', :'rule_query' => :'String', + :'start_date' => :'Integer', :'suppression_query' => :'String', :'version' => :'Integer' } @@ -82,6 +87,7 @@ def self.openapi_types def self.openapi_nullable Set.new([ :'expiration_date', + :'start_date', ]) end @@ -127,6 +133,10 @@ def initialize(attributes = {}) self.rule_query = attributes[:'rule_query'] end + if attributes.key?(:'start_date') + self.start_date = attributes[:'start_date'] + end + if attributes.key?(:'suppression_query') self.suppression_query = attributes[:'suppression_query'] end @@ -186,6 +196,7 @@ def ==(o) expiration_date == o.expiration_date && name == o.name && rule_query == o.rule_query && + start_date == o.start_date && suppression_query == o.suppression_query && version == o.version && additional_properties == o.additional_properties @@ -195,7 +206,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [data_exclusion_query, description, enabled, expiration_date, name, rule_query, suppression_query, version, additional_properties].hash + [data_exclusion_query, description, enabled, expiration_date, name, rule_query, start_date, suppression_query, version, additional_properties].hash end end end