Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 115 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45948,6 +45948,90 @@ components:
- id
- type
type: object
OCIConfig:
description: OCI config.
properties:
attributes:
$ref: "#/components/schemas/OCIConfigAttributes"
id:
description: The ID of the OCI config.
example: "1"
type: string
type:
$ref: "#/components/schemas/OCIConfigType"
required:
- attributes
- id
- type
type: object
OCIConfigAttributes:
description: Attributes for an OCI config.
properties:
account_id:
description: The OCID of the OCI tenancy.
example: "ocid1.tenancy.oc1..example"
type: string
created_at:
description: The timestamp when the OCI config was created.
example: "2026-01-01T12:00:00Z"
type: string
error_messages:
description: The error messages for the OCI config.
items:
description: An error message string.
type: string
nullable: true
type: array
status:
description: The status of the OCI config.
example: "active"
type: string
status_updated_at:
description: The timestamp when the OCI config status was last updated.
example: "2026-01-01T12:00:00Z"
type: string
updated_at:
description: The timestamp when the OCI config was last updated.
example: "2026-01-01T12:00:00Z"
type: string
required:
- account_id
- created_at
- status
- status_updated_at
- updated_at
type: object
OCIConfigType:
default: oci_config
description: Type of OCI config.
enum:
- oci_config
example: oci_config
type: string
x-enum-varnames:
- OCI_CONFIG
OCIConfigsResponse:
description: List of OCI configs.
example:
data:
- attributes:
account_id: "ocid1.tenancy.oc1..example"
created_at: "2026-01-01T12:00:00Z"
error_messages: []
status: active
status_updated_at: "2026-01-01T12:00:00Z"
updated_at: "2026-01-01T12:00:00Z"
id: "1"
type: oci_config
properties:
data:
description: An OCI config.
items:
$ref: "#/components/schemas/OCIConfig"
type: array
required:
- data
type: object
ObservabilityPipeline:
description: Top-level schema representing a pipeline.
properties:
Expand Down Expand Up @@ -93443,6 +93527,37 @@ paths:
operator: OR
permissions:
- cloud_cost_management_write
/api/v2/cost/oci_config:
get:
description: List the OCI configs.
operationId: ListCostOCIConfigs
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/OCIConfigsResponse"
description: OK
"403":
content:
application/json:
schema:
$ref: "#/components/schemas/APIErrorResponse"
description: Forbidden
"429":
$ref: "#/components/responses/TooManyRequestsResponse"
security:
- apiKeyAuth: []
appKeyAuth: []
- AuthZ:
- cloud_cost_management_read
summary: List Cloud Cost Management OCI configs
tags:
- Cloud Cost Management
"x-permission":
operator: OR
permissions:
- cloud_cost_management_read
/api/v2/cost_by_tag/active_billing_dimensions:
get:
description: |-
Expand Down
28 changes: 28 additions & 0 deletions docs/datadog_api_client.v2.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22180,6 +22180,34 @@ datadog\_api\_client.v2.model.observability\_pipeline\_tls module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.oci\_config module
------------------------------------------------

.. automodule:: datadog_api_client.v2.model.oci_config
:members:
:show-inheritance:

datadog\_api\_client.v2.model.oci\_config\_attributes module
------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.oci_config_attributes
:members:
:show-inheritance:

datadog\_api\_client.v2.model.oci\_config\_type module
------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.oci_config_type
:members:
:show-inheritance:

datadog\_api\_client.v2.model.oci\_configs\_response module
-----------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.oci_configs_response
:members:
:show-inheritance:

datadog\_api\_client.v2.model.okta\_account module
--------------------------------------------------

Expand Down
13 changes: 13 additions & 0 deletions examples/v2/cloud-cost-management/ListCostOCIConfigs.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
"""
List Cloud Cost Management OCI configs returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.cloud_cost_management_api import CloudCostManagementApi

configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = CloudCostManagementApi(api_client)
response = api_instance.list_cost_oci_configs()

print(response)
29 changes: 29 additions & 0 deletions src/datadog_api_client/v2/api/cloud_cost_management_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
from datadog_api_client.v2.model.gcp_usage_cost_config_post_request import GCPUsageCostConfigPostRequest
from datadog_api_client.v2.model.gcp_uc_config_response import GcpUcConfigResponse
from datadog_api_client.v2.model.gcp_usage_cost_config_patch_request import GCPUsageCostConfigPatchRequest
from datadog_api_client.v2.model.oci_configs_response import OCIConfigsResponse
from datadog_api_client.v2.model.ruleset_resp_array import RulesetRespArray
from datadog_api_client.v2.model.ruleset_resp import RulesetResp
from datadog_api_client.v2.model.create_ruleset_request import CreateRulesetRequest
Expand Down Expand Up @@ -543,6 +544,22 @@ def __init__(self, api_client=None):
api_client=api_client,
)

self._list_cost_oci_configs_endpoint = _Endpoint(
settings={
"response_type": (OCIConfigsResponse,),
"auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"],
"endpoint_path": "/api/v2/cost/oci_config",
"operation_id": "list_cost_oci_configs",
"http_method": "GET",
"version": "v2",
},
params_map={},
headers_map={
"accept": ["application/json"],
},
api_client=api_client,
)

self._list_custom_allocation_rules_endpoint = _Endpoint(
settings={
"response_type": (ArbitraryRuleResponseArray,),
Expand Down Expand Up @@ -1270,6 +1287,18 @@ def list_cost_gcp_usage_cost_configs(
kwargs: Dict[str, Any] = {}
return self._list_cost_gcp_usage_cost_configs_endpoint.call_with_http_info(**kwargs)

def list_cost_oci_configs(
self,
) -> OCIConfigsResponse:
"""List Cloud Cost Management OCI configs.

