Skip to content

Commit 7b2240a

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit c9f30db of spec repo
1 parent 4e2e2a8 commit 7b2240a

14 files changed

+466
-2
lines changed

.generated-info

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"spec_repo_commit": "8001cbb",
3-
"generated": "2025-08-13 20:27:33.480"
2+
"spec_repo_commit": "c9f30db",
3+
"generated": "2025-08-15 16:35:28.715"
44
}

.generator/schemas/v2/openapi.yaml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14454,6 +14454,10 @@ components:
1445414454
description: Entity definition in raw JSON or YAML representation.
1445514455
example: "apiVersion: v3\nkind: service\nmetadata:\n name: myservice\n"
1445614456
type: string
14457+
EntityReference:
14458+
description: The unique reference for an IDP entity.
14459+
example: service:my-service
14460+
type: string
1445714461
EntityRelationships:
1445814462
description: Entity relationships.
1445914463
properties:
@@ -43591,6 +43595,57 @@ components:
4359143595
id:
4359243596
$ref: '#/components/schemas/ApiID'
4359343597
type: object
43598+
UpdateOutcomesAsyncAttributes:
43599+
description: The JSON:API attributes for a batched set of scorecard outcomes.
43600+
properties:
43601+
results:
43602+
description: Set of scorecard outcomes to update asynchronously.
43603+
items:
43604+
$ref: '#/components/schemas/UpdateOutcomesAsyncRequestItem'
43605+
type: array
43606+
type: object
43607+
UpdateOutcomesAsyncRequest:
43608+
description: Scorecard outcomes batch request.
43609+
properties:
43610+
data:
43611+
$ref: '#/components/schemas/UpdateOutcomesAsyncRequestData'
43612+
type: object
43613+
UpdateOutcomesAsyncRequestData:
43614+
description: Scorecard outcomes batch request data.
43615+
properties:
43616+
attributes:
43617+
$ref: '#/components/schemas/UpdateOutcomesAsyncAttributes'
43618+
type:
43619+
$ref: '#/components/schemas/UpdateOutcomesAsyncType'
43620+
type: object
43621+
UpdateOutcomesAsyncRequestItem:
43622+
description: Scorecard outcome for a single entity and rule.
43623+
properties:
43624+
entity_reference:
43625+
$ref: '#/components/schemas/EntityReference'
43626+
remarks:
43627+
description: Any remarks regarding the scorecard rule's evaluation, and
43628+
supports HTML hyperlinks.
43629+
example: 'See: <a href="https://app.datadoghq.com/services">Services</a>'
43630+
type: string
43631+
rule_id:
43632+
$ref: '#/components/schemas/RuleId'
43633+
state:
43634+
$ref: '#/components/schemas/State'
43635+
required:
43636+
- rule_id
43637+
- entity_reference
43638+
- state
43639+
type: object
43640+
UpdateOutcomesAsyncType:
43641+
default: batched-outcome
43642+
description: The JSON:API type for scorecard outcomes.
43643+
enum:
43644+
- batched-outcome
43645+
example: batched-outcome
43646+
type: string
43647+
x-enum-varnames:
43648+
- BATCHED_OUTCOME
4359443649
UpdateResourceEvaluationFiltersRequest:
4359543650
description: Request object to update a resource filter.
4359643651
properties:
@@ -61575,6 +61630,37 @@ paths:
6157561630
resultsPath: data
6157661631
x-unstable: '**Note**: This endpoint is in public beta.
6157761632

61633+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
61634+
post:
61635+
description: Updates multiple scorecard rule outcomes in a single batched request.
61636+
operationId: UpdateScorecardOutcomesAsync
61637+
requestBody:
61638+
content:
61639+
application/json:
61640+
schema:
61641+
$ref: '#/components/schemas/UpdateOutcomesAsyncRequest'
61642+
description: Set of scorecard outcomes.
61643+
required: true
61644+
responses:
61645+
'202':
61646+
description: Accepted
61647+
'400':
61648+
$ref: '#/components/responses/BadRequestResponse'
61649+
'403':
61650+
$ref: '#/components/responses/ForbiddenResponse'
61651+
'429':
61652+
$ref: '#/components/responses/TooManyRequestsResponse'
61653+
security:
61654+
- apiKeyAuth: []
61655+
appKeyAuth: []
61656+
- AuthZ:
61657+
- apm_service_catalog_write
61658+
summary: Update Scorecard outcomes asynchronously
61659+
tags:
61660+
- Service Scorecards
61661+
x-codegen-request-body-name: body
61662+
x-unstable: '**Note**: This endpoint is in public beta.
61663+
6157861664
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
6157961665
/api/v2/scorecard/outcomes/batch:
6158061666
post:

