oci-ocvp 2.126.0 → 2.126.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 (196) 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/byol-waiter.d.ts +31 -0
  5. package/lib/byol-waiter.js +67 -0
  6. package/lib/byol-waiter.js.map +1 -0
  7. package/lib/byolallocation-waiter.d.ts +31 -0
  8. package/lib/byolallocation-waiter.js +67 -0
  9. package/lib/byolallocation-waiter.js.map +1 -0
  10. package/lib/client.d.ts +301 -0
  11. package/lib/client.js +1161 -1
  12. package/lib/client.js.map +1 -1
  13. package/lib/model/byol-allocation-collection.d.ts +28 -0
  14. package/lib/model/byol-allocation-collection.js +63 -0
  15. package/lib/model/byol-allocation-collection.js.map +1 -0
  16. package/lib/model/byol-allocation-summary.d.ts +137 -0
  17. package/lib/model/byol-allocation-summary.js +31 -0
  18. package/lib/model/byol-allocation-summary.js.map +1 -0
  19. package/lib/model/byol-allocation.d.ts +158 -0
  20. package/lib/model/byol-allocation.js +58 -0
  21. package/lib/model/byol-allocation.js.map +1 -0
  22. package/lib/model/byol-collection.d.ts +28 -0
  23. package/lib/model/byol-collection.js +63 -0
  24. package/lib/model/byol-collection.js.map +1 -0
  25. package/lib/model/byol-realm-allocation-collection.d.ts +28 -0
  26. package/lib/model/byol-realm-allocation-collection.js +63 -0
  27. package/lib/model/byol-realm-allocation-collection.js.map +1 -0
  28. package/lib/model/byol-realm-allocation-summary.d.ts +60 -0
  29. package/lib/model/byol-realm-allocation-summary.js +31 -0
  30. package/lib/model/byol-realm-allocation-summary.js.map +1 -0
  31. package/lib/model/byol-summary.d.ts +136 -0
  32. package/lib/model/byol-summary.js +31 -0
  33. package/lib/model/byol-summary.js.map +1 -0
  34. package/lib/model/byol.d.ts +161 -0
  35. package/lib/model/byol.js +58 -0
  36. package/lib/model/byol.js.map +1 -0
  37. package/lib/model/change-byol-allocation-compartment-details.d.ts +29 -0
  38. package/lib/model/change-byol-allocation-compartment-details.js +31 -0
  39. package/lib/model/change-byol-allocation-compartment-details.js.map +1 -0
  40. package/lib/model/change-byol-compartment-details.d.ts +29 -0
  41. package/lib/model/change-byol-compartment-details.js +31 -0
  42. package/lib/model/change-byol-compartment-details.js.map +1 -0
  43. package/lib/model/cluster-byol-allocation-details.d.ts +34 -0
  44. package/lib/model/cluster-byol-allocation-details.js +31 -0
  45. package/lib/model/cluster-byol-allocation-details.js.map +1 -0
  46. package/lib/model/cluster-summary.d.ts +1 -0
  47. package/lib/model/cluster-summary.js +30 -2
  48. package/lib/model/cluster-summary.js.map +1 -1
  49. package/lib/model/cluster.d.ts +6 -0
  50. package/lib/model/cluster.js +6 -0
  51. package/lib/model/cluster.js.map +1 -1
  52. package/lib/model/create-byol-allocation-details.d.ts +66 -0
  53. package/lib/model/create-byol-allocation-details.js +31 -0
  54. package/lib/model/create-byol-allocation-details.js.map +1 -0
  55. package/lib/model/create-byol-details.d.ts +97 -0
  56. package/lib/model/create-byol-details.js +31 -0
  57. package/lib/model/create-byol-details.js.map +1 -0
  58. package/lib/model/create-cluster-details.d.ts +6 -0
  59. package/lib/model/create-cluster-details.js +6 -0
  60. package/lib/model/create-cluster-details.js.map +1 -1
  61. package/lib/model/create-esxi-host-details.d.ts +10 -0
  62. package/lib/model/create-esxi-host-details.js.map +1 -1
  63. package/lib/model/create-sddc-details.d.ts +1 -0
  64. package/lib/model/create-sddc-details.js +6 -0
  65. package/lib/model/create-sddc-details.js.map +1 -1
  66. package/lib/model/esxi-host-summary.d.ts +15 -0
  67. package/lib/model/esxi-host-summary.js.map +1 -1
  68. package/lib/model/esxi-host.d.ts +10 -0
  69. package/lib/model/esxi-host.js.map +1 -1
  70. package/lib/model/index.d.ts +32 -0
  71. package/lib/model/index.js +35 -2
  72. package/lib/model/index.js.map +1 -1
  73. package/lib/model/initial-cluster-configuration.d.ts +6 -0
  74. package/lib/model/initial-cluster-configuration.js +6 -0
  75. package/lib/model/initial-cluster-configuration.js.map +1 -1
  76. package/lib/model/management-appliance-heartbeat-connection-type.d.ts +1 -0
  77. package/lib/model/management-appliance-heartbeat-connection-type.js +1 -0
  78. package/lib/model/management-appliance-heartbeat-connection-type.js.map +1 -1
  79. package/lib/model/management-appliance-summary.d.ts +8 -0
  80. package/lib/model/management-appliance-summary.js.map +1 -1
  81. package/lib/model/management-appliance.d.ts +8 -0
  82. package/lib/model/management-appliance.js.map +1 -1
  83. package/lib/model/operation-types.d.ts +9 -0
  84. package/lib/model/operation-types.js +9 -0
  85. package/lib/model/operation-types.js.map +1 -1
  86. package/lib/model/sddc-byol-allocation-details.d.ts +34 -0
  87. package/lib/model/sddc-byol-allocation-details.js +31 -0
  88. package/lib/model/sddc-byol-allocation-details.js.map +1 -0
  89. package/lib/model/sddc-summary.d.ts +1 -0
  90. package/lib/model/sddc-summary.js +30 -2
  91. package/lib/model/sddc-summary.js.map +1 -1
  92. package/lib/model/sddc.d.ts +1 -0
  93. package/lib/model/sddc.js +6 -0
  94. package/lib/model/sddc.js.map +1 -1
  95. package/lib/model/supported-host-shape-summary.d.ts +9 -0
  96. package/lib/model/supported-host-shape-summary.js +9 -0
  97. package/lib/model/supported-host-shape-summary.js.map +1 -1
  98. package/lib/model/update-byol-allocation-details.d.ts +55 -0
  99. package/lib/model/update-byol-allocation-details.js +31 -0
  100. package/lib/model/update-byol-allocation-details.js.map +1 -0
  101. package/lib/model/update-byol-details.d.ts +91 -0
  102. package/lib/model/update-byol-details.js +31 -0
  103. package/lib/model/update-byol-details.js.map +1 -0
  104. package/lib/model/update-cluster-details.d.ts +1 -0
  105. package/lib/model/update-cluster-details.js +6 -0
  106. package/lib/model/update-cluster-details.js.map +1 -1
  107. package/lib/model/update-esxi-host-details.d.ts +10 -0
  108. package/lib/model/update-esxi-host-details.js.map +1 -1
  109. package/lib/model/update-sddc-details.d.ts +2 -0
  110. package/lib/model/update-sddc-details.js +30 -2
  111. package/lib/model/update-sddc-details.js.map +1 -1
  112. package/lib/request/change-byol-allocation-compartment-request.d.ts +42 -0
  113. package/lib/request/change-byol-allocation-compartment-request.js +15 -0
  114. package/lib/request/change-byol-allocation-compartment-request.js.map +1 -0
  115. package/lib/request/change-byol-compartment-request.d.ts +42 -0
  116. package/lib/request/change-byol-compartment-request.js +15 -0
  117. package/lib/request/change-byol-compartment-request.js.map +1 -0
  118. package/lib/request/create-byol-allocation-request.d.ts +38 -0
  119. package/lib/request/create-byol-allocation-request.js +15 -0
  120. package/lib/request/create-byol-allocation-request.js.map +1 -0
  121. package/lib/request/create-byol-request.d.ts +38 -0
  122. package/lib/request/create-byol-request.js +15 -0
  123. package/lib/request/create-byol-request.js.map +1 -0
  124. package/lib/request/delete-byol-allocation-request.d.ts +37 -0
  125. package/lib/request/delete-byol-allocation-request.js +15 -0
  126. package/lib/request/delete-byol-allocation-request.js.map +1 -0
  127. package/lib/request/delete-byol-request.d.ts +37 -0
  128. package/lib/request/delete-byol-request.js +15 -0
  129. package/lib/request/delete-byol-request.js.map +1 -0
  130. package/lib/request/get-byol-allocation-request.d.ts +28 -0
  131. package/lib/request/get-byol-allocation-request.js +15 -0
  132. package/lib/request/get-byol-allocation-request.js.map +1 -0
  133. package/lib/request/get-byol-request.d.ts +28 -0
  134. package/lib/request/get-byol-request.js +15 -0
  135. package/lib/request/get-byol-request.js.map +1 -0
  136. package/lib/request/index.d.ts +26 -0
  137. package/lib/request/index.js +7 -1
  138. package/lib/request/index.js.map +1 -1
  139. package/lib/request/list-byol-allocations-request.d.ts +93 -0
  140. package/lib/request/list-byol-allocations-request.js +25 -0
  141. package/lib/request/list-byol-allocations-request.js.map +1 -0
  142. package/lib/request/list-byols-request.d.ts +89 -0
  143. package/lib/request/list-byols-request.js +25 -0
  144. package/lib/request/list-byols-request.js.map +1 -0
  145. package/lib/request/list-management-appliances-request.d.ts +5 -0
  146. package/lib/request/list-management-appliances-request.js.map +1 -1
  147. package/lib/request/retrieve-byol-realm-allocations-request.d.ts +60 -0
  148. package/lib/request/retrieve-byol-realm-allocations-request.js +23 -0
  149. package/lib/request/retrieve-byol-realm-allocations-request.js.map +1 -0
  150. package/lib/request/update-byol-allocation-request.d.ts +42 -0
  151. package/lib/request/update-byol-allocation-request.js +15 -0
  152. package/lib/request/update-byol-allocation-request.js.map +1 -0
  153. package/lib/request/update-byol-request.d.ts +42 -0
  154. package/lib/request/update-byol-request.js +15 -0
  155. package/lib/request/update-byol-request.js.map +1 -0
  156. package/lib/response/change-byol-allocation-compartment-response.d.ts +20 -0
  157. package/lib/response/change-byol-allocation-compartment-response.js +15 -0
  158. package/lib/response/change-byol-allocation-compartment-response.js.map +1 -0
  159. package/lib/response/change-byol-compartment-response.d.ts +20 -0
  160. package/lib/response/change-byol-compartment-response.js +15 -0
  161. package/lib/response/change-byol-compartment-response.js.map +1 -0
  162. package/lib/response/create-byol-allocation-response.d.ts +25 -0
  163. package/lib/response/create-byol-allocation-response.js +15 -0
  164. package/lib/response/create-byol-allocation-response.js.map +1 -0
  165. package/lib/response/create-byol-response.d.ts +25 -0
  166. package/lib/response/create-byol-response.js +15 -0
  167. package/lib/response/create-byol-response.js.map +1 -0
  168. package/lib/response/delete-byol-allocation-response.d.ts +25 -0
  169. package/lib/response/delete-byol-allocation-response.js +15 -0
  170. package/lib/response/delete-byol-allocation-response.js.map +1 -0
  171. package/lib/response/delete-byol-response.d.ts +25 -0
  172. package/lib/response/delete-byol-response.js +15 -0
  173. package/lib/response/delete-byol-response.js.map +1 -0
  174. package/lib/response/get-byol-allocation-response.d.ts +30 -0
  175. package/lib/response/get-byol-allocation-response.js +15 -0
  176. package/lib/response/get-byol-allocation-response.js.map +1 -0
  177. package/lib/response/get-byol-response.d.ts +30 -0
  178. package/lib/response/get-byol-response.js +15 -0
  179. package/lib/response/get-byol-response.js.map +1 -0
  180. package/lib/response/index.d.ts +26 -0
  181. package/lib/response/list-byol-allocations-response.d.ts +32 -0
  182. package/lib/response/list-byol-allocations-response.js +15 -0
  183. package/lib/response/list-byol-allocations-response.js.map +1 -0
  184. package/lib/response/list-byols-response.d.ts +32 -0
  185. package/lib/response/list-byols-response.js +15 -0
  186. package/lib/response/list-byols-response.js.map +1 -0
  187. package/lib/response/retrieve-byol-realm-allocations-response.d.ts +32 -0
  188. package/lib/response/retrieve-byol-realm-allocations-response.js +15 -0
  189. package/lib/response/retrieve-byol-realm-allocations-response.js.map +1 -0
  190. package/lib/response/update-byol-allocation-response.d.ts +25 -0
  191. package/lib/response/update-byol-allocation-response.js +15 -0
  192. package/lib/response/update-byol-allocation-response.js.map +1 -0
  193. package/lib/response/update-byol-response.d.ts +25 -0
  194. package/lib/response/update-byol-response.js +15 -0
  195. package/lib/response/update-byol-response.js.map +1 -0
  196. package/package.json +3 -3