List the OCI configs.

:rtype: OCIConfigsResponse
"""
kwargs: Dict[str, Any] = {}
return self._list_cost_oci_configs_endpoint.call_with_http_info(**kwargs)

def list_custom_allocation_rules(
self,
) -> ArbitraryRuleResponseArray:
Expand Down
54 changes: 54 additions & 0 deletions src/datadog_api_client/v2/model/oci_config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2019-Present Datadog, Inc.
from __future__ import annotations

from typing import TYPE_CHECKING

from datadog_api_client.model_utils import (
ModelNormal,
cached_property,
)


if TYPE_CHECKING:
from datadog_api_client.v2.model.oci_config_attributes import OCIConfigAttributes
from datadog_api_client.v2.model.oci_config_type import OCIConfigType


class OCIConfig(ModelNormal):
@cached_property
def openapi_types(_):
from datadog_api_client.v2.model.oci_config_attributes import OCIConfigAttributes
from datadog_api_client.v2.model.oci_config_type import OCIConfigType

return {
"attributes": (OCIConfigAttributes,),
"id": (str,),
"type": (OCIConfigType,),
}

attribute_map = {
"attributes": "attributes",
"id": "id",
"type": "type",
}

def __init__(self_, attributes: OCIConfigAttributes, id: str, type: OCIConfigType, **kwargs):
"""
OCI config.

:param attributes: Attributes for an OCI config.
:type attributes: OCIConfigAttributes

:param id: The ID of the OCI config.
:type id: str

:param type: Type of OCI config.
:type type: OCIConfigType
"""
super().__init__(kwargs)

self_.attributes = attributes
self_.id = id
self_.type = type
77 changes: 77 additions & 0 deletions src/datadog_api_client/v2/model/oci_config_attributes.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2019-Present Datadog, Inc.
from __future__ import annotations

from typing import List, Union

from datadog_api_client.model_utils import (
ModelNormal,
cached_property,
none_type,
unset,
UnsetType,
)


class OCIConfigAttributes(ModelNormal):
@cached_property
def openapi_types(_):
return {
"account_id": (str,),
"created_at": (str,),
"error_messages": ([str], none_type),
"status": (str,),
"status_updated_at": (str,),
"updated_at": (str,),
}

attribute_map = {
"account_id": "account_id",
"created_at": "created_at",
"error_messages": "error_messages",
"status": "status",
"status_updated_at": "status_updated_at",
"updated_at": "updated_at",
}

def __init__(
self_,
account_id: str,
created_at: str,
status: str,
status_updated_at: str,
updated_at: str,
error_messages: Union[List[str], none_type, UnsetType] = unset,
**kwargs,
):
"""
Attributes for an OCI config.

:param account_id: The OCID of the OCI tenancy.
:type account_id: str

:param created_at: The timestamp when the OCI config was created.
:type created_at: str

:param error_messages: The error messages for the OCI config.
:type error_messages: [str], none_type, optional

:param status: The status of the OCI config.
:type status: str

:param status_updated_at: The timestamp when the OCI config status was last updated.
:type status_updated_at: str

:param updated_at: The timestamp when the OCI config was last updated.
:type updated_at: str
"""
if error_messages is not unset:
kwargs["error_messages"] = error_messages
super().__init__(kwargs)

self_.account_id = account_id
self_.created_at = created_at
self_.status = status
self_.status_updated_at = status_updated_at
self_.updated_at = updated_at
35 changes: 35 additions & 0 deletions src/datadog_api_client/v2/model/oci_config_type.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2019-Present Datadog, Inc.
from __future__ import annotations


from datadog_api_client.model_utils import (
ModelSimple,
cached_property,
)

from typing import ClassVar


class OCIConfigType(ModelSimple):
"""
Type of OCI config.

:param value: If omitted defaults to "oci_config". Must be one of ["oci_config"].
:type value: str
"""

allowed_values = {
"oci_config",
}
OCI_CONFIG: ClassVar["OCIConfigType"]

@cached_property
def openapi_types(_):
return {
"value": (str,),
}


OCIConfigType.OCI_CONFIG = OCIConfigType("oci_config")
Loading
Loading