oci-apiaccesscontrol 2.111.2

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 (266) 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 +37 -0
  6. package/index.js +60 -0
  7. package/index.js.map +1 -0
  8. package/lib/apimetadata-waiter.d.ts +35 -0
  9. package/lib/apimetadata-waiter.js +71 -0
  10. package/lib/apimetadata-waiter.js.map +1 -0
  11. package/lib/client.d.ts +551 -0
  12. package/lib/client.js +2115 -0
  13. package/lib/client.js.map +1 -0
  14. package/lib/model/action-type.d.ts +38 -0
  15. package/lib/model/action-type.js +49 -0
  16. package/lib/model/action-type.js.map +1 -0
  17. package/lib/model/api-metadata-by-entity-type-collection.d.ts +32 -0
  18. package/lib/model/api-metadata-by-entity-type-collection.js +67 -0
  19. package/lib/model/api-metadata-by-entity-type-collection.js.map +1 -0
  20. package/lib/model/api-metadata-by-entity-type-summary.d.ts +69 -0
  21. package/lib/model/api-metadata-by-entity-type-summary.js +67 -0
  22. package/lib/model/api-metadata-by-entity-type-summary.js.map +1 -0
  23. package/lib/model/api-metadata-collection.d.ts +32 -0
  24. package/lib/model/api-metadata-collection.js +67 -0
  25. package/lib/model/api-metadata-collection.js.map +1 -0
  26. package/lib/model/api-metadata-summary.d.ts +107 -0
  27. package/lib/model/api-metadata-summary.js +35 -0
  28. package/lib/model/api-metadata-summary.js.map +1 -0
  29. package/lib/model/api-metadata.d.ts +137 -0
  30. package/lib/model/api-metadata.js +49 -0
  31. package/lib/model/api-metadata.js.map +1 -0
  32. package/lib/model/approve-privileged-api-request-details.d.ts +36 -0
  33. package/lib/model/approve-privileged-api-request-details.js +35 -0
  34. package/lib/model/approve-privileged-api-request-details.js.map +1 -0
  35. package/lib/model/approver-detail.d.ts +49 -0
  36. package/lib/model/approver-detail.js +35 -0
  37. package/lib/model/approver-detail.js.map +1 -0
  38. package/lib/model/change-privileged-api-control-compartment-details.d.ts +32 -0
  39. package/lib/model/change-privileged-api-control-compartment-details.js +35 -0
  40. package/lib/model/change-privileged-api-control-compartment-details.js.map +1 -0
  41. package/lib/model/close-privileged-api-request-details.d.ts +31 -0
  42. package/lib/model/close-privileged-api-request-details.js +35 -0
  43. package/lib/model/close-privileged-api-request-details.js.map +1 -0
  44. package/lib/model/create-privileged-api-control-details.d.ts +88 -0
  45. package/lib/model/create-privileged-api-control-details.js +67 -0
  46. package/lib/model/create-privileged-api-control-details.js.map +1 -0
  47. package/lib/model/create-privileged-api-request-details.d.ts +107 -0
  48. package/lib/model/create-privileged-api-request-details.js +67 -0
  49. package/lib/model/create-privileged-api-request-details.js.map +1 -0
  50. package/lib/model/index.d.ts +90 -0
  51. package/lib/model/index.js +113 -0
  52. package/lib/model/index.js.map +1 -0
  53. package/lib/model/operation-status.d.ts +40 -0
  54. package/lib/model/operation-status.js +51 -0
  55. package/lib/model/operation-status.js.map +1 -0
  56. package/lib/model/operation-type.d.ts +55 -0
  57. package/lib/model/operation-type.js +66 -0
  58. package/lib/model/operation-type.js.map +1 -0
  59. package/lib/model/privileged-api-control-collection.d.ts +32 -0
  60. package/lib/model/privileged-api-control-collection.js +67 -0
  61. package/lib/model/privileged-api-control-collection.js.map +1 -0
  62. package/lib/model/privileged-api-control-summary.d.ts +108 -0
  63. package/lib/model/privileged-api-control-summary.js +35 -0
  64. package/lib/model/privileged-api-control-summary.js.map +1 -0
  65. package/lib/model/privileged-api-control.d.ts +162 -0
  66. package/lib/model/privileged-api-control.js +82 -0
  67. package/lib/model/privileged-api-control.js.map +1 -0
  68. package/lib/model/privileged-api-details.d.ts +39 -0
  69. package/lib/model/privileged-api-details.js +35 -0
  70. package/lib/model/privileged-api-details.js.map +1 -0
  71. package/lib/model/privileged-api-request-collection.d.ts +32 -0
  72. package/lib/model/privileged-api-request-collection.js +67 -0
  73. package/lib/model/privileged-api-request-collection.js.map +1 -0
  74. package/lib/model/privileged-api-request-operation-details.d.ts +35 -0
  75. package/lib/model/privileged-api-request-operation-details.js +35 -0
  76. package/lib/model/privileged-api-request-operation-details.js.map +1 -0
  77. package/lib/model/privileged-api-request-severity.d.ts +36 -0
  78. package/lib/model/privileged-api-request-severity.js +47 -0
  79. package/lib/model/privileged-api-request-severity.js.map +1 -0
  80. package/lib/model/privileged-api-request-summary.d.ts +139 -0
  81. package/lib/model/privileged-api-request-summary.js +67 -0
  82. package/lib/model/privileged-api-request-summary.js.map +1 -0
  83. package/lib/model/privileged-api-request.d.ts +232 -0
  84. package/lib/model/privileged-api-request.js +116 -0
  85. package/lib/model/privileged-api-request.js.map +1 -0
  86. package/lib/model/reject-privileged-api-request-details.d.ts +31 -0
  87. package/lib/model/reject-privileged-api-request-details.js +35 -0
  88. package/lib/model/reject-privileged-api-request-details.js.map +1 -0
  89. package/lib/model/revoke-privileged-api-request-details.d.ts +31 -0
  90. package/lib/model/revoke-privileged-api-request-details.js +35 -0
  91. package/lib/model/revoke-privileged-api-request-details.js.map +1 -0
  92. package/lib/model/sort-order.d.ts +36 -0
  93. package/lib/model/sort-order.js +47 -0
  94. package/lib/model/sort-order.js.map +1 -0
  95. package/lib/model/update-privileged-api-control-details.d.ts +83 -0
  96. package/lib/model/update-privileged-api-control-details.js +67 -0
  97. package/lib/model/update-privileged-api-control-details.js.map +1 -0
  98. package/lib/model/work-request-error-collection.d.ts +32 -0
  99. package/lib/model/work-request-error-collection.js +67 -0
  100. package/lib/model/work-request-error-collection.js.map +1 -0
  101. package/lib/model/work-request-error.d.ts +43 -0
  102. package/lib/model/work-request-error.js +35 -0
  103. package/lib/model/work-request-error.js.map +1 -0
  104. package/lib/model/work-request-log-entry-collection.d.ts +32 -0
  105. package/lib/model/work-request-log-entry-collection.js +67 -0
  106. package/lib/model/work-request-log-entry-collection.js.map +1 -0
  107. package/lib/model/work-request-log-entry.d.ts +37 -0
  108. package/lib/model/work-request-log-entry.js +35 -0
  109. package/lib/model/work-request-log-entry.js.map +1 -0
  110. package/lib/model/work-request-resource-metadata-key.d.ts +33 -0
  111. package/lib/model/work-request-resource-metadata-key.js +44 -0
  112. package/lib/model/work-request-resource-metadata-key.js.map +1 -0
  113. package/lib/model/work-request-resource.d.ts +54 -0
  114. package/lib/model/work-request-resource.js +35 -0
  115. package/lib/model/work-request-resource.js.map +1 -0
  116. package/lib/model/work-request-summary-collection.d.ts +32 -0
  117. package/lib/model/work-request-summary-collection.js +67 -0
  118. package/lib/model/work-request-summary-collection.js.map +1 -0
  119. package/lib/model/work-request-summary.d.ts +79 -0
  120. package/lib/model/work-request-summary.js +67 -0
  121. package/lib/model/work-request-summary.js.map +1 -0
  122. package/lib/model/work-request.d.ts +82 -0
  123. package/lib/model/work-request.js +67 -0
  124. package/lib/model/work-request.js.map +1 -0
  125. package/lib/privilegedapicontrol-waiter.d.ts +35 -0
  126. package/lib/privilegedapicontrol-waiter.js +71 -0
  127. package/lib/privilegedapicontrol-waiter.js.map +1 -0
  128. package/lib/privilegedapirequests-waiter.d.ts +35 -0
  129. package/lib/privilegedapirequests-waiter.js +51 -0
  130. package/lib/privilegedapirequests-waiter.js.map +1 -0
  131. package/lib/privilegedapiworkrequest-waiter.d.ts +33 -0
  132. package/lib/privilegedapiworkrequest-waiter.js +50 -0
  133. package/lib/privilegedapiworkrequest-waiter.js.map +1 -0
  134. package/lib/request/approve-privileged-api-request-request.d.ts +52 -0
  135. package/lib/request/approve-privileged-api-request-request.js +15 -0
  136. package/lib/request/approve-privileged-api-request-request.js.map +1 -0
  137. package/lib/request/cancel-work-request-request.d.ts +38 -0
  138. package/lib/request/cancel-work-request-request.js +15 -0
  139. package/lib/request/cancel-work-request-request.js.map +1 -0
  140. package/lib/request/change-privileged-api-control-compartment-request.d.ts +52 -0
  141. package/lib/request/change-privileged-api-control-compartment-request.js +15 -0
  142. package/lib/request/change-privileged-api-control-compartment-request.js.map +1 -0
  143. package/lib/request/close-privileged-api-request-request.d.ts +52 -0
  144. package/lib/request/close-privileged-api-request-request.js +15 -0
  145. package/lib/request/close-privileged-api-request-request.js.map +1 -0
  146. package/lib/request/create-privileged-api-control-request.d.ts +40 -0
  147. package/lib/request/create-privileged-api-control-request.js +15 -0
  148. package/lib/request/create-privileged-api-control-request.js.map +1 -0
  149. package/lib/request/create-privileged-api-request-request.d.ts +40 -0
  150. package/lib/request/create-privileged-api-request-request.js +15 -0
  151. package/lib/request/create-privileged-api-request-request.js.map +1 -0
  152. package/lib/request/delete-privileged-api-control-request.d.ts +42 -0
  153. package/lib/request/delete-privileged-api-control-request.js +15 -0
  154. package/lib/request/delete-privileged-api-control-request.js.map +1 -0
  155. package/lib/request/get-api-metadata-request.d.ts +30 -0
  156. package/lib/request/get-api-metadata-request.js +15 -0
  157. package/lib/request/get-api-metadata-request.js.map +1 -0
  158. package/lib/request/get-privileged-api-control-request.d.ts +30 -0
  159. package/lib/request/get-privileged-api-control-request.js +15 -0
  160. package/lib/request/get-privileged-api-control-request.js.map +1 -0
  161. package/lib/request/get-privileged-api-request-request.d.ts +30 -0
  162. package/lib/request/get-privileged-api-request-request.js +15 -0
  163. package/lib/request/get-privileged-api-request-request.js.map +1 -0
  164. package/lib/request/get-work-request-request.d.ts +30 -0
  165. package/lib/request/get-work-request-request.js +15 -0
  166. package/lib/request/get-work-request-request.js.map +1 -0
  167. package/lib/request/index.d.ts +60 -0
  168. package/lib/request/index.js +55 -0
  169. package/lib/request/index.js.map +1 -0
  170. package/lib/request/list-api-metadata-by-entity-types-request.d.ts +75 -0
  171. package/lib/request/list-api-metadata-by-entity-types-request.js +24 -0
  172. package/lib/request/list-api-metadata-by-entity-types-request.js.map +1 -0
  173. package/lib/request/list-api-metadata-request.d.ts +75 -0
  174. package/lib/request/list-api-metadata-request.js +24 -0
  175. package/lib/request/list-api-metadata-request.js.map +1 -0
  176. package/lib/request/list-privileged-api-controls-request.d.ts +79 -0
  177. package/lib/request/list-privileged-api-controls-request.js +24 -0
  178. package/lib/request/list-privileged-api-controls-request.js.map +1 -0
  179. package/lib/request/list-privileged-api-requests-request.d.ts +89 -0
  180. package/lib/request/list-privileged-api-requests-request.js +24 -0
  181. package/lib/request/list-privileged-api-requests-request.js.map +1 -0
  182. package/lib/request/list-work-request-errors-request.d.ts +59 -0
  183. package/lib/request/list-work-request-errors-request.js +23 -0
  184. package/lib/request/list-work-request-errors-request.js.map +1 -0
  185. package/lib/request/list-work-request-logs-request.d.ts +59 -0
  186. package/lib/request/list-work-request-logs-request.js +23 -0
  187. package/lib/request/list-work-request-logs-request.js.map +1 -0
  188. package/lib/request/list-work-requests-request.d.ts +71 -0
  189. package/lib/request/list-work-requests-request.js +23 -0
  190. package/lib/request/list-work-requests-request.js.map +1 -0
  191. package/lib/request/reject-privileged-api-request-request.d.ts +52 -0
  192. package/lib/request/reject-privileged-api-request-request.js +15 -0
  193. package/lib/request/reject-privileged-api-request-request.js.map +1 -0
  194. package/lib/request/revoke-privileged-api-request-request.d.ts +52 -0
  195. package/lib/request/revoke-privileged-api-request-request.js +15 -0
  196. package/lib/request/revoke-privileged-api-request-request.js.map +1 -0
  197. package/lib/request/update-privileged-api-control-request.d.ts +43 -0
  198. package/lib/request/update-privileged-api-control-request.js +15 -0
  199. package/lib/request/update-privileged-api-control-request.js.map +1 -0
  200. package/lib/response/approve-privileged-api-request-response.d.ts +26 -0
  201. package/lib/response/approve-privileged-api-request-response.js +15 -0
  202. package/lib/response/approve-privileged-api-request-response.js.map +1 -0
  203. package/lib/response/cancel-work-request-response.d.ts +20 -0
  204. package/lib/response/cancel-work-request-response.js +15 -0
  205. package/lib/response/cancel-work-request-response.js.map +1 -0
  206. package/lib/response/change-privileged-api-control-compartment-response.d.ts +26 -0
  207. package/lib/response/change-privileged-api-control-compartment-response.js +15 -0
  208. package/lib/response/change-privileged-api-control-compartment-response.js.map +1 -0
  209. package/lib/response/close-privileged-api-request-response.d.ts +26 -0
  210. package/lib/response/close-privileged-api-request-response.js +15 -0
  211. package/lib/response/close-privileged-api-request-response.js.map +1 -0
  212. package/lib/response/create-privileged-api-control-response.d.ts +44 -0
  213. package/lib/response/create-privileged-api-control-response.js +15 -0
  214. package/lib/response/create-privileged-api-control-response.js.map +1 -0
  215. package/lib/response/create-privileged-api-request-response.d.ts +44 -0
  216. package/lib/response/create-privileged-api-request-response.js +15 -0
  217. package/lib/response/create-privileged-api-request-response.js.map +1 -0
  218. package/lib/response/delete-privileged-api-control-response.d.ts +26 -0
  219. package/lib/response/delete-privileged-api-control-response.js +15 -0
  220. package/lib/response/delete-privileged-api-control-response.js.map +1 -0
  221. package/lib/response/get-api-metadata-response.d.ts +30 -0
  222. package/lib/response/get-api-metadata-response.js +15 -0
  223. package/lib/response/get-api-metadata-response.js.map +1 -0
  224. package/lib/response/get-privileged-api-control-response.d.ts +30 -0
  225. package/lib/response/get-privileged-api-control-response.js +15 -0
  226. package/lib/response/get-privileged-api-control-response.js.map +1 -0
  227. package/lib/response/get-privileged-api-request-response.d.ts +30 -0
  228. package/lib/response/get-privileged-api-request-response.js +15 -0
  229. package/lib/response/get-privileged-api-request-response.js.map +1 -0
  230. package/lib/response/get-work-request-response.d.ts +34 -0
  231. package/lib/response/get-work-request-response.js +15 -0
  232. package/lib/response/get-work-request-response.js.map +1 -0
  233. package/lib/response/index.d.ts +60 -0
  234. package/lib/response/index.js +21 -0
  235. package/lib/response/index.js.map +1 -0
  236. package/lib/response/list-api-metadata-by-entity-types-response.d.ts +31 -0
  237. package/lib/response/list-api-metadata-by-entity-types-response.js +15 -0
  238. package/lib/response/list-api-metadata-by-entity-types-response.js.map +1 -0
  239. package/lib/response/list-api-metadata-response.d.ts +31 -0
  240. package/lib/response/list-api-metadata-response.js +15 -0
  241. package/lib/response/list-api-metadata-response.js.map +1 -0
  242. package/lib/response/list-privileged-api-controls-response.d.ts +31 -0
  243. package/lib/response/list-privileged-api-controls-response.js +15 -0
  244. package/lib/response/list-privileged-api-controls-response.js.map +1 -0
  245. package/lib/response/list-privileged-api-requests-response.d.ts +31 -0
  246. package/lib/response/list-privileged-api-requests-response.js +15 -0
  247. package/lib/response/list-privileged-api-requests-response.js.map +1 -0
  248. package/lib/response/list-work-request-errors-response.d.ts +31 -0
  249. package/lib/response/list-work-request-errors-response.js +15 -0
  250. package/lib/response/list-work-request-errors-response.js.map +1 -0
  251. package/lib/response/list-work-request-logs-response.d.ts +31 -0
  252. package/lib/response/list-work-request-logs-response.js +15 -0
  253. package/lib/response/list-work-request-logs-response.js.map +1 -0
  254. package/lib/response/list-work-requests-response.d.ts +31 -0
  255. package/lib/response/list-work-requests-response.js +15 -0
  256. package/lib/response/list-work-requests-response.js.map +1 -0
  257. package/lib/response/reject-privileged-api-request-response.d.ts +26 -0
  258. package/lib/response/reject-privileged-api-request-response.js +15 -0
  259. package/lib/response/reject-privileged-api-request-response.js.map +1 -0
  260. package/lib/response/revoke-privileged-api-request-response.d.ts +26 -0
  261. package/lib/response/revoke-privileged-api-request-response.js +15 -0
  262. package/lib/response/revoke-privileged-api-request-response.js.map +1 -0
  263. package/lib/response/update-privileged-api-control-response.d.ts +26 -0
  264. package/lib/response/update-privileged-api-control-response.js +15 -0
  265. package/lib/response/update-privileged-api-control-response.js.map +1 -0
  266. package/package.json +29 -0