package/lib/client.js CHANGED
@@ -42,9 +42,11 @@ 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.ManagementApplianceClient = exports.ManagementApplianceApiKeys = exports.EsxiHostClient = exports.EsxiHostApiKeys = exports.DatastoreClusterClient = exports.DatastoreClusterApiKeys = exports.DatastoreClient = exports.DatastoreApiKeys = exports.ClusterClient = exports.ClusterApiKeys = void 0;
45
+ exports.WorkRequestClient = exports.WorkRequestApiKeys = exports.SddcClient = exports.SddcApiKeys = exports.ManagementApplianceClient = exports.ManagementApplianceApiKeys = exports.EsxiHostClient = exports.EsxiHostApiKeys = exports.DatastoreClusterClient = exports.DatastoreClusterApiKeys = exports.DatastoreClient = exports.DatastoreApiKeys = exports.ClusterClient = exports.ClusterApiKeys = exports.ByolAllocationClient = exports.ByolAllocationApiKeys = exports.ByolClient = exports.ByolApiKeys = void 0;
46
46
  const common = require("oci-common");
47
47
  const model = __importStar(require("./model"));
48
+ const byol_waiter_1 = require("./byol-waiter");
49
+ const byolallocation_waiter_1 = require("./byolallocation-waiter");
48
50
  const cluster_waiter_1 = require("./cluster-waiter");
49
51
  const datastore_waiter_1 = require("./datastore-waiter");
50
52
  const datastorecluster_waiter_1 = require("./datastorecluster-waiter");
@@ -57,6 +59,1163 @@ const Breaker = require("opossum");
57
59
  // ===============================================
58
60
  // This file is autogenerated - Please do not edit
59
61
  // ===============================================
