oci-ocvp 2.118.0 → 2.119.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (221) hide show
  1. package/index.d.ts +6 -0
  2. package/index.js +7 -1
  3. package/index.js.map +1 -1
  4. package/lib/client.d.ts +383 -0
  5. package/lib/client.js +1552 -1
  6. package/lib/client.js.map +1 -1
  7. package/lib/datastore-waiter.d.ts +31 -0
  8. package/lib/datastore-waiter.js +67 -0
  9. package/lib/datastore-waiter.js.map +1 -0
  10. package/lib/datastorecluster-waiter.d.ts +31 -0
  11. package/lib/datastorecluster-waiter.js +67 -0
  12. package/lib/datastorecluster-waiter.js.map +1 -0
  13. package/lib/model/add-block-volume-to-datastore-details.d.ts +27 -0
  14. package/lib/model/add-block-volume-to-datastore-details.js +31 -0
  15. package/lib/model/add-block-volume-to-datastore-details.js.map +1 -0
  16. package/lib/model/add-datastore-to-datastore-cluster-details.d.ts +27 -0
  17. package/lib/model/add-datastore-to-datastore-cluster-details.js +31 -0
  18. package/lib/model/add-datastore-to-datastore-cluster-details.js.map +1 -0
  19. package/lib/model/attach-datastore-cluster-to-cluster-details.d.ts +29 -0
  20. package/lib/model/attach-datastore-cluster-to-cluster-details.js +31 -0
  21. package/lib/model/attach-datastore-cluster-to-cluster-details.js.map +1 -0
  22. package/lib/model/attach-datastore-cluster-to-esxi-host-details.d.ts +29 -0
  23. package/lib/model/attach-datastore-cluster-to-esxi-host-details.js +31 -0
  24. package/lib/model/attach-datastore-cluster-to-esxi-host-details.js.map +1 -0
  25. package/lib/model/block-volume-attachment.d.ts +37 -0
  26. package/lib/model/block-volume-attachment.js +31 -0
  27. package/lib/model/block-volume-attachment.js.map +1 -0
  28. package/lib/model/block-volume-details.d.ts +37 -0
  29. package/lib/model/block-volume-details.js +63 -0
  30. package/lib/model/block-volume-details.js.map +1 -0
  31. package/lib/model/change-datastore-cluster-compartment-details.d.ts +29 -0
  32. package/lib/model/change-datastore-cluster-compartment-details.js +31 -0
  33. package/lib/model/change-datastore-cluster-compartment-details.js.map +1 -0
  34. package/lib/model/change-datastore-compartment-details.d.ts +29 -0
  35. package/lib/model/change-datastore-compartment-details.js +31 -0
  36. package/lib/model/change-datastore-compartment-details.js.map +1 -0
  37. package/lib/model/cluster.d.ts +5 -0
  38. package/lib/model/cluster.js.map +1 -1
  39. package/lib/model/create-cluster-details.d.ts +6 -1
  40. package/lib/model/create-cluster-details.js.map +1 -1
  41. package/lib/model/create-datastore-cluster-details.d.ts +72 -0
  42. package/lib/model/create-datastore-cluster-details.js +31 -0
  43. package/lib/model/create-datastore-cluster-details.js.map +1 -0
  44. package/lib/model/create-datastore-details.d.ts +73 -0
  45. package/lib/model/create-datastore-details.js +31 -0
  46. package/lib/model/create-datastore-details.js.map +1 -0
  47. package/lib/model/create-esxi-host-details.d.ts +1 -1
  48. package/lib/model/datastore-attachment.d.ts +45 -0
  49. package/lib/model/datastore-attachment.js +31 -0
  50. package/lib/model/datastore-attachment.js.map +1 -0
  51. package/lib/model/datastore-cluster-collection.d.ts +28 -0
  52. package/lib/model/datastore-cluster-collection.js +63 -0
  53. package/lib/model/datastore-cluster-collection.js.map +1 -0
  54. package/lib/model/datastore-cluster-summary.d.ts +121 -0
  55. package/lib/model/datastore-cluster-summary.js +31 -0
  56. package/lib/model/datastore-cluster-summary.js.map +1 -0
  57. package/lib/model/datastore-cluster-types.d.ts +6 -1
  58. package/lib/model/datastore-cluster-types.js +5 -0
  59. package/lib/model/datastore-cluster-types.js.map +1 -1
  60. package/lib/model/datastore-cluster.d.ts +128 -0
  61. package/lib/model/datastore-cluster.js +31 -0
  62. package/lib/model/datastore-cluster.js.map +1 -0
  63. package/lib/model/datastore-collection.d.ts +28 -0
  64. package/lib/model/datastore-collection.js +63 -0
  65. package/lib/model/datastore-collection.js.map +1 -0
  66. package/lib/model/datastore-summary.d.ts +124 -0
  67. package/lib/model/datastore-summary.js +63 -0
  68. package/lib/model/datastore-summary.js.map +1 -0
  69. package/lib/model/datastore.d.ts +127 -0
  70. package/lib/model/datastore.js +63 -0
  71. package/lib/model/datastore.js.map +1 -0
  72. package/lib/model/detach-datastore-cluster-from-esxi-host-details.d.ts +29 -0
  73. package/lib/model/detach-datastore-cluster-from-esxi-host-details.js +31 -0
  74. package/lib/model/detach-datastore-cluster-from-esxi-host-details.js.map +1 -0
  75. package/lib/model/esxi-host-summary.d.ts +5 -0
  76. package/lib/model/esxi-host-summary.js.map +1 -1
  77. package/lib/model/esxi-host.d.ts +9 -0
  78. package/lib/model/esxi-host.js +34 -2
  79. package/lib/model/esxi-host.js.map +1 -1
  80. package/lib/model/index.d.ts +42 -0
  81. package/lib/model/index.js +44 -2
  82. package/lib/model/index.js.map +1 -1
  83. package/lib/model/initial-cluster-configuration.d.ts +6 -1
  84. package/lib/model/initial-cluster-configuration.js.map +1 -1
  85. package/lib/model/operation-types.d.ts +6 -0
  86. package/lib/model/operation-types.js +6 -0
  87. package/lib/model/operation-types.js.map +1 -1
  88. package/lib/model/remove-datastore-from-datastore-cluster-details.d.ts +27 -0
  89. package/lib/model/remove-datastore-from-datastore-cluster-details.js +31 -0
  90. package/lib/model/remove-datastore-from-datastore-cluster-details.js.map +1 -0
  91. package/lib/model/supported-host-shape-summary.d.ts +6 -0
  92. package/lib/model/supported-host-shape-summary.js +6 -0
  93. package/lib/model/supported-host-shape-summary.js.map +1 -1
  94. package/lib/model/update-cluster-details.d.ts +1 -1
  95. package/lib/model/update-datastore-cluster-details.d.ts +52 -0
  96. package/lib/model/update-datastore-cluster-details.js +31 -0
  97. package/lib/model/update-datastore-cluster-details.js.map +1 -0
  98. package/lib/model/update-datastore-details.d.ts +52 -0
  99. package/lib/model/update-datastore-details.js +31 -0
  100. package/lib/model/update-datastore-details.js.map +1 -0
  101. package/lib/model/update-esxi-host-details.d.ts +5 -2
  102. package/lib/model/update-esxi-host-details.js.map +1 -1
  103. package/lib/request/add-block-volume-to-datastore-request.d.ts +52 -0
  104. package/lib/request/add-block-volume-to-datastore-request.js +15 -0
  105. package/lib/request/add-block-volume-to-datastore-request.js.map +1 -0
  106. package/lib/request/add-datastore-to-datastore-cluster-request.d.ts +52 -0
  107. package/lib/request/add-datastore-to-datastore-cluster-request.js +15 -0
  108. package/lib/request/add-datastore-to-datastore-cluster-request.js.map +1 -0
  109. package/lib/request/attach-datastore-cluster-to-cluster-request.d.ts +52 -0
  110. package/lib/request/attach-datastore-cluster-to-cluster-request.js +15 -0
  111. package/lib/request/attach-datastore-cluster-to-cluster-request.js.map +1 -0
  112. package/lib/request/attach-datastore-cluster-to-esxi-host-request.d.ts +52 -0
  113. package/lib/request/attach-datastore-cluster-to-esxi-host-request.js +15 -0
  114. package/lib/request/attach-datastore-cluster-to-esxi-host-request.js.map +1 -0
  115. package/lib/request/change-datastore-cluster-compartment-request.d.ts +52 -0
  116. package/lib/request/change-datastore-cluster-compartment-request.js +15 -0
  117. package/lib/request/change-datastore-cluster-compartment-request.js.map +1 -0
  118. package/lib/request/change-datastore-compartment-request.d.ts +52 -0
  119. package/lib/request/change-datastore-compartment-request.js +15 -0
  120. package/lib/request/change-datastore-compartment-request.js.map +1 -0
  121. package/lib/request/create-datastore-cluster-request.d.ts +38 -0
  122. package/lib/request/create-datastore-cluster-request.js +15 -0
  123. package/lib/request/create-datastore-cluster-request.js.map +1 -0
  124. package/lib/request/create-datastore-request.d.ts +38 -0
  125. package/lib/request/create-datastore-request.js +15 -0
  126. package/lib/request/create-datastore-request.js.map +1 -0
  127. package/lib/request/delete-datastore-cluster-request.d.ts +38 -0
  128. package/lib/request/delete-datastore-cluster-request.js +15 -0
  129. package/lib/request/delete-datastore-cluster-request.js.map +1 -0
  130. package/lib/request/delete-datastore-request.d.ts +38 -0
  131. package/lib/request/delete-datastore-request.js +15 -0
  132. package/lib/request/delete-datastore-request.js.map +1 -0
  133. package/lib/request/detach-datastore-cluster-from-cluster-request.d.ts +47 -0
  134. package/lib/request/detach-datastore-cluster-from-cluster-request.js +15 -0
  135. package/lib/request/detach-datastore-cluster-from-cluster-request.js.map +1 -0
  136. package/lib/request/detach-datastore-cluster-from-esxi-host-request.d.ts +52 -0
  137. package/lib/request/detach-datastore-cluster-from-esxi-host-request.js +15 -0
  138. package/lib/request/detach-datastore-cluster-from-esxi-host-request.js.map +1 -0
  139. package/lib/request/get-datastore-cluster-request.d.ts +29 -0
  140. package/lib/request/get-datastore-cluster-request.js +15 -0
  141. package/lib/request/get-datastore-cluster-request.js.map +1 -0
  142. package/lib/request/get-datastore-request.d.ts +29 -0
  143. package/lib/request/get-datastore-request.js +15 -0
  144. package/lib/request/get-datastore-request.js.map +1 -0
  145. package/lib/request/index.d.ts +38 -0
  146. package/lib/request/index.js +5 -1
  147. package/lib/request/index.js.map +1 -1
  148. package/lib/request/list-datastore-clusters-request.d.ts +85 -0
  149. package/lib/request/list-datastore-clusters-request.js +24 -0
  150. package/lib/request/list-datastore-clusters-request.js.map +1 -0
  151. package/lib/request/list-datastores-request.d.ts +85 -0
  152. package/lib/request/list-datastores-request.js +24 -0
  153. package/lib/request/list-datastores-request.js.map +1 -0
  154. package/lib/request/remove-datastore-from-datastore-cluster-request.d.ts +52 -0
  155. package/lib/request/remove-datastore-from-datastore-cluster-request.js +15 -0
  156. package/lib/request/remove-datastore-from-datastore-cluster-request.js.map +1 -0
  157. package/lib/request/update-datastore-cluster-request.d.ts +43 -0
  158. package/lib/request/update-datastore-cluster-request.js +15 -0
  159. package/lib/request/update-datastore-cluster-request.js.map +1 -0
  160. package/lib/request/update-datastore-request.d.ts +43 -0
  161. package/lib/request/update-datastore-request.js +15 -0
  162. package/lib/request/update-datastore-request.js.map +1 -0
  163. package/lib/response/add-block-volume-to-datastore-response.d.ts +25 -0
  164. package/lib/response/add-block-volume-to-datastore-response.js +15 -0
  165. package/lib/response/add-block-volume-to-datastore-response.js.map +1 -0
  166. package/lib/response/add-datastore-to-datastore-cluster-response.d.ts +25 -0
  167. package/lib/response/add-datastore-to-datastore-cluster-response.js +15 -0
  168. package/lib/response/add-datastore-to-datastore-cluster-response.js.map +1 -0
  169. package/lib/response/attach-datastore-cluster-to-cluster-response.d.ts +25 -0
  170. package/lib/response/attach-datastore-cluster-to-cluster-response.js +15 -0
  171. package/lib/response/attach-datastore-cluster-to-cluster-response.js.map +1 -0
  172. package/lib/response/attach-datastore-cluster-to-esxi-host-response.d.ts +25 -0
  173. package/lib/response/attach-datastore-cluster-to-esxi-host-response.js +15 -0
  174. package/lib/response/attach-datastore-cluster-to-esxi-host-response.js.map +1 -0
  175. package/lib/response/change-datastore-cluster-compartment-response.d.ts +20 -0
  176. package/lib/response/change-datastore-cluster-compartment-response.js +15 -0
  177. package/lib/response/change-datastore-cluster-compartment-response.js.map +1 -0
  178. package/lib/response/change-datastore-compartment-response.d.ts +20 -0
  179. package/lib/response/change-datastore-compartment-response.js +15 -0
  180. package/lib/response/change-datastore-compartment-response.js.map +1 -0
  181. package/lib/response/create-datastore-cluster-response.d.ts +25 -0
  182. package/lib/response/create-datastore-cluster-response.js +15 -0
  183. package/lib/response/create-datastore-cluster-response.js.map +1 -0
  184. package/lib/response/create-datastore-response.d.ts +25 -0
  185. package/lib/response/create-datastore-response.js +15 -0
  186. package/lib/response/create-datastore-response.js.map +1 -0
  187. package/lib/response/delete-datastore-cluster-response.d.ts +25 -0
  188. package/lib/response/delete-datastore-cluster-response.js +15 -0
  189. package/lib/response/delete-datastore-cluster-response.js.map +1 -0
  190. package/lib/response/delete-datastore-response.d.ts +25 -0
  191. package/lib/response/delete-datastore-response.js +15 -0
  192. package/lib/response/delete-datastore-response.js.map +1 -0
  193. package/lib/response/detach-datastore-cluster-from-cluster-response.d.ts +25 -0
  194. package/lib/response/detach-datastore-cluster-from-cluster-response.js +15 -0
  195. package/lib/response/detach-datastore-cluster-from-cluster-response.js.map +1 -0
  196. package/lib/response/detach-datastore-cluster-from-esxi-host-response.d.ts +25 -0
  197. package/lib/response/detach-datastore-cluster-from-esxi-host-response.js +15 -0
  198. package/lib/response/detach-datastore-cluster-from-esxi-host-response.js.map +1 -0
  199. package/lib/response/get-datastore-cluster-response.d.ts +30 -0
  200. package/lib/response/get-datastore-cluster-response.js +15 -0
  201. package/lib/response/get-datastore-cluster-response.js.map +1 -0
  202. package/lib/response/get-datastore-response.d.ts +30 -0
  203. package/lib/response/get-datastore-response.js +15 -0
  204. package/lib/response/get-datastore-response.js.map +1 -0
  205. package/lib/response/index.d.ts +38 -0
  206. package/lib/response/list-datastore-clusters-response.d.ts +32 -0
  207. package/lib/response/list-datastore-clusters-response.js +15 -0
  208. package/lib/response/list-datastore-clusters-response.js.map +1 -0
  209. package/lib/response/list-datastores-response.d.ts +32 -0
  210. package/lib/response/list-datastores-response.js +15 -0
  211. package/lib/response/list-datastores-response.js.map +1 -0
  212. package/lib/response/remove-datastore-from-datastore-cluster-response.d.ts +25 -0
  213. package/lib/response/remove-datastore-from-datastore-cluster-response.js +15 -0
  214. package/lib/response/remove-datastore-from-datastore-cluster-response.js.map +1 -0
  215. package/lib/response/update-datastore-cluster-response.d.ts +25 -0
  216. package/lib/response/update-datastore-cluster-response.js +15 -0
  217. package/lib/response/update-datastore-cluster-response.js.map +1 -0
  218. package/lib/response/update-datastore-response.d.ts +25 -0
  219. package/lib/response/update-datastore-response.js +15 -0
  220. package/lib/response/update-datastore-response.js.map +1 -0
  221. package/package.json +3 -3
