oci-opensearch 2.37.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 (248) hide show
  1. package/LICENSE.txt +89 -0
  2. package/NOTICE.txt +1 -0
  3. package/README.md +22 -0
  4. package/THIRD_PARTY_LICENSES.txt +576 -0
  5. package/index.d.ts +25 -0
  6. package/index.js +48 -0
  7. package/index.js.map +1 -0
  8. package/lib/client.d.ts +298 -0
  9. package/lib/client.js +1413 -0
  10. package/lib/client.js.map +1 -0
  11. package/lib/model/action-type.d.ts +31 -0
  12. package/lib/model/action-type.js +42 -0
  13. package/lib/model/action-type.js.map +1 -0
  14. package/lib/model/backup-event-details.d.ts +46 -0
  15. package/lib/model/backup-event-details.js +29 -0
  16. package/lib/model/backup-event-details.js.map +1 -0
  17. package/lib/model/backup-opensearch-cluster-details.d.ts +29 -0
  18. package/lib/model/backup-opensearch-cluster-details.js +29 -0
  19. package/lib/model/backup-opensearch-cluster-details.js.map +1 -0
  20. package/lib/model/backup-state.d.ts +24 -0
  21. package/lib/model/backup-state.js +35 -0
  22. package/lib/model/backup-state.js.map +1 -0
  23. package/lib/model/change-opensearch-cluster-backup-compartment-details.d.ts +27 -0
  24. package/lib/model/change-opensearch-cluster-backup-compartment-details.js +29 -0
  25. package/lib/model/change-opensearch-cluster-backup-compartment-details.js.map +1 -0
  26. package/lib/model/change-opensearch-cluster-compartment-details.d.ts +27 -0
  27. package/lib/model/change-opensearch-cluster-compartment-details.js +29 -0
  28. package/lib/model/change-opensearch-cluster-compartment-details.js.map +1 -0
  29. package/lib/model/create-opensearch-cluster-details.d.ts +134 -0
  30. package/lib/model/create-opensearch-cluster-details.js +29 -0
  31. package/lib/model/create-opensearch-cluster-details.js.map +1 -0
  32. package/lib/model/data-node-host-type.d.ts +28 -0
  33. package/lib/model/data-node-host-type.js +39 -0
  34. package/lib/model/data-node-host-type.js.map +1 -0
  35. package/lib/model/export-opensearch-cluster-backup-details.d.ts +67 -0
  36. package/lib/model/export-opensearch-cluster-backup-details.js +29 -0
  37. package/lib/model/export-opensearch-cluster-backup-details.js.map +1 -0
  38. package/lib/model/get-manifest-response.d.ts +25 -0
  39. package/lib/model/get-manifest-response.js +29 -0
  40. package/lib/model/get-manifest-response.js.map +1 -0
  41. package/lib/model/index.d.ts +88 -0
  42. package/lib/model/index.js +111 -0
  43. package/lib/model/index.js.map +1 -0
  44. package/lib/model/master-node-host-type.d.ts +28 -0
  45. package/lib/model/master-node-host-type.js +39 -0
  46. package/lib/model/master-node-host-type.js.map +1 -0
  47. package/lib/model/opensearch-cluster-backup-collection.d.ts +26 -0
  48. package/lib/model/opensearch-cluster-backup-collection.js +61 -0
  49. package/lib/model/opensearch-cluster-backup-collection.js.map +1 -0
  50. package/lib/model/opensearch-cluster-backup-summary.d.ts +97 -0
  51. package/lib/model/opensearch-cluster-backup-summary.js +29 -0
  52. package/lib/model/opensearch-cluster-backup-summary.js.map +1 -0
  53. package/lib/model/opensearch-cluster-backup.d.ts +133 -0
  54. package/lib/model/opensearch-cluster-backup.js +53 -0
  55. package/lib/model/opensearch-cluster-backup.js.map +1 -0
  56. package/lib/model/opensearch-cluster-collection.d.ts +26 -0
  57. package/lib/model/opensearch-cluster-collection.js +61 -0
  58. package/lib/model/opensearch-cluster-collection.js.map +1 -0
  59. package/lib/model/opensearch-cluster-summary.d.ts +93 -0
  60. package/lib/model/opensearch-cluster-summary.js +29 -0
  61. package/lib/model/opensearch-cluster-summary.js.map +1 -0
  62. package/lib/model/opensearch-cluster.d.ts +201 -0
  63. package/lib/model/opensearch-cluster.js +43 -0
  64. package/lib/model/opensearch-cluster.js.map +1 -0
  65. package/lib/model/opensearch-versions-collection.d.ts +26 -0
  66. package/lib/model/opensearch-versions-collection.js +61 -0
  67. package/lib/model/opensearch-versions-collection.js.map +1 -0
  68. package/lib/model/opensearch-versions-summary.d.ts +25 -0
  69. package/lib/model/opensearch-versions-summary.js +29 -0
  70. package/lib/model/opensearch-versions-summary.js.map +1 -0
  71. package/lib/model/operation-status.d.ts +32 -0
  72. package/lib/model/operation-status.js +43 -0
  73. package/lib/model/operation-status.js.map +1 -0
  74. package/lib/model/operation-type.d.ts +35 -0
  75. package/lib/model/operation-type.js +46 -0
  76. package/lib/model/operation-type.js.map +1 -0
  77. package/lib/model/resize-opensearch-cluster-horizontal-details.d.ts +51 -0
  78. package/lib/model/resize-opensearch-cluster-horizontal-details.js +29 -0
  79. package/lib/model/resize-opensearch-cluster-horizontal-details.js.map +1 -0
  80. package/lib/model/resize-opensearch-cluster-vertical-details.d.ts +67 -0
  81. package/lib/model/resize-opensearch-cluster-vertical-details.js +29 -0
  82. package/lib/model/resize-opensearch-cluster-vertical-details.js.map +1 -0
  83. package/lib/model/restore-opensearch-cluster-backup-details.d.ts +25 -0
  84. package/lib/model/restore-opensearch-cluster-backup-details.js +29 -0
  85. package/lib/model/restore-opensearch-cluster-backup-details.js.map +1 -0
  86. package/lib/model/restore-opensearch-cluster-details.d.ts +33 -0
  87. package/lib/model/restore-opensearch-cluster-details.js +29 -0
  88. package/lib/model/restore-opensearch-cluster-details.js.map +1 -0
  89. package/lib/model/sort-order.d.ts +23 -0
  90. package/lib/model/sort-order.js +34 -0
  91. package/lib/model/sort-order.js.map +1 -0
  92. package/lib/model/update-checkin-details.d.ts +25 -0
  93. package/lib/model/update-checkin-details.js +29 -0
  94. package/lib/model/update-checkin-details.js.map +1 -0
  95. package/lib/model/update-cluster-hardened-image-details.d.ts +25 -0
  96. package/lib/model/update-cluster-hardened-image-details.js +29 -0
  97. package/lib/model/update-cluster-hardened-image-details.js.map +1 -0
  98. package/lib/model/update-cluster-status-details.d.ts +29 -0
  99. package/lib/model/update-cluster-status-details.js +29 -0
  100. package/lib/model/update-cluster-status-details.js.map +1 -0
  101. package/lib/model/update-opensearch-cluster-backup-details.d.ts +43 -0
  102. package/lib/model/update-opensearch-cluster-backup-details.js +29 -0
  103. package/lib/model/update-opensearch-cluster-backup-details.js.map +1 -0
  104. package/lib/model/update-opensearch-cluster-details.d.ts +44 -0
  105. package/lib/model/update-opensearch-cluster-details.js +29 -0
  106. package/lib/model/update-opensearch-cluster-details.js.map +1 -0
  107. package/lib/model/work-request-collection.d.ts +26 -0
  108. package/lib/model/work-request-collection.js +61 -0
  109. package/lib/model/work-request-collection.js.map +1 -0
  110. package/lib/model/work-request-error-collection.d.ts +26 -0
  111. package/lib/model/work-request-error-collection.js +61 -0
  112. package/lib/model/work-request-error-collection.js.map +1 -0
  113. package/lib/model/work-request-error.d.ts +34 -0
  114. package/lib/model/work-request-error.js +29 -0
  115. package/lib/model/work-request-error.js.map +1 -0
  116. package/lib/model/work-request-log-entry-collection.d.ts +26 -0
  117. package/lib/model/work-request-log-entry-collection.js +61 -0
  118. package/lib/model/work-request-log-entry-collection.js.map +1 -0
  119. package/lib/model/work-request-log-entry.d.ts +29 -0
  120. package/lib/model/work-request-log-entry.js +29 -0
  121. package/lib/model/work-request-log-entry.js.map +1 -0
  122. package/lib/model/work-request-resource.d.ts +42 -0
  123. package/lib/model/work-request-resource.js +29 -0
  124. package/lib/model/work-request-resource.js.map +1 -0
  125. package/lib/model/work-request.d.ts +58 -0
  126. package/lib/model/work-request.js +61 -0
  127. package/lib/model/work-request.js.map +1 -0
  128. package/lib/opensearchcluster-waiter.d.ts +36 -0
  129. package/lib/opensearchcluster-waiter.js +76 -0
  130. package/lib/opensearchcluster-waiter.js.map +1 -0
  131. package/lib/opensearchclusterbackup-waiter.d.ts +29 -0
  132. package/lib/opensearchclusterbackup-waiter.js +65 -0
  133. package/lib/opensearchclusterbackup-waiter.js.map +1 -0
  134. package/lib/request/backup-opensearch-cluster-request.d.ts +49 -0
  135. package/lib/request/backup-opensearch-cluster-request.js +15 -0
  136. package/lib/request/backup-opensearch-cluster-request.js.map +1 -0
  137. package/lib/request/create-opensearch-cluster-request.d.ts +36 -0
  138. package/lib/request/create-opensearch-cluster-request.js +15 -0
  139. package/lib/request/create-opensearch-cluster-request.js.map +1 -0
  140. package/lib/request/delete-opensearch-cluster-backup-request.d.ts +35 -0
  141. package/lib/request/delete-opensearch-cluster-backup-request.js +15 -0
  142. package/lib/request/delete-opensearch-cluster-backup-request.js.map +1 -0
  143. package/lib/request/delete-opensearch-cluster-request.d.ts +35 -0
  144. package/lib/request/delete-opensearch-cluster-request.js +15 -0
  145. package/lib/request/delete-opensearch-cluster-request.js.map +1 -0
  146. package/lib/request/get-opensearch-cluster-backup-request.d.ts +26 -0
  147. package/lib/request/get-opensearch-cluster-backup-request.js +15 -0
  148. package/lib/request/get-opensearch-cluster-backup-request.js.map +1 -0
  149. package/lib/request/get-opensearch-cluster-request.d.ts +26 -0
  150. package/lib/request/get-opensearch-cluster-request.js +15 -0
  151. package/lib/request/get-opensearch-cluster-request.js.map +1 -0
  152. package/lib/request/get-work-request-request.d.ts +26 -0
  153. package/lib/request/get-work-request-request.js +15 -0
  154. package/lib/request/get-work-request-request.js.map +1 -0
  155. package/lib/request/index.d.ts +48 -0
  156. package/lib/request/index.js +39 -0
  157. package/lib/request/index.js.map +1 -0
  158. package/lib/request/list-opensearch-cluster-backups-request.d.ts +66 -0
  159. package/lib/request/list-opensearch-cluster-backups-request.js +24 -0
  160. package/lib/request/list-opensearch-cluster-backups-request.js.map +1 -0
  161. package/lib/request/list-opensearch-clusters-request.d.ts +62 -0
  162. package/lib/request/list-opensearch-clusters-request.js +24 -0
  163. package/lib/request/list-opensearch-clusters-request.js.map +1 -0
  164. package/lib/request/list-opensearch-versions-request.d.ts +30 -0
  165. package/lib/request/list-opensearch-versions-request.js +15 -0
  166. package/lib/request/list-opensearch-versions-request.js.map +1 -0
  167. package/lib/request/list-work-request-errors-request.d.ts +34 -0
  168. package/lib/request/list-work-request-errors-request.js +15 -0
  169. package/lib/request/list-work-request-errors-request.js.map +1 -0
  170. package/lib/request/list-work-request-logs-request.d.ts +34 -0
  171. package/lib/request/list-work-request-logs-request.js +15 -0
  172. package/lib/request/list-work-request-logs-request.js.map +1 -0
  173. package/lib/request/list-work-requests-request.d.ts +42 -0
  174. package/lib/request/list-work-requests-request.js +15 -0
  175. package/lib/request/list-work-requests-request.js.map +1 -0
  176. package/lib/request/opensearch-cluster-restore-request.d.ts +49 -0
  177. package/lib/request/opensearch-cluster-restore-request.js +15 -0
  178. package/lib/request/opensearch-cluster-restore-request.js.map +1 -0
  179. package/lib/request/resize-opensearch-cluster-horizontal-request.d.ts +49 -0
  180. package/lib/request/resize-opensearch-cluster-horizontal-request.js +15 -0
  181. package/lib/request/resize-opensearch-cluster-horizontal-request.js.map +1 -0
  182. package/lib/request/resize-opensearch-cluster-vertical-request.d.ts +49 -0
  183. package/lib/request/resize-opensearch-cluster-vertical-request.js +15 -0
  184. package/lib/request/resize-opensearch-cluster-vertical-request.js.map +1 -0
  185. package/lib/request/update-opensearch-cluster-backup-request.d.ts +40 -0
  186. package/lib/request/update-opensearch-cluster-backup-request.js +15 -0
  187. package/lib/request/update-opensearch-cluster-backup-request.js.map +1 -0
  188. package/lib/request/update-opensearch-cluster-request.d.ts +40 -0
  189. package/lib/request/update-opensearch-cluster-request.js +15 -0
  190. package/lib/request/update-opensearch-cluster-request.js.map +1 -0
  191. package/lib/response/backup-opensearch-cluster-response.d.ts +25 -0
  192. package/lib/response/backup-opensearch-cluster-response.js +15 -0
  193. package/lib/response/backup-opensearch-cluster-response.js.map +1 -0
  194. package/lib/response/create-opensearch-cluster-response.d.ts +25 -0
  195. package/lib/response/create-opensearch-cluster-response.js +15 -0
  196. package/lib/response/create-opensearch-cluster-response.js.map +1 -0
  197. package/lib/response/delete-opensearch-cluster-backup-response.d.ts +25 -0
  198. package/lib/response/delete-opensearch-cluster-backup-response.js +15 -0
  199. package/lib/response/delete-opensearch-cluster-backup-response.js.map +1 -0
  200. package/lib/response/delete-opensearch-cluster-response.d.ts +25 -0
  201. package/lib/response/delete-opensearch-cluster-response.js +15 -0
  202. package/lib/response/delete-opensearch-cluster-response.js.map +1 -0
  203. package/lib/response/get-opensearch-cluster-backup-response.d.ts +30 -0
  204. package/lib/response/get-opensearch-cluster-backup-response.js +15 -0
  205. package/lib/response/get-opensearch-cluster-backup-response.js.map +1 -0
  206. package/lib/response/get-opensearch-cluster-response.d.ts +30 -0
  207. package/lib/response/get-opensearch-cluster-response.js +15 -0
  208. package/lib/response/get-opensearch-cluster-response.js.map +1 -0
  209. package/lib/response/get-work-request-response.d.ts +29 -0
  210. package/lib/response/get-work-request-response.js +15 -0
  211. package/lib/response/get-work-request-response.js.map +1 -0
  212. package/lib/response/index.d.ts +48 -0
  213. package/lib/response/index.js +15 -0
  214. package/lib/response/index.js.map +1 -0
  215. package/lib/response/list-opensearch-cluster-backups-response.d.ts +32 -0
  216. package/lib/response/list-opensearch-cluster-backups-response.js +15 -0
  217. package/lib/response/list-opensearch-cluster-backups-response.js.map +1 -0
  218. package/lib/response/list-opensearch-clusters-response.d.ts +32 -0
  219. package/lib/response/list-opensearch-clusters-response.js +15 -0
  220. package/lib/response/list-opensearch-clusters-response.js.map +1 -0
  221. package/lib/response/list-opensearch-versions-response.d.ts +32 -0
  222. package/lib/response/list-opensearch-versions-response.js +15 -0
  223. package/lib/response/list-opensearch-versions-response.js.map +1 -0
  224. package/lib/response/list-work-request-errors-response.d.ts +32 -0
  225. package/lib/response/list-work-request-errors-response.js +15 -0
  226. package/lib/response/list-work-request-errors-response.js.map +1 -0
  227. package/lib/response/list-work-request-logs-response.d.ts +32 -0
  228. package/lib/response/list-work-request-logs-response.js +15 -0
  229. package/lib/response/list-work-request-logs-response.js.map +1 -0
  230. package/lib/response/list-work-requests-response.d.ts +32 -0
  231. package/lib/response/list-work-requests-response.js +15 -0
  232. package/lib/response/list-work-requests-response.js.map +1 -0
  233. package/lib/response/opensearch-cluster-restore-response.d.ts +25 -0
  234. package/lib/response/opensearch-cluster-restore-response.js +15 -0
  235. package/lib/response/opensearch-cluster-restore-response.js.map +1 -0
  236. package/lib/response/resize-opensearch-cluster-horizontal-response.d.ts +25 -0
  237. package/lib/response/resize-opensearch-cluster-horizontal-response.js +15 -0
  238. package/lib/response/resize-opensearch-cluster-horizontal-response.js.map +1 -0
  239. package/lib/response/resize-opensearch-cluster-vertical-response.d.ts +25 -0
  240. package/lib/response/resize-opensearch-cluster-vertical-response.js +15 -0
  241. package/lib/response/resize-opensearch-cluster-vertical-response.js.map +1 -0
  242. package/lib/response/update-opensearch-cluster-backup-response.d.ts +25 -0
  243. package/lib/response/update-opensearch-cluster-backup-response.js +15 -0
  244. package/lib/response/update-opensearch-cluster-backup-response.js.map +1 -0
  245. package/lib/response/update-opensearch-cluster-response.d.ts +25 -0
  246. package/lib/response/update-opensearch-cluster-response.js +15 -0
  247. package/lib/response/update-opensearch-cluster-response.js.map +1 -0
  248. package/package.json +29 -0
