-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add included_keyword_configuration field to SDS rule (#1824)
Co-authored-by: ci.datadog-api-spec <[email protected]>
- Loading branch information
1 parent
b3b4f89
commit 903b743
Showing
13 changed files
with
171 additions
and
42 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
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
52 changes: 52 additions & 0 deletions
52
src/datadog_api_client/v2/model/sensitive_data_scanner_included_keyword_configuration.py
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,52 @@ | ||
# 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 2019-Present Datadog, Inc. | ||
from __future__ import annotations | ||
|
||
from typing import List | ||
|
||
from datadog_api_client.model_utils import ( | ||
ModelNormal, | ||
cached_property, | ||
) | ||
|
||
|
||
class SensitiveDataScannerIncludedKeywordConfiguration(ModelNormal): | ||
validations = { | ||
"character_count": { | ||
"inclusive_maximum": 50, | ||
"inclusive_minimum": 1, | ||
}, | ||
} | ||
|
||
@cached_property | ||
def openapi_types(_): | ||
return { | ||
"character_count": (int,), | ||
"keywords": ([str],), | ||
} | ||
|
||
attribute_map = { | ||
"character_count": "character_count", | ||
"keywords": "keywords", | ||
} | ||
|
||
def __init__(self_, character_count: int, keywords: List[str], **kwargs): | ||
""" | ||
Object defining a set of keywords and a number of characters that help reduce noise. | ||
You can provide a list of keywords you would like to check within a defined proximity of the matching pattern. | ||
If any of the keywords are found within the proximity check, the match is kept. | ||
If none are found, the match is discarded. | ||
:param character_count: The number of characters behind a match detected by Sensitive Data Scanner to look for the keywords defined. | ||
``character_count`` should be greater than the maximum length of a keyword defined for a rule. | ||
:type character_count: int | ||
:param keywords: Keyword list that will be checked during scanning in order to validate a match. | ||
The number of keywords in the list must be less than or equal to 20. | ||
:type keywords: [str] | ||
""" | ||
super().__init__(kwargs) | ||
|
||
self_.character_count = character_count | ||
self_.keywords = keywords |
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
2 changes: 1 addition & 1 deletion
2
tests/v2/cassettes/test_scenarios/test_create_scanning_rule_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 |
---|---|---|
@@ -1 +1 @@ | ||
2023-12-13T09:06:38.820Z | ||
2024-01-04T13:51:03.802Z |
Oops, something went wrong.