|
29 | 29 | import com.datadog.api.client.v2.model.GCPUsageCostConfigResponse; |
30 | 30 | import com.datadog.api.client.v2.model.GCPUsageCostConfigsResponse; |
31 | 31 | import com.datadog.api.client.v2.model.GcpUcConfigResponse; |
| 32 | +import com.datadog.api.client.v2.model.OCIConfigsResponse; |
32 | 33 | import com.datadog.api.client.v2.model.ReorderRuleResourceArray; |
33 | 34 | import com.datadog.api.client.v2.model.ReorderRulesetResourceArray; |
34 | 35 | import com.datadog.api.client.v2.model.RulesValidateQueryRequest; |
@@ -3099,6 +3100,115 @@ public ApiResponse<GCPUsageCostConfigsResponse> listCostGCPUsageCostConfigsWithH |
3099 | 3100 | new GenericType<GCPUsageCostConfigsResponse>() {}); |
3100 | 3101 | } |
3101 | 3102 |
|
| 3103 | + /** |
| 3104 | + * List Cloud Cost Management OCI configs. |
| 3105 | + * |
| 3106 | + * <p>See {@link #listCostOCIConfigsWithHttpInfo}. |
| 3107 | + * |
| 3108 | + * @return OCIConfigsResponse |
| 3109 | + * @throws ApiException if fails to make API call |
| 3110 | + */ |
| 3111 | + public OCIConfigsResponse listCostOCIConfigs() throws ApiException { |
| 3112 | + return listCostOCIConfigsWithHttpInfo().getData(); |
| 3113 | + } |
| 3114 | + |
| 3115 | + /** |
| 3116 | + * List Cloud Cost Management OCI configs. |
| 3117 | + * |
| 3118 | + * <p>See {@link #listCostOCIConfigsWithHttpInfoAsync}. |
| 3119 | + * |
| 3120 | + * @return CompletableFuture<OCIConfigsResponse> |
| 3121 | + */ |
| 3122 | + public CompletableFuture<OCIConfigsResponse> listCostOCIConfigsAsync() { |
| 3123 | + return listCostOCIConfigsWithHttpInfoAsync() |
| 3124 | + .thenApply( |
| 3125 | + response -> { |
| 3126 | + return response.getData(); |
| 3127 | + }); |
| 3128 | + } |
| 3129 | + |
| 3130 | + /** |
| 3131 | + * List the OCI configs. |
| 3132 | + * |
| 3133 | + * @return ApiResponse<OCIConfigsResponse> |
| 3134 | + * @throws ApiException if fails to make API call |
| 3135 | + * @http.response.details |
| 3136 | + * <table border="1"> |
| 3137 | + * <caption>Response details</caption> |
| 3138 | + * <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> |
| 3139 | + * <tr><td> 200 </td><td> OK </td><td> - </td></tr> |
| 3140 | + * <tr><td> 403 </td><td> Forbidden </td><td> - </td></tr> |
| 3141 | + * <tr><td> 429 </td><td> Too many requests </td><td> - </td></tr> |
| 3142 | + * </table> |
| 3143 | + */ |
| 3144 | + public ApiResponse<OCIConfigsResponse> listCostOCIConfigsWithHttpInfo() throws ApiException { |
| 3145 | + Object localVarPostBody = null; |
| 3146 | + // create path and map variables |
| 3147 | + String localVarPath = "/api/v2/cost/oci_config"; |
| 3148 | + |
| 3149 | + Map<String, String> localVarHeaderParams = new HashMap<String, String>(); |
| 3150 | + |
| 3151 | + Invocation.Builder builder = |
| 3152 | + apiClient.createBuilder( |
| 3153 | + "v2.CloudCostManagementApi.listCostOCIConfigs", |
| 3154 | + localVarPath, |
| 3155 | + new ArrayList<Pair>(), |
| 3156 | + localVarHeaderParams, |
| 3157 | + new HashMap<String, String>(), |
| 3158 | + new String[] {"application/json"}, |
| 3159 | + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); |
| 3160 | + return apiClient.invokeAPI( |
| 3161 | + "GET", |
| 3162 | + builder, |
| 3163 | + localVarHeaderParams, |
| 3164 | + new String[] {}, |
| 3165 | + localVarPostBody, |
| 3166 | + new HashMap<String, Object>(), |
| 3167 | + false, |
| 3168 | + new GenericType<OCIConfigsResponse>() {}); |
| 3169 | + } |
| 3170 | + |
| 3171 | + /** |
| 3172 | + * List Cloud Cost Management OCI configs. |
| 3173 | + * |
| 3174 | + * <p>See {@link #listCostOCIConfigsWithHttpInfo}. |
| 3175 | + * |
| 3176 | + * @return CompletableFuture<ApiResponse<OCIConfigsResponse>> |
| 3177 | + */ |
| 3178 | + public CompletableFuture<ApiResponse<OCIConfigsResponse>> listCostOCIConfigsWithHttpInfoAsync() { |
| 3179 | + Object localVarPostBody = null; |
| 3180 | + // create path and map variables |
| 3181 | + String localVarPath = "/api/v2/cost/oci_config"; |
| 3182 | + |
| 3183 | + Map<String, String> localVarHeaderParams = new HashMap<String, String>(); |
| 3184 | + |
| 3185 | + Invocation.Builder builder; |
| 3186 | + try { |
| 3187 | + builder = |
| 3188 | + apiClient.createBuilder( |
| 3189 | + "v2.CloudCostManagementApi.listCostOCIConfigs", |
| 3190 | + localVarPath, |
| 3191 | + new ArrayList<Pair>(), |
| 3192 | + localVarHeaderParams, |
| 3193 | + new HashMap<String, String>(), |
| 3194 | + new String[] {"application/json"}, |
| 3195 | + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); |
| 3196 | + } catch (ApiException ex) { |
| 3197 | + CompletableFuture<ApiResponse<OCIConfigsResponse>> result = new CompletableFuture<>(); |
| 3198 | + result.completeExceptionally(ex); |
| 3199 | + return result; |
| 3200 | + } |
| 3201 | + return apiClient.invokeAPIAsync( |
| 3202 | + "GET", |
| 3203 | + builder, |
| 3204 | + localVarHeaderParams, |
| 3205 | + new String[] {}, |
| 3206 | + localVarPostBody, |
| 3207 | + new HashMap<String, Object>(), |
| 3208 | + false, |
| 3209 | + new GenericType<OCIConfigsResponse>() {}); |
| 3210 | + } |
| 3211 | + |
3102 | 3212 | /** |
3103 | 3213 | * List custom allocation rules. |
3104 | 3214 | * |
|
0 commit comments