oci-recovery 2.52.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 (275) 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 +22 -0
  6. package/index.js +45 -0
  7. package/index.js.map +1 -0
  8. package/lib/client.d.ts +290 -0
  9. package/lib/client.js +1669 -0
  10. package/lib/client.js.map +1 -0
  11. package/lib/databaserecovery-waiter.d.ts +52 -0
  12. package/lib/databaserecovery-waiter.js +100 -0
  13. package/lib/databaserecovery-waiter.js.map +1 -0
  14. package/lib/model/action-type.d.ts +32 -0
  15. package/lib/model/action-type.js +43 -0
  16. package/lib/model/action-type.js.map +1 -0
  17. package/lib/model/change-protected-database-compartment-details.d.ts +26 -0
  18. package/lib/model/change-protected-database-compartment-details.js +29 -0
  19. package/lib/model/change-protected-database-compartment-details.js.map +1 -0
  20. package/lib/model/change-protection-policy-compartment-details.d.ts +26 -0
  21. package/lib/model/change-protection-policy-compartment-details.js +29 -0
  22. package/lib/model/change-protection-policy-compartment-details.js.map +1 -0
  23. package/lib/model/change-recovery-service-subnet-compartment-details.d.ts +26 -0
  24. package/lib/model/change-recovery-service-subnet-compartment-details.js +29 -0
  25. package/lib/model/change-recovery-service-subnet-compartment-details.js.map +1 -0
  26. package/lib/model/create-protected-database-details.d.ts +93 -0
  27. package/lib/model/create-protected-database-details.js +61 -0
  28. package/lib/model/create-protected-database-details.js.map +1 -0
  29. package/lib/model/create-protection-policy-details.d.ts +51 -0
  30. package/lib/model/create-protection-policy-details.js +29 -0
  31. package/lib/model/create-protection-policy-details.js.map +1 -0
  32. package/lib/model/create-recovery-service-subnet-details.d.ts +55 -0
  33. package/lib/model/create-recovery-service-subnet-details.js +29 -0
  34. package/lib/model/create-recovery-service-subnet-details.js.map +1 -0
  35. package/lib/model/database-sizes.d.ts +33 -0
  36. package/lib/model/database-sizes.js +44 -0
  37. package/lib/model/database-sizes.js.map +1 -0
  38. package/lib/model/fetch-protected-database-configuration-details.d.ts +31 -0
  39. package/lib/model/fetch-protected-database-configuration-details.js +36 -0
  40. package/lib/model/fetch-protected-database-configuration-details.js.map +1 -0
  41. package/lib/model/health.d.ts +29 -0
  42. package/lib/model/health.js +40 -0
  43. package/lib/model/health.js.map +1 -0
  44. package/lib/model/index.d.ts +88 -0
  45. package/lib/model/index.js +111 -0
  46. package/lib/model/index.js.map +1 -0
  47. package/lib/model/lifecycle-state.d.ts +32 -0
  48. package/lib/model/lifecycle-state.js +43 -0
  49. package/lib/model/lifecycle-state.js.map +1 -0
  50. package/lib/model/metrics-summary.d.ts +53 -0
  51. package/lib/model/metrics-summary.js +29 -0
  52. package/lib/model/metrics-summary.js.map +1 -0
  53. package/lib/model/metrics.d.ts +53 -0
  54. package/lib/model/metrics.js +29 -0
  55. package/lib/model/metrics.js.map +1 -0
  56. package/lib/model/operation-status.d.ts +32 -0
  57. package/lib/model/operation-status.js +43 -0
  58. package/lib/model/operation-status.js.map +1 -0
  59. package/lib/model/operation-type.d.ts +38 -0
  60. package/lib/model/operation-type.js +49 -0
  61. package/lib/model/operation-type.js.map +1 -0
  62. package/lib/model/protected-database-collection.d.ts +26 -0
  63. package/lib/model/protected-database-collection.js +61 -0
  64. package/lib/model/protected-database-collection.js.map +1 -0
  65. package/lib/model/protected-database-summary.d.ts +127 -0
  66. package/lib/model/protected-database-summary.js +65 -0
  67. package/lib/model/protected-database-summary.js.map +1 -0
  68. package/lib/model/protected-database.d.ts +157 -0
  69. package/lib/model/protected-database.js +63 -0
  70. package/lib/model/protected-database.js.map +1 -0
  71. package/lib/model/protection-policy-collection.d.ts +26 -0
  72. package/lib/model/protection-policy-collection.js +61 -0
  73. package/lib/model/protection-policy-collection.js.map +1 -0
  74. package/lib/model/protection-policy-summary.d.ts +91 -0
  75. package/lib/model/protection-policy-summary.js +29 -0
  76. package/lib/model/protection-policy-summary.js.map +1 -0
  77. package/lib/model/protection-policy.d.ts +97 -0
  78. package/lib/model/protection-policy.js +29 -0
  79. package/lib/model/protection-policy.js.map +1 -0
  80. package/lib/model/recovery-service-subnet-collection.d.ts +26 -0
  81. package/lib/model/recovery-service-subnet-collection.js +61 -0
  82. package/lib/model/recovery-service-subnet-collection.js.map +1 -0
  83. package/lib/model/recovery-service-subnet-details.d.ts +30 -0
  84. package/lib/model/recovery-service-subnet-details.js +29 -0
  85. package/lib/model/recovery-service-subnet-details.js.map +1 -0
  86. package/lib/model/recovery-service-subnet-input.d.ts +25 -0
  87. package/lib/model/recovery-service-subnet-input.js +29 -0
  88. package/lib/model/recovery-service-subnet-input.js.map +1 -0
  89. package/lib/model/recovery-service-subnet-summary.d.ts +101 -0
  90. package/lib/model/recovery-service-subnet-summary.js +29 -0
  91. package/lib/model/recovery-service-subnet-summary.js.map +1 -0
  92. package/lib/model/recovery-service-subnet.d.ts +99 -0
  93. package/lib/model/recovery-service-subnet.js +29 -0
  94. package/lib/model/recovery-service-subnet.js.map +1 -0
  95. package/lib/model/sort-order.d.ts +23 -0
  96. package/lib/model/sort-order.js +34 -0
  97. package/lib/model/sort-order.js.map +1 -0
  98. package/lib/model/update-protected-database-details.d.ts +75 -0
  99. package/lib/model/update-protected-database-details.js +61 -0
  100. package/lib/model/update-protected-database-details.js.map +1 -0
  101. package/lib/model/update-protection-policy-details.d.ts +47 -0
  102. package/lib/model/update-protection-policy-details.js +29 -0
  103. package/lib/model/update-protection-policy-details.js.map +1 -0
  104. package/lib/model/update-recovery-service-subnet-details.d.ts +43 -0
  105. package/lib/model/update-recovery-service-subnet-details.js +29 -0
  106. package/lib/model/update-recovery-service-subnet-details.js.map +1 -0
  107. package/lib/model/work-request-error-collection.d.ts +26 -0
  108. package/lib/model/work-request-error-collection.js +61 -0
  109. package/lib/model/work-request-error-collection.js.map +1 -0
  110. package/lib/model/work-request-error.d.ts +35 -0
  111. package/lib/model/work-request-error.js +29 -0
  112. package/lib/model/work-request-error.js.map +1 -0
  113. package/lib/model/work-request-log-entry-collection.d.ts +26 -0
  114. package/lib/model/work-request-log-entry-collection.js +61 -0
  115. package/lib/model/work-request-log-entry-collection.js.map +1 -0
  116. package/lib/model/work-request-log-entry.d.ts +29 -0
  117. package/lib/model/work-request-log-entry.js +29 -0
  118. package/lib/model/work-request-log-entry.js.map +1 -0
  119. package/lib/model/work-request-resource.d.ts +42 -0
  120. package/lib/model/work-request-resource.js +29 -0
  121. package/lib/model/work-request-resource.js.map +1 -0
  122. package/lib/model/work-request-summary-collection.d.ts +26 -0
  123. package/lib/model/work-request-summary-collection.js +61 -0
  124. package/lib/model/work-request-summary-collection.js.map +1 -0
  125. package/lib/model/work-request-summary.d.ts +65 -0
  126. package/lib/model/work-request-summary.js +61 -0
  127. package/lib/model/work-request-summary.js.map +1 -0
  128. package/lib/model/work-request.d.ts +67 -0
  129. package/lib/model/work-request.js +61 -0
  130. package/lib/model/work-request.js.map +1 -0
  131. package/lib/request/change-protected-database-compartment-request.d.ts +40 -0
  132. package/lib/request/change-protected-database-compartment-request.js +15 -0
  133. package/lib/request/change-protected-database-compartment-request.js.map +1 -0
  134. package/lib/request/change-protection-policy-compartment-request.d.ts +40 -0
  135. package/lib/request/change-protection-policy-compartment-request.js +15 -0
  136. package/lib/request/change-protection-policy-compartment-request.js.map +1 -0
  137. package/lib/request/change-recovery-service-subnet-compartment-request.d.ts +40 -0
  138. package/lib/request/change-recovery-service-subnet-compartment-request.js +15 -0
  139. package/lib/request/change-recovery-service-subnet-compartment-request.js.map +1 -0
  140. package/lib/request/create-protected-database-request.d.ts +36 -0
  141. package/lib/request/create-protected-database-request.js +15 -0
  142. package/lib/request/create-protected-database-request.js.map +1 -0
  143. package/lib/request/create-protection-policy-request.d.ts +36 -0
  144. package/lib/request/create-protection-policy-request.js +15 -0
  145. package/lib/request/create-protection-policy-request.js.map +1 -0
  146. package/lib/request/create-recovery-service-subnet-request.d.ts +36 -0
  147. package/lib/request/create-recovery-service-subnet-request.js +15 -0
  148. package/lib/request/create-recovery-service-subnet-request.js.map +1 -0
  149. package/lib/request/delete-protected-database-request.d.ts +35 -0
  150. package/lib/request/delete-protected-database-request.js +15 -0
  151. package/lib/request/delete-protected-database-request.js.map +1 -0
  152. package/lib/request/delete-protection-policy-request.d.ts +35 -0
  153. package/lib/request/delete-protection-policy-request.js +15 -0
  154. package/lib/request/delete-protection-policy-request.js.map +1 -0
  155. package/lib/request/delete-recovery-service-subnet-request.d.ts +35 -0
  156. package/lib/request/delete-recovery-service-subnet-request.js +15 -0
  157. package/lib/request/delete-recovery-service-subnet-request.js.map +1 -0
  158. package/lib/request/fetch-protected-database-configuration-request.d.ts +40 -0
  159. package/lib/request/fetch-protected-database-configuration-request.js +15 -0
  160. package/lib/request/fetch-protected-database-configuration-request.js.map +1 -0
  161. package/lib/request/get-protected-database-request.d.ts +26 -0
  162. package/lib/request/get-protected-database-request.js +15 -0
  163. package/lib/request/get-protected-database-request.js.map +1 -0
  164. package/lib/request/get-protection-policy-request.d.ts +26 -0
  165. package/lib/request/get-protection-policy-request.js +15 -0
  166. package/lib/request/get-protection-policy-request.js.map +1 -0
  167. package/lib/request/get-recovery-service-subnet-request.d.ts +26 -0
  168. package/lib/request/get-recovery-service-subnet-request.js +15 -0
  169. package/lib/request/get-recovery-service-subnet-request.js.map +1 -0
  170. package/lib/request/get-work-request-request.d.ts +26 -0
  171. package/lib/request/get-work-request-request.js +15 -0
  172. package/lib/request/get-work-request-request.js.map +1 -0
  173. package/lib/request/index.d.ts +58 -0
  174. package/lib/request/index.js +47 -0
  175. package/lib/request/index.js.map +1 -0
  176. package/lib/request/list-protected-databases-request.d.ts +76 -0
  177. package/lib/request/list-protected-databases-request.js +24 -0
  178. package/lib/request/list-protected-databases-request.js.map +1 -0
  179. package/lib/request/list-protection-policies-request.d.ts +76 -0
  180. package/lib/request/list-protection-policies-request.js +29 -0
  181. package/lib/request/list-protection-policies-request.js.map +1 -0
  182. package/lib/request/list-recovery-service-subnets-request.d.ts +79 -0
  183. package/lib/request/list-recovery-service-subnets-request.js +24 -0
  184. package/lib/request/list-recovery-service-subnets-request.js.map +1 -0
  185. package/lib/request/list-work-request-errors-request.d.ts +52 -0
  186. package/lib/request/list-work-request-errors-request.js +23 -0
  187. package/lib/request/list-work-request-errors-request.js.map +1 -0
  188. package/lib/request/list-work-request-logs-request.d.ts +52 -0
  189. package/lib/request/list-work-request-logs-request.js +23 -0
  190. package/lib/request/list-work-request-logs-request.js.map +1 -0
  191. package/lib/request/list-work-requests-request.d.ts +64 -0
  192. package/lib/request/list-work-requests-request.js +23 -0
  193. package/lib/request/list-work-requests-request.js.map +1 -0
  194. package/lib/request/update-protected-database-request.d.ts +40 -0
  195. package/lib/request/update-protected-database-request.js +15 -0
  196. package/lib/request/update-protected-database-request.js.map +1 -0
  197. package/lib/request/update-protection-policy-request.d.ts +40 -0
  198. package/lib/request/update-protection-policy-request.js +15 -0
  199. package/lib/request/update-protection-policy-request.js.map +1 -0
  200. package/lib/request/update-recovery-service-subnet-request.d.ts +40 -0
  201. package/lib/request/update-recovery-service-subnet-request.js +15 -0
  202. package/lib/request/update-recovery-service-subnet-request.js.map +1 -0
  203. package/lib/response/change-protected-database-compartment-response.d.ts +25 -0
  204. package/lib/response/change-protected-database-compartment-response.js +15 -0
  205. package/lib/response/change-protected-database-compartment-response.js.map +1 -0
  206. package/lib/response/change-protection-policy-compartment-response.d.ts +25 -0
  207. package/lib/response/change-protection-policy-compartment-response.js +15 -0
  208. package/lib/response/change-protection-policy-compartment-response.js.map +1 -0
  209. package/lib/response/change-recovery-service-subnet-compartment-response.d.ts +25 -0
  210. package/lib/response/change-recovery-service-subnet-compartment-response.js +15 -0
  211. package/lib/response/change-recovery-service-subnet-compartment-response.js.map +1 -0
  212. package/lib/response/create-protected-database-response.d.ts +40 -0
  213. package/lib/response/create-protected-database-response.js +15 -0
  214. package/lib/response/create-protected-database-response.js.map +1 -0
  215. package/lib/response/create-protection-policy-response.d.ts +40 -0
  216. package/lib/response/create-protection-policy-response.js +15 -0
  217. package/lib/response/create-protection-policy-response.js.map +1 -0
  218. package/lib/response/create-recovery-service-subnet-response.d.ts +40 -0
  219. package/lib/response/create-recovery-service-subnet-response.js +15 -0
  220. package/lib/response/create-recovery-service-subnet-response.js.map +1 -0
  221. package/lib/response/delete-protected-database-response.d.ts +25 -0
  222. package/lib/response/delete-protected-database-response.js +15 -0
  223. package/lib/response/delete-protected-database-response.js.map +1 -0
  224. package/lib/response/delete-protection-policy-response.d.ts +25 -0
  225. package/lib/response/delete-protection-policy-response.js +15 -0
  226. package/lib/response/delete-protection-policy-response.js.map +1 -0
  227. package/lib/response/delete-recovery-service-subnet-response.d.ts +25 -0
  228. package/lib/response/delete-recovery-service-subnet-response.js +15 -0
  229. package/lib/response/delete-recovery-service-subnet-response.js.map +1 -0
  230. package/lib/response/fetch-protected-database-configuration-response.d.ts +31 -0
  231. package/lib/response/fetch-protected-database-configuration-response.js +15 -0
  232. package/lib/response/fetch-protected-database-configuration-response.js.map +1 -0
  233. package/lib/response/get-protected-database-response.d.ts +30 -0
  234. package/lib/response/get-protected-database-response.js +15 -0
  235. package/lib/response/get-protected-database-response.js.map +1 -0
  236. package/lib/response/get-protection-policy-response.d.ts +30 -0
  237. package/lib/response/get-protection-policy-response.js +15 -0
  238. package/lib/response/get-protection-policy-response.js.map +1 -0
  239. package/lib/response/get-recovery-service-subnet-response.d.ts +30 -0
  240. package/lib/response/get-recovery-service-subnet-response.js +15 -0
  241. package/lib/response/get-recovery-service-subnet-response.js.map +1 -0
  242. package/lib/response/get-work-request-response.d.ts +29 -0
  243. package/lib/response/get-work-request-response.js +15 -0
  244. package/lib/response/get-work-request-response.js.map +1 -0
  245. package/lib/response/index.d.ts +58 -0
  246. package/lib/response/index.js +15 -0
  247. package/lib/response/index.js.map +1 -0
  248. package/lib/response/list-protected-databases-response.d.ts +32 -0
  249. package/lib/response/list-protected-databases-response.js +15 -0
  250. package/lib/response/list-protected-databases-response.js.map +1 -0
  251. package/lib/response/list-protection-policies-response.d.ts +32 -0
  252. package/lib/response/list-protection-policies-response.js +15 -0
  253. package/lib/response/list-protection-policies-response.js.map +1 -0
  254. package/lib/response/list-recovery-service-subnets-response.d.ts +32 -0
  255. package/lib/response/list-recovery-service-subnets-response.js +15 -0
  256. package/lib/response/list-recovery-service-subnets-response.js.map +1 -0
  257. package/lib/response/list-work-request-errors-response.d.ts +32 -0
  258. package/lib/response/list-work-request-errors-response.js +15 -0
  259. package/lib/response/list-work-request-errors-response.js.map +1 -0
  260. package/lib/response/list-work-request-logs-response.d.ts +32 -0
  261. package/lib/response/list-work-request-logs-response.js +15 -0
  262. package/lib/response/list-work-request-logs-response.js.map +1 -0
  263. package/lib/response/list-work-requests-response.d.ts +32 -0
  264. package/lib/response/list-work-requests-response.js +15 -0
  265. package/lib/response/list-work-requests-response.js.map +1 -0
  266. package/lib/response/update-protected-database-response.d.ts +25 -0
  267. package/lib/response/update-protected-database-response.js +15 -0
  268. package/lib/response/update-protected-database-response.js.map +1 -0
  269. package/lib/response/update-protection-policy-response.d.ts +25 -0
  270. package/lib/response/update-protection-policy-response.js +15 -0
  271. package/lib/response/update-protection-policy-response.js.map +1 -0
  272. package/lib/response/update-recovery-service-subnet-response.d.ts +25 -0
  273. package/lib/response/update-recovery-service-subnet-response.js +15 -0
  274. package/lib/response/update-recovery-service-subnet-response.js.map +1 -0
  275. package/package.json +29 -0