docs/datadog_api_client.v2.model.rst

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19394,6 +19394,41 @@ datadog\_api\_client.v2.model.update\_open\_api\_response\_data module
1939419394
:members:
1939519395
:show-inheritance:
1939619396

19397+
datadog\_api\_client.v2.model.update\_outcomes\_async\_attributes module
19398+
------------------------------------------------------------------------
19399+
19400+
.. automodule:: datadog_api_client.v2.model.update_outcomes_async_attributes
19401+
:members:
19402+
:show-inheritance:
19403+
19404+
datadog\_api\_client.v2.model.update\_outcomes\_async\_request module
19405+
---------------------------------------------------------------------
19406+
19407+
.. automodule:: datadog_api_client.v2.model.update_outcomes_async_request
19408+
:members:
19409+
:show-inheritance:
19410+
19411+
datadog\_api\_client.v2.model.update\_outcomes\_async\_request\_data module
19412+
---------------------------------------------------------------------------
19413+
19414+
.. automodule:: datadog_api_client.v2.model.update_outcomes_async_request_data
19415+
:members:
19416+
:show-inheritance:
19417+
19418+
datadog\_api\_client.v2.model.update\_outcomes\_async\_request\_item module
19419+
---------------------------------------------------------------------------
19420+
19421+
.. automodule:: datadog_api_client.v2.model.update_outcomes_async_request_item
19422+
:members:
19423+
:show-inheritance:
19424+
19425+
datadog\_api\_client.v2.model.update\_outcomes\_async\_type module
19426+
------------------------------------------------------------------
19427+
19428+
.. automodule:: datadog_api_client.v2.model.update_outcomes_async_type
19429+
:members:
19430+
:show-inheritance:
19431+
1939719432
datadog\_api\_client.v2.model.update\_resource\_evaluation\_filters\_request module
1939819433
-----------------------------------------------------------------------------------
1939919434

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
"""
2+
Update Scorecard outcomes asynchronously returns "Accepted" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.service_scorecards_api import ServiceScorecardsApi
7+
from datadog_api_client.v2.model.state import State
8+
from datadog_api_client.v2.model.update_outcomes_async_attributes import UpdateOutcomesAsyncAttributes
9+
from datadog_api_client.v2.model.update_outcomes_async_request import UpdateOutcomesAsyncRequest
10+
from datadog_api_client.v2.model.update_outcomes_async_request_data import UpdateOutcomesAsyncRequestData
11+
from datadog_api_client.v2.model.update_outcomes_async_request_item import UpdateOutcomesAsyncRequestItem
12+
from datadog_api_client.v2.model.update_outcomes_async_type import UpdateOutcomesAsyncType
13+
14+
body = UpdateOutcomesAsyncRequest(
15+
data=UpdateOutcomesAsyncRequestData(
16+
attributes=UpdateOutcomesAsyncAttributes(
17+
results=[
18+
UpdateOutcomesAsyncRequestItem(
19+
entity_reference="service:my-service",
20+
remarks='See: <a href="https://app.datadoghq.com/services">Services</a>',
21+
rule_id="q8MQxk8TCqrHnWkx",
22+
state=State.PASS,
23+
),
24+
],
25+
),
26+
type=UpdateOutcomesAsyncType.BATCHED_OUTCOME,
27+
),
28+
)
29+
30+
configuration = Configuration()
31+
configuration.unstable_operations["update_scorecard_outcomes_async"] = True
32+
with ApiClient(configuration) as api_client:
33+
api_instance = ServiceScorecardsApi(api_client)
34+
api_instance.update_scorecard_outcomes_async(body=body)

src/datadog_api_client/configuration.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,7 @@ def __init__(
312312
"v2.delete_scorecard_rule": False,
313313
"v2.list_scorecard_outcomes": False,
314314
"v2.list_scorecard_rules": False,
315+
"v2.update_scorecard_outcomes_async": False,
315316
"v2.update_scorecard_rule": False,
316317
"v2.create_incident_service": False,
317318
"v2.delete_incident_service": False,

src/datadog_api_client/v2/api/service_scorecards_api.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
)
1717
from datadog_api_client.v2.model.outcomes_response import OutcomesResponse
1818
from datadog_api_client.v2.model.outcomes_response_data_item import OutcomesResponseDataItem
19+
from datadog_api_client.v2.model.update_outcomes_async_request import UpdateOutcomesAsyncRequest
1920
from datadog_api_client.v2.model.outcomes_batch_response import OutcomesBatchResponse
2021
from datadog_api_client.v2.model.outcomes_batch_request import OutcomesBatchRequest
2122
from datadog_api_client.v2.model.list_rules_response import ListRulesResponse
@@ -235,6 +236,26 @@ def __init__(self, api_client=None):
235236
api_client=api_client,
236237
)
237238

239+
self._update_scorecard_outcomes_async_endpoint = _Endpoint(
240+
settings={
241+
"response_type": None,
242+
"auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"],
243+
"endpoint_path": "/api/v2/scorecard/outcomes",
244+
"operation_id": "update_scorecard_outcomes_async",
245+
"http_method": "POST",
246+
"version": "v2",
247+
},
248+
params_map={
249+
"body": {
250+
"required": True,
251+
"openapi_types": (UpdateOutcomesAsyncRequest,),
252+
"location": "body",
253+
},
254+
},
255+
headers_map={"accept": ["*/*"], "content_type": ["application/json"]},
256+
api_client=api_client,
257+
)
258+
238259
self._update_scorecard_rule_endpoint = _Endpoint(
239260
settings={
240261
"response_type": (UpdateRuleResponse,),
@@ -628,6 +649,23 @@ def list_scorecard_rules_with_pagination(
628649
}
629650
return endpoint.call_with_http_info_paginated(pagination)
630651

652+
def update_scorecard_outcomes_async(
653+
self,
654+
body: UpdateOutcomesAsyncRequest,
655+
) -> None:
656+
"""Update Scorecard outcomes asynchronously.
657+
658+
Updates multiple scorecard rule outcomes in a single batched request.
659+
660+
:param body: Set of scorecard outcomes.
661+
:type body: UpdateOutcomesAsyncRequest
662+
:rtype: None
663+
"""
664+
kwargs: Dict[str, Any] = {}
665+
kwargs["body"] = body
666+
667+
return self._update_scorecard_outcomes_async_endpoint.call_with_http_info(**kwargs)
668+
631669
def update_scorecard_rule(
632670
self,
633671
rule_id: str,
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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, TYPE_CHECKING
7+
8+
from datadog_api_client.model_utils import (
9+
ModelNormal,
10+
cached_property,
11+
unset,
12+
UnsetType,
13+
)
14+
15+
16+
if TYPE_CHECKING:
17+
from datadog_api_client.v2.model.update_outcomes_async_request_item import UpdateOutcomesAsyncRequestItem
18+
19+
20+
class UpdateOutcomesAsyncAttributes(ModelNormal):
21+
@cached_property
22+
def openapi_types(_):
23+
from datadog_api_client.v2.model.update_outcomes_async_request_item import UpdateOutcomesAsyncRequestItem
24+
25+
return {
26+
"results": ([UpdateOutcomesAsyncRequestItem],),
27+
}
28+
29+
attribute_map = {
30+
"results": "results",
31+
}
32+
33+
def __init__(self_, results: Union[List[UpdateOutcomesAsyncRequestItem], UnsetType] = unset, **kwargs):
34+
"""
35+
The JSON:API attributes for a batched set of scorecard outcomes.
36+
37+
:param results: Set of scorecard outcomes to update asynchronously.
38+
:type results: [UpdateOutcomesAsyncRequestItem], optional
39+
"""
40+
if results is not unset:
41+
kwargs["results"] = results
42+
super().__init__(kwargs)
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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 Union, TYPE_CHECKING
7+
8+
from datadog_api_client.model_utils import (
9+
ModelNormal,
10+
cached_property,
11+
unset,
12+
UnsetType,
13+
)
14+
15+
16+
if TYPE_CHECKING:
17+
from datadog_api_client.v2.model.update_outcomes_async_request_data import UpdateOutcomesAsyncRequestData
18+
19+
20+
class UpdateOutcomesAsyncRequest(ModelNormal):
21+
@cached_property
22+
def openapi_types(_):
23+
from datadog_api_client.v2.model.update_outcomes_async_request_data import UpdateOutcomesAsyncRequestData
24+
25+
return {
26+
"data": (UpdateOutcomesAsyncRequestData,),
27+
}
28+
29+
attribute_map = {
30+
"data": "data",
31+
}
32+
33+
def __init__(self_, data: Union[UpdateOutcomesAsyncRequestData, UnsetType] = unset, **kwargs):
34+
"""
35+
Scorecard outcomes batch request.
36+
37+
:param data: Scorecard outcomes batch request data.
38+
:type data: UpdateOutcomesAsyncRequestData, optional
39+
"""
40+
if data is not unset:
41+
kwargs["data"] = data
42+
super().__init__(kwargs)

0 commit comments

Comments
 (0)