Skip to content

Commit bbd0169

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 9e7235f of spec repo
1 parent 22dc9a0 commit bbd0169

10 files changed

Lines changed: 854 additions & 0 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45948,6 +45948,90 @@ components:
4594845948
- id
4594945949
- type
4595045950
type: object
45951+
OCIConfig:
45952+
description: OCI config.
45953+
properties:
45954+
attributes:
45955+
$ref: "#/components/schemas/OCIConfigAttributes"
45956+
id:
45957+
description: The ID of the OCI config.
45958+
example: "1"
45959+
type: string
45960+
type:
45961+
$ref: "#/components/schemas/OCIConfigType"
45962+
required:
45963+
- attributes
45964+
- id
45965+
- type
45966+
type: object
45967+
OCIConfigAttributes:
45968+
description: Attributes for an OCI config.
45969+
properties:
45970+
account_id:
45971+
description: The OCID of the OCI tenancy.
45972+
example: "ocid1.tenancy.oc1..example"
45973+
type: string
45974+
created_at:
45975+
description: The timestamp when the OCI config was created.
45976+
example: "2026-01-01T12:00:00Z"
45977+
type: string
45978+
error_messages:
45979+
description: The error messages for the OCI config.
45980+
items:
45981+
description: An error message string.
45982+
type: string
45983+
nullable: true
45984+
type: array
45985+
status:
45986+
description: The status of the OCI config.
45987+
example: "active"
45988+
type: string
45989+
status_updated_at:
45990+
description: The timestamp when the OCI config status was last updated.
45991+
example: "2026-01-01T12:00:00Z"
45992+
type: string
45993+
updated_at:
45994+
description: The timestamp when the OCI config was last updated.
45995+
example: "2026-01-01T12:00:00Z"
45996+
type: string
45997+
required:
45998+
- account_id
45999+
- created_at
46000+
- status
46001+
- status_updated_at
46002+
- updated_at
46003+
type: object
46004+
OCIConfigType:
46005+
default: oci_config
46006+
description: Type of OCI config.
46007+
enum:
46008+
- oci_config
46009+
example: oci_config
46010+
type: string
46011+
x-enum-varnames:
46012+
- OCI_CONFIG
46013+
OCIConfigsResponse:
46014+
description: List of OCI configs.
46015+
example:
46016+
data:
46017+
- attributes:
46018+
account_id: "ocid1.tenancy.oc1..example"
46019+
created_at: "2026-01-01T12:00:00Z"
46020+
error_messages: []
46021+
status: active
46022+
status_updated_at: "2026-01-01T12:00:00Z"
46023+
updated_at: "2026-01-01T12:00:00Z"
46024+
id: "1"
46025+
type: oci_config
46026+
properties:
46027+
data:
46028+
description: An OCI config.
46029+
items:
46030+
$ref: "#/components/schemas/OCIConfig"
46031+
type: array
46032+
required:
46033+
- data
46034+
type: object
4595146035
ObservabilityPipeline:
4595246036
description: Top-level schema representing a pipeline.
4595346037
properties:
@@ -93443,6 +93527,37 @@ paths:
9344393527
operator: OR
9344493528
permissions:
9344593529
- cloud_cost_management_write
93530+
/api/v2/cost/oci_config:
93531+
get:
93532+
description: List the OCI configs.
93533+
operationId: ListCostOCIConfigs
93534+
responses:
93535+
"200":
93536+
content:
93537+
application/json:
93538+
schema:
93539+
$ref: "#/components/schemas/OCIConfigsResponse"
93540+
description: OK
93541+
"403":
93542+
content:
93543+
application/json:
93544+
schema:
93545+
$ref: "#/components/schemas/APIErrorResponse"
93546+
description: Forbidden
93547+
"429":
93548+
$ref: "#/components/responses/TooManyRequestsResponse"
93549+
security:
93550+
- apiKeyAuth: []
93551+
appKeyAuth: []
93552+
- AuthZ:
93553+
- cloud_cost_management_read
93554+
summary: List Cloud Cost Management OCI configs
93555+
tags:
93556+
- Cloud Cost Management
93557+
"x-permission":
93558+
operator: OR
93559+
permissions:
93560+
- cloud_cost_management_read
9344693561
/api/v2/cost_by_tag/active_billing_dimensions:
9344793562
get:
9344893563
description: |-