package/lib/client.js ADDED
@@ -0,0 +1,1669 @@
1
+ "use strict";
2
+ /**
3
+ * Oracle Database Autonomous Recovery Service API
4
+ * Use Oracle Database Autonomous Recovery Service API to manage Protected Databases.
5
+ * OpenAPI spec version: 20210216
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OracleSDKGenerator.
9
+ * Do not edit the class manually.
10
+ *
11
+ * Copyright (c) 2020, 2023, 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.DatabaseRecoveryClient = exports.DatabaseRecoveryApiKeys = void 0;
44
+ const common = require("oci-common");
45
+ const model = __importStar(require("./model"));
46
+ const databaserecovery_waiter_1 = require("./databaserecovery-waiter");
47
+ const oci_common_1 = require("oci-common");
48
+ // ===============================================
49
+ // This file is autogenerated - Please do not edit
50
+ // ===============================================
51
+ var DatabaseRecoveryApiKeys;
52
+ (function (DatabaseRecoveryApiKeys) {
53
+ })(DatabaseRecoveryApiKeys = exports.DatabaseRecoveryApiKeys || (exports.DatabaseRecoveryApiKeys = {}));
54
+ /**
55
+ * This service client uses {@link common.CircuitBreaker.DefaultConfiguration} for all the operations by default if no circuit breaker configuration is defined by the user.
56
+ */
57
+ class DatabaseRecoveryClient {
58
+ constructor(params, clientConfiguration) {
59
+ this["_endpoint"] = "";
60
+ this["_defaultHeaders"] = {};
61
+ this._circuitBreaker = null;
62
+ this._httpOptions = undefined;
63
+ this.targetService = "DatabaseRecovery";
64
+ const requestSigner = params.authenticationDetailsProvider
65
+ ? new common.DefaultRequestSigner(params.authenticationDetailsProvider)
66
+ : null;
67
+ if (clientConfiguration) {
68
+ this._clientConfiguration = clientConfiguration;
69
+ this._circuitBreaker = clientConfiguration.circuitBreaker
70
+ ? clientConfiguration.circuitBreaker.circuit
71
+ : null;
72
+ this._httpOptions = clientConfiguration.httpOptions
73
+ ? clientConfiguration.httpOptions
74
+ : undefined;
75
+ }
76
+ // if circuit breaker is not created, check if circuit breaker system is enabled to use default circuit breaker
77
+ const specCircuitBreakerEnabled = true;
78
+ if (!this._circuitBreaker &&
79
+ common.utils.isCircuitBreakerSystemEnabled(clientConfiguration) &&
80
+ (specCircuitBreakerEnabled || common.CircuitBreaker.DefaultCircuitBreakerOverriden)) {
81
+ this._circuitBreaker = new common.CircuitBreaker().circuit;
82
+ }
83
+ this._httpClient =
84
+ params.httpClient ||
85
+ new common.FetchHttpClient(requestSigner, this._circuitBreaker, this._httpOptions);
86
+ if (params.authenticationDetailsProvider &&
87
+ common.isRegionProvider(params.authenticationDetailsProvider)) {
88
+ const provider = params.authenticationDetailsProvider;
89
+ if (provider.getRegion()) {
90
+ this.region = provider.getRegion();
91
+ }
92
+ }
93
+ }
94
+ /**
95
+ * Get the endpoint that is being used to call (ex, https://www.example.com).
96
+ */
97
+ get endpoint() {
98
+ return this._endpoint;
99
+ }
100
+ /**
101
+ * Sets the endpoint to call (ex, https://www.example.com).
102
+ * @param endpoint The endpoint of the service.
103
+ */
104
+ set endpoint(endpoint) {
105
+ this._endpoint = endpoint;
106
+ this._endpoint = this._endpoint + "/20210216";
107
+ if (this.logger)
108
+ this.logger.info(`DatabaseRecoveryClient endpoint set to ${this._endpoint}`);
109
+ }
110
+ get logger() {
111
+ return common.LOG.logger;
112
+ }
113
+ /**
114
+ * Sets the region to call (ex, Region.US_PHOENIX_1).
115
+ * Note, this will call {@link #endpoint(String) endpoint} after resolving the endpoint.
116
+ * @param region The region of the service.
117
+ */
118
+ set region(region) {
119
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegion(DatabaseRecoveryClient.serviceEndpointTemplate, region, DatabaseRecoveryClient.endpointServiceName);
120
+ }
121
+ /**
122
+ * Sets the regionId to call (ex, 'us-phoenix-1').
123
+ *
124
+ * Note, this will first try to map the region ID to a known Region and call {@link #region(Region) region}.
125
+ * If no known Region could be determined, it will create an endpoint assuming its in default Realm OC1
126
+ * and then call {@link #endpoint(String) endpoint}.
127
+ * @param regionId The public region ID.
128
+ */
129
+ set regionId(regionId) {
130
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(DatabaseRecoveryClient.serviceEndpointTemplate, regionId, DatabaseRecoveryClient.endpointServiceName);
131
+ }
132
+ /**
133
+ * Creates a new DatabaseRecoveryWaiter for resources for this service.
134
+ *
135
+ * @param config The waiter configuration for termination and delay strategy
136
+ * @return The service waiters.
137
+ */
138
+ createWaiters(config) {
139
+ this._waiters = new databaserecovery_waiter_1.DatabaseRecoveryWaiter(this, config);
140
+ return this._waiters;
141
+ }
142
+ /**
143
+ * Gets the waiters available for resources for this service.
144
+ *
145
+ * @return The service waiters.
146
+ */
147
+ getWaiters() {
148
+ if (this._waiters) {
149
+ return this._waiters;
150
+ }
151
+ throw Error("Waiters do not exist. Please create waiters.");
152
+ }
153
+ /**
154
+ * Moves a protected database resource from the existing compartment to the specified compartment. When provided, If-Match is checked against ETag values of the resource.
155
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
156
+ * @param ChangeProtectedDatabaseCompartmentRequest
157
+ * @return ChangeProtectedDatabaseCompartmentResponse
158
+ * @throws OciError when an error occurs
159
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.52.0/recovery/ChangeProtectedDatabaseCompartment.ts.html |here} to see how to use ChangeProtectedDatabaseCompartment API.
160
+ */
161
+ changeProtectedDatabaseCompartment(changeProtectedDatabaseCompartmentRequest) {
162
+ return __awaiter(this, void 0, void 0, function* () {
163
+ if (this.logger)
164
+ this.logger.debug("Calling operation DatabaseRecoveryClient#changeProtectedDatabaseCompartment.");
165
+ const operationName = "changeProtectedDatabaseCompartment";
166
+ const apiReferenceLink = "";
167
+ const pathParams = {
168
+ "{protectedDatabaseId}": changeProtectedDatabaseCompartmentRequest.protectedDatabaseId
169
+ };
170
+ const queryParams = {};
171
+ let headerParams = {
172
+ "Content-Type": common.Constants.APPLICATION_JSON,
173
+ "if-match": changeProtectedDatabaseCompartmentRequest.ifMatch,
174
+ "opc-request-id": changeProtectedDatabaseCompartmentRequest.opcRequestId
175
+ };
176
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
177
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, changeProtectedDatabaseCompartmentRequest.retryConfiguration, specRetryConfiguration);
178
+ if (this.logger)
179
+ retrier.logger = this.logger;
180
+ const request = yield oci_common_1.composeRequest({
181
+ baseEndpoint: this._endpoint,
182
+ defaultHeaders: this._defaultHeaders,
183
+ path: "/protectedDatabases/{protectedDatabaseId}/actions/changeCompartment",
184
+ method: "POST",
185
+ bodyContent: common.ObjectSerializer.serialize(changeProtectedDatabaseCompartmentRequest.changeProtectedDatabaseCompartmentDetails, "ChangeProtectedDatabaseCompartmentDetails", model.ChangeProtectedDatabaseCompartmentDetails.getJsonObj),
186
+ pathParams: pathParams,
187
+ headerParams: headerParams,
188
+ queryParams: queryParams
189
+ });
190
+ try {
191
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
192
+ const sdkResponse = oci_common_1.composeResponse({
193
+ responseObject: {},
194
+ responseHeaders: [
195
+ {
196
+ value: response.headers.get("opc-work-request-id"),
197
+ key: "opcWorkRequestId",
198
+ dataType: "string"
199
+ },
200
+ {
201
+ value: response.headers.get("opc-request-id"),
202
+ key: "opcRequestId",
203
+ dataType: "string"
204
+ }
205
+ ]
206
+ });
207
+ return sdkResponse;
208
+ }
209
+ catch (err) {
210
+ throw err;
211
+ }
212
+ });
213
+ }
214
+ /**
215
+ * Moves a protection policy resource from the existing compartment to the specified compartment. When provided, If-Match is checked against ETag values of the resource.
216
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
217
+ * @param ChangeProtectionPolicyCompartmentRequest
218
+ * @return ChangeProtectionPolicyCompartmentResponse
219
+ * @throws OciError when an error occurs
220
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.52.0/recovery/ChangeProtectionPolicyCompartment.ts.html |here} to see how to use ChangeProtectionPolicyCompartment API.
221
+ */
222
+ changeProtectionPolicyCompartment(changeProtectionPolicyCompartmentRequest) {
223
+ return __awaiter(this, void 0, void 0, function* () {
224
+ if (this.logger)
225
+ this.logger.debug("Calling operation DatabaseRecoveryClient#changeProtectionPolicyCompartment.");
226
+ const operationName = "changeProtectionPolicyCompartment";
227
+ const apiReferenceLink = "";
228
+ const pathParams = {
229
+ "{protectionPolicyId}": changeProtectionPolicyCompartmentRequest.protectionPolicyId
230
+ };
231
+ const queryParams = {};
232
+ let headerParams = {
233
+ "Content-Type": common.Constants.APPLICATION_JSON,
234
+ "if-match": changeProtectionPolicyCompartmentRequest.ifMatch,
235
+ "opc-request-id": changeProtectionPolicyCompartmentRequest.opcRequestId
236
+ };
237
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
238
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, changeProtectionPolicyCompartmentRequest.retryConfiguration, specRetryConfiguration);
239
+ if (this.logger)
240
+ retrier.logger = this.logger;
241
+ const request = yield oci_common_1.composeRequest({
242
+ baseEndpoint: this._endpoint,
243
+ defaultHeaders: this._defaultHeaders,
244
+ path: "/protectionPolicies/{protectionPolicyId}/actions/changeCompartment",
245
+ method: "POST",
246
+ bodyContent: common.ObjectSerializer.serialize(changeProtectionPolicyCompartmentRequest.changeProtectionPolicyCompartmentDetails, "ChangeProtectionPolicyCompartmentDetails", model.ChangeProtectionPolicyCompartmentDetails.getJsonObj),
247
+ pathParams: pathParams,
248
+ headerParams: headerParams,
249
+ queryParams: queryParams
250
+ });
251
+ try {
252
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
253
+ const sdkResponse = oci_common_1.composeResponse({
254
+ responseObject: {},
255
+ responseHeaders: [
256
+ {
257
+ value: response.headers.get("opc-work-request-id"),
258
+ key: "opcWorkRequestId",
259
+ dataType: "string"
260
+ },
261
+ {
262
+ value: response.headers.get("opc-request-id"),
263
+ key: "opcRequestId",
264
+ dataType: "string"
265
+ }
266
+ ]
267
+ });
268
+ return sdkResponse;
269
+ }
270
+ catch (err) {
271
+ throw err;
272
+ }
273
+ });
274
+ }
275
+ /**
276
+ * Moves a recovery service subnet resource from the existing compartment to the specified compartment. When provided, If-Match is checked against ETag values of the resource.
277
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
278
+ * @param ChangeRecoveryServiceSubnetCompartmentRequest
279
+ * @return ChangeRecoveryServiceSubnetCompartmentResponse
280
+ * @throws OciError when an error occurs
281
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.52.0/recovery/ChangeRecoveryServiceSubnetCompartment.ts.html |here} to see how to use ChangeRecoveryServiceSubnetCompartment API.
282
+ */
283
+ changeRecoveryServiceSubnetCompartment(changeRecoveryServiceSubnetCompartmentRequest) {
284
+ return __awaiter(this, void 0, void 0, function* () {
285
+ if (this.logger)
286
+ this.logger.debug("Calling operation DatabaseRecoveryClient#changeRecoveryServiceSubnetCompartment.");
287
+ const operationName = "changeRecoveryServiceSubnetCompartment";
288
+ const apiReferenceLink = "";
289
+ const pathParams = {
290
+ "{recoveryServiceSubnetId}": changeRecoveryServiceSubnetCompartmentRequest.recoveryServiceSubnetId
291
+ };
292
+ const queryParams = {};
293
+ let headerParams = {
294
+ "Content-Type": common.Constants.APPLICATION_JSON,
295
+ "if-match": changeRecoveryServiceSubnetCompartmentRequest.ifMatch,
296
+ "opc-request-id": changeRecoveryServiceSubnetCompartmentRequest.opcRequestId
297
+ };
298
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
299
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, changeRecoveryServiceSubnetCompartmentRequest.retryConfiguration, specRetryConfiguration);
300
+ if (this.logger)
301
+ retrier.logger = this.logger;
302
+ const request = yield oci_common_1.composeRequest({
303
+ baseEndpoint: this._endpoint,
304
+ defaultHeaders: this._defaultHeaders,
305
+ path: "/recoveryServiceSubnets/{recoveryServiceSubnetId}/actions/changeCompartment",
306
+ method: "POST",
307
+ bodyContent: common.ObjectSerializer.serialize(changeRecoveryServiceSubnetCompartmentRequest.changeRecoveryServiceSubnetCompartmentDetails, "ChangeRecoveryServiceSubnetCompartmentDetails", model.ChangeRecoveryServiceSubnetCompartmentDetails.getJsonObj),
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
+ * Creates a new Protected Database.
338
+ *
339
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
340
+ * @param CreateProtectedDatabaseRequest
341
+ * @return CreateProtectedDatabaseResponse
342
+ * @throws OciError when an error occurs
343
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.52.0/recovery/CreateProtectedDatabase.ts.html |here} to see how to use CreateProtectedDatabase API.
344
+ */
345
+ createProtectedDatabase(createProtectedDatabaseRequest) {
346
+ return __awaiter(this, void 0, void 0, function* () {
347
+ if (this.logger)
348
+ this.logger.debug("Calling operation DatabaseRecoveryClient#createProtectedDatabase.");
349
+ const operationName = "createProtectedDatabase";
350
+ const apiReferenceLink = "";
351
+ const pathParams = {};
352
+ const queryParams = {};
353
+ let headerParams = {
354
+ "Content-Type": common.Constants.APPLICATION_JSON,
355
+ "opc-retry-token": createProtectedDatabaseRequest.opcRetryToken,
356
+ "opc-request-id": createProtectedDatabaseRequest.opcRequestId
357
+ };
358
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
359
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, createProtectedDatabaseRequest.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: "/protectedDatabases",
366
+ method: "POST",
367
+ bodyContent: common.ObjectSerializer.serialize(createProtectedDatabaseRequest.createProtectedDatabaseDetails, "CreateProtectedDatabaseDetails", model.CreateProtectedDatabaseDetails.getJsonObj),
368
+ pathParams: pathParams,
369
+ headerParams: headerParams,
370
+ queryParams: queryParams
371
+ });
372
+ try {
373
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
374
+ const sdkResponse = oci_common_1.composeResponse({
375
+ responseObject: {},
376
+ body: yield response.json(),
377
+ bodyKey: "protectedDatabase",
378
+ bodyModel: model.ProtectedDatabase,
379
+ type: "model.ProtectedDatabase",
380
+ responseHeaders: [
381
+ {
382
+ value: response.headers.get("location"),
383
+ key: "location",
384
+ dataType: "string"
385
+ },
386
+ {
387
+ value: response.headers.get("etag"),
388
+ key: "etag",
389
+ dataType: "string"
390
+ },
391
+ {
392
+ value: response.headers.get("opc-work-request-id"),
393
+ key: "opcWorkRequestId",
394
+ dataType: "string"
395
+ },
396
+ {
397
+ value: response.headers.get("opc-request-id"),
398
+ key: "opcRequestId",
399
+ dataType: "string"
400
+ }
401
+ ]
402
+ });
403
+ return sdkResponse;
404
+ }
405
+ catch (err) {
406
+ throw err;
407
+ }
408
+ });
409
+ }
410
+ /**
411
+ * Creates a new Protection Policy.
412
+ *
413
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
414
+ * @param CreateProtectionPolicyRequest
415
+ * @return CreateProtectionPolicyResponse
416
+ * @throws OciError when an error occurs
417
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.52.0/recovery/CreateProtectionPolicy.ts.html |here} to see how to use CreateProtectionPolicy API.
418
+ */
419
+ createProtectionPolicy(createProtectionPolicyRequest) {
420
+ return __awaiter(this, void 0, void 0, function* () {
421
+ if (this.logger)
422
+ this.logger.debug("Calling operation DatabaseRecoveryClient#createProtectionPolicy.");
423
+ const operationName = "createProtectionPolicy";
424
+ const apiReferenceLink = "";
425
+ const pathParams = {};
426
+ const queryParams = {};
427
+ let headerParams = {
428
+ "Content-Type": common.Constants.APPLICATION_JSON,
429
+ "opc-retry-token": createProtectionPolicyRequest.opcRetryToken,
430
+ "opc-request-id": createProtectionPolicyRequest.opcRequestId
431
+ };
432
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
433
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, createProtectionPolicyRequest.retryConfiguration, specRetryConfiguration);
434
+ if (this.logger)
435
+ retrier.logger = this.logger;
436
+ const request = yield oci_common_1.composeRequest({
437
+ baseEndpoint: this._endpoint,
438
+ defaultHeaders: this._defaultHeaders,
439
+ path: "/protectionPolicies",
440
+ method: "POST",
441
+ bodyContent: common.ObjectSerializer.serialize(createProtectionPolicyRequest.createProtectionPolicyDetails, "CreateProtectionPolicyDetails", model.CreateProtectionPolicyDetails.getJsonObj),
442
+ pathParams: pathParams,
443
+ headerParams: headerParams,
444
+ queryParams: queryParams
445
+ });
446
+ try {
447
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
448
+ const sdkResponse = oci_common_1.composeResponse({
449
+ responseObject: {},
450
+ body: yield response.json(),
451
+ bodyKey: "protectionPolicy",
452
+ bodyModel: model.ProtectionPolicy,
453
+ type: "model.ProtectionPolicy",
454
+ responseHeaders: [
455
+ {
456
+ value: response.headers.get("location"),
457
+ key: "location",
458
+ dataType: "string"
459
+ },
460
+ {
461
+ value: response.headers.get("etag"),
462
+ key: "etag",
463
+ dataType: "string"
464
+ },
465
+ {
466
+ value: response.headers.get("opc-work-request-id"),
467
+ key: "opcWorkRequestId",
468
+ dataType: "string"
469
+ },
470
+ {
471
+ value: response.headers.get("opc-request-id"),
472
+ key: "opcRequestId",
473
+ dataType: "string"
474
+ }
475
+ ]
476
+ });
477
+ return sdkResponse;
478
+ }
479
+ catch (err) {
480
+ throw err;
481
+ }
482
+ });
483
+ }
484
+ /**
485
+ * Creates a new Recovery Service Subnet.
486
+ *
487
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
488
+ * @param CreateRecoveryServiceSubnetRequest
489
+ * @return CreateRecoveryServiceSubnetResponse
490
+ * @throws OciError when an error occurs
491
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.52.0/recovery/CreateRecoveryServiceSubnet.ts.html |here} to see how to use CreateRecoveryServiceSubnet API.
492
+ */
493
+ createRecoveryServiceSubnet(createRecoveryServiceSubnetRequest) {
494
+ return __awaiter(this, void 0, void 0, function* () {
495
+ if (this.logger)
496
+ this.logger.debug("Calling operation DatabaseRecoveryClient#createRecoveryServiceSubnet.");
497
+ const operationName = "createRecoveryServiceSubnet";
498
+ const apiReferenceLink = "";
499
+ const pathParams = {};
500
+ const queryParams = {};
501
+ let headerParams = {
502
+ "Content-Type": common.Constants.APPLICATION_JSON,
503
+ "opc-retry-token": createRecoveryServiceSubnetRequest.opcRetryToken,
504
+ "opc-request-id": createRecoveryServiceSubnetRequest.opcRequestId
505
+ };
506
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
507
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, createRecoveryServiceSubnetRequest.retryConfiguration, specRetryConfiguration);
508
+ if (this.logger)
509
+ retrier.logger = this.logger;
510
+ const request = yield oci_common_1.composeRequest({
511
+ baseEndpoint: this._endpoint,
512
+ defaultHeaders: this._defaultHeaders,
513
+ path: "/recoveryServiceSubnets",
514
+ method: "POST",
515
+ bodyContent: common.ObjectSerializer.serialize(createRecoveryServiceSubnetRequest.createRecoveryServiceSubnetDetails, "CreateRecoveryServiceSubnetDetails", model.CreateRecoveryServiceSubnetDetails.getJsonObj),
516
+ pathParams: pathParams,
517
+ headerParams: headerParams,
518
+ queryParams: queryParams
519
+ });
520
+ try {
521
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
522
+ const sdkResponse = oci_common_1.composeResponse({
523
+ responseObject: {},
524
+ body: yield response.json(),
525
+ bodyKey: "recoveryServiceSubnet",
526
+ bodyModel: model.RecoveryServiceSubnet,
527
+ type: "model.RecoveryServiceSubnet",
528
+ responseHeaders: [
529
+ {
530
+ value: response.headers.get("location"),
531
+ key: "location",
532
+ dataType: "string"
533
+ },
534
+ {
535
+ value: response.headers.get("etag"),
536
+ key: "etag",
537
+ dataType: "string"
538
+ },
539
+ {
540
+ value: response.headers.get("opc-work-request-id"),
541
+ key: "opcWorkRequestId",
542
+ dataType: "string"
543
+ },
544
+ {
545
+ value: response.headers.get("opc-request-id"),
546
+ key: "opcRequestId",
547
+ dataType: "string"
548
+ }
549
+ ]
550
+ });
551
+ return sdkResponse;
552
+ }
553
+ catch (err) {
554
+ throw err;
555
+ }
556
+ });
557
+ }
558
+ /**
559
+ * Deletes a protected database based on the specified protected database ID.
560
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
561
+ * @param DeleteProtectedDatabaseRequest
562
+ * @return DeleteProtectedDatabaseResponse
563
+ * @throws OciError when an error occurs
564
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.52.0/recovery/DeleteProtectedDatabase.ts.html |here} to see how to use DeleteProtectedDatabase API.
565
+ */
566
+ deleteProtectedDatabase(deleteProtectedDatabaseRequest) {
567
+ return __awaiter(this, void 0, void 0, function* () {
568
+ if (this.logger)
569
+ this.logger.debug("Calling operation DatabaseRecoveryClient#deleteProtectedDatabase.");
570
+ const operationName = "deleteProtectedDatabase";
571
+ const apiReferenceLink = "";
572
+ const pathParams = {
573
+ "{protectedDatabaseId}": deleteProtectedDatabaseRequest.protectedDatabaseId
574
+ };
575
+ const queryParams = {};
576
+ let headerParams = {
577
+ "Content-Type": common.Constants.APPLICATION_JSON,
578
+ "if-match": deleteProtectedDatabaseRequest.ifMatch,
579
+ "opc-request-id": deleteProtectedDatabaseRequest.opcRequestId
580
+ };
581
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
582
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, deleteProtectedDatabaseRequest.retryConfiguration, specRetryConfiguration);
583
+ if (this.logger)
584
+ retrier.logger = this.logger;
585
+ const request = yield oci_common_1.composeRequest({
586
+ baseEndpoint: this._endpoint,
587
+ defaultHeaders: this._defaultHeaders,
588
+ path: "/protectedDatabases/{protectedDatabaseId}",
589
+ method: "DELETE",
590
+ pathParams: pathParams,
591
+ headerParams: headerParams,
592
+ queryParams: queryParams
593
+ });
594
+ try {
595
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
596
+ const sdkResponse = oci_common_1.composeResponse({
597
+ responseObject: {},
598
+ responseHeaders: [
599
+ {
600
+ value: response.headers.get("opc-work-request-id"),
601
+ key: "opcWorkRequestId",
602
+ dataType: "string"
603
+ },
604
+ {
605
+ value: response.headers.get("opc-request-id"),
606
+ key: "opcRequestId",
607
+ dataType: "string"
608
+ }
609
+ ]
610
+ });
611
+ return sdkResponse;
612
+ }
613
+ catch (err) {
614
+ throw err;
615
+ }
616
+ });
617
+ }
618
+ /**
619
+ * Deletes a specified protection policy. You can delete custom policies only.
620
+ * Deleting a Oracle predefined policies will result in status code 405 Method Not Allowed.
621
+ *
622
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
623
+ * @param DeleteProtectionPolicyRequest
624
+ * @return DeleteProtectionPolicyResponse
625
+ * @throws OciError when an error occurs
626
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.52.0/recovery/DeleteProtectionPolicy.ts.html |here} to see how to use DeleteProtectionPolicy API.
627
+ */
628
+ deleteProtectionPolicy(deleteProtectionPolicyRequest) {
629
+ return __awaiter(this, void 0, void 0, function* () {
630
+ if (this.logger)
631
+ this.logger.debug("Calling operation DatabaseRecoveryClient#deleteProtectionPolicy.");
632
+ const operationName = "deleteProtectionPolicy";
633
+ const apiReferenceLink = "";
634
+ const pathParams = {
635
+ "{protectionPolicyId}": deleteProtectionPolicyRequest.protectionPolicyId
636
+ };
637
+ const queryParams = {};
638
+ let headerParams = {
639
+ "Content-Type": common.Constants.APPLICATION_JSON,
640
+ "if-match": deleteProtectionPolicyRequest.ifMatch,
641
+ "opc-request-id": deleteProtectionPolicyRequest.opcRequestId
642
+ };
643
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
644
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, deleteProtectionPolicyRequest.retryConfiguration, specRetryConfiguration);
645
+ if (this.logger)
646
+ retrier.logger = this.logger;
647
+ const request = yield oci_common_1.composeRequest({
648
+ baseEndpoint: this._endpoint,
649
+ defaultHeaders: this._defaultHeaders,
650
+ path: "/protectionPolicies/{protectionPolicyId}",
651
+ method: "DELETE",
652
+ pathParams: pathParams,
653
+ headerParams: headerParams,
654
+ queryParams: queryParams
655
+ });
656
+ try {
657
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
658
+ const sdkResponse = oci_common_1.composeResponse({
659
+ responseObject: {},
660
+ responseHeaders: [
661
+ {
662
+ value: response.headers.get("opc-work-request-id"),
663
+ key: "opcWorkRequestId",
664
+ dataType: "string"
665
+ },
666
+ {
667
+ value: response.headers.get("opc-request-id"),
668
+ key: "opcRequestId",
669
+ dataType: "string"
670
+ }
671
+ ]
672
+ });
673
+ return sdkResponse;
674
+ }
675
+ catch (err) {
676
+ throw err;
677
+ }
678
+ });
679
+ }
680
+ /**
681
+ * Deletes a specified recovery service subnet.
682
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
683
+ * @param DeleteRecoveryServiceSubnetRequest
684
+ * @return DeleteRecoveryServiceSubnetResponse
685
+ * @throws OciError when an error occurs
686
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.52.0/recovery/DeleteRecoveryServiceSubnet.ts.html |here} to see how to use DeleteRecoveryServiceSubnet API.
687
+ */
688
+ deleteRecoveryServiceSubnet(deleteRecoveryServiceSubnetRequest) {
689
+ return __awaiter(this, void 0, void 0, function* () {
690
+ if (this.logger)
691
+ this.logger.debug("Calling operation DatabaseRecoveryClient#deleteRecoveryServiceSubnet.");
692
+ const operationName = "deleteRecoveryServiceSubnet";
693
+ const apiReferenceLink = "";
694
+ const pathParams = {
695
+ "{recoveryServiceSubnetId}": deleteRecoveryServiceSubnetRequest.recoveryServiceSubnetId
696
+ };
697
+ const queryParams = {};
698
+ let headerParams = {
699
+ "Content-Type": common.Constants.APPLICATION_JSON,
700
+ "if-match": deleteRecoveryServiceSubnetRequest.ifMatch,
701
+ "opc-request-id": deleteRecoveryServiceSubnetRequest.opcRequestId
702
+ };
703
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
704
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, deleteRecoveryServiceSubnetRequest.retryConfiguration, specRetryConfiguration);
705
+ if (this.logger)
706
+ retrier.logger = this.logger;
707
+ const request = yield oci_common_1.composeRequest({
708
+ baseEndpoint: this._endpoint,
709
+ defaultHeaders: this._defaultHeaders,
710
+ path: "/recoveryServiceSubnets/{recoveryServiceSubnetId}",
711
+ method: "DELETE",
712
+ pathParams: pathParams,
713
+ headerParams: headerParams,
714
+ queryParams: queryParams
715
+ });
716
+ try {
717
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
718
+ const sdkResponse = oci_common_1.composeResponse({
719
+ responseObject: {},
720
+ responseHeaders: [
721
+ {
722
+ value: response.headers.get("opc-work-request-id"),
723
+ key: "opcWorkRequestId",
724
+ dataType: "string"
725
+ },
726
+ {
727
+ value: response.headers.get("opc-request-id"),
728
+ key: "opcRequestId",
729
+ dataType: "string"
730
+ }
731
+ ]
732
+ });
733
+ return sdkResponse;
734
+ }
735
+ catch (err) {
736
+ throw err;
737
+ }
738
+ });
739
+ }
740
+ /**
741
+ * Downloads the network service configuration file 'tnsnames.ora' for a specified protected database. Applies to user-defined recovery systems only.
742
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
743
+ * @param FetchProtectedDatabaseConfigurationRequest
744
+ * @return FetchProtectedDatabaseConfigurationResponse
745
+ * @throws OciError when an error occurs
746
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.52.0/recovery/FetchProtectedDatabaseConfiguration.ts.html |here} to see how to use FetchProtectedDatabaseConfiguration API.
747
+ */
748
+ fetchProtectedDatabaseConfiguration(fetchProtectedDatabaseConfigurationRequest) {
749
+ return __awaiter(this, void 0, void 0, function* () {
750
+ if (this.logger)
751
+ this.logger.debug("Calling operation DatabaseRecoveryClient#fetchProtectedDatabaseConfiguration.");
752
+ const operationName = "fetchProtectedDatabaseConfiguration";
753
+ const apiReferenceLink = "";
754
+ const pathParams = {
755
+ "{protectedDatabaseId}": fetchProtectedDatabaseConfigurationRequest.protectedDatabaseId
756
+ };
757
+ const queryParams = {};
758
+ let headerParams = {
759
+ "Content-Type": common.Constants.APPLICATION_JSON,
760
+ "opc-request-id": fetchProtectedDatabaseConfigurationRequest.opcRequestId,
761
+ "if-match": fetchProtectedDatabaseConfigurationRequest.ifMatch
762
+ };
763
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
764
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, fetchProtectedDatabaseConfigurationRequest.retryConfiguration, specRetryConfiguration);
765
+ if (this.logger)
766
+ retrier.logger = this.logger;
767
+ const request = yield oci_common_1.composeRequest({
768
+ baseEndpoint: this._endpoint,
769
+ defaultHeaders: this._defaultHeaders,
770
+ path: "/protectedDatabases/{protectedDatabaseId}/actions/getConfiguration",
771
+ method: "POST",
772
+ bodyContent: common.ObjectSerializer.serialize(fetchProtectedDatabaseConfigurationRequest.fetchProtectedDatabaseConfigurationDetails, "FetchProtectedDatabaseConfigurationDetails", model.FetchProtectedDatabaseConfigurationDetails.getJsonObj),
773
+ pathParams: pathParams,
774
+ headerParams: headerParams,
775
+ queryParams: queryParams
776
+ });
777
+ try {
778
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
779
+ const sdkResponse = oci_common_1.composeResponse({
780
+ responseObject: {},
781
+ body: response.body,
782
+ bodyKey: "value",
783
+ bodyModel: "string",
784
+ responseHeaders: [
785
+ {
786
+ value: response.headers.get("etag"),
787
+ key: "etag",
788
+ dataType: "string"
789
+ },
790
+ {
791
+ value: response.headers.get("opc-request-id"),
792
+ key: "opcRequestId",
793
+ dataType: "string"
794
+ }
795
+ ]
796
+ });
797
+ return sdkResponse;
798
+ }
799
+ catch (err) {
800
+ throw err;
801
+ }
802
+ });
803
+ }
804
+ /**
805
+ * Gets information about a specified protected database.
806
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
807
+ * @param GetProtectedDatabaseRequest
808
+ * @return GetProtectedDatabaseResponse
809
+ * @throws OciError when an error occurs
810
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.52.0/recovery/GetProtectedDatabase.ts.html |here} to see how to use GetProtectedDatabase API.
811
+ */
812
+ getProtectedDatabase(getProtectedDatabaseRequest) {
813
+ return __awaiter(this, void 0, void 0, function* () {
814
+ if (this.logger)
815
+ this.logger.debug("Calling operation DatabaseRecoveryClient#getProtectedDatabase.");
816
+ const operationName = "getProtectedDatabase";
817
+ const apiReferenceLink = "";
818
+ const pathParams = {
819
+ "{protectedDatabaseId}": getProtectedDatabaseRequest.protectedDatabaseId
820
+ };
821
+ const queryParams = {};
822
+ let headerParams = {
823
+ "Content-Type": common.Constants.APPLICATION_JSON,
824
+ "opc-request-id": getProtectedDatabaseRequest.opcRequestId
825
+ };
826
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
827
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getProtectedDatabaseRequest.retryConfiguration, specRetryConfiguration);
828
+ if (this.logger)
829
+ retrier.logger = this.logger;
830
+ const request = yield oci_common_1.composeRequest({
831
+ baseEndpoint: this._endpoint,
832
+ defaultHeaders: this._defaultHeaders,
833
+ path: "/protectedDatabases/{protectedDatabaseId}",
834
+ method: "GET",
835
+ pathParams: pathParams,
836
+ headerParams: headerParams,
837
+ queryParams: queryParams
838
+ });
839
+ try {
840
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
841
+ const sdkResponse = oci_common_1.composeResponse({
842
+ responseObject: {},
843
+ body: yield response.json(),
844
+ bodyKey: "protectedDatabase",
845
+ bodyModel: model.ProtectedDatabase,
846
+ type: "model.ProtectedDatabase",
847
+ responseHeaders: [
848
+ {
849
+ value: response.headers.get("etag"),
850
+ key: "etag",
851
+ dataType: "string"
852
+ },
853
+ {
854
+ value: response.headers.get("opc-request-id"),
855
+ key: "opcRequestId",
856
+ dataType: "string"
857
+ }
858
+ ]
859
+ });
860
+ return sdkResponse;
861
+ }
862
+ catch (err) {
863
+ throw err;
864
+ }
865
+ });
866
+ }
867
+ /**
868
+ * Gets information about a specified protection policy.
869
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
870
+ * @param GetProtectionPolicyRequest
871
+ * @return GetProtectionPolicyResponse
872
+ * @throws OciError when an error occurs
873
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.52.0/recovery/GetProtectionPolicy.ts.html |here} to see how to use GetProtectionPolicy API.
874
+ */
875
+ getProtectionPolicy(getProtectionPolicyRequest) {
876
+ return __awaiter(this, void 0, void 0, function* () {
877
+ if (this.logger)
878
+ this.logger.debug("Calling operation DatabaseRecoveryClient#getProtectionPolicy.");
879
+ const operationName = "getProtectionPolicy";
880
+ const apiReferenceLink = "";
881
+ const pathParams = {
882
+ "{protectionPolicyId}": getProtectionPolicyRequest.protectionPolicyId
883
+ };
884
+ const queryParams = {};
885
+ let headerParams = {
886
+ "Content-Type": common.Constants.APPLICATION_JSON,
887
+ "opc-request-id": getProtectionPolicyRequest.opcRequestId
888
+ };
889
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
890
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getProtectionPolicyRequest.retryConfiguration, specRetryConfiguration);
891
+ if (this.logger)
892
+ retrier.logger = this.logger;
893
+ const request = yield oci_common_1.composeRequest({
894
+ baseEndpoint: this._endpoint,
895
+ defaultHeaders: this._defaultHeaders,
896
+ path: "/protectionPolicies/{protectionPolicyId}",
897
+ method: "GET",
898
+ pathParams: pathParams,
899
+ headerParams: headerParams,
900
+ queryParams: queryParams
901
+ });
902
+ try {
903
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
904
+ const sdkResponse = oci_common_1.composeResponse({
905
+ responseObject: {},
906
+ body: yield response.json(),
907
+ bodyKey: "protectionPolicy",
908
+ bodyModel: model.ProtectionPolicy,
909
+ type: "model.ProtectionPolicy",
910
+ responseHeaders: [
911
+ {
912
+ value: response.headers.get("etag"),
913
+ key: "etag",
914
+ dataType: "string"
915
+ },
916
+ {
917
+ value: response.headers.get("opc-request-id"),
918
+ key: "opcRequestId",
919
+ dataType: "string"
920
+ }
921
+ ]
922
+ });
923
+ return sdkResponse;
924
+ }
925
+ catch (err) {
926
+ throw err;
927
+ }
928
+ });
929
+ }
930
+ /**
931
+ * Gets information about a specified recovery service subnet.
932
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
933
+ * @param GetRecoveryServiceSubnetRequest
934
+ * @return GetRecoveryServiceSubnetResponse
935
+ * @throws OciError when an error occurs
936
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.52.0/recovery/GetRecoveryServiceSubnet.ts.html |here} to see how to use GetRecoveryServiceSubnet API.
937
+ */
938
+ getRecoveryServiceSubnet(getRecoveryServiceSubnetRequest) {
939
+ return __awaiter(this, void 0, void 0, function* () {
940
+ if (this.logger)
941
+ this.logger.debug("Calling operation DatabaseRecoveryClient#getRecoveryServiceSubnet.");
942
+ const operationName = "getRecoveryServiceSubnet";
943
+ const apiReferenceLink = "";
944
+ const pathParams = {
945
+ "{recoveryServiceSubnetId}": getRecoveryServiceSubnetRequest.recoveryServiceSubnetId
946
+ };
947
+ const queryParams = {};
948
+ let headerParams = {
949
+ "Content-Type": common.Constants.APPLICATION_JSON,
950
+ "opc-request-id": getRecoveryServiceSubnetRequest.opcRequestId
951
+ };
952
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
953
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getRecoveryServiceSubnetRequest.retryConfiguration, specRetryConfiguration);
954
+ if (this.logger)
955
+ retrier.logger = this.logger;
956
+ const request = yield oci_common_1.composeRequest({
957
+ baseEndpoint: this._endpoint,
958
+ defaultHeaders: this._defaultHeaders,
959
+ path: "/recoveryServiceSubnets/{recoveryServiceSubnetId}",
960
+ method: "GET",
961
+ pathParams: pathParams,
962
+ headerParams: headerParams,
963
+ queryParams: queryParams
964
+ });
965
+ try {
966
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
967
+ const sdkResponse = oci_common_1.composeResponse({
968
+ responseObject: {},
969
+ body: yield response.json(),
970
+ bodyKey: "recoveryServiceSubnet",
971
+ bodyModel: model.RecoveryServiceSubnet,
972
+ type: "model.RecoveryServiceSubnet",
973
+ responseHeaders: [
974
+ {
975
+ value: response.headers.get("etag"),
976
+ key: "etag",
977
+ dataType: "string"
978
+ },
979
+ {
980
+ value: response.headers.get("opc-request-id"),
981
+ key: "opcRequestId",
982
+ dataType: "string"
983
+ }
984
+ ]
985
+ });
986
+ return sdkResponse;
987
+ }
988
+ catch (err) {
989
+ throw err;
990
+ }
991
+ });
992
+ }
993
+ /**
994
+ * Gets the status of the work request based on the specified ID
995
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
996
+ * @param GetWorkRequestRequest
997
+ * @return GetWorkRequestResponse
998
+ * @throws OciError when an error occurs
999
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.52.0/recovery/GetWorkRequest.ts.html |here} to see how to use GetWorkRequest API.
1000
+ */
1001
+ getWorkRequest(getWorkRequestRequest) {
1002
+ return __awaiter(this, void 0, void 0, function* () {
1003
+ if (this.logger)
1004
+ this.logger.debug("Calling operation DatabaseRecoveryClient#getWorkRequest.");
1005
+ const operationName = "getWorkRequest";
1006
+ const apiReferenceLink = "";
1007
+ const pathParams = {
1008
+ "{workRequestId}": getWorkRequestRequest.workRequestId
1009
+ };
1010
+ const queryParams = {};
1011
+ let headerParams = {
1012
+ "Content-Type": common.Constants.APPLICATION_JSON,
1013
+ "opc-request-id": getWorkRequestRequest.opcRequestId
1014
+ };
1015
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
1016
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getWorkRequestRequest.retryConfiguration, specRetryConfiguration);
1017
+ if (this.logger)
1018
+ retrier.logger = this.logger;
1019
+ const request = yield oci_common_1.composeRequest({
1020
+ baseEndpoint: this._endpoint,
1021
+ defaultHeaders: this._defaultHeaders,
1022
+ path: "/workRequests/{workRequestId}",
1023
+ method: "GET",
1024
+ pathParams: pathParams,
1025
+ headerParams: headerParams,
1026
+ queryParams: queryParams
1027
+ });
1028
+ try {
1029
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1030
+ const sdkResponse = oci_common_1.composeResponse({
1031
+ responseObject: {},
1032
+ body: yield response.json(),
1033
+ bodyKey: "workRequest",
1034
+ bodyModel: model.WorkRequest,
1035
+ type: "model.WorkRequest",
1036
+ responseHeaders: [
1037
+ {
1038
+ value: response.headers.get("opc-request-id"),
1039
+ key: "opcRequestId",
1040
+ dataType: "string"
1041
+ },
1042
+ {
1043
+ value: response.headers.get("retry-after"),
1044
+ key: "retryAfter",
1045
+ dataType: "number"
1046
+ }
1047
+ ]
1048
+ });
1049
+ return sdkResponse;
1050
+ }
1051
+ catch (err) {
1052
+ throw err;
1053
+ }
1054
+ });
1055
+ }
1056
+ /**
1057
+ * Lists the protected databases based on the specified parameters.
1058
+ *
1059
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
1060
+ * @param ListProtectedDatabasesRequest
1061
+ * @return ListProtectedDatabasesResponse
1062
+ * @throws OciError when an error occurs
1063
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.52.0/recovery/ListProtectedDatabases.ts.html |here} to see how to use ListProtectedDatabases API.
1064
+ */
1065
+ listProtectedDatabases(listProtectedDatabasesRequest) {
1066
+ return __awaiter(this, void 0, void 0, function* () {
1067
+ if (this.logger)
1068
+ this.logger.debug("Calling operation DatabaseRecoveryClient#listProtectedDatabases.");
1069
+ const operationName = "listProtectedDatabases";
1070
+ const apiReferenceLink = "";
1071
+ const pathParams = {};
1072
+ const queryParams = {
1073
+ "compartmentId": listProtectedDatabasesRequest.compartmentId,
1074
+ "lifecycleState": listProtectedDatabasesRequest.lifecycleState,
1075
+ "displayName": listProtectedDatabasesRequest.displayName,
1076
+ "id": listProtectedDatabasesRequest.id,
1077
+ "protectionPolicyId": listProtectedDatabasesRequest.protectionPolicyId,
1078
+ "recoveryServiceSubnetId": listProtectedDatabasesRequest.recoveryServiceSubnetId,
1079
+ "limit": listProtectedDatabasesRequest.limit,
1080
+ "page": listProtectedDatabasesRequest.page,
1081
+ "sortOrder": listProtectedDatabasesRequest.sortOrder,
1082
+ "sortBy": listProtectedDatabasesRequest.sortBy
1083
+ };
1084
+ let headerParams = {
1085
+ "Content-Type": common.Constants.APPLICATION_JSON,
1086
+ "opc-request-id": listProtectedDatabasesRequest.opcRequestId
1087
+ };
1088
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
1089
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listProtectedDatabasesRequest.retryConfiguration, specRetryConfiguration);
1090
+ if (this.logger)
1091
+ retrier.logger = this.logger;
1092
+ const request = yield oci_common_1.composeRequest({
1093
+ baseEndpoint: this._endpoint,
1094
+ defaultHeaders: this._defaultHeaders,
1095
+ path: "/protectedDatabases",
1096
+ method: "GET",
1097
+ pathParams: pathParams,
1098
+ headerParams: headerParams,
1099
+ queryParams: queryParams
1100
+ });
1101
+ try {
1102
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1103
+ const sdkResponse = oci_common_1.composeResponse({
1104
+ responseObject: {},
1105
+ body: yield response.json(),
1106
+ bodyKey: "protectedDatabaseCollection",
1107
+ bodyModel: model.ProtectedDatabaseCollection,
1108
+ type: "model.ProtectedDatabaseCollection",
1109
+ responseHeaders: [
1110
+ {
1111
+ value: response.headers.get("opc-request-id"),
1112
+ key: "opcRequestId",
1113
+ dataType: "string"
1114
+ },
1115
+ {
1116
+ value: response.headers.get("opc-next-page"),
1117
+ key: "opcNextPage",
1118
+ dataType: "string"
1119
+ }
1120
+ ]
1121
+ });
1122
+ return sdkResponse;
1123
+ }
1124
+ catch (err) {
1125
+ throw err;
1126
+ }
1127
+ });
1128
+ }
1129
+ /**
1130
+ * Gets a list of protection policies based on the specified parameters.
1131
+ *
1132
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
1133
+ * @param ListProtectionPoliciesRequest
1134
+ * @return ListProtectionPoliciesResponse
1135
+ * @throws OciError when an error occurs
1136
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.52.0/recovery/ListProtectionPolicies.ts.html |here} to see how to use ListProtectionPolicies API.
1137
+ */
1138
+ listProtectionPolicies(listProtectionPoliciesRequest) {
1139
+ return __awaiter(this, void 0, void 0, function* () {
1140
+ if (this.logger)
1141
+ this.logger.debug("Calling operation DatabaseRecoveryClient#listProtectionPolicies.");
1142
+ const operationName = "listProtectionPolicies";
1143
+ const apiReferenceLink = "";
1144
+ const pathParams = {};
1145
+ const queryParams = {
1146
+ "compartmentId": listProtectionPoliciesRequest.compartmentId,
1147
+ "lifecycleState": listProtectionPoliciesRequest.lifecycleState,
1148
+ "displayName": listProtectionPoliciesRequest.displayName,
1149
+ "protectionPolicyId": listProtectionPoliciesRequest.protectionPolicyId,
1150
+ "owner": listProtectionPoliciesRequest.owner,
1151
+ "limit": listProtectionPoliciesRequest.limit,
1152
+ "page": listProtectionPoliciesRequest.page,
1153
+ "sortOrder": listProtectionPoliciesRequest.sortOrder,
1154
+ "sortBy": listProtectionPoliciesRequest.sortBy
1155
+ };
1156
+ let headerParams = {
1157
+ "Content-Type": common.Constants.APPLICATION_JSON,
1158
+ "opc-request-id": listProtectionPoliciesRequest.opcRequestId
1159
+ };
1160
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
1161
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listProtectionPoliciesRequest.retryConfiguration, specRetryConfiguration);
1162
+ if (this.logger)
1163
+ retrier.logger = this.logger;
1164
+ const request = yield oci_common_1.composeRequest({
1165
+ baseEndpoint: this._endpoint,
1166
+ defaultHeaders: this._defaultHeaders,
1167
+ path: "/protectionPolicies",
1168
+ method: "GET",
1169
+ pathParams: pathParams,
1170
+ headerParams: headerParams,
1171
+ queryParams: queryParams
1172
+ });
1173
+ try {
1174
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1175
+ const sdkResponse = oci_common_1.composeResponse({
1176
+ responseObject: {},
1177
+ body: yield response.json(),
1178
+ bodyKey: "protectionPolicyCollection",
1179
+ bodyModel: model.ProtectionPolicyCollection,
1180
+ type: "model.ProtectionPolicyCollection",
1181
+ responseHeaders: [
1182
+ {
1183
+ value: response.headers.get("opc-request-id"),
1184
+ key: "opcRequestId",
1185
+ dataType: "string"
1186
+ },
1187
+ {
1188
+ value: response.headers.get("opc-next-page"),
1189
+ key: "opcNextPage",
1190
+ dataType: "string"
1191
+ }
1192
+ ]
1193
+ });
1194
+ return sdkResponse;
1195
+ }
1196
+ catch (err) {
1197
+ throw err;
1198
+ }
1199
+ });
1200
+ }
1201
+ /**
1202
+ * Returns a list of Recovery Service Subnets.
1203
+ *
1204
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
1205
+ * @param ListRecoveryServiceSubnetsRequest
1206
+ * @return ListRecoveryServiceSubnetsResponse
1207
+ * @throws OciError when an error occurs
1208
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.52.0/recovery/ListRecoveryServiceSubnets.ts.html |here} to see how to use ListRecoveryServiceSubnets API.
1209
+ */
1210
+ listRecoveryServiceSubnets(listRecoveryServiceSubnetsRequest) {
1211
+ return __awaiter(this, void 0, void 0, function* () {
1212
+ if (this.logger)
1213
+ this.logger.debug("Calling operation DatabaseRecoveryClient#listRecoveryServiceSubnets.");
1214
+ const operationName = "listRecoveryServiceSubnets";
1215
+ const apiReferenceLink = "";
1216
+ const pathParams = {};
1217
+ const queryParams = {
1218
+ "compartmentId": listRecoveryServiceSubnetsRequest.compartmentId,
1219
+ "lifecycleState": listRecoveryServiceSubnetsRequest.lifecycleState,
1220
+ "displayName": listRecoveryServiceSubnetsRequest.displayName,
1221
+ "id": listRecoveryServiceSubnetsRequest.id,
1222
+ "vcnId": listRecoveryServiceSubnetsRequest.vcnId,
1223
+ "limit": listRecoveryServiceSubnetsRequest.limit,
1224
+ "page": listRecoveryServiceSubnetsRequest.page,
1225
+ "sortOrder": listRecoveryServiceSubnetsRequest.sortOrder,
1226
+ "sortBy": listRecoveryServiceSubnetsRequest.sortBy
1227
+ };
1228
+ let headerParams = {
1229
+ "Content-Type": common.Constants.APPLICATION_JSON,
1230
+ "opc-request-id": listRecoveryServiceSubnetsRequest.opcRequestId
1231
+ };
1232
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
1233
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listRecoveryServiceSubnetsRequest.retryConfiguration, specRetryConfiguration);
1234
+ if (this.logger)
1235
+ retrier.logger = this.logger;
1236
+ const request = yield oci_common_1.composeRequest({
1237
+ baseEndpoint: this._endpoint,
1238
+ defaultHeaders: this._defaultHeaders,
1239
+ path: "/recoveryServiceSubnets",
1240
+ method: "GET",
1241
+ pathParams: pathParams,
1242
+ headerParams: headerParams,
1243
+ queryParams: queryParams
1244
+ });
1245
+ try {
1246
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1247
+ const sdkResponse = oci_common_1.composeResponse({
1248
+ responseObject: {},
1249
+ body: yield response.json(),
1250
+ bodyKey: "recoveryServiceSubnetCollection",
1251
+ bodyModel: model.RecoveryServiceSubnetCollection,
1252
+ type: "model.RecoveryServiceSubnetCollection",
1253
+ responseHeaders: [
1254
+ {
1255
+ value: response.headers.get("opc-request-id"),
1256
+ key: "opcRequestId",
1257
+ dataType: "string"
1258
+ },
1259
+ {
1260
+ value: response.headers.get("opc-next-page"),
1261
+ key: "opcNextPage",
1262
+ dataType: "string"
1263
+ }
1264
+ ]
1265
+ });
1266
+ return sdkResponse;
1267
+ }
1268
+ catch (err) {
1269
+ throw err;
1270
+ }
1271
+ });
1272
+ }
1273
+ /**
1274
+ * Return a (paginated) list of errors for a given work request.
1275
+ *
1276
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
1277
+ * @param ListWorkRequestErrorsRequest
1278
+ * @return ListWorkRequestErrorsResponse
1279
+ * @throws OciError when an error occurs
1280
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.52.0/recovery/ListWorkRequestErrors.ts.html |here} to see how to use ListWorkRequestErrors API.
1281
+ */
1282
+ listWorkRequestErrors(listWorkRequestErrorsRequest) {
1283
+ return __awaiter(this, void 0, void 0, function* () {
1284
+ if (this.logger)
1285
+ this.logger.debug("Calling operation DatabaseRecoveryClient#listWorkRequestErrors.");
1286
+ const operationName = "listWorkRequestErrors";
1287
+ const apiReferenceLink = "";
1288
+ const pathParams = {
1289
+ "{workRequestId}": listWorkRequestErrorsRequest.workRequestId
1290
+ };
1291
+ const queryParams = {
1292
+ "page": listWorkRequestErrorsRequest.page,
1293
+ "limit": listWorkRequestErrorsRequest.limit,
1294
+ "sortBy": listWorkRequestErrorsRequest.sortBy,
1295
+ "sortOrder": listWorkRequestErrorsRequest.sortOrder
1296
+ };
1297
+ let headerParams = {
1298
+ "Content-Type": common.Constants.APPLICATION_JSON,
1299
+ "opc-request-id": listWorkRequestErrorsRequest.opcRequestId
1300
+ };
1301
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
1302
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listWorkRequestErrorsRequest.retryConfiguration, specRetryConfiguration);
1303
+ if (this.logger)
1304
+ retrier.logger = this.logger;
1305
+ const request = yield oci_common_1.composeRequest({
1306
+ baseEndpoint: this._endpoint,
1307
+ defaultHeaders: this._defaultHeaders,
1308
+ path: "/workRequests/{workRequestId}/errors",
1309
+ method: "GET",
1310
+ pathParams: pathParams,
1311
+ headerParams: headerParams,
1312
+ queryParams: queryParams
1313
+ });
1314
+ try {
1315
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1316
+ const sdkResponse = oci_common_1.composeResponse({
1317
+ responseObject: {},
1318
+ body: yield response.json(),
1319
+ bodyKey: "workRequestErrorCollection",
1320
+ bodyModel: model.WorkRequestErrorCollection,
1321
+ type: "model.WorkRequestErrorCollection",
1322
+ responseHeaders: [
1323
+ {
1324
+ value: response.headers.get("opc-next-page"),
1325
+ key: "opcNextPage",
1326
+ dataType: "string"
1327
+ },
1328
+ {
1329
+ value: response.headers.get("opc-request-id"),
1330
+ key: "opcRequestId",
1331
+ dataType: "string"
1332
+ }
1333
+ ]
1334
+ });
1335
+ return sdkResponse;
1336
+ }
1337
+ catch (err) {
1338
+ throw err;
1339
+ }
1340
+ });
1341
+ }
1342
+ /**
1343
+ * Return a (paginated) list of logs for a given work request.
1344
+ *
1345
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
1346
+ * @param ListWorkRequestLogsRequest
1347
+ * @return ListWorkRequestLogsResponse
1348
+ * @throws OciError when an error occurs
1349
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.52.0/recovery/ListWorkRequestLogs.ts.html |here} to see how to use ListWorkRequestLogs API.
1350
+ */
1351
+ listWorkRequestLogs(listWorkRequestLogsRequest) {
1352
+ return __awaiter(this, void 0, void 0, function* () {
1353
+ if (this.logger)
1354
+ this.logger.debug("Calling operation DatabaseRecoveryClient#listWorkRequestLogs.");
1355
+ const operationName = "listWorkRequestLogs";
1356
+ const apiReferenceLink = "";
1357
+ const pathParams = {
1358
+ "{workRequestId}": listWorkRequestLogsRequest.workRequestId
1359
+ };
1360
+ const queryParams = {
1361
+ "page": listWorkRequestLogsRequest.page,
1362
+ "limit": listWorkRequestLogsRequest.limit,
1363
+ "sortBy": listWorkRequestLogsRequest.sortBy,
1364
+ "sortOrder": listWorkRequestLogsRequest.sortOrder
1365
+ };
1366
+ let headerParams = {
1367
+ "Content-Type": common.Constants.APPLICATION_JSON,
1368
+ "opc-request-id": listWorkRequestLogsRequest.opcRequestId
1369
+ };
1370
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
1371
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listWorkRequestLogsRequest.retryConfiguration, specRetryConfiguration);
1372
+ if (this.logger)
1373
+ retrier.logger = this.logger;
1374
+ const request = yield oci_common_1.composeRequest({
1375
+ baseEndpoint: this._endpoint,
1376
+ defaultHeaders: this._defaultHeaders,
1377
+ path: "/workRequests/{workRequestId}/logs",
1378
+ method: "GET",
1379
+ pathParams: pathParams,
1380
+ headerParams: headerParams,
1381
+ queryParams: queryParams
1382
+ });
1383
+ try {
1384
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1385
+ const sdkResponse = oci_common_1.composeResponse({
1386
+ responseObject: {},
1387
+ body: yield response.json(),
1388
+ bodyKey: "workRequestLogEntryCollection",
1389
+ bodyModel: model.WorkRequestLogEntryCollection,
1390
+ type: "model.WorkRequestLogEntryCollection",
1391
+ responseHeaders: [
1392
+ {
1393
+ value: response.headers.get("opc-next-page"),
1394
+ key: "opcNextPage",
1395
+ dataType: "string"
1396
+ },
1397
+ {
1398
+ value: response.headers.get("opc-request-id"),
1399
+ key: "opcRequestId",
1400
+ dataType: "string"
1401
+ }
1402
+ ]
1403
+ });
1404
+ return sdkResponse;
1405
+ }
1406
+ catch (err) {
1407
+ throw err;
1408
+ }
1409
+ });
1410
+ }
1411
+ /**
1412
+ * Lists the work requests in a compartment.
1413
+ *
1414
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
1415
+ * @param ListWorkRequestsRequest
1416
+ * @return ListWorkRequestsResponse
1417
+ * @throws OciError when an error occurs
1418
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.52.0/recovery/ListWorkRequests.ts.html |here} to see how to use ListWorkRequests API.
1419
+ */
1420
+ listWorkRequests(listWorkRequestsRequest) {
1421
+ return __awaiter(this, void 0, void 0, function* () {
1422
+ if (this.logger)
1423
+ this.logger.debug("Calling operation DatabaseRecoveryClient#listWorkRequests.");
1424
+ const operationName = "listWorkRequests";
1425
+ const apiReferenceLink = "";
1426
+ const pathParams = {};
1427
+ const queryParams = {
1428
+ "compartmentId": listWorkRequestsRequest.compartmentId,
1429
+ "workRequestId": listWorkRequestsRequest.workRequestId,
1430
+ "status": listWorkRequestsRequest.status,
1431
+ "resourceId": listWorkRequestsRequest.resourceId,
1432
+ "page": listWorkRequestsRequest.page,
1433
+ "limit": listWorkRequestsRequest.limit,
1434
+ "sortOrder": listWorkRequestsRequest.sortOrder,
1435
+ "sortBy": listWorkRequestsRequest.sortBy
1436
+ };
1437
+ let headerParams = {
1438
+ "Content-Type": common.Constants.APPLICATION_JSON,
1439
+ "opc-request-id": listWorkRequestsRequest.opcRequestId
1440
+ };
1441
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
1442
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listWorkRequestsRequest.retryConfiguration, specRetryConfiguration);
1443
+ if (this.logger)
1444
+ retrier.logger = this.logger;
1445
+ const request = yield oci_common_1.composeRequest({
1446
+ baseEndpoint: this._endpoint,
1447
+ defaultHeaders: this._defaultHeaders,
1448
+ path: "/workRequests",
1449
+ method: "GET",
1450
+ pathParams: pathParams,
1451
+ headerParams: headerParams,
1452
+ queryParams: queryParams
1453
+ });
1454
+ try {
1455
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1456
+ const sdkResponse = oci_common_1.composeResponse({
1457
+ responseObject: {},
1458
+ body: yield response.json(),
1459
+ bodyKey: "workRequestSummaryCollection",
1460
+ bodyModel: model.WorkRequestSummaryCollection,
1461
+ type: "model.WorkRequestSummaryCollection",
1462
+ responseHeaders: [
1463
+ {
1464
+ value: response.headers.get("opc-request-id"),
1465
+ key: "opcRequestId",
1466
+ dataType: "string"
1467
+ },
1468
+ {
1469
+ value: response.headers.get("opc-next-page"),
1470
+ key: "opcNextPage",
1471
+ dataType: "string"
1472
+ }
1473
+ ]
1474
+ });
1475
+ return sdkResponse;
1476
+ }
1477
+ catch (err) {
1478
+ throw err;
1479
+ }
1480
+ });
1481
+ }
1482
+ /**
1483
+ * Updates the Protected Database
1484
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
1485
+ * @param UpdateProtectedDatabaseRequest
1486
+ * @return UpdateProtectedDatabaseResponse
1487
+ * @throws OciError when an error occurs
1488
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.52.0/recovery/UpdateProtectedDatabase.ts.html |here} to see how to use UpdateProtectedDatabase API.
1489
+ */
1490
+ updateProtectedDatabase(updateProtectedDatabaseRequest) {
1491
+ return __awaiter(this, void 0, void 0, function* () {
1492
+ if (this.logger)
1493
+ this.logger.debug("Calling operation DatabaseRecoveryClient#updateProtectedDatabase.");
1494
+ const operationName = "updateProtectedDatabase";
1495
+ const apiReferenceLink = "";
1496
+ const pathParams = {
1497
+ "{protectedDatabaseId}": updateProtectedDatabaseRequest.protectedDatabaseId
1498
+ };
1499
+ const queryParams = {};
1500
+ let headerParams = {
1501
+ "Content-Type": common.Constants.APPLICATION_JSON,
1502
+ "if-match": updateProtectedDatabaseRequest.ifMatch,
1503
+ "opc-request-id": updateProtectedDatabaseRequest.opcRequestId
1504
+ };
1505
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
1506
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, updateProtectedDatabaseRequest.retryConfiguration, specRetryConfiguration);
1507
+ if (this.logger)
1508
+ retrier.logger = this.logger;
1509
+ const request = yield oci_common_1.composeRequest({
1510
+ baseEndpoint: this._endpoint,
1511
+ defaultHeaders: this._defaultHeaders,
1512
+ path: "/protectedDatabases/{protectedDatabaseId}",
1513
+ method: "PUT",
1514
+ bodyContent: common.ObjectSerializer.serialize(updateProtectedDatabaseRequest.updateProtectedDatabaseDetails, "UpdateProtectedDatabaseDetails", model.UpdateProtectedDatabaseDetails.getJsonObj),
1515
+ pathParams: pathParams,
1516
+ headerParams: headerParams,
1517
+ queryParams: queryParams
1518
+ });
1519
+ try {
1520
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1521
+ const sdkResponse = oci_common_1.composeResponse({
1522
+ responseObject: {},
1523
+ responseHeaders: [
1524
+ {
1525
+ value: response.headers.get("opc-work-request-id"),
1526
+ key: "opcWorkRequestId",
1527
+ dataType: "string"
1528
+ },
1529
+ {
1530
+ value: response.headers.get("opc-request-id"),
1531
+ key: "opcRequestId",
1532
+ dataType: "string"
1533
+ }
1534
+ ]
1535
+ });
1536
+ return sdkResponse;
1537
+ }
1538
+ catch (err) {
1539
+ throw err;
1540
+ }
1541
+ });
1542
+ }
1543
+ /**
1544
+ * Updates the specified protection policy.
1545
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
1546
+ * @param UpdateProtectionPolicyRequest
1547
+ * @return UpdateProtectionPolicyResponse
1548
+ * @throws OciError when an error occurs
1549
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.52.0/recovery/UpdateProtectionPolicy.ts.html |here} to see how to use UpdateProtectionPolicy API.
1550
+ */
1551
+ updateProtectionPolicy(updateProtectionPolicyRequest) {
1552
+ return __awaiter(this, void 0, void 0, function* () {
1553
+ if (this.logger)
1554
+ this.logger.debug("Calling operation DatabaseRecoveryClient#updateProtectionPolicy.");
1555
+ const operationName = "updateProtectionPolicy";
1556
+ const apiReferenceLink = "";
1557
+ const pathParams = {
1558
+ "{protectionPolicyId}": updateProtectionPolicyRequest.protectionPolicyId
1559
+ };
1560
+ const queryParams = {};
1561
+ let headerParams = {
1562
+ "Content-Type": common.Constants.APPLICATION_JSON,
1563
+ "if-match": updateProtectionPolicyRequest.ifMatch,
1564
+ "opc-request-id": updateProtectionPolicyRequest.opcRequestId
1565
+ };
1566
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
1567
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, updateProtectionPolicyRequest.retryConfiguration, specRetryConfiguration);
1568
+ if (this.logger)
1569
+ retrier.logger = this.logger;
1570
+ const request = yield oci_common_1.composeRequest({
1571
+ baseEndpoint: this._endpoint,
1572
+ defaultHeaders: this._defaultHeaders,
1573
+ path: "/protectionPolicies/{protectionPolicyId}",
1574
+ method: "PUT",
1575
+ bodyContent: common.ObjectSerializer.serialize(updateProtectionPolicyRequest.updateProtectionPolicyDetails, "UpdateProtectionPolicyDetails", model.UpdateProtectionPolicyDetails.getJsonObj),
1576
+ pathParams: pathParams,
1577
+ headerParams: headerParams,
1578
+ queryParams: queryParams
1579
+ });
1580
+ try {
1581
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1582
+ const sdkResponse = oci_common_1.composeResponse({
1583
+ responseObject: {},
1584
+ responseHeaders: [
1585
+ {
1586
+ value: response.headers.get("opc-work-request-id"),
1587
+ key: "opcWorkRequestId",
1588
+ dataType: "string"
1589
+ },
1590
+ {
1591
+ value: response.headers.get("opc-request-id"),
1592
+ key: "opcRequestId",
1593
+ dataType: "string"
1594
+ }
1595
+ ]
1596
+ });
1597
+ return sdkResponse;
1598
+ }
1599
+ catch (err) {
1600
+ throw err;
1601
+ }
1602
+ });
1603
+ }
1604
+ /**
1605
+ * Updates the specified recovery service subnet.
1606
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
1607
+ * @param UpdateRecoveryServiceSubnetRequest
1608
+ * @return UpdateRecoveryServiceSubnetResponse
1609
+ * @throws OciError when an error occurs
1610
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.52.0/recovery/UpdateRecoveryServiceSubnet.ts.html |here} to see how to use UpdateRecoveryServiceSubnet API.
1611
+ */
1612
+ updateRecoveryServiceSubnet(updateRecoveryServiceSubnetRequest) {
1613
+ return __awaiter(this, void 0, void 0, function* () {
1614
+ if (this.logger)
1615
+ this.logger.debug("Calling operation DatabaseRecoveryClient#updateRecoveryServiceSubnet.");
1616
+ const operationName = "updateRecoveryServiceSubnet";
1617
+ const apiReferenceLink = "";
1618
+ const pathParams = {
1619
+ "{recoveryServiceSubnetId}": updateRecoveryServiceSubnetRequest.recoveryServiceSubnetId
1620
+ };
1621
+ const queryParams = {};
1622
+ let headerParams = {
1623
+ "Content-Type": common.Constants.APPLICATION_JSON,
1624
+ "if-match": updateRecoveryServiceSubnetRequest.ifMatch,
1625
+ "opc-request-id": updateRecoveryServiceSubnetRequest.opcRequestId
1626
+ };
1627
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
1628
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, updateRecoveryServiceSubnetRequest.retryConfiguration, specRetryConfiguration);
1629
+ if (this.logger)
1630
+ retrier.logger = this.logger;
1631
+ const request = yield oci_common_1.composeRequest({
1632
+ baseEndpoint: this._endpoint,
1633
+ defaultHeaders: this._defaultHeaders,
1634
+ path: "/recoveryServiceSubnets/{recoveryServiceSubnetId}",
1635
+ method: "PUT",
1636
+ bodyContent: common.ObjectSerializer.serialize(updateRecoveryServiceSubnetRequest.updateRecoveryServiceSubnetDetails, "UpdateRecoveryServiceSubnetDetails", model.UpdateRecoveryServiceSubnetDetails.getJsonObj),
1637
+ pathParams: pathParams,
1638
+ headerParams: headerParams,
1639
+ queryParams: queryParams
1640
+ });
1641
+ try {
1642
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1643
+ const sdkResponse = oci_common_1.composeResponse({
1644
+ responseObject: {},
1645
+ responseHeaders: [
1646
+ {
1647
+ value: response.headers.get("opc-work-request-id"),
1648
+ key: "opcWorkRequestId",
1649
+ dataType: "string"
1650
+ },
1651
+ {
1652
+ value: response.headers.get("opc-request-id"),
1653
+ key: "opcRequestId",
1654
+ dataType: "string"
1655
+ }
1656
+ ]
1657
+ });
1658
+ return sdkResponse;
1659
+ }
1660
+ catch (err) {
1661
+ throw err;
1662
+ }
1663
+ });
1664
+ }
1665
+ }
1666
+ exports.DatabaseRecoveryClient = DatabaseRecoveryClient;
1667
+ DatabaseRecoveryClient.serviceEndpointTemplate = "https://recovery.{region}.oci.{secondLevelDomain}";
1668
+ DatabaseRecoveryClient.endpointServiceName = "";
1669
+ //# sourceMappingURL=client.js.map