Skip to content

Commit 7c56b8d

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit cf78334 of spec repo
1 parent f9ba1f2 commit 7c56b8d

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": "d02c8a3",
3-
"generated": "2025-08-08 12:07:20.979"
2+
"spec_repo_commit": "cf78334",
3+
"generated": "2025-08-12 18:25:19.397"
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:
@@ -43034,6 +43038,57 @@ components:
4303443038
id:
4303543039
$ref: '#/components/schemas/ApiID'
4303643040
type: object
43041+
UpdateOutcomesAsyncAttributes:
43042+
description: The JSON:API attributes for a batched set of scorecard outcomes.
43043+
properties:
43044+
results:
43045+
description: Set of scorecard outcomes to update asynchronously.
43046+
items:
43047+
$ref: '#/components/schemas/UpdateOutcomesAsyncRequestItem'
43048+
type: array
43049+
type: object
43050+
UpdateOutcomesAsyncRequest:
43051+
description: Scorecard outcomes batch request.
43052+
properties:
43053+
data:
43054+
$ref: '#/components/schemas/UpdateOutcomesAsyncRequestData'
43055+
type: object
43056+
UpdateOutcomesAsyncRequestData:
43057+
description: Scorecard outcomes batch request data.
43058+
properties:
43059+
attributes:
43060+
$ref: '#/components/schemas/UpdateOutcomesAsyncAttributes'
43061+
type:
43062+
$ref: '#/components/schemas/UpdateOutcomesAsyncType'
43063+
type: object
43064+
UpdateOutcomesAsyncRequestItem:
43065+
description: Scorecard outcome for a single entity and rule.
43066+
properties:
43067+
entity_reference:
43068+
$ref: '#/components/schemas/EntityReference'
43069+
remarks:
43070+
description: Any remarks regarding the scorecard rule's evaluation, and
43071+
supports HTML hyperlinks.
43072+
example: 'See: <a href="https://app.datadoghq.com/services">Services</a>'
43073+
type: string
43074+
rule_id:
43075+
$ref: '#/components/schemas/RuleId'
43076+
state:
43077+
$ref: '#/components/schemas/State'
43078+
required:
43079+
- rule_id
43080+
- entity_reference
43081+
- state
43082+
type: object
43083+
UpdateOutcomesAsyncType:
43084+
default: batched-outcome
43085+
description: The JSON:API type for scorecard outcomes.
43086+
enum:
43087+
- batched-outcome
43088+
example: batched-outcome
43089+
type: string
43090+
x-enum-varnames:
43091+
- BATCHED_OUTCOME
4303743092
UpdateResourceEvaluationFiltersRequest:
4303843093
description: Request object to update a resource filter.
4303943094
properties:
@@ -61018,6 +61073,37 @@ paths:
6101861073
resultsPath: data
6101961074
x-unstable: '**Note**: This endpoint is in public beta.
6102061075

61076+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
61077+
post:
61078+
description: Updates multiple scorecard rule outcomes in a single batched request.
61079+
operationId: UpdateScorecardOutcomesAsync
61080+
requestBody:
61081+
content:
61082+
application/json:
61083+
schema:
61084+
$ref: '#/components/schemas/UpdateOutcomesAsyncRequest'
61085+
description: Set of scorecard outcomes.
61086+
required: true
61087+
responses:
61088+
'202':
61089+
description: Accepted
61090+
'400':
61091+
$ref: '#/components/responses/BadRequestResponse'
61092+
'403':
61093+
$ref: '#/components/responses/ForbiddenResponse'
61094+
'429':
61095+
$ref: '#/components/responses/TooManyRequestsResponse'
61096+
security:
61097+
- apiKeyAuth: []
61098+
appKeyAuth: []
61099+
- AuthZ:
61100+
- apm_service_catalog_write
61101+
summary: Update Scorecard outcomes asynchronously
61102+
tags:
61103+
- Service Scorecards
61104+
x-codegen-request-body-name: body
61105+
x-unstable: '**Note**: This endpoint is in public beta.
61106+
6102161107
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
6102261108
/api/v2/scorecard/outcomes/batch:
6102361109
post:

docs/datadog_api_client.v2.model.rst

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

19124+
datadog\_api\_client.v2.model.update\_outcomes\_async\_attributes module
19125+
------------------------------------------------------------------------
19126+
19127+
.. automodule:: datadog_api_client.v2.model.update_outcomes_async_attributes
19128+
:members:
19129+
:show-inheritance:
19130+
19131+
datadog\_api\_client.v2.model.update\_outcomes\_async\_request module
19132+
---------------------------------------------------------------------
19133+
19134+
.. automodule:: datadog_api_client.v2.model.update_outcomes_async_request
19135+
:members:
19136+
:show-inheritance:
19137+
19138+
datadog\_api\_client.v2.model.update\_outcomes\_async\_request\_data module
19139+
---------------------------------------------------------------------------
19140+
19141+
.. automodule:: datadog_api_client.v2.model.update_outcomes_async_request_data
19142+
:members:
19143+
:show-inheritance:
19144+
19145+
datadog\_api\_client.v2.model.update\_outcomes\_async\_request\_item module
19146+
---------------------------------------------------------------------------
19147+
19148+
.. automodule:: datadog_api_client.v2.model.update_outcomes_async_request_item
19149+
:members:
19150+
:show-inheritance:
19151+
19152+
datadog\_api\_client.v2.model.update\_outcomes\_async\_type module
19153+
------------------------------------------------------------------
19154+
19155+
.. automodule:: datadog_api_client.v2.model.update_outcomes_async_type
19156+
:members:
19157+
:show-inheritance:
19158+
1912419159
datadog\_api\_client.v2.model.update\_resource\_evaluation\_filters\_request module
1912519160
-----------------------------------------------------------------------------------
1912619161

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)