package/lib/client.js ADDED
@@ -0,0 +1,2115 @@
1
+ "use strict";
2
+ /**
3
+ * Oracle API Access Control
4
+ * This service is used to restrict the control plane service apis; so that everybody won't be
5
+ able to access those apis.
6
+ There are two main resouces defined as a part of this service
7
+ 1. PrivilegedApiControl: This is created by the customer which defines which service apis are
8
+ controlled and who can access it.
9
+ 2. PrivilegedApiRequest: This is a request object again created by the customer operators who seek access to those privileged apis. After a request is obtained based on the PrivilegedAccessControl for which the api belongs to, either it can be approved so that the requested person can execute the service apis or it will wait for the customer to approve it.
10
+
11
+ * OpenAPI spec version: 20241130
12
+ *
13
+ *
14
+ * NOTE: This class is auto generated by OracleSDKGenerator.
15
+ * Do not edit the class manually.
16
+ *
17
+ * Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved.
18
+ * 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.
19
+ */
20
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
21
+ if (k2 === undefined) k2 = k;
22
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
23
+ }) : (function(o, m, k, k2) {
24
+ if (k2 === undefined) k2 = k;
25
+ o[k2] = m[k];
26
+ }));
27
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
28
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
29
+ }) : function(o, v) {
30
+ o["default"] = v;
31
+ });
32
+ var __importStar = (this && this.__importStar) || function (mod) {
33
+ if (mod && mod.__esModule) return mod;
34
+ var result = {};
35
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
36
+ __setModuleDefault(result, mod);
37
+ return result;
38
+ };
39
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
40
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
41
+ return new (P || (P = Promise))(function (resolve, reject) {
42
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
43
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
44
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
45
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
46
+ });
47
+ };
48
+ Object.defineProperty(exports, "__esModule", { value: true });
49
+ exports.PrivilegedApiWorkRequestClient = exports.PrivilegedApiWorkRequestApiKeys = exports.PrivilegedApiRequestsClient = exports.PrivilegedApiRequestsApiKeys = exports.PrivilegedApiControlClient = exports.PrivilegedApiControlApiKeys = exports.ApiMetadataClient = exports.ApiMetadataApiKeys = void 0;
50
+ const common = require("oci-common");
51
+ const model = __importStar(require("./model"));
52
+ const apimetadata_waiter_1 = require("./apimetadata-waiter");
53
+ const privilegedapicontrol_waiter_1 = require("./privilegedapicontrol-waiter");
54
+ const privilegedapirequests_waiter_1 = require("./privilegedapirequests-waiter");
55
+ const privilegedapiworkrequest_waiter_1 = require("./privilegedapiworkrequest-waiter");
56
+ const oci_common_1 = require("oci-common");
57
+ const Breaker = require("opossum");
58
+ // ===============================================
59
+ // This file is autogenerated - Please do not edit
60
+ // ===============================================
61
+ var ApiMetadataApiKeys;
62
+ (function (ApiMetadataApiKeys) {
63
+ })(ApiMetadataApiKeys = exports.ApiMetadataApiKeys || (exports.ApiMetadataApiKeys = {}));
64
+ /**
65
+ * This service client uses {@link common.CircuitBreaker.DefaultConfiguration} for all the operations by default if no circuit breaker configuration is defined by the user.
66
+ */
67
+ class ApiMetadataClient {
68
+ constructor(params, clientConfiguration) {
69
+ this["_realmSpecificEndpointTemplateEnabled"] = undefined;
70
+ this["_endpoint"] = "";
71
+ this["_defaultHeaders"] = {};
72
+ this._circuitBreaker = null;
73
+ this._httpOptions = undefined;
74
+ this._bodyDuplexMode = undefined;
75
+ this.targetService = "ApiMetadata";
76
+ this._regionId = "";
77
+ this._lastSetRegionOrRegionId = "";
78
+ const requestSigner = params.authenticationDetailsProvider
79
+ ? new common.DefaultRequestSigner(params.authenticationDetailsProvider)
80
+ : null;
81
+ this._authProvider = params.authenticationDetailsProvider;
82
+ if (clientConfiguration) {
83
+ this._clientConfiguration = clientConfiguration;
84
+ this._circuitBreaker = clientConfiguration.circuitBreaker
85
+ ? clientConfiguration.circuitBreaker.circuit
86
+ : null;
87
+ this._httpOptions = clientConfiguration.httpOptions
88
+ ? clientConfiguration.httpOptions
89
+ : undefined;
90
+ this._bodyDuplexMode = clientConfiguration.bodyDuplexMode
91
+ ? clientConfiguration.bodyDuplexMode
92
+ : undefined;
93
+ }
94
+ if (!oci_common_1.developerToolConfiguration.isServiceEnabled("apiaccesscontrol")) {
95
+ let errmsg = "The developerToolConfiguration configuration disabled this service, this behavior is controlled by developerToolConfiguration.ociEnabledServiceSet variable. Please check if your local developer_tool_configuration file has configured the service you're targeting or contact the cloud provider on the availability of this service : ";
96
+ throw errmsg.concat("apiaccesscontrol");
97
+ }
98
+ // if circuit breaker is not created, check if circuit breaker system is enabled to use default circuit breaker
99
+ const specCircuitBreakerEnabled = true;
100
+ if (!this._circuitBreaker &&
101
+ common.utils.isCircuitBreakerSystemEnabled(clientConfiguration) &&
102
+ (specCircuitBreakerEnabled || common.CircuitBreaker.DefaultCircuitBreakerOverriden)) {
103
+ this._circuitBreaker = new common.CircuitBreaker().circuit;
104
+ }
105
+ this._httpClient =
106
+ params.httpClient ||
107
+ new common.FetchHttpClient(requestSigner, this._circuitBreaker, this._httpOptions, this._bodyDuplexMode);
108
+ if (params.authenticationDetailsProvider &&
109
+ common.isRegionProvider(params.authenticationDetailsProvider)) {
110
+ const provider = params.authenticationDetailsProvider;
111
+ if (provider.getRegion()) {
112
+ this.region = provider.getRegion();
113
+ }
114
+ }
115
+ }
116
+ /**
117
+ * Get the endpoint that is being used to call (ex, https://www.example.com).
118
+ */
119
+ get endpoint() {
120
+ return this._endpoint;
121
+ }
122
+ /**
123
+ * Sets the endpoint to call (ex, https://www.example.com).
124
+ * @param endpoint The endpoint of the service.
125
+ */
126
+ set endpoint(endpoint) {
127
+ this._endpoint = endpoint;
128
+ this._endpoint = this._endpoint + "/20241130";
129
+ if (this.logger)
130
+ this.logger.info(`ApiMetadataClient endpoint set to ${this._endpoint}`);
131
+ }
132
+ get logger() {
133
+ return common.LOG.logger;
134
+ }
135
+ /**
136
+ * Determines whether realm specific endpoint should be used or not.
137
+ * Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false"
138
+ * @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template
139
+ */
140
+ set useRealmSpecificEndpointTemplate(realmSpecificEndpointTemplateEnabled) {
141
+ this._realmSpecificEndpointTemplateEnabled = realmSpecificEndpointTemplateEnabled;
142
+ if (this.logger)
143
+ this.logger.info(`realmSpecificEndpointTemplateEnabled set to ${this._realmSpecificEndpointTemplateEnabled}`);
144
+ if (this._lastSetRegionOrRegionId === common.Region.REGION_STRING) {
145
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegion(ApiMetadataClient.serviceEndpointTemplate, this._region, ApiMetadataClient.endpointServiceName);
146
+ }
147
+ else if (this._lastSetRegionOrRegionId === common.Region.REGION_ID_STRING) {
148
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(ApiMetadataClient.serviceEndpointTemplate, this._regionId, ApiMetadataClient.endpointServiceName);
149
+ }
150
+ }
151
+ /**
152
+ * Sets the region to call (ex, Region.US_PHOENIX_1).
153
+ * Note, this will call {@link #endpoint(String) endpoint} after resolving the endpoint.
154
+ * @param region The region of the service.
155
+ */
156
+ set region(region) {
157
+ this._region = region;
158
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegion(ApiMetadataClient.serviceEndpointTemplate, region, ApiMetadataClient.endpointServiceName);
159
+ this._lastSetRegionOrRegionId = common.Region.REGION_STRING;
160
+ }
161
+ /**
162
+ * Sets the regionId to call (ex, 'us-phoenix-1').
163
+ *
164
+ * Note, this will first try to map the region ID to a known Region and call {@link #region(Region) region}.
165
+ * If no known Region could be determined, it will create an endpoint assuming its in default Realm OC1
166
+ * and then call {@link #endpoint(String) endpoint}.
167
+ * @param regionId The public region ID.
168
+ */
169
+ set regionId(regionId) {
170
+ this._regionId = regionId;
171
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(ApiMetadataClient.serviceEndpointTemplate, regionId, ApiMetadataClient.endpointServiceName);
172
+ this._lastSetRegionOrRegionId = common.Region.REGION_ID_STRING;
173
+ }
174
+ /**
175
+ * Creates a new ApiMetadataWaiter for resources for this service.
176
+ *
177
+ * @param config The waiter configuration for termination and delay strategy
178
+ * @return The service waiters.
179
+ */
180
+ createWaiters(config) {
181
+ this._waiters = new apimetadata_waiter_1.ApiMetadataWaiter(this, config);
182
+ return this._waiters;
183
+ }
184
+ /**
185
+ * Gets the waiters available for resources for this service.
186
+ *
187
+ * @return The service waiters.
188
+ */
189
+ getWaiters() {
190
+ if (this._waiters) {
191
+ return this._waiters;
192
+ }
193
+ throw Error("Waiters do not exist. Please create waiters.");
194
+ }
195
+ /**
196
+ * Shutdown the circuit breaker used by the client when it is no longer needed
197
+ */
198
+ shutdownCircuitBreaker() {
199
+ if (this._circuitBreaker) {
200
+ this._circuitBreaker.shutdown();
201
+ }
202
+ }
203
+ /**
204
+ * Close the provider if possible which in turn shuts down any associated circuit breaker
205
+ */
206
+ closeProvider() {
207
+ if (this._authProvider) {
208
+ if (this._authProvider instanceof common.AbstractRequestingAuthenticationDetailsProvider)
209
+ (this._authProvider).closeProvider();
210
+ }
211
+ }
212
+ /**
213
+ * Close the client once it is no longer needed
214
+ */
215
+ close() {
216
+ this.shutdownCircuitBreaker();
217
+ this.closeProvider();
218
+ }
219
+ /**
220
+ * Gets information about a ApiMetadata.
221
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
222
+ * @param GetApiMetadataRequest
223
+ * @return GetApiMetadataResponse
224
+ * @throws OciError when an error occurs
225
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/apiaccesscontrol/GetApiMetadata.ts.html |here} to see how to use GetApiMetadata API.
226
+ */
227
+ getApiMetadata(getApiMetadataRequest) {
228
+ return __awaiter(this, void 0, void 0, function* () {
229
+ if (this.logger)
230
+ this.logger.debug("Calling operation ApiMetadataClient#getApiMetadata.");
231
+ const operationName = "getApiMetadata";
232
+ const apiReferenceLink = "";
233
+ const pathParams = {
234
+ "{apiMetadataId}": getApiMetadataRequest.apiMetadataId
235
+ };
236
+ const queryParams = {};
237
+ let headerParams = {
238
+ "Content-Type": common.Constants.APPLICATION_JSON,
239
+ "opc-request-id": getApiMetadataRequest.opcRequestId
240
+ };
241
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
242
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getApiMetadataRequest.retryConfiguration, specRetryConfiguration);
243
+ if (this.logger)
244
+ retrier.logger = this.logger;
245
+ const request = yield oci_common_1.composeRequest({
246
+ baseEndpoint: this._endpoint,
247
+ defaultHeaders: this._defaultHeaders,
248
+ path: "/apiMetadatas/{apiMetadataId}",
249
+ method: "GET",
250
+ pathParams: pathParams,
251
+ headerParams: headerParams,
252
+ queryParams: queryParams
253
+ });
254
+ try {
255
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
256
+ const sdkResponse = oci_common_1.composeResponse({
257
+ responseObject: {},
258
+ body: yield response.json(),
259
+ bodyKey: "apiMetadata",
260
+ bodyModel: model.ApiMetadata,
261
+ type: "model.ApiMetadata",
262
+ responseHeaders: [
263
+ {
264
+ value: response.headers.get("etag"),
265
+ key: "etag",
266
+ dataType: "string"
267
+ },
268
+ {
269
+ value: response.headers.get("opc-request-id"),
270
+ key: "opcRequestId",
271
+ dataType: "string"
272
+ }
273
+ ]
274
+ });
275
+ return sdkResponse;
276
+ }
277
+ catch (err) {
278
+ throw err;
279
+ }
280
+ });
281
+ }
282
+ /**
283
+ * Gets a list of ApiMetadata.
284
+ *
285
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
286
+ * @param ListApiMetadataRequest
287
+ * @return ListApiMetadataResponse
288
+ * @throws OciError when an error occurs
289
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/apiaccesscontrol/ListApiMetadata.ts.html |here} to see how to use ListApiMetadata API.
290
+ */
291
+ listApiMetadata(listApiMetadataRequest) {
292
+ return __awaiter(this, void 0, void 0, function* () {
293
+ if (this.logger)
294
+ this.logger.debug("Calling operation ApiMetadataClient#listApiMetadata.");
295
+ const operationName = "listApiMetadata";
296
+ const apiReferenceLink = "";
297
+ const pathParams = {};
298
+ const queryParams = {
299
+ "compartmentId": listApiMetadataRequest.compartmentId,
300
+ "lifecycleState": listApiMetadataRequest.lifecycleState,
301
+ "resourceType": listApiMetadataRequest.resourceType,
302
+ "displayName": listApiMetadataRequest.displayName,
303
+ "limit": listApiMetadataRequest.limit,
304
+ "page": listApiMetadataRequest.page,
305
+ "sortOrder": listApiMetadataRequest.sortOrder,
306
+ "sortBy": listApiMetadataRequest.sortBy
307
+ };
308
+ let headerParams = {
309
+ "Content-Type": common.Constants.APPLICATION_JSON,
310
+ "opc-request-id": listApiMetadataRequest.opcRequestId
311
+ };
312
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
313
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listApiMetadataRequest.retryConfiguration, specRetryConfiguration);
314
+ if (this.logger)
315
+ retrier.logger = this.logger;
316
+ const request = yield oci_common_1.composeRequest({
317
+ baseEndpoint: this._endpoint,
318
+ defaultHeaders: this._defaultHeaders,
319
+ path: "/apiMetadatas",
320
+ method: "GET",
321
+ pathParams: pathParams,
322
+ headerParams: headerParams,
323
+ queryParams: queryParams
324
+ });
325
+ try {
326
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
327
+ const sdkResponse = oci_common_1.composeResponse({
328
+ responseObject: {},
329
+ body: yield response.json(),
330
+ bodyKey: "apiMetadataCollection",
331
+ bodyModel: model.ApiMetadataCollection,
332
+ type: "model.ApiMetadataCollection",
333
+ responseHeaders: [
334
+ {
335
+ value: response.headers.get("opc-request-id"),
336
+ key: "opcRequestId",
337
+ dataType: "string"
338
+ },
339
+ {
340
+ value: response.headers.get("opc-next-page"),
341
+ key: "opcNextPage",
342
+ dataType: "string"
343
+ }
344
+ ]
345
+ });
346
+ return sdkResponse;
347
+ }
348
+ catch (err) {
349
+ throw err;
350
+ }
351
+ });
352
+ }
353
+ /**
354
+ * Gets a list of ApiMetadata Grouped By Entity Types.
355
+ *
356
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
357
+ * @param ListApiMetadataByEntityTypesRequest
358
+ * @return ListApiMetadataByEntityTypesResponse
359
+ * @throws OciError when an error occurs
360
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/apiaccesscontrol/ListApiMetadataByEntityTypes.ts.html |here} to see how to use ListApiMetadataByEntityTypes API.
361
+ */
362
+ listApiMetadataByEntityTypes(listApiMetadataByEntityTypesRequest) {
363
+ return __awaiter(this, void 0, void 0, function* () {
364
+ if (this.logger)
365
+ this.logger.debug("Calling operation ApiMetadataClient#listApiMetadataByEntityTypes.");
366
+ const operationName = "listApiMetadataByEntityTypes";
367
+ const apiReferenceLink = "";
368
+ const pathParams = {};
369
+ const queryParams = {
370
+ "compartmentId": listApiMetadataByEntityTypesRequest.compartmentId,
371
+ "lifecycleState": listApiMetadataByEntityTypesRequest.lifecycleState,
372
+ "resourceType": listApiMetadataByEntityTypesRequest.resourceType,
373
+ "displayName": listApiMetadataByEntityTypesRequest.displayName,
374
+ "limit": listApiMetadataByEntityTypesRequest.limit,
375
+ "page": listApiMetadataByEntityTypesRequest.page,
376
+ "sortOrder": listApiMetadataByEntityTypesRequest.sortOrder,
377
+ "sortBy": listApiMetadataByEntityTypesRequest.sortBy
378
+ };
379
+ let headerParams = {
380
+ "Content-Type": common.Constants.APPLICATION_JSON,
381
+ "opc-request-id": listApiMetadataByEntityTypesRequest.opcRequestId
382
+ };
383
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
384
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listApiMetadataByEntityTypesRequest.retryConfiguration, specRetryConfiguration);
385
+ if (this.logger)
386
+ retrier.logger = this.logger;
387
+ const request = yield oci_common_1.composeRequest({
388
+ baseEndpoint: this._endpoint,
389
+ defaultHeaders: this._defaultHeaders,
390
+ path: "/apiMetadatas/byEntityType",
391
+ method: "GET",
392
+ pathParams: pathParams,
393
+ headerParams: headerParams,
394
+ queryParams: queryParams
395
+ });
396
+ try {
397
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
398
+ const sdkResponse = oci_common_1.composeResponse({
399
+ responseObject: {},
400
+ body: yield response.json(),
401
+ bodyKey: "apiMetadataByEntityTypeCollection",
402
+ bodyModel: model.ApiMetadataByEntityTypeCollection,
403
+ type: "model.ApiMetadataByEntityTypeCollection",
404
+ responseHeaders: [
405
+ {
406
+ value: response.headers.get("opc-request-id"),
407
+ key: "opcRequestId",
408
+ dataType: "string"
409
+ },
410
+ {
411
+ value: response.headers.get("opc-next-page"),
412
+ key: "opcNextPage",
413
+ dataType: "string"
414
+ }
415
+ ]
416
+ });
417
+ return sdkResponse;
418
+ }
419
+ catch (err) {
420
+ throw err;
421
+ }
422
+ });
423
+ }
424
+ }
425
+ exports.ApiMetadataClient = ApiMetadataClient;
426
+ ApiMetadataClient.serviceEndpointTemplate = "https://pactl.{region}.oci.{secondLevelDomain}";
427
+ ApiMetadataClient.endpointServiceName = "";
428
+ var PrivilegedApiControlApiKeys;
429
+ (function (PrivilegedApiControlApiKeys) {
430
+ })(PrivilegedApiControlApiKeys = exports.PrivilegedApiControlApiKeys || (exports.PrivilegedApiControlApiKeys = {}));
431
+ /**
432
+ * This service client uses {@link common.CircuitBreaker.DefaultConfiguration} for all the operations by default if no circuit breaker configuration is defined by the user.
433
+ */
434
+ class PrivilegedApiControlClient {
435
+ constructor(params, clientConfiguration) {
436
+ this["_realmSpecificEndpointTemplateEnabled"] = undefined;
437
+ this["_endpoint"] = "";
438
+ this["_defaultHeaders"] = {};
439
+ this._circuitBreaker = null;
440
+ this._httpOptions = undefined;
441
+ this._bodyDuplexMode = undefined;
442
+ this.targetService = "PrivilegedApiControl";
443
+ this._regionId = "";
444
+ this._lastSetRegionOrRegionId = "";
445
+ const requestSigner = params.authenticationDetailsProvider
446
+ ? new common.DefaultRequestSigner(params.authenticationDetailsProvider)
447
+ : null;
448
+ this._authProvider = params.authenticationDetailsProvider;
449
+ if (clientConfiguration) {
450
+ this._clientConfiguration = clientConfiguration;
451
+ this._circuitBreaker = clientConfiguration.circuitBreaker
452
+ ? clientConfiguration.circuitBreaker.circuit
453
+ : null;
454
+ this._httpOptions = clientConfiguration.httpOptions
455
+ ? clientConfiguration.httpOptions
456
+ : undefined;
457
+ this._bodyDuplexMode = clientConfiguration.bodyDuplexMode
458
+ ? clientConfiguration.bodyDuplexMode
459
+ : undefined;
460
+ }
461
+ if (!oci_common_1.developerToolConfiguration.isServiceEnabled("apiaccesscontrol")) {
462
+ let errmsg = "The developerToolConfiguration configuration disabled this service, this behavior is controlled by developerToolConfiguration.ociEnabledServiceSet variable. Please check if your local developer_tool_configuration file has configured the service you're targeting or contact the cloud provider on the availability of this service : ";
463
+ throw errmsg.concat("apiaccesscontrol");
464
+ }
465
+ // if circuit breaker is not created, check if circuit breaker system is enabled to use default circuit breaker
466
+ const specCircuitBreakerEnabled = true;
467
+ if (!this._circuitBreaker &&
468
+ common.utils.isCircuitBreakerSystemEnabled(clientConfiguration) &&
469
+ (specCircuitBreakerEnabled || common.CircuitBreaker.DefaultCircuitBreakerOverriden)) {
470
+ this._circuitBreaker = new common.CircuitBreaker().circuit;
471
+ }
472
+ this._httpClient =
473
+ params.httpClient ||
474
+ new common.FetchHttpClient(requestSigner, this._circuitBreaker, this._httpOptions, this._bodyDuplexMode);
475
+ if (params.authenticationDetailsProvider &&
476
+ common.isRegionProvider(params.authenticationDetailsProvider)) {
477
+ const provider = params.authenticationDetailsProvider;
478
+ if (provider.getRegion()) {
479
+ this.region = provider.getRegion();
480
+ }
481
+ }
482
+ }
483
+ /**
484
+ * Get the endpoint that is being used to call (ex, https://www.example.com).
485
+ */
486
+ get endpoint() {
487
+ return this._endpoint;
488
+ }
489
+ /**
490
+ * Sets the endpoint to call (ex, https://www.example.com).
491
+ * @param endpoint The endpoint of the service.
492
+ */
493
+ set endpoint(endpoint) {
494
+ this._endpoint = endpoint;
495
+ this._endpoint = this._endpoint + "/20241130";
496
+ if (this.logger)
497
+ this.logger.info(`PrivilegedApiControlClient endpoint set to ${this._endpoint}`);
498
+ }
499
+ get logger() {
500
+ return common.LOG.logger;
501
+ }
502
+ /**
503
+ * Determines whether realm specific endpoint should be used or not.
504
+ * Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false"
505
+ * @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template
506
+ */
507
+ set useRealmSpecificEndpointTemplate(realmSpecificEndpointTemplateEnabled) {
508
+ this._realmSpecificEndpointTemplateEnabled = realmSpecificEndpointTemplateEnabled;
509
+ if (this.logger)
510
+ this.logger.info(`realmSpecificEndpointTemplateEnabled set to ${this._realmSpecificEndpointTemplateEnabled}`);
511
+ if (this._lastSetRegionOrRegionId === common.Region.REGION_STRING) {
512
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegion(PrivilegedApiControlClient.serviceEndpointTemplate, this._region, PrivilegedApiControlClient.endpointServiceName);
513
+ }
514
+ else if (this._lastSetRegionOrRegionId === common.Region.REGION_ID_STRING) {
515
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(PrivilegedApiControlClient.serviceEndpointTemplate, this._regionId, PrivilegedApiControlClient.endpointServiceName);
516
+ }
517
+ }
518
+ /**
519
+ * Sets the region to call (ex, Region.US_PHOENIX_1).
520
+ * Note, this will call {@link #endpoint(String) endpoint} after resolving the endpoint.
521
+ * @param region The region of the service.
522
+ */
523
+ set region(region) {
524
+ this._region = region;
525
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegion(PrivilegedApiControlClient.serviceEndpointTemplate, region, PrivilegedApiControlClient.endpointServiceName);
526
+ this._lastSetRegionOrRegionId = common.Region.REGION_STRING;
527
+ }
528
+ /**
529
+ * Sets the regionId to call (ex, 'us-phoenix-1').
530
+ *
531
+ * Note, this will first try to map the region ID to a known Region and call {@link #region(Region) region}.
532
+ * If no known Region could be determined, it will create an endpoint assuming its in default Realm OC1
533
+ * and then call {@link #endpoint(String) endpoint}.
534
+ * @param regionId The public region ID.
535
+ */
536
+ set regionId(regionId) {
537
+ this._regionId = regionId;
538
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(PrivilegedApiControlClient.serviceEndpointTemplate, regionId, PrivilegedApiControlClient.endpointServiceName);
539
+ this._lastSetRegionOrRegionId = common.Region.REGION_ID_STRING;
540
+ }
541
+ /**
542
+ * Creates a new PrivilegedApiControlWaiter for resources for this service.
543
+ *
544
+ * @param config The waiter configuration for termination and delay strategy
545
+ * @return The service waiters.
546
+ */
547
+ createWaiters(config) {
548
+ this._waiters = new privilegedapicontrol_waiter_1.PrivilegedApiControlWaiter(this, config);
549
+ return this._waiters;
550
+ }
551
+ /**
552
+ * Gets the waiters available for resources for this service.
553
+ *
554
+ * @return The service waiters.
555
+ */
556
+ getWaiters() {
557
+ if (this._waiters) {
558
+ return this._waiters;
559
+ }
560
+ throw Error("Waiters do not exist. Please create waiters.");
561
+ }
562
+ /**
563
+ * Shutdown the circuit breaker used by the client when it is no longer needed
564
+ */
565
+ shutdownCircuitBreaker() {
566
+ if (this._circuitBreaker) {
567
+ this._circuitBreaker.shutdown();
568
+ }
569
+ }
570
+ /**
571
+ * Close the provider if possible which in turn shuts down any associated circuit breaker
572
+ */
573
+ closeProvider() {
574
+ if (this._authProvider) {
575
+ if (this._authProvider instanceof common.AbstractRequestingAuthenticationDetailsProvider)
576
+ (this._authProvider).closeProvider();
577
+ }
578
+ }
579
+ /**
580
+ * Close the client once it is no longer needed
581
+ */
582
+ close() {
583
+ this.shutdownCircuitBreaker();
584
+ this.closeProvider();
585
+ }
586
+ /**
587
+ * Moves a PrivilegedApiControl into a different compartment within the same tenancy. For information about moving resources between
588
+ * compartments, see [Moving Resources to a Different Compartment](https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).
589
+ *
590
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
591
+ * @param ChangePrivilegedApiControlCompartmentRequest
592
+ * @return ChangePrivilegedApiControlCompartmentResponse
593
+ * @throws OciError when an error occurs
594
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/apiaccesscontrol/ChangePrivilegedApiControlCompartment.ts.html |here} to see how to use ChangePrivilegedApiControlCompartment API.
595
+ */
596
+ changePrivilegedApiControlCompartment(changePrivilegedApiControlCompartmentRequest) {
597
+ return __awaiter(this, void 0, void 0, function* () {
598
+ if (this.logger)
599
+ this.logger.debug("Calling operation PrivilegedApiControlClient#changePrivilegedApiControlCompartment.");
600
+ const operationName = "changePrivilegedApiControlCompartment";
601
+ const apiReferenceLink = "";
602
+ const pathParams = {
603
+ "{privilegedApiControlId}": changePrivilegedApiControlCompartmentRequest.privilegedApiControlId
604
+ };
605
+ const queryParams = {};
606
+ let headerParams = {
607
+ "Content-Type": common.Constants.APPLICATION_JSON,
608
+ "if-match": changePrivilegedApiControlCompartmentRequest.ifMatch,
609
+ "opc-request-id": changePrivilegedApiControlCompartmentRequest.opcRequestId,
610
+ "opc-retry-token": changePrivilegedApiControlCompartmentRequest.opcRetryToken
611
+ };
612
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
613
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, changePrivilegedApiControlCompartmentRequest.retryConfiguration, specRetryConfiguration);
614
+ if (this.logger)
615
+ retrier.logger = this.logger;
616
+ const request = yield oci_common_1.composeRequest({
617
+ baseEndpoint: this._endpoint,
618
+ defaultHeaders: this._defaultHeaders,
619
+ path: "/privilegedApiControls/{privilegedApiControlId}/actions/changeCompartment",
620
+ method: "POST",
621
+ bodyContent: common.ObjectSerializer.serialize(changePrivilegedApiControlCompartmentRequest.changePrivilegedApiControlCompartmentDetails, "ChangePrivilegedApiControlCompartmentDetails", model.ChangePrivilegedApiControlCompartmentDetails.getJsonObj),
622
+ pathParams: pathParams,
623
+ headerParams: headerParams,
624
+ queryParams: queryParams
625
+ });
626
+ try {
627
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
628
+ const sdkResponse = oci_common_1.composeResponse({
629
+ responseObject: {},
630
+ responseHeaders: [
631
+ {
632
+ value: response.headers.get("opc-work-request-id"),
633
+ key: "opcWorkRequestId",
634
+ dataType: "string"
635
+ },
636
+ {
637
+ value: response.headers.get("opc-request-id"),
638
+ key: "opcRequestId",
639
+ dataType: "string"
640
+ }
641
+ ]
642
+ });
643
+ return sdkResponse;
644
+ }
645
+ catch (err) {
646
+ throw err;
647
+ }
648
+ });
649
+ }
650
+ /**
651
+ * Creates a PrivilegedApiControl.
652
+ *
653
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
654
+ * @param CreatePrivilegedApiControlRequest
655
+ * @return CreatePrivilegedApiControlResponse
656
+ * @throws OciError when an error occurs
657
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/apiaccesscontrol/CreatePrivilegedApiControl.ts.html |here} to see how to use CreatePrivilegedApiControl API.
658
+ */
659
+ createPrivilegedApiControl(createPrivilegedApiControlRequest) {
660
+ return __awaiter(this, void 0, void 0, function* () {
661
+ if (this.logger)
662
+ this.logger.debug("Calling operation PrivilegedApiControlClient#createPrivilegedApiControl.");
663
+ const operationName = "createPrivilegedApiControl";
664
+ const apiReferenceLink = "";
665
+ const pathParams = {};
666
+ const queryParams = {};
667
+ let headerParams = {
668
+ "Content-Type": common.Constants.APPLICATION_JSON,
669
+ "opc-retry-token": createPrivilegedApiControlRequest.opcRetryToken,
670
+ "opc-request-id": createPrivilegedApiControlRequest.opcRequestId
671
+ };
672
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
673
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, createPrivilegedApiControlRequest.retryConfiguration, specRetryConfiguration);
674
+ if (this.logger)
675
+ retrier.logger = this.logger;
676
+ const request = yield oci_common_1.composeRequest({
677
+ baseEndpoint: this._endpoint,
678
+ defaultHeaders: this._defaultHeaders,
679
+ path: "/privilegedApiControls",
680
+ method: "POST",
681
+ bodyContent: common.ObjectSerializer.serialize(createPrivilegedApiControlRequest.createPrivilegedApiControlDetails, "CreatePrivilegedApiControlDetails", model.CreatePrivilegedApiControlDetails.getJsonObj),
682
+ pathParams: pathParams,
683
+ headerParams: headerParams,
684
+ queryParams: queryParams
685
+ });
686
+ try {
687
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
688
+ const sdkResponse = oci_common_1.composeResponse({
689
+ responseObject: {},
690
+ body: yield response.json(),
691
+ bodyKey: "privilegedApiControl",
692
+ bodyModel: model.PrivilegedApiControl,
693
+ type: "model.PrivilegedApiControl",
694
+ responseHeaders: [
695
+ {
696
+ value: response.headers.get("location"),
697
+ key: "location",
698
+ dataType: "string"
699
+ },
700
+ {
701
+ value: response.headers.get("content-location"),
702
+ key: "contentLocation",
703
+ dataType: "string"
704
+ },
705
+ {
706
+ value: response.headers.get("etag"),
707
+ key: "etag",
708
+ dataType: "string"
709
+ },
710
+ {
711
+ value: response.headers.get("opc-work-request-id"),
712
+ key: "opcWorkRequestId",
713
+ dataType: "string"
714
+ },
715
+ {
716
+ value: response.headers.get("opc-request-id"),
717
+ key: "opcRequestId",
718
+ dataType: "string"
719
+ }
720
+ ]
721
+ });
722
+ return sdkResponse;
723
+ }
724
+ catch (err) {
725
+ throw err;
726
+ }
727
+ });
728
+ }
729
+ /**
730
+ * Deletes a PrivilegedApiControl.
731
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
732
+ * @param DeletePrivilegedApiControlRequest
733
+ * @return DeletePrivilegedApiControlResponse
734
+ * @throws OciError when an error occurs
735
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/apiaccesscontrol/DeletePrivilegedApiControl.ts.html |here} to see how to use DeletePrivilegedApiControl API.
736
+ */
737
+ deletePrivilegedApiControl(deletePrivilegedApiControlRequest) {
738
+ return __awaiter(this, void 0, void 0, function* () {
739
+ if (this.logger)
740
+ this.logger.debug("Calling operation PrivilegedApiControlClient#deletePrivilegedApiControl.");
741
+ const operationName = "deletePrivilegedApiControl";
742
+ const apiReferenceLink = "";
743
+ const pathParams = {
744
+ "{privilegedApiControlId}": deletePrivilegedApiControlRequest.privilegedApiControlId
745
+ };
746
+ const queryParams = {
747
+ "description": deletePrivilegedApiControlRequest.description
748
+ };
749
+ let headerParams = {
750
+ "Content-Type": common.Constants.APPLICATION_JSON,
751
+ "if-match": deletePrivilegedApiControlRequest.ifMatch,
752
+ "opc-request-id": deletePrivilegedApiControlRequest.opcRequestId
753
+ };
754
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
755
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, deletePrivilegedApiControlRequest.retryConfiguration, specRetryConfiguration);
756
+ if (this.logger)
757
+ retrier.logger = this.logger;
758
+ const request = yield oci_common_1.composeRequest({
759
+ baseEndpoint: this._endpoint,
760
+ defaultHeaders: this._defaultHeaders,
761
+ path: "/privilegedApiControls/{privilegedApiControlId}",
762
+ method: "DELETE",
763
+ pathParams: pathParams,
764
+ headerParams: headerParams,
765
+ queryParams: queryParams
766
+ });
767
+ try {
768
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
769
+ const sdkResponse = oci_common_1.composeResponse({
770
+ responseObject: {},
771
+ responseHeaders: [
772
+ {
773
+ value: response.headers.get("opc-work-request-id"),
774
+ key: "opcWorkRequestId",
775
+ dataType: "string"
776
+ },
777
+ {
778
+ value: response.headers.get("opc-request-id"),
779
+ key: "opcRequestId",
780
+ dataType: "string"
781
+ }
782
+ ]
783
+ });
784
+ return sdkResponse;
785
+ }
786
+ catch (err) {
787
+ throw err;
788
+ }
789
+ });
790
+ }
791
+ /**
792
+ * Gets information about a PrivilegedApiControl.
793
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
794
+ * @param GetPrivilegedApiControlRequest
795
+ * @return GetPrivilegedApiControlResponse
796
+ * @throws OciError when an error occurs
797
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/apiaccesscontrol/GetPrivilegedApiControl.ts.html |here} to see how to use GetPrivilegedApiControl API.
798
+ */
799
+ getPrivilegedApiControl(getPrivilegedApiControlRequest) {
800
+ return __awaiter(this, void 0, void 0, function* () {
801
+ if (this.logger)
802
+ this.logger.debug("Calling operation PrivilegedApiControlClient#getPrivilegedApiControl.");
803
+ const operationName = "getPrivilegedApiControl";
804
+ const apiReferenceLink = "";
805
+ const pathParams = {
806
+ "{privilegedApiControlId}": getPrivilegedApiControlRequest.privilegedApiControlId
807
+ };
808
+ const queryParams = {};
809
+ let headerParams = {
810
+ "Content-Type": common.Constants.APPLICATION_JSON,
811
+ "opc-request-id": getPrivilegedApiControlRequest.opcRequestId
812
+ };
813
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
814
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getPrivilegedApiControlRequest.retryConfiguration, specRetryConfiguration);
815
+ if (this.logger)
816
+ retrier.logger = this.logger;
817
+ const request = yield oci_common_1.composeRequest({
818
+ baseEndpoint: this._endpoint,
819
+ defaultHeaders: this._defaultHeaders,
820
+ path: "/privilegedApiControls/{privilegedApiControlId}",
821
+ method: "GET",
822
+ pathParams: pathParams,
823
+ headerParams: headerParams,
824
+ queryParams: queryParams
825
+ });
826
+ try {
827
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
828
+ const sdkResponse = oci_common_1.composeResponse({
829
+ responseObject: {},
830
+ body: yield response.json(),
831
+ bodyKey: "privilegedApiControl",
832
+ bodyModel: model.PrivilegedApiControl,
833
+ type: "model.PrivilegedApiControl",
834
+ responseHeaders: [
835
+ {
836
+ value: response.headers.get("etag"),
837
+ key: "etag",
838
+ dataType: "string"
839
+ },
840
+ {
841
+ value: response.headers.get("opc-request-id"),
842
+ key: "opcRequestId",
843
+ dataType: "string"
844
+ }
845
+ ]
846
+ });
847
+ return sdkResponse;
848
+ }
849
+ catch (err) {
850
+ throw err;
851
+ }
852
+ });
853
+ }
854
+ /**
855
+ * Gets a list of PrivilegedApiControls.
856
+ *
857
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
858
+ * @param ListPrivilegedApiControlsRequest
859
+ * @return ListPrivilegedApiControlsResponse
860
+ * @throws OciError when an error occurs
861
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/apiaccesscontrol/ListPrivilegedApiControls.ts.html |here} to see how to use ListPrivilegedApiControls API.
862
+ */
863
+ listPrivilegedApiControls(listPrivilegedApiControlsRequest) {
864
+ return __awaiter(this, void 0, void 0, function* () {
865
+ if (this.logger)
866
+ this.logger.debug("Calling operation PrivilegedApiControlClient#listPrivilegedApiControls.");
867
+ const operationName = "listPrivilegedApiControls";
868
+ const apiReferenceLink = "";
869
+ const pathParams = {};
870
+ const queryParams = {
871
+ "compartmentId": listPrivilegedApiControlsRequest.compartmentId,
872
+ "id": listPrivilegedApiControlsRequest.id,
873
+ "lifecycleState": listPrivilegedApiControlsRequest.lifecycleState,
874
+ "displayName": listPrivilegedApiControlsRequest.displayName,
875
+ "resourceType": listPrivilegedApiControlsRequest.resourceType,
876
+ "limit": listPrivilegedApiControlsRequest.limit,
877
+ "page": listPrivilegedApiControlsRequest.page,
878
+ "sortOrder": listPrivilegedApiControlsRequest.sortOrder,
879
+ "sortBy": listPrivilegedApiControlsRequest.sortBy
880
+ };
881
+ let headerParams = {
882
+ "Content-Type": common.Constants.APPLICATION_JSON,
883
+ "opc-request-id": listPrivilegedApiControlsRequest.opcRequestId
884
+ };
885
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
886
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listPrivilegedApiControlsRequest.retryConfiguration, specRetryConfiguration);
887
+ if (this.logger)
888
+ retrier.logger = this.logger;
889
+ const request = yield oci_common_1.composeRequest({
890
+ baseEndpoint: this._endpoint,
891
+ defaultHeaders: this._defaultHeaders,
892
+ path: "/privilegedApiControls",
893
+ method: "GET",
894
+ pathParams: pathParams,
895
+ headerParams: headerParams,
896
+ queryParams: queryParams
897
+ });
898
+ try {
899
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
900
+ const sdkResponse = oci_common_1.composeResponse({
901
+ responseObject: {},
902
+ body: yield response.json(),
903
+ bodyKey: "privilegedApiControlCollection",
904
+ bodyModel: model.PrivilegedApiControlCollection,
905
+ type: "model.PrivilegedApiControlCollection",
906
+ responseHeaders: [
907
+ {
908
+ value: response.headers.get("opc-request-id"),
909
+ key: "opcRequestId",
910
+ dataType: "string"
911
+ },
912
+ {
913
+ value: response.headers.get("opc-next-page"),
914
+ key: "opcNextPage",
915
+ dataType: "string"
916
+ }
917
+ ]
918
+ });
919
+ return sdkResponse;
920
+ }
921
+ catch (err) {
922
+ throw err;
923
+ }
924
+ });
925
+ }
926
+ /**
927
+ * Updates a PrivilegedApiControl.
928
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
929
+ * @param UpdatePrivilegedApiControlRequest
930
+ * @return UpdatePrivilegedApiControlResponse
931
+ * @throws OciError when an error occurs
932
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/apiaccesscontrol/UpdatePrivilegedApiControl.ts.html |here} to see how to use UpdatePrivilegedApiControl API.
933
+ */
934
+ updatePrivilegedApiControl(updatePrivilegedApiControlRequest) {
935
+ return __awaiter(this, void 0, void 0, function* () {
936
+ if (this.logger)
937
+ this.logger.debug("Calling operation PrivilegedApiControlClient#updatePrivilegedApiControl.");
938
+ const operationName = "updatePrivilegedApiControl";
939
+ const apiReferenceLink = "";
940
+ const pathParams = {
941
+ "{privilegedApiControlId}": updatePrivilegedApiControlRequest.privilegedApiControlId
942
+ };
943
+ const queryParams = {};
944
+ let headerParams = {
945
+ "Content-Type": common.Constants.APPLICATION_JSON,
946
+ "if-match": updatePrivilegedApiControlRequest.ifMatch,
947
+ "opc-request-id": updatePrivilegedApiControlRequest.opcRequestId
948
+ };
949
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
950
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, updatePrivilegedApiControlRequest.retryConfiguration, specRetryConfiguration);
951
+ if (this.logger)
952
+ retrier.logger = this.logger;
953
+ const request = yield oci_common_1.composeRequest({
954
+ baseEndpoint: this._endpoint,
955
+ defaultHeaders: this._defaultHeaders,
956
+ path: "/privilegedApiControls/{privilegedApiControlId}",
957
+ method: "PUT",
958
+ bodyContent: common.ObjectSerializer.serialize(updatePrivilegedApiControlRequest.updatePrivilegedApiControlDetails, "UpdatePrivilegedApiControlDetails", model.UpdatePrivilegedApiControlDetails.getJsonObj),
959
+ pathParams: pathParams,
960
+ headerParams: headerParams,
961
+ queryParams: queryParams
962
+ });
963
+ try {
964
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
965
+ const sdkResponse = oci_common_1.composeResponse({
966
+ responseObject: {},
967
+ responseHeaders: [
968
+ {
969
+ value: response.headers.get("opc-work-request-id"),
970
+ key: "opcWorkRequestId",
971
+ dataType: "string"
972
+ },
973
+ {
974
+ value: response.headers.get("opc-request-id"),
975
+ key: "opcRequestId",
976
+ dataType: "string"
977
+ }
978
+ ]
979
+ });
980
+ return sdkResponse;
981
+ }
982
+ catch (err) {
983
+ throw err;
984
+ }
985
+ });
986
+ }
987
+ }
988
+ exports.PrivilegedApiControlClient = PrivilegedApiControlClient;
989
+ PrivilegedApiControlClient.serviceEndpointTemplate = "https://pactl.{region}.oci.{secondLevelDomain}";
990
+ PrivilegedApiControlClient.endpointServiceName = "";
991
+ var PrivilegedApiRequestsApiKeys;
992
+ (function (PrivilegedApiRequestsApiKeys) {
993
+ })(PrivilegedApiRequestsApiKeys = exports.PrivilegedApiRequestsApiKeys || (exports.PrivilegedApiRequestsApiKeys = {}));
994
+ /**
995
+ * This service client uses {@link common.CircuitBreaker.DefaultConfiguration} for all the operations by default if no circuit breaker configuration is defined by the user.
996
+ */
997
+ class PrivilegedApiRequestsClient {
998
+ constructor(params, clientConfiguration) {
999
+ this["_realmSpecificEndpointTemplateEnabled"] = undefined;
1000
+ this["_endpoint"] = "";
1001
+ this["_defaultHeaders"] = {};
1002
+ this._circuitBreaker = null;
1003
+ this._httpOptions = undefined;
1004
+ this._bodyDuplexMode = undefined;
1005
+ this.targetService = "PrivilegedApiRequests";
1006
+ this._regionId = "";
1007
+ this._lastSetRegionOrRegionId = "";
1008
+ const requestSigner = params.authenticationDetailsProvider
1009
+ ? new common.DefaultRequestSigner(params.authenticationDetailsProvider)
1010
+ : null;
1011
+ this._authProvider = params.authenticationDetailsProvider;
1012
+ if (clientConfiguration) {
1013
+ this._clientConfiguration = clientConfiguration;
1014
+ this._circuitBreaker = clientConfiguration.circuitBreaker
1015
+ ? clientConfiguration.circuitBreaker.circuit
1016
+ : null;
1017
+ this._httpOptions = clientConfiguration.httpOptions
1018
+ ? clientConfiguration.httpOptions
1019
+ : undefined;
1020
+ this._bodyDuplexMode = clientConfiguration.bodyDuplexMode
1021
+ ? clientConfiguration.bodyDuplexMode
1022
+ : undefined;
1023
+ }
1024
+ if (!oci_common_1.developerToolConfiguration.isServiceEnabled("apiaccesscontrol")) {
1025
+ let errmsg = "The developerToolConfiguration configuration disabled this service, this behavior is controlled by developerToolConfiguration.ociEnabledServiceSet variable. Please check if your local developer_tool_configuration file has configured the service you're targeting or contact the cloud provider on the availability of this service : ";
1026
+ throw errmsg.concat("apiaccesscontrol");
1027
+ }
1028
+ // if circuit breaker is not created, check if circuit breaker system is enabled to use default circuit breaker
1029
+ const specCircuitBreakerEnabled = true;
1030
+ if (!this._circuitBreaker &&
1031
+ common.utils.isCircuitBreakerSystemEnabled(clientConfiguration) &&
1032
+ (specCircuitBreakerEnabled || common.CircuitBreaker.DefaultCircuitBreakerOverriden)) {
1033
+ this._circuitBreaker = new common.CircuitBreaker().circuit;
1034
+ }
1035
+ this._httpClient =
1036
+ params.httpClient ||
1037
+ new common.FetchHttpClient(requestSigner, this._circuitBreaker, this._httpOptions, this._bodyDuplexMode);
1038
+ if (params.authenticationDetailsProvider &&
1039
+ common.isRegionProvider(params.authenticationDetailsProvider)) {
1040
+ const provider = params.authenticationDetailsProvider;
1041
+ if (provider.getRegion()) {
1042
+ this.region = provider.getRegion();
1043
+ }
1044
+ }
1045
+ }
1046
+ /**
1047
+ * Get the endpoint that is being used to call (ex, https://www.example.com).
1048
+ */
1049
+ get endpoint() {
1050
+ return this._endpoint;
1051
+ }
1052
+ /**
1053
+ * Sets the endpoint to call (ex, https://www.example.com).
1054
+ * @param endpoint The endpoint of the service.
1055
+ */
1056
+ set endpoint(endpoint) {
1057
+ this._endpoint = endpoint;
1058
+ this._endpoint = this._endpoint + "/20241130";
1059
+ if (this.logger)
1060
+ this.logger.info(`PrivilegedApiRequestsClient endpoint set to ${this._endpoint}`);
1061
+ }
1062
+ get logger() {
1063
+ return common.LOG.logger;
1064
+ }
1065
+ /**
1066
+ * Determines whether realm specific endpoint should be used or not.
1067
+ * Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false"
1068
+ * @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template
1069
+ */
1070
+ set useRealmSpecificEndpointTemplate(realmSpecificEndpointTemplateEnabled) {
1071
+ this._realmSpecificEndpointTemplateEnabled = realmSpecificEndpointTemplateEnabled;
1072
+ if (this.logger)
1073
+ this.logger.info(`realmSpecificEndpointTemplateEnabled set to ${this._realmSpecificEndpointTemplateEnabled}`);
1074
+ if (this._lastSetRegionOrRegionId === common.Region.REGION_STRING) {
1075
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegion(PrivilegedApiRequestsClient.serviceEndpointTemplate, this._region, PrivilegedApiRequestsClient.endpointServiceName);
1076
+ }
1077
+ else if (this._lastSetRegionOrRegionId === common.Region.REGION_ID_STRING) {
1078
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(PrivilegedApiRequestsClient.serviceEndpointTemplate, this._regionId, PrivilegedApiRequestsClient.endpointServiceName);
1079
+ }
1080
+ }
1081
+ /**
1082
+ * Sets the region to call (ex, Region.US_PHOENIX_1).
1083
+ * Note, this will call {@link #endpoint(String) endpoint} after resolving the endpoint.
1084
+ * @param region The region of the service.
1085
+ */
1086
+ set region(region) {
1087
+ this._region = region;
1088
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegion(PrivilegedApiRequestsClient.serviceEndpointTemplate, region, PrivilegedApiRequestsClient.endpointServiceName);
1089
+ this._lastSetRegionOrRegionId = common.Region.REGION_STRING;
1090
+ }
1091
+ /**
1092
+ * Sets the regionId to call (ex, 'us-phoenix-1').
1093
+ *
1094
+ * Note, this will first try to map the region ID to a known Region and call {@link #region(Region) region}.
1095
+ * If no known Region could be determined, it will create an endpoint assuming its in default Realm OC1
1096
+ * and then call {@link #endpoint(String) endpoint}.
1097
+ * @param regionId The public region ID.
1098
+ */
1099
+ set regionId(regionId) {
1100
+ this._regionId = regionId;
1101
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(PrivilegedApiRequestsClient.serviceEndpointTemplate, regionId, PrivilegedApiRequestsClient.endpointServiceName);
1102
+ this._lastSetRegionOrRegionId = common.Region.REGION_ID_STRING;
1103
+ }
1104
+ /**
1105
+ * Creates a new PrivilegedApiRequestsWaiter for resources for this service.
1106
+ *
1107
+ * @param config The waiter configuration for termination and delay strategy
1108
+ * @return The service waiters.
1109
+ */
1110
+ createWaiters(config) {
1111
+ this._waiters = new privilegedapirequests_waiter_1.PrivilegedApiRequestsWaiter(this, config);
1112
+ return this._waiters;
1113
+ }
1114
+ /**
1115
+ * Gets the waiters available for resources for this service.
1116
+ *
1117
+ * @return The service waiters.
1118
+ */
1119
+ getWaiters() {
1120
+ if (this._waiters) {
1121
+ return this._waiters;
1122
+ }
1123
+ throw Error("Waiters do not exist. Please create waiters.");
1124
+ }
1125
+ /**
1126
+ * Shutdown the circuit breaker used by the client when it is no longer needed
1127
+ */
1128
+ shutdownCircuitBreaker() {
1129
+ if (this._circuitBreaker) {
1130
+ this._circuitBreaker.shutdown();
1131
+ }
1132
+ }
1133
+ /**
1134
+ * Close the provider if possible which in turn shuts down any associated circuit breaker
1135
+ */
1136
+ closeProvider() {
1137
+ if (this._authProvider) {
1138
+ if (this._authProvider instanceof common.AbstractRequestingAuthenticationDetailsProvider)
1139
+ (this._authProvider).closeProvider();
1140
+ }
1141
+ }
1142
+ /**
1143
+ * Close the client once it is no longer needed
1144
+ */
1145
+ close() {
1146
+ this.shutdownCircuitBreaker();
1147
+ this.closeProvider();
1148
+ }
1149
+ /**
1150
+ * Approves privilegedApi request.
1151
+ *
1152
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
1153
+ * @param ApprovePrivilegedApiRequestRequest
1154
+ * @return ApprovePrivilegedApiRequestResponse
1155
+ * @throws OciError when an error occurs
1156
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/apiaccesscontrol/ApprovePrivilegedApiRequest.ts.html |here} to see how to use ApprovePrivilegedApiRequest API.
1157
+ */
1158
+ approvePrivilegedApiRequest(approvePrivilegedApiRequestRequest) {
1159
+ return __awaiter(this, void 0, void 0, function* () {
1160
+ if (this.logger)
1161
+ this.logger.debug("Calling operation PrivilegedApiRequestsClient#approvePrivilegedApiRequest.");
1162
+ const operationName = "approvePrivilegedApiRequest";
1163
+ const apiReferenceLink = "";
1164
+ const pathParams = {
1165
+ "{privilegedApiRequestId}": approvePrivilegedApiRequestRequest.privilegedApiRequestId
1166
+ };
1167
+ const queryParams = {};
1168
+ let headerParams = {
1169
+ "Content-Type": common.Constants.APPLICATION_JSON,
1170
+ "if-match": approvePrivilegedApiRequestRequest.ifMatch,
1171
+ "opc-request-id": approvePrivilegedApiRequestRequest.opcRequestId,
1172
+ "opc-retry-token": approvePrivilegedApiRequestRequest.opcRetryToken
1173
+ };
1174
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
1175
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, approvePrivilegedApiRequestRequest.retryConfiguration, specRetryConfiguration);
1176
+ if (this.logger)
1177
+ retrier.logger = this.logger;
1178
+ const request = yield oci_common_1.composeRequest({
1179
+ baseEndpoint: this._endpoint,
1180
+ defaultHeaders: this._defaultHeaders,
1181
+ path: "/privilegedApiRequests/{privilegedApiRequestId}/actions/approve",
1182
+ method: "POST",
1183
+ bodyContent: common.ObjectSerializer.serialize(approvePrivilegedApiRequestRequest.approvePrivilegedApiRequestDetails, "ApprovePrivilegedApiRequestDetails", model.ApprovePrivilegedApiRequestDetails.getJsonObj),
1184
+ pathParams: pathParams,
1185
+ headerParams: headerParams,
1186
+ queryParams: queryParams
1187
+ });
1188
+ try {
1189
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1190
+ const sdkResponse = oci_common_1.composeResponse({
1191
+ responseObject: {},
1192
+ responseHeaders: [
1193
+ {
1194
+ value: response.headers.get("opc-work-request-id"),
1195
+ key: "opcWorkRequestId",
1196
+ dataType: "string"
1197
+ },
1198
+ {
1199
+ value: response.headers.get("opc-request-id"),
1200
+ key: "opcRequestId",
1201
+ dataType: "string"
1202
+ }
1203
+ ]
1204
+ });
1205
+ return sdkResponse;
1206
+ }
1207
+ catch (err) {
1208
+ throw err;
1209
+ }
1210
+ });
1211
+ }
1212
+ /**
1213
+ * Closes privilegedApi request.
1214
+ *
1215
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
1216
+ * @param ClosePrivilegedApiRequestRequest
1217
+ * @return ClosePrivilegedApiRequestResponse
1218
+ * @throws OciError when an error occurs
1219
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/apiaccesscontrol/ClosePrivilegedApiRequest.ts.html |here} to see how to use ClosePrivilegedApiRequest API.
1220
+ */
1221
+ closePrivilegedApiRequest(closePrivilegedApiRequestRequest) {
1222
+ return __awaiter(this, void 0, void 0, function* () {
1223
+ if (this.logger)
1224
+ this.logger.debug("Calling operation PrivilegedApiRequestsClient#closePrivilegedApiRequest.");
1225
+ const operationName = "closePrivilegedApiRequest";
1226
+ const apiReferenceLink = "";
1227
+ const pathParams = {
1228
+ "{privilegedApiRequestId}": closePrivilegedApiRequestRequest.privilegedApiRequestId
1229
+ };
1230
+ const queryParams = {};
1231
+ let headerParams = {
1232
+ "Content-Type": common.Constants.APPLICATION_JSON,
1233
+ "if-match": closePrivilegedApiRequestRequest.ifMatch,
1234
+ "opc-request-id": closePrivilegedApiRequestRequest.opcRequestId,
1235
+ "opc-retry-token": closePrivilegedApiRequestRequest.opcRetryToken
1236
+ };
1237
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
1238
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, closePrivilegedApiRequestRequest.retryConfiguration, specRetryConfiguration);
1239
+ if (this.logger)
1240
+ retrier.logger = this.logger;
1241
+ const request = yield oci_common_1.composeRequest({
1242
+ baseEndpoint: this._endpoint,
1243
+ defaultHeaders: this._defaultHeaders,
1244
+ path: "/privilegedApiRequests/{privilegedApiRequestId}/actions/close",
1245
+ method: "POST",
1246
+ bodyContent: common.ObjectSerializer.serialize(closePrivilegedApiRequestRequest.closePrivilegedApiRequestDetails, "ClosePrivilegedApiRequestDetails", model.ClosePrivilegedApiRequestDetails.getJsonObj),
1247
+ pathParams: pathParams,
1248
+ headerParams: headerParams,
1249
+ queryParams: queryParams
1250
+ });
1251
+ try {
1252
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1253
+ const sdkResponse = oci_common_1.composeResponse({
1254
+ responseObject: {},
1255
+ responseHeaders: [
1256
+ {
1257
+ value: response.headers.get("opc-work-request-id"),
1258
+ key: "opcWorkRequestId",
1259
+ dataType: "string"
1260
+ },
1261
+ {
1262
+ value: response.headers.get("opc-request-id"),
1263
+ key: "opcRequestId",
1264
+ dataType: "string"
1265
+ }
1266
+ ]
1267
+ });
1268
+ return sdkResponse;
1269
+ }
1270
+ catch (err) {
1271
+ throw err;
1272
+ }
1273
+ });
1274
+ }
1275
+ /**
1276
+ * Creates a PrivilegedApiRequest.
1277
+ *
1278
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
1279
+ * @param CreatePrivilegedApiRequestRequest
1280
+ * @return CreatePrivilegedApiRequestResponse
1281
+ * @throws OciError when an error occurs
1282
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/apiaccesscontrol/CreatePrivilegedApiRequest.ts.html |here} to see how to use CreatePrivilegedApiRequest API.
1283
+ */
1284
+ createPrivilegedApiRequest(createPrivilegedApiRequestRequest) {
1285
+ return __awaiter(this, void 0, void 0, function* () {
1286
+ if (this.logger)
1287
+ this.logger.debug("Calling operation PrivilegedApiRequestsClient#createPrivilegedApiRequest.");
1288
+ const operationName = "createPrivilegedApiRequest";
1289
+ const apiReferenceLink = "";
1290
+ const pathParams = {};
1291
+ const queryParams = {};
1292
+ let headerParams = {
1293
+ "Content-Type": common.Constants.APPLICATION_JSON,
1294
+ "opc-retry-token": createPrivilegedApiRequestRequest.opcRetryToken,
1295
+ "opc-request-id": createPrivilegedApiRequestRequest.opcRequestId
1296
+ };
1297
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
1298
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, createPrivilegedApiRequestRequest.retryConfiguration, specRetryConfiguration);
1299
+ if (this.logger)
1300
+ retrier.logger = this.logger;
1301
+ const request = yield oci_common_1.composeRequest({
1302
+ baseEndpoint: this._endpoint,
1303
+ defaultHeaders: this._defaultHeaders,
1304
+ path: "/privilegedApiRequests",
1305
+ method: "POST",
1306
+ bodyContent: common.ObjectSerializer.serialize(createPrivilegedApiRequestRequest.createPrivilegedApiRequestDetails, "CreatePrivilegedApiRequestDetails", model.CreatePrivilegedApiRequestDetails.getJsonObj),
1307
+ pathParams: pathParams,
1308
+ headerParams: headerParams,
1309
+ queryParams: queryParams
1310
+ });
1311
+ try {
1312
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1313
+ const sdkResponse = oci_common_1.composeResponse({
1314
+ responseObject: {},
1315
+ body: yield response.json(),
1316
+ bodyKey: "privilegedApiRequest",
1317
+ bodyModel: model.PrivilegedApiRequest,
1318
+ type: "model.PrivilegedApiRequest",
1319
+ responseHeaders: [
1320
+ {
1321
+ value: response.headers.get("location"),
1322
+ key: "location",
1323
+ dataType: "string"
1324
+ },
1325
+ {
1326
+ value: response.headers.get("content-location"),
1327
+ key: "contentLocation",
1328
+ dataType: "string"
1329
+ },
1330
+ {
1331
+ value: response.headers.get("etag"),
1332
+ key: "etag",
1333
+ dataType: "string"
1334
+ },
1335
+ {
1336
+ value: response.headers.get("opc-work-request-id"),
1337
+ key: "opcWorkRequestId",
1338
+ dataType: "string"
1339
+ },
1340
+ {
1341
+ value: response.headers.get("opc-request-id"),
1342
+ key: "opcRequestId",
1343
+ dataType: "string"
1344
+ }
1345
+ ]
1346
+ });
1347
+ return sdkResponse;
1348
+ }
1349
+ catch (err) {
1350
+ throw err;
1351
+ }
1352
+ });
1353
+ }
1354
+ /**
1355
+ * Gets information about a PrivilegedApiRequest.
1356
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
1357
+ * @param GetPrivilegedApiRequestRequest
1358
+ * @return GetPrivilegedApiRequestResponse
1359
+ * @throws OciError when an error occurs
1360
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/apiaccesscontrol/GetPrivilegedApiRequest.ts.html |here} to see how to use GetPrivilegedApiRequest API.
1361
+ */
1362
+ getPrivilegedApiRequest(getPrivilegedApiRequestRequest) {
1363
+ return __awaiter(this, void 0, void 0, function* () {
1364
+ if (this.logger)
1365
+ this.logger.debug("Calling operation PrivilegedApiRequestsClient#getPrivilegedApiRequest.");
1366
+ const operationName = "getPrivilegedApiRequest";
1367
+ const apiReferenceLink = "";
1368
+ const pathParams = {
1369
+ "{privilegedApiRequestId}": getPrivilegedApiRequestRequest.privilegedApiRequestId
1370
+ };
1371
+ const queryParams = {};
1372
+ let headerParams = {
1373
+ "Content-Type": common.Constants.APPLICATION_JSON,
1374
+ "opc-request-id": getPrivilegedApiRequestRequest.opcRequestId
1375
+ };
1376
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
1377
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getPrivilegedApiRequestRequest.retryConfiguration, specRetryConfiguration);
1378
+ if (this.logger)
1379
+ retrier.logger = this.logger;
1380
+ const request = yield oci_common_1.composeRequest({
1381
+ baseEndpoint: this._endpoint,
1382
+ defaultHeaders: this._defaultHeaders,
1383
+ path: "/privilegedApiRequests/{privilegedApiRequestId}",
1384
+ method: "GET",
1385
+ pathParams: pathParams,
1386
+ headerParams: headerParams,
1387
+ queryParams: queryParams
1388
+ });
1389
+ try {
1390
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1391
+ const sdkResponse = oci_common_1.composeResponse({
1392
+ responseObject: {},
1393
+ body: yield response.json(),
1394
+ bodyKey: "privilegedApiRequest",
1395
+ bodyModel: model.PrivilegedApiRequest,
1396
+ type: "model.PrivilegedApiRequest",
1397
+ responseHeaders: [
1398
+ {
1399
+ value: response.headers.get("etag"),
1400
+ key: "etag",
1401
+ dataType: "string"
1402
+ },
1403
+ {
1404
+ value: response.headers.get("opc-request-id"),
1405
+ key: "opcRequestId",
1406
+ dataType: "string"
1407
+ }
1408
+ ]
1409
+ });
1410
+ return sdkResponse;
1411
+ }
1412
+ catch (err) {
1413
+ throw err;
1414
+ }
1415
+ });
1416
+ }
1417
+ /**
1418
+ * Lists all privilegedApi requests in the compartment.
1419
+ *
1420
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
1421
+ * @param ListPrivilegedApiRequestsRequest
1422
+ * @return ListPrivilegedApiRequestsResponse
1423
+ * @throws OciError when an error occurs
1424
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/apiaccesscontrol/ListPrivilegedApiRequests.ts.html |here} to see how to use ListPrivilegedApiRequests API.
1425
+ */
1426
+ listPrivilegedApiRequests(listPrivilegedApiRequestsRequest) {
1427
+ return __awaiter(this, void 0, void 0, function* () {
1428
+ if (this.logger)
1429
+ this.logger.debug("Calling operation PrivilegedApiRequestsClient#listPrivilegedApiRequests.");
1430
+ const operationName = "listPrivilegedApiRequests";
1431
+ const apiReferenceLink = "";
1432
+ const pathParams = {};
1433
+ const queryParams = {
1434
+ "compartmentId": listPrivilegedApiRequestsRequest.compartmentId,
1435
+ "id": listPrivilegedApiRequestsRequest.id,
1436
+ "displayName": listPrivilegedApiRequestsRequest.displayName,
1437
+ "resourceId": listPrivilegedApiRequestsRequest.resourceId,
1438
+ "resourceType": listPrivilegedApiRequestsRequest.resourceType,
1439
+ "lifecycleState": listPrivilegedApiRequestsRequest.lifecycleState,
1440
+ "state": listPrivilegedApiRequestsRequest.state,
1441
+ "limit": listPrivilegedApiRequestsRequest.limit,
1442
+ "page": listPrivilegedApiRequestsRequest.page,
1443
+ "sortOrder": listPrivilegedApiRequestsRequest.sortOrder,
1444
+ "sortBy": listPrivilegedApiRequestsRequest.sortBy
1445
+ };
1446
+ let headerParams = {
1447
+ "Content-Type": common.Constants.APPLICATION_JSON,
1448
+ "opc-request-id": listPrivilegedApiRequestsRequest.opcRequestId
1449
+ };
1450
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
1451
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listPrivilegedApiRequestsRequest.retryConfiguration, specRetryConfiguration);
1452
+ if (this.logger)
1453
+ retrier.logger = this.logger;
1454
+ const request = yield oci_common_1.composeRequest({
1455
+ baseEndpoint: this._endpoint,
1456
+ defaultHeaders: this._defaultHeaders,
1457
+ path: "/privilegedApiRequests",
1458
+ method: "GET",
1459
+ pathParams: pathParams,
1460
+ headerParams: headerParams,
1461
+ queryParams: queryParams
1462
+ });
1463
+ try {
1464
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1465
+ const sdkResponse = oci_common_1.composeResponse({
1466
+ responseObject: {},
1467
+ body: yield response.json(),
1468
+ bodyKey: "privilegedApiRequestCollection",
1469
+ bodyModel: model.PrivilegedApiRequestCollection,
1470
+ type: "model.PrivilegedApiRequestCollection",
1471
+ responseHeaders: [
1472
+ {
1473
+ value: response.headers.get("opc-request-id"),
1474
+ key: "opcRequestId",
1475
+ dataType: "string"
1476
+ },
1477
+ {
1478
+ value: response.headers.get("opc-next-page"),
1479
+ key: "opcNextPage",
1480
+ dataType: "string"
1481
+ }
1482
+ ]
1483
+ });
1484
+ return sdkResponse;
1485
+ }
1486
+ catch (err) {
1487
+ throw err;
1488
+ }
1489
+ });
1490
+ }
1491
+ /**
1492
+ * Rejects privilegedApi request.
1493
+ *
1494
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
1495
+ * @param RejectPrivilegedApiRequestRequest
1496
+ * @return RejectPrivilegedApiRequestResponse
1497
+ * @throws OciError when an error occurs
1498
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/apiaccesscontrol/RejectPrivilegedApiRequest.ts.html |here} to see how to use RejectPrivilegedApiRequest API.
1499
+ */
1500
+ rejectPrivilegedApiRequest(rejectPrivilegedApiRequestRequest) {
1501
+ return __awaiter(this, void 0, void 0, function* () {
1502
+ if (this.logger)
1503
+ this.logger.debug("Calling operation PrivilegedApiRequestsClient#rejectPrivilegedApiRequest.");
1504
+ const operationName = "rejectPrivilegedApiRequest";
1505
+ const apiReferenceLink = "";
1506
+ const pathParams = {
1507
+ "{privilegedApiRequestId}": rejectPrivilegedApiRequestRequest.privilegedApiRequestId
1508
+ };
1509
+ const queryParams = {};
1510
+ let headerParams = {
1511
+ "Content-Type": common.Constants.APPLICATION_JSON,
1512
+ "opc-retry-token": rejectPrivilegedApiRequestRequest.opcRetryToken,
1513
+ "if-match": rejectPrivilegedApiRequestRequest.ifMatch,
1514
+ "opc-request-id": rejectPrivilegedApiRequestRequest.opcRequestId
1515
+ };
1516
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
1517
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, rejectPrivilegedApiRequestRequest.retryConfiguration, specRetryConfiguration);
1518
+ if (this.logger)
1519
+ retrier.logger = this.logger;
1520
+ const request = yield oci_common_1.composeRequest({
1521
+ baseEndpoint: this._endpoint,
1522
+ defaultHeaders: this._defaultHeaders,
1523
+ path: "/privilegedApiRequests/{privilegedApiRequestId}/actions/reject",
1524
+ method: "POST",
1525
+ bodyContent: common.ObjectSerializer.serialize(rejectPrivilegedApiRequestRequest.rejectPrivilegedApiRequestDetails, "RejectPrivilegedApiRequestDetails", model.RejectPrivilegedApiRequestDetails.getJsonObj),
1526
+ pathParams: pathParams,
1527
+ headerParams: headerParams,
1528
+ queryParams: queryParams
1529
+ });
1530
+ try {
1531
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1532
+ const sdkResponse = oci_common_1.composeResponse({
1533
+ responseObject: {},
1534
+ responseHeaders: [
1535
+ {
1536
+ value: response.headers.get("opc-work-request-id"),
1537
+ key: "opcWorkRequestId",
1538
+ dataType: "string"
1539
+ },
1540
+ {
1541
+ value: response.headers.get("opc-request-id"),
1542
+ key: "opcRequestId",
1543
+ dataType: "string"
1544
+ }
1545
+ ]
1546
+ });
1547
+ return sdkResponse;
1548
+ }
1549
+ catch (err) {
1550
+ throw err;
1551
+ }
1552
+ });
1553
+ }
1554
+ /**
1555
+ * Revokes an already approved privilegedApi request.
1556
+ *
1557
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
1558
+ * @param RevokePrivilegedApiRequestRequest
1559
+ * @return RevokePrivilegedApiRequestResponse
1560
+ * @throws OciError when an error occurs
1561
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/apiaccesscontrol/RevokePrivilegedApiRequest.ts.html |here} to see how to use RevokePrivilegedApiRequest API.
1562
+ */
1563
+ revokePrivilegedApiRequest(revokePrivilegedApiRequestRequest) {
1564
+ return __awaiter(this, void 0, void 0, function* () {
1565
+ if (this.logger)
1566
+ this.logger.debug("Calling operation PrivilegedApiRequestsClient#revokePrivilegedApiRequest.");
1567
+ const operationName = "revokePrivilegedApiRequest";
1568
+ const apiReferenceLink = "";
1569
+ const pathParams = {
1570
+ "{privilegedApiRequestId}": revokePrivilegedApiRequestRequest.privilegedApiRequestId
1571
+ };
1572
+ const queryParams = {};
1573
+ let headerParams = {
1574
+ "Content-Type": common.Constants.APPLICATION_JSON,
1575
+ "opc-retry-token": revokePrivilegedApiRequestRequest.opcRetryToken,
1576
+ "if-match": revokePrivilegedApiRequestRequest.ifMatch,
1577
+ "opc-request-id": revokePrivilegedApiRequestRequest.opcRequestId
1578
+ };
1579
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
1580
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, revokePrivilegedApiRequestRequest.retryConfiguration, specRetryConfiguration);
1581
+ if (this.logger)
1582
+ retrier.logger = this.logger;
1583
+ const request = yield oci_common_1.composeRequest({
1584
+ baseEndpoint: this._endpoint,
1585
+ defaultHeaders: this._defaultHeaders,
1586
+ path: "/privilegedApiRequests/{privilegedApiRequestId}/actions/revoke",
1587
+ method: "POST",
1588
+ bodyContent: common.ObjectSerializer.serialize(revokePrivilegedApiRequestRequest.revokePrivilegedApiRequestDetails, "RevokePrivilegedApiRequestDetails", model.RevokePrivilegedApiRequestDetails.getJsonObj),
1589
+ pathParams: pathParams,
1590
+ headerParams: headerParams,
1591
+ queryParams: queryParams
1592
+ });
1593
+ try {
1594
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1595
+ const sdkResponse = oci_common_1.composeResponse({
1596
+ responseObject: {},
1597
+ responseHeaders: [
1598
+ {
1599
+ value: response.headers.get("opc-work-request-id"),
1600
+ key: "opcWorkRequestId",
1601
+ dataType: "string"
1602
+ },
1603
+ {
1604
+ value: response.headers.get("opc-request-id"),
1605
+ key: "opcRequestId",
1606
+ dataType: "string"
1607
+ }
1608
+ ]
1609
+ });
1610
+ return sdkResponse;
1611
+ }
1612
+ catch (err) {
1613
+ throw err;
1614
+ }
1615
+ });
1616
+ }
1617
+ }
1618
+ exports.PrivilegedApiRequestsClient = PrivilegedApiRequestsClient;
1619
+ PrivilegedApiRequestsClient.serviceEndpointTemplate = "https://pactl.{region}.oci.{secondLevelDomain}";
1620
+ PrivilegedApiRequestsClient.endpointServiceName = "";
1621
+ var PrivilegedApiWorkRequestApiKeys;
1622
+ (function (PrivilegedApiWorkRequestApiKeys) {
1623
+ })(PrivilegedApiWorkRequestApiKeys = exports.PrivilegedApiWorkRequestApiKeys || (exports.PrivilegedApiWorkRequestApiKeys = {}));
1624
+ /**
1625
+ * This service client uses {@link common.CircuitBreaker.DefaultConfiguration} for all the operations by default if no circuit breaker configuration is defined by the user.
1626
+ */
1627
+ class PrivilegedApiWorkRequestClient {
1628
+ constructor(params, clientConfiguration) {
1629
+ this["_realmSpecificEndpointTemplateEnabled"] = undefined;
1630
+ this["_endpoint"] = "";
1631
+ this["_defaultHeaders"] = {};
1632
+ this._circuitBreaker = null;
1633
+ this._httpOptions = undefined;
1634
+ this._bodyDuplexMode = undefined;
1635
+ this.targetService = "PrivilegedApiWorkRequest";
1636
+ this._regionId = "";
1637
+ this._lastSetRegionOrRegionId = "";
1638
+ const requestSigner = params.authenticationDetailsProvider
1639
+ ? new common.DefaultRequestSigner(params.authenticationDetailsProvider)
1640
+ : null;
1641
+ this._authProvider = params.authenticationDetailsProvider;
1642
+ if (clientConfiguration) {
1643
+ this._clientConfiguration = clientConfiguration;
1644
+ this._circuitBreaker = clientConfiguration.circuitBreaker
1645
+ ? clientConfiguration.circuitBreaker.circuit
1646
+ : null;
1647
+ this._httpOptions = clientConfiguration.httpOptions
1648
+ ? clientConfiguration.httpOptions
1649
+ : undefined;
1650
+ this._bodyDuplexMode = clientConfiguration.bodyDuplexMode
1651
+ ? clientConfiguration.bodyDuplexMode
1652
+ : undefined;
1653
+ }
1654
+ if (!oci_common_1.developerToolConfiguration.isServiceEnabled("apiaccesscontrol")) {
1655
+ let errmsg = "The developerToolConfiguration configuration disabled this service, this behavior is controlled by developerToolConfiguration.ociEnabledServiceSet variable. Please check if your local developer_tool_configuration file has configured the service you're targeting or contact the cloud provider on the availability of this service : ";
1656
+ throw errmsg.concat("apiaccesscontrol");
1657
+ }
1658
+ // if circuit breaker is not created, check if circuit breaker system is enabled to use default circuit breaker
1659
+ const specCircuitBreakerEnabled = true;
1660
+ if (!this._circuitBreaker &&
1661
+ common.utils.isCircuitBreakerSystemEnabled(clientConfiguration) &&
1662
+ (specCircuitBreakerEnabled || common.CircuitBreaker.DefaultCircuitBreakerOverriden)) {
1663
+ this._circuitBreaker = new common.CircuitBreaker().circuit;
1664
+ }
1665
+ this._httpClient =
1666
+ params.httpClient ||
1667
+ new common.FetchHttpClient(requestSigner, this._circuitBreaker, this._httpOptions, this._bodyDuplexMode);
1668
+ if (params.authenticationDetailsProvider &&
1669
+ common.isRegionProvider(params.authenticationDetailsProvider)) {
1670
+ const provider = params.authenticationDetailsProvider;
1671
+ if (provider.getRegion()) {
1672
+ this.region = provider.getRegion();
1673
+ }
1674
+ }
1675
+ }
1676
+ /**
1677
+ * Get the endpoint that is being used to call (ex, https://www.example.com).
1678
+ */
1679
+ get endpoint() {
1680
+ return this._endpoint;
1681
+ }
1682
+ /**
1683
+ * Sets the endpoint to call (ex, https://www.example.com).
1684
+ * @param endpoint The endpoint of the service.
1685
+ */
1686
+ set endpoint(endpoint) {
1687
+ this._endpoint = endpoint;
1688
+ this._endpoint = this._endpoint + "/20241130";
1689
+ if (this.logger)
1690
+ this.logger.info(`PrivilegedApiWorkRequestClient endpoint set to ${this._endpoint}`);
1691
+ }
1692
+ get logger() {
1693
+ return common.LOG.logger;
1694
+ }
1695
+ /**
1696
+ * Determines whether realm specific endpoint should be used or not.
1697
+ * Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false"
1698
+ * @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template
1699
+ */
1700
+ set useRealmSpecificEndpointTemplate(realmSpecificEndpointTemplateEnabled) {
1701
+ this._realmSpecificEndpointTemplateEnabled = realmSpecificEndpointTemplateEnabled;
1702
+ if (this.logger)
1703
+ this.logger.info(`realmSpecificEndpointTemplateEnabled set to ${this._realmSpecificEndpointTemplateEnabled}`);
1704
+ if (this._lastSetRegionOrRegionId === common.Region.REGION_STRING) {
1705
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegion(PrivilegedApiWorkRequestClient.serviceEndpointTemplate, this._region, PrivilegedApiWorkRequestClient.endpointServiceName);
1706
+ }
1707
+ else if (this._lastSetRegionOrRegionId === common.Region.REGION_ID_STRING) {
1708
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(PrivilegedApiWorkRequestClient.serviceEndpointTemplate, this._regionId, PrivilegedApiWorkRequestClient.endpointServiceName);
1709
+ }
1710
+ }
1711
+ /**
1712
+ * Sets the region to call (ex, Region.US_PHOENIX_1).
1713
+ * Note, this will call {@link #endpoint(String) endpoint} after resolving the endpoint.
1714
+ * @param region The region of the service.
1715
+ */
1716
+ set region(region) {
1717
+ this._region = region;
1718
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegion(PrivilegedApiWorkRequestClient.serviceEndpointTemplate, region, PrivilegedApiWorkRequestClient.endpointServiceName);
1719
+ this._lastSetRegionOrRegionId = common.Region.REGION_STRING;
1720
+ }
1721
+ /**
1722
+ * Sets the regionId to call (ex, 'us-phoenix-1').
1723
+ *
1724
+ * Note, this will first try to map the region ID to a known Region and call {@link #region(Region) region}.
1725
+ * If no known Region could be determined, it will create an endpoint assuming its in default Realm OC1
1726
+ * and then call {@link #endpoint(String) endpoint}.
1727
+ * @param regionId The public region ID.
1728
+ */
1729
+ set regionId(regionId) {
1730
+ this._regionId = regionId;
1731
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(PrivilegedApiWorkRequestClient.serviceEndpointTemplate, regionId, PrivilegedApiWorkRequestClient.endpointServiceName);
1732
+ this._lastSetRegionOrRegionId = common.Region.REGION_ID_STRING;
1733
+ }
1734
+ /**
1735
+ * Creates a new PrivilegedApiWorkRequestWaiter for resources for this service.
1736
+ *
1737
+ * @param config The waiter configuration for termination and delay strategy
1738
+ * @return The service waiters.
1739
+ */
1740
+ createWaiters(config) {
1741
+ this._waiters = new privilegedapiworkrequest_waiter_1.PrivilegedApiWorkRequestWaiter(this, config);
1742
+ return this._waiters;
1743
+ }
1744
+ /**
1745
+ * Gets the waiters available for resources for this service.
1746
+ *
1747
+ * @return The service waiters.
1748
+ */
1749
+ getWaiters() {
1750
+ if (this._waiters) {
1751
+ return this._waiters;
1752
+ }
1753
+ throw Error("Waiters do not exist. Please create waiters.");
1754
+ }
1755
+ /**
1756
+ * Shutdown the circuit breaker used by the client when it is no longer needed
1757
+ */
1758
+ shutdownCircuitBreaker() {
1759
+ if (this._circuitBreaker) {
1760
+ this._circuitBreaker.shutdown();
1761
+ }
1762
+ }
1763
+ /**
1764
+ * Close the provider if possible which in turn shuts down any associated circuit breaker
1765
+ */
1766
+ closeProvider() {
1767
+ if (this._authProvider) {
1768
+ if (this._authProvider instanceof common.AbstractRequestingAuthenticationDetailsProvider)
1769
+ (this._authProvider).closeProvider();
1770
+ }
1771
+ }
1772
+ /**
1773
+ * Close the client once it is no longer needed
1774
+ */
1775
+ close() {
1776
+ this.shutdownCircuitBreaker();
1777
+ this.closeProvider();
1778
+ }
1779
+ /**
1780
+ * Cancels a work request.
1781
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
1782
+ * @param CancelWorkRequestRequest
1783
+ * @return CancelWorkRequestResponse
1784
+ * @throws OciError when an error occurs
1785
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/apiaccesscontrol/CancelWorkRequest.ts.html |here} to see how to use CancelWorkRequest API.
1786
+ */
1787
+ cancelWorkRequest(cancelWorkRequestRequest) {
1788
+ return __awaiter(this, void 0, void 0, function* () {
1789
+ if (this.logger)
1790
+ this.logger.debug("Calling operation PrivilegedApiWorkRequestClient#cancelWorkRequest.");
1791
+ const operationName = "cancelWorkRequest";
1792
+ const apiReferenceLink = "";
1793
+ const pathParams = {
1794
+ "{workRequestId}": cancelWorkRequestRequest.workRequestId
1795
+ };
1796
+ const queryParams = {};
1797
+ let headerParams = {
1798
+ "Content-Type": common.Constants.APPLICATION_JSON,
1799
+ "if-match": cancelWorkRequestRequest.ifMatch,
1800
+ "opc-request-id": cancelWorkRequestRequest.opcRequestId
1801
+ };
1802
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
1803
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, cancelWorkRequestRequest.retryConfiguration, specRetryConfiguration);
1804
+ if (this.logger)
1805
+ retrier.logger = this.logger;
1806
+ const request = yield oci_common_1.composeRequest({
1807
+ baseEndpoint: this._endpoint,
1808
+ defaultHeaders: this._defaultHeaders,
1809
+ path: "/workRequests/{workRequestId}",
1810
+ method: "DELETE",
1811
+ pathParams: pathParams,
1812
+ headerParams: headerParams,
1813
+ queryParams: queryParams
1814
+ });
1815
+ try {
1816
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1817
+ const sdkResponse = oci_common_1.composeResponse({
1818
+ responseObject: {},
1819
+ responseHeaders: [
1820
+ {
1821
+ value: response.headers.get("opc-request-id"),
1822
+ key: "opcRequestId",
1823
+ dataType: "string"
1824
+ }
1825
+ ]
1826
+ });
1827
+ return sdkResponse;
1828
+ }
1829
+ catch (err) {
1830
+ throw err;
1831
+ }
1832
+ });
1833
+ }
1834
+ /**
1835
+ * Gets the details of a work request.
1836
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
1837
+ * @param GetWorkRequestRequest
1838
+ * @return GetWorkRequestResponse
1839
+ * @throws OciError when an error occurs
1840
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/apiaccesscontrol/GetWorkRequest.ts.html |here} to see how to use GetWorkRequest API.
1841
+ */
1842
+ getWorkRequest(getWorkRequestRequest) {
1843
+ return __awaiter(this, void 0, void 0, function* () {
1844
+ if (this.logger)
1845
+ this.logger.debug("Calling operation PrivilegedApiWorkRequestClient#getWorkRequest.");
1846
+ const operationName = "getWorkRequest";
1847
+ const apiReferenceLink = "";
1848
+ const pathParams = {
1849
+ "{workRequestId}": getWorkRequestRequest.workRequestId
1850
+ };
1851
+ const queryParams = {};
1852
+ let headerParams = {
1853
+ "Content-Type": common.Constants.APPLICATION_JSON,
1854
+ "opc-request-id": getWorkRequestRequest.opcRequestId
1855
+ };
1856
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
1857
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getWorkRequestRequest.retryConfiguration, specRetryConfiguration);
1858
+ if (this.logger)
1859
+ retrier.logger = this.logger;
1860
+ const request = yield oci_common_1.composeRequest({
1861
+ baseEndpoint: this._endpoint,
1862
+ defaultHeaders: this._defaultHeaders,
1863
+ path: "/workRequests/{workRequestId}",
1864
+ method: "GET",
1865
+ pathParams: pathParams,
1866
+ headerParams: headerParams,
1867
+ queryParams: queryParams
1868
+ });
1869
+ try {
1870
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1871
+ const sdkResponse = oci_common_1.composeResponse({
1872
+ responseObject: {},
1873
+ body: yield response.json(),
1874
+ bodyKey: "workRequest",
1875
+ bodyModel: model.WorkRequest,
1876
+ type: "model.WorkRequest",
1877
+ responseHeaders: [
1878
+ {
1879
+ value: response.headers.get("etag"),
1880
+ key: "etag",
1881
+ dataType: "string"
1882
+ },
1883
+ {
1884
+ value: response.headers.get("opc-request-id"),
1885
+ key: "opcRequestId",
1886
+ dataType: "string"
1887
+ },
1888
+ {
1889
+ value: response.headers.get("retry-after"),
1890
+ key: "retryAfter",
1891
+ dataType: "number"
1892
+ }
1893
+ ]
1894
+ });
1895
+ return sdkResponse;
1896
+ }
1897
+ catch (err) {
1898
+ throw err;
1899
+ }
1900
+ });
1901
+ }
1902
+ /**
1903
+ * Lists the errors for a work request.
1904
+ *
1905
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
1906
+ * @param ListWorkRequestErrorsRequest
1907
+ * @return ListWorkRequestErrorsResponse
1908
+ * @throws OciError when an error occurs
1909
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/apiaccesscontrol/ListWorkRequestErrors.ts.html |here} to see how to use ListWorkRequestErrors API.
1910
+ */
1911
+ listWorkRequestErrors(listWorkRequestErrorsRequest) {
1912
+ return __awaiter(this, void 0, void 0, function* () {
1913
+ if (this.logger)
1914
+ this.logger.debug("Calling operation PrivilegedApiWorkRequestClient#listWorkRequestErrors.");
1915
+ const operationName = "listWorkRequestErrors";
1916
+ const apiReferenceLink = "";
1917
+ const pathParams = {
1918
+ "{workRequestId}": listWorkRequestErrorsRequest.workRequestId
1919
+ };
1920
+ const queryParams = {
1921
+ "page": listWorkRequestErrorsRequest.page,
1922
+ "limit": listWorkRequestErrorsRequest.limit,
1923
+ "sortBy": listWorkRequestErrorsRequest.sortBy,
1924
+ "sortOrder": listWorkRequestErrorsRequest.sortOrder
1925
+ };
1926
+ let headerParams = {
1927
+ "Content-Type": common.Constants.APPLICATION_JSON,
1928
+ "opc-request-id": listWorkRequestErrorsRequest.opcRequestId
1929
+ };
1930
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
1931
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listWorkRequestErrorsRequest.retryConfiguration, specRetryConfiguration);
1932
+ if (this.logger)
1933
+ retrier.logger = this.logger;
1934
+ const request = yield oci_common_1.composeRequest({
1935
+ baseEndpoint: this._endpoint,
1936
+ defaultHeaders: this._defaultHeaders,
1937
+ path: "/workRequests/{workRequestId}/errors",
1938
+ method: "GET",
1939
+ pathParams: pathParams,
1940
+ headerParams: headerParams,
1941
+ queryParams: queryParams
1942
+ });
1943
+ try {
1944
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1945
+ const sdkResponse = oci_common_1.composeResponse({
1946
+ responseObject: {},
1947
+ body: yield response.json(),
1948
+ bodyKey: "workRequestErrorCollection",
1949
+ bodyModel: model.WorkRequestErrorCollection,
1950
+ type: "model.WorkRequestErrorCollection",
1951
+ responseHeaders: [
1952
+ {
1953
+ value: response.headers.get("opc-next-page"),
1954
+ key: "opcNextPage",
1955
+ dataType: "string"
1956
+ },
1957
+ {
1958
+ value: response.headers.get("opc-request-id"),
1959
+ key: "opcRequestId",
1960
+ dataType: "string"
1961
+ }
1962
+ ]
1963
+ });
1964
+ return sdkResponse;
1965
+ }
1966
+ catch (err) {
1967
+ throw err;
1968
+ }
1969
+ });
1970
+ }
1971
+ /**
1972
+ * Lists the logs for a work request.
1973
+ *
1974
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
1975
+ * @param ListWorkRequestLogsRequest
1976
+ * @return ListWorkRequestLogsResponse
1977
+ * @throws OciError when an error occurs
1978
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/apiaccesscontrol/ListWorkRequestLogs.ts.html |here} to see how to use ListWorkRequestLogs API.
1979
+ */
1980
+ listWorkRequestLogs(listWorkRequestLogsRequest) {
1981
+ return __awaiter(this, void 0, void 0, function* () {
1982
+ if (this.logger)
1983
+ this.logger.debug("Calling operation PrivilegedApiWorkRequestClient#listWorkRequestLogs.");
1984
+ const operationName = "listWorkRequestLogs";
1985
+ const apiReferenceLink = "";
1986
+ const pathParams = {
1987
+ "{workRequestId}": listWorkRequestLogsRequest.workRequestId
1988
+ };
1989
+ const queryParams = {
1990
+ "page": listWorkRequestLogsRequest.page,
1991
+ "limit": listWorkRequestLogsRequest.limit,
1992
+ "sortBy": listWorkRequestLogsRequest.sortBy,
1993
+ "sortOrder": listWorkRequestLogsRequest.sortOrder
1994
+ };
1995
+ let headerParams = {
1996
+ "Content-Type": common.Constants.APPLICATION_JSON,
1997
+ "opc-request-id": listWorkRequestLogsRequest.opcRequestId
1998
+ };
1999
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
2000
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listWorkRequestLogsRequest.retryConfiguration, specRetryConfiguration);
2001
+ if (this.logger)
2002
+ retrier.logger = this.logger;
2003
+ const request = yield oci_common_1.composeRequest({
2004
+ baseEndpoint: this._endpoint,
2005
+ defaultHeaders: this._defaultHeaders,
2006
+ path: "/workRequests/{workRequestId}/logs",
2007
+ method: "GET",
2008
+ pathParams: pathParams,
2009
+ headerParams: headerParams,
2010
+ queryParams: queryParams
2011
+ });
2012
+ try {
2013
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
2014
+ const sdkResponse = oci_common_1.composeResponse({
2015
+ responseObject: {},
2016
+ body: yield response.json(),
2017
+ bodyKey: "workRequestLogEntryCollection",
2018
+ bodyModel: model.WorkRequestLogEntryCollection,
2019
+ type: "model.WorkRequestLogEntryCollection",
2020
+ responseHeaders: [
2021
+ {
2022
+ value: response.headers.get("opc-next-page"),
2023
+ key: "opcNextPage",
2024
+ dataType: "string"
2025
+ },
2026
+ {
2027
+ value: response.headers.get("opc-request-id"),
2028
+ key: "opcRequestId",
2029
+ dataType: "string"
2030
+ }
2031
+ ]
2032
+ });
2033
+ return sdkResponse;
2034
+ }
2035
+ catch (err) {
2036
+ throw err;
2037
+ }
2038
+ });
2039
+ }
2040
+ /**
2041
+ * Lists the work requests in a compartment.
2042
+ *
2043
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
2044
+ * @param ListWorkRequestsRequest
2045
+ * @return ListWorkRequestsResponse
2046
+ * @throws OciError when an error occurs
2047
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/apiaccesscontrol/ListWorkRequests.ts.html |here} to see how to use ListWorkRequests API.
2048
+ */
2049
+ listWorkRequests(listWorkRequestsRequest) {
2050
+ return __awaiter(this, void 0, void 0, function* () {
2051
+ if (this.logger)
2052
+ this.logger.debug("Calling operation PrivilegedApiWorkRequestClient#listWorkRequests.");
2053
+ const operationName = "listWorkRequests";
2054
+ const apiReferenceLink = "";
2055
+ const pathParams = {};
2056
+ const queryParams = {
2057
+ "compartmentId": listWorkRequestsRequest.compartmentId,
2058
+ "workRequestId": listWorkRequestsRequest.workRequestId,
2059
+ "status": listWorkRequestsRequest.status,
2060
+ "resourceId": listWorkRequestsRequest.resourceId,
2061
+ "page": listWorkRequestsRequest.page,
2062
+ "limit": listWorkRequestsRequest.limit,
2063
+ "sortOrder": listWorkRequestsRequest.sortOrder,
2064
+ "sortBy": listWorkRequestsRequest.sortBy
2065
+ };
2066
+ let headerParams = {
2067
+ "Content-Type": common.Constants.APPLICATION_JSON,
2068
+ "opc-request-id": listWorkRequestsRequest.opcRequestId
2069
+ };
2070
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
2071
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listWorkRequestsRequest.retryConfiguration, specRetryConfiguration);
2072
+ if (this.logger)
2073
+ retrier.logger = this.logger;
2074
+ const request = yield oci_common_1.composeRequest({
2075
+ baseEndpoint: this._endpoint,
2076
+ defaultHeaders: this._defaultHeaders,
2077
+ path: "/workRequests",
2078
+ method: "GET",
2079
+ pathParams: pathParams,
2080
+ headerParams: headerParams,
2081
+ queryParams: queryParams
2082
+ });
2083
+ try {
2084
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
2085
+ const sdkResponse = oci_common_1.composeResponse({
2086
+ responseObject: {},
2087
+ body: yield response.json(),
2088
+ bodyKey: "workRequestSummaryCollection",
2089
+ bodyModel: model.WorkRequestSummaryCollection,
2090
+ type: "model.WorkRequestSummaryCollection",
2091
+ responseHeaders: [
2092
+ {
2093
+ value: response.headers.get("opc-request-id"),
2094
+ key: "opcRequestId",
2095
+ dataType: "string"
2096
+ },
2097
+ {
2098
+ value: response.headers.get("opc-next-page"),
2099
+ key: "opcNextPage",
2100
+ dataType: "string"
2101
+ }
2102
+ ]
2103
+ });
2104
+ return sdkResponse;
2105
+ }
2106
+ catch (err) {
2107
+ throw err;
2108
+ }
2109
+ });
2110
+ }
2111
+ }
2112
+ exports.PrivilegedApiWorkRequestClient = PrivilegedApiWorkRequestClient;
2113
+ PrivilegedApiWorkRequestClient.serviceEndpointTemplate = "https://pactl.{region}.oci.{secondLevelDomain}";
2114
+ PrivilegedApiWorkRequestClient.endpointServiceName = "";
2115
+ //# sourceMappingURL=client.js.map