Skip to content

Commit

Permalink
Regenerate client from commit 279f186f of spec repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ci.datadog-api-spec committed Sep 26, 2024
1 parent d251001 commit 4a61f8d
Show file tree
Hide file tree
Showing 6 changed files with 101 additions and 5 deletions.
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2024-09-25 18:52:40.246446",
"spec_repo_commit": "1fa8186c"
"regenerated": "2024-09-26 15:35:14.508965",
"spec_repo_commit": "279f186f"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-09-25 18:52:40.260078",
"spec_repo_commit": "1fa8186c"
"regenerated": "2024-09-26 15:35:14.522700",
"spec_repo_commit": "279f186f"
}
}
}
24 changes: 24 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9183,6 +9183,20 @@ components:
tags:
$ref: '#/components/schemas/FindingTags'
type: object
FindingDetectionType:
description: The detection type of the finding.
enum:
- misconfiguration
- attack_path
- identity_risk
- api_security
example: misconfiguration
type: string
x-enum-varnames:
- MISCONFIGURATION
- ATTACK_PATH
- IDENTITY_RISK
- API_SECURITY
FindingEvaluation:
description: The evaluation of the finding.
enum:
Expand Down Expand Up @@ -33705,6 +33719,16 @@ paths:
required: false
schema:
type: string
- description: Return findings that match the selected detection types (repeatable).
example:
- misconfiguration
in: query
name: filter[detection_type]
required: false
schema:
items:
$ref: '#/components/schemas/FindingDetectionType'
type: array
- description: Return findings that have these associated tags (repeatable).
example: filter[tags]=cloud_provider:aws&filter[tags]=aws_account:999999999999
in: query
Expand Down
7 changes: 7 additions & 0 deletions docs/datadog_api_client.v2.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3728,6 +3728,13 @@ datadog\_api\_client.v2.model.finding\_attributes module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.finding\_detection\_type module
-------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.finding_detection_type
:members:
:show-inheritance:

datadog\_api\_client.v2.model.finding\_evaluation module
--------------------------------------------------------

Expand Down
21 changes: 20 additions & 1 deletion src/datadog_api_client/v2/api/security_monitoring_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from __future__ import annotations

import collections
from typing import Any, Dict, Union
from typing import Any, Dict, List, Union

