Skip to content

Commit 2adf98d

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit ecc5b9c of spec repo
1 parent 74e0609 commit 2adf98d

12 files changed

Lines changed: 417 additions & 0 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45735,6 +45735,90 @@ components:
4573545735
- id
4573645736
- type
4573745737
type: object
45738+
OCIConfig:
45739+
description: OCI config.
45740+
properties:
45741+
attributes:
45742+
$ref: "#/components/schemas/OCIConfigAttributes"
45743+
id:
45744+
description: The ID of the OCI config.
45745+
example: "1"
45746+
type: string
45747+
type:
45748+
$ref: "#/components/schemas/OCIConfigType"
45749+
required:
45750+
- attributes
45751+
- id
45752+
- type
45753+
type: object
45754+
OCIConfigAttributes:
45755+
description: Attributes for an OCI config.
45756+
properties:
45757+
account_id:
45758+
description: The OCID of the OCI tenancy.
45759+
example: "ocid1.tenancy.oc1..example"
45760+
type: string
45761+
created_at:
45762+
description: The timestamp when the OCI config was created.
45763+
example: "2026-01-01T12:00:00Z"
45764+
type: string
45765+
error_messages:
45766+
description: The error messages for the OCI config.
45767+
items:
45768+
description: An error message string.
45769+
type: string
45770+
nullable: true
45771+
type: array
45772+
status:
45773+
description: The status of the OCI config.
45774+
example: "active"
45775+
type: string
45776+
status_updated_at:
45777+
description: The timestamp when the OCI config status was last updated.
45778+
example: "2026-01-01T12:00:00Z"
45779+
type: string
45780+
updated_at:
45781+
description: The timestamp when the OCI config was last updated.
45782+
example: "2026-01-01T12:00:00Z"
45783+
type: string
45784+
required:
45785+
- account_id
45786+
- created_at
45787+
- status
45788+
- status_updated_at
45789+
- updated_at
45790+
type: object
45791+
OCIConfigType:
45792+
default: oci_config
45793+
description: Type of OCI config.
45794+
enum:
45795+
- oci_config
45796+
example: oci_config
45797+
type: string
45798+
x-enum-varnames:
45799+
- OCI_CONFIG
45800+
OCIConfigsResponse:
45801+
description: List of OCI configs.
45802+
example:
45803+
data:
45804+
- attributes:
45805+
account_id: "ocid1.tenancy.oc1..example"
45806+
created_at: "2026-01-01T12:00:00Z"
45807+
error_messages: []
45808+
status: active
45809+
status_updated_at: "2026-01-01T12:00:00Z"
45810+
updated_at: "2026-01-01T12:00:00Z"
45811+
id: "1"
45812+
type: oci_config
45813+
properties:
45814+
data:
45815+
description: An OCI config.
45816+
items:
45817+
$ref: "#/components/schemas/OCIConfig"
45818+
type: array
45819+
required:
45820+
- data
45821+
type: object
4573845822
ObservabilityPipeline:
4573945823
description: Top-level schema representing a pipeline.
4574045824
properties:
@@ -93158,6 +93242,40 @@ paths:
9315893242
operator: OR
9315993243
permissions:
9316093244
- cloud_cost_management_write
93245+
/api/v2/cost/oci_config:
93246+
get:
93247+
description: List the OCI configs.
93248+
operationId: ListCostOCIConfigs
93249+
responses:
93250+
"200":
93251+
content:
93252+
application/json:
93253+
schema:
93254+
$ref: "#/components/schemas/OCIConfigsResponse"
93255+
description: OK
93256+
"403":
93257+
content:
93258+
application/json:
93259+
schema:
93260+
$ref: "#/components/schemas/APIErrorResponse"
93261+
description: Forbidden
93262+
"429":
93263+
$ref: "#/components/responses/TooManyRequestsResponse"
93264+
security:
93265+
- apiKeyAuth: []
93266+
appKeyAuth: []
93267+
- AuthZ:
93268+
- cloud_cost_management_read
93269+
summary: List Cloud Cost Management OCI configs
93270+
tags:
93271+
- Cloud Cost Management
93272+
"x-permission":
93273+
operator: OR
93274+
permissions:
93275+
- cloud_cost_management_read
93276+
x-unstable: |-
93277+
**Note**: This endpoint is in preview and is subject to change.
93278+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
9316193279
/api/v2/cost_by_tag/active_billing_dimensions:
9316293280
get:
9316393281
description: |-

