Skip to content

Commit c57b189

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 23eb15a of spec repo
1 parent f907180 commit c57b189

File tree

6 files changed

+107
-2
lines changed

6 files changed

+107
-2
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50854,6 +50854,8 @@ components:
5085450854
maximum: 5
5085550855
minimum: 1
5085650856
type: integer
50857+
suppressions:
50858+
$ref: '#/components/schemas/SensitiveDataScannerSuppressions'
5085750859
tags:
5085850860
description: List of tags.
5085950861
items:
@@ -51075,6 +51077,32 @@ components:
5107551077
type:
5107651078
$ref: '#/components/schemas/SensitiveDataScannerStandardPatternType'
5107751079
type: object
51080+
SensitiveDataScannerSuppressions:
51081+
description: 'Object describing the suppressions for a rule. There are three
51082+
types of suppressions, `starts_with`, `ends_with`, and `exact_match`.
51083+
51084+
Suppressed matches are not obfuscated, counted in metrics, or displayed in
51085+
the Findings page.'
51086+
properties:
51087+
ends_with:
51088+
description: List of strings to use for suppression of matches ending with
51089+
these strings.
51090+
items:
51091+
type: string
51092+
type: array
51093+
exact_match:
51094+
description: List of strings to use for suppression of matches exactly matching
51095+
these strings.
51096+
items:
51097+
type: string
51098+
type: array
51099+
starts_with:
51100+
description: List of strings to use for suppression of matches starting
51101+
with these strings.
51102+
items:
51103+
type: string
51104+
type: array
51105+
type: object
5107851106
SensitiveDataScannerTextReplacement:
5107951107
description: Object describing how the scanned event will be replaced.
5108051108
properties:

docs/datadog_api_client.v2.model.rst

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

22547+
datadog\_api\_client.v2.model.sensitive\_data\_scanner\_suppressions module
22548+
---------------------------------------------------------------------------
22549+
22550+
.. automodule:: datadog_api_client.v2.model.sensitive_data_scanner_suppressions
22551+
:members:
22552+
:show-inheritance:
22553+
2254722554
datadog\_api\_client.v2.model.sensitive\_data\_scanner\_text\_replacement module
2254822555
--------------------------------------------------------------------------------
2254922556

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
@@ -4559,6 +4559,7 @@
45594559
from datadog_api_client.v2.model.sensitive_data_scanner_standard_patterns_response_item import (
45604560
SensitiveDataScannerStandardPatternsResponseItem,
45614561
)
4562+
from datadog_api_client.v2.model.sensitive_data_scanner_suppressions import SensitiveDataScannerSuppressions
45624563
from datadog_api_client.v2.model.sensitive_data_scanner_text_replacement import SensitiveDataScannerTextReplacement
45634564
from datadog_api_client.v2.model.sensitive_data_scanner_text_replacement_type import (
45644565
SensitiveDataScannerTextReplacementType,
@@ -8467,6 +8468,7 @@
84678468
"SensitiveDataScannerStandardPatternsResponse",
84688469
"SensitiveDataScannerStandardPatternsResponseData",
84698470
"SensitiveDataScannerStandardPatternsResponseItem",
8471+
"SensitiveDataScannerSuppressions",
84708472
"SensitiveDataScannerTextReplacement",
84718473
"SensitiveDataScannerTextReplacementType",
84728474
"ServiceAccountCreateAttributes",

tests/v2/features/sensitive_data_scanner.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,11 +196,11 @@ Feature: Sensitive Data Scanner
196196
When the request is sent
197197
Then the response status is 400 Bad Request
198198

199-
@generated @skip @team:DataDog/sensitive-data-scanner
199+
@team:DataDog/sensitive-data-scanner
200200
Scenario: Update Scanning Rule returns "Not Found" response
201201
Given new "UpdateScanningRule" request
202202
And request contains "rule_id" parameter from "REPLACE.ME"
203-
And body with value {"data": {"attributes": {"excluded_namespaces": ["admin.name"], "included_keyword_configuration": {"character_count": 30, "keywords": ["credit card", "cc"]}, "namespaces": ["admin"], "tags": [], "text_replacement": {"type": "none"}}, "relationships": {"group": {"data": {"type": "sensitive_data_scanner_group"}}, "standard_pattern": {"data": {"type": "sensitive_data_scanner_standard_pattern"}}}, "type": "sensitive_data_scanner_rule"}, "meta": {"version": 0}}
203+
And body with value {"data": {"attributes": {"excluded_namespaces": ["admin.name"], "included_keyword_configuration": {"character_count": 30, "keywords": ["credit card", "cc"]}, "namespaces": ["admin"], "suppressions": {"ends_with": ["@datadoghq.com"], "exact_match": ["admin"], "starts_with": ["oli"]}, "tags": [], "text_replacement": {"type": "none"}}, "relationships": {"group": {"data": {"type": "sensitive_data_scanner_group"}}, "standard_pattern": {"data": {"type": "sensitive_data_scanner_standard_pattern"}}}, "type": "sensitive_data_scanner_rule"}, "meta": {"version": 0}}
204204
When the request is sent
205205
Then the response status is 404 Not Found
206206

0 commit comments

Comments
 (0)