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
24 changes: 24 additions & 0 deletions examples/v2/cloud-cost-management/ListCostOCIConfigs.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// List Cloud Cost Management OCI configs returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.CloudCostManagementApi;
import com.datadog.api.client.v2.model.OCIConfigsResponse;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
CloudCostManagementApi apiInstance = new CloudCostManagementApi(defaultClient);

try {
OCIConfigsResponse result = apiInstance.listCostOCIConfigs();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CloudCostManagementApi#listCostOCIConfigs");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import com.datadog.api.client.v2.model.GCPUsageCostConfigResponse;
import com.datadog.api.client.v2.model.GCPUsageCostConfigsResponse;
import com.datadog.api.client.v2.model.GcpUcConfigResponse;
import com.datadog.api.client.v2.model.OCIConfigsResponse;
import com.datadog.api.client.v2.model.ReorderRuleResourceArray;
import com.datadog.api.client.v2.model.ReorderRulesetResourceArray;
import com.datadog.api.client.v2.model.RulesValidateQueryRequest;
Expand Down Expand Up @@ -3099,6 +3100,115 @@ public ApiResponse<GCPUsageCostConfigsResponse> listCostGCPUsageCostConfigsWithH
new GenericType<GCPUsageCostConfigsResponse>() {});
}

/**
* List Cloud Cost Management OCI configs.
*
* <p>See {@link #listCostOCIConfigsWithHttpInfo}.
*
* @return OCIConfigsResponse
* @throws ApiException if fails to make API call
*/
public OCIConfigsResponse listCostOCIConfigs() throws ApiException {
return listCostOCIConfigsWithHttpInfo().getData();
}

/**
* List Cloud Cost Management OCI configs.
*
* <p>See {@link #listCostOCIConfigsWithHttpInfoAsync}.
*
* @return CompletableFuture&lt;OCIConfigsResponse&gt;
*/
public CompletableFuture<OCIConfigsResponse> listCostOCIConfigsAsync() {
return listCostOCIConfigsWithHttpInfoAsync()
.thenApply(
response -> {
return response.getData();
});
}

/**
* List the OCI configs.
*
* @return ApiResponse&lt;OCIConfigsResponse&gt;
* @throws ApiException if fails to make API call
* @http.response.details
* <table border="1">
* <caption>Response details</caption>
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 200 </td><td> OK </td><td> - </td></tr>
* <tr><td> 403 </td><td> Forbidden </td><td> - </td></tr>
* <tr><td> 429 </td><td> Too many requests </td><td> - </td></tr>
* </table>
*/
public ApiResponse<OCIConfigsResponse> listCostOCIConfigsWithHttpInfo() throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/api/v2/cost/oci_config";

Map<String, String> localVarHeaderParams = new HashMap<String, String>();

Invocation.Builder builder =
apiClient.createBuilder(
"v2.CloudCostManagementApi.listCostOCIConfigs",
localVarPath,
new ArrayList<Pair>(),
localVarHeaderParams,
new HashMap<String, String>(),
new String[] {"application/json"},
new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
return apiClient.invokeAPI(
"GET",
builder,
localVarHeaderParams,
new String[] {},
localVarPostBody,
new HashMap<String, Object>(),
false,
new GenericType<OCIConfigsResponse>() {});
}

/**
* List Cloud Cost Management OCI configs.
*
* <p>See {@link #listCostOCIConfigsWithHttpInfo}.
*
* @return CompletableFuture&lt;ApiResponse&lt;OCIConfigsResponse&gt;&gt;
*/
public CompletableFuture<ApiResponse<OCIConfigsResponse>> listCostOCIConfigsWithHttpInfoAsync() {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/api/v2/cost/oci_config";

Map<String, String> localVarHeaderParams = new HashMap<String, String>();

Invocation.Builder builder;
try {
builder =
apiClient.createBuilder(
"v2.CloudCostManagementApi.listCostOCIConfigs",
localVarPath,
new ArrayList<Pair>(),
localVarHeaderParams,
new HashMap<String, String>(),
new String[] {"application/json"},
new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
} catch (ApiException ex) {
CompletableFuture<ApiResponse<OCIConfigsResponse>> result = new CompletableFuture<>();
result.completeExceptionally(ex);
return result;
}
return apiClient.invokeAPIAsync(
"GET",
builder,
localVarHeaderParams,
new String[] {},
localVarPostBody,
new HashMap<String, Object>(),
false,
new GenericType<OCIConfigsResponse>() {});
}

/**
* List custom allocation rules.
*
Expand Down
Loading
Loading