Skip to content

Commit b7d8915

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 2d6272d of spec repo
1 parent d85e270 commit b7d8915

34 files changed

Lines changed: 1160 additions & 0 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45004,6 +45004,123 @@ components:
4500445004
meta:
4500545005
$ref: "#/components/schemas/MonthlyCostAttributionMeta"
4500645006
type: object
45007+
MuteDataType:
45008+
default: mute
45009+
description: Mute resource type.
45010+
enum:
45011+
- mute
45012+
example: mute
45013+
type: string
45014+
x-enum-varnames:
45015+
- MUTE
45016+
MuteFindingsMuteAttributes:
45017+
description: Mute properties to apply to the findings.
45018+
properties:
45019+
description:
45020+
description: Additional information about the reason why the findings are muted or unmuted. This field has a limit of 280 characters.
45021+
example: "To be resolved later."
45022+
type: string
45023+
expiration_date:
45024+
description: >-
45025+
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.
45026+
example: 1778721573794
45027+
format: int64
45028+
type: integer
45029+
muted:
45030+
description: Whether the findings should be muted or unmuted.
45031+
example: true
45032+
type: boolean
45033+
reason:
45034+
$ref: "#/components/schemas/MuteFindingsReason"
45035+
description: The reason why the findings are muted or unmuted.
45036+
required:
45037+
- muted
45038+
- reason
45039+
type: object
45040+
MuteFindingsReason:
45041+
description: The reason why the findings are muted or unmuted.
45042+
enum:
45043+
- PENDING_FIX
45044+
- FALSE_POSITIVE
45045+
- OTHER
45046+
- NO_FIX
45047+
- DUPLICATE
45048+
- RISK_ACCEPTED
45049+
- NO_PENDING_FIX
45050+
- HUMAN_ERROR
45051+
- NO_LONGER_ACCEPTED_RISK
45052+
example: PENDING_FIX
45053+
type: string
45054+
x-enum-varnames:
45055+
- PENDING_FIX
45056+
- FALSE_POSITIVE
45057+
- OTHER
45058+
- NO_FIX
45059+
- DUPLICATE
45060+
- RISK_ACCEPTED
45061+
- NO_PENDING_FIX
45062+
- HUMAN_ERROR
45063+
- NO_LONGER_ACCEPTED_RISK
45064+
MuteFindingsRequest:
45065+
description: Request to mute or unmute security findings.
45066+
properties:
45067+
data:
45068+
$ref: "#/components/schemas/MuteFindingsRequestData"
45069+
required:
45070+
- data
45071+
type: object
45072+
MuteFindingsRequestData:
45073+
description: Data of the mute request.
45074+
properties:
45075+
attributes:
45076+
$ref: "#/components/schemas/MuteFindingsRequestDataAttributes"
45077+
id:
45078+
description: Unique identifier of the mute request.
45079+
example: "93bfeb70-af47-424d-908a-948d3f08e37f"
45080+
type: string
45081+
relationships:
45082+
$ref: "#/components/schemas/MuteFindingsRequestDataRelationships"
45083+
type:
45084+
$ref: "#/components/schemas/MuteDataType"
45085+
required:
45086+
- type
45087+
type: object
45088+
MuteFindingsRequestDataAttributes:
45089+
description: Attributes of the mute request.
45090+
properties:
45091+
mute:
45092+
$ref: "#/components/schemas/MuteFindingsMuteAttributes"
45093+
required:
45094+
- mute
45095+
type: object
45096+
MuteFindingsRequestDataRelationships:
45097+
description: Relationships of the mute request.
45098+
properties:
45099+
findings:
45100+
$ref: "#/components/schemas/Findings"
45101+
description: Security findings to mute or unmute.
45102+
required:
45103+
- findings
45104+
type: object
45105+
MuteFindingsResponse:
45106+
description: Response for the mute or unmute request.
45107+
properties:
45108+
data:
45109+
$ref: "#/components/schemas/MuteFindingsResponseData"
45110+
type: object
45111+
MuteFindingsResponseData:
45112+
description: Data of the mute response.
45113+
properties:
45114+
id:
45115+
description: Unique identifier of the mute request.
45116+
example: "93bfeb70-af47-424d-908a-948d3f08e37f"
45117+
type: string
45118+
type:
45119+
$ref: "#/components/schemas/MuteDataType"
45120+
required:
45121+
- type
45122+
- id
45123+
type: object
4500745124
NotebookCreateData:
4500845125
description: Notebook creation data
4500945126
properties:
@@ -116522,6 +116639,71 @@ paths:
116522116639
permissions:
116523116640
- security_monitoring_findings_write
116524116641
- appsec_vm_write
116642+
/api/v2/security/findings/mute:
116643+
patch:
116644+
description: >-
116645+
Mute or unmute security findings.
116646+
116647+
You can mute or unmute up to 100 security findings per request. The request body must include `muted` and `reason` attributes. The allowed reasons depend on whether the finding is being muted or unmuted:
116648+
- To mute a finding: `PENDING_FIX`, `FALSE_POSITIVE`, `OTHER`, `NO_FIX`, `DUPLICATE`, `RISK_ACCEPTED`.
116649+
- To unmute a finding: `NO_PENDING_FIX`, `HUMAN_ERROR`, `NO_LONGER_ACCEPTED_RISK`, `OTHER`.
116650+
operationId: MuteSecurityFindings
116651+
requestBody:
116652+
content:
116653+
application/json:
116654+
examples:
116655+
default:
116656+
value:
116657+
data:
116658+
attributes:
116659+
mute:
116660+
description: "To be resolved later."
116661+
expiration_date: 1778721573794
116662+
muted: true
116663+
reason: "RISK_ACCEPTED"
116664+
relationships:
116665+
findings:
116666+
data:
116667+
- id: "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw=="
116668+
type: "findings"
116669+
type: "mute"
116670+
schema:
116671+
$ref: "#/components/schemas/MuteFindingsRequest"
116672+
required: true
116673+
responses:
116674+
"202":
116675+
content:
116676+
application/json:
116677+
schema:
116678+
$ref: "#/components/schemas/MuteFindingsResponse"
116679+
description: Accepted
116680+
"400":
116681+
$ref: "#/components/responses/BadRequestResponse"
116682+
"401":
116683+
$ref: "#/components/responses/UnauthorizedResponse"
116684+
"404":
116685+
$ref: "#/components/responses/NotFoundResponse"
116686+
"422":
116687+
content:
116688+
application/json:
116689+
schema:
116690+
$ref: "#/components/schemas/JSONAPIErrorResponse"
116691+
description: "Unprocessable Entity"
116692+
"429":
116693+
$ref: "#/components/responses/TooManyRequestsResponse"
116694+
security:
116695+
- apiKeyAuth: []
116696+
appKeyAuth: []
116697+
- AuthZ: []
116698+
summary: Mute or unmute security findings
116699+
tags:
116700+
- "Security Monitoring"
116701+
x-codegen-request-body-name: body
116702+
"x-permission":
116703+
operator: OR
116704+
permissions:
116705+
- security_monitoring_findings_write
116706+
- appsec_vm_write
116525116707
/api/v2/security/findings/search:
116526116708
post:
116527116709
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: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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+
expiration_date=1778721573794,
24+
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+
with ApiClient(configuration) as api_client:
45+
api_instance = SecurityMonitoringApi(api_client)
46+
response = api_instance.mute_security_findings(body=body)
47+
48+
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+
muted=False,
24+
reason=MuteFindingsReason.NO_PENDING_FIX,
25+
),
26+
),
27+
relationships=MuteFindingsRequestDataRelationships(
28+
findings=Findings(
29+
data=[
30+
FindingData(
31+
id="ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==",
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)