docs/datadog_api_client.v2.model.rst

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22117,6 +22117,34 @@ datadog\_api\_client.v2.model.observability\_pipeline\_tls module
2211722117
:members:
2211822118
:show-inheritance:
2211922119

22120+
datadog\_api\_client.v2.model.oci\_config module
22121+
------------------------------------------------
22122+
22123+
.. automodule:: datadog_api_client.v2.model.oci_config
22124+
:members:
22125+
:show-inheritance:
22126+
22127+
datadog\_api\_client.v2.model.oci\_config\_attributes module
22128+
------------------------------------------------------------
22129+
22130+
.. automodule:: datadog_api_client.v2.model.oci_config_attributes
22131+
:members:
22132+
:show-inheritance:
22133+
22134+
datadog\_api\_client.v2.model.oci\_config\_type module
22135+
------------------------------------------------------
22136+
22137+
.. automodule:: datadog_api_client.v2.model.oci_config_type
22138+
:members:
22139+
:show-inheritance:
22140+
22141+
datadog\_api\_client.v2.model.oci\_configs\_response module
22142+
-----------------------------------------------------------
22143+
22144+
.. automodule:: datadog_api_client.v2.model.oci_configs_response
22145+
:members:
22146+
:show-inheritance:
22147+
2212022148
datadog\_api\_client.v2.model.okta\_account module
2212122149
--------------------------------------------------
2212222150

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
"""
2+
List Cloud Cost Management OCI configs returns "OK" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.cloud_cost_management_api import CloudCostManagementApi
7+
8+
configuration = Configuration()
9+
configuration.unstable_operations["list_cost_oci_configs"] = True
10+
with ApiClient(configuration) as api_client:
11+
api_instance = CloudCostManagementApi(api_client)
12+
response = api_instance.list_cost_oci_configs()
13+
14+
print(response)

src/datadog_api_client/configuration.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,7 @@ def __init__(
357357
"v2.search_security_monitoring_histsignals": False,
358358
"v2.get_code_coverage_branch_summary": False,
359359
"v2.get_code_coverage_commit_summary": False,
360+
"v2.list_cost_oci_configs": False,
360361
"v2.create_dashboard_secure_embed": False,
361362
"v2.delete_dashboard_secure_embed": False,
362363
"v2.get_dashboard_secure_embed": False,

src/datadog_api_client/v2/api/cloud_cost_management_api.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
from datadog_api_client.v2.model.gcp_usage_cost_config_post_request import GCPUsageCostConfigPostRequest
3939
from datadog_api_client.v2.model.gcp_uc_config_response import GcpUcConfigResponse
4040
from datadog_api_client.v2.model.gcp_usage_cost_config_patch_request import GCPUsageCostConfigPatchRequest
41+
from datadog_api_client.v2.model.oci_configs_response import OCIConfigsResponse
4142
from datadog_api_client.v2.model.ruleset_resp_array import RulesetRespArray
4243
from datadog_api_client.v2.model.ruleset_resp import RulesetResp
4344
from datadog_api_client.v2.model.create_ruleset_request import CreateRulesetRequest
@@ -543,6 +544,22 @@ def __init__(self, api_client=None):
543544
api_client=api_client,
544545
)
545546

547+
self._list_cost_oci_configs_endpoint = _Endpoint(
548+
settings={
549+
"response_type": (OCIConfigsResponse,),
550+
"auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"],
551+
"endpoint_path": "/api/v2/cost/oci_config",
552+
"operation_id": "list_cost_oci_configs",
553+
"http_method": "GET",
554+
"version": "v2",
555+
},
556+
params_map={},
557+
headers_map={
558+
"accept": ["application/json"],
559+
},
560+
api_client=api_client,
561+
)
562+
546563
self._list_custom_allocation_rules_endpoint = _Endpoint(
547564
settings={
548565
"response_type": (ArbitraryRuleResponseArray,),
@@ -1270,6 +1287,18 @@ def list_cost_gcp_usage_cost_configs(
12701287
kwargs: Dict[str, Any] = {}
12711288
return self._list_cost_gcp_usage_cost_configs_endpoint.call_with_http_info(**kwargs)
12721289

1290+
def list_cost_oci_configs(
1291+
self,
1292+
) -> OCIConfigsResponse:
1293+
"""List Cloud Cost Management OCI configs.
1294+
1295+
List the OCI configs.
1296+
1297+
:rtype: OCIConfigsResponse
1298+
"""
1299+
kwargs: Dict[str, Any] = {}
1300+
return self._list_cost_oci_configs_endpoint.call_with_http_info(**kwargs)
1301+
12731302
def list_custom_allocation_rules(
12741303
self,
12751304
) -> ArbitraryRuleResponseArray:
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
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 TYPE_CHECKING
7+
8+
from datadog_api_client.model_utils import (
9+
ModelNormal,
10+
cached_property,
11+
)
12+
13+
14+
if TYPE_CHECKING:
15+
from datadog_api_client.v2.model.oci_config_attributes import OCIConfigAttributes
16+
from datadog_api_client.v2.model.oci_config_type import OCIConfigType
17+
18+
19+
class OCIConfig(ModelNormal):
20+
@cached_property
21+
def openapi_types(_):
22+
from datadog_api_client.v2.model.oci_config_attributes import OCIConfigAttributes
23+
from datadog_api_client.v2.model.oci_config_type import OCIConfigType
24+
25+
return {
26+
"attributes": (OCIConfigAttributes,),
27+
"id": (str,),
28+
"type": (OCIConfigType,),
29+
}
30+
31+
attribute_map = {
32+
"attributes": "attributes",
33+
"id": "id",
34+
"type": "type",
35+
}
36+
37+
def __init__(self_, attributes: OCIConfigAttributes, id: str, type: OCIConfigType, **kwargs):
38+
"""
39+
OCI config.
40+
41+
:param attributes: Attributes for an OCI config.
42+
:type attributes: OCIConfigAttributes
43+
44+
:param id: The ID of the OCI config.
45+
:type id: str
46+
47+
:param type: Type of OCI config.
48+
:type type: OCIConfigType
49+
"""
50+
super().__init__(kwargs)
51+
52+
self_.attributes = attributes
53+
self_.id = id
54+
self_.type = type
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
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
7+
8+
from datadog_api_client.model_utils import (
9+
ModelNormal,
10+
cached_property,
11+
none_type,
12+
unset,
13+
UnsetType,
14+
)
15+
16+
17+
class OCIConfigAttributes(ModelNormal):
18+
@cached_property
19+
def openapi_types(_):
20+
return {
21+
"account_id": (str,),
22+
"created_at": (str,),
23+
"error_messages": ([str], none_type),
24+
"status": (str,),
25+
"status_updated_at": (str,),
26+
"updated_at": (str,),
27+
}
28+
29+
attribute_map = {
30+
"account_id": "account_id",
31+
"created_at": "created_at",
32+
"error_messages": "error_messages",
33+
"status": "status",
34+
"status_updated_at": "status_updated_at",
35+
"updated_at": "updated_at",
36+
}
37+
38+
def __init__(
39+
self_,
40+
account_id: str,
41+
created_at: str,
42+
status: str,
43+
status_updated_at: str,
44+
updated_at: str,
45+
error_messages: Union[List[str], none_type, UnsetType] = unset,
46+
**kwargs,
47+
):
48+
"""
49+
Attributes for an OCI config.
50+
51+
:param account_id: The OCID of the OCI tenancy.
52+
:type account_id: str
53+
54+
:param created_at: The timestamp when the OCI config was created.
55+
:type created_at: str
56+
57+
:param error_messages: The error messages for the OCI config.
58+
:type error_messages: [str], none_type, optional
59+
60+
:param status: The status of the OCI config.
61+
:type status: str
62+
63+
:param status_updated_at: The timestamp when the OCI config status was last updated.
64+
:type status_updated_at: str
65+
66+
:param updated_at: The timestamp when the OCI config was last updated.
67+
:type updated_at: str
68+
"""
69+
if error_messages is not unset:
70+
kwargs["error_messages"] = error_messages
71+
super().__init__(kwargs)
72+
73+
self_.account_id = account_id
74+
self_.created_at = created_at
75+
self_.status = status
76+
self_.status_updated_at = status_updated_at
77+
self_.updated_at = updated_at

0 commit comments

Comments
 (0)