package/lib/client.js ADDED
@@ -0,0 +1,1413 @@
1
+ "use strict";
2
+ /**
3
+ * OpenSearch Service API
4
+ * The OpenSearch service API provides access to OCI Search Service with OpenSearch.
5
+ * OpenAPI spec version: 20180828
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OracleSDKGenerator.
9
+ * Do not edit the class manually.
10
+ *
11
+ * Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
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
+ */
14
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
15
+ if (k2 === undefined) k2 = k;
16
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
17
+ }) : (function(o, m, k, k2) {
18
+ if (k2 === undefined) k2 = k;
19
+ o[k2] = m[k];
20
+ }));
21
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
22
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
23
+ }) : function(o, v) {
24
+ o["default"] = v;
25
+ });
26
+ var __importStar = (this && this.__importStar) || function (mod) {
27
+ if (mod && mod.__esModule) return mod;
28
+ var result = {};
29
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
30
+ __setModuleDefault(result, mod);
31
+ return result;
32
+ };
33
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
34
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
35
+ return new (P || (P = Promise))(function (resolve, reject) {
36
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
37
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
38
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
39
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
40
+ });
41
+ };
42
+ Object.defineProperty(exports, "__esModule", { value: true });
43
+ exports.OpensearchClusterBackupClient = exports.OpensearchClusterBackupApiKeys = exports.OpensearchClusterClient = exports.OpensearchClusterApiKeys = void 0;
44
+ const common = require("oci-common");
45
+ const model = __importStar(require("./model"));
46
+ const opensearchcluster_waiter_1 = require("./opensearchcluster-waiter");
47
+ const opensearchclusterbackup_waiter_1 = require("./opensearchclusterbackup-waiter");
48
+ const oci_common_1 = require("oci-common");
49
+ // ===============================================
50
+ // This file is autogenerated - Please do not edit
51
+ // ===============================================
52
+ var OpensearchClusterApiKeys;
53
+ (function (OpensearchClusterApiKeys) {
54
+ })(OpensearchClusterApiKeys = exports.OpensearchClusterApiKeys || (exports.OpensearchClusterApiKeys = {}));
55
+ /**
56
+ * This service client uses {@link common.CircuitBreaker.DefaultConfiguration} for all the operations by default if no circuit breaker configuration is defined by the user.
57
+ */
58
+ class OpensearchClusterClient {
59
+ constructor(params, clientConfiguration) {
60
+ this["_endpoint"] = "";
61
+ this["_defaultHeaders"] = {};
62
+ this._circuitBreaker = null;
63
+ this._httpOptions = undefined;
64
+ this.targetService = "OpensearchCluster";
65
+ const requestSigner = params.authenticationDetailsProvider
66
+ ? new common.DefaultRequestSigner(params.authenticationDetailsProvider)
67
+ : null;
68
+ if (clientConfiguration) {
69
+ this._clientConfiguration = clientConfiguration;
70
+ this._circuitBreaker = clientConfiguration.circuitBreaker
71
+ ? clientConfiguration.circuitBreaker.circuit
72
+ : null;
73
+ this._httpOptions = clientConfiguration.httpOptions
74
+ ? clientConfiguration.httpOptions
75
+ : undefined;
76
+ }
77
+ // if circuit breaker is not created, check if circuit breaker system is enabled to use default circuit breaker
78
+ const specCircuitBreakerEnabled = true;
79
+ if (!this._circuitBreaker &&
80
+ common.utils.isCircuitBreakerSystemEnabled(clientConfiguration) &&
81
+ (specCircuitBreakerEnabled || common.CircuitBreaker.DefaultCircuitBreakerOverriden)) {
82
+ this._circuitBreaker = new common.CircuitBreaker().circuit;
83
+ }
84
+ this._httpClient =
85
+ params.httpClient ||
86
+ new common.FetchHttpClient(requestSigner, this._circuitBreaker, this._httpOptions);
87
+ if (params.authenticationDetailsProvider &&
88
+ common.isRegionProvider(params.authenticationDetailsProvider)) {
89
+ const provider = params.authenticationDetailsProvider;
90
+ if (provider.getRegion()) {
91
+ this.region = provider.getRegion();
92
+ }
93
+ }
94
+ }
95
+ /**
96
+ * Get the endpoint that is being used to call (ex, https://www.example.com).
97
+ */
98
+ get endpoint() {
99
+ return this._endpoint;
100
+ }
101
+ /**
102
+ * Sets the endpoint to call (ex, https://www.example.com).
103
+ * @param endpoint The endpoint of the service.
104
+ */
105
+ set endpoint(endpoint) {
106
+ this._endpoint = endpoint;
107
+ this._endpoint = this._endpoint + "/20180828";
108
+ if (this.logger)
109
+ this.logger.info(`OpensearchClusterClient endpoint set to ${this._endpoint}`);
110
+ }
111
+ get logger() {
112
+ return common.LOG.logger;
113
+ }
114
+ /**
115
+ * Sets the region to call (ex, Region.US_PHOENIX_1).
116
+ * Note, this will call {@link #endpoint(String) endpoint} after resolving the endpoint.
117
+ * @param region The region of the service.
118
+ */
119
+ set region(region) {
120
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegion(OpensearchClusterClient.serviceEndpointTemplate, region, OpensearchClusterClient.endpointServiceName);
121
+ }
122
+ /**
123
+ * Sets the regionId to call (ex, 'us-phoenix-1').
124
+ *
125
+ * Note, this will first try to map the region ID to a known Region and call {@link #region(Region) region}.
126
+ * If no known Region could be determined, it will create an endpoint assuming its in default Realm OC1
127
+ * and then call {@link #endpoint(String) endpoint}.
128
+ * @param regionId The public region ID.
129
+ */
130
+ set regionId(regionId) {
131
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(OpensearchClusterClient.serviceEndpointTemplate, regionId, OpensearchClusterClient.endpointServiceName);
132
+ }
133
+ /**
134
+ * Creates a new OpensearchClusterWaiter for resources for this service.
135
+ *
136
+ * @param config The waiter configuration for termination and delay strategy
137
+ * @return The service waiters.
138
+ */
139
+ createWaiters(config) {
140
+ this._waiters = new opensearchcluster_waiter_1.OpensearchClusterWaiter(this, config);
141
+ return this._waiters;
142
+ }
143
+ /**
144
+ * Gets the waiters available for resources for this service.
145
+ *
146
+ * @return The service waiters.
147
+ */
148
+ getWaiters() {
149
+ if (this._waiters) {
150
+ return this._waiters;
151
+ }
152
+ throw Error("Waiters do not exist. Please create waiters.");
153
+ }
154
+ /**
155
+ * Backup the opensearch cluster details.
156
+ * This operation does not retry by default if the user has not defined a retry configuration.
157
+ * @param BackupOpensearchClusterRequest
158
+ * @return BackupOpensearchClusterResponse
159
+ * @throws OciError when an error occurs
160
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.37.0/opensearch/BackupOpensearchCluster.ts.html |here} to see how to use BackupOpensearchCluster API.
161
+ */
162
+ backupOpensearchCluster(backupOpensearchClusterRequest) {
163
+ return __awaiter(this, void 0, void 0, function* () {
164
+ if (this.logger)
165
+ this.logger.debug("Calling operation OpensearchClusterClient#backupOpensearchCluster.");
166
+ const operationName = "backupOpensearchCluster";
167
+ const apiReferenceLink = "";
168
+ const pathParams = {
169
+ "{opensearchClusterId}": backupOpensearchClusterRequest.opensearchClusterId
170
+ };
171
+ const queryParams = {};
172
+ let headerParams = {
173
+ "Content-Type": common.Constants.APPLICATION_JSON,
174
+ "if-match": backupOpensearchClusterRequest.ifMatch,
175
+ "opc-retry-token": backupOpensearchClusterRequest.opcRetryToken,
176
+ "opc-request-id": backupOpensearchClusterRequest.opcRequestId
177
+ };
178
+ const specRetryConfiguration = common.NoRetryConfigurationDetails;
179
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, backupOpensearchClusterRequest.retryConfiguration, specRetryConfiguration);
180
+ if (this.logger)
181
+ retrier.logger = this.logger;
182
+ const request = yield oci_common_1.composeRequest({
183
+ baseEndpoint: this._endpoint,
184
+ defaultHeaders: this._defaultHeaders,
185
+ path: "/opensearchClusters/{opensearchClusterId}/actions/backup",
186
+ method: "POST",
187
+ bodyContent: common.ObjectSerializer.serialize(backupOpensearchClusterRequest.backupOpensearchClusterDetails, "BackupOpensearchClusterDetails", model.BackupOpensearchClusterDetails.getJsonObj),
188
+ pathParams: pathParams,
189
+ headerParams: headerParams,
190
+ queryParams: queryParams
191
+ });
192
+ try {
193
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
194
+ const sdkResponse = oci_common_1.composeResponse({
195
+ responseObject: {},
196
+ responseHeaders: [
197
+ {
198
+ value: response.headers.get("opc-work-request-id"),
199
+ key: "opcWorkRequestId",
200
+ dataType: "string"
201
+ },
202
+ {
203
+ value: response.headers.get("opc-request-id"),
204
+ key: "opcRequestId",
205
+ dataType: "string"
206
+ }
207
+ ]
208
+ });
209
+ return sdkResponse;
210
+ }
211
+ catch (err) {
212
+ throw err;
213
+ }
214
+ });
215
+ }
216
+ /**
217
+ * Creates a new OpensearchCluster.
218
+ *
219
+ * This operation does not retry by default if the user has not defined a retry configuration.
220
+ * @param CreateOpensearchClusterRequest
221
+ * @return CreateOpensearchClusterResponse
222
+ * @throws OciError when an error occurs
223
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.37.0/opensearch/CreateOpensearchCluster.ts.html |here} to see how to use CreateOpensearchCluster API.
224
+ */
225
+ createOpensearchCluster(createOpensearchClusterRequest) {
226
+ return __awaiter(this, void 0, void 0, function* () {
227
+ if (this.logger)
228
+ this.logger.debug("Calling operation OpensearchClusterClient#createOpensearchCluster.");
229
+ const operationName = "createOpensearchCluster";
230
+ const apiReferenceLink = "";
231
+ const pathParams = {};
232
+ const queryParams = {};
233
+ let headerParams = {
234
+ "Content-Type": common.Constants.APPLICATION_JSON,
235
+ "opc-retry-token": createOpensearchClusterRequest.opcRetryToken,
236
+ "opc-request-id": createOpensearchClusterRequest.opcRequestId
237
+ };
238
+ const specRetryConfiguration = common.NoRetryConfigurationDetails;
239
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, createOpensearchClusterRequest.retryConfiguration, specRetryConfiguration);
240
+ if (this.logger)
241
+ retrier.logger = this.logger;
242
+ const request = yield oci_common_1.composeRequest({
243
+ baseEndpoint: this._endpoint,
244
+ defaultHeaders: this._defaultHeaders,
245
+ path: "/opensearchClusters",
246
+ method: "POST",
247
+ bodyContent: common.ObjectSerializer.serialize(createOpensearchClusterRequest.createOpensearchClusterDetails, "CreateOpensearchClusterDetails", model.CreateOpensearchClusterDetails.getJsonObj),
248
+ pathParams: pathParams,
249
+ headerParams: headerParams,
250
+ queryParams: queryParams
251
+ });
252
+ try {
253
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
254
+ const sdkResponse = oci_common_1.composeResponse({
255
+ responseObject: {},
256
+ responseHeaders: [
257
+ {
258
+ value: response.headers.get("opc-work-request-id"),
259
+ key: "opcWorkRequestId",
260
+ dataType: "string"
261
+ },
262
+ {
263
+ value: response.headers.get("opc-request-id"),
264
+ key: "opcRequestId",
265
+ dataType: "string"
266
+ }
267
+ ]
268
+ });
269
+ return sdkResponse;
270
+ }
271
+ catch (err) {
272
+ throw err;
273
+ }
274
+ });
275
+ }
276
+ /**
277
+ * Deletes a OpensearchCluster resource by identifier
278
+ * This operation does not retry by default if the user has not defined a retry configuration.
279
+ * @param DeleteOpensearchClusterRequest
280
+ * @return DeleteOpensearchClusterResponse
281
+ * @throws OciError when an error occurs
282
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.37.0/opensearch/DeleteOpensearchCluster.ts.html |here} to see how to use DeleteOpensearchCluster API.
283
+ */
284
+ deleteOpensearchCluster(deleteOpensearchClusterRequest) {
285
+ return __awaiter(this, void 0, void 0, function* () {
286
+ if (this.logger)
287
+ this.logger.debug("Calling operation OpensearchClusterClient#deleteOpensearchCluster.");
288
+ const operationName = "deleteOpensearchCluster";
289
+ const apiReferenceLink = "";
290
+ const pathParams = {
291
+ "{opensearchClusterId}": deleteOpensearchClusterRequest.opensearchClusterId
292
+ };
293
+ const queryParams = {};
294
+ let headerParams = {
295
+ "Content-Type": common.Constants.APPLICATION_JSON,
296
+ "if-match": deleteOpensearchClusterRequest.ifMatch,
297
+ "opc-request-id": deleteOpensearchClusterRequest.opcRequestId
298
+ };
299
+ const specRetryConfiguration = common.NoRetryConfigurationDetails;
300
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, deleteOpensearchClusterRequest.retryConfiguration, specRetryConfiguration);
301
+ if (this.logger)
302
+ retrier.logger = this.logger;
303
+ const request = yield oci_common_1.composeRequest({
304
+ baseEndpoint: this._endpoint,
305
+ defaultHeaders: this._defaultHeaders,
306
+ path: "/opensearchClusters/{opensearchClusterId}",
307
+ method: "DELETE",
308
+ pathParams: pathParams,
309
+ headerParams: headerParams,
310
+ queryParams: queryParams
311
+ });
312
+ try {
313
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
314
+ const sdkResponse = oci_common_1.composeResponse({
315
+ responseObject: {},
316
+ responseHeaders: [
317
+ {
318
+ value: response.headers.get("opc-work-request-id"),
319
+ key: "opcWorkRequestId",
320
+ dataType: "string"
321
+ },
322
+ {
323
+ value: response.headers.get("opc-request-id"),
324
+ key: "opcRequestId",
325
+ dataType: "string"
326
+ }
327
+ ]
328
+ });
329
+ return sdkResponse;
330
+ }
331
+ catch (err) {
332
+ throw err;
333
+ }
334
+ });
335
+ }
336
+ /**
337
+ * Gets a OpensearchCluster by identifier
338
+ * This operation does not retry by default if the user has not defined a retry configuration.
339
+ * @param GetOpensearchClusterRequest
340
+ * @return GetOpensearchClusterResponse
341
+ * @throws OciError when an error occurs
342
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.37.0/opensearch/GetOpensearchCluster.ts.html |here} to see how to use GetOpensearchCluster API.
343
+ */
344
+ getOpensearchCluster(getOpensearchClusterRequest) {
345
+ return __awaiter(this, void 0, void 0, function* () {
346
+ if (this.logger)
347
+ this.logger.debug("Calling operation OpensearchClusterClient#getOpensearchCluster.");
348
+ const operationName = "getOpensearchCluster";
349
+ const apiReferenceLink = "";
350
+ const pathParams = {
351
+ "{opensearchClusterId}": getOpensearchClusterRequest.opensearchClusterId
352
+ };
353
+ const queryParams = {};
354
+ let headerParams = {
355
+ "Content-Type": common.Constants.APPLICATION_JSON,
356
+ "opc-request-id": getOpensearchClusterRequest.opcRequestId
357
+ };
358
+ const specRetryConfiguration = common.NoRetryConfigurationDetails;
359
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getOpensearchClusterRequest.retryConfiguration, specRetryConfiguration);
360
+ if (this.logger)
361
+ retrier.logger = this.logger;
362
+ const request = yield oci_common_1.composeRequest({
363
+ baseEndpoint: this._endpoint,
364
+ defaultHeaders: this._defaultHeaders,
365
+ path: "/opensearchClusters/{opensearchClusterId}",
366
+ method: "GET",
367
+ pathParams: pathParams,
368
+ headerParams: headerParams,
369
+ queryParams: queryParams
370
+ });
371
+ try {
372
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
373
+ const sdkResponse = oci_common_1.composeResponse({
374
+ responseObject: {},
375
+ body: yield response.json(),
376
+ bodyKey: "opensearchCluster",
377
+ bodyModel: model.OpensearchCluster,
378
+ type: "model.OpensearchCluster",
379
+ responseHeaders: [
380
+ {
381
+ value: response.headers.get("etag"),
382
+ key: "etag",
383
+ dataType: "string"
384
+ },
385
+ {
386
+ value: response.headers.get("opc-request-id"),
387
+ key: "opcRequestId",
388
+ dataType: "string"
389
+ }
390
+ ]
391
+ });
392
+ return sdkResponse;
393
+ }
394
+ catch (err) {
395
+ throw err;
396
+ }
397
+ });
398
+ }
399
+ /**
400
+ * Gets the status of the work request with the given ID.
401
+ * This operation does not retry by default if the user has not defined a retry configuration.
402
+ * @param GetWorkRequestRequest
403
+ * @return GetWorkRequestResponse
404
+ * @throws OciError when an error occurs
405
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.37.0/opensearch/GetWorkRequest.ts.html |here} to see how to use GetWorkRequest API.
406
+ */
407
+ getWorkRequest(getWorkRequestRequest) {
408
+ return __awaiter(this, void 0, void 0, function* () {
409
+ if (this.logger)
410
+ this.logger.debug("Calling operation OpensearchClusterClient#getWorkRequest.");
411
+ const operationName = "getWorkRequest";
412
+ const apiReferenceLink = "";
413
+ const pathParams = {
414
+ "{workRequestId}": getWorkRequestRequest.workRequestId
415
+ };
416
+ const queryParams = {};
417
+ let headerParams = {
418
+ "Content-Type": common.Constants.APPLICATION_JSON,
419
+ "opc-request-id": getWorkRequestRequest.opcRequestId
420
+ };
421
+ const specRetryConfiguration = common.NoRetryConfigurationDetails;
422
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getWorkRequestRequest.retryConfiguration, specRetryConfiguration);
423
+ if (this.logger)
424
+ retrier.logger = this.logger;
425
+ const request = yield oci_common_1.composeRequest({
426
+ baseEndpoint: this._endpoint,
427
+ defaultHeaders: this._defaultHeaders,
428
+ path: "/workRequests/{workRequestId}",
429
+ method: "GET",
430
+ pathParams: pathParams,
431
+ headerParams: headerParams,
432
+ queryParams: queryParams
433
+ });
434
+ try {
435
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
436
+ const sdkResponse = oci_common_1.composeResponse({
437
+ responseObject: {},
438
+ body: yield response.json(),
439
+ bodyKey: "workRequest",
440
+ bodyModel: model.WorkRequest,
441
+ type: "model.WorkRequest",
442
+ responseHeaders: [
443
+ {
444
+ value: response.headers.get("opc-request-id"),
445
+ key: "opcRequestId",
446
+ dataType: "string"
447
+ },
448
+ {
449
+ value: response.headers.get("retry-after"),
450
+ key: "retryAfter",
451
+ dataType: "number"
452
+ }
453
+ ]
454
+ });
455
+ return sdkResponse;
456
+ }
457
+ catch (err) {
458
+ throw err;
459
+ }
460
+ });
461
+ }
462
+ /**
463
+ * Returns a list of OpensearchClusters.
464
+ *
465
+ * This operation does not retry by default if the user has not defined a retry configuration.
466
+ * @param ListOpensearchClustersRequest
467
+ * @return ListOpensearchClustersResponse
468
+ * @throws OciError when an error occurs
469
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.37.0/opensearch/ListOpensearchClusters.ts.html |here} to see how to use ListOpensearchClusters API.
470
+ */
471
+ listOpensearchClusters(listOpensearchClustersRequest) {
472
+ return __awaiter(this, void 0, void 0, function* () {
473
+ if (this.logger)
474
+ this.logger.debug("Calling operation OpensearchClusterClient#listOpensearchClusters.");
475
+ const operationName = "listOpensearchClusters";
476
+ const apiReferenceLink = "";
477
+ const pathParams = {};
478
+ const queryParams = {
479
+ "compartmentId": listOpensearchClustersRequest.compartmentId,
480
+ "lifecycleState": listOpensearchClustersRequest.lifecycleState,
481
+ "displayName": listOpensearchClustersRequest.displayName,
482
+ "id": listOpensearchClustersRequest.id,
483
+ "limit": listOpensearchClustersRequest.limit,
484
+ "page": listOpensearchClustersRequest.page,
485
+ "sortOrder": listOpensearchClustersRequest.sortOrder,
486
+ "sortBy": listOpensearchClustersRequest.sortBy
487
+ };
488
+ let headerParams = {
489
+ "Content-Type": common.Constants.APPLICATION_JSON,
490
+ "opc-request-id": listOpensearchClustersRequest.opcRequestId
491
+ };
492
+ const specRetryConfiguration = common.NoRetryConfigurationDetails;
493
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listOpensearchClustersRequest.retryConfiguration, specRetryConfiguration);
494
+ if (this.logger)
495
+ retrier.logger = this.logger;
496
+ const request = yield oci_common_1.composeRequest({
497
+ baseEndpoint: this._endpoint,
498
+ defaultHeaders: this._defaultHeaders,
499
+ path: "/opensearchClusters",
500
+ method: "GET",
501
+ pathParams: pathParams,
502
+ headerParams: headerParams,
503
+ queryParams: queryParams
504
+ });
505
+ try {
506
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
507
+ const sdkResponse = oci_common_1.composeResponse({
508
+ responseObject: {},
509
+ body: yield response.json(),
510
+ bodyKey: "opensearchClusterCollection",
511
+ bodyModel: model.OpensearchClusterCollection,
512
+ type: "model.OpensearchClusterCollection",
513
+ responseHeaders: [
514
+ {
515
+ value: response.headers.get("opc-request-id"),
516
+ key: "opcRequestId",
517
+ dataType: "string"
518
+ },
519
+ {
520
+ value: response.headers.get("opc-next-page"),
521
+ key: "opcNextPage",
522
+ dataType: "string"
523
+ }
524
+ ]
525
+ });
526
+ return sdkResponse;
527
+ }
528
+ catch (err) {
529
+ throw err;
530
+ }
531
+ });
532
+ }
533
+ /**
534
+ * Lists the supported Opensearch versions
535
+ *
536
+ * This operation does not retry by default if the user has not defined a retry configuration.
537
+ * @param ListOpensearchVersionsRequest
538
+ * @return ListOpensearchVersionsResponse
539
+ * @throws OciError when an error occurs
540
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.37.0/opensearch/ListOpensearchVersions.ts.html |here} to see how to use ListOpensearchVersions API.
541
+ */
542
+ listOpensearchVersions(listOpensearchVersionsRequest) {
543
+ return __awaiter(this, void 0, void 0, function* () {
544
+ if (this.logger)
545
+ this.logger.debug("Calling operation OpensearchClusterClient#listOpensearchVersions.");
546
+ const operationName = "listOpensearchVersions";
547
+ const apiReferenceLink = "";
548
+ const pathParams = {};
549
+ const queryParams = {
550
+ "page": listOpensearchVersionsRequest.page,
551
+ "limit": listOpensearchVersionsRequest.limit,
552
+ "compartmentId": listOpensearchVersionsRequest.compartmentId
553
+ };
554
+ let headerParams = {
555
+ "Content-Type": common.Constants.APPLICATION_JSON
556
+ };
557
+ const specRetryConfiguration = common.NoRetryConfigurationDetails;
558
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listOpensearchVersionsRequest.retryConfiguration, specRetryConfiguration);
559
+ if (this.logger)
560
+ retrier.logger = this.logger;
561
+ const request = yield oci_common_1.composeRequest({
562
+ baseEndpoint: this._endpoint,
563
+ defaultHeaders: this._defaultHeaders,
564
+ path: "/opensearch/versions",
565
+ method: "GET",
566
+ pathParams: pathParams,
567
+ headerParams: headerParams,
568
+ queryParams: queryParams
569
+ });
570
+ try {
571
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
572
+ const sdkResponse = oci_common_1.composeResponse({
573
+ responseObject: {},
574
+ body: yield response.json(),
575
+ bodyKey: "opensearchVersionsCollection",
576
+ bodyModel: model.OpensearchVersionsCollection,
577
+ type: "model.OpensearchVersionsCollection",
578
+ responseHeaders: [
579
+ {
580
+ value: response.headers.get("opc-request-id"),
581
+ key: "opcRequestId",
582
+ dataType: "string"
583
+ },
584
+ {
585
+ value: response.headers.get("opc-next-page"),
586
+ key: "opcNextPage",
587
+ dataType: "string"
588
+ }
589
+ ]
590
+ });
591
+ return sdkResponse;
592
+ }
593
+ catch (err) {
594
+ throw err;
595
+ }
596
+ });
597
+ }
598
+ /**
599
+ * Return a (paginated) list of errors for a given work request.
600
+ *
601
+ * This operation does not retry by default if the user has not defined a retry configuration.
602
+ * @param ListWorkRequestErrorsRequest
603
+ * @return ListWorkRequestErrorsResponse
604
+ * @throws OciError when an error occurs
605
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.37.0/opensearch/ListWorkRequestErrors.ts.html |here} to see how to use ListWorkRequestErrors API.
606
+ */
607
+ listWorkRequestErrors(listWorkRequestErrorsRequest) {
608
+ return __awaiter(this, void 0, void 0, function* () {
609
+ if (this.logger)
610
+ this.logger.debug("Calling operation OpensearchClusterClient#listWorkRequestErrors.");
611
+ const operationName = "listWorkRequestErrors";
612
+ const apiReferenceLink = "";
613
+ const pathParams = {
614
+ "{workRequestId}": listWorkRequestErrorsRequest.workRequestId
615
+ };
616
+ const queryParams = {
617
+ "page": listWorkRequestErrorsRequest.page,
618
+ "limit": listWorkRequestErrorsRequest.limit
619
+ };
620
+ let headerParams = {
621
+ "Content-Type": common.Constants.APPLICATION_JSON,
622
+ "opc-request-id": listWorkRequestErrorsRequest.opcRequestId
623
+ };
624
+ const specRetryConfiguration = common.NoRetryConfigurationDetails;
625
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listWorkRequestErrorsRequest.retryConfiguration, specRetryConfiguration);
626
+ if (this.logger)
627
+ retrier.logger = this.logger;
628
+ const request = yield oci_common_1.composeRequest({
629
+ baseEndpoint: this._endpoint,
630
+ defaultHeaders: this._defaultHeaders,
631
+ path: "/workRequests/{workRequestId}/errors",
632
+ method: "GET",
633
+ pathParams: pathParams,
634
+ headerParams: headerParams,
635
+ queryParams: queryParams
636
+ });
637
+ try {
638
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
639
+ const sdkResponse = oci_common_1.composeResponse({
640
+ responseObject: {},
641
+ body: yield response.json(),
642
+ bodyKey: "workRequestErrorCollection",
643
+ bodyModel: model.WorkRequestErrorCollection,
644
+ type: "model.WorkRequestErrorCollection",
645
+ responseHeaders: [
646
+ {
647
+ value: response.headers.get("opc-next-page"),
648
+ key: "opcNextPage",
649
+ dataType: "string"
650
+ },
651
+ {
652
+ value: response.headers.get("opc-request-id"),
653
+ key: "opcRequestId",
654
+ dataType: "string"
655
+ }
656
+ ]
657
+ });
658
+ return sdkResponse;
659
+ }
660
+ catch (err) {
661
+ throw err;
662
+ }
663
+ });
664
+ }
665
+ /**
666
+ * Return a (paginated) list of logs for a given work request.
667
+ *
668
+ * This operation does not retry by default if the user has not defined a retry configuration.
669
+ * @param ListWorkRequestLogsRequest
670
+ * @return ListWorkRequestLogsResponse
671
+ * @throws OciError when an error occurs
672
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.37.0/opensearch/ListWorkRequestLogs.ts.html |here} to see how to use ListWorkRequestLogs API.
673
+ */
674
+ listWorkRequestLogs(listWorkRequestLogsRequest) {
675
+ return __awaiter(this, void 0, void 0, function* () {
676
+ if (this.logger)
677
+ this.logger.debug("Calling operation OpensearchClusterClient#listWorkRequestLogs.");
678
+ const operationName = "listWorkRequestLogs";
679
+ const apiReferenceLink = "";
680
+ const pathParams = {
681
+ "{workRequestId}": listWorkRequestLogsRequest.workRequestId
682
+ };
683
+ const queryParams = {
684
+ "page": listWorkRequestLogsRequest.page,
685
+ "limit": listWorkRequestLogsRequest.limit
686
+ };
687
+ let headerParams = {
688
+ "Content-Type": common.Constants.APPLICATION_JSON,
689
+ "opc-request-id": listWorkRequestLogsRequest.opcRequestId
690
+ };
691
+ const specRetryConfiguration = common.NoRetryConfigurationDetails;
692
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listWorkRequestLogsRequest.retryConfiguration, specRetryConfiguration);
693
+ if (this.logger)
694
+ retrier.logger = this.logger;
695
+ const request = yield oci_common_1.composeRequest({
696
+ baseEndpoint: this._endpoint,
697
+ defaultHeaders: this._defaultHeaders,
698
+ path: "/workRequests/{workRequestId}/logs",
699
+ method: "GET",
700
+ pathParams: pathParams,
701
+ headerParams: headerParams,
702
+ queryParams: queryParams
703
+ });
704
+ try {
705
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
706
+ const sdkResponse = oci_common_1.composeResponse({
707
+ responseObject: {},
708
+ body: yield response.json(),
709
+ bodyKey: "workRequestLogEntryCollection",
710
+ bodyModel: model.WorkRequestLogEntryCollection,
711
+ type: "model.WorkRequestLogEntryCollection",
712
+ responseHeaders: [
713
+ {
714
+ value: response.headers.get("opc-next-page"),
715
+ key: "opcNextPage",
716
+ dataType: "string"
717
+ },
718
+ {
719
+ value: response.headers.get("opc-request-id"),
720
+ key: "opcRequestId",
721
+ dataType: "string"
722
+ }
723
+ ]
724
+ });
725
+ return sdkResponse;
726
+ }
727
+ catch (err) {
728
+ throw err;
729
+ }
730
+ });
731
+ }
732
+ /**
733
+ * Lists the work requests in a compartment.
734
+ *
735
+ * This operation does not retry by default if the user has not defined a retry configuration.
736
+ * @param ListWorkRequestsRequest
737
+ * @return ListWorkRequestsResponse
738
+ * @throws OciError when an error occurs
739
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.37.0/opensearch/ListWorkRequests.ts.html |here} to see how to use ListWorkRequests API.
740
+ */
741
+ listWorkRequests(listWorkRequestsRequest) {
742
+ return __awaiter(this, void 0, void 0, function* () {
743
+ if (this.logger)
744
+ this.logger.debug("Calling operation OpensearchClusterClient#listWorkRequests.");
745
+ const operationName = "listWorkRequests";
746
+ const apiReferenceLink = "";
747
+ const pathParams = {};
748
+ const queryParams = {
749
+ "compartmentId": listWorkRequestsRequest.compartmentId,
750
+ "workRequestId": listWorkRequestsRequest.workRequestId,
751
+ "sourceResourceId": listWorkRequestsRequest.sourceResourceId,
752
+ "page": listWorkRequestsRequest.page,
753
+ "limit": listWorkRequestsRequest.limit
754
+ };
755
+ let headerParams = {
756
+ "Content-Type": common.Constants.APPLICATION_JSON,
757
+ "opc-request-id": listWorkRequestsRequest.opcRequestId
758
+ };
759
+ const specRetryConfiguration = common.NoRetryConfigurationDetails;
760
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listWorkRequestsRequest.retryConfiguration, specRetryConfiguration);
761
+ if (this.logger)
762
+ retrier.logger = this.logger;
763
+ const request = yield oci_common_1.composeRequest({
764
+ baseEndpoint: this._endpoint,
765
+ defaultHeaders: this._defaultHeaders,
766
+ path: "/workRequests",
767
+ method: "GET",
768
+ pathParams: pathParams,
769
+ headerParams: headerParams,
770
+ queryParams: queryParams
771
+ });
772
+ try {
773
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
774
+ const sdkResponse = oci_common_1.composeResponse({
775
+ responseObject: {},
776
+ body: yield response.json(),
777
+ bodyKey: "workRequestCollection",
778
+ bodyModel: model.WorkRequestCollection,
779
+ type: "model.WorkRequestCollection",
780
+ responseHeaders: [
781
+ {
782
+ value: response.headers.get("opc-request-id"),
783
+ key: "opcRequestId",
784
+ dataType: "string"
785
+ },
786
+ {
787
+ value: response.headers.get("opc-next-page"),
788
+ key: "opcNextPage",
789
+ dataType: "string"
790
+ }
791
+ ]
792
+ });
793
+ return sdkResponse;
794
+ }
795
+ catch (err) {
796
+ throw err;
797
+ }
798
+ });
799
+ }
800
+ /**
801
+ * Restore the opensearch cluster details.
802
+ * This operation does not retry by default if the user has not defined a retry configuration.
803
+ * @param OpensearchClusterRestoreRequest
804
+ * @return OpensearchClusterRestoreResponse
805
+ * @throws OciError when an error occurs
806
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.37.0/opensearch/OpensearchClusterRestore.ts.html |here} to see how to use OpensearchClusterRestore API.
807
+ */
808
+ opensearchClusterRestore(opensearchClusterRestoreRequest) {
809
+ return __awaiter(this, void 0, void 0, function* () {
810
+ if (this.logger)
811
+ this.logger.debug("Calling operation OpensearchClusterClient#opensearchClusterRestore.");
812
+ const operationName = "opensearchClusterRestore";
813
+ const apiReferenceLink = "";
814
+ const pathParams = {
815
+ "{opensearchClusterId}": opensearchClusterRestoreRequest.opensearchClusterId
816
+ };
817
+ const queryParams = {};
818
+ let headerParams = {
819
+ "Content-Type": common.Constants.APPLICATION_JSON,
820
+ "if-match": opensearchClusterRestoreRequest.ifMatch,
821
+ "opc-retry-token": opensearchClusterRestoreRequest.opcRetryToken,
822
+ "opc-request-id": opensearchClusterRestoreRequest.opcRequestId
823
+ };
824
+ const specRetryConfiguration = common.NoRetryConfigurationDetails;
825
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, opensearchClusterRestoreRequest.retryConfiguration, specRetryConfiguration);
826
+ if (this.logger)
827
+ retrier.logger = this.logger;
828
+ const request = yield oci_common_1.composeRequest({
829
+ baseEndpoint: this._endpoint,
830
+ defaultHeaders: this._defaultHeaders,
831
+ path: "/opensearchClusters/{opensearchClusterId}/actions/restore",
832
+ method: "POST",
833
+ bodyContent: common.ObjectSerializer.serialize(opensearchClusterRestoreRequest.restoreOpensearchClusterDetails, "RestoreOpensearchClusterDetails", model.RestoreOpensearchClusterDetails.getJsonObj),
834
+ pathParams: pathParams,
835
+ headerParams: headerParams,
836
+ queryParams: queryParams
837
+ });
838
+ try {
839
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
840
+ const sdkResponse = oci_common_1.composeResponse({
841
+ responseObject: {},
842
+ responseHeaders: [
843
+ {
844
+ value: response.headers.get("opc-work-request-id"),
845
+ key: "opcWorkRequestId",
846
+ dataType: "string"
847
+ },
848
+ {
849
+ value: response.headers.get("opc-request-id"),
850
+ key: "opcRequestId",
851
+ dataType: "string"
852
+ }
853
+ ]
854
+ });
855
+ return sdkResponse;
856
+ }
857
+ catch (err) {
858
+ throw err;
859
+ }
860
+ });
861
+ }
862
+ /**
863
+ * Resize the opensearch cluster horizontal details.
864
+ * This operation does not retry by default if the user has not defined a retry configuration.
865
+ * @param ResizeOpensearchClusterHorizontalRequest
866
+ * @return ResizeOpensearchClusterHorizontalResponse
867
+ * @throws OciError when an error occurs
868
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.37.0/opensearch/ResizeOpensearchClusterHorizontal.ts.html |here} to see how to use ResizeOpensearchClusterHorizontal API.
869
+ */
870
+ resizeOpensearchClusterHorizontal(resizeOpensearchClusterHorizontalRequest) {
871
+ return __awaiter(this, void 0, void 0, function* () {
872
+ if (this.logger)
873
+ this.logger.debug("Calling operation OpensearchClusterClient#resizeOpensearchClusterHorizontal.");
874
+ const operationName = "resizeOpensearchClusterHorizontal";
875
+ const apiReferenceLink = "";
876
+ const pathParams = {
877
+ "{opensearchClusterId}": resizeOpensearchClusterHorizontalRequest.opensearchClusterId
878
+ };
879
+ const queryParams = {};
880
+ let headerParams = {
881
+ "Content-Type": common.Constants.APPLICATION_JSON,
882
+ "if-match": resizeOpensearchClusterHorizontalRequest.ifMatch,
883
+ "opc-retry-token": resizeOpensearchClusterHorizontalRequest.opcRetryToken,
884
+ "opc-request-id": resizeOpensearchClusterHorizontalRequest.opcRequestId
885
+ };
886
+ const specRetryConfiguration = common.NoRetryConfigurationDetails;
887
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, resizeOpensearchClusterHorizontalRequest.retryConfiguration, specRetryConfiguration);
888
+ if (this.logger)
889
+ retrier.logger = this.logger;
890
+ const request = yield oci_common_1.composeRequest({
891
+ baseEndpoint: this._endpoint,
892
+ defaultHeaders: this._defaultHeaders,
893
+ path: "/opensearchClusters/{opensearchClusterId}/actions/resizeHorizontal",
894
+ method: "POST",
895
+ bodyContent: common.ObjectSerializer.serialize(resizeOpensearchClusterHorizontalRequest.resizeOpensearchClusterHorizontalDetails, "ResizeOpensearchClusterHorizontalDetails", model.ResizeOpensearchClusterHorizontalDetails.getJsonObj),
896
+ pathParams: pathParams,
897
+ headerParams: headerParams,
898
+ queryParams: queryParams
899
+ });
900
+ try {
901
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
902
+ const sdkResponse = oci_common_1.composeResponse({
903
+ responseObject: {},
904
+ responseHeaders: [
905
+ {
906
+ value: response.headers.get("opc-work-request-id"),
907
+ key: "opcWorkRequestId",
908
+ dataType: "string"
909
+ },
910
+ {
911
+ value: response.headers.get("opc-request-id"),
912
+ key: "opcRequestId",
913
+ dataType: "string"
914
+ }
915
+ ]
916
+ });
917
+ return sdkResponse;
918
+ }
919
+ catch (err) {
920
+ throw err;
921
+ }
922
+ });
923
+ }
924
+ /**
925
+ * Resize the opensearch cluster vertical details.
926
+ * This operation does not retry by default if the user has not defined a retry configuration.
927
+ * @param ResizeOpensearchClusterVerticalRequest
928
+ * @return ResizeOpensearchClusterVerticalResponse
929
+ * @throws OciError when an error occurs
930
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.37.0/opensearch/ResizeOpensearchClusterVertical.ts.html |here} to see how to use ResizeOpensearchClusterVertical API.
931
+ */
932
+ resizeOpensearchClusterVertical(resizeOpensearchClusterVerticalRequest) {
933
+ return __awaiter(this, void 0, void 0, function* () {
934
+ if (this.logger)
935
+ this.logger.debug("Calling operation OpensearchClusterClient#resizeOpensearchClusterVertical.");
936
+ const operationName = "resizeOpensearchClusterVertical";
937
+ const apiReferenceLink = "";
938
+ const pathParams = {
939
+ "{opensearchClusterId}": resizeOpensearchClusterVerticalRequest.opensearchClusterId
940
+ };
941
+ const queryParams = {};
942
+ let headerParams = {
943
+ "Content-Type": common.Constants.APPLICATION_JSON,
944
+ "if-match": resizeOpensearchClusterVerticalRequest.ifMatch,
945
+ "opc-retry-token": resizeOpensearchClusterVerticalRequest.opcRetryToken,
946
+ "opc-request-id": resizeOpensearchClusterVerticalRequest.opcRequestId
947
+ };
948
+ const specRetryConfiguration = common.NoRetryConfigurationDetails;
949
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, resizeOpensearchClusterVerticalRequest.retryConfiguration, specRetryConfiguration);
950
+ if (this.logger)
951
+ retrier.logger = this.logger;
952
+ const request = yield oci_common_1.composeRequest({
953
+ baseEndpoint: this._endpoint,
954
+ defaultHeaders: this._defaultHeaders,
955
+ path: "/opensearchClusters/{opensearchClusterId}/actions/resizeVertical",
956
+ method: "POST",
957
+ bodyContent: common.ObjectSerializer.serialize(resizeOpensearchClusterVerticalRequest.resizeOpensearchClusterVerticalDetails, "ResizeOpensearchClusterVerticalDetails", model.ResizeOpensearchClusterVerticalDetails.getJsonObj),
958
+ pathParams: pathParams,
959
+ headerParams: headerParams,
960
+ queryParams: queryParams
961
+ });
962
+ try {
963
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
964
+ const sdkResponse = oci_common_1.composeResponse({
965
+ responseObject: {},
966
+ responseHeaders: [
967
+ {
968
+ value: response.headers.get("opc-work-request-id"),
969
+ key: "opcWorkRequestId",
970
+ dataType: "string"
971
+ },
972
+ {
973
+ value: response.headers.get("opc-request-id"),
974
+ key: "opcRequestId",
975
+ dataType: "string"
976
+ }
977
+ ]
978
+ });
979
+ return sdkResponse;
980
+ }
981
+ catch (err) {
982
+ throw err;
983
+ }
984
+ });
985
+ }
986
+ /**
987
+ * Updates the OpensearchCluster
988
+ * This operation does not retry by default if the user has not defined a retry configuration.
989
+ * @param UpdateOpensearchClusterRequest
990
+ * @return UpdateOpensearchClusterResponse
991
+ * @throws OciError when an error occurs
992
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.37.0/opensearch/UpdateOpensearchCluster.ts.html |here} to see how to use UpdateOpensearchCluster API.
993
+ */
994
+ updateOpensearchCluster(updateOpensearchClusterRequest) {
995
+ return __awaiter(this, void 0, void 0, function* () {
996
+ if (this.logger)
997
+ this.logger.debug("Calling operation OpensearchClusterClient#updateOpensearchCluster.");
998
+ const operationName = "updateOpensearchCluster";
999
+ const apiReferenceLink = "";
1000
+ const pathParams = {
1001
+ "{opensearchClusterId}": updateOpensearchClusterRequest.opensearchClusterId
1002
+ };
1003
+ const queryParams = {};
1004
+ let headerParams = {
1005
+ "Content-Type": common.Constants.APPLICATION_JSON,
1006
+ "if-match": updateOpensearchClusterRequest.ifMatch,
1007
+ "opc-request-id": updateOpensearchClusterRequest.opcRequestId
1008
+ };
1009
+ const specRetryConfiguration = common.NoRetryConfigurationDetails;
1010
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, updateOpensearchClusterRequest.retryConfiguration, specRetryConfiguration);
1011
+ if (this.logger)
1012
+ retrier.logger = this.logger;
1013
+ const request = yield oci_common_1.composeRequest({
1014
+ baseEndpoint: this._endpoint,
1015
+ defaultHeaders: this._defaultHeaders,
1016
+ path: "/opensearchClusters/{opensearchClusterId}",
1017
+ method: "PUT",
1018
+ bodyContent: common.ObjectSerializer.serialize(updateOpensearchClusterRequest.updateOpensearchClusterDetails, "UpdateOpensearchClusterDetails", model.UpdateOpensearchClusterDetails.getJsonObj),
1019
+ pathParams: pathParams,
1020
+ headerParams: headerParams,
1021
+ queryParams: queryParams
1022
+ });
1023
+ try {
1024
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1025
+ const sdkResponse = oci_common_1.composeResponse({
1026
+ responseObject: {},
1027
+ responseHeaders: [
1028
+ {
1029
+ value: response.headers.get("opc-work-request-id"),
1030
+ key: "opcWorkRequestId",
1031
+ dataType: "string"
1032
+ },
1033
+ {
1034
+ value: response.headers.get("opc-request-id"),
1035
+ key: "opcRequestId",
1036
+ dataType: "string"
1037
+ }
1038
+ ]
1039
+ });
1040
+ return sdkResponse;
1041
+ }
1042
+ catch (err) {
1043
+ throw err;
1044
+ }
1045
+ });
1046
+ }
1047
+ }
1048
+ exports.OpensearchClusterClient = OpensearchClusterClient;
1049
+ OpensearchClusterClient.serviceEndpointTemplate = "https://search-indexing.{region}.oci.{secondLevelDomain}";
1050
+ OpensearchClusterClient.endpointServiceName = "";
1051
+ var OpensearchClusterBackupApiKeys;
1052
+ (function (OpensearchClusterBackupApiKeys) {
1053
+ })(OpensearchClusterBackupApiKeys = exports.OpensearchClusterBackupApiKeys || (exports.OpensearchClusterBackupApiKeys = {}));
1054
+ /**
1055
+ * This service client uses {@link common.CircuitBreaker.DefaultConfiguration} for all the operations by default if no circuit breaker configuration is defined by the user.
1056
+ */
1057
+ class OpensearchClusterBackupClient {
1058
+ constructor(params, clientConfiguration) {
1059
+ this["_endpoint"] = "";
1060
+ this["_defaultHeaders"] = {};
1061
+ this._circuitBreaker = null;
1062
+ this._httpOptions = undefined;
1063
+ this.targetService = "OpensearchClusterBackup";
1064
+ const requestSigner = params.authenticationDetailsProvider
1065
+ ? new common.DefaultRequestSigner(params.authenticationDetailsProvider)
1066
+ : null;
1067
+ if (clientConfiguration) {
1068
+ this._clientConfiguration = clientConfiguration;
1069
+ this._circuitBreaker = clientConfiguration.circuitBreaker
1070
+ ? clientConfiguration.circuitBreaker.circuit
1071
+ : null;
1072
+ this._httpOptions = clientConfiguration.httpOptions
1073
+ ? clientConfiguration.httpOptions
1074
+ : undefined;
1075
+ }
1076
+ // if circuit breaker is not created, check if circuit breaker system is enabled to use default circuit breaker
1077
+ const specCircuitBreakerEnabled = true;
1078
+ if (!this._circuitBreaker &&
1079
+ common.utils.isCircuitBreakerSystemEnabled(clientConfiguration) &&
1080
+ (specCircuitBreakerEnabled || common.CircuitBreaker.DefaultCircuitBreakerOverriden)) {
1081
+ this._circuitBreaker = new common.CircuitBreaker().circuit;
1082
+ }
1083
+ this._httpClient =
1084
+ params.httpClient ||
1085
+ new common.FetchHttpClient(requestSigner, this._circuitBreaker, this._httpOptions);
1086
+ if (params.authenticationDetailsProvider &&
1087
+ common.isRegionProvider(params.authenticationDetailsProvider)) {
1088
+ const provider = params.authenticationDetailsProvider;
1089
+ if (provider.getRegion()) {
1090
+ this.region = provider.getRegion();
1091
+ }
1092
+ }
1093
+ }
1094
+ /**
1095
+ * Get the endpoint that is being used to call (ex, https://www.example.com).
1096
+ */
1097
+ get endpoint() {
1098
+ return this._endpoint;
1099
+ }
1100
+ /**
1101
+ * Sets the endpoint to call (ex, https://www.example.com).
1102
+ * @param endpoint The endpoint of the service.
1103
+ */
1104
+ set endpoint(endpoint) {
1105
+ this._endpoint = endpoint;
1106
+ this._endpoint = this._endpoint + "/20180828";
1107
+ if (this.logger)
1108
+ this.logger.info(`OpensearchClusterBackupClient endpoint set to ${this._endpoint}`);
1109
+ }
1110
+ get logger() {
1111
+ return common.LOG.logger;
1112
+ }
1113
+ /**
1114
+ * Sets the region to call (ex, Region.US_PHOENIX_1).
1115
+ * Note, this will call {@link #endpoint(String) endpoint} after resolving the endpoint.
1116
+ * @param region The region of the service.
1117
+ */
1118
+ set region(region) {
1119
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegion(OpensearchClusterBackupClient.serviceEndpointTemplate, region, OpensearchClusterBackupClient.endpointServiceName);
1120
+ }
1121
+ /**
1122
+ * Sets the regionId to call (ex, 'us-phoenix-1').
1123
+ *
1124
+ * Note, this will first try to map the region ID to a known Region and call {@link #region(Region) region}.
1125
+ * If no known Region could be determined, it will create an endpoint assuming its in default Realm OC1
1126
+ * and then call {@link #endpoint(String) endpoint}.
1127
+ * @param regionId The public region ID.
1128
+ */
1129
+ set regionId(regionId) {
1130
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(OpensearchClusterBackupClient.serviceEndpointTemplate, regionId, OpensearchClusterBackupClient.endpointServiceName);
1131
+ }
1132
+ /**
1133
+ * Creates a new OpensearchClusterBackupWaiter for resources for this service.
1134
+ *
1135
+ * @param config The waiter configuration for termination and delay strategy
1136
+ * @return The service waiters.
1137
+ */
1138
+ createWaiters(config) {
1139
+ this._waiters = new opensearchclusterbackup_waiter_1.OpensearchClusterBackupWaiter(this, config);
1140
+ return this._waiters;
1141
+ }
1142
+ /**
1143
+ * Gets the waiters available for resources for this service.
1144
+ *
1145
+ * @return The service waiters.
1146
+ */
1147
+ getWaiters() {
1148
+ if (this._waiters) {
1149
+ return this._waiters;
1150
+ }
1151
+ throw Error("Waiters do not exist. Please create waiters.");
1152
+ }
1153
+ /**
1154
+ * Deletes a OpensearchClusterBackup resource by identifier
1155
+ * This operation does not retry by default if the user has not defined a retry configuration.
1156
+ * @param DeleteOpensearchClusterBackupRequest
1157
+ * @return DeleteOpensearchClusterBackupResponse
1158
+ * @throws OciError when an error occurs
1159
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.37.0/opensearch/DeleteOpensearchClusterBackup.ts.html |here} to see how to use DeleteOpensearchClusterBackup API.
1160
+ */
1161
+ deleteOpensearchClusterBackup(deleteOpensearchClusterBackupRequest) {
1162
+ return __awaiter(this, void 0, void 0, function* () {
1163
+ if (this.logger)
1164
+ this.logger.debug("Calling operation OpensearchClusterBackupClient#deleteOpensearchClusterBackup.");
1165
+ const operationName = "deleteOpensearchClusterBackup";
1166
+ const apiReferenceLink = "";
1167
+ const pathParams = {
1168
+ "{opensearchClusterBackupId}": deleteOpensearchClusterBackupRequest.opensearchClusterBackupId
1169
+ };
1170
+ const queryParams = {};
1171
+ let headerParams = {
1172
+ "Content-Type": common.Constants.APPLICATION_JSON,
1173
+ "if-match": deleteOpensearchClusterBackupRequest.ifMatch,
1174
+ "opc-request-id": deleteOpensearchClusterBackupRequest.opcRequestId
1175
+ };
1176
+ const specRetryConfiguration = common.NoRetryConfigurationDetails;
1177
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, deleteOpensearchClusterBackupRequest.retryConfiguration, specRetryConfiguration);
1178
+ if (this.logger)
1179
+ retrier.logger = this.logger;
1180
+ const request = yield oci_common_1.composeRequest({
1181
+ baseEndpoint: this._endpoint,
1182
+ defaultHeaders: this._defaultHeaders,
1183
+ path: "/opensearchClusterBackups/{opensearchClusterBackupId}",
1184
+ method: "DELETE",
1185
+ pathParams: pathParams,
1186
+ headerParams: headerParams,
1187
+ queryParams: queryParams
1188
+ });
1189
+ try {
1190
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1191
+ const sdkResponse = oci_common_1.composeResponse({
1192
+ responseObject: {},
1193
+ responseHeaders: [
1194
+ {
1195
+ value: response.headers.get("opc-work-request-id"),
1196
+ key: "opcWorkRequestId",
1197
+ dataType: "string"
1198
+ },
1199
+ {
1200
+ value: response.headers.get("opc-request-id"),
1201
+ key: "opcRequestId",
1202
+ dataType: "string"
1203
+ }
1204
+ ]
1205
+ });
1206
+ return sdkResponse;
1207
+ }
1208
+ catch (err) {
1209
+ throw err;
1210
+ }
1211
+ });
1212
+ }
1213
+ /**
1214
+ * Gets a OpensearchClusterBackup by identifier
1215
+ * This operation does not retry by default if the user has not defined a retry configuration.
1216
+ * @param GetOpensearchClusterBackupRequest
1217
+ * @return GetOpensearchClusterBackupResponse
1218
+ * @throws OciError when an error occurs
1219
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.37.0/opensearch/GetOpensearchClusterBackup.ts.html |here} to see how to use GetOpensearchClusterBackup API.
1220
+ */
1221
+ getOpensearchClusterBackup(getOpensearchClusterBackupRequest) {
1222
+ return __awaiter(this, void 0, void 0, function* () {
1223
+ if (this.logger)
1224
+ this.logger.debug("Calling operation OpensearchClusterBackupClient#getOpensearchClusterBackup.");
1225
+ const operationName = "getOpensearchClusterBackup";
1226
+ const apiReferenceLink = "";
1227
+ const pathParams = {
1228
+ "{opensearchClusterBackupId}": getOpensearchClusterBackupRequest.opensearchClusterBackupId
1229
+ };
1230
+ const queryParams = {};
1231
+ let headerParams = {
1232
+ "Content-Type": common.Constants.APPLICATION_JSON,
1233
+ "opc-request-id": getOpensearchClusterBackupRequest.opcRequestId
1234
+ };
1235
+ const specRetryConfiguration = common.NoRetryConfigurationDetails;
1236
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getOpensearchClusterBackupRequest.retryConfiguration, specRetryConfiguration);
1237
+ if (this.logger)
1238
+ retrier.logger = this.logger;
1239
+ const request = yield oci_common_1.composeRequest({
1240
+ baseEndpoint: this._endpoint,
1241
+ defaultHeaders: this._defaultHeaders,
1242
+ path: "/opensearchClusterBackups/{opensearchClusterBackupId}",
1243
+ method: "GET",
1244
+ pathParams: pathParams,
1245
+ headerParams: headerParams,
1246
+ queryParams: queryParams
1247
+ });
1248
+ try {
1249
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1250
+ const sdkResponse = oci_common_1.composeResponse({
1251
+ responseObject: {},
1252
+ body: yield response.json(),
1253
+ bodyKey: "opensearchClusterBackup",
1254
+ bodyModel: model.OpensearchClusterBackup,
1255
+ type: "model.OpensearchClusterBackup",
1256
+ responseHeaders: [
1257
+ {
1258
+ value: response.headers.get("etag"),
1259
+ key: "etag",
1260
+ dataType: "string"
1261
+ },
1262
+ {
1263
+ value: response.headers.get("opc-request-id"),
1264
+ key: "opcRequestId",
1265
+ dataType: "string"
1266
+ }
1267
+ ]
1268
+ });
1269
+ return sdkResponse;
1270
+ }
1271
+ catch (err) {
1272
+ throw err;
1273
+ }
1274
+ });
1275
+ }
1276
+ /**
1277
+ * Returns a list of OpensearchClusterBackups.
1278
+ *
1279
+ * This operation does not retry by default if the user has not defined a retry configuration.
1280
+ * @param ListOpensearchClusterBackupsRequest
1281
+ * @return ListOpensearchClusterBackupsResponse
1282
+ * @throws OciError when an error occurs
1283
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.37.0/opensearch/ListOpensearchClusterBackups.ts.html |here} to see how to use ListOpensearchClusterBackups API.
1284
+ */
1285
+ listOpensearchClusterBackups(listOpensearchClusterBackupsRequest) {
1286
+ return __awaiter(this, void 0, void 0, function* () {
1287
+ if (this.logger)
1288
+ this.logger.debug("Calling operation OpensearchClusterBackupClient#listOpensearchClusterBackups.");
1289
+ const operationName = "listOpensearchClusterBackups";
1290
+ const apiReferenceLink = "";
1291
+ const pathParams = {};
1292
+ const queryParams = {
1293
+ "compartmentId": listOpensearchClusterBackupsRequest.compartmentId,
1294
+ "lifecycleState": listOpensearchClusterBackupsRequest.lifecycleState,
1295
+ "displayName": listOpensearchClusterBackupsRequest.displayName,
1296
+ "sourceOpensearchClusterId": listOpensearchClusterBackupsRequest.sourceOpensearchClusterId,
1297
+ "id": listOpensearchClusterBackupsRequest.id,
1298
+ "limit": listOpensearchClusterBackupsRequest.limit,
1299
+ "page": listOpensearchClusterBackupsRequest.page,
1300
+ "sortOrder": listOpensearchClusterBackupsRequest.sortOrder,
1301
+ "sortBy": listOpensearchClusterBackupsRequest.sortBy
1302
+ };
1303
+ let headerParams = {
1304
+ "Content-Type": common.Constants.APPLICATION_JSON,
1305
+ "opc-request-id": listOpensearchClusterBackupsRequest.opcRequestId
1306
+ };
1307
+ const specRetryConfiguration = common.NoRetryConfigurationDetails;
1308
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listOpensearchClusterBackupsRequest.retryConfiguration, specRetryConfiguration);
1309
+ if (this.logger)
1310
+ retrier.logger = this.logger;
1311
+ const request = yield oci_common_1.composeRequest({
1312
+ baseEndpoint: this._endpoint,
1313
+ defaultHeaders: this._defaultHeaders,
1314
+ path: "/opensearchClusterBackups",
1315
+ method: "GET",
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_1.composeResponse({
1323
+ responseObject: {},
1324
+ body: yield response.json(),
1325
+ bodyKey: "opensearchClusterBackupCollection",
1326
+ bodyModel: model.OpensearchClusterBackupCollection,
1327
+ type: "model.OpensearchClusterBackupCollection",
1328
+ responseHeaders: [
1329
+ {
1330
+ value: response.headers.get("opc-request-id"),
1331
+ key: "opcRequestId",
1332
+ dataType: "string"
1333
+ },
1334
+ {
1335
+ value: response.headers.get("opc-next-page"),
1336
+ key: "opcNextPage",
1337
+ dataType: "string"
1338
+ }
1339
+ ]
1340
+ });
1341
+ return sdkResponse;
1342
+ }
1343
+ catch (err) {
1344
+ throw err;
1345
+ }
1346
+ });
1347
+ }
1348
+ /**
1349
+ * Updates the OpensearchClusterBackup
1350
+ * This operation does not retry by default if the user has not defined a retry configuration.
1351
+ * @param UpdateOpensearchClusterBackupRequest
1352
+ * @return UpdateOpensearchClusterBackupResponse
1353
+ * @throws OciError when an error occurs
1354
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.37.0/opensearch/UpdateOpensearchClusterBackup.ts.html |here} to see how to use UpdateOpensearchClusterBackup API.
1355
+ */
1356
+ updateOpensearchClusterBackup(updateOpensearchClusterBackupRequest) {
1357
+ return __awaiter(this, void 0, void 0, function* () {
1358
+ if (this.logger)
1359
+ this.logger.debug("Calling operation OpensearchClusterBackupClient#updateOpensearchClusterBackup.");
1360
+ const operationName = "updateOpensearchClusterBackup";
1361
+ const apiReferenceLink = "";
1362
+ const pathParams = {
1363
+ "{opensearchClusterBackupId}": updateOpensearchClusterBackupRequest.opensearchClusterBackupId
1364
+ };
1365
+ const queryParams = {};
1366
+ let headerParams = {
1367
+ "Content-Type": common.Constants.APPLICATION_JSON,
1368
+ "if-match": updateOpensearchClusterBackupRequest.ifMatch,
1369
+ "opc-request-id": updateOpensearchClusterBackupRequest.opcRequestId
1370
+ };
1371
+ const specRetryConfiguration = common.NoRetryConfigurationDetails;
1372
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, updateOpensearchClusterBackupRequest.retryConfiguration, specRetryConfiguration);
1373
+ if (this.logger)
1374
+ retrier.logger = this.logger;
1375
+ const request = yield oci_common_1.composeRequest({
1376
+ baseEndpoint: this._endpoint,
1377
+ defaultHeaders: this._defaultHeaders,
1378
+ path: "/opensearchClusterBackups/{opensearchClusterBackupId}",
1379
+ method: "PUT",
1380
+ bodyContent: common.ObjectSerializer.serialize(updateOpensearchClusterBackupRequest.updateOpensearchClusterBackupDetails, "UpdateOpensearchClusterBackupDetails", model.UpdateOpensearchClusterBackupDetails.getJsonObj),
1381
+ pathParams: pathParams,
1382
+ headerParams: headerParams,
1383
+ queryParams: queryParams
1384
+ });
1385
+ try {
1386
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1387
+ const sdkResponse = oci_common_1.composeResponse({
1388
+ responseObject: {},
1389
+ responseHeaders: [
1390
+ {
1391
+ value: response.headers.get("opc-work-request-id"),
1392
+ key: "opcWorkRequestId",
1393
+ dataType: "string"
1394
+ },
1395
+ {
1396
+ value: response.headers.get("opc-request-id"),
1397
+ key: "opcRequestId",
1398
+ dataType: "string"
1399
+ }
1400
+ ]
1401
+ });
1402
+ return sdkResponse;
1403
+ }
1404
+ catch (err) {
1405
+ throw err;
1406
+ }
1407
+ });
1408
+ }
1409
+ }
1410
+ exports.OpensearchClusterBackupClient = OpensearchClusterBackupClient;
1411
+ OpensearchClusterBackupClient.serviceEndpointTemplate = "https://search-indexing.{region}.oci.{secondLevelDomain}";
1412
+ OpensearchClusterBackupClient.endpointServiceName = "";
1413
+ //# sourceMappingURL=client.js.map