62
+ var ByolApiKeys;
63
+ (function (ByolApiKeys) {
64
+ })(ByolApiKeys = exports.ByolApiKeys || (exports.ByolApiKeys = {}));
65
+ /**
66
+ * This service client uses {@link common.CircuitBreaker.DefaultConfiguration} for all the operations by default if no circuit breaker configuration is defined by the user.
67
+ */
68
+ class ByolClient {
69
+ constructor(params, clientConfiguration) {
70
+ this["_realmSpecificEndpointTemplateEnabled"] = undefined;
71
+ this["_endpoint"] = "";
72
+ this["_defaultHeaders"] = {};
73
+ this._circuitBreaker = null;
74
+ this._httpOptions = undefined;
75
+ this._bodyDuplexMode = undefined;
76
+ this.targetService = "Byol";
77
+ this._regionId = "";
78
+ this._lastSetRegionOrRegionId = "";
79
+ const requestSigner = params.authenticationDetailsProvider
80
+ ? new common.DefaultRequestSigner(params.authenticationDetailsProvider)
81
+ : null;
82
+ this._authProvider = params.authenticationDetailsProvider;
83
+ if (clientConfiguration) {
84
+ this._clientConfiguration = clientConfiguration;
85
+ this._circuitBreaker = clientConfiguration.circuitBreaker
86
+ ? clientConfiguration.circuitBreaker.circuit
87
+ : null;
88
+ this._httpOptions = clientConfiguration.httpOptions
89
+ ? clientConfiguration.httpOptions
90
+ : undefined;
91
+ this._bodyDuplexMode = clientConfiguration.bodyDuplexMode
92
+ ? clientConfiguration.bodyDuplexMode
93
+ : undefined;
94
+ }
95
+ if (!oci_common_1.developerToolConfiguration.isServiceEnabled("ocvp")) {
96
+ 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 : ";
97
+ throw errmsg.concat("ocvp");
98
+ }
99
+ // if circuit breaker is not created, check if circuit breaker system is enabled to use default circuit breaker
100
+ const specCircuitBreakerEnabled = true;
101
+ if (!this._circuitBreaker &&
102
+ common.utils.isCircuitBreakerSystemEnabled(clientConfiguration) &&
103
+ (specCircuitBreakerEnabled || common.CircuitBreaker.DefaultCircuitBreakerOverriden)) {
104
+ this._circuitBreaker = new common.CircuitBreaker().circuit;
105
+ }
106
+ this._httpClient =
107
+ params.httpClient ||
108
+ new common.FetchHttpClient(requestSigner, this._circuitBreaker, this._httpOptions, this._bodyDuplexMode);
109
+ if (params.authenticationDetailsProvider &&
110
+ common.isRegionProvider(params.authenticationDetailsProvider)) {
111
+ const provider = params.authenticationDetailsProvider;
112
+ if (provider.getRegion()) {
113
+ this.region = provider.getRegion();
114
+ }
115
+ }
116
+ }
117
+ /**
118
+ * Get the endpoint that is being used to call (ex, https://www.example.com).
119
+ */
120
+ get endpoint() {
121
+ return this._endpoint;
122
+ }
123
+ /**
124
+ * Sets the endpoint to call (ex, https://www.example.com).
125
+ * @param endpoint The endpoint of the service.
126
+ */
127
+ set endpoint(endpoint) {
128
+ this._endpoint = endpoint;
129
+ this._endpoint = this._endpoint + "/20230701";
130
+ if (this.logger)
131
+ this.logger.info(`ByolClient endpoint set to ${this._endpoint}`);
132
+ }
133
+ get logger() {
134
+ return common.LOG.logger;
135
+ }
136
+ /**
137
+ * Determines whether realm specific endpoint should be used or not.
138
+ * Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false"
139
+ * @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template
140
+ */
141
+ set useRealmSpecificEndpointTemplate(realmSpecificEndpointTemplateEnabled) {
142
+ this._realmSpecificEndpointTemplateEnabled = realmSpecificEndpointTemplateEnabled;
143
+ if (this.logger)
144
+ this.logger.info(`realmSpecificEndpointTemplateEnabled set to ${this._realmSpecificEndpointTemplateEnabled}`);
145
+ if (this._lastSetRegionOrRegionId === common.Region.REGION_STRING) {
146
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegion(ByolClient.serviceEndpointTemplate, this._region, ByolClient.endpointServiceName);
147
+ }
148
+ else if (this._lastSetRegionOrRegionId === common.Region.REGION_ID_STRING) {
149
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(ByolClient.serviceEndpointTemplate, this._regionId, ByolClient.endpointServiceName);
150
+ }
151
+ }
152
+ /**
153
+ * Sets the region to call (ex, Region.US_PHOENIX_1).
154
+ * Note, this will call {@link #endpoint(String) endpoint} after resolving the endpoint.
155
+ * @param region The region of the service.
156
+ */
157
+ set region(region) {
158
+ this._region = region;
159
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegion(ByolClient.serviceEndpointTemplate, region, ByolClient.endpointServiceName);
160
+ this._lastSetRegionOrRegionId = common.Region.REGION_STRING;
161
+ }
162
+ /**
163
+ * Sets the regionId to call (ex, 'us-phoenix-1').
164
+ *
165
+ * Note, this will first try to map the region ID to a known Region and call {@link #region(Region) region}.
166
+ * If no known Region could be determined, it will create an endpoint assuming its in default Realm OC1
167
+ * and then call {@link #endpoint(String) endpoint}.
168
+ * @param regionId The public region ID.
169
+ */
170
+ set regionId(regionId) {
171
+ this._regionId = regionId;
172
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(ByolClient.serviceEndpointTemplate, regionId, ByolClient.endpointServiceName);
173
+ this._lastSetRegionOrRegionId = common.Region.REGION_ID_STRING;
174
+ }
175
+ /**
176
+ * Creates a new ByolWaiter for resources for this service.
177
+ *
178
+ * @param config The waiter configuration for termination and delay strategy
179
+ * @return The service waiters.
180
+ */
181
+ createWaiters(config) {
182
+ this._waiters = new byol_waiter_1.ByolWaiter(this, config);
183
+ return this._waiters;
184
+ }
185
+ /**
186
+ * Gets the waiters available for resources for this service.
187
+ *
188
+ * @return The service waiters.
189
+ */
190
+ getWaiters() {
191
+ if (this._waiters) {
192
+ return this._waiters;
193
+ }
194
+ throw Error("Waiters do not exist. Please create waiters.");
195
+ }
196
+ /**
197
+ * Shutdown the circuit breaker used by the client when it is no longer needed
198
+ */
199
+ shutdownCircuitBreaker() {
200
+ if (this._circuitBreaker) {
201
+ this._circuitBreaker.shutdown();
202
+ }
203
+ }
204
+ /**
205
+ * Close the provider if possible which in turn shuts down any associated circuit breaker
206
+ */
207
+ closeProvider() {
208
+ if (this._authProvider) {
209
+ if (this._authProvider instanceof common.AbstractRequestingAuthenticationDetailsProvider)
210
+ (this._authProvider).closeProvider();
211
+ }
212
+ }
213
+ /**
214
+ * Close the client once it is no longer needed
215
+ */
216
+ close() {
217
+ this.shutdownCircuitBreaker();
218
+ this.closeProvider();
219
+ }
220
+ /**
221
+ * Moves an BYOL into a different compartment within the same tenancy. For information
222
+ * about moving resources between compartments, see
223
+ * [Moving Resources to a Different Compartment](https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).
224
+ *
225
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
226
+ * @param ChangeByolCompartmentRequest
227
+ * @return ChangeByolCompartmentResponse
228
+ * @throws OciError when an error occurs
229
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/ocvp/ChangeByolCompartment.ts.html |here} to see how to use ChangeByolCompartment API.
230
+ */
231
+ changeByolCompartment(changeByolCompartmentRequest) {
232
+ return __awaiter(this, void 0, void 0, function* () {
233
+ if (this.logger)
234
+ this.logger.debug("Calling operation ByolClient#changeByolCompartment.");
235
+ const operationName = "changeByolCompartment";
236
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/vmware/20230701/Byol/ChangeByolCompartment";
237
+ const pathParams = {
238
+ "{byolId}": changeByolCompartmentRequest.byolId
239
+ };
240
+ const queryParams = {};
241
+ let headerParams = {
242
+ "Content-Type": common.Constants.APPLICATION_JSON,
243
+ "if-match": changeByolCompartmentRequest.ifMatch,
244
+ "opc-request-id": changeByolCompartmentRequest.opcRequestId
245
+ };
246
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
247
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, changeByolCompartmentRequest.retryConfiguration, specRetryConfiguration);
248
+ if (this.logger)
249
+ retrier.logger = this.logger;
250
+ const request = yield oci_common_1.composeRequest({
251
+ baseEndpoint: this._endpoint,
252
+ defaultHeaders: this._defaultHeaders,
253
+ path: "/byols/{byolId}/actions/changeCompartment",
254
+ method: "POST",
255
+ bodyContent: common.ObjectSerializer.serialize(changeByolCompartmentRequest.changeByolCompartmentDetails, "ChangeByolCompartmentDetails", model.ChangeByolCompartmentDetails.getJsonObj),
256
+ pathParams: pathParams,
257
+ headerParams: headerParams,
258
+ queryParams: queryParams
259
+ });
260
+ try {
261
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
262
+ const sdkResponse = oci_common_1.composeResponse({
263
+ responseObject: {},
264
+ responseHeaders: [
265
+ {
266
+ value: response.headers.get("opc-request-id"),
267
+ key: "opcRequestId",
268
+ dataType: "string"
269
+ }
270
+ ]
271
+ });
272
+ return sdkResponse;
273
+ }
274
+ catch (err) {
275
+ throw err;
276
+ }
277
+ });
278
+ }
279
+ /**
280
+ * Creates an Oracle Cloud VMware Solution Bring-You-Own-License (BYOL).
281
+ * <p>
282
+ Use the {@link WorkRequest} operations to track the
283
+ * creation of the BYOL.
284
+ *
285
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
286
+ * @param CreateByolRequest
287
+ * @return CreateByolResponse
288
+ * @throws OciError when an error occurs
289
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/ocvp/CreateByol.ts.html |here} to see how to use CreateByol API.
290
+ */
291
+ createByol(createByolRequest) {
292
+ return __awaiter(this, void 0, void 0, function* () {
293
+ if (this.logger)
294
+ this.logger.debug("Calling operation ByolClient#createByol.");
295
+ const operationName = "createByol";
296
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/vmware/20230701/Byol/CreateByol";
297
+ const pathParams = {};
298
+ const queryParams = {};
299
+ let headerParams = {
300
+ "Content-Type": common.Constants.APPLICATION_JSON,
301
+ "opc-retry-token": createByolRequest.opcRetryToken,
302
+ "opc-request-id": createByolRequest.opcRequestId
303
+ };
304
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
305
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, createByolRequest.retryConfiguration, specRetryConfiguration);
306
+ if (this.logger)
307
+ retrier.logger = this.logger;
308
+ const request = yield oci_common_1.composeRequest({
309
+ baseEndpoint: this._endpoint,
310
+ defaultHeaders: this._defaultHeaders,
311
+ path: "/byols",
312
+ method: "POST",
313
+ bodyContent: common.ObjectSerializer.serialize(createByolRequest.createByolDetails, "CreateByolDetails", model.CreateByolDetails.getJsonObj),
314
+ pathParams: pathParams,
315
+ headerParams: headerParams,
316
+ queryParams: queryParams
317
+ });
318
+ try {
319
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
320
+ const sdkResponse = oci_common_1.composeResponse({
321
+ responseObject: {},
322
+ responseHeaders: [
323
+ {
324
+ value: response.headers.get("opc-work-request-id"),
325
+ key: "opcWorkRequestId",
326
+ dataType: "string"
327
+ },
328
+ {
329
+ value: response.headers.get("opc-request-id"),
330
+ key: "opcRequestId",
331
+ dataType: "string"
332
+ }
333
+ ]
334
+ });
335
+ return sdkResponse;
336
+ }
337
+ catch (err) {
338
+ throw err;
339
+ }
340
+ });
341
+ }
342
+ /**
343
+ * Deletes the specified BYOL.
344
+ *
345
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
346
+ * @param DeleteByolRequest
347
+ * @return DeleteByolResponse
348
+ * @throws OciError when an error occurs
349
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/ocvp/DeleteByol.ts.html |here} to see how to use DeleteByol API.
350
+ */
351
+ deleteByol(deleteByolRequest) {
352
+ return __awaiter(this, void 0, void 0, function* () {
353
+ if (this.logger)
354
+ this.logger.debug("Calling operation ByolClient#deleteByol.");
355
+ const operationName = "deleteByol";
356
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/vmware/20230701/BYOL/DeleteByol";
357
+ const pathParams = {
358
+ "{byolId}": deleteByolRequest.byolId
359
+ };
360
+ const queryParams = {};
361
+ let headerParams = {
362
+ "Content-Type": common.Constants.APPLICATION_JSON,
363
+ "if-match": deleteByolRequest.ifMatch,
364
+ "opc-request-id": deleteByolRequest.opcRequestId
365
+ };
366
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
367
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, deleteByolRequest.retryConfiguration, specRetryConfiguration);
368
+ if (this.logger)
369
+ retrier.logger = this.logger;
370
+ const request = yield oci_common_1.composeRequest({
371
+ baseEndpoint: this._endpoint,
372
+ defaultHeaders: this._defaultHeaders,
373
+ path: "/byols/{byolId}",
374
+ method: "DELETE",
375
+ pathParams: pathParams,
376
+ headerParams: headerParams,
377
+ queryParams: queryParams
378
+ });
379
+ try {
380
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
381
+ const sdkResponse = oci_common_1.composeResponse({
382
+ responseObject: {},
383
+ responseHeaders: [
384
+ {
385
+ value: response.headers.get("opc-work-request-id"),
386
+ key: "opcWorkRequestId",
387
+ dataType: "string"
388
+ },
389
+ {
390
+ value: response.headers.get("opc-request-id"),
391
+ key: "opcRequestId",
392
+ dataType: "string"
393
+ }
394
+ ]
395
+ });
396
+ return sdkResponse;
397
+ }
398
+ catch (err) {
399
+ throw err;
400
+ }
401
+ });
402
+ }
403
+ /**
404
+ * Gets the specified BYOL's information.
405
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
406
+ * @param GetByolRequest
407
+ * @return GetByolResponse
408
+ * @throws OciError when an error occurs
409
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/ocvp/GetByol.ts.html |here} to see how to use GetByol API.
410
+ */
411
+ getByol(getByolRequest) {
412
+ return __awaiter(this, void 0, void 0, function* () {
413
+ if (this.logger)
414
+ this.logger.debug("Calling operation ByolClient#getByol.");
415
+ const operationName = "getByol";
416
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/vmware/20230701/Byol/GetByol";
417
+ const pathParams = {
418
+ "{byolId}": getByolRequest.byolId
419
+ };
420
+ const queryParams = {};
421
+ let headerParams = {
422
+ "Content-Type": common.Constants.APPLICATION_JSON,
423
+ "opc-request-id": getByolRequest.opcRequestId
424
+ };
425
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
426
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getByolRequest.retryConfiguration, specRetryConfiguration);
427
+ if (this.logger)
428
+ retrier.logger = this.logger;
429
+ const request = yield oci_common_1.composeRequest({
430
+ baseEndpoint: this._endpoint,
431
+ defaultHeaders: this._defaultHeaders,
432
+ path: "/byols/{byolId}",
433
+ method: "GET",
434
+ pathParams: pathParams,
435
+ headerParams: headerParams,
436
+ queryParams: queryParams
437
+ });
438
+ try {
439
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
440
+ const sdkResponse = oci_common_1.composeResponse({
441
+ responseObject: {},
442
+ body: yield response.json(),
443
+ bodyKey: "byol",
444
+ bodyModel: model.Byol,
445
+ type: "model.Byol",
446
+ responseHeaders: [
447
+ {
448
+ value: response.headers.get("etag"),
449
+ key: "etag",
450
+ dataType: "string"
451
+ },
452
+ {
453
+ value: response.headers.get("opc-request-id"),
454
+ key: "opcRequestId",
455
+ dataType: "string"
456
+ }
457
+ ]
458
+ });
459
+ return sdkResponse;
460
+ }
461
+ catch (err) {
462
+ throw err;
463
+ }
464
+ });
465
+ }
466
+ /**
467
+ * Lists the BYOLs in the specified compartment. The list can be
468
+ * filtered by display name or availability domain.
469
+ *
470
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
471
+ * @param ListByolsRequest
472
+ * @return ListByolsResponse
473
+ * @throws OciError when an error occurs
474
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/ocvp/ListByols.ts.html |here} to see how to use ListByols API.
475
+ */
476
+ listByols(listByolsRequest) {
477
+ return __awaiter(this, void 0, void 0, function* () {
478
+ if (this.logger)
479
+ this.logger.debug("Calling operation ByolClient#listByols.");
480
+ const operationName = "listByols";
481
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/vmware/20230701/ByolSummary/ListByols";
482
+ const pathParams = {};
483
+ const queryParams = {
484
+ "compartmentId": listByolsRequest.compartmentId,
485
+ "byolId": listByolsRequest.byolId,
486
+ "lifecycleState": listByolsRequest.lifecycleState,
487
+ "softwareType": listByolsRequest.softwareType,
488
+ "availableUnitsGreaterThanOrEqualTo": listByolsRequest.availableUnitsGreaterThanOrEqualTo,
489
+ "displayName": listByolsRequest.displayName,
490
+ "limit": listByolsRequest.limit,
491
+ "page": listByolsRequest.page,
492
+ "sortOrder": listByolsRequest.sortOrder,
493
+ "sortBy": listByolsRequest.sortBy
494
+ };
495
+ let headerParams = {
496
+ "Content-Type": common.Constants.APPLICATION_JSON,
497
+ "opc-request-id": listByolsRequest.opcRequestId
498
+ };
499
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
500
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listByolsRequest.retryConfiguration, specRetryConfiguration);
501
+ if (this.logger)
502
+ retrier.logger = this.logger;
503
+ const request = yield oci_common_1.composeRequest({
504
+ baseEndpoint: this._endpoint,
505
+ defaultHeaders: this._defaultHeaders,
506
+ path: "/byols",
507
+ method: "GET",
508
+ pathParams: pathParams,
509
+ headerParams: headerParams,
510
+ queryParams: queryParams
511
+ });
512
+ try {
513
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
514
+ const sdkResponse = oci_common_1.composeResponse({
515
+ responseObject: {},
516
+ body: yield response.json(),
517
+ bodyKey: "byolCollection",
518
+ bodyModel: model.ByolCollection,
519
+ type: "model.ByolCollection",
520
+ responseHeaders: [
521
+ {
522
+ value: response.headers.get("opc-request-id"),
523
+ key: "opcRequestId",
524
+ dataType: "string"
525
+ },
526
+ {
527
+ value: response.headers.get("opc-next-page"),
528
+ key: "opcNextPage",
529
+ dataType: "string"
530
+ }
531
+ ]
532
+ });
533
+ return sdkResponse;
534
+ }
535
+ catch (err) {
536
+ throw err;
537
+ }
538
+ });
539
+ }
540
+ /**
541
+ * Retrieve realm-wide allocation status for a specified BYOL.
542
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
543
+ * @param RetrieveByolRealmAllocationsRequest
544
+ * @return RetrieveByolRealmAllocationsResponse
545
+ * @throws OciError when an error occurs
546
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/ocvp/RetrieveByolRealmAllocations.ts.html |here} to see how to use RetrieveByolRealmAllocations API.
547
+ */
548
+ retrieveByolRealmAllocations(retrieveByolRealmAllocationsRequest) {
549
+ return __awaiter(this, void 0, void 0, function* () {
550
+ if (this.logger)
551
+ this.logger.debug("Calling operation ByolClient#retrieveByolRealmAllocations.");
552
+ const operationName = "retrieveByolRealmAllocations";
553
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/vmware/20230701/Byol/RetrieveByolRealmAllocations";
554
+ const pathParams = {
555
+ "{byolId}": retrieveByolRealmAllocationsRequest.byolId
556
+ };
557
+ const queryParams = {
558
+ "limit": retrieveByolRealmAllocationsRequest.limit,
559
+ "page": retrieveByolRealmAllocationsRequest.page,
560
+ "sortOrder": retrieveByolRealmAllocationsRequest.sortOrder,
561
+ "sortBy": retrieveByolRealmAllocationsRequest.sortBy
562
+ };
563
+ let headerParams = {
564
+ "Content-Type": common.Constants.APPLICATION_JSON,
565
+ "opc-request-id": retrieveByolRealmAllocationsRequest.opcRequestId
566
+ };
567
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
568
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, retrieveByolRealmAllocationsRequest.retryConfiguration, specRetryConfiguration);
569
+ if (this.logger)
570
+ retrier.logger = this.logger;
571
+ const request = yield oci_common_1.composeRequest({
572
+ baseEndpoint: this._endpoint,
573
+ defaultHeaders: this._defaultHeaders,
574
+ path: "/byols/{byolId}/actions/retrieveByolRealmAllocations",
575
+ method: "POST",
576
+ pathParams: pathParams,
577
+ headerParams: headerParams,
578
+ queryParams: queryParams
579
+ });
580
+ try {
581
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
582
+ const sdkResponse = oci_common_1.composeResponse({
583
+ responseObject: {},
584
+ body: yield response.json(),
585
+ bodyKey: "byolRealmAllocationCollection",
586
+ bodyModel: model.ByolRealmAllocationCollection,
587
+ type: "model.ByolRealmAllocationCollection",
588
+ responseHeaders: [
589
+ {
590
+ value: response.headers.get("opc-next-page"),
591
+ key: "opcNextPage",
592
+ dataType: "string"
593
+ },
594
+ {
595
+ value: response.headers.get("opc-request-id"),
596
+ key: "opcRequestId",
597
+ dataType: "string"
598
+ }
599
+ ]
600
+ });
601
+ return sdkResponse;
602
+ }
603
+ catch (err) {
604
+ throw err;
605
+ }
606
+ });
607
+ }
608
+ /**
609
+ * Updates the specified BYOL.
610
+ *
611
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
612
+ * @param UpdateByolRequest
613
+ * @return UpdateByolResponse
614
+ * @throws OciError when an error occurs
615
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/ocvp/UpdateByol.ts.html |here} to see how to use UpdateByol API.
616
+ */
617
+ updateByol(updateByolRequest) {
618
+ return __awaiter(this, void 0, void 0, function* () {
619
+ if (this.logger)
620
+ this.logger.debug("Calling operation ByolClient#updateByol.");
621
+ const operationName = "updateByol";
622
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/vmware/20230701/Byol/UpdateByol";
623
+ const pathParams = {
624
+ "{byolId}": updateByolRequest.byolId
625
+ };
626
+ const queryParams = {};
627
+ let headerParams = {
628
+ "Content-Type": common.Constants.APPLICATION_JSON,
629
+ "if-match": updateByolRequest.ifMatch,
630
+ "opc-request-id": updateByolRequest.opcRequestId
631
+ };
632
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
633
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, updateByolRequest.retryConfiguration, specRetryConfiguration);
634
+ if (this.logger)
635
+ retrier.logger = this.logger;
636
+ const request = yield oci_common_1.composeRequest({
637
+ baseEndpoint: this._endpoint,
638
+ defaultHeaders: this._defaultHeaders,
639
+ path: "/byols/{byolId}",
640
+ method: "PUT",
641
+ bodyContent: common.ObjectSerializer.serialize(updateByolRequest.updateByolDetails, "UpdateByolDetails", model.UpdateByolDetails.getJsonObj),
642
+ pathParams: pathParams,
643
+ headerParams: headerParams,
644
+ queryParams: queryParams
645
+ });
646
+ try {
647
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
648
+ const sdkResponse = oci_common_1.composeResponse({
649
+ responseObject: {},
650
+ responseHeaders: [
651
+ {
652
+ value: response.headers.get("opc-work-request-id"),
653
+ key: "opcWorkRequestId",
654
+ dataType: "string"
655
+ },
656
+ {
657
+ value: response.headers.get("opc-request-id"),
658
+ key: "opcRequestId",
659
+ dataType: "string"
660
+ }
661
+ ]
662
+ });
663
+ return sdkResponse;
664
+ }
665
+ catch (err) {
666
+ throw err;
667
+ }
668
+ });
669
+ }
670
+ }
671
+ exports.ByolClient = ByolClient;
672
+ ByolClient.serviceEndpointTemplate = "https://ocvps.{region}.oci.{secondLevelDomain}";
673
+ ByolClient.endpointServiceName = "";
674
+ var ByolAllocationApiKeys;
675
+ (function (ByolAllocationApiKeys) {
676
+ })(ByolAllocationApiKeys = exports.ByolAllocationApiKeys || (exports.ByolAllocationApiKeys = {}));
677
+ /**
678
+ * This service client uses {@link common.CircuitBreaker.DefaultConfiguration} for all the operations by default if no circuit breaker configuration is defined by the user.
679
+ */
680
+ class ByolAllocationClient {
681
+ constructor(params, clientConfiguration) {
682
+ this["_realmSpecificEndpointTemplateEnabled"] = undefined;
683
+ this["_endpoint"] = "";
684
+ this["_defaultHeaders"] = {};
685
+ this._circuitBreaker = null;
686
+ this._httpOptions = undefined;
687
+ this._bodyDuplexMode = undefined;
688
+ this.targetService = "ByolAllocation";
689
+ this._regionId = "";
690
+ this._lastSetRegionOrRegionId = "";
691
+ const requestSigner = params.authenticationDetailsProvider
692
+ ? new common.DefaultRequestSigner(params.authenticationDetailsProvider)
693
+ : null;
694
+ this._authProvider = params.authenticationDetailsProvider;
695
+ if (clientConfiguration) {
696
+ this._clientConfiguration = clientConfiguration;
697
+ this._circuitBreaker = clientConfiguration.circuitBreaker
698
+ ? clientConfiguration.circuitBreaker.circuit
699
+ : null;
700
+ this._httpOptions = clientConfiguration.httpOptions
701
+ ? clientConfiguration.httpOptions
702
+ : undefined;
703
+ this._bodyDuplexMode = clientConfiguration.bodyDuplexMode
704
+ ? clientConfiguration.bodyDuplexMode
705
+ : undefined;
706
+ }
707
+ if (!oci_common_1.developerToolConfiguration.isServiceEnabled("ocvp")) {
708
+ 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 : ";
709
+ throw errmsg.concat("ocvp");
710
+ }
711
+ // if circuit breaker is not created, check if circuit breaker system is enabled to use default circuit breaker
712
+ const specCircuitBreakerEnabled = true;
713
+ if (!this._circuitBreaker &&
714
+ common.utils.isCircuitBreakerSystemEnabled(clientConfiguration) &&
715
+ (specCircuitBreakerEnabled || common.CircuitBreaker.DefaultCircuitBreakerOverriden)) {
716
+ this._circuitBreaker = new common.CircuitBreaker().circuit;
717
+ }
718
+ this._httpClient =
719
+ params.httpClient ||
720
+ new common.FetchHttpClient(requestSigner, this._circuitBreaker, this._httpOptions, this._bodyDuplexMode);
721
+ if (params.authenticationDetailsProvider &&
722
+ common.isRegionProvider(params.authenticationDetailsProvider)) {
723
+ const provider = params.authenticationDetailsProvider;
724
+ if (provider.getRegion()) {
725
+ this.region = provider.getRegion();
726
+ }
727
+ }
728
+ }
729
+ /**
730
+ * Get the endpoint that is being used to call (ex, https://www.example.com).
731
+ */
732
+ get endpoint() {
733
+ return this._endpoint;
734
+ }
735
+ /**
736
+ * Sets the endpoint to call (ex, https://www.example.com).
737
+ * @param endpoint The endpoint of the service.
738
+ */
739
+ set endpoint(endpoint) {
740
+ this._endpoint = endpoint;
741
+ this._endpoint = this._endpoint + "/20230701";
742
+ if (this.logger)
743
+ this.logger.info(`ByolAllocationClient endpoint set to ${this._endpoint}`);
744
+ }
745
+ get logger() {
746
+ return common.LOG.logger;
747
+ }
748
+ /**
749
+ * Determines whether realm specific endpoint should be used or not.
750
+ * Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false"
751
+ * @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template
752
+ */
753
+ set useRealmSpecificEndpointTemplate(realmSpecificEndpointTemplateEnabled) {
754
+ this._realmSpecificEndpointTemplateEnabled = realmSpecificEndpointTemplateEnabled;
755
+ if (this.logger)
756
+ this.logger.info(`realmSpecificEndpointTemplateEnabled set to ${this._realmSpecificEndpointTemplateEnabled}`);
757
+ if (this._lastSetRegionOrRegionId === common.Region.REGION_STRING) {
758
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegion(ByolAllocationClient.serviceEndpointTemplate, this._region, ByolAllocationClient.endpointServiceName);
759
+ }
760
+ else if (this._lastSetRegionOrRegionId === common.Region.REGION_ID_STRING) {
761
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(ByolAllocationClient.serviceEndpointTemplate, this._regionId, ByolAllocationClient.endpointServiceName);
762
+ }
763
+ }
764
+ /**
765
+ * Sets the region to call (ex, Region.US_PHOENIX_1).
766
+ * Note, this will call {@link #endpoint(String) endpoint} after resolving the endpoint.
767
+ * @param region The region of the service.
768
+ */
769
+ set region(region) {
770
+ this._region = region;
771
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegion(ByolAllocationClient.serviceEndpointTemplate, region, ByolAllocationClient.endpointServiceName);
772
+ this._lastSetRegionOrRegionId = common.Region.REGION_STRING;
773
+ }
774
+ /**
775
+ * Sets the regionId to call (ex, 'us-phoenix-1').
776
+ *
777
+ * Note, this will first try to map the region ID to a known Region and call {@link #region(Region) region}.
778
+ * If no known Region could be determined, it will create an endpoint assuming its in default Realm OC1
779
+ * and then call {@link #endpoint(String) endpoint}.
780
+ * @param regionId The public region ID.
781
+ */
782
+ set regionId(regionId) {
783
+ this._regionId = regionId;
784
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(ByolAllocationClient.serviceEndpointTemplate, regionId, ByolAllocationClient.endpointServiceName);
785
+ this._lastSetRegionOrRegionId = common.Region.REGION_ID_STRING;
786
+ }
787
+ /**
788
+ * Creates a new ByolAllocationWaiter for resources for this service.
789
+ *
790
+ * @param config The waiter configuration for termination and delay strategy
791
+ * @return The service waiters.
792
+ */
793
+ createWaiters(config) {
794
+ this._waiters = new byolallocation_waiter_1.ByolAllocationWaiter(this, config);
795
+ return this._waiters;
796
+ }
797
+ /**
798
+ * Gets the waiters available for resources for this service.
799
+ *
800
+ * @return The service waiters.
801
+ */
802
+ getWaiters() {
803
+ if (this._waiters) {
804
+ return this._waiters;
805
+ }
806
+ throw Error("Waiters do not exist. Please create waiters.");
807
+ }
808
+ /**
809
+ * Shutdown the circuit breaker used by the client when it is no longer needed
810
+ */
811
+ shutdownCircuitBreaker() {
812
+ if (this._circuitBreaker) {
813
+ this._circuitBreaker.shutdown();
814
+ }
815
+ }
816
+ /**
817
+ * Close the provider if possible which in turn shuts down any associated circuit breaker
818
+ */
819
+ closeProvider() {
820
+ if (this._authProvider) {
821
+ if (this._authProvider instanceof common.AbstractRequestingAuthenticationDetailsProvider)
822
+ (this._authProvider).closeProvider();
823
+ }
824
+ }
825
+ /**
826
+ * Close the client once it is no longer needed
827
+ */
828
+ close() {
829
+ this.shutdownCircuitBreaker();
830
+ this.closeProvider();
831
+ }
832
+ /**
833
+ * Moves an BYOL Allocation into a different compartment within the same tenancy. For information
834
+ * about moving resources between compartments, see
835
+ * [Moving Resources to a Different Compartment](https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).
836
+ *
837
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
838
+ * @param ChangeByolAllocationCompartmentRequest
839
+ * @return ChangeByolAllocationCompartmentResponse
840
+ * @throws OciError when an error occurs
841
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/ocvp/ChangeByolAllocationCompartment.ts.html |here} to see how to use ChangeByolAllocationCompartment API.
842
+ */
843
+ changeByolAllocationCompartment(changeByolAllocationCompartmentRequest) {
844
+ return __awaiter(this, void 0, void 0, function* () {
845
+ if (this.logger)
846
+ this.logger.debug("Calling operation ByolAllocationClient#changeByolAllocationCompartment.");
847
+ const operationName = "changeByolAllocationCompartment";
848
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/vmware/20230701/ByolAllocation/ChangeByolAllocationCompartment";
849
+ const pathParams = {
850
+ "{byolAllocationId}": changeByolAllocationCompartmentRequest.byolAllocationId
851
+ };
852
+ const queryParams = {};
853
+ let headerParams = {
854
+ "Content-Type": common.Constants.APPLICATION_JSON,
855
+ "if-match": changeByolAllocationCompartmentRequest.ifMatch,
856
+ "opc-request-id": changeByolAllocationCompartmentRequest.opcRequestId
857
+ };
858
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
859
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, changeByolAllocationCompartmentRequest.retryConfiguration, specRetryConfiguration);
860
+ if (this.logger)
861
+ retrier.logger = this.logger;
862
+ const request = yield oci_common_1.composeRequest({
863
+ baseEndpoint: this._endpoint,
864
+ defaultHeaders: this._defaultHeaders,
865
+ path: "/byolAllocations/{byolAllocationId}/actions/changeCompartment",
866
+ method: "POST",
867
+ bodyContent: common.ObjectSerializer.serialize(changeByolAllocationCompartmentRequest.changeByolAllocationCompartmentDetails, "ChangeByolAllocationCompartmentDetails", model.ChangeByolAllocationCompartmentDetails.getJsonObj),
868
+ pathParams: pathParams,
869
+ headerParams: headerParams,
870
+ queryParams: queryParams
871
+ });
872
+ try {
873
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
874
+ const sdkResponse = oci_common_1.composeResponse({
875
+ responseObject: {},
876
+ responseHeaders: [
877
+ {
878
+ value: response.headers.get("opc-request-id"),
879
+ key: "opcRequestId",
880
+ dataType: "string"
881
+ }
882
+ ]
883
+ });
884
+ return sdkResponse;
885
+ }
886
+ catch (err) {
887
+ throw err;
888
+ }
889
+ });
890
+ }
891
+ /**
892
+ * Creates an Allocation on an specific Bring-You-Own-License (BYOL).
893
+ * <p>
894
+ Use the {@link WorkRequest} operations to track the
895
+ * creation of the BYOL.
896
+ *
897
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
898
+ * @param CreateByolAllocationRequest
899
+ * @return CreateByolAllocationResponse
900
+ * @throws OciError when an error occurs
901
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/ocvp/CreateByolAllocation.ts.html |here} to see how to use CreateByolAllocation API.
902
+ */
903
+ createByolAllocation(createByolAllocationRequest) {
904
+ return __awaiter(this, void 0, void 0, function* () {
905
+ if (this.logger)
906
+ this.logger.debug("Calling operation ByolAllocationClient#createByolAllocation.");
907
+ const operationName = "createByolAllocation";
908
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/vmware/20230701/ByolAllocation/CreateByolAllocation";
909
+ const pathParams = {};
910
+ const queryParams = {};
911
+ let headerParams = {
912
+ "Content-Type": common.Constants.APPLICATION_JSON,
913
+ "opc-retry-token": createByolAllocationRequest.opcRetryToken,
914
+ "opc-request-id": createByolAllocationRequest.opcRequestId
915
+ };
916
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
917
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, createByolAllocationRequest.retryConfiguration, specRetryConfiguration);
918
+ if (this.logger)
919
+ retrier.logger = this.logger;
920
+ const request = yield oci_common_1.composeRequest({
921
+ baseEndpoint: this._endpoint,
922
+ defaultHeaders: this._defaultHeaders,
923
+ path: "/byolAllocations",
924
+ method: "POST",
925
+ bodyContent: common.ObjectSerializer.serialize(createByolAllocationRequest.createByolAllocationDetails, "CreateByolAllocationDetails", model.CreateByolAllocationDetails.getJsonObj),
926
+ pathParams: pathParams,
927
+ headerParams: headerParams,
928
+ queryParams: queryParams
929
+ });
930
+ try {
931
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
932
+ const sdkResponse = oci_common_1.composeResponse({
933
+ responseObject: {},
934
+ responseHeaders: [
935
+ {
936
+ value: response.headers.get("opc-work-request-id"),
937
+ key: "opcWorkRequestId",
938
+ dataType: "string"
939
+ },
940
+ {
941
+ value: response.headers.get("opc-request-id"),
942
+ key: "opcRequestId",
943
+ dataType: "string"
944
+ }
945
+ ]
946
+ });
947
+ return sdkResponse;
948
+ }
949
+ catch (err) {
950
+ throw err;
951
+ }
952
+ });
953
+ }
954
+ /**
955
+ * Deletes the specified BYOL Allocation.
956
+ *
957
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
958
+ * @param DeleteByolAllocationRequest
959
+ * @return DeleteByolAllocationResponse
960
+ * @throws OciError when an error occurs
961
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/ocvp/DeleteByolAllocation.ts.html |here} to see how to use DeleteByolAllocation API.
962
+ */
963
+ deleteByolAllocation(deleteByolAllocationRequest) {
964
+ return __awaiter(this, void 0, void 0, function* () {
965
+ if (this.logger)
966
+ this.logger.debug("Calling operation ByolAllocationClient#deleteByolAllocation.");
967
+ const operationName = "deleteByolAllocation";
968
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/vmware/20230701/ByolAllocation/DeleteByolAllocation";
969
+ const pathParams = {
970
+ "{byolAllocationId}": deleteByolAllocationRequest.byolAllocationId
971
+ };
972
+ const queryParams = {};
973
+ let headerParams = {
974
+ "Content-Type": common.Constants.APPLICATION_JSON,
975
+ "if-match": deleteByolAllocationRequest.ifMatch,
976
+ "opc-request-id": deleteByolAllocationRequest.opcRequestId
977
+ };
978
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
979
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, deleteByolAllocationRequest.retryConfiguration, specRetryConfiguration);
980
+ if (this.logger)
981
+ retrier.logger = this.logger;
982
+ const request = yield oci_common_1.composeRequest({
983
+ baseEndpoint: this._endpoint,
984
+ defaultHeaders: this._defaultHeaders,
985
+ path: "/byolAllocations/{byolAllocationId}",
986
+ method: "DELETE",
987
+ pathParams: pathParams,
988
+ headerParams: headerParams,
989
+ queryParams: queryParams
990
+ });
991
+ try {
992
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
993
+ const sdkResponse = oci_common_1.composeResponse({
994
+ responseObject: {},
995
+ responseHeaders: [
996
+ {
997
+ value: response.headers.get("opc-work-request-id"),
998
+ key: "opcWorkRequestId",
999
+ dataType: "string"
1000
+ },
1001
+ {
1002
+ value: response.headers.get("opc-request-id"),
1003
+ key: "opcRequestId",
1004
+ dataType: "string"
1005
+ }
1006
+ ]
1007
+ });
1008
+ return sdkResponse;
1009
+ }
1010
+ catch (err) {
1011
+ throw err;
1012
+ }
1013
+ });
1014
+ }
1015
+ /**
1016
+ * Gets the specified BYOL Allocation's information.
1017
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
1018
+ * @param GetByolAllocationRequest
1019
+ * @return GetByolAllocationResponse
1020
+ * @throws OciError when an error occurs
1021
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/ocvp/GetByolAllocation.ts.html |here} to see how to use GetByolAllocation API.
1022
+ */
1023
+ getByolAllocation(getByolAllocationRequest) {
1024
+ return __awaiter(this, void 0, void 0, function* () {
1025
+ if (this.logger)
1026
+ this.logger.debug("Calling operation ByolAllocationClient#getByolAllocation.");
1027
+ const operationName = "getByolAllocation";
1028
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/vmware/20230701/ByolAllocation/GetByolAllocation";
1029
+ const pathParams = {
1030
+ "{byolAllocationId}": getByolAllocationRequest.byolAllocationId
1031
+ };
1032
+ const queryParams = {};
1033
+ let headerParams = {
1034
+ "Content-Type": common.Constants.APPLICATION_JSON,
1035
+ "opc-request-id": getByolAllocationRequest.opcRequestId
1036
+ };
1037
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
1038
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getByolAllocationRequest.retryConfiguration, specRetryConfiguration);
1039
+ if (this.logger)
1040
+ retrier.logger = this.logger;
1041
+ const request = yield oci_common_1.composeRequest({
1042
+ baseEndpoint: this._endpoint,
1043
+ defaultHeaders: this._defaultHeaders,
1044
+ path: "/byolAllocations/{byolAllocationId}",
1045
+ method: "GET",
1046
+ pathParams: pathParams,
1047
+ headerParams: headerParams,
1048
+ queryParams: queryParams
1049
+ });
1050
+ try {
1051
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1052
+ const sdkResponse = oci_common_1.composeResponse({
1053
+ responseObject: {},
1054
+ body: yield response.json(),
1055
+ bodyKey: "byolAllocation",
1056
+ bodyModel: model.ByolAllocation,
1057
+ type: "model.ByolAllocation",
1058
+ responseHeaders: [
1059
+ {
1060
+ value: response.headers.get("etag"),
1061
+ key: "etag",
1062
+ dataType: "string"
1063
+ },
1064
+ {
1065
+ value: response.headers.get("opc-request-id"),
1066
+ key: "opcRequestId",
1067
+ dataType: "string"
1068
+ }
1069
+ ]
1070
+ });
1071
+ return sdkResponse;
1072
+ }
1073
+ catch (err) {
1074
+ throw err;
1075
+ }
1076
+ });
1077
+ }
1078
+ /**
1079
+ * Lists the BYOL Allocations in the specified compartment. The list can be
1080
+ * filtered by display name or availability domain.
1081
+ *
1082
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
1083
+ * @param ListByolAllocationsRequest
1084
+ * @return ListByolAllocationsResponse
1085
+ * @throws OciError when an error occurs
1086
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/ocvp/ListByolAllocations.ts.html |here} to see how to use ListByolAllocations API.
1087
+ */
1088
+ listByolAllocations(listByolAllocationsRequest) {
1089
+ return __awaiter(this, void 0, void 0, function* () {
1090
+ if (this.logger)
1091
+ this.logger.debug("Calling operation ByolAllocationClient#listByolAllocations.");
1092
+ const operationName = "listByolAllocations";
1093
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/vmware/20230701/ByolAllocationSummary/ListByolAllocations";
1094
+ const pathParams = {};
1095
+ const queryParams = {
1096
+ "compartmentId": listByolAllocationsRequest.compartmentId,
1097
+ "byolAllocationId": listByolAllocationsRequest.byolAllocationId,
1098
+ "lifecycleState": listByolAllocationsRequest.lifecycleState,
1099
+ "softwareType": listByolAllocationsRequest.softwareType,
1100
+ "availableUnitsGreaterThanOrEqualTo": listByolAllocationsRequest.availableUnitsGreaterThanOrEqualTo,
1101
+ "byolId": listByolAllocationsRequest.byolId,
1102
+ "displayName": listByolAllocationsRequest.displayName,
1103
+ "limit": listByolAllocationsRequest.limit,
1104
+ "page": listByolAllocationsRequest.page,
1105
+ "sortOrder": listByolAllocationsRequest.sortOrder,
1106
+ "sortBy": listByolAllocationsRequest.sortBy
1107
+ };
1108
+ let headerParams = {
1109
+ "Content-Type": common.Constants.APPLICATION_JSON,
1110
+ "opc-request-id": listByolAllocationsRequest.opcRequestId
1111
+ };
1112
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
1113
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listByolAllocationsRequest.retryConfiguration, specRetryConfiguration);
1114
+ if (this.logger)
1115
+ retrier.logger = this.logger;
1116
+ const request = yield oci_common_1.composeRequest({
1117
+ baseEndpoint: this._endpoint,
1118
+ defaultHeaders: this._defaultHeaders,
1119
+ path: "/byolAllocations",
1120
+ method: "GET",
1121
+ pathParams: pathParams,
1122
+ headerParams: headerParams,
1123
+ queryParams: queryParams
1124
+ });
1125
+ try {
1126
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1127
+ const sdkResponse = oci_common_1.composeResponse({
1128
+ responseObject: {},
1129
+ body: yield response.json(),
1130
+ bodyKey: "byolAllocationCollection",
1131
+ bodyModel: model.ByolAllocationCollection,
1132
+ type: "model.ByolAllocationCollection",
1133
+ responseHeaders: [
1134
+ {
1135
+ value: response.headers.get("opc-request-id"),
1136
+ key: "opcRequestId",
1137
+ dataType: "string"
1138
+ },
1139
+ {
1140
+ value: response.headers.get("opc-next-page"),
1141
+ key: "opcNextPage",
1142
+ dataType: "string"
1143
+ }
1144
+ ]
1145
+ });
1146
+ return sdkResponse;
1147
+ }
1148
+ catch (err) {
1149
+ throw err;
1150
+ }
1151
+ });
1152
+ }
1153
+ /**
1154
+ * Updates the specified BYOL Allocation.
1155
+ *
1156
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
1157
+ * @param UpdateByolAllocationRequest
1158
+ * @return UpdateByolAllocationResponse
1159
+ * @throws OciError when an error occurs
1160
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/ocvp/UpdateByolAllocation.ts.html |here} to see how to use UpdateByolAllocation API.
1161
+ */
1162
+ updateByolAllocation(updateByolAllocationRequest) {
1163
+ return __awaiter(this, void 0, void 0, function* () {
1164
+ if (this.logger)
1165
+ this.logger.debug("Calling operation ByolAllocationClient#updateByolAllocation.");
1166
+ const operationName = "updateByolAllocation";
1167
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/vmware/20230701/ByolAllocation/UpdateByolAllocation";
1168
+ const pathParams = {
1169
+ "{byolAllocationId}": updateByolAllocationRequest.byolAllocationId
1170
+ };
1171
+ const queryParams = {};
1172
+ let headerParams = {
1173
+ "Content-Type": common.Constants.APPLICATION_JSON,
1174
+ "if-match": updateByolAllocationRequest.ifMatch,
1175
+ "opc-request-id": updateByolAllocationRequest.opcRequestId
1176
+ };
1177
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
1178
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, updateByolAllocationRequest.retryConfiguration, specRetryConfiguration);
1179
+ if (this.logger)
1180
+ retrier.logger = this.logger;
1181
+ const request = yield oci_common_1.composeRequest({
1182
+ baseEndpoint: this._endpoint,
1183
+ defaultHeaders: this._defaultHeaders,
1184
+ path: "/byolAllocations/{byolAllocationId}",
1185
+ method: "PUT",
1186
+ bodyContent: common.ObjectSerializer.serialize(updateByolAllocationRequest.updateByolAllocationDetails, "UpdateByolAllocationDetails", model.UpdateByolAllocationDetails.getJsonObj),
1187
+ pathParams: pathParams,
1188
+ headerParams: headerParams,
1189
+ queryParams: queryParams
1190
+ });
1191
+ try {
1192
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1193
+ const sdkResponse = oci_common_1.composeResponse({
1194
+ responseObject: {},
1195
+ responseHeaders: [
1196
+ {
1197
+ value: response.headers.get("opc-work-request-id"),
1198
+ key: "opcWorkRequestId",
1199
+ dataType: "string"
1200
+ },
1201
+ {
1202
+ value: response.headers.get("opc-request-id"),
1203
+ key: "opcRequestId",
1204
+ dataType: "string"
1205
+ }
1206
+ ]
1207
+ });
1208
+ return sdkResponse;
1209
+ }
1210
+ catch (err) {
1211
+ throw err;
1212
+ }
1213
+ });
1214
+ }
1215
+ }
1216
+ exports.ByolAllocationClient = ByolAllocationClient;
1217
+ ByolAllocationClient.serviceEndpointTemplate = "https://ocvps.{region}.oci.{secondLevelDomain}";
1218
+ ByolAllocationClient.endpointServiceName = "";
60
1219
  var ClusterApiKeys;
61
1220
  (function (ClusterApiKeys) {
62
1221
  })(ClusterApiKeys = exports.ClusterApiKeys || (exports.ClusterApiKeys = {}));
@@ -3161,6 +4320,7 @@ class ManagementApplianceClient {
3161
4320
  const pathParams = {};
3162
4321
  const queryParams = {
3163
4322
  "managementApplianceId": listManagementAppliancesRequest.managementApplianceId,
4323
+ "sddcId": listManagementAppliancesRequest.sddcId,
3164
4324
  "compartmentId": listManagementAppliancesRequest.compartmentId,
3165
4325
  "displayName": listManagementAppliancesRequest.displayName,
3166
4326
  "lifecycleState": listManagementAppliancesRequest.lifecycleState,