Skip to content

Commit 4ae0268

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add suppressions to SensitiveDataScannerRule resource (#3050)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent a259de2 commit 4ae0268

File tree

28 files changed

+211
-95
lines changed

28 files changed

+211
-95
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56089,8 +56089,9 @@ components:
5608956089

5609056090
The number of keywords in the list must be less than or equal to 30.'
5609156091
example:
56092-
- credit card
56093-
- cc
56092+
- email
56093+
- address
56094+
- login
5609456095
items:
5609556096
type: string
5609656097
type: array
@@ -56229,6 +56230,8 @@ components:
5622956230
maximum: 5
5623056231
minimum: 1
5623156232
type: integer
56233+
suppressions:
56234+
$ref: '#/components/schemas/SensitiveDataScannerSuppressions'
5623256235
tags:
5623356236
description: List of tags.
5623456237
items:
@@ -56450,6 +56453,41 @@ components:
5645056453
type:
5645156454
$ref: '#/components/schemas/SensitiveDataScannerStandardPatternType'
5645256455
type: object
56456+
SensitiveDataScannerSuppressions:
56457+
description: 'Object describing the suppressions for a rule. There are three
56458+
types of suppressions, `starts_with`, `ends_with`, and `exact_match`.
56459+
56460+
Suppressed matches are not obfuscated, counted in metrics, or displayed in
56461+
the Findings page.'
56462+
properties:
56463+
ends_with:
56464+
description: List of strings to use for suppression of matches ending with
56465+
these strings.
56466+
example:
56467+
- '@example.com'
56468+
- another.example.com
56469+
items:
56470+
type: string
56471+
type: array
56472+
exact_match:
56473+
description: List of strings to use for suppression of matches exactly matching
56474+
these strings.
56475+
example:
56476+
- admin@example.com
56477+
- user@example.com
56478+
items:
56479+
type: string
56480+
type: array
56481+
starts_with:
56482+
description: List of strings to use for suppression of matches starting
56483+
with these strings.
56484+
example:
56485+
- admin
56486+
- user
56487+
items:
56488+
type: string
56489+
type: array
56490+
type: object
5645356491
SensitiveDataScannerTextReplacement:
5645456492
description: Object describing how the scanned event will be replaced.
5645556493
properties:

docs/datadog_api_client.v2.model.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24686,6 +24686,13 @@ datadog\_api\_client.v2.model.sensitive\_data\_scanner\_standard\_patterns\_resp
2468624686
:members:
2468724687
:show-inheritance:
2468824688

24689+
datadog\_api\_client.v2.model.sensitive\_data\_scanner\_suppressions module
24690+
---------------------------------------------------------------------------
24691+
24692+
.. automodule:: datadog_api_client.v2.model.sensitive_data_scanner_suppressions
24693+
:members:
24694+
:show-inheritance:
24695+
2468924696
datadog\_api\_client.v2.model.sensitive\_data\_scanner\_text\_replacement module
2469024697
--------------------------------------------------------------------------------
2469124698

src/datadog_api_client/v2/model/sensitive_data_scanner_rule_attributes.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
from datadog_api_client.v2.model.sensitive_data_scanner_included_keyword_configuration import (
1818
SensitiveDataScannerIncludedKeywordConfiguration,
1919
)
20+
from datadog_api_client.v2.model.sensitive_data_scanner_suppressions import SensitiveDataScannerSuppressions
2021
from datadog_api_client.v2.model.sensitive_data_scanner_text_replacement import SensitiveDataScannerTextReplacement
2122

2223

@@ -33,6 +34,7 @@ def openapi_types(_):
3334
from datadog_api_client.v2.model.sensitive_data_scanner_included_keyword_configuration import (
3435
SensitiveDataScannerIncludedKeywordConfiguration,
3536
)
37+
from datadog_api_client.v2.model.sensitive_data_scanner_suppressions import SensitiveDataScannerSuppressions
3638
from datadog_api_client.v2.model.sensitive_data_scanner_text_replacement import (
3739
SensitiveDataScannerTextReplacement,
3840
)
@@ -46,6 +48,7 @@ def openapi_types(_):
4648
"namespaces": ([str],),
4749
"pattern": (str,),
4850
"priority": (int,),
51+
"suppressions": (SensitiveDataScannerSuppressions,),
4952
"tags": ([str],),
5053
"text_replacement": (SensitiveDataScannerTextReplacement,),
5154
}
@@ -59,6 +62,7 @@ def openapi_types(_):
5962
"namespaces": "namespaces",
6063
"pattern": "pattern",
6164
"priority": "priority",
65+
"suppressions": "suppressions",
6266
"tags": "tags",
6367
"text_replacement": "text_replacement",
6468
}
@@ -73,6 +77,7 @@ def __init__(
7377
namespaces: Union[List[str], UnsetType] = unset,
7478
pattern: Union[str, UnsetType] = unset,
7579
priority: Union[int, UnsetType] = unset,
80+
suppressions: Union[SensitiveDataScannerSuppressions, UnsetType] = unset,
7681
tags: Union[List[str], UnsetType] = unset,
7782
text_replacement: Union[SensitiveDataScannerTextReplacement, UnsetType] = unset,
7883
**kwargs,
@@ -108,6 +113,10 @@ def __init__(
108113
:param priority: Integer from 1 (high) to 5 (low) indicating rule issue severity.
109114
:type priority: int, optional
110115
116+
:param suppressions: Object describing the suppressions for a rule. There are three types of suppressions, ``starts_with`` , ``ends_with`` , and ``exact_match``.
117+
Suppressed matches are not obfuscated, counted in metrics, or displayed in the Findings page.
118+
:type suppressions: SensitiveDataScannerSuppressions, optional
119+
111120
:param tags: List of tags.
112121
:type tags: [str], optional
113122
@@ -130,6 +139,8 @@ def __init__(
130139
kwargs["pattern"] = pattern
131140
if priority is not unset:
132141
kwargs["priority"] = priority
142+
if suppressions is not unset:
143+
kwargs["suppressions"] = suppressions
133144
if tags is not unset:
134145
kwargs["tags"] = tags
135146
if text_replacement is not unset:
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
# Copyright 2019-Present Datadog, Inc.
4+
from __future__ import annotations
5+
6+
from typing import List, Union
7+
8+
from datadog_api_client.model_utils import (
9+
ModelNormal,
10+
cached_property,
11+
unset,
12+
UnsetType,
13+
)
14+
15+
16+
class SensitiveDataScannerSuppressions(ModelNormal):
17+
@cached_property
18+
def openapi_types(_):
19+
return {
20+
"ends_with": ([str],),
21+
"exact_match": ([str],),
22+
"starts_with": ([str],),
23+
}
24+
25+
attribute_map = {
26+
"ends_with": "ends_with",
27+
"exact_match": "exact_match",
28+
"starts_with": "starts_with",
29+
}
30+
31+
def __init__(
32+
self_,
33+
ends_with: Union[List[str], UnsetType] = unset,
34+
exact_match: Union[List[str], UnsetType] = unset,
35+
starts_with: Union[List[str], UnsetType] = unset,
36+
**kwargs,
37+
):
38+
"""
39+
Object describing the suppressions for a rule. There are three types of suppressions, ``starts_with`` , ``ends_with`` , and ``exact_match``.
40+
Suppressed matches are not obfuscated, counted in metrics, or displayed in the Findings page.
41+
42+
:param ends_with: List of strings to use for suppression of matches ending with these strings.
43+
:type ends_with: [str], optional
44+
45+
:param exact_match: List of strings to use for suppression of matches exactly matching these strings.
46+
:type exact_match: [str], optional
47+
48+
:param starts_with: List of strings to use for suppression of matches starting with these strings.
49+
:type starts_with: [str], optional
50+
"""
51+
if ends_with is not unset:
52+
kwargs["ends_with"] = ends_with
53+
if exact_match is not unset:
54+
kwargs["exact_match"] = exact_match
55+
if starts_with is not unset:
56+
kwargs["starts_with"] = starts_with
57+
super().__init__(kwargs)

src/datadog_api_client/v2/models/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5065,6 +5065,7 @@
50655065
from datadog_api_client.v2.model.sensitive_data_scanner_standard_patterns_response_item import (
50665066
SensitiveDataScannerStandardPatternsResponseItem,
50675067
)
5068+
from datadog_api_client.v2.model.sensitive_data_scanner_suppressions import SensitiveDataScannerSuppressions
50685069
from datadog_api_client.v2.model.sensitive_data_scanner_text_replacement import SensitiveDataScannerTextReplacement
50695070
from datadog_api_client.v2.model.sensitive_data_scanner_text_replacement_type import (
50705071
SensitiveDataScannerTextReplacementType,
@@ -9530,6 +9531,7 @@
95309531
"SensitiveDataScannerStandardPatternsResponse",
95319532
"SensitiveDataScannerStandardPatternsResponseData",
95329533
"SensitiveDataScannerStandardPatternsResponseItem",
9534+
"SensitiveDataScannerSuppressions",
95339535
"SensitiveDataScannerTextReplacement",
95349536
"SensitiveDataScannerTextReplacementType",
95359537
"ServiceAccountCreateAttributes",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2026-01-19T13:11:03.221Z
1+
2026-02-04T15:35:09.418Z

0 commit comments

Comments
 (0)