Skip to content

Commit 6af1624

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit daa54a5 of spec repo
1 parent 78fb7bf commit 6af1624

35 files changed

Lines changed: 1169 additions & 0 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45014,6 +45014,125 @@ components:
4501445014
meta:
4501545015
$ref: "#/components/schemas/MonthlyCostAttributionMeta"
4501645016
type: object
45017+
MuteDataType:
45018+
default: mute
45019+
description: Mute resource type.
45020+
enum:
45021+
- mute
45022+
example: mute
45023+
type: string
45024+
x-enum-varnames:
45025+
- MUTE
45026+
MuteFindingsMuteAttributes:
45027+
description: Mute properties to apply to the findings.
45028+
properties:
45029+
description:
45030+
description: Additional information about the reason why the findings are muted or unmuted. This field has a limit of 280 characters.
45031+
example: "To be resolved later."
45032+
type: string
45033+
expire_at:
45034+
description: >-
45035+
The expiration date of the mute action (Unix ms). It must be set to a value greater than the current timestamp. If this field is not provided, the findings remain muted indefinitely.
45036+
example: 1778721573794
45037+
format: int64
45038+
type: integer
45039+
is_muted:
45040+
description: Whether the findings should be muted or unmuted.
45041+
example: true
45042+
type: boolean
45043+
reason:
45044+
$ref: "#/components/schemas/MuteFindingsReason"
45045+
description: The reason why the findings are muted or unmuted.
45046+
required:
45047+
- is_muted
45048+
- reason
45049+
type: object
45050+
MuteFindingsReason:
45051+
description: The reason why the findings are muted or unmuted.
45052+
enum:
45053+
- PENDING_FIX
45054+
- FALSE_POSITIVE
45055+
- OTHER
45056+
- NO_FIX
45057+
- DUPLICATE
45058+
- RISK_ACCEPTED
45059+
- NO_PENDING_FIX
45060+
- HUMAN_ERROR
45061+
- NO_LONGER_ACCEPTED_RISK
45062+
example: PENDING_FIX
45063+
type: string
45064+
x-enum-varnames:
45065+
- PENDING_FIX
45066+
- FALSE_POSITIVE
45067+
- OTHER
45068+
- NO_FIX
45069+
- DUPLICATE
45070+
- RISK_ACCEPTED
45071+
- NO_PENDING_FIX
45072+
- HUMAN_ERROR
45073+
- NO_LONGER_ACCEPTED_RISK
45074+
MuteFindingsRequest:
45075+
description: Request to mute or unmute security findings.
45076+
properties:
45077+
data:
45078+
$ref: "#/components/schemas/MuteFindingsRequestData"
45079+
required:
45080+
- data
45081+
type: object
45082+
MuteFindingsRequestData:
45083+
description: Data of the mute request.
45084+
properties:
45085+
attributes:
45086+
$ref: "#/components/schemas/MuteFindingsRequestDataAttributes"
45087+
id:
45088+
description: Unique identifier of the mute request.
45089+
example: "93bfeb70-af47-424d-908a-948d3f08e37f"
45090+
type: string
45091+
relationships:
45092+
$ref: "#/components/schemas/MuteFindingsRequestDataRelationships"
45093+
type:
45094+
$ref: "#/components/schemas/MuteDataType"
45095+
required:
45096+
- attributes
45097+
- relationships
45098+
- type
45099+
type: object
45100+
MuteFindingsRequestDataAttributes:
45101+
description: Attributes of the mute request.
45102+
properties:
45103+
mute:
45104+
$ref: "#/components/schemas/MuteFindingsMuteAttributes"
45105+
required:
45106+
- mute
45107+
type: object
45108+
MuteFindingsRequestDataRelationships:
45109+
description: Relationships of the mute request.
45110+
properties:
45111+
findings:
45112+
$ref: "#/components/schemas/Findings"
45113+
description: Security findings to mute or unmute.
45114+
required:
45115+
- findings
45116+
type: object
45117+
MuteFindingsResponse:
45118+
description: Response for the mute or unmute request.
45119+
properties:
45120+
data:
45121+
$ref: "#/components/schemas/MuteFindingsResponseData"
45122+
type: object
45123+
MuteFindingsResponseData:
45124+
description: Data of the mute response.
45125+
properties:
45126+
id:
45127+
description: Unique identifier of the mute request.
45128+
example: "93bfeb70-af47-424d-908a-948d3f08e37f"
45129+
type: string
45130+
type:
45131+
$ref: "#/components/schemas/MuteDataType"
45132+
required:
45133+
- type
45134+
- id
45135+
type: object
4501745136
NotebookCreateData:
4501845137
description: Notebook creation data
4501945138
properties:
@@ -118597,6 +118716,74 @@ paths:
118597118716
permissions:
118598118717
- security_monitoring_findings_write
118599118718
- appsec_vm_write
118719+
/api/v2/security/findings/mute:
118720+
patch:
118721+
description: >-
118722+
Mute or unmute security findings.
118723+
118724+
You can mute or unmute up to 100 security findings per request. The request body must include `is_muted` and `reason` attributes. The allowed reasons depend on whether the finding is being muted or unmuted:
118725+
- To mute a finding: `PENDING_FIX`, `FALSE_POSITIVE`, `OTHER`, `NO_FIX`, `DUPLICATE`, `RISK_ACCEPTED`.
118726+
- To unmute a finding: `NO_PENDING_FIX`, `HUMAN_ERROR`, `NO_LONGER_ACCEPTED_RISK`, `OTHER`.
118727+
operationId: MuteSecurityFindings
118728+
requestBody:
118729+
content:
118730+
application/json:
118731+
examples:
118732+
default:
118733+
value:
118734+
data:
118735+
attributes:
118736+
mute:
118737+
description: "To be resolved later."
118738+
expire_at: 1778721573794
118739+
is_muted: true
118740+
reason: "RISK_ACCEPTED"
118741+
relationships:
118742+
findings:
118743+
data:
118744+
- id: "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw=="
118745+
type: "findings"
118746+
type: "mute"
118747+
schema:
118748+
$ref: "#/components/schemas/MuteFindingsRequest"
118749+
required: true
118750+
responses:
118751+
"202":
118752+
content:
118753+
application/json:
118754+
schema:
118755+
$ref: "#/components/schemas/MuteFindingsResponse"
118756+
description: Accepted
118757+
"400":
118758+
$ref: "#/components/responses/BadRequestResponse"
118759+
"401":
118760+
$ref: "#/components/responses/UnauthorizedResponse"
118761+
"404":
118762+
$ref: "#/components/responses/NotFoundResponse"
118763+
"422":
118764+
content:
118765+
application/json:
118766+
schema:
118767+
$ref: "#/components/schemas/JSONAPIErrorResponse"
118768+
description: "Unprocessable Entity"
118769+
"429":
118770+
$ref: "#/components/responses/TooManyRequestsResponse"
118771+
security:
118772+
- apiKeyAuth: []
118773+
appKeyAuth: []
118774+
- AuthZ: []
118775+
summary: Mute or unmute security findings
118776+
tags:
118777+
- "Security Monitoring"
118778+
x-codegen-request-body-name: body
118779+
"x-permission":
118780+
operator: OR
118781+
permissions:
118782+
- security_monitoring_findings_write
118783+
- appsec_vm_write
118784+
x-unstable: |-
118785+
**Note**: This endpoint is in preview and is subject to change.
118786+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
118600118787
/api/v2/security/findings/search:
118601118788
post:
118602118789
description: |-

