Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add snapshot timestamp to GetFinding #1457

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.4",
"regenerated": "2023-05-11 13:17:34.302913",
"spec_repo_commit": "b590b791"
"regenerated": "2023-05-11 14:31:13.499049",
"spec_repo_commit": "b6d2ec34"
},
"v2": {
"apigentools_version": "1.6.4",
"regenerated": "2023-05-11 13:17:34.315254",
"spec_repo_commit": "b590b791"
"regenerated": "2023-05-11 14:31:13.516351",
"spec_repo_commit": "b6d2ec34"
}
}
}
9 changes: 9 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19603,6 +19603,15 @@ paths:
required: true
schema:
type: string
- description: Return the finding for a given snapshot of time (Unix ms).
example: 1678721573794
in: query
name: snapshot_timestamp
required: false
schema:
format: int64
minimum: 1
type: integer
responses:
'200':
content:
Expand Down
15 changes: 15 additions & 0 deletions src/datadog_api_client/v2/api/security_monitoring_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,14 @@ def __init__(self, api_client=None):
"attribute": "finding_id",
"location": "path",
},
"snapshot_timestamp": {
"validation": {
"inclusive_minimum": 1,
},
"openapi_types": (int,),
"attribute": "snapshot_timestamp",
"location": "query",
},
},
headers_map={
"accept": ["application/json"],
Expand Down Expand Up @@ -740,18 +748,25 @@ def edit_security_monitoring_signal_state(
def get_finding(
self,
finding_id: str,
*,
snapshot_timestamp: Union[int, UnsetType] = unset,
) -> GetFindingResponse:
"""Get a finding.

Returns a single finding with message and resource configuration.

:param finding_id: The ID of the finding.
:type finding_id: str
:param snapshot_timestamp: Return the finding for a given snapshot of time (Unix ms).
:type snapshot_timestamp: int, optional
:rtype: GetFindingResponse
"""
kwargs: Dict[str, Any] = {}
kwargs["finding_id"] = finding_id

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

return self._get_finding_endpoint.call_with_http_info(**kwargs)

def get_security_filter(
Expand Down