oci-budget 2.122.2 → 2.123.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (265) hide show
  1. package/index.d.ts +4 -1
  2. package/index.js +5 -2
  3. package/index.js.map +1 -1
  4. package/lib/budget-waiter.d.ts +1 -1
  5. package/lib/budget-waiter.js +1 -1
  6. package/lib/client.d.ts +232 -1
  7. package/lib/client.js +1211 -2
  8. package/lib/client.js.map +1 -1
  9. package/lib/costad-waiter.d.ts +45 -0
  10. package/lib/costad-waiter.js +89 -0
  11. package/lib/costad-waiter.js.map +1 -0
  12. package/lib/model/alert-rule-summary.d.ts +1 -1
  13. package/lib/model/alert-rule-summary.js +1 -1
  14. package/lib/model/alert-rule.d.ts +1 -1
  15. package/lib/model/alert-rule.js +1 -1
  16. package/lib/model/alert-type.d.ts +1 -1
  17. package/lib/model/alert-type.js +1 -1
  18. package/lib/model/budget-summary.d.ts +13 -3
  19. package/lib/model/budget-summary.js +1 -1
  20. package/lib/model/budget-summary.js.map +1 -1
  21. package/lib/model/budget.d.ts +13 -3
  22. package/lib/model/budget.js +1 -1
  23. package/lib/model/budget.js.map +1 -1
  24. package/lib/model/cost-alert-subscription-collection.d.ts +26 -0
  25. package/lib/model/cost-alert-subscription-collection.js +61 -0
  26. package/lib/model/cost-alert-subscription-collection.js.map +1 -0
  27. package/lib/model/cost-alert-subscription-map.d.ts +46 -0
  28. package/lib/model/cost-alert-subscription-map.js +39 -0
  29. package/lib/model/cost-alert-subscription-map.js.map +1 -0
  30. package/lib/model/cost-alert-subscription-summary.d.ts +80 -0
  31. package/lib/model/cost-alert-subscription-summary.js +29 -0
  32. package/lib/model/cost-alert-subscription-summary.js.map +1 -0
  33. package/lib/model/cost-alert-subscription.d.ts +101 -0
  34. package/lib/model/cost-alert-subscription.js +39 -0
  35. package/lib/model/cost-alert-subscription.js.map +1 -0
  36. package/lib/model/cost-anomaly-event-analytic-collection.d.ts +26 -0
  37. package/lib/model/cost-anomaly-event-analytic-collection.js +61 -0
  38. package/lib/model/cost-anomaly-event-analytic-collection.js.map +1 -0
  39. package/lib/model/cost-anomaly-event-analytic-summary.d.ts +33 -0
  40. package/lib/model/cost-anomaly-event-analytic-summary.js +29 -0
  41. package/lib/model/cost-anomaly-event-analytic-summary.js.map +1 -0
  42. package/lib/model/cost-anomaly-event-collection.d.ts +26 -0
  43. package/lib/model/cost-anomaly-event-collection.js +61 -0
  44. package/lib/model/cost-anomaly-event-collection.js.map +1 -0
  45. package/lib/model/cost-anomaly-event-summary.d.ts +99 -0
  46. package/lib/model/cost-anomaly-event-summary.js +63 -0
  47. package/lib/model/cost-anomaly-event-summary.js.map +1 -0
  48. package/lib/model/cost-anomaly-event.d.ts +129 -0
  49. package/lib/model/cost-anomaly-event.js +83 -0
  50. package/lib/model/cost-anomaly-event.js.map +1 -0
  51. package/lib/model/cost-anomaly-monitor-collection.d.ts +26 -0
  52. package/lib/model/cost-anomaly-monitor-collection.js +61 -0
  53. package/lib/model/cost-anomaly-monitor-collection.js.map +1 -0
  54. package/lib/model/cost-anomaly-monitor-summary.d.ts +90 -0
  55. package/lib/model/cost-anomaly-monitor-summary.js +57 -0
  56. package/lib/model/cost-anomaly-monitor-summary.js.map +1 -0
  57. package/lib/model/cost-anomaly-monitor.d.ts +106 -0
  58. package/lib/model/cost-anomaly-monitor.js +74 -0
  59. package/lib/model/cost-anomaly-monitor.js.map +1 -0
  60. package/lib/model/create-alert-rule-details.d.ts +1 -1
  61. package/lib/model/create-alert-rule-details.js +1 -1
  62. package/lib/model/create-budget-details.d.ts +13 -3
  63. package/lib/model/create-budget-details.js +1 -1
  64. package/lib/model/create-budget-details.js.map +1 -1
  65. package/lib/model/create-cost-alert-subscription-details.d.ts +61 -0
  66. package/lib/model/create-cost-alert-subscription-details.js +29 -0
  67. package/lib/model/create-cost-alert-subscription-details.js.map +1 -0
  68. package/lib/model/create-cost-anomaly-monitor-details.d.ts +61 -0
  69. package/lib/model/create-cost-anomaly-monitor-details.js +63 -0
  70. package/lib/model/create-cost-anomaly-monitor-details.js.map +1 -0
  71. package/lib/model/dimension.d.ts +32 -0
  72. package/lib/model/dimension.js +29 -0
  73. package/lib/model/dimension.js.map +1 -0
  74. package/lib/model/index.d.ts +51 -3
  75. package/lib/model/index.js +52 -4
  76. package/lib/model/index.js.map +1 -1
  77. package/lib/model/lifecycle-state.d.ts +1 -1
  78. package/lib/model/lifecycle-state.js +1 -1
  79. package/lib/model/monitor-type.d.ts +29 -0
  80. package/lib/model/monitor-type.js +40 -0
  81. package/lib/model/monitor-type.js.map +1 -0
  82. package/lib/model/processing-period-type.d.ts +1 -1
  83. package/lib/model/processing-period-type.js +1 -1
  84. package/lib/model/reset-period.d.ts +1 -1
  85. package/lib/model/reset-period.js +1 -1
  86. package/lib/model/root-cause-detail.d.ts +25 -0
  87. package/lib/model/root-cause-detail.js +29 -0
  88. package/lib/model/root-cause-detail.js.map +1 -0
  89. package/lib/model/{sort-by.d.ts → sort-by-for-budget.d.ts} +7 -8
  90. package/lib/model/{sort-by.js → sort-by-for-budget.js} +14 -15
  91. package/lib/model/sort-by-for-budget.js.map +1 -0
  92. package/lib/model/sort-by-for-cost-ad.d.ts +26 -0
  93. package/lib/model/sort-by-for-cost-ad.js +37 -0
  94. package/lib/model/sort-by-for-cost-ad.js.map +1 -0
  95. package/lib/model/sort-by-for-cost-anomaly-event.d.ts +26 -0
  96. package/lib/model/sort-by-for-cost-anomaly-event.js +37 -0
  97. package/lib/model/sort-by-for-cost-anomaly-event.js.map +1 -0
  98. package/lib/model/sort-order.d.ts +1 -1
  99. package/lib/model/sort-order.js +1 -1
  100. package/lib/model/tag.d.ts +33 -0
  101. package/lib/model/tag.js +29 -0
  102. package/lib/model/tag.js.map +1 -0
  103. package/lib/model/target-resource-filter.d.ts +50 -0
  104. package/lib/model/target-resource-filter.js +91 -0
  105. package/lib/model/target-resource-filter.js.map +1 -0
  106. package/lib/model/target-type.d.ts +1 -1
  107. package/lib/model/target-type.js +1 -1
  108. package/lib/model/threshold-type.d.ts +1 -1
  109. package/lib/model/threshold-type.js +1 -1
  110. package/lib/model/update-alert-rule-details.d.ts +1 -1
  111. package/lib/model/update-alert-rule-details.js +1 -1
  112. package/lib/model/update-budget-details.d.ts +13 -3
  113. package/lib/model/update-budget-details.js +1 -1
  114. package/lib/model/update-budget-details.js.map +1 -1
  115. package/lib/model/update-cost-alert-subscription-details.d.ts +52 -0
  116. package/lib/model/update-cost-alert-subscription-details.js +29 -0
  117. package/lib/model/update-cost-alert-subscription-details.js.map +1 -0
  118. package/lib/model/update-cost-anomaly-event-details.d.ts +48 -0
  119. package/lib/model/update-cost-anomaly-event-details.js +29 -0
  120. package/lib/model/update-cost-anomaly-event-details.js.map +1 -0
  121. package/lib/model/update-cost-anomaly-monitor-details.d.ts +49 -0
  122. package/lib/model/update-cost-anomaly-monitor-details.js +57 -0
  123. package/lib/model/update-cost-anomaly-monitor-details.js.map +1 -0
  124. package/lib/request/create-alert-rule-request.d.ts +1 -1
  125. package/lib/request/create-alert-rule-request.js +1 -1
  126. package/lib/request/create-budget-request.d.ts +1 -1
  127. package/lib/request/create-budget-request.js +1 -1
  128. package/lib/request/create-cost-alert-subscription-request.d.ts +36 -0
  129. package/lib/request/create-cost-alert-subscription-request.js +15 -0
  130. package/lib/request/create-cost-alert-subscription-request.js.map +1 -0
  131. package/lib/request/create-cost-anomaly-monitor-request.d.ts +36 -0
  132. package/lib/request/create-cost-anomaly-monitor-request.js +15 -0
  133. package/lib/request/create-cost-anomaly-monitor-request.js.map +1 -0
  134. package/lib/request/delete-alert-rule-request.d.ts +1 -1
  135. package/lib/request/delete-alert-rule-request.js +1 -1
  136. package/lib/request/delete-budget-request.d.ts +1 -1
  137. package/lib/request/delete-budget-request.js +1 -1
  138. package/lib/request/delete-cost-alert-subscription-request.d.ts +35 -0
  139. package/lib/request/delete-cost-alert-subscription-request.js +15 -0
  140. package/lib/request/delete-cost-alert-subscription-request.js.map +1 -0
  141. package/lib/request/delete-cost-anomaly-monitor-request.d.ts +35 -0
  142. package/lib/request/delete-cost-anomaly-monitor-request.js +15 -0
  143. package/lib/request/delete-cost-anomaly-monitor-request.js.map +1 -0
  144. package/lib/request/disable-cost-anomaly-monitor-request.d.ts +44 -0
  145. package/lib/request/disable-cost-anomaly-monitor-request.js +15 -0
  146. package/lib/request/disable-cost-anomaly-monitor-request.js.map +1 -0
  147. package/lib/request/enable-cost-anomaly-monitor-request.d.ts +44 -0
  148. package/lib/request/enable-cost-anomaly-monitor-request.js +15 -0
  149. package/lib/request/enable-cost-anomaly-monitor-request.js.map +1 -0
  150. package/lib/request/get-alert-rule-request.d.ts +1 -1
  151. package/lib/request/get-alert-rule-request.js +1 -1
  152. package/lib/request/get-budget-request.d.ts +1 -1
  153. package/lib/request/get-budget-request.js +1 -1
  154. package/lib/request/get-cost-alert-subscription-request.d.ts +26 -0
  155. package/lib/request/get-cost-alert-subscription-request.js +15 -0
  156. package/lib/request/get-cost-alert-subscription-request.js.map +1 -0
  157. package/lib/request/get-cost-anomaly-event-request.d.ts +26 -0
  158. package/lib/request/get-cost-anomaly-event-request.js +15 -0
  159. package/lib/request/get-cost-anomaly-event-request.js.map +1 -0
  160. package/lib/request/get-cost-anomaly-monitor-request.d.ts +26 -0
  161. package/lib/request/get-cost-anomaly-monitor-request.js +15 -0
  162. package/lib/request/get-cost-anomaly-monitor-request.js.map +1 -0
  163. package/lib/request/index.d.ts +33 -1
  164. package/lib/request/index.js +1 -1
  165. package/lib/request/list-alert-rules-request.d.ts +2 -2
  166. package/lib/request/list-alert-rules-request.js +1 -1
  167. package/lib/request/list-budgets-request.d.ts +2 -2
  168. package/lib/request/list-budgets-request.js +1 -1
  169. package/lib/request/list-cost-alert-subscriptions-request.d.ts +55 -0
  170. package/lib/request/list-cost-alert-subscriptions-request.js +15 -0
  171. package/lib/request/list-cost-alert-subscriptions-request.js.map +1 -0
  172. package/lib/request/list-cost-anomaly-events-request.d.ts +79 -0
  173. package/lib/request/list-cost-anomaly-events-request.js +15 -0
  174. package/lib/request/list-cost-anomaly-events-request.js.map +1 -0
  175. package/lib/request/list-cost-anomaly-monitors-request.d.ts +63 -0
  176. package/lib/request/list-cost-anomaly-monitors-request.js +15 -0
  177. package/lib/request/list-cost-anomaly-monitors-request.js.map +1 -0
  178. package/lib/request/summarize-cost-anomaly-event-analytics-request.d.ts +79 -0
  179. package/lib/request/summarize-cost-anomaly-event-analytics-request.js +15 -0
  180. package/lib/request/summarize-cost-anomaly-event-analytics-request.js.map +1 -0
  181. package/lib/request/update-alert-rule-request.d.ts +1 -1
  182. package/lib/request/update-alert-rule-request.js +1 -1
  183. package/lib/request/update-budget-request.d.ts +1 -1
  184. package/lib/request/update-budget-request.js +1 -1
  185. package/lib/request/update-cost-alert-subscription-request.d.ts +40 -0
  186. package/lib/request/update-cost-alert-subscription-request.js +15 -0
  187. package/lib/request/update-cost-alert-subscription-request.js.map +1 -0
  188. package/lib/request/update-cost-anomaly-event-request.d.ts +40 -0
  189. package/lib/request/update-cost-anomaly-event-request.js +15 -0
  190. package/lib/request/update-cost-anomaly-event-request.js.map +1 -0
  191. package/lib/request/update-cost-anomaly-monitor-request.d.ts +40 -0
  192. package/lib/request/update-cost-anomaly-monitor-request.js +15 -0
  193. package/lib/request/update-cost-anomaly-monitor-request.js.map +1 -0
  194. package/lib/response/create-alert-rule-response.d.ts +1 -1
  195. package/lib/response/create-alert-rule-response.js +1 -1
  196. package/lib/response/create-budget-response.d.ts +1 -1
  197. package/lib/response/create-budget-response.js +1 -1
  198. package/lib/response/create-cost-alert-subscription-response.d.ts +30 -0
  199. package/lib/response/create-cost-alert-subscription-response.js +15 -0
  200. package/lib/response/create-cost-alert-subscription-response.js.map +1 -0
  201. package/lib/response/create-cost-anomaly-monitor-response.d.ts +30 -0
  202. package/lib/response/create-cost-anomaly-monitor-response.js +15 -0
  203. package/lib/response/create-cost-anomaly-monitor-response.js.map +1 -0
  204. package/lib/response/delete-alert-rule-response.d.ts +1 -1
  205. package/lib/response/delete-alert-rule-response.js +1 -1
  206. package/lib/response/delete-budget-response.d.ts +1 -1
  207. package/lib/response/delete-budget-response.js +1 -1
  208. package/lib/response/delete-cost-alert-subscription-response.d.ts +20 -0
  209. package/lib/response/delete-cost-alert-subscription-response.js +15 -0
  210. package/lib/response/delete-cost-alert-subscription-response.js.map +1 -0
  211. package/lib/response/delete-cost-anomaly-monitor-response.d.ts +20 -0
  212. package/lib/response/delete-cost-anomaly-monitor-response.js +15 -0
  213. package/lib/response/delete-cost-anomaly-monitor-response.js.map +1 -0
  214. package/lib/response/disable-cost-anomaly-monitor-response.d.ts +30 -0
  215. package/lib/response/disable-cost-anomaly-monitor-response.js +15 -0
  216. package/lib/response/disable-cost-anomaly-monitor-response.js.map +1 -0
  217. package/lib/response/enable-cost-anomaly-monitor-response.d.ts +30 -0
  218. package/lib/response/enable-cost-anomaly-monitor-response.js +15 -0
  219. package/lib/response/enable-cost-anomaly-monitor-response.js.map +1 -0
  220. package/lib/response/get-alert-rule-response.d.ts +1 -1
  221. package/lib/response/get-alert-rule-response.js +1 -1
  222. package/lib/response/get-budget-response.d.ts +1 -1
  223. package/lib/response/get-budget-response.js +1 -1
  224. package/lib/response/get-cost-alert-subscription-response.d.ts +30 -0
  225. package/lib/response/get-cost-alert-subscription-response.js +15 -0
  226. package/lib/response/get-cost-alert-subscription-response.js.map +1 -0
  227. package/lib/response/get-cost-anomaly-event-response.d.ts +30 -0
  228. package/lib/response/get-cost-anomaly-event-response.js +15 -0
  229. package/lib/response/get-cost-anomaly-event-response.js.map +1 -0
  230. package/lib/response/get-cost-anomaly-monitor-response.d.ts +30 -0
  231. package/lib/response/get-cost-anomaly-monitor-response.js +15 -0
  232. package/lib/response/get-cost-anomaly-monitor-response.js.map +1 -0
  233. package/lib/response/index.d.ts +33 -1
  234. package/lib/response/index.js +1 -1
  235. package/lib/response/list-alert-rules-response.d.ts +1 -1
  236. package/lib/response/list-alert-rules-response.js +1 -1
  237. package/lib/response/list-budgets-response.d.ts +1 -1
  238. package/lib/response/list-budgets-response.js +1 -1
  239. package/lib/response/list-cost-alert-subscriptions-response.d.ts +32 -0
  240. package/lib/response/list-cost-alert-subscriptions-response.js +15 -0
  241. package/lib/response/list-cost-alert-subscriptions-response.js.map +1 -0
  242. package/lib/response/list-cost-anomaly-events-response.d.ts +32 -0
  243. package/lib/response/list-cost-anomaly-events-response.js +15 -0
  244. package/lib/response/list-cost-anomaly-events-response.js.map +1 -0
  245. package/lib/response/list-cost-anomaly-monitors-response.d.ts +32 -0
  246. package/lib/response/list-cost-anomaly-monitors-response.js +15 -0
  247. package/lib/response/list-cost-anomaly-monitors-response.js.map +1 -0
  248. package/lib/response/summarize-cost-anomaly-event-analytics-response.d.ts +32 -0
  249. package/lib/response/summarize-cost-anomaly-event-analytics-response.js +15 -0
  250. package/lib/response/summarize-cost-anomaly-event-analytics-response.js.map +1 -0
  251. package/lib/response/update-alert-rule-response.d.ts +1 -1
  252. package/lib/response/update-alert-rule-response.js +1 -1
  253. package/lib/response/update-budget-response.d.ts +1 -1
  254. package/lib/response/update-budget-response.js +1 -1
  255. package/lib/response/update-cost-alert-subscription-response.d.ts +30 -0
  256. package/lib/response/update-cost-alert-subscription-response.js +15 -0
  257. package/lib/response/update-cost-alert-subscription-response.js.map +1 -0
  258. package/lib/response/update-cost-anomaly-event-response.d.ts +30 -0
  259. package/lib/response/update-cost-anomaly-event-response.js +15 -0
  260. package/lib/response/update-cost-anomaly-event-response.js.map +1 -0
  261. package/lib/response/update-cost-anomaly-monitor-response.d.ts +30 -0
  262. package/lib/response/update-cost-anomaly-monitor-response.js +15 -0
  263. package/lib/response/update-cost-anomaly-monitor-response.js.map +1 -0
  264. package/package.json +3 -3
  265. package/lib/model/sort-by.js.map +0 -1
