Skip to content

Commit eee43cc

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 9f90cd6 of spec repo
1 parent c2a5dd9 commit eee43cc

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": "4413e63",
3-
"generated": "2025-08-19 20:28:38.330"
2+
"spec_repo_commit": "9f90cd6",
3+
"generated": "2025-08-20 17:02:30.401"
44
}

.generator/schemas/v2/openapi.yaml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14453,6 +14453,10 @@ components:
1445314453
description: Entity definition in raw JSON or YAML representation.
1445414454
example: "apiVersion: v3\nkind: service\nmetadata:\n name: myservice\n"
1445514455
type: string
14456+
EntityReference:
14457+
description: The unique reference for an IDP entity.
14458+
example: service:my-service
14459+
type: string
1445614460
EntityRelationships:
1445714461
description: Entity relationships.
1445814462
properties:
@@ -43724,6 +43728,57 @@ components:
4372443728
id:
4372543729
$ref: '#/components/schemas/ApiID'
4372643730
type: object
43731+
UpdateOutcomesAsyncAttributes:
43732+
description: The JSON:API attributes for a batched set of scorecard outcomes.
43733+
properties:
43734+
results:
43735+
description: Set of scorecard outcomes to update asynchronously.
43736+
items:
43737+
$ref: '#/components/schemas/UpdateOutcomesAsyncRequestItem'
43738+
type: array
43739+
type: object
43740+
UpdateOutcomesAsyncRequest:
43741+
description: Scorecard outcomes batch request.
43742+
properties:
43743+
data:
43744+
$ref: '#/components/schemas/UpdateOutcomesAsyncRequestData'
43745+
type: object
43746+
UpdateOutcomesAsyncRequestData:
43747+
description: Scorecard outcomes batch request data.
43748+
properties:
43749+
attributes:
43750+
$ref: '#/components/schemas/UpdateOutcomesAsyncAttributes'
43751+
type:
43752+
$ref: '#/components/schemas/UpdateOutcomesAsyncType'
43753+
type: object
43754+
UpdateOutcomesAsyncRequestItem:
43755+
description: Scorecard outcome for a single entity and rule.
43756+
properties:
43757+
entity_reference:
43758+
$ref: '#/components/schemas/EntityReference'
43759+
remarks:
43760+
description: Any remarks regarding the scorecard rule's evaluation. Supports
43761+
HTML hyperlinks.
43762+
example: 'See: <a href="https://app.datadoghq.com/services">Services</a>'
43763+
type: string
43764+
rule_id:
43765+
$ref: '#/components/schemas/RuleId'
43766+
state:
43767+
$ref: '#/components/schemas/State'
43768+
required:
43769+
- rule_id
43770+
- entity_reference
43771+
- state
43772+
type: object
43773+
UpdateOutcomesAsyncType:
43774+
default: batched-outcome
43775+
description: The JSON:API type for scorecard outcomes.
43776+
enum:
43777+
- batched-outcome
43778+
example: batched-outcome
43779+
type: string
43780+
x-enum-varnames:
43781+
- BATCHED_OUTCOME
4372743782
UpdateResourceEvaluationFiltersRequest:
4372843783
description: Request object to update a resource filter.
4372943784
properties:
@@ -61757,6 +61812,37 @@ paths:
6175761812
resultsPath: data
6175861813
x-unstable: '**Note**: This endpoint is in public beta.
6175961814

61815+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
61816+
post:
61817+
description: Updates multiple scorecard rule outcomes in a single batched request.
61818+
operationId: UpdateScorecardOutcomesAsync
61819+
requestBody:
61820+
content:
61821+
application/json:
61822+
schema:
61823+
$ref: '#/components/schemas/UpdateOutcomesAsyncRequest'
61824+
description: Set of scorecard outcomes.
61825+
required: true
61826+
responses:
61827+
'202':
61828+
description: Accepted
61829+
'400':
61830+
$ref: '#/components/responses/BadRequestResponse'
61831+
'403':
61832+
$ref: '#/components/responses/ForbiddenResponse'
61833+
'429':
61834+
$ref: '#/components/responses/TooManyRequestsResponse'
61835+
security:
61836+
- apiKeyAuth: []
61837+
appKeyAuth: []
61838+
- AuthZ:
61839+
- apm_service_catalog_write
61840+
summary: Update Scorecard outcomes asynchronously
61841+
tags:
61842+
- Service Scorecards
61843+
x-codegen-request-body-name: body
61844+
x-unstable: '**Note**: This endpoint is in public beta.
61845+
6176061846
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
6176161847
/api/v2/scorecard/outcomes/batch:
6176261848
post:

docs/datadog_api_client.v2.model.rst

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

19481+
datadog\_api\_client.v2.model.update\_outcomes\_async\_attributes module
19482+
------------------------------------------------------------------------
19483+
19484+
.. automodule:: datadog_api_client.v2.model.update_outcomes_async_attributes
19485+
:members:
19486+
:show-inheritance:
19487+
19488+
datadog\_api\_client.v2.model.update\_outcomes\_async\_request module
19489+
---------------------------------------------------------------------
19490+
19491+
.. automodule:: datadog_api_client.v2.model.update_outcomes_async_request
19492+
:members:
19493+
:show-inheritance:
19494+
19495+
datadog\_api\_client.v2.model.update\_outcomes\_async\_request\_data module
19496+
---------------------------------------------------------------------------
19497+
19498+
.. automodule:: datadog_api_client.v2.model.update_outcomes_async_request_data
19499+
:members:
19500+
:show-inheritance:
19501+
19502+
datadog\_api\_client.v2.model.update\_outcomes\_async\_request\_item module
19503+
---------------------------------------------------------------------------
19504+
19505+
.. automodule:: datadog_api_client.v2.model.update_outcomes_async_request_item
19506+
:members:
19507+
:show-inheritance:
19508+
19509+
datadog\_api\_client.v2.model.update\_outcomes\_async\_type module
19510+
------------------------------------------------------------------
19511+
19512+
.. automodule:: datadog_api_client.v2.model.update_outcomes_async_type
19513+
:members:
19514+
:show-inheritance:
19515+
1948119516
datadog\_api\_client.v2.model.update\_resource\_evaluation\_filters\_request module
1948219517
-----------------------------------------------------------------------------------
1948319518

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)