package/lib/client.js CHANGED
@@ -42,10 +42,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
42
42
  });
43
43
  };
44
44
  Object.defineProperty(exports, "__esModule", { value: true });
45
- exports.WorkRequestClient = exports.WorkRequestApiKeys = exports.SddcClient = exports.SddcApiKeys = exports.EsxiHostClient = exports.EsxiHostApiKeys = exports.ClusterClient = exports.ClusterApiKeys = void 0;
45
+ exports.WorkRequestClient = exports.WorkRequestApiKeys = exports.SddcClient = exports.SddcApiKeys = exports.EsxiHostClient = exports.EsxiHostApiKeys = exports.DatastoreClusterClient = exports.DatastoreClusterApiKeys = exports.DatastoreClient = exports.DatastoreApiKeys = exports.ClusterClient = exports.ClusterApiKeys = void 0;
46
46
  const common = require("oci-common");
47
47
  const model = __importStar(require("./model"));
48
48
  const cluster_waiter_1 = require("./cluster-waiter");
49
+ const datastore_waiter_1 = require("./datastore-waiter");
50
+ const datastorecluster_waiter_1 = require("./datastorecluster-waiter");
49
51
  const esxihost_waiter_1 = require("./esxihost-waiter");
50
52
  const sddc_waiter_1 = require("./sddc-waiter");
51
53
  const workrequest_waiter_1 = require("./workrequest-waiter");