docs/datadog_api_client.v2.model.rst

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19674,6 +19674,69 @@ datadog\_api\_client.v2.model.ms\_teams\_integration\_metadata\_teams\_item modu
1967419674
:members:
1967519675
:show-inheritance:
1967619676

19677+
datadog\_api\_client.v2.model.mute\_data\_type module
19678+
-----------------------------------------------------
19679+
19680+
.. automodule:: datadog_api_client.v2.model.mute_data_type
19681+
:members:
19682+
:show-inheritance:
19683+
19684+
datadog\_api\_client.v2.model.mute\_findings\_mute\_attributes module
19685+
---------------------------------------------------------------------
19686+
19687+
.. automodule:: datadog_api_client.v2.model.mute_findings_mute_attributes
19688+
:members:
19689+
:show-inheritance:
19690+
19691+
datadog\_api\_client.v2.model.mute\_findings\_reason module
19692+
-----------------------------------------------------------
19693+
19694+
.. automodule:: datadog_api_client.v2.model.mute_findings_reason
19695+
:members:
19696+
:show-inheritance:
19697+
19698+
datadog\_api\_client.v2.model.mute\_findings\_request module
19699+
------------------------------------------------------------
19700+
19701+
.. automodule:: datadog_api_client.v2.model.mute_findings_request
19702+
:members:
19703+
:show-inheritance:
19704+
19705+
datadog\_api\_client.v2.model.mute\_findings\_request\_data module
19706+
------------------------------------------------------------------
19707+
19708+
.. automodule:: datadog_api_client.v2.model.mute_findings_request_data
19709+
:members:
19710+
:show-inheritance:
19711+
19712+
datadog\_api\_client.v2.model.mute\_findings\_request\_data\_attributes module
19713+
------------------------------------------------------------------------------
19714+
19715+
.. automodule:: datadog_api_client.v2.model.mute_findings_request_data_attributes
19716+
:members:
19717+
:show-inheritance:
19718+
19719+
datadog\_api\_client.v2.model.mute\_findings\_request\_data\_relationships module
19720+
---------------------------------------------------------------------------------
19721+
19722+
.. automodule:: datadog_api_client.v2.model.mute_findings_request_data_relationships
19723+
:members:
19724+
:show-inheritance:
19725+
19726+
datadog\_api\_client.v2.model.mute\_findings\_response module
19727+
-------------------------------------------------------------
19728+
19729+
.. automodule:: datadog_api_client.v2.model.mute_findings_response
19730+
:members:
19731+
:show-inheritance:
19732+
19733+
datadog\_api\_client.v2.model.mute\_findings\_response\_data module
19734+
-------------------------------------------------------------------
19735+
19736+
.. automodule:: datadog_api_client.v2.model.mute_findings_response_data
19737+
:members:
19738+
:show-inheritance:
19739+
1967719740
datadog\_api\_client.v2.model.notebook\_create\_data module
1967819741
-----------------------------------------------------------
1967919742

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
"""
2+
Mute or unmute security findings returns "Accepted" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.security_monitoring_api import SecurityMonitoringApi
7+
from datadog_api_client.v2.model.finding_data import FindingData
8+
from datadog_api_client.v2.model.finding_data_type import FindingDataType
9+
from datadog_api_client.v2.model.findings import Findings
10+
from datadog_api_client.v2.model.mute_data_type import MuteDataType
11+
from datadog_api_client.v2.model.mute_findings_mute_attributes import MuteFindingsMuteAttributes
12+
from datadog_api_client.v2.model.mute_findings_reason import MuteFindingsReason
13+
from datadog_api_client.v2.model.mute_findings_request import MuteFindingsRequest
14+
from datadog_api_client.v2.model.mute_findings_request_data import MuteFindingsRequestData
15+
from datadog_api_client.v2.model.mute_findings_request_data_attributes import MuteFindingsRequestDataAttributes
16+
from datadog_api_client.v2.model.mute_findings_request_data_relationships import MuteFindingsRequestDataRelationships
17+
18+
body = MuteFindingsRequest(
19+
data=MuteFindingsRequestData(
20+
attributes=MuteFindingsRequestDataAttributes(
21+
mute=MuteFindingsMuteAttributes(
22+
description="To be resolved later.",
23+
expire_at=1778721573794,
24+
is_muted=True,
25+
reason=MuteFindingsReason.PENDING_FIX,
26+
),
27+
),
28+
id="93bfeb70-af47-424d-908a-948d3f08e37f",
29+
relationships=MuteFindingsRequestDataRelationships(
30+
findings=Findings(
31+
data=[
32+
FindingData(
33+
id="ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==",
34+
type=FindingDataType.FINDINGS,
35+
),
36+
],
37+
),
38+
),
39+
type=MuteDataType.MUTE,
40+
),
41+
)
42+
43+
configuration = Configuration()
44+
configuration.unstable_operations["mute_security_findings"] = True
45+
with ApiClient(configuration) as api_client:
46+
api_instance = SecurityMonitoringApi(api_client)
47+
response = api_instance.mute_security_findings(body=body)
48+
49+
print(response)
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
"""
2+
Unmute security findings returns "Accepted" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.security_monitoring_api import SecurityMonitoringApi
7+
from datadog_api_client.v2.model.finding_data import FindingData
8+
from datadog_api_client.v2.model.finding_data_type import FindingDataType
9+
from datadog_api_client.v2.model.findings import Findings
10+
from datadog_api_client.v2.model.mute_data_type import MuteDataType
11+
from datadog_api_client.v2.model.mute_findings_mute_attributes import MuteFindingsMuteAttributes
12+
from datadog_api_client.v2.model.mute_findings_reason import MuteFindingsReason
13+
from datadog_api_client.v2.model.mute_findings_request import MuteFindingsRequest
14+
from datadog_api_client.v2.model.mute_findings_request_data import MuteFindingsRequestData
15+
from datadog_api_client.v2.model.mute_findings_request_data_attributes import MuteFindingsRequestDataAttributes
16+
from datadog_api_client.v2.model.mute_findings_request_data_relationships import MuteFindingsRequestDataRelationships
17+
18+
body = MuteFindingsRequest(
19+
data=MuteFindingsRequestData(
20+
attributes=MuteFindingsRequestDataAttributes(
21+
mute=MuteFindingsMuteAttributes(
22+
description="Resolved.",
23+
is_muted=False,
24+
reason=MuteFindingsReason.NO_PENDING_FIX,
25+
),
26+
),
27+
relationships=MuteFindingsRequestDataRelationships(
28+
findings=Findings(
29+
data=[
30+
FindingData(
31+
id="ZGVmLTAwMC0wYmd-MDE4NjcyMDJkMzE4MDE5ODY5MGE4ZmQ2MmFlMjg0Y2M=",
32+
type=FindingDataType.FINDINGS,
33+
),
34+
],
35+
),
36+
),
37+
type=MuteDataType.MUTE,
38+
),
39+
)
40+
41+
configuration = Configuration()
42+
with ApiClient(configuration) as api_client:
43+
api_instance = SecurityMonitoringApi(api_client)
44+
response = api_instance.mute_security_findings(body=body)
45+
46+
print(response)

0 commit comments

Comments
 (0)