from datadog_api_client.api_client import ApiClient, Endpoint as _Endpoint
from datadog_api_client.configuration import Configuration
Expand All @@ -16,6 +16,7 @@
unset,
)
from datadog_api_client.v2.model.list_findings_response import ListFindingsResponse
from datadog_api_client.v2.model.finding_detection_type import FindingDetectionType
from datadog_api_client.v2.model.finding_evaluation import FindingEvaluation
from datadog_api_client.v2.model.finding_status import FindingStatus
from datadog_api_client.v2.model.finding import Finding
Expand Down Expand Up @@ -487,6 +488,12 @@ def __init__(self, api_client=None):
"attribute": "page[cursor]",
"location": "query",
},
"filter_detection_type": {
"openapi_types": ([FindingDetectionType],),
"attribute": "filter[detection_type]",
"location": "query",
"collection_format": "multi",
},
"filter_tags": {
"openapi_types": (str,),
"attribute": "filter[tags]",
Expand Down Expand Up @@ -1146,6 +1153,7 @@ def list_findings(
page_limit: Union[int, UnsetType] = unset,
snapshot_timestamp: Union[int, UnsetType] = unset,
page_cursor: Union[str, UnsetType] = unset,
filter_detection_type: Union[List[FindingDetectionType], UnsetType] = unset,
filter_tags: Union[str, UnsetType] = unset,
filter_evaluation_changed_at: Union[str, UnsetType] = unset,
filter_muted: Union[bool, UnsetType] = unset,
Expand Down Expand Up @@ -1195,6 +1203,8 @@ def list_findings(
:type snapshot_timestamp: int, optional
:param page_cursor: Return the next page of findings pointed to by the cursor.
:type page_cursor: str, optional
:param filter_detection_type: Return findings that match the selected detection types (repeatable).
:type filter_detection_type: [FindingDetectionType], optional
:param filter_tags: Return findings that have these associated tags (repeatable).
:type filter_tags: str, optional
:param filter_evaluation_changed_at: Return findings that have changed from pass to fail or vice versa on a specified date (Unix ms) or date range (using comparison operators).
Expand Down Expand Up @@ -1225,6 +1235,9 @@ def list_findings(
if page_cursor is not unset:
kwargs["page_cursor"] = page_cursor

if filter_detection_type is not unset:
kwargs["filter_detection_type"] = filter_detection_type

if filter_tags is not unset:
kwargs["filter_tags"] = filter_tags

Expand Down Expand Up @@ -1260,6 +1273,7 @@ def list_findings_with_pagination(
page_limit: Union[int, UnsetType] = unset,
snapshot_timestamp: Union[int, UnsetType] = unset,
page_cursor: Union[str, UnsetType] = unset,
filter_detection_type: Union[List[FindingDetectionType], UnsetType] = unset,
filter_tags: Union[str, UnsetType] = unset,
filter_evaluation_changed_at: Union[str, UnsetType] = unset,
filter_muted: Union[bool, UnsetType] = unset,
Expand All @@ -1280,6 +1294,8 @@ def list_findings_with_pagination(
:type snapshot_timestamp: int, optional
:param page_cursor: Return the next page of findings pointed to by the cursor.
:type page_cursor: str, optional
:param filter_detection_type: Return findings that match the selected detection types (repeatable).
:type filter_detection_type: [FindingDetectionType], optional
:param filter_tags: Return findings that have these associated tags (repeatable).
:type filter_tags: str, optional
:param filter_evaluation_changed_at: Return findings that have changed from pass to fail or vice versa on a specified date (Unix ms) or date range (using comparison operators).
Expand Down Expand Up @@ -1312,6 +1328,9 @@ def list_findings_with_pagination(
if page_cursor is not unset:
kwargs["page_cursor"] = page_cursor

if filter_detection_type is not unset:
kwargs["filter_detection_type"] = filter_detection_type

if filter_tags is not unset:
kwargs["filter_tags"] = filter_tags

Expand Down
44 changes: 44 additions & 0 deletions src/datadog_api_client/v2/model/finding_detection_type.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# 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 datadog_api_client.model_utils import (
ModelSimple,
cached_property,
)

from typing import ClassVar


class FindingDetectionType(ModelSimple):
"""
The detection type of the finding.
:param value: Must be one of ["misconfiguration", "attack_path", "identity_risk", "api_security"].
:type value: str
"""

allowed_values = {
"misconfiguration",
"attack_path",
"identity_risk",
"api_security",
}
MISCONFIGURATION: ClassVar["FindingDetectionType"]
ATTACK_PATH: ClassVar["FindingDetectionType"]
IDENTITY_RISK: ClassVar["FindingDetectionType"]
API_SECURITY: ClassVar["FindingDetectionType"]

@cached_property
def openapi_types(_):
return {
"value": (str,),
}


FindingDetectionType.MISCONFIGURATION = FindingDetectionType("misconfiguration")
FindingDetectionType.ATTACK_PATH = FindingDetectionType("attack_path")
FindingDetectionType.IDENTITY_RISK = FindingDetectionType("identity_risk")
FindingDetectionType.API_SECURITY = FindingDetectionType("api_security")
2 changes: 2 additions & 0 deletions src/datadog_api_client/v2/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,7 @@
from datadog_api_client.v2.model.fastly_services_response import FastlyServicesResponse
from datadog_api_client.v2.model.finding import Finding
from datadog_api_client.v2.model.finding_attributes import FindingAttributes
from datadog_api_client.v2.model.finding_detection_type import FindingDetectionType
from datadog_api_client.v2.model.finding_evaluation import FindingEvaluation
from datadog_api_client.v2.model.finding_mute import FindingMute
from datadog_api_client.v2.model.finding_mute_reason import FindingMuteReason
Expand Down Expand Up @@ -2489,6 +2490,7 @@
"FastlyServicesResponse",
"Finding",
"FindingAttributes",
"FindingDetectionType",
"FindingEvaluation",
"FindingMute",
"FindingMuteReason",
Expand Down

0 comments on commit 4a61f8d

Please sign in to comment.