api/datadogV2/api_cloud_cost_management.go

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1758,6 +1758,83 @@ func (a *CloudCostManagementApi) ListCostGCPUsageCostConfigs(ctx _context.Contex
17581758
return localVarReturnValue, localVarHTTPResponse, nil
17591759
}
17601760

1761+
// ListCostOCIConfigs List Cloud Cost Management OCI configs.
1762+
// List the OCI configs.
1763+
func (a *CloudCostManagementApi) ListCostOCIConfigs(ctx _context.Context) (OCIConfigsResponse, *_nethttp.Response, error) {
1764+
var (
1765+
localVarHTTPMethod = _nethttp.MethodGet
1766+
localVarPostBody interface{}
1767+
localVarReturnValue OCIConfigsResponse
1768+
)
1769+
1770+
localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.CloudCostManagementApi.ListCostOCIConfigs")
1771+
if err != nil {
1772+
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()}
1773+
}
1774+
1775+
localVarPath := localBasePath + "/api/v2/cost/oci_config"
1776+
1777+
localVarHeaderParams := make(map[string]string)
1778+
localVarQueryParams := _neturl.Values{}
1779+
localVarFormParams := _neturl.Values{}
1780+
localVarHeaderParams["Accept"] = "application/json"
1781+
1782+
if a.Client.Cfg.DelegatedTokenConfig != nil {
1783+
err = datadog.UseDelegatedTokenAuth(ctx, &localVarHeaderParams, a.Client.Cfg.DelegatedTokenConfig)
1784+
if err != nil {
1785+
return localVarReturnValue, nil, err
1786+
}
1787+
} else {
1788+
datadog.SetAuthKeys(
1789+
ctx,
1790+
&localVarHeaderParams,
1791+
[2]string{"apiKeyAuth", "DD-API-KEY"},
1792+
[2]string{"appKeyAuth", "DD-APPLICATION-KEY"},
1793+
)
1794+
}
1795+
req, err := a.Client.PrepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, nil)
1796+
if err != nil {
1797+
return localVarReturnValue, nil, err
1798+
}
1799+
1800+
localVarHTTPResponse, err := a.Client.CallAPI(req)
1801+
if err != nil || localVarHTTPResponse == nil {
1802+
return localVarReturnValue, localVarHTTPResponse, err
1803+
}
1804+
1805+
localVarBody, err := datadog.ReadBody(localVarHTTPResponse)
1806+
if err != nil {
1807+
return localVarReturnValue, localVarHTTPResponse, err
1808+
}
1809+
1810+
if localVarHTTPResponse.StatusCode >= 300 {
1811+
newErr := datadog.GenericOpenAPIError{
1812+
ErrorBody: localVarBody,
1813+
ErrorMessage: localVarHTTPResponse.Status,
1814+
}
1815+
if localVarHTTPResponse.StatusCode == 403 || localVarHTTPResponse.StatusCode == 429 {
1816+
var v APIErrorResponse
1817+
err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
1818+
if err != nil {
1819+
return localVarReturnValue, localVarHTTPResponse, newErr
1820+
}
1821+
newErr.ErrorModel = v
1822+
}
1823+
return localVarReturnValue, localVarHTTPResponse, newErr
1824+
}
1825+
1826+
err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
1827+
if err != nil {
1828+
newErr := datadog.GenericOpenAPIError{
1829+
ErrorBody: localVarBody,
1830+
ErrorMessage: err.Error(),
1831+
}
1832+
return localVarReturnValue, localVarHTTPResponse, newErr
1833+
}
1834+
1835+
return localVarReturnValue, localVarHTTPResponse, nil
1836+
}
1837+
17611838
// ListCustomAllocationRules List custom allocation rules.
17621839
// List all custom allocation rules - Retrieve a list of all custom allocation rules for the organization
17631840
func (a *CloudCostManagementApi) ListCustomAllocationRules(ctx _context.Context) (ArbitraryRuleResponseArray, *_nethttp.Response, error) {

api/datadogV2/doc.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@
198198
// - [CloudCostManagementApi.ListCostAWSCURConfigs]
199199
// - [CloudCostManagementApi.ListCostAzureUCConfigs]
200200
// - [CloudCostManagementApi.ListCostGCPUsageCostConfigs]
201+
// - [CloudCostManagementApi.ListCostOCIConfigs]
201202
// - [CloudCostManagementApi.ListCustomAllocationRules]
202203
// - [CloudCostManagementApi.ListCustomCostsFiles]
203204
// - [CloudCostManagementApi.ListTagPipelinesRulesets]

0 commit comments

Comments
 (0)