@@ -551,6 +553,1555 @@ class ClusterClient {
551
553
  exports.ClusterClient = ClusterClient;
552
554
  ClusterClient.serviceEndpointTemplate = "https://ocvps.{region}.oci.{secondLevelDomain}";
553
555
  ClusterClient.endpointServiceName = "";
556
+ var DatastoreApiKeys;
557
+ (function (DatastoreApiKeys) {
558
+ })(DatastoreApiKeys = exports.DatastoreApiKeys || (exports.DatastoreApiKeys = {}));
559
+ /**
560
+ * This service client uses {@link common.CircuitBreaker.DefaultConfiguration} for all the operations by default if no circuit breaker configuration is defined by the user.
561
+ */
562
+ class DatastoreClient {
563
+ constructor(params, clientConfiguration) {
564
+ this["_realmSpecificEndpointTemplateEnabled"] = undefined;
565
+ this["_endpoint"] = "";
566
+ this["_defaultHeaders"] = {};
567
+ this._circuitBreaker = null;
568
+ this._httpOptions = undefined;
569
+ this._bodyDuplexMode = undefined;
570
+ this.targetService = "Datastore";
571
+ this._regionId = "";
572
+ this._lastSetRegionOrRegionId = "";
573
+ const requestSigner = params.authenticationDetailsProvider
574
+ ? new common.DefaultRequestSigner(params.authenticationDetailsProvider)
575
+ : null;
576
+ this._authProvider = params.authenticationDetailsProvider;
577
+ if (clientConfiguration) {
578
+ this._clientConfiguration = clientConfiguration;
579
+ this._circuitBreaker = clientConfiguration.circuitBreaker
580
+ ? clientConfiguration.circuitBreaker.circuit
581
+ : null;
582
+ this._httpOptions = clientConfiguration.httpOptions
583
+ ? clientConfiguration.httpOptions
584
+ : undefined;
585
+ this._bodyDuplexMode = clientConfiguration.bodyDuplexMode
586
+ ? clientConfiguration.bodyDuplexMode
587
+ : undefined;
588
+ }
589
+ if (!oci_common_1.developerToolConfiguration.isServiceEnabled("ocvp")) {
590
+ 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 : ";
591
+ throw errmsg.concat("ocvp");
592
+ }
593
+ // if circuit breaker is not created, check if circuit breaker system is enabled to use default circuit breaker
594
+ const specCircuitBreakerEnabled = true;
595
+ if (!this._circuitBreaker &&
596
+ common.utils.isCircuitBreakerSystemEnabled(clientConfiguration) &&
597
+ (specCircuitBreakerEnabled || common.CircuitBreaker.DefaultCircuitBreakerOverriden)) {
598
+ this._circuitBreaker = new common.CircuitBreaker().circuit;
599
+ }
600
+ this._httpClient =
601
+ params.httpClient ||
602
+ new common.FetchHttpClient(requestSigner, this._circuitBreaker, this._httpOptions, this._bodyDuplexMode);
603
+ if (params.authenticationDetailsProvider &&
604
+ common.isRegionProvider(params.authenticationDetailsProvider)) {
605
+ const provider = params.authenticationDetailsProvider;
606
+ if (provider.getRegion()) {
607
+ this.region = provider.getRegion();
608
+ }
609
+ }
610
+ }
611
+ /**
612
+ * Get the endpoint that is being used to call (ex, https://www.example.com).
613
+ */
614
+ get endpoint() {
615
+ return this._endpoint;
616
+ }
617
+ /**
618
+ * Sets the endpoint to call (ex, https://www.example.com).
619
+ * @param endpoint The endpoint of the service.
620
+ */
621
+ set endpoint(endpoint) {
622
+ this._endpoint = endpoint;
623
+ this._endpoint = this._endpoint + "/20230701";
624
+ if (this.logger)
625
+ this.logger.info(`DatastoreClient endpoint set to ${this._endpoint}`);
626
+ }
627
+ get logger() {
628
+ return common.LOG.logger;
629
+ }
630
+ /**
631
+ * Determines whether realm specific endpoint should be used or not.
632
+ * Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false"
633
+ * @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template
634
+ */
635
+ set useRealmSpecificEndpointTemplate(realmSpecificEndpointTemplateEnabled) {
636
+ this._realmSpecificEndpointTemplateEnabled = realmSpecificEndpointTemplateEnabled;
637
+ if (this.logger)
638
+ this.logger.info(`realmSpecificEndpointTemplateEnabled set to ${this._realmSpecificEndpointTemplateEnabled}`);
639
+ if (this._lastSetRegionOrRegionId === common.Region.REGION_STRING) {
640
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegion(DatastoreClient.serviceEndpointTemplate, this._region, DatastoreClient.endpointServiceName);
641
+ }
642
+ else if (this._lastSetRegionOrRegionId === common.Region.REGION_ID_STRING) {
643
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(DatastoreClient.serviceEndpointTemplate, this._regionId, DatastoreClient.endpointServiceName);
644
+ }
645
+ }
646
+ /**
647
+ * Sets the region to call (ex, Region.US_PHOENIX_1).
648
+ * Note, this will call {@link #endpoint(String) endpoint} after resolving the endpoint.
649
+ * @param region The region of the service.
650
+ */
651
+ set region(region) {
652
+ this._region = region;
653
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegion(DatastoreClient.serviceEndpointTemplate, region, DatastoreClient.endpointServiceName);
654
+ this._lastSetRegionOrRegionId = common.Region.REGION_STRING;
655
+ }
656
+ /**
657
+ * Sets the regionId to call (ex, 'us-phoenix-1').
658
+ *
659
+ * Note, this will first try to map the region ID to a known Region and call {@link #region(Region) region}.
660
+ * If no known Region could be determined, it will create an endpoint assuming its in default Realm OC1
661
+ * and then call {@link #endpoint(String) endpoint}.
662
+ * @param regionId The public region ID.
663
+ */
664
+ set regionId(regionId) {
665
+ this._regionId = regionId;
666
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(DatastoreClient.serviceEndpointTemplate, regionId, DatastoreClient.endpointServiceName);
667
+ this._lastSetRegionOrRegionId = common.Region.REGION_ID_STRING;
668
+ }
669
+ /**
670
+ * Creates a new DatastoreWaiter for resources for this service.
671
+ *
672
+ * @param config The waiter configuration for termination and delay strategy
673
+ * @return The service waiters.
674
+ */
675
+ createWaiters(config) {
676
+ this._waiters = new datastore_waiter_1.DatastoreWaiter(this, config);
677
+ return this._waiters;
678
+ }
679
+ /**
680
+ * Gets the waiters available for resources for this service.
681
+ *
682
+ * @return The service waiters.
683
+ */
684
+ getWaiters() {
685
+ if (this._waiters) {
686
+ return this._waiters;
687
+ }
688
+ throw Error("Waiters do not exist. Please create waiters.");
689
+ }
690
+ /**
691
+ * Shutdown the circuit breaker used by the client when it is no longer needed
692
+ */
693
+ shutdownCircuitBreaker() {
694
+ if (this._circuitBreaker) {
695
+ this._circuitBreaker.shutdown();
696
+ }
697
+ }
698
+ /**
699
+ * Close the provider if possible which in turn shuts down any associated circuit breaker
700
+ */
701
+ closeProvider() {
702
+ if (this._authProvider) {
703
+ if (this._authProvider instanceof common.AbstractRequestingAuthenticationDetailsProvider)
704
+ (this._authProvider).closeProvider();
705
+ }
706
+ }
707
+ /**
708
+ * Close the client once it is no longer needed
709
+ */
710
+ close() {
711
+ this.shutdownCircuitBreaker();
712
+ this.closeProvider();
713
+ }
714
+ /**
715
+ * Add the specified Block Volume to the provided Datastore.
716
+ * <p>
717
+ Use the {@link WorkRequest} operations to track the
718
+ * addition of the block volume to the Datastore.
719
+ *
720
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
721
+ * @param AddBlockVolumeToDatastoreRequest
722
+ * @return AddBlockVolumeToDatastoreResponse
723
+ * @throws OciError when an error occurs
724
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/ocvp/AddBlockVolumeToDatastore.ts.html |here} to see how to use AddBlockVolumeToDatastore API.
725
+ */
726
+ addBlockVolumeToDatastore(addBlockVolumeToDatastoreRequest) {
727
+ return __awaiter(this, void 0, void 0, function* () {
728
+ if (this.logger)
729
+ this.logger.debug("Calling operation DatastoreClient#addBlockVolumeToDatastore.");
730
+ const operationName = "addBlockVolumeToDatastore";
731
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/vmware/20230701/Datastore/AddBlockVolumeToDatastore";
732
+ const pathParams = {
733
+ "{datastoreId}": addBlockVolumeToDatastoreRequest.datastoreId
734
+ };
735
+ const queryParams = {};
736
+ let headerParams = {
737
+ "Content-Type": common.Constants.APPLICATION_JSON,
738
+ "if-match": addBlockVolumeToDatastoreRequest.ifMatch,
739
+ "opc-retry-token": addBlockVolumeToDatastoreRequest.opcRetryToken,
740
+ "opc-request-id": addBlockVolumeToDatastoreRequest.opcRequestId
741
+ };
742
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
743
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, addBlockVolumeToDatastoreRequest.retryConfiguration, specRetryConfiguration);
744
+ if (this.logger)
745
+ retrier.logger = this.logger;
746
+ const request = yield oci_common_1.composeRequest({
747
+ baseEndpoint: this._endpoint,
748
+ defaultHeaders: this._defaultHeaders,
749
+ path: "/datastores/{datastoreId}/actions/addBlockVolume",
750
+ method: "POST",
751
+ bodyContent: common.ObjectSerializer.serialize(addBlockVolumeToDatastoreRequest.addBlockVolumeToDatastoreDetails, "AddBlockVolumeToDatastoreDetails", model.AddBlockVolumeToDatastoreDetails.getJsonObj),
752
+ pathParams: pathParams,
753
+ headerParams: headerParams,
754
+ queryParams: queryParams
755
+ });
756
+ try {
757
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
758
+ const sdkResponse = oci_common_1.composeResponse({
759
+ responseObject: {},
760
+ responseHeaders: [
761
+ {
762
+ value: response.headers.get("opc-work-request-id"),
763
+ key: "opcWorkRequestId",
764
+ dataType: "string"
765
+ },
766
+ {
767
+ value: response.headers.get("opc-request-id"),
768
+ key: "opcRequestId",
769
+ dataType: "string"
770
+ }
771
+ ]
772
+ });
773
+ return sdkResponse;
774
+ }
775
+ catch (err) {
776
+ throw err;
777
+ }
778
+ });
779
+ }
780
+ /**
781
+ * Moves an Datastore into a different compartment within the same tenancy. For information
782
+ * about moving resources between compartments, see
783
+ * [Moving Resources to a Different Compartment](https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).
784
+ *
785
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
786
+ * @param ChangeDatastoreCompartmentRequest
787
+ * @return ChangeDatastoreCompartmentResponse
788
+ * @throws OciError when an error occurs
789
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/ocvp/ChangeDatastoreCompartment.ts.html |here} to see how to use ChangeDatastoreCompartment API.
790
+ */
791
+ changeDatastoreCompartment(changeDatastoreCompartmentRequest) {
792
+ return __awaiter(this, void 0, void 0, function* () {
793
+ if (this.logger)
794
+ this.logger.debug("Calling operation DatastoreClient#changeDatastoreCompartment.");
795
+ const operationName = "changeDatastoreCompartment";
796
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/vmware/20230701/Datastore/ChangeDatastoreCompartment";
797
+ const pathParams = {
798
+ "{datastoreId}": changeDatastoreCompartmentRequest.datastoreId
799
+ };
800
+ const queryParams = {};
801
+ let headerParams = {
802
+ "Content-Type": common.Constants.APPLICATION_JSON,
803
+ "if-match": changeDatastoreCompartmentRequest.ifMatch,
804
+ "opc-request-id": changeDatastoreCompartmentRequest.opcRequestId,
805
+ "opc-retry-token": changeDatastoreCompartmentRequest.opcRetryToken
806
+ };
807
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
808
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, changeDatastoreCompartmentRequest.retryConfiguration, specRetryConfiguration);
809
+ if (this.logger)
810
+ retrier.logger = this.logger;
811
+ const request = yield oci_common_1.composeRequest({
812
+ baseEndpoint: this._endpoint,
813
+ defaultHeaders: this._defaultHeaders,
814
+ path: "/datastores/{datastoreId}/actions/changeCompartment",
815
+ method: "POST",
816
+ bodyContent: common.ObjectSerializer.serialize(changeDatastoreCompartmentRequest.changeDatastoreCompartmentDetails, "ChangeDatastoreCompartmentDetails", model.ChangeDatastoreCompartmentDetails.getJsonObj),
817
+ pathParams: pathParams,
818
+ headerParams: headerParams,
819
+ queryParams: queryParams
820
+ });
821
+ try {
822
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
823
+ const sdkResponse = oci_common_1.composeResponse({
824
+ responseObject: {},
825
+ responseHeaders: [
826
+ {
827
+ value: response.headers.get("opc-request-id"),
828
+ key: "opcRequestId",
829
+ dataType: "string"
830
+ }
831
+ ]
832
+ });
833
+ return sdkResponse;
834
+ }
835
+ catch (err) {
836
+ throw err;
837
+ }
838
+ });
839
+ }
840
+ /**
841
+ * Creates a Oracle Cloud VMware Solution Datastore.
842
+ * <p>
843
+ Use the {@link WorkRequest} operations to track the
844
+ * creation of the Datastore.
845
+ *
846
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
847
+ * @param CreateDatastoreRequest
848
+ * @return CreateDatastoreResponse
849
+ * @throws OciError when an error occurs
850
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/ocvp/CreateDatastore.ts.html |here} to see how to use CreateDatastore API.
851
+ */
852
+ createDatastore(createDatastoreRequest) {
853
+ return __awaiter(this, void 0, void 0, function* () {
854
+ if (this.logger)
855
+ this.logger.debug("Calling operation DatastoreClient#createDatastore.");
856
+ const operationName = "createDatastore";
857
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/vmware/20230701/Datastore/CreateDatastore";
858
+ const pathParams = {};
859
+ const queryParams = {};
860
+ let headerParams = {
861
+ "Content-Type": common.Constants.APPLICATION_JSON,
862
+ "opc-retry-token": createDatastoreRequest.opcRetryToken,
863
+ "opc-request-id": createDatastoreRequest.opcRequestId
864
+ };
865
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
866
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, createDatastoreRequest.retryConfiguration, specRetryConfiguration);
867
+ if (this.logger)
868
+ retrier.logger = this.logger;
869
+ const request = yield oci_common_1.composeRequest({
870
+ baseEndpoint: this._endpoint,
871
+ defaultHeaders: this._defaultHeaders,
872
+ path: "/datastores",
873
+ method: "POST",
874
+ bodyContent: common.ObjectSerializer.serialize(createDatastoreRequest.createDatastoreDetails, "CreateDatastoreDetails", model.CreateDatastoreDetails.getJsonObj),
875
+ pathParams: pathParams,
876
+ headerParams: headerParams,
877
+ queryParams: queryParams
878
+ });
879
+ try {
880
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
881
+ const sdkResponse = oci_common_1.composeResponse({
882
+ responseObject: {},
883
+ responseHeaders: [
884
+ {
885
+ value: response.headers.get("opc-work-request-id"),
886
+ key: "opcWorkRequestId",
887
+ dataType: "string"
888
+ },
889
+ {
890
+ value: response.headers.get("opc-request-id"),
891
+ key: "opcRequestId",
892
+ dataType: "string"
893
+ }
894
+ ]
895
+ });
896
+ return sdkResponse;
897
+ }
898
+ catch (err) {
899
+ throw err;
900
+ }
901
+ });
902
+ }
903
+ /**
904
+ * Deletes the specified Datastore.
905
+ * <p>
906
+ Use the {@link WorkRequest} operations to track the
907
+ * deletion of the Datastore.
908
+ *
909
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
910
+ * @param DeleteDatastoreRequest
911
+ * @return DeleteDatastoreResponse
912
+ * @throws OciError when an error occurs
913
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/ocvp/DeleteDatastore.ts.html |here} to see how to use DeleteDatastore API.
914
+ */
915
+ deleteDatastore(deleteDatastoreRequest) {
916
+ return __awaiter(this, void 0, void 0, function* () {
917
+ if (this.logger)
918
+ this.logger.debug("Calling operation DatastoreClient#deleteDatastore.");
919
+ const operationName = "deleteDatastore";
920
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/vmware/20230701/Datastore/DeleteDatastore";
921
+ const pathParams = {
922
+ "{datastoreId}": deleteDatastoreRequest.datastoreId
923
+ };
924
+ const queryParams = {};
925
+ let headerParams = {
926
+ "Content-Type": common.Constants.APPLICATION_JSON,
927
+ "if-match": deleteDatastoreRequest.ifMatch,
928
+ "opc-request-id": deleteDatastoreRequest.opcRequestId
929
+ };
930
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
931
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, deleteDatastoreRequest.retryConfiguration, specRetryConfiguration);
932
+ if (this.logger)
933
+ retrier.logger = this.logger;
934
+ const request = yield oci_common_1.composeRequest({
935
+ baseEndpoint: this._endpoint,
936
+ defaultHeaders: this._defaultHeaders,
937
+ path: "/datastores/{datastoreId}",
938
+ method: "DELETE",
939
+ pathParams: pathParams,
940
+ headerParams: headerParams,
941
+ queryParams: queryParams
942
+ });
943
+ try {
944
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
945
+ const sdkResponse = oci_common_1.composeResponse({
946
+ responseObject: {},
947
+ responseHeaders: [
948
+ {
949
+ value: response.headers.get("opc-work-request-id"),
950
+ key: "opcWorkRequestId",
951
+ dataType: "string"
952
+ },
953
+ {
954
+ value: response.headers.get("opc-request-id"),
955
+ key: "opcRequestId",
956
+ dataType: "string"
957
+ }
958
+ ]
959
+ });
960
+ return sdkResponse;
961
+ }
962
+ catch (err) {
963
+ throw err;
964
+ }
965
+ });
966
+ }
967
+ /**
968
+ * Get the specified Datastore's information.
969
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
970
+ * @param GetDatastoreRequest
971
+ * @return GetDatastoreResponse
972
+ * @throws OciError when an error occurs
973
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/ocvp/GetDatastore.ts.html |here} to see how to use GetDatastore API.
974
+ */
975
+ getDatastore(getDatastoreRequest) {
976
+ return __awaiter(this, void 0, void 0, function* () {
977
+ if (this.logger)
978
+ this.logger.debug("Calling operation DatastoreClient#getDatastore.");
979
+ const operationName = "getDatastore";
980
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/vmware/20230701/Datastore/GetDatastore";
981
+ const pathParams = {
982
+ "{datastoreId}": getDatastoreRequest.datastoreId
983
+ };
984
+ const queryParams = {};
985
+ let headerParams = {
986
+ "Content-Type": common.Constants.APPLICATION_JSON,
987
+ "opc-request-id": getDatastoreRequest.opcRequestId
988
+ };
989
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
990
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getDatastoreRequest.retryConfiguration, specRetryConfiguration);
991
+ if (this.logger)
992
+ retrier.logger = this.logger;
993
+ const request = yield oci_common_1.composeRequest({
994
+ baseEndpoint: this._endpoint,
995
+ defaultHeaders: this._defaultHeaders,
996
+ path: "/datastores/{datastoreId}",
997
+ method: "GET",
998
+ pathParams: pathParams,
999
+ headerParams: headerParams,
1000
+ queryParams: queryParams
1001
+ });
1002
+ try {
1003
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1004
+ const sdkResponse = oci_common_1.composeResponse({
1005
+ responseObject: {},
1006
+ body: yield response.json(),
1007
+ bodyKey: "datastore",
1008
+ bodyModel: model.Datastore,
1009
+ type: "model.Datastore",
1010
+ responseHeaders: [
1011
+ {
1012
+ value: response.headers.get("etag"),
1013
+ key: "etag",
1014
+ dataType: "string"
1015
+ },
1016
+ {
1017
+ value: response.headers.get("opc-request-id"),
1018
+ key: "opcRequestId",
1019
+ dataType: "string"
1020
+ }
1021
+ ]
1022
+ });
1023
+ return sdkResponse;
1024
+ }
1025
+ catch (err) {
1026
+ throw err;
1027
+ }
1028
+ });
1029
+ }
1030
+ /**
1031
+ * List the Datastores in the specified compartment. The list can be filtered
1032
+ * by compartment, datastore id, display name and lifecycle state.
1033
+ *
1034
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
1035
+ * @param ListDatastoresRequest
1036
+ * @return ListDatastoresResponse
1037
+ * @throws OciError when an error occurs
1038
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/ocvp/ListDatastores.ts.html |here} to see how to use ListDatastores API.
1039
+ */
1040
+ listDatastores(listDatastoresRequest) {
1041
+ return __awaiter(this, void 0, void 0, function* () {
1042
+ if (this.logger)
1043
+ this.logger.debug("Calling operation DatastoreClient#listDatastores.");
1044
+ const operationName = "listDatastores";
1045
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/vmware/20230701/Datastore/ListDatastores";
1046
+ const pathParams = {};
1047
+ const queryParams = {
1048
+ "compartmentId": listDatastoresRequest.compartmentId,
1049
+ "displayName": listDatastoresRequest.displayName,
1050
+ "clusterId": listDatastoresRequest.clusterId,
1051
+ "datastoreId": listDatastoresRequest.datastoreId,
1052
+ "limit": listDatastoresRequest.limit,
1053
+ "page": listDatastoresRequest.page,
1054
+ "sortOrder": listDatastoresRequest.sortOrder,
1055
+ "sortBy": listDatastoresRequest.sortBy,
1056
+ "lifecycleState": listDatastoresRequest.lifecycleState
1057
+ };
1058
+ let headerParams = {
1059
+ "Content-Type": common.Constants.APPLICATION_JSON,
1060
+ "opc-request-id": listDatastoresRequest.opcRequestId
1061
+ };
1062
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
1063
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listDatastoresRequest.retryConfiguration, specRetryConfiguration);
1064
+ if (this.logger)
1065
+ retrier.logger = this.logger;
1066
+ const request = yield oci_common_1.composeRequest({
1067
+ baseEndpoint: this._endpoint,
1068
+ defaultHeaders: this._defaultHeaders,
1069
+ path: "/datastores",
1070
+ method: "GET",
1071
+ pathParams: pathParams,
1072
+ headerParams: headerParams,
1073
+ queryParams: queryParams
1074
+ });
1075
+ try {
1076
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1077
+ const sdkResponse = oci_common_1.composeResponse({
1078
+ responseObject: {},
1079
+ body: yield response.json(),
1080
+ bodyKey: "datastoreCollection",
1081
+ bodyModel: model.DatastoreCollection,
1082
+ type: "model.DatastoreCollection",
1083
+ responseHeaders: [
1084
+ {
1085
+ value: response.headers.get("opc-request-id"),
1086
+ key: "opcRequestId",
1087
+ dataType: "string"
1088
+ },
1089
+ {
1090
+ value: response.headers.get("opc-next-page"),
1091
+ key: "opcNextPage",
1092
+ dataType: "string"
1093
+ }
1094
+ ]
1095
+ });
1096
+ return sdkResponse;
1097
+ }
1098
+ catch (err) {
1099
+ throw err;
1100
+ }
1101
+ });
1102
+ }
1103
+ /**
1104
+ * Updates the specified Datastore.
1105
+ * <p>
1106
+ **Important:** Updating a Datastore affects only certain attributes in the `Datastore`
1107
+ * object and does not affect the VMware environment currently running.
1108
+ *
1109
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
1110
+ * @param UpdateDatastoreRequest
1111
+ * @return UpdateDatastoreResponse
1112
+ * @throws OciError when an error occurs
1113
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/ocvp/UpdateDatastore.ts.html |here} to see how to use UpdateDatastore API.
1114
+ */
1115
+ updateDatastore(updateDatastoreRequest) {
1116
+ return __awaiter(this, void 0, void 0, function* () {
1117
+ if (this.logger)
1118
+ this.logger.debug("Calling operation DatastoreClient#updateDatastore.");
1119
+ const operationName = "updateDatastore";
1120
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/vmware/20230701/Datastore/UpdateDatastore";
1121
+ const pathParams = {
1122
+ "{datastoreId}": updateDatastoreRequest.datastoreId
1123
+ };
1124
+ const queryParams = {};
1125
+ let headerParams = {
1126
+ "Content-Type": common.Constants.APPLICATION_JSON,
1127
+ "if-match": updateDatastoreRequest.ifMatch,
1128
+ "opc-request-id": updateDatastoreRequest.opcRequestId
1129
+ };
1130
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
1131
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, updateDatastoreRequest.retryConfiguration, specRetryConfiguration);
1132
+ if (this.logger)
1133
+ retrier.logger = this.logger;
1134
+ const request = yield oci_common_1.composeRequest({
1135
+ baseEndpoint: this._endpoint,
1136
+ defaultHeaders: this._defaultHeaders,
1137
+ path: "/datastores/{datastoreId}",
1138
+ method: "PUT",
1139
+ bodyContent: common.ObjectSerializer.serialize(updateDatastoreRequest.updateDatastoreDetails, "UpdateDatastoreDetails", model.UpdateDatastoreDetails.getJsonObj),
1140
+ pathParams: pathParams,
1141
+ headerParams: headerParams,
1142
+ queryParams: queryParams
1143
+ });
1144
+ try {
1145
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1146
+ const sdkResponse = oci_common_1.composeResponse({
1147
+ responseObject: {},
1148
+ responseHeaders: [
1149
+ {
1150
+ value: response.headers.get("opc-work-request-id"),
1151
+ key: "opcWorkRequestId",
1152
+ dataType: "string"
1153
+ },
1154
+ {
1155
+ value: response.headers.get("opc-request-id"),
1156
+ key: "opcRequestId",
1157
+ dataType: "string"
1158
+ }
1159
+ ]
1160
+ });
1161
+ return sdkResponse;
1162
+ }
1163
+ catch (err) {
1164
+ throw err;
1165
+ }
1166
+ });
1167
+ }
1168
+ }
1169
+ exports.DatastoreClient = DatastoreClient;
1170
+ DatastoreClient.serviceEndpointTemplate = "https://ocvps.{region}.oci.{secondLevelDomain}";
1171
+ DatastoreClient.endpointServiceName = "";
1172
+ var DatastoreClusterApiKeys;
1173
+ (function (DatastoreClusterApiKeys) {
1174
+ })(DatastoreClusterApiKeys = exports.DatastoreClusterApiKeys || (exports.DatastoreClusterApiKeys = {}));
1175
+ /**
1176
+ * This service client uses {@link common.CircuitBreaker.DefaultConfiguration} for all the operations by default if no circuit breaker configuration is defined by the user.
1177
+ */
1178
+ class DatastoreClusterClient {
1179
+ constructor(params, clientConfiguration) {
1180
+ this["_realmSpecificEndpointTemplateEnabled"] = undefined;
1181
+ this["_endpoint"] = "";
1182
+ this["_defaultHeaders"] = {};
1183
+ this._circuitBreaker = null;
1184
+ this._httpOptions = undefined;
1185
+ this._bodyDuplexMode = undefined;
1186
+ this.targetService = "DatastoreCluster";
1187
+ this._regionId = "";
1188
+ this._lastSetRegionOrRegionId = "";
1189
+ const requestSigner = params.authenticationDetailsProvider
1190
+ ? new common.DefaultRequestSigner(params.authenticationDetailsProvider)
1191
+ : null;
1192
+ this._authProvider = params.authenticationDetailsProvider;
1193
+ if (clientConfiguration) {
1194
+ this._clientConfiguration = clientConfiguration;
1195
+ this._circuitBreaker = clientConfiguration.circuitBreaker
1196
+ ? clientConfiguration.circuitBreaker.circuit
1197
+ : null;
1198
+ this._httpOptions = clientConfiguration.httpOptions
1199
+ ? clientConfiguration.httpOptions
1200
+ : undefined;
1201
+ this._bodyDuplexMode = clientConfiguration.bodyDuplexMode
1202
+ ? clientConfiguration.bodyDuplexMode
1203
+ : undefined;
1204
+ }
1205
+ if (!oci_common_1.developerToolConfiguration.isServiceEnabled("ocvp")) {
1206
+ 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 : ";
1207
+ throw errmsg.concat("ocvp");
1208
+ }
1209
+ // if circuit breaker is not created, check if circuit breaker system is enabled to use default circuit breaker
1210
+ const specCircuitBreakerEnabled = true;
1211
+ if (!this._circuitBreaker &&
1212
+ common.utils.isCircuitBreakerSystemEnabled(clientConfiguration) &&
1213
+ (specCircuitBreakerEnabled || common.CircuitBreaker.DefaultCircuitBreakerOverriden)) {
1214
+ this._circuitBreaker = new common.CircuitBreaker().circuit;
1215
+ }
1216
+ this._httpClient =
1217
+ params.httpClient ||
1218
+ new common.FetchHttpClient(requestSigner, this._circuitBreaker, this._httpOptions, this._bodyDuplexMode);
1219
+ if (params.authenticationDetailsProvider &&
1220
+ common.isRegionProvider(params.authenticationDetailsProvider)) {
1221
+ const provider = params.authenticationDetailsProvider;
1222
+ if (provider.getRegion()) {
1223
+ this.region = provider.getRegion();
1224
+ }
1225
+ }
1226
+ }
1227
+ /**
1228
+ * Get the endpoint that is being used to call (ex, https://www.example.com).
1229
+ */
1230
+ get endpoint() {
1231
+ return this._endpoint;
1232
+ }
1233
+ /**
1234
+ * Sets the endpoint to call (ex, https://www.example.com).
1235
+ * @param endpoint The endpoint of the service.
1236
+ */
1237
+ set endpoint(endpoint) {
1238
+ this._endpoint = endpoint;
1239
+ this._endpoint = this._endpoint + "/20230701";
1240
+ if (this.logger)
1241
+ this.logger.info(`DatastoreClusterClient endpoint set to ${this._endpoint}`);
1242
+ }
1243
+ get logger() {
1244
+ return common.LOG.logger;
1245
+ }
1246
+ /**
1247
+ * Determines whether realm specific endpoint should be used or not.
1248
+ * Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false"
1249
+ * @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template
1250
+ */
1251
+ set useRealmSpecificEndpointTemplate(realmSpecificEndpointTemplateEnabled) {
1252
+ this._realmSpecificEndpointTemplateEnabled = realmSpecificEndpointTemplateEnabled;
1253
+ if (this.logger)
1254
+ this.logger.info(`realmSpecificEndpointTemplateEnabled set to ${this._realmSpecificEndpointTemplateEnabled}`);
1255
+ if (this._lastSetRegionOrRegionId === common.Region.REGION_STRING) {
1256
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegion(DatastoreClusterClient.serviceEndpointTemplate, this._region, DatastoreClusterClient.endpointServiceName);
1257
+ }
1258
+ else if (this._lastSetRegionOrRegionId === common.Region.REGION_ID_STRING) {
1259
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(DatastoreClusterClient.serviceEndpointTemplate, this._regionId, DatastoreClusterClient.endpointServiceName);
1260
+ }
1261
+ }
1262
+ /**
1263
+ * Sets the region to call (ex, Region.US_PHOENIX_1).
1264
+ * Note, this will call {@link #endpoint(String) endpoint} after resolving the endpoint.
1265
+ * @param region The region of the service.
1266
+ */
1267
+ set region(region) {
1268
+ this._region = region;
1269
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegion(DatastoreClusterClient.serviceEndpointTemplate, region, DatastoreClusterClient.endpointServiceName);
1270
+ this._lastSetRegionOrRegionId = common.Region.REGION_STRING;
1271
+ }
1272
+ /**
1273
+ * Sets the regionId to call (ex, 'us-phoenix-1').
1274
+ *
1275
+ * Note, this will first try to map the region ID to a known Region and call {@link #region(Region) region}.
1276
+ * If no known Region could be determined, it will create an endpoint assuming its in default Realm OC1
1277
+ * and then call {@link #endpoint(String) endpoint}.
1278
+ * @param regionId The public region ID.
1279
+ */
1280
+ set regionId(regionId) {
1281
+ this._regionId = regionId;
1282
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(DatastoreClusterClient.serviceEndpointTemplate, regionId, DatastoreClusterClient.endpointServiceName);
1283
+ this._lastSetRegionOrRegionId = common.Region.REGION_ID_STRING;
1284
+ }
1285
+ /**
1286
+ * Creates a new DatastoreClusterWaiter for resources for this service.
1287
+ *
1288
+ * @param config The waiter configuration for termination and delay strategy
1289
+ * @return The service waiters.
1290
+ */
1291
+ createWaiters(config) {
1292
+ this._waiters = new datastorecluster_waiter_1.DatastoreClusterWaiter(this, config);
1293
+ return this._waiters;
1294
+ }
1295
+ /**
1296
+ * Gets the waiters available for resources for this service.
1297
+ *
1298
+ * @return The service waiters.
1299
+ */
1300
+ getWaiters() {
1301
+ if (this._waiters) {
1302
+ return this._waiters;
1303
+ }
1304
+ throw Error("Waiters do not exist. Please create waiters.");
1305
+ }
1306
+ /**
1307
+ * Shutdown the circuit breaker used by the client when it is no longer needed
1308
+ */
1309
+ shutdownCircuitBreaker() {
1310
+ if (this._circuitBreaker) {
1311
+ this._circuitBreaker.shutdown();
1312
+ }
1313
+ }
1314
+ /**
1315
+ * Close the provider if possible which in turn shuts down any associated circuit breaker
1316
+ */
1317
+ closeProvider() {
1318
+ if (this._authProvider) {
1319
+ if (this._authProvider instanceof common.AbstractRequestingAuthenticationDetailsProvider)
1320
+ (this._authProvider).closeProvider();
1321
+ }
1322
+ }
1323
+ /**
1324
+ * Close the client once it is no longer needed
1325
+ */
1326
+ close() {
1327
+ this.shutdownCircuitBreaker();
1328
+ this.closeProvider();
1329
+ }
1330
+ /**
1331
+ * Add the specified Datastore to the provided Datastore Cluster.
1332
+ *
1333
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
1334
+ * @param AddDatastoreToDatastoreClusterRequest
1335
+ * @return AddDatastoreToDatastoreClusterResponse
1336
+ * @throws OciError when an error occurs
1337
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/ocvp/AddDatastoreToDatastoreCluster.ts.html |here} to see how to use AddDatastoreToDatastoreCluster API.
1338
+ */
1339
+ addDatastoreToDatastoreCluster(addDatastoreToDatastoreClusterRequest) {
1340
+ return __awaiter(this, void 0, void 0, function* () {
1341
+ if (this.logger)
1342
+ this.logger.debug("Calling operation DatastoreClusterClient#addDatastoreToDatastoreCluster.");
1343
+ const operationName = "addDatastoreToDatastoreCluster";
1344
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/vmware/20230701/DatastoreCluster/AddDatastoreToDatastoreCluster";
1345
+ const pathParams = {
1346
+ "{datastoreClusterId}": addDatastoreToDatastoreClusterRequest.datastoreClusterId
1347
+ };
1348
+ const queryParams = {};
1349
+ let headerParams = {
1350
+ "Content-Type": common.Constants.APPLICATION_JSON,
1351
+ "if-match": addDatastoreToDatastoreClusterRequest.ifMatch,
1352
+ "opc-retry-token": addDatastoreToDatastoreClusterRequest.opcRetryToken,
1353
+ "opc-request-id": addDatastoreToDatastoreClusterRequest.opcRequestId
1354
+ };
1355
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
1356
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, addDatastoreToDatastoreClusterRequest.retryConfiguration, specRetryConfiguration);
1357
+ if (this.logger)
1358
+ retrier.logger = this.logger;
1359
+ const request = yield oci_common_1.composeRequest({
1360
+ baseEndpoint: this._endpoint,
1361
+ defaultHeaders: this._defaultHeaders,
1362
+ path: "/datastoreClusters/{datastoreClusterId}/actions/addDatastore",
1363
+ method: "POST",
1364
+ bodyContent: common.ObjectSerializer.serialize(addDatastoreToDatastoreClusterRequest.addDatastoreToDatastoreClusterDetails, "AddDatastoreToDatastoreClusterDetails", model.AddDatastoreToDatastoreClusterDetails.getJsonObj),
1365
+ pathParams: pathParams,
1366
+ headerParams: headerParams,
1367
+ queryParams: queryParams
1368
+ });
1369
+ try {
1370
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1371
+ const sdkResponse = oci_common_1.composeResponse({
1372
+ responseObject: {},
1373
+ responseHeaders: [
1374
+ {
1375
+ value: response.headers.get("opc-work-request-id"),
1376
+ key: "opcWorkRequestId",
1377
+ dataType: "string"
1378
+ },
1379
+ {
1380
+ value: response.headers.get("opc-request-id"),
1381
+ key: "opcRequestId",
1382
+ dataType: "string"
1383
+ }
1384
+ ]
1385
+ });
1386
+ return sdkResponse;
1387
+ }
1388
+ catch (err) {
1389
+ throw err;
1390
+ }
1391
+ });
1392
+ }
1393
+ /**
1394
+ * Attach the specified Datastore Cluster to the provided Vmware Cluster.
1395
+ * <p>
1396
+ Use the {@link WorkRequest} operations to track the
1397
+ * attachment of the Datastore.
1398
+ *
1399
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
1400
+ * @param AttachDatastoreClusterToClusterRequest
1401
+ * @return AttachDatastoreClusterToClusterResponse
1402
+ * @throws OciError when an error occurs
1403
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/ocvp/AttachDatastoreClusterToCluster.ts.html |here} to see how to use AttachDatastoreClusterToCluster API.
1404
+ */
1405
+ attachDatastoreClusterToCluster(attachDatastoreClusterToClusterRequest) {
1406
+ return __awaiter(this, void 0, void 0, function* () {
1407
+ if (this.logger)
1408
+ this.logger.debug("Calling operation DatastoreClusterClient#attachDatastoreClusterToCluster.");
1409
+ const operationName = "attachDatastoreClusterToCluster";
1410
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/vmware/20230701/DatastoreCluster/AttachDatastoreClusterToCluster";
1411
+ const pathParams = {
1412
+ "{datastoreClusterId}": attachDatastoreClusterToClusterRequest.datastoreClusterId
1413
+ };
1414
+ const queryParams = {};
1415
+ let headerParams = {
1416
+ "Content-Type": common.Constants.APPLICATION_JSON,
1417
+ "if-match": attachDatastoreClusterToClusterRequest.ifMatch,
1418
+ "opc-retry-token": attachDatastoreClusterToClusterRequest.opcRetryToken,
1419
+ "opc-request-id": attachDatastoreClusterToClusterRequest.opcRequestId
1420
+ };
1421
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
1422
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, attachDatastoreClusterToClusterRequest.retryConfiguration, specRetryConfiguration);
1423
+ if (this.logger)
1424
+ retrier.logger = this.logger;
1425
+ const request = yield oci_common_1.composeRequest({
1426
+ baseEndpoint: this._endpoint,
1427
+ defaultHeaders: this._defaultHeaders,
1428
+ path: "/datastoreClusters/{datastoreClusterId}/actions/attachToCluster",
1429
+ method: "POST",
1430
+ bodyContent: common.ObjectSerializer.serialize(attachDatastoreClusterToClusterRequest.attachDatastoreClusterToClusterDetails, "AttachDatastoreClusterToClusterDetails", model.AttachDatastoreClusterToClusterDetails.getJsonObj),
1431
+ pathParams: pathParams,
1432
+ headerParams: headerParams,
1433
+ queryParams: queryParams
1434
+ });
1435
+ try {
1436
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1437
+ const sdkResponse = oci_common_1.composeResponse({
1438
+ responseObject: {},
1439
+ responseHeaders: [
1440
+ {
1441
+ value: response.headers.get("opc-work-request-id"),
1442
+ key: "opcWorkRequestId",
1443
+ dataType: "string"
1444
+ },
1445
+ {
1446
+ value: response.headers.get("opc-request-id"),
1447
+ key: "opcRequestId",
1448
+ dataType: "string"
1449
+ }
1450
+ ]
1451
+ });
1452
+ return sdkResponse;
1453
+ }
1454
+ catch (err) {
1455
+ throw err;
1456
+ }
1457
+ });
1458
+ }
1459
+ /**
1460
+ * Attach the specified Datastore Cluster to the provided ESXi Hosts.
1461
+ * <p>
1462
+ Use the {@link WorkRequest} operations to track the
1463
+ * attachment of the Datastore.
1464
+ *
1465
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
1466
+ * @param AttachDatastoreClusterToEsxiHostRequest
1467
+ * @return AttachDatastoreClusterToEsxiHostResponse
1468
+ * @throws OciError when an error occurs
1469
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/ocvp/AttachDatastoreClusterToEsxiHost.ts.html |here} to see how to use AttachDatastoreClusterToEsxiHost API.
1470
+ */
1471
+ attachDatastoreClusterToEsxiHost(attachDatastoreClusterToEsxiHostRequest) {
1472
+ return __awaiter(this, void 0, void 0, function* () {
1473
+ if (this.logger)
1474
+ this.logger.debug("Calling operation DatastoreClusterClient#attachDatastoreClusterToEsxiHost.");
1475
+ const operationName = "attachDatastoreClusterToEsxiHost";
1476
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/vmware/20230701/DatastoreCluster/AttachDatastoreClusterToEsxiHost";
1477
+ const pathParams = {
1478
+ "{datastoreClusterId}": attachDatastoreClusterToEsxiHostRequest.datastoreClusterId
1479
+ };
1480
+ const queryParams = {};
1481
+ let headerParams = {
1482
+ "Content-Type": common.Constants.APPLICATION_JSON,
1483
+ "if-match": attachDatastoreClusterToEsxiHostRequest.ifMatch,
1484
+ "opc-retry-token": attachDatastoreClusterToEsxiHostRequest.opcRetryToken,
1485
+ "opc-request-id": attachDatastoreClusterToEsxiHostRequest.opcRequestId
1486
+ };
1487
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
1488
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, attachDatastoreClusterToEsxiHostRequest.retryConfiguration, specRetryConfiguration);
1489
+ if (this.logger)
1490
+ retrier.logger = this.logger;
1491
+ const request = yield oci_common_1.composeRequest({
1492
+ baseEndpoint: this._endpoint,
1493
+ defaultHeaders: this._defaultHeaders,
1494
+ path: "/datastoreClusters/{datastoreClusterId}/actions/attachToEsxiHost",
1495
+ method: "POST",
1496
+ bodyContent: common.ObjectSerializer.serialize(attachDatastoreClusterToEsxiHostRequest.attachDatastoreClusterToEsxiHostDetails, "AttachDatastoreClusterToEsxiHostDetails", model.AttachDatastoreClusterToEsxiHostDetails.getJsonObj),
1497
+ pathParams: pathParams,
1498
+ headerParams: headerParams,
1499
+ queryParams: queryParams
1500
+ });
1501
+ try {
1502
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1503
+ const sdkResponse = oci_common_1.composeResponse({
1504
+ responseObject: {},
1505
+ responseHeaders: [
1506
+ {
1507
+ value: response.headers.get("opc-work-request-id"),
1508
+ key: "opcWorkRequestId",
1509
+ dataType: "string"
1510
+ },
1511
+ {
1512
+ value: response.headers.get("opc-request-id"),
1513
+ key: "opcRequestId",
1514
+ dataType: "string"
1515
+ }
1516
+ ]
1517
+ });
1518
+ return sdkResponse;
1519
+ }
1520
+ catch (err) {
1521
+ throw err;
1522
+ }
1523
+ });
1524
+ }
1525
+ /**
1526
+ * Moves an Datastore Cluster into a different compartment within the same tenancy. For information
1527
+ * about moving resources between compartments, see
1528
+ * [Moving Resources to a Different Compartment](https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).
1529
+ *
1530
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
1531
+ * @param ChangeDatastoreClusterCompartmentRequest
1532
+ * @return ChangeDatastoreClusterCompartmentResponse
1533
+ * @throws OciError when an error occurs
1534
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/ocvp/ChangeDatastoreClusterCompartment.ts.html |here} to see how to use ChangeDatastoreClusterCompartment API.
1535
+ */
1536
+ changeDatastoreClusterCompartment(changeDatastoreClusterCompartmentRequest) {
1537
+ return __awaiter(this, void 0, void 0, function* () {
1538
+ if (this.logger)
1539
+ this.logger.debug("Calling operation DatastoreClusterClient#changeDatastoreClusterCompartment.");
1540
+ const operationName = "changeDatastoreClusterCompartment";
1541
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/vmware/20230701/DatastoreCluster/ChangeDatastoreClusterCompartment";
1542
+ const pathParams = {
1543
+ "{datastoreClusterId}": changeDatastoreClusterCompartmentRequest.datastoreClusterId
1544
+ };
1545
+ const queryParams = {};
1546
+ let headerParams = {
1547
+ "Content-Type": common.Constants.APPLICATION_JSON,
1548
+ "if-match": changeDatastoreClusterCompartmentRequest.ifMatch,
1549
+ "opc-request-id": changeDatastoreClusterCompartmentRequest.opcRequestId,
1550
+ "opc-retry-token": changeDatastoreClusterCompartmentRequest.opcRetryToken
1551
+ };
1552
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
1553
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, changeDatastoreClusterCompartmentRequest.retryConfiguration, specRetryConfiguration);
1554
+ if (this.logger)
1555
+ retrier.logger = this.logger;
1556
+ const request = yield oci_common_1.composeRequest({
1557
+ baseEndpoint: this._endpoint,
1558
+ defaultHeaders: this._defaultHeaders,
1559
+ path: "/datastoreClusters/{datastoreClusterId}/actions/changeCompartment",
1560
+ method: "POST",
1561
+ bodyContent: common.ObjectSerializer.serialize(changeDatastoreClusterCompartmentRequest.changeDatastoreClusterCompartmentDetails, "ChangeDatastoreClusterCompartmentDetails", model.ChangeDatastoreClusterCompartmentDetails.getJsonObj),
1562
+ pathParams: pathParams,
1563
+ headerParams: headerParams,
1564
+ queryParams: queryParams
1565
+ });
1566
+ try {
1567
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1568
+ const sdkResponse = oci_common_1.composeResponse({
1569
+ responseObject: {},
1570
+ responseHeaders: [
1571
+ {
1572
+ value: response.headers.get("opc-request-id"),
1573
+ key: "opcRequestId",
1574
+ dataType: "string"
1575
+ }
1576
+ ]
1577
+ });
1578
+ return sdkResponse;
1579
+ }
1580
+ catch (err) {
1581
+ throw err;
1582
+ }
1583
+ });
1584
+ }
1585
+ /**
1586
+ * Creates a Oracle Cloud VMware Solution Datastore Cluster.
1587
+ *
1588
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
1589
+ * @param CreateDatastoreClusterRequest
1590
+ * @return CreateDatastoreClusterResponse
1591
+ * @throws OciError when an error occurs
1592
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/ocvp/CreateDatastoreCluster.ts.html |here} to see how to use CreateDatastoreCluster API.
1593
+ */
1594
+ createDatastoreCluster(createDatastoreClusterRequest) {
1595
+ return __awaiter(this, void 0, void 0, function* () {
1596
+ if (this.logger)
1597
+ this.logger.debug("Calling operation DatastoreClusterClient#createDatastoreCluster.");
1598
+ const operationName = "createDatastoreCluster";
1599
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/vmware/20230701/DatastoreCluster/CreateDatastoreCluster";
1600
+ const pathParams = {};
1601
+ const queryParams = {};
1602
+ let headerParams = {
1603
+ "Content-Type": common.Constants.APPLICATION_JSON,
1604
+ "opc-retry-token": createDatastoreClusterRequest.opcRetryToken,
1605
+ "opc-request-id": createDatastoreClusterRequest.opcRequestId
1606
+ };
1607
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
1608
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, createDatastoreClusterRequest.retryConfiguration, specRetryConfiguration);
1609
+ if (this.logger)
1610
+ retrier.logger = this.logger;
1611
+ const request = yield oci_common_1.composeRequest({
1612
+ baseEndpoint: this._endpoint,
1613
+ defaultHeaders: this._defaultHeaders,
1614
+ path: "/datastoreClusters",
1615
+ method: "POST",
1616
+ bodyContent: common.ObjectSerializer.serialize(createDatastoreClusterRequest.createDatastoreClusterDetails, "CreateDatastoreClusterDetails", model.CreateDatastoreClusterDetails.getJsonObj),
1617
+ pathParams: pathParams,
1618
+ headerParams: headerParams,
1619
+ queryParams: queryParams
1620
+ });
1621
+ try {
1622
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1623
+ const sdkResponse = oci_common_1.composeResponse({
1624
+ responseObject: {},
1625
+ responseHeaders: [
1626
+ {
1627
+ value: response.headers.get("opc-work-request-id"),
1628
+ key: "opcWorkRequestId",
1629
+ dataType: "string"
1630
+ },
1631
+ {
1632
+ value: response.headers.get("opc-request-id"),
1633
+ key: "opcRequestId",
1634
+ dataType: "string"
1635
+ }
1636
+ ]
1637
+ });
1638
+ return sdkResponse;
1639
+ }
1640
+ catch (err) {
1641
+ throw err;
1642
+ }
1643
+ });
1644
+ }
1645
+ /**
1646
+ * Deletes the specified Datastore Cluster.
1647
+ *
1648
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
1649
+ * @param DeleteDatastoreClusterRequest
1650
+ * @return DeleteDatastoreClusterResponse
1651
+ * @throws OciError when an error occurs
1652
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/ocvp/DeleteDatastoreCluster.ts.html |here} to see how to use DeleteDatastoreCluster API.
1653
+ */
1654
+ deleteDatastoreCluster(deleteDatastoreClusterRequest) {
1655
+ return __awaiter(this, void 0, void 0, function* () {
1656
+ if (this.logger)
1657
+ this.logger.debug("Calling operation DatastoreClusterClient#deleteDatastoreCluster.");
1658
+ const operationName = "deleteDatastoreCluster";
1659
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/vmware/20230701/DatastoreCluster/DeleteDatastoreCluster";
1660
+ const pathParams = {
1661
+ "{datastoreClusterId}": deleteDatastoreClusterRequest.datastoreClusterId
1662
+ };
1663
+ const queryParams = {};
1664
+ let headerParams = {
1665
+ "Content-Type": common.Constants.APPLICATION_JSON,
1666
+ "if-match": deleteDatastoreClusterRequest.ifMatch,
1667
+ "opc-request-id": deleteDatastoreClusterRequest.opcRequestId
1668
+ };
1669
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
1670
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, deleteDatastoreClusterRequest.retryConfiguration, specRetryConfiguration);
1671
+ if (this.logger)
1672
+ retrier.logger = this.logger;
1673
+ const request = yield oci_common_1.composeRequest({
1674
+ baseEndpoint: this._endpoint,
1675
+ defaultHeaders: this._defaultHeaders,
1676
+ path: "/datastoreClusters/{datastoreClusterId}",
1677
+ method: "DELETE",
1678
+ pathParams: pathParams,
1679
+ headerParams: headerParams,
1680
+ queryParams: queryParams
1681
+ });
1682
+ try {
1683
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1684
+ const sdkResponse = oci_common_1.composeResponse({
1685
+ responseObject: {},
1686
+ responseHeaders: [
1687
+ {
1688
+ value: response.headers.get("opc-work-request-id"),
1689
+ key: "opcWorkRequestId",
1690
+ dataType: "string"
1691
+ },
1692
+ {
1693
+ value: response.headers.get("opc-request-id"),
1694
+ key: "opcRequestId",
1695
+ dataType: "string"
1696
+ }
1697
+ ]
1698
+ });
1699
+ return sdkResponse;
1700
+ }
1701
+ catch (err) {
1702
+ throw err;
1703
+ }
1704
+ });
1705
+ }
1706
+ /**
1707
+ * Detach the specified Datastore Cluster from the provided Vmware Cluster.
1708
+ * <p>
1709
+ Use the {@link WorkRequest} operations to track the
1710
+ * detachment of the Datastore.
1711
+ *
1712
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
1713
+ * @param DetachDatastoreClusterFromClusterRequest
1714
+ * @return DetachDatastoreClusterFromClusterResponse
1715
+ * @throws OciError when an error occurs
1716
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/ocvp/DetachDatastoreClusterFromCluster.ts.html |here} to see how to use DetachDatastoreClusterFromCluster API.
1717
+ */
1718
+ detachDatastoreClusterFromCluster(detachDatastoreClusterFromClusterRequest) {
1719
+ return __awaiter(this, void 0, void 0, function* () {
1720
+ if (this.logger)
1721
+ this.logger.debug("Calling operation DatastoreClusterClient#detachDatastoreClusterFromCluster.");
1722
+ const operationName = "detachDatastoreClusterFromCluster";
1723
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/vmware/20230701/DatastoreCluster/DetachDatastoreClusterFromCluster";
1724
+ const pathParams = {
1725
+ "{datastoreClusterId}": detachDatastoreClusterFromClusterRequest.datastoreClusterId
1726
+ };
1727
+ const queryParams = {};
1728
+ let headerParams = {
1729
+ "Content-Type": common.Constants.APPLICATION_JSON,
1730
+ "if-match": detachDatastoreClusterFromClusterRequest.ifMatch,
1731
+ "opc-retry-token": detachDatastoreClusterFromClusterRequest.opcRetryToken,
1732
+ "opc-request-id": detachDatastoreClusterFromClusterRequest.opcRequestId
1733
+ };
1734
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
1735
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, detachDatastoreClusterFromClusterRequest.retryConfiguration, specRetryConfiguration);
1736
+ if (this.logger)
1737
+ retrier.logger = this.logger;
1738
+ const request = yield oci_common_1.composeRequest({
1739
+ baseEndpoint: this._endpoint,
1740
+ defaultHeaders: this._defaultHeaders,
1741
+ path: "/datastoreClusters/{datastoreClusterId}/actions/detachFromCluster",
1742
+ method: "POST",
1743
+ pathParams: pathParams,
1744
+ headerParams: headerParams,
1745
+ queryParams: queryParams
1746
+ });
1747
+ try {
1748
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1749
+ const sdkResponse = oci_common_1.composeResponse({
1750
+ responseObject: {},
1751
+ responseHeaders: [
1752
+ {
1753
+ value: response.headers.get("opc-work-request-id"),
1754
+ key: "opcWorkRequestId",
1755
+ dataType: "string"
1756
+ },
1757
+ {
1758
+ value: response.headers.get("opc-request-id"),
1759
+ key: "opcRequestId",
1760
+ dataType: "string"
1761
+ }
1762
+ ]
1763
+ });
1764
+ return sdkResponse;
1765
+ }
1766
+ catch (err) {
1767
+ throw err;
1768
+ }
1769
+ });
1770
+ }
1771
+ /**
1772
+ * Detach the specified Datastore Cluster from the provided ESXi Hosts.
1773
+ * <p>
1774
+ Use the {@link WorkRequest} operations to track the
1775
+ * detachment of the Datastore.
1776
+ *
1777
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
1778
+ * @param DetachDatastoreClusterFromEsxiHostRequest
1779
+ * @return DetachDatastoreClusterFromEsxiHostResponse
1780
+ * @throws OciError when an error occurs
1781
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/ocvp/DetachDatastoreClusterFromEsxiHost.ts.html |here} to see how to use DetachDatastoreClusterFromEsxiHost API.
1782
+ */
1783
+ detachDatastoreClusterFromEsxiHost(detachDatastoreClusterFromEsxiHostRequest) {
1784
+ return __awaiter(this, void 0, void 0, function* () {
1785
+ if (this.logger)
1786
+ this.logger.debug("Calling operation DatastoreClusterClient#detachDatastoreClusterFromEsxiHost.");
1787
+ const operationName = "detachDatastoreClusterFromEsxiHost";
1788
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/vmware/20230701/DatastoreCluster/DetachDatastoreClusterFromEsxiHost";
1789
+ const pathParams = {
1790
+ "{datastoreClusterId}": detachDatastoreClusterFromEsxiHostRequest.datastoreClusterId
1791
+ };
1792
+ const queryParams = {};
1793
+ let headerParams = {
1794
+ "Content-Type": common.Constants.APPLICATION_JSON,
1795
+ "if-match": detachDatastoreClusterFromEsxiHostRequest.ifMatch,
1796
+ "opc-retry-token": detachDatastoreClusterFromEsxiHostRequest.opcRetryToken,
1797
+ "opc-request-id": detachDatastoreClusterFromEsxiHostRequest.opcRequestId
1798
+ };
1799
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
1800
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, detachDatastoreClusterFromEsxiHostRequest.retryConfiguration, specRetryConfiguration);
1801
+ if (this.logger)
1802
+ retrier.logger = this.logger;
1803
+ const request = yield oci_common_1.composeRequest({
1804
+ baseEndpoint: this._endpoint,
1805
+ defaultHeaders: this._defaultHeaders,
1806
+ path: "/datastoreClusters/{datastoreClusterId}/actions/detachFromEsxiHost",
1807
+ method: "POST",
1808
+ bodyContent: common.ObjectSerializer.serialize(detachDatastoreClusterFromEsxiHostRequest.detachDatastoreClusterFromEsxiHostDetails, "DetachDatastoreClusterFromEsxiHostDetails", model.DetachDatastoreClusterFromEsxiHostDetails.getJsonObj),
1809
+ pathParams: pathParams,
1810
+ headerParams: headerParams,
1811
+ queryParams: queryParams
1812
+ });
1813
+ try {
1814
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1815
+ const sdkResponse = oci_common_1.composeResponse({
1816
+ responseObject: {},
1817
+ responseHeaders: [
1818
+ {
1819
+ value: response.headers.get("opc-work-request-id"),
1820
+ key: "opcWorkRequestId",
1821
+ dataType: "string"
1822
+ },
1823
+ {
1824
+ value: response.headers.get("opc-request-id"),
1825
+ key: "opcRequestId",
1826
+ dataType: "string"
1827
+ }
1828
+ ]
1829
+ });
1830
+ return sdkResponse;
1831
+ }
1832
+ catch (err) {
1833
+ throw err;
1834
+ }
1835
+ });
1836
+ }
1837
+ /**
1838
+ * Get the specified Datastore Cluster information.
1839
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
1840
+ * @param GetDatastoreClusterRequest
1841
+ * @return GetDatastoreClusterResponse
1842
+ * @throws OciError when an error occurs
1843
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/ocvp/GetDatastoreCluster.ts.html |here} to see how to use GetDatastoreCluster API.
1844
+ */
1845
+ getDatastoreCluster(getDatastoreClusterRequest) {
1846
+ return __awaiter(this, void 0, void 0, function* () {
1847
+ if (this.logger)
1848
+ this.logger.debug("Calling operation DatastoreClusterClient#getDatastoreCluster.");
1849
+ const operationName = "getDatastoreCluster";
1850
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/vmware/20230701/DatastoreCluster/GetDatastoreCluster";
1851
+ const pathParams = {
1852
+ "{datastoreClusterId}": getDatastoreClusterRequest.datastoreClusterId
1853
+ };
1854
+ const queryParams = {};
1855
+ let headerParams = {
1856
+ "Content-Type": common.Constants.APPLICATION_JSON,
1857
+ "opc-request-id": getDatastoreClusterRequest.opcRequestId
1858
+ };
1859
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
1860
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getDatastoreClusterRequest.retryConfiguration, specRetryConfiguration);
1861
+ if (this.logger)
1862
+ retrier.logger = this.logger;
1863
+ const request = yield oci_common_1.composeRequest({
1864
+ baseEndpoint: this._endpoint,
1865
+ defaultHeaders: this._defaultHeaders,
1866
+ path: "/datastoreClusters/{datastoreClusterId}",
1867
+ method: "GET",
1868
+ pathParams: pathParams,
1869
+ headerParams: headerParams,
1870
+ queryParams: queryParams
1871
+ });
1872
+ try {
1873
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1874
+ const sdkResponse = oci_common_1.composeResponse({
1875
+ responseObject: {},
1876
+ body: yield response.json(),
1877
+ bodyKey: "datastoreCluster",
1878
+ bodyModel: model.DatastoreCluster,
1879
+ type: "model.DatastoreCluster",
1880
+ responseHeaders: [
1881
+ {
1882
+ value: response.headers.get("etag"),
1883
+ key: "etag",
1884
+ dataType: "string"
1885
+ },
1886
+ {
1887
+ value: response.headers.get("opc-request-id"),
1888
+ key: "opcRequestId",
1889
+ dataType: "string"
1890
+ }
1891
+ ]
1892
+ });
1893
+ return sdkResponse;
1894
+ }
1895
+ catch (err) {
1896
+ throw err;
1897
+ }
1898
+ });
1899
+ }
1900
+ /**
1901
+ * List the Datastore Clusters in the specified compartment. The list can be filtered
1902
+ * by compartment, Datastore Cluster, Display name and Lifecycle state
1903
+ *
1904
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
1905
+ * @param ListDatastoreClustersRequest
1906
+ * @return ListDatastoreClustersResponse
1907
+ * @throws OciError when an error occurs
1908
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/ocvp/ListDatastoreClusters.ts.html |here} to see how to use ListDatastoreClusters API.
1909
+ */
1910
+ listDatastoreClusters(listDatastoreClustersRequest) {
1911
+ return __awaiter(this, void 0, void 0, function* () {
1912
+ if (this.logger)
1913
+ this.logger.debug("Calling operation DatastoreClusterClient#listDatastoreClusters.");
1914
+ const operationName = "listDatastoreClusters";
1915
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/vmware/20230701/DatastoreCluster/ListDatastoreClusters";
1916
+ const pathParams = {};
1917
+ const queryParams = {
1918
+ "compartmentId": listDatastoreClustersRequest.compartmentId,
1919
+ "displayName": listDatastoreClustersRequest.displayName,
1920
+ "datastoreClusterId": listDatastoreClustersRequest.datastoreClusterId,
1921
+ "clusterId": listDatastoreClustersRequest.clusterId,
1922
+ "limit": listDatastoreClustersRequest.limit,
1923
+ "page": listDatastoreClustersRequest.page,
1924
+ "sortOrder": listDatastoreClustersRequest.sortOrder,
1925
+ "sortBy": listDatastoreClustersRequest.sortBy,
1926
+ "lifecycleState": listDatastoreClustersRequest.lifecycleState
1927
+ };
1928
+ let headerParams = {
1929
+ "Content-Type": common.Constants.APPLICATION_JSON,
1930
+ "opc-request-id": listDatastoreClustersRequest.opcRequestId
1931
+ };
1932
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
1933
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listDatastoreClustersRequest.retryConfiguration, specRetryConfiguration);
1934
+ if (this.logger)
1935
+ retrier.logger = this.logger;
1936
+ const request = yield oci_common_1.composeRequest({
1937
+ baseEndpoint: this._endpoint,
1938
+ defaultHeaders: this._defaultHeaders,
1939
+ path: "/datastoreClusters",
1940
+ method: "GET",
1941
+ pathParams: pathParams,
1942
+ headerParams: headerParams,
1943
+ queryParams: queryParams
1944
+ });
1945
+ try {
1946
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1947
+ const sdkResponse = oci_common_1.composeResponse({
1948
+ responseObject: {},
1949
+ body: yield response.json(),
1950
+ bodyKey: "datastoreClusterCollection",
1951
+ bodyModel: model.DatastoreClusterCollection,
1952
+ type: "model.DatastoreClusterCollection",
1953
+ responseHeaders: [
1954
+ {
1955
+ value: response.headers.get("opc-request-id"),
1956
+ key: "opcRequestId",
1957
+ dataType: "string"
1958
+ },
1959
+ {
1960
+ value: response.headers.get("opc-next-page"),
1961
+ key: "opcNextPage",
1962
+ dataType: "string"
1963
+ }
1964
+ ]
1965
+ });
1966
+ return sdkResponse;
1967
+ }
1968
+ catch (err) {
1969
+ throw err;
1970
+ }
1971
+ });
1972
+ }
1973
+ /**
1974
+ * Remove the specified Datastore from the provided Datastore Cluster.
1975
+ *
1976
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
1977
+ * @param RemoveDatastoreFromDatastoreClusterRequest
1978
+ * @return RemoveDatastoreFromDatastoreClusterResponse
1979
+ * @throws OciError when an error occurs
1980
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/ocvp/RemoveDatastoreFromDatastoreCluster.ts.html |here} to see how to use RemoveDatastoreFromDatastoreCluster API.
1981
+ */
1982
+ removeDatastoreFromDatastoreCluster(removeDatastoreFromDatastoreClusterRequest) {
1983
+ return __awaiter(this, void 0, void 0, function* () {
1984
+ if (this.logger)
1985
+ this.logger.debug("Calling operation DatastoreClusterClient#removeDatastoreFromDatastoreCluster.");
1986
+ const operationName = "removeDatastoreFromDatastoreCluster";
1987
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/vmware/20230701/DatastoreCluster/RemoveDatastoreFromDatastoreCluster";
1988
+ const pathParams = {
1989
+ "{datastoreClusterId}": removeDatastoreFromDatastoreClusterRequest.datastoreClusterId
1990
+ };
1991
+ const queryParams = {};
1992
+ let headerParams = {
1993
+ "Content-Type": common.Constants.APPLICATION_JSON,
1994
+ "if-match": removeDatastoreFromDatastoreClusterRequest.ifMatch,
1995
+ "opc-retry-token": removeDatastoreFromDatastoreClusterRequest.opcRetryToken,
1996
+ "opc-request-id": removeDatastoreFromDatastoreClusterRequest.opcRequestId
1997
+ };
1998
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
1999
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, removeDatastoreFromDatastoreClusterRequest.retryConfiguration, specRetryConfiguration);
2000
+ if (this.logger)
2001
+ retrier.logger = this.logger;
2002
+ const request = yield oci_common_1.composeRequest({
2003
+ baseEndpoint: this._endpoint,
2004
+ defaultHeaders: this._defaultHeaders,
2005
+ path: "/datastoreClusters/{datastoreClusterId}/actions/removeDatastore",
2006
+ method: "POST",
2007
+ bodyContent: common.ObjectSerializer.serialize(removeDatastoreFromDatastoreClusterRequest.removeDatastoreFromDatastoreClusterDetails, "RemoveDatastoreFromDatastoreClusterDetails", model.RemoveDatastoreFromDatastoreClusterDetails.getJsonObj),
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
+ responseHeaders: [
2017
+ {
2018
+ value: response.headers.get("opc-work-request-id"),
2019
+ key: "opcWorkRequestId",
2020
+ dataType: "string"
2021
+ },
2022
+ {
2023
+ value: response.headers.get("opc-request-id"),
2024
+ key: "opcRequestId",
2025
+ dataType: "string"
2026
+ }
2027
+ ]
2028
+ });
2029
+ return sdkResponse;
2030
+ }
2031
+ catch (err) {
2032
+ throw err;
2033
+ }
2034
+ });
2035
+ }
2036
+ /**
2037
+ * Updates the specified Datastore Cluster.
2038
+ * <p>
2039
+ **Important:** Updating a Datastore Cluster affects only certain attributes in the `Datastore Cluster`
2040
+ * object and does not affect the VMware environment currently running.
2041
+ *
2042
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
2043
+ * @param UpdateDatastoreClusterRequest
2044
+ * @return UpdateDatastoreClusterResponse
2045
+ * @throws OciError when an error occurs
2046
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/ocvp/UpdateDatastoreCluster.ts.html |here} to see how to use UpdateDatastoreCluster API.
2047
+ */
2048
+ updateDatastoreCluster(updateDatastoreClusterRequest) {
2049
+ return __awaiter(this, void 0, void 0, function* () {
2050
+ if (this.logger)
2051
+ this.logger.debug("Calling operation DatastoreClusterClient#updateDatastoreCluster.");
2052
+ const operationName = "updateDatastoreCluster";
2053
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/vmware/20230701/DatastoreCluster/UpdateDatastoreCluster";
2054
+ const pathParams = {
2055
+ "{datastoreClusterId}": updateDatastoreClusterRequest.datastoreClusterId
2056
+ };
2057
+ const queryParams = {};
2058
+ let headerParams = {
2059
+ "Content-Type": common.Constants.APPLICATION_JSON,
2060
+ "if-match": updateDatastoreClusterRequest.ifMatch,
2061
+ "opc-request-id": updateDatastoreClusterRequest.opcRequestId
2062
+ };
2063
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
2064
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, updateDatastoreClusterRequest.retryConfiguration, specRetryConfiguration);
2065
+ if (this.logger)
2066
+ retrier.logger = this.logger;
2067
+ const request = yield oci_common_1.composeRequest({
2068
+ baseEndpoint: this._endpoint,
2069
+ defaultHeaders: this._defaultHeaders,
2070
+ path: "/datastoreClusters/{datastoreClusterId}",
2071
+ method: "PUT",
2072
+ bodyContent: common.ObjectSerializer.serialize(updateDatastoreClusterRequest.updateDatastoreClusterDetails, "UpdateDatastoreClusterDetails", model.UpdateDatastoreClusterDetails.getJsonObj),
2073
+ pathParams: pathParams,
2074
+ headerParams: headerParams,
2075
+ queryParams: queryParams
2076
+ });
2077
+ try {
2078
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
2079
+ const sdkResponse = oci_common_1.composeResponse({
2080
+ responseObject: {},
2081
+ responseHeaders: [
2082
+ {
2083
+ value: response.headers.get("opc-work-request-id"),
2084
+ key: "opcWorkRequestId",
2085
+ dataType: "string"
2086
+ },
2087
+ {
2088
+ value: response.headers.get("opc-request-id"),
2089
+ key: "opcRequestId",
2090
+ dataType: "string"
2091
+ }
2092
+ ]
2093
+ });
2094
+ return sdkResponse;
2095
+ }
2096
+ catch (err) {
2097
+ throw err;
2098
+ }
2099
+ });
2100
+ }
2101
+ }
2102
+ exports.DatastoreClusterClient = DatastoreClusterClient;
2103
+ DatastoreClusterClient.serviceEndpointTemplate = "https://ocvps.{region}.oci.{secondLevelDomain}";
2104
+ DatastoreClusterClient.endpointServiceName = "";
554
2105
  var EsxiHostApiKeys;
555
2106
  (function (EsxiHostApiKeys) {
556
2107
  })(EsxiHostApiKeys = exports.EsxiHostApiKeys || (exports.EsxiHostApiKeys = {}));