package/lib/client.js CHANGED
@@ -8,7 +8,7 @@
8
8
  * NOTE: This class is auto generated by OracleSDKGenerator.
9
9
  * Do not edit the class manually.
10
10
  *
11
- * Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved.
11
+ * Copyright (c) 2020, 2026, Oracle and/or its affiliates. All rights reserved.
12
12
  * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
13
13
  */
14
14
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
@@ -40,11 +40,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
40
40
  });
41
41
  };
42
42
  Object.defineProperty(exports, "__esModule", { value: true });
43
- exports.BudgetClient = exports.BudgetApiKeys = void 0;
43
+ exports.CostAdClient = exports.CostAdApiKeys = exports.BudgetClient = exports.BudgetApiKeys = void 0;
44
44
  const common = require("oci-common");
45
45
  const model = __importStar(require("./model"));
46
46
  const oci_common_1 = require("oci-common");
47
47
  const budget_waiter_1 = require("./budget-waiter");
48
+ const costad_waiter_1 = require("./costad-waiter");
48
49
  const oci_common_2 = require("oci-common");
49
50
  const Breaker = require("opossum");
50
51
  // ===============================================
@@ -939,4 +940,1212 @@ class BudgetClient {
939
940
  exports.BudgetClient = BudgetClient;
940
941
  BudgetClient.serviceEndpointTemplate = "https://usage.{region}.oci.{secondLevelDomain}";
941
942
  BudgetClient.endpointServiceName = "";
943
+ var CostAdApiKeys;
944
+ (function (CostAdApiKeys) {
945
+ })(CostAdApiKeys = exports.CostAdApiKeys || (exports.CostAdApiKeys = {}));
946
+ /**
947
+ * This service client uses {@link common.CircuitBreaker.DefaultConfiguration} for all the operations by default if no circuit breaker configuration is defined by the user.
948
+ */
949
+ class CostAdClient {
950
+ constructor(params, clientConfiguration) {
951
+ this["_realmSpecificEndpointTemplateEnabled"] = undefined;
952
+ this["_endpoint"] = "";
953
+ this["_defaultHeaders"] = {};
954
+ this._circuitBreaker = null;
955
+ this._httpOptions = undefined;
956
+ this._bodyDuplexMode = undefined;
957
+ this.targetService = "CostAd";
958
+ this._regionId = "";
959
+ this._lastSetRegionOrRegionId = "";
960
+ const requestSigner = params.authenticationDetailsProvider
961
+ ? new common.DefaultRequestSigner(params.authenticationDetailsProvider)
962
+ : null;
963
+ this._authProvider = params.authenticationDetailsProvider;
964
+ if (clientConfiguration) {
965
+ this._clientConfiguration = clientConfiguration;
966
+ this._circuitBreaker = clientConfiguration.circuitBreaker
967
+ ? clientConfiguration.circuitBreaker.circuit
968
+ : null;
969
+ this._httpOptions = clientConfiguration.httpOptions
970
+ ? clientConfiguration.httpOptions
971
+ : undefined;
972
+ this._bodyDuplexMode = clientConfiguration.bodyDuplexMode
973
+ ? clientConfiguration.bodyDuplexMode
974
+ : undefined;
975
+ }
976
+ if (!oci_common_2.developerToolConfiguration.isServiceEnabled("budget")) {
977
+ let errmsg = "The developerToolConfiguration configuration disabled this service, this behavior is controlled by developerToolConfiguration.ociEnabledServiceSet variable. Please check if your local developer_tool_configuration file has configured the service you're targeting or contact the cloud provider on the availability of this service : ";
978
+ throw errmsg.concat("budget");
979
+ }
980
+ // if circuit breaker is not created, check if circuit breaker system is enabled to use default circuit breaker
981
+ const specCircuitBreakerEnabled = true;
982
+ if (!this._circuitBreaker &&
983
+ common.utils.isCircuitBreakerSystemEnabled(clientConfiguration) &&
984
+ (specCircuitBreakerEnabled || common.CircuitBreaker.DefaultCircuitBreakerOverriden)) {
985
+ this._circuitBreaker = new common.CircuitBreaker().circuit;
986
+ }
987
+ this._httpClient =
988
+ params.httpClient ||
989
+ new common.FetchHttpClient(requestSigner, this._circuitBreaker, this._httpOptions, this._bodyDuplexMode);
990
+ if (params.authenticationDetailsProvider &&
991
+ common.isRegionProvider(params.authenticationDetailsProvider)) {
992
+ const provider = params.authenticationDetailsProvider;
993
+ if (provider.getRegion()) {
994
+ this.region = provider.getRegion();
995
+ }
996
+ }
997
+ }
998
+ /**
999
+ * Get the endpoint that is being used to call (ex, https://www.example.com).
1000
+ */
1001
+ get endpoint() {
1002
+ return this._endpoint;
1003
+ }
1004
+ /**
1005
+ * Sets the endpoint to call (ex, https://www.example.com).
1006
+ * @param endpoint The endpoint of the service.
1007
+ */
1008
+ set endpoint(endpoint) {
1009
+ this._endpoint = endpoint;
1010
+ this._endpoint = this._endpoint + "/20190111";
1011
+ if (this.logger)
1012
+ this.logger.info(`CostAdClient endpoint set to ${this._endpoint}`);
1013
+ }
1014
+ get logger() {
1015
+ return common.LOG.logger;
1016
+ }
1017
+ /**
1018
+ * Determines whether realm specific endpoint should be used or not.
1019
+ * Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false"
1020
+ * @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template
1021
+ */
1022
+ set useRealmSpecificEndpointTemplate(realmSpecificEndpointTemplateEnabled) {
1023
+ this._realmSpecificEndpointTemplateEnabled = realmSpecificEndpointTemplateEnabled;
1024
+ if (this.logger)
1025
+ this.logger.info(`realmSpecificEndpointTemplateEnabled set to ${this._realmSpecificEndpointTemplateEnabled}`);
1026
+ if (this._lastSetRegionOrRegionId === common.Region.REGION_STRING) {
1027
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegion(CostAdClient.serviceEndpointTemplate, this._region, CostAdClient.endpointServiceName);
1028
+ }
1029
+ else if (this._lastSetRegionOrRegionId === common.Region.REGION_ID_STRING) {
1030
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(CostAdClient.serviceEndpointTemplate, this._regionId, CostAdClient.endpointServiceName);
1031
+ }
1032
+ }
1033
+ /**
1034
+ * Sets the region to call (ex, Region.US_PHOENIX_1).
1035
+ * Note, this will call {@link #endpoint(String) endpoint} after resolving the endpoint.
1036
+ * @param region The region of the service.
1037
+ */
1038
+ set region(region) {
1039
+ this._region = region;
1040
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegion(CostAdClient.serviceEndpointTemplate, region, CostAdClient.endpointServiceName);
1041
+ this._lastSetRegionOrRegionId = common.Region.REGION_STRING;
1042
+ }
1043
+ /**
1044
+ * Sets the regionId to call (ex, 'us-phoenix-1').
1045
+ *
1046
+ * Note, this will first try to map the region ID to a known Region and call {@link #region(Region) region}.
1047
+ * If no known Region could be determined, it will create an endpoint assuming its in default Realm OC1
1048
+ * and then call {@link #endpoint(String) endpoint}.
1049
+ * @param regionId The public region ID.
1050
+ */
1051
+ set regionId(regionId) {
1052
+ this._regionId = regionId;
1053
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(CostAdClient.serviceEndpointTemplate, regionId, CostAdClient.endpointServiceName);
1054
+ this._lastSetRegionOrRegionId = common.Region.REGION_ID_STRING;
1055
+ }
1056
+ /**
1057
+ * Creates a new CostAdWaiter for resources for this service.
1058
+ *
1059
+ * @param config The waiter configuration for termination and delay strategy
1060
+ * @return The service waiters.
1061
+ */
1062
+ createWaiters(config) {
1063
+ this._waiters = new costad_waiter_1.CostAdWaiter(this, config);
1064
+ return this._waiters;
1065
+ }
1066
+ /**
1067
+ * Gets the waiters available for resources for this service.
1068
+ *
1069
+ * @return The service waiters.
1070
+ */
1071
+ getWaiters() {
1072
+ if (this._waiters) {
1073
+ return this._waiters;
1074
+ }
1075
+ throw Error("Waiters do not exist. Please create waiters.");
1076
+ }
1077
+ /**
1078
+ * Shutdown the circuit breaker used by the client when it is no longer needed
1079
+ */
1080
+ shutdownCircuitBreaker() {
1081
+ if (this._circuitBreaker) {
1082
+ this._circuitBreaker.shutdown();
1083
+ }
1084
+ }
1085
+ /**
1086
+ * Close the provider if possible which in turn shuts down any associated circuit breaker
1087
+ */
1088
+ closeProvider() {
1089
+ if (this._authProvider) {
1090
+ if (this._authProvider instanceof common.AbstractRequestingAuthenticationDetailsProvider)
1091
+ (this._authProvider).closeProvider();
1092
+ }
1093
+ }
1094
+ /**
1095
+ * Close the client once it is no longer needed
1096
+ */
1097
+ close() {
1098
+ this.shutdownCircuitBreaker();
1099
+ this.closeProvider();
1100
+ }
1101
+ /**
1102
+ * Creates a new CostAlert Subscription.
1103
+ *
1104
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
1105
+ * @param CreateCostAlertSubscriptionRequest
1106
+ * @return CreateCostAlertSubscriptionResponse
1107
+ * @throws OciError when an error occurs
1108
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/budget/CreateCostAlertSubscription.ts.html |here} to see how to use CreateCostAlertSubscription API.
1109
+ */
1110
+ createCostAlertSubscription(createCostAlertSubscriptionRequest) {
1111
+ return __awaiter(this, void 0, void 0, function* () {
1112
+ if (this.logger)
1113
+ this.logger.debug("Calling operation CostAdClient#createCostAlertSubscription.");
1114
+ const operationName = "createCostAlertSubscription";
1115
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/budgets/20190111/CostAlertSubscription/CreateCostAlertSubscription";
1116
+ const pathParams = {};
1117
+ const queryParams = {};
1118
+ let headerParams = {
1119
+ "Content-Type": common.Constants.APPLICATION_JSON,
1120
+ "opc-retry-token": createCostAlertSubscriptionRequest.opcRetryToken,
1121
+ "opc-request-id": createCostAlertSubscriptionRequest.opcRequestId
1122
+ };
1123
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
1124
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, createCostAlertSubscriptionRequest.retryConfiguration, specRetryConfiguration);
1125
+ if (this.logger)
1126
+ retrier.logger = this.logger;
1127
+ const request = yield oci_common_2.composeRequest({
1128
+ baseEndpoint: this._endpoint,
1129
+ defaultHeaders: this._defaultHeaders,
1130
+ path: "/costAlertSubscriptions",
1131
+ method: "POST",
1132
+ bodyContent: common.ObjectSerializer.serialize(createCostAlertSubscriptionRequest.createCostAlertSubscriptionDetails, "CreateCostAlertSubscriptionDetails", model.CreateCostAlertSubscriptionDetails.getJsonObj),
1133
+ pathParams: pathParams,
1134
+ headerParams: headerParams,
1135
+ queryParams: queryParams
1136
+ });
1137
+ try {
1138
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1139
+ const sdkResponse = oci_common_2.composeResponse({
1140
+ responseObject: {},
1141
+ body: yield response.json(),
1142
+ bodyKey: "costAlertSubscription",
1143
+ bodyModel: model.CostAlertSubscription,
1144
+ type: "model.CostAlertSubscription",
1145
+ responseHeaders: [
1146
+ {
1147
+ value: response.headers.get("opc-request-id"),
1148
+ key: "opcRequestId",
1149
+ dataType: "string"
1150
+ },
1151
+ {
1152
+ value: response.headers.get("etag"),
1153
+ key: "etag",
1154
+ dataType: "string"
1155
+ }
1156
+ ]
1157
+ });
1158
+ return sdkResponse;
1159
+ }
1160
+ catch (err) {
1161
+ throw err;
1162
+ }
1163
+ });
1164
+ }
1165
+ /**
1166
+ * Creates a new costAnomaly Monitor.
1167
+ *
1168
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
1169
+ * @param CreateCostAnomalyMonitorRequest
1170
+ * @return CreateCostAnomalyMonitorResponse
1171
+ * @throws OciError when an error occurs
1172
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/budget/CreateCostAnomalyMonitor.ts.html |here} to see how to use CreateCostAnomalyMonitor API.
1173
+ */
1174
+ createCostAnomalyMonitor(createCostAnomalyMonitorRequest) {
1175
+ return __awaiter(this, void 0, void 0, function* () {
1176
+ if (this.logger)
1177
+ this.logger.debug("Calling operation CostAdClient#createCostAnomalyMonitor.");
1178
+ const operationName = "createCostAnomalyMonitor";
1179
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/budgets/20190111/CostAnomalyMonitor/CreateCostAnomalyMonitor";
1180
+ const pathParams = {};
1181
+ const queryParams = {};
1182
+ let headerParams = {
1183
+ "Content-Type": common.Constants.APPLICATION_JSON,
1184
+ "opc-retry-token": createCostAnomalyMonitorRequest.opcRetryToken,
1185
+ "opc-request-id": createCostAnomalyMonitorRequest.opcRequestId
1186
+ };
1187
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
1188
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, createCostAnomalyMonitorRequest.retryConfiguration, specRetryConfiguration);
1189
+ if (this.logger)
1190
+ retrier.logger = this.logger;
1191
+ const request = yield oci_common_2.composeRequest({
1192
+ baseEndpoint: this._endpoint,
1193
+ defaultHeaders: this._defaultHeaders,
1194
+ path: "/costAnomalyMonitors",
1195
+ method: "POST",
1196
+ bodyContent: common.ObjectSerializer.serialize(createCostAnomalyMonitorRequest.createCostAnomalyMonitorDetails, "CreateCostAnomalyMonitorDetails", model.CreateCostAnomalyMonitorDetails.getJsonObj),
1197
+ pathParams: pathParams,
1198
+ headerParams: headerParams,
1199
+ queryParams: queryParams
1200
+ });
1201
+ try {
1202
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1203
+ const sdkResponse = oci_common_2.composeResponse({
1204
+ responseObject: {},
1205
+ body: yield response.json(),
1206
+ bodyKey: "costAnomalyMonitor",
1207
+ bodyModel: model.CostAnomalyMonitor,
1208
+ type: "model.CostAnomalyMonitor",
1209
+ responseHeaders: [
1210
+ {
1211
+ value: response.headers.get("opc-request-id"),
1212
+ key: "opcRequestId",
1213
+ dataType: "string"
1214
+ },
1215
+ {
1216
+ value: response.headers.get("etag"),
1217
+ key: "etag",
1218
+ dataType: "string"
1219
+ }
1220
+ ]
1221
+ });
1222
+ return sdkResponse;
1223
+ }
1224
+ catch (err) {
1225
+ throw err;
1226
+ }
1227
+ });
1228
+ }
1229
+ /**
1230
+ * Deletes a specified CostAlertSubscription resource.
1231
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
1232
+ * @param DeleteCostAlertSubscriptionRequest
1233
+ * @return DeleteCostAlertSubscriptionResponse
1234
+ * @throws OciError when an error occurs
1235
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/budget/DeleteCostAlertSubscription.ts.html |here} to see how to use DeleteCostAlertSubscription API.
1236
+ */
1237
+ deleteCostAlertSubscription(deleteCostAlertSubscriptionRequest) {
1238
+ return __awaiter(this, void 0, void 0, function* () {
1239
+ if (this.logger)
1240
+ this.logger.debug("Calling operation CostAdClient#deleteCostAlertSubscription.");
1241
+ const operationName = "deleteCostAlertSubscription";
1242
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/budgets/20190111/CostAlertSubscription/DeleteCostAlertSubscription";
1243
+ const pathParams = {
1244
+ "{costAlertSubscriptionId}": deleteCostAlertSubscriptionRequest.costAlertSubscriptionId
1245
+ };
1246
+ const queryParams = {};
1247
+ let headerParams = {
1248
+ "Content-Type": common.Constants.APPLICATION_JSON,
1249
+ "if-match": deleteCostAlertSubscriptionRequest.ifMatch,
1250
+ "opc-request-id": deleteCostAlertSubscriptionRequest.opcRequestId
1251
+ };
1252
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
1253
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, deleteCostAlertSubscriptionRequest.retryConfiguration, specRetryConfiguration);
1254
+ if (this.logger)
1255
+ retrier.logger = this.logger;
1256
+ const request = yield oci_common_2.composeRequest({
1257
+ baseEndpoint: this._endpoint,
1258
+ defaultHeaders: this._defaultHeaders,
1259
+ path: "/costAlertSubscriptions/{costAlertSubscriptionId}",
1260
+ method: "DELETE",
1261
+ pathParams: pathParams,
1262
+ headerParams: headerParams,
1263
+ queryParams: queryParams
1264
+ });
1265
+ try {
1266
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1267
+ const sdkResponse = oci_common_2.composeResponse({
1268
+ responseObject: {},
1269
+ responseHeaders: [
1270
+ {
1271
+ value: response.headers.get("opc-request-id"),
1272
+ key: "opcRequestId",
1273
+ dataType: "string"
1274
+ }
1275
+ ]
1276
+ });
1277
+ return sdkResponse;
1278
+ }
1279
+ catch (err) {
1280
+ throw err;
1281
+ }
1282
+ });
1283
+ }
1284
+ /**
1285
+ * Deletes a specified CostAnomalyMonitor resource.
1286
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
1287
+ * @param DeleteCostAnomalyMonitorRequest
1288
+ * @return DeleteCostAnomalyMonitorResponse
1289
+ * @throws OciError when an error occurs
1290
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/budget/DeleteCostAnomalyMonitor.ts.html |here} to see how to use DeleteCostAnomalyMonitor API.
1291
+ */
1292
+ deleteCostAnomalyMonitor(deleteCostAnomalyMonitorRequest) {
1293
+ return __awaiter(this, void 0, void 0, function* () {
1294
+ if (this.logger)
1295
+ this.logger.debug("Calling operation CostAdClient#deleteCostAnomalyMonitor.");
1296
+ const operationName = "deleteCostAnomalyMonitor";
1297
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/budgets/20190111/CostAnomalyMonitor/DeleteCostAnomalyMonitor";
1298
+ const pathParams = {
1299
+ "{costAnomalyMonitorId}": deleteCostAnomalyMonitorRequest.costAnomalyMonitorId
1300
+ };
1301
+ const queryParams = {};
1302
+ let headerParams = {
1303
+ "Content-Type": common.Constants.APPLICATION_JSON,
1304
+ "if-match": deleteCostAnomalyMonitorRequest.ifMatch,
1305
+ "opc-request-id": deleteCostAnomalyMonitorRequest.opcRequestId
1306
+ };
1307
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
1308
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, deleteCostAnomalyMonitorRequest.retryConfiguration, specRetryConfiguration);
1309
+ if (this.logger)
1310
+ retrier.logger = this.logger;
1311
+ const request = yield oci_common_2.composeRequest({
1312
+ baseEndpoint: this._endpoint,
1313
+ defaultHeaders: this._defaultHeaders,
1314
+ path: "/costAnomalyMonitors/{costAnomalyMonitorId}",
1315
+ method: "DELETE",
1316
+ pathParams: pathParams,
1317
+ headerParams: headerParams,
1318
+ queryParams: queryParams
1319
+ });
1320
+ try {
1321
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1322
+ const sdkResponse = oci_common_2.composeResponse({
1323
+ responseObject: {},
1324
+ responseHeaders: [
1325
+ {
1326
+ value: response.headers.get("opc-request-id"),
1327
+ key: "opcRequestId",
1328
+ dataType: "string"
1329
+ }
1330
+ ]
1331
+ });
1332
+ return sdkResponse;
1333
+ }
1334
+ catch (err) {
1335
+ throw err;
1336
+ }
1337
+ });
1338
+ }
1339
+ /**
1340
+ * Disables the cost anomaly monitor. This stops cost anomaly detection for targeted resource(s).
1341
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
1342
+ * @param DisableCostAnomalyMonitorRequest
1343
+ * @return DisableCostAnomalyMonitorResponse
1344
+ * @throws OciError when an error occurs
1345
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/budget/DisableCostAnomalyMonitor.ts.html |here} to see how to use DisableCostAnomalyMonitor API.
1346
+ */
1347
+ disableCostAnomalyMonitor(disableCostAnomalyMonitorRequest) {
1348
+ return __awaiter(this, void 0, void 0, function* () {
1349
+ if (this.logger)
1350
+ this.logger.debug("Calling operation CostAdClient#disableCostAnomalyMonitor.");
1351
+ const operationName = "disableCostAnomalyMonitor";
1352
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/budgets/20190111/CostAnomalyMonitor/DisableCostAnomalyMonitor";
1353
+ const pathParams = {
1354
+ "{costAnomalyMonitorId}": disableCostAnomalyMonitorRequest.costAnomalyMonitorId
1355
+ };
1356
+ const queryParams = {};
1357
+ let headerParams = {
1358
+ "Content-Type": common.Constants.APPLICATION_JSON,
1359
+ "if-match": disableCostAnomalyMonitorRequest.ifMatch,
1360
+ "opc-request-id": disableCostAnomalyMonitorRequest.opcRequestId,
1361
+ "opc-retry-token": disableCostAnomalyMonitorRequest.opcRetryToken
1362
+ };
1363
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
1364
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, disableCostAnomalyMonitorRequest.retryConfiguration, specRetryConfiguration);
1365
+ if (this.logger)
1366
+ retrier.logger = this.logger;
1367
+ const request = yield oci_common_2.composeRequest({
1368
+ baseEndpoint: this._endpoint,
1369
+ defaultHeaders: this._defaultHeaders,
1370
+ path: "/costAnomalyMonitors/{costAnomalyMonitorId}/actions/disable",
1371
+ method: "POST",
1372
+ pathParams: pathParams,
1373
+ headerParams: headerParams,
1374
+ queryParams: queryParams
1375
+ });
1376
+ try {
1377
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1378
+ const sdkResponse = oci_common_2.composeResponse({
1379
+ responseObject: {},
1380
+ body: yield response.json(),
1381
+ bodyKey: "costAnomalyMonitor",
1382
+ bodyModel: model.CostAnomalyMonitor,
1383
+ type: "model.CostAnomalyMonitor",
1384
+ responseHeaders: [
1385
+ {
1386
+ value: response.headers.get("etag"),
1387
+ key: "etag",
1388
+ dataType: "string"
1389
+ },
1390
+ {
1391
+ value: response.headers.get("opc-request-id"),
1392
+ key: "opcRequestId",
1393
+ dataType: "string"
1394
+ }
1395
+ ]
1396
+ });
1397
+ return sdkResponse;
1398
+ }
1399
+ catch (err) {
1400
+ throw err;
1401
+ }
1402
+ });
1403
+ }
1404
+ /**
1405
+ * Enables the cost anomaly monitor. This (re)starts the cost anomaly detection for targeted resource(s).
1406
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
1407
+ * @param EnableCostAnomalyMonitorRequest
1408
+ * @return EnableCostAnomalyMonitorResponse
1409
+ * @throws OciError when an error occurs
1410
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/budget/EnableCostAnomalyMonitor.ts.html |here} to see how to use EnableCostAnomalyMonitor API.
1411
+ */
1412
+ enableCostAnomalyMonitor(enableCostAnomalyMonitorRequest) {
1413
+ return __awaiter(this, void 0, void 0, function* () {
1414
+ if (this.logger)
1415
+ this.logger.debug("Calling operation CostAdClient#enableCostAnomalyMonitor.");
1416
+ const operationName = "enableCostAnomalyMonitor";
1417
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/budgets/20190111/CostAnomalyMonitor/EnableCostAnomalyMonitor";
1418
+ const pathParams = {
1419
+ "{costAnomalyMonitorId}": enableCostAnomalyMonitorRequest.costAnomalyMonitorId
1420
+ };
1421
+ const queryParams = {};
1422
+ let headerParams = {
1423
+ "Content-Type": common.Constants.APPLICATION_JSON,
1424
+ "if-match": enableCostAnomalyMonitorRequest.ifMatch,
1425
+ "opc-request-id": enableCostAnomalyMonitorRequest.opcRequestId,
1426
+ "opc-retry-token": enableCostAnomalyMonitorRequest.opcRetryToken
1427
+ };
1428
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
1429
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, enableCostAnomalyMonitorRequest.retryConfiguration, specRetryConfiguration);
1430
+ if (this.logger)
1431
+ retrier.logger = this.logger;
1432
+ const request = yield oci_common_2.composeRequest({
1433
+ baseEndpoint: this._endpoint,
1434
+ defaultHeaders: this._defaultHeaders,
1435
+ path: "/costAnomalyMonitors/{costAnomalyMonitorId}/actions/enable",
1436
+ method: "POST",
1437
+ pathParams: pathParams,
1438
+ headerParams: headerParams,
1439
+ queryParams: queryParams
1440
+ });
1441
+ try {
1442
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1443
+ const sdkResponse = oci_common_2.composeResponse({
1444
+ responseObject: {},
1445
+ body: yield response.json(),
1446
+ bodyKey: "costAnomalyMonitor",
1447
+ bodyModel: model.CostAnomalyMonitor,
1448
+ type: "model.CostAnomalyMonitor",
1449
+ responseHeaders: [
1450
+ {
1451
+ value: response.headers.get("etag"),
1452
+ key: "etag",
1453
+ dataType: "string"
1454
+ },
1455
+ {
1456
+ value: response.headers.get("opc-request-id"),
1457
+ key: "opcRequestId",
1458
+ dataType: "string"
1459
+ }
1460
+ ]
1461
+ });
1462
+ return sdkResponse;
1463
+ }
1464
+ catch (err) {
1465
+ throw err;
1466
+ }
1467
+ });
1468
+ }
1469
+ /**
1470
+ * Gets a CostAlertSubscription by the identifier.
1471
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
1472
+ * @param GetCostAlertSubscriptionRequest
1473
+ * @return GetCostAlertSubscriptionResponse
1474
+ * @throws OciError when an error occurs
1475
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/budget/GetCostAlertSubscription.ts.html |here} to see how to use GetCostAlertSubscription API.
1476
+ */
1477
+ getCostAlertSubscription(getCostAlertSubscriptionRequest) {
1478
+ return __awaiter(this, void 0, void 0, function* () {
1479
+ if (this.logger)
1480
+ this.logger.debug("Calling operation CostAdClient#getCostAlertSubscription.");
1481
+ const operationName = "getCostAlertSubscription";
1482
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/budgets/20190111/CostAlertSubscription/GetCostAlertSubscription";
1483
+ const pathParams = {
1484
+ "{costAlertSubscriptionId}": getCostAlertSubscriptionRequest.costAlertSubscriptionId
1485
+ };
1486
+ const queryParams = {};
1487
+ let headerParams = {
1488
+ "Content-Type": common.Constants.APPLICATION_JSON,
1489
+ "opc-request-id": getCostAlertSubscriptionRequest.opcRequestId
1490
+ };
1491
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
1492
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getCostAlertSubscriptionRequest.retryConfiguration, specRetryConfiguration);
1493
+ if (this.logger)
1494
+ retrier.logger = this.logger;
1495
+ const request = yield oci_common_2.composeRequest({
1496
+ baseEndpoint: this._endpoint,
1497
+ defaultHeaders: this._defaultHeaders,
1498
+ path: "/costAlertSubscriptions/{costAlertSubscriptionId}",
1499
+ method: "GET",
1500
+ pathParams: pathParams,
1501
+ headerParams: headerParams,
1502
+ queryParams: queryParams
1503
+ });
1504
+ try {
1505
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1506
+ const sdkResponse = oci_common_2.composeResponse({
1507
+ responseObject: {},
1508
+ body: yield response.json(),
1509
+ bodyKey: "costAlertSubscription",
1510
+ bodyModel: model.CostAlertSubscription,
1511
+ type: "model.CostAlertSubscription",
1512
+ responseHeaders: [
1513
+ {
1514
+ value: response.headers.get("opc-request-id"),
1515
+ key: "opcRequestId",
1516
+ dataType: "string"
1517
+ },
1518
+ {
1519
+ value: response.headers.get("etag"),
1520
+ key: "etag",
1521
+ dataType: "string"
1522
+ }
1523
+ ]
1524
+ });
1525
+ return sdkResponse;
1526
+ }
1527
+ catch (err) {
1528
+ throw err;
1529
+ }
1530
+ });
1531
+ }
1532
+ /**
1533
+ * Gets a CostAnomalyEvent by the identifier.
1534
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
1535
+ * @param GetCostAnomalyEventRequest
1536
+ * @return GetCostAnomalyEventResponse
1537
+ * @throws OciError when an error occurs
1538
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/budget/GetCostAnomalyEvent.ts.html |here} to see how to use GetCostAnomalyEvent API.
1539
+ */
1540
+ getCostAnomalyEvent(getCostAnomalyEventRequest) {
1541
+ return __awaiter(this, void 0, void 0, function* () {
1542
+ if (this.logger)
1543
+ this.logger.debug("Calling operation CostAdClient#getCostAnomalyEvent.");
1544
+ const operationName = "getCostAnomalyEvent";
1545
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/budgets/20190111/CostAnomalyEvent/GetCostAnomalyEvent";
1546
+ const pathParams = {
1547
+ "{costAnomalyEventId}": getCostAnomalyEventRequest.costAnomalyEventId
1548
+ };
1549
+ const queryParams = {};
1550
+ let headerParams = {
1551
+ "Content-Type": common.Constants.APPLICATION_JSON,
1552
+ "opc-request-id": getCostAnomalyEventRequest.opcRequestId
1553
+ };
1554
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
1555
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getCostAnomalyEventRequest.retryConfiguration, specRetryConfiguration);
1556
+ if (this.logger)
1557
+ retrier.logger = this.logger;
1558
+ const request = yield oci_common_2.composeRequest({
1559
+ baseEndpoint: this._endpoint,
1560
+ defaultHeaders: this._defaultHeaders,
1561
+ path: "/costAnomalyEvents/{costAnomalyEventId}",
1562
+ method: "GET",
1563
+ pathParams: pathParams,
1564
+ headerParams: headerParams,
1565
+ queryParams: queryParams
1566
+ });
1567
+ try {
1568
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1569
+ const sdkResponse = oci_common_2.composeResponse({
1570
+ responseObject: {},
1571
+ body: yield response.json(),
1572
+ bodyKey: "costAnomalyEvent",
1573
+ bodyModel: model.CostAnomalyEvent,
1574
+ type: "model.CostAnomalyEvent",
1575
+ responseHeaders: [
1576
+ {
1577
+ value: response.headers.get("opc-request-id"),
1578
+ key: "opcRequestId",
1579
+ dataType: "string"
1580
+ },
1581
+ {
1582
+ value: response.headers.get("etag"),
1583
+ key: "etag",
1584
+ dataType: "string"
1585
+ }
1586
+ ]
1587
+ });
1588
+ return sdkResponse;
1589
+ }
1590
+ catch (err) {
1591
+ throw err;
1592
+ }
1593
+ });
1594
+ }
1595
+ /**
1596
+ * Gets a CostAnomalyMonitor by the identifier.
1597
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
1598
+ * @param GetCostAnomalyMonitorRequest
1599
+ * @return GetCostAnomalyMonitorResponse
1600
+ * @throws OciError when an error occurs
1601
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/budget/GetCostAnomalyMonitor.ts.html |here} to see how to use GetCostAnomalyMonitor API.
1602
+ */
1603
+ getCostAnomalyMonitor(getCostAnomalyMonitorRequest) {
1604
+ return __awaiter(this, void 0, void 0, function* () {
1605
+ if (this.logger)
1606
+ this.logger.debug("Calling operation CostAdClient#getCostAnomalyMonitor.");
1607
+ const operationName = "getCostAnomalyMonitor";
1608
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/budgets/20190111/CostAnomalyMonitor/GetCostAnomalyMonitor";
1609
+ const pathParams = {
1610
+ "{costAnomalyMonitorId}": getCostAnomalyMonitorRequest.costAnomalyMonitorId
1611
+ };
1612
+ const queryParams = {};
1613
+ let headerParams = {
1614
+ "Content-Type": common.Constants.APPLICATION_JSON,
1615
+ "opc-request-id": getCostAnomalyMonitorRequest.opcRequestId
1616
+ };
1617
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
1618
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getCostAnomalyMonitorRequest.retryConfiguration, specRetryConfiguration);
1619
+ if (this.logger)
1620
+ retrier.logger = this.logger;
1621
+ const request = yield oci_common_2.composeRequest({
1622
+ baseEndpoint: this._endpoint,
1623
+ defaultHeaders: this._defaultHeaders,
1624
+ path: "/costAnomalyMonitors/{costAnomalyMonitorId}",
1625
+ method: "GET",
1626
+ pathParams: pathParams,
1627
+ headerParams: headerParams,
1628
+ queryParams: queryParams
1629
+ });
1630
+ try {
1631
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1632
+ const sdkResponse = oci_common_2.composeResponse({
1633
+ responseObject: {},
1634
+ body: yield response.json(),
1635
+ bodyKey: "costAnomalyMonitor",
1636
+ bodyModel: model.CostAnomalyMonitor,
1637
+ type: "model.CostAnomalyMonitor",
1638
+ responseHeaders: [
1639
+ {
1640
+ value: response.headers.get("opc-request-id"),
1641
+ key: "opcRequestId",
1642
+ dataType: "string"
1643
+ },
1644
+ {
1645
+ value: response.headers.get("etag"),
1646
+ key: "etag",
1647
+ dataType: "string"
1648
+ }
1649
+ ]
1650
+ });
1651
+ return sdkResponse;
1652
+ }
1653
+ catch (err) {
1654
+ throw err;
1655
+ }
1656
+ });
1657
+ }
1658
+ /**
1659
+ * Gets a list of Cost Alert Subscription in a compartment.
1660
+ *
1661
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
1662
+ * @param ListCostAlertSubscriptionsRequest
1663
+ * @return ListCostAlertSubscriptionsResponse
1664
+ * @throws OciError when an error occurs
1665
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/budget/ListCostAlertSubscriptions.ts.html |here} to see how to use ListCostAlertSubscriptions API.
1666
+ */
1667
+ listCostAlertSubscriptions(listCostAlertSubscriptionsRequest) {
1668
+ return __awaiter(this, void 0, void 0, function* () {
1669
+ if (this.logger)
1670
+ this.logger.debug("Calling operation CostAdClient#listCostAlertSubscriptions.");
1671
+ const operationName = "listCostAlertSubscriptions";
1672
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/budgets/20190111/CostAlertSubscriptionCollection/ListCostAlertSubscriptions";
1673
+ const pathParams = {};
1674
+ const queryParams = {
1675
+ "compartmentId": listCostAlertSubscriptionsRequest.compartmentId,
1676
+ "limit": listCostAlertSubscriptionsRequest.limit,
1677
+ "page": listCostAlertSubscriptionsRequest.page,
1678
+ "sortOrder": listCostAlertSubscriptionsRequest.sortOrder,
1679
+ "sortBy": listCostAlertSubscriptionsRequest.sortBy,
1680
+ "name": listCostAlertSubscriptionsRequest.name,
1681
+ "lifecycleState": listCostAlertSubscriptionsRequest.lifecycleState
1682
+ };
1683
+ let headerParams = {
1684
+ "Content-Type": common.Constants.APPLICATION_JSON,
1685
+ "opc-request-id": listCostAlertSubscriptionsRequest.opcRequestId
1686
+ };
1687
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
1688
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listCostAlertSubscriptionsRequest.retryConfiguration, specRetryConfiguration);
1689
+ if (this.logger)
1690
+ retrier.logger = this.logger;
1691
+ const request = yield oci_common_2.composeRequest({
1692
+ baseEndpoint: this._endpoint,
1693
+ defaultHeaders: this._defaultHeaders,
1694
+ path: "/costAlertSubscriptions",
1695
+ method: "GET",
1696
+ pathParams: pathParams,
1697
+ headerParams: headerParams,
1698
+ queryParams: queryParams
1699
+ });
1700
+ try {
1701
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1702
+ const sdkResponse = oci_common_2.composeResponse({
1703
+ responseObject: {},
1704
+ body: yield response.json(),
1705
+ bodyKey: "costAlertSubscriptionCollection",
1706
+ bodyModel: model.CostAlertSubscriptionCollection,
1707
+ type: "model.CostAlertSubscriptionCollection",
1708
+ responseHeaders: [
1709
+ {
1710
+ value: response.headers.get("opc-request-id"),
1711
+ key: "opcRequestId",
1712
+ dataType: "string"
1713
+ },
1714
+ {
1715
+ value: response.headers.get("opc-next-page"),
1716
+ key: "opcNextPage",
1717
+ dataType: "string"
1718
+ }
1719
+ ]
1720
+ });
1721
+ return sdkResponse;
1722
+ }
1723
+ catch (err) {
1724
+ throw err;
1725
+ }
1726
+ });
1727
+ }
1728
+ /**
1729
+ * Gets a list of Cost Anomaly Event in a compartment.
1730
+ *
1731
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
1732
+ * @param ListCostAnomalyEventsRequest
1733
+ * @return ListCostAnomalyEventsResponse
1734
+ * @throws OciError when an error occurs
1735
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/budget/ListCostAnomalyEvents.ts.html |here} to see how to use ListCostAnomalyEvents API.
1736
+ */
1737
+ listCostAnomalyEvents(listCostAnomalyEventsRequest) {
1738
+ return __awaiter(this, void 0, void 0, function* () {
1739
+ if (this.logger)
1740
+ this.logger.debug("Calling operation CostAdClient#listCostAnomalyEvents.");
1741
+ const operationName = "listCostAnomalyEvents";
1742
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/budgets/20190111/CostAnomalyEventCollection/ListCostAnomalyEvents";
1743
+ const pathParams = {};
1744
+ const queryParams = {
1745
+ "compartmentId": listCostAnomalyEventsRequest.compartmentId,
1746
+ "limit": listCostAnomalyEventsRequest.limit,
1747
+ "page": listCostAnomalyEventsRequest.page,
1748
+ "sortOrder": listCostAnomalyEventsRequest.sortOrder,
1749
+ "sortBy": listCostAnomalyEventsRequest.sortBy,
1750
+ "name": listCostAnomalyEventsRequest.name,
1751
+ "costAnomalyMonitorId": listCostAnomalyEventsRequest.costAnomalyMonitorId,
1752
+ "targetTenantId": listCostAnomalyEventsRequest.targetTenantId,
1753
+ "timeAnomalyEventStartDate": listCostAnomalyEventsRequest.timeAnomalyEventStartDate,
1754
+ "timeAnomalyEventEndDate": listCostAnomalyEventsRequest.timeAnomalyEventEndDate,
1755
+ "region": listCostAnomalyEventsRequest.region,
1756
+ "costImpact": listCostAnomalyEventsRequest.costImpact,
1757
+ "costImpactPercentage": listCostAnomalyEventsRequest.costImpactPercentage
1758
+ };
1759
+ let headerParams = {
1760
+ "Content-Type": common.Constants.APPLICATION_JSON,
1761
+ "opc-request-id": listCostAnomalyEventsRequest.opcRequestId
1762
+ };
1763
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
1764
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listCostAnomalyEventsRequest.retryConfiguration, specRetryConfiguration);
1765
+ if (this.logger)
1766
+ retrier.logger = this.logger;
1767
+ const request = yield oci_common_2.composeRequest({
1768
+ baseEndpoint: this._endpoint,
1769
+ defaultHeaders: this._defaultHeaders,
1770
+ path: "/costAnomalyEvents",
1771
+ method: "GET",
1772
+ pathParams: pathParams,
1773
+ headerParams: headerParams,
1774
+ queryParams: queryParams
1775
+ });
1776
+ try {
1777
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1778
+ const sdkResponse = oci_common_2.composeResponse({
1779
+ responseObject: {},
1780
+ body: yield response.json(),
1781
+ bodyKey: "costAnomalyEventCollection",
1782
+ bodyModel: model.CostAnomalyEventCollection,
1783
+ type: "model.CostAnomalyEventCollection",
1784
+ responseHeaders: [
1785
+ {
1786
+ value: response.headers.get("opc-request-id"),
1787
+ key: "opcRequestId",
1788
+ dataType: "string"
1789
+ },
1790
+ {
1791
+ value: response.headers.get("opc-next-page"),
1792
+ key: "opcNextPage",
1793
+ dataType: "string"
1794
+ }
1795
+ ]
1796
+ });
1797
+ return sdkResponse;
1798
+ }
1799
+ catch (err) {
1800
+ throw err;
1801
+ }
1802
+ });
1803
+ }
1804
+ /**
1805
+ * Gets a list of Cost Anomaly Monitors in a compartment.
1806
+ *
1807
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
1808
+ * @param ListCostAnomalyMonitorsRequest
1809
+ * @return ListCostAnomalyMonitorsResponse
1810
+ * @throws OciError when an error occurs
1811
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/budget/ListCostAnomalyMonitors.ts.html |here} to see how to use ListCostAnomalyMonitors API.
1812
+ */
1813
+ listCostAnomalyMonitors(listCostAnomalyMonitorsRequest) {
1814
+ return __awaiter(this, void 0, void 0, function* () {
1815
+ if (this.logger)
1816
+ this.logger.debug("Calling operation CostAdClient#listCostAnomalyMonitors.");
1817
+ const operationName = "listCostAnomalyMonitors";
1818
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/budgets/20190111/CostAnomalyMonitorCollection/ListCostAnomalyMonitors";
1819
+ const pathParams = {};
1820
+ const queryParams = {
1821
+ "compartmentId": listCostAnomalyMonitorsRequest.compartmentId,
1822
+ "limit": listCostAnomalyMonitorsRequest.limit,
1823
+ "page": listCostAnomalyMonitorsRequest.page,
1824
+ "sortOrder": listCostAnomalyMonitorsRequest.sortOrder,
1825
+ "sortBy": listCostAnomalyMonitorsRequest.sortBy,
1826
+ "lifecycleState": listCostAnomalyMonitorsRequest.lifecycleState,
1827
+ "name": listCostAnomalyMonitorsRequest.name,
1828
+ "targetTenantId": listCostAnomalyMonitorsRequest.targetTenantId,
1829
+ "region": listCostAnomalyMonitorsRequest.region
1830
+ };
1831
+ let headerParams = {
1832
+ "Content-Type": common.Constants.APPLICATION_JSON,
1833
+ "opc-request-id": listCostAnomalyMonitorsRequest.opcRequestId
1834
+ };
1835
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
1836
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listCostAnomalyMonitorsRequest.retryConfiguration, specRetryConfiguration);
1837
+ if (this.logger)
1838
+ retrier.logger = this.logger;
1839
+ const request = yield oci_common_2.composeRequest({
1840
+ baseEndpoint: this._endpoint,
1841
+ defaultHeaders: this._defaultHeaders,
1842
+ path: "/costAnomalyMonitors",
1843
+ method: "GET",
1844
+ pathParams: pathParams,
1845
+ headerParams: headerParams,
1846
+ queryParams: queryParams
1847
+ });
1848
+ try {
1849
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1850
+ const sdkResponse = oci_common_2.composeResponse({
1851
+ responseObject: {},
1852
+ body: yield response.json(),
1853
+ bodyKey: "costAnomalyMonitorCollection",
1854
+ bodyModel: model.CostAnomalyMonitorCollection,
1855
+ type: "model.CostAnomalyMonitorCollection",
1856
+ responseHeaders: [
1857
+ {
1858
+ value: response.headers.get("opc-request-id"),
1859
+ key: "opcRequestId",
1860
+ dataType: "string"
1861
+ },
1862
+ {
1863
+ value: response.headers.get("opc-next-page"),
1864
+ key: "opcNextPage",
1865
+ dataType: "string"
1866
+ }
1867
+ ]
1868
+ });
1869
+ return sdkResponse;
1870
+ }
1871
+ catch (err) {
1872
+ throw err;
1873
+ }
1874
+ });
1875
+ }
1876
+ /**
1877
+ * Gets a list of Cost Anomaly Events analytics summary - aggregated metrics for a given time period.
1878
+ *
1879
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
1880
+ * @param SummarizeCostAnomalyEventAnalyticsRequest
1881
+ * @return SummarizeCostAnomalyEventAnalyticsResponse
1882
+ * @throws OciError when an error occurs
1883
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/budget/SummarizeCostAnomalyEventAnalytics.ts.html |here} to see how to use SummarizeCostAnomalyEventAnalytics API.
1884
+ */
1885
+ summarizeCostAnomalyEventAnalytics(summarizeCostAnomalyEventAnalyticsRequest) {
1886
+ return __awaiter(this, void 0, void 0, function* () {
1887
+ if (this.logger)
1888
+ this.logger.debug("Calling operation CostAdClient#summarizeCostAnomalyEventAnalytics.");
1889
+ const operationName = "summarizeCostAnomalyEventAnalytics";
1890
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/budgets/20190111/CostAnomalyEvent/SummarizeCostAnomalyEventAnalytics";
1891
+ const pathParams = {};
1892
+ const queryParams = {
1893
+ "compartmentId": summarizeCostAnomalyEventAnalyticsRequest.compartmentId,
1894
+ "limit": summarizeCostAnomalyEventAnalyticsRequest.limit,
1895
+ "page": summarizeCostAnomalyEventAnalyticsRequest.page,
1896
+ "sortOrder": summarizeCostAnomalyEventAnalyticsRequest.sortOrder,
1897
+ "sortBy": summarizeCostAnomalyEventAnalyticsRequest.sortBy,
1898
+ "name": summarizeCostAnomalyEventAnalyticsRequest.name,
1899
+ "costAnomalyMonitorId": summarizeCostAnomalyEventAnalyticsRequest.costAnomalyMonitorId,
1900
+ "targetTenantId": summarizeCostAnomalyEventAnalyticsRequest.targetTenantId,
1901
+ "timeAnomalyEventStartDate": summarizeCostAnomalyEventAnalyticsRequest.timeAnomalyEventStartDate,
1902
+ "timeAnomalyEventEndDate": summarizeCostAnomalyEventAnalyticsRequest.timeAnomalyEventEndDate,
1903
+ "region": summarizeCostAnomalyEventAnalyticsRequest.region,
1904
+ "costImpact": summarizeCostAnomalyEventAnalyticsRequest.costImpact,
1905
+ "costImpactPercentage": summarizeCostAnomalyEventAnalyticsRequest.costImpactPercentage
1906
+ };
1907
+ let headerParams = {
1908
+ "Content-Type": common.Constants.APPLICATION_JSON,
1909
+ "opc-request-id": summarizeCostAnomalyEventAnalyticsRequest.opcRequestId
1910
+ };
1911
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
1912
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, summarizeCostAnomalyEventAnalyticsRequest.retryConfiguration, specRetryConfiguration);
1913
+ if (this.logger)
1914
+ retrier.logger = this.logger;
1915
+ const request = yield oci_common_2.composeRequest({
1916
+ baseEndpoint: this._endpoint,
1917
+ defaultHeaders: this._defaultHeaders,
1918
+ path: "/costAnomalyEventAnalytics",
1919
+ method: "GET",
1920
+ pathParams: pathParams,
1921
+ headerParams: headerParams,
1922
+ queryParams: queryParams
1923
+ });
1924
+ try {
1925
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1926
+ const sdkResponse = oci_common_2.composeResponse({
1927
+ responseObject: {},
1928
+ body: yield response.json(),
1929
+ bodyKey: "costAnomalyEventAnalyticCollection",
1930
+ bodyModel: model.CostAnomalyEventAnalyticCollection,
1931
+ type: "model.CostAnomalyEventAnalyticCollection",
1932
+ responseHeaders: [
1933
+ {
1934
+ value: response.headers.get("opc-request-id"),
1935
+ key: "opcRequestId",
1936
+ dataType: "string"
1937
+ },
1938
+ {
1939
+ value: response.headers.get("opc-next-page"),
1940
+ key: "opcNextPage",
1941
+ dataType: "string"
1942
+ }
1943
+ ]
1944
+ });
1945
+ return sdkResponse;
1946
+ }
1947
+ catch (err) {
1948
+ throw err;
1949
+ }
1950
+ });
1951
+ }
1952
+ /**
1953
+ * Update a CostAlertSubscription identified by the OCID.
1954
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
1955
+ * @param UpdateCostAlertSubscriptionRequest
1956
+ * @return UpdateCostAlertSubscriptionResponse
1957
+ * @throws OciError when an error occurs
1958
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/budget/UpdateCostAlertSubscription.ts.html |here} to see how to use UpdateCostAlertSubscription API.
1959
+ */
1960
+ updateCostAlertSubscription(updateCostAlertSubscriptionRequest) {
1961
+ return __awaiter(this, void 0, void 0, function* () {
1962
+ if (this.logger)
1963
+ this.logger.debug("Calling operation CostAdClient#updateCostAlertSubscription.");
1964
+ const operationName = "updateCostAlertSubscription";
1965
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/budgets/20190111/CostAlertSubscription/UpdateCostAlertSubscription";
1966
+ const pathParams = {
1967
+ "{costAlertSubscriptionId}": updateCostAlertSubscriptionRequest.costAlertSubscriptionId
1968
+ };
1969
+ const queryParams = {};
1970
+ let headerParams = {
1971
+ "Content-Type": common.Constants.APPLICATION_JSON,
1972
+ "if-match": updateCostAlertSubscriptionRequest.ifMatch,
1973
+ "opc-request-id": updateCostAlertSubscriptionRequest.opcRequestId
1974
+ };
1975
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
1976
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, updateCostAlertSubscriptionRequest.retryConfiguration, specRetryConfiguration);
1977
+ if (this.logger)
1978
+ retrier.logger = this.logger;
1979
+ const request = yield oci_common_2.composeRequest({
1980
+ baseEndpoint: this._endpoint,
1981
+ defaultHeaders: this._defaultHeaders,
1982
+ path: "/costAlertSubscriptions/{costAlertSubscriptionId}",
1983
+ method: "PUT",
1984
+ bodyContent: common.ObjectSerializer.serialize(updateCostAlertSubscriptionRequest.updateCostAlertSubscriptionDetails, "UpdateCostAlertSubscriptionDetails", model.UpdateCostAlertSubscriptionDetails.getJsonObj),
1985
+ pathParams: pathParams,
1986
+ headerParams: headerParams,
1987
+ queryParams: queryParams
1988
+ });
1989
+ try {
1990
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1991
+ const sdkResponse = oci_common_2.composeResponse({
1992
+ responseObject: {},
1993
+ body: yield response.json(),
1994
+ bodyKey: "costAlertSubscription",
1995
+ bodyModel: model.CostAlertSubscription,
1996
+ type: "model.CostAlertSubscription",
1997
+ responseHeaders: [
1998
+ {
1999
+ value: response.headers.get("opc-request-id"),
2000
+ key: "opcRequestId",
2001
+ dataType: "string"
2002
+ },
2003
+ {
2004
+ value: response.headers.get("etag"),
2005
+ key: "etag",
2006
+ dataType: "string"
2007
+ }
2008
+ ]
2009
+ });
2010
+ return sdkResponse;
2011
+ }
2012
+ catch (err) {
2013
+ throw err;
2014
+ }
2015
+ });
2016
+ }
2017
+ /**
2018
+ * Update a CostAnomalyEvent identified by the OCID.
2019
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
2020
+ * @param UpdateCostAnomalyEventRequest
2021
+ * @return UpdateCostAnomalyEventResponse
2022
+ * @throws OciError when an error occurs
2023
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/budget/UpdateCostAnomalyEvent.ts.html |here} to see how to use UpdateCostAnomalyEvent API.
2024
+ */
2025
+ updateCostAnomalyEvent(updateCostAnomalyEventRequest) {
2026
+ return __awaiter(this, void 0, void 0, function* () {
2027
+ if (this.logger)
2028
+ this.logger.debug("Calling operation CostAdClient#updateCostAnomalyEvent.");
2029
+ const operationName = "updateCostAnomalyEvent";
2030
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/budgets/20190111/CostAnomalyEvent/UpdateCostAnomalyEvent";
2031
+ const pathParams = {
2032
+ "{costAnomalyEventId}": updateCostAnomalyEventRequest.costAnomalyEventId
2033
+ };
2034
+ const queryParams = {};
2035
+ let headerParams = {
2036
+ "Content-Type": common.Constants.APPLICATION_JSON,
2037
+ "if-match": updateCostAnomalyEventRequest.ifMatch,
2038
+ "opc-request-id": updateCostAnomalyEventRequest.opcRequestId
2039
+ };
2040
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
2041
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, updateCostAnomalyEventRequest.retryConfiguration, specRetryConfiguration);
2042
+ if (this.logger)
2043
+ retrier.logger = this.logger;
2044
+ const request = yield oci_common_2.composeRequest({
2045
+ baseEndpoint: this._endpoint,
2046
+ defaultHeaders: this._defaultHeaders,
2047
+ path: "/costAnomalyEvents/{costAnomalyEventId}",
2048
+ method: "PUT",
2049
+ bodyContent: common.ObjectSerializer.serialize(updateCostAnomalyEventRequest.updateCostAnomalyEventDetails, "UpdateCostAnomalyEventDetails", model.UpdateCostAnomalyEventDetails.getJsonObj),
2050
+ pathParams: pathParams,
2051
+ headerParams: headerParams,
2052
+ queryParams: queryParams
2053
+ });
2054
+ try {
2055
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
2056
+ const sdkResponse = oci_common_2.composeResponse({
2057
+ responseObject: {},
2058
+ body: yield response.json(),
2059
+ bodyKey: "costAnomalyEvent",
2060
+ bodyModel: model.CostAnomalyEvent,
2061
+ type: "model.CostAnomalyEvent",
2062
+ responseHeaders: [
2063
+ {
2064
+ value: response.headers.get("opc-request-id"),
2065
+ key: "opcRequestId",
2066
+ dataType: "string"
2067
+ },
2068
+ {
2069
+ value: response.headers.get("etag"),
2070
+ key: "etag",
2071
+ dataType: "string"
2072
+ }
2073
+ ]
2074
+ });
2075
+ return sdkResponse;
2076
+ }
2077
+ catch (err) {
2078
+ throw err;
2079
+ }
2080
+ });
2081
+ }
2082
+ /**
2083
+ * Update a CostAnomalyMonitor identified by the OCID.
2084
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
2085
+ * @param UpdateCostAnomalyMonitorRequest
2086
+ * @return UpdateCostAnomalyMonitorResponse
2087
+ * @throws OciError when an error occurs
2088
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/budget/UpdateCostAnomalyMonitor.ts.html |here} to see how to use UpdateCostAnomalyMonitor API.
2089
+ */
2090
+ updateCostAnomalyMonitor(updateCostAnomalyMonitorRequest) {
2091
+ return __awaiter(this, void 0, void 0, function* () {
2092
+ if (this.logger)
2093
+ this.logger.debug("Calling operation CostAdClient#updateCostAnomalyMonitor.");
2094
+ const operationName = "updateCostAnomalyMonitor";
2095
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/budgets/20190111/CostAnomalyMonitor/UpdateCostAnomalyMonitor";
2096
+ const pathParams = {
2097
+ "{costAnomalyMonitorId}": updateCostAnomalyMonitorRequest.costAnomalyMonitorId
2098
+ };
2099
+ const queryParams = {};
2100
+ let headerParams = {
2101
+ "Content-Type": common.Constants.APPLICATION_JSON,
2102
+ "if-match": updateCostAnomalyMonitorRequest.ifMatch,
2103
+ "opc-request-id": updateCostAnomalyMonitorRequest.opcRequestId
2104
+ };
2105
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
2106
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, updateCostAnomalyMonitorRequest.retryConfiguration, specRetryConfiguration);
2107
+ if (this.logger)
2108
+ retrier.logger = this.logger;
2109
+ const request = yield oci_common_2.composeRequest({
2110
+ baseEndpoint: this._endpoint,
2111
+ defaultHeaders: this._defaultHeaders,
2112
+ path: "/costAnomalyMonitors/{costAnomalyMonitorId}",
2113
+ method: "PUT",
2114
+ bodyContent: common.ObjectSerializer.serialize(updateCostAnomalyMonitorRequest.updateCostAnomalyMonitorDetails, "UpdateCostAnomalyMonitorDetails", model.UpdateCostAnomalyMonitorDetails.getJsonObj),
2115
+ pathParams: pathParams,
2116
+ headerParams: headerParams,
2117
+ queryParams: queryParams
2118
+ });
2119
+ try {
2120
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
2121
+ const sdkResponse = oci_common_2.composeResponse({
2122
+ responseObject: {},
2123
+ body: yield response.json(),
2124
+ bodyKey: "costAnomalyMonitor",
2125
+ bodyModel: model.CostAnomalyMonitor,
2126
+ type: "model.CostAnomalyMonitor",
2127
+ responseHeaders: [
2128
+ {
2129
+ value: response.headers.get("opc-request-id"),
2130
+ key: "opcRequestId",
2131
+ dataType: "string"
2132
+ },
2133
+ {
2134
+ value: response.headers.get("etag"),
2135
+ key: "etag",
2136
+ dataType: "string"
2137
+ }
2138
+ ]
2139
+ });
2140
+ return sdkResponse;
2141
+ }
2142
+ catch (err) {
2143
+ throw err;
2144
+ }
2145
+ });
2146
+ }
2147
+ }
2148
+ exports.CostAdClient = CostAdClient;
2149
+ CostAdClient.serviceEndpointTemplate = "https://usage.{region}.oci.{secondLevelDomain}";
2150
+ CostAdClient.endpointServiceName = "";
942
2151
  //# sourceMappingURL=client.js.map