oci-vbsinst 2.52.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/LICENSE.txt +89 -0
  2. package/NOTICE.txt +1 -0
  3. package/README.md +22 -0
  4. package/THIRD_PARTY_LICENSES.txt +576 -0
  5. package/index.d.ts +22 -0
  6. package/index.js +45 -0
  7. package/index.js.map +1 -0
  8. package/lib/client.d.ts +167 -0
  9. package/lib/client.js +804 -0
  10. package/lib/client.js.map +1 -0
  11. package/lib/model/action-type.d.ts +31 -0
  12. package/lib/model/action-type.js +42 -0
  13. package/lib/model/action-type.js.map +1 -0
  14. package/lib/model/change-vbs-instance-compartment-details.d.ts +27 -0
  15. package/lib/model/change-vbs-instance-compartment-details.js +29 -0
  16. package/lib/model/change-vbs-instance-compartment-details.js.map +1 -0
  17. package/lib/model/create-vbs-instance-details.d.ts +59 -0
  18. package/lib/model/create-vbs-instance-details.js +29 -0
  19. package/lib/model/create-vbs-instance-details.js.map +1 -0
  20. package/lib/model/index.d.ts +50 -0
  21. package/lib/model/index.js +73 -0
  22. package/lib/model/index.js.map +1 -0
  23. package/lib/model/lifecycle-state.d.ts +32 -0
  24. package/lib/model/lifecycle-state.js +43 -0
  25. package/lib/model/lifecycle-state.js.map +1 -0
  26. package/lib/model/operation-status.d.ts +32 -0
  27. package/lib/model/operation-status.js +43 -0
  28. package/lib/model/operation-status.js.map +1 -0
  29. package/lib/model/operation-type.d.ts +30 -0
  30. package/lib/model/operation-type.js +41 -0
  31. package/lib/model/operation-type.js.map +1 -0
  32. package/lib/model/sort-order.d.ts +23 -0
  33. package/lib/model/sort-order.js +34 -0
  34. package/lib/model/sort-order.js.map +1 -0
  35. package/lib/model/update-vbs-instance-details.d.ts +51 -0
  36. package/lib/model/update-vbs-instance-details.js +29 -0
  37. package/lib/model/update-vbs-instance-details.js.map +1 -0
  38. package/lib/model/vbs-instance-summary-collection.d.ts +26 -0
  39. package/lib/model/vbs-instance-summary-collection.js +61 -0
  40. package/lib/model/vbs-instance-summary-collection.js.map +1 -0
  41. package/lib/model/vbs-instance-summary.d.ts +86 -0
  42. package/lib/model/vbs-instance-summary.js +29 -0
  43. package/lib/model/vbs-instance-summary.js.map +1 -0
  44. package/lib/model/vbs-instance.d.ts +94 -0
  45. package/lib/model/vbs-instance.js +29 -0
  46. package/lib/model/vbs-instance.js.map +1 -0
  47. package/lib/model/work-request-error-collection.d.ts +26 -0
  48. package/lib/model/work-request-error-collection.js +61 -0
  49. package/lib/model/work-request-error-collection.js.map +1 -0
  50. package/lib/model/work-request-error.d.ts +35 -0
  51. package/lib/model/work-request-error.js +29 -0
  52. package/lib/model/work-request-error.js.map +1 -0
  53. package/lib/model/work-request-log-entry-collection.d.ts +26 -0
  54. package/lib/model/work-request-log-entry-collection.js +61 -0
  55. package/lib/model/work-request-log-entry-collection.js.map +1 -0
  56. package/lib/model/work-request-log-entry.d.ts +29 -0
  57. package/lib/model/work-request-log-entry.js +29 -0
  58. package/lib/model/work-request-log-entry.js.map +1 -0
  59. package/lib/model/work-request-resource.d.ts +42 -0
  60. package/lib/model/work-request-resource.js +29 -0
  61. package/lib/model/work-request-resource.js.map +1 -0
  62. package/lib/model/work-request-summary-collection.d.ts +26 -0
  63. package/lib/model/work-request-summary-collection.js +61 -0
  64. package/lib/model/work-request-summary-collection.js.map +1 -0
  65. package/lib/model/work-request-summary.d.ts +67 -0
  66. package/lib/model/work-request-summary.js +61 -0
  67. package/lib/model/work-request-summary.js.map +1 -0
  68. package/lib/model/work-request.d.ts +67 -0
  69. package/lib/model/work-request.js +61 -0
  70. package/lib/model/work-request.js.map +1 -0
  71. package/lib/request/change-vbs-instance-compartment-request.d.ts +40 -0
  72. package/lib/request/change-vbs-instance-compartment-request.js +15 -0
  73. package/lib/request/change-vbs-instance-compartment-request.js.map +1 -0
  74. package/lib/request/create-vbs-instance-request.d.ts +40 -0
  75. package/lib/request/create-vbs-instance-request.js +15 -0
  76. package/lib/request/create-vbs-instance-request.js.map +1 -0
  77. package/lib/request/delete-vbs-instance-request.d.ts +35 -0
  78. package/lib/request/delete-vbs-instance-request.js +15 -0
  79. package/lib/request/delete-vbs-instance-request.js.map +1 -0
  80. package/lib/request/get-vbs-instance-request.d.ts +26 -0
  81. package/lib/request/get-vbs-instance-request.js +15 -0
  82. package/lib/request/get-vbs-instance-request.js.map +1 -0
  83. package/lib/request/get-work-request-request.d.ts +26 -0
  84. package/lib/request/get-work-request-request.js +15 -0
  85. package/lib/request/get-work-request-request.js.map +1 -0
  86. package/lib/request/index.d.ts +32 -0
  87. package/lib/request/index.js +43 -0
  88. package/lib/request/index.js.map +1 -0
  89. package/lib/request/list-vbs-instances-request.d.ts +62 -0
  90. package/lib/request/list-vbs-instances-request.js +24 -0
  91. package/lib/request/list-vbs-instances-request.js.map +1 -0
  92. package/lib/request/list-work-request-errors-request.d.ts +49 -0
  93. package/lib/request/list-work-request-errors-request.js +23 -0
  94. package/lib/request/list-work-request-errors-request.js.map +1 -0
  95. package/lib/request/list-work-request-logs-request.d.ts +49 -0
  96. package/lib/request/list-work-request-logs-request.js +23 -0
  97. package/lib/request/list-work-request-logs-request.js.map +1 -0
  98. package/lib/request/list-work-requests-request.d.ts +53 -0
  99. package/lib/request/list-work-requests-request.js +23 -0
  100. package/lib/request/list-work-requests-request.js.map +1 -0
  101. package/lib/request/update-vbs-instance-request.d.ts +40 -0
  102. package/lib/request/update-vbs-instance-request.js +15 -0
  103. package/lib/request/update-vbs-instance-request.js.map +1 -0
  104. package/lib/response/change-vbs-instance-compartment-response.d.ts +25 -0
  105. package/lib/response/change-vbs-instance-compartment-response.js +15 -0
  106. package/lib/response/change-vbs-instance-compartment-response.js.map +1 -0
  107. package/lib/response/create-vbs-instance-response.d.ts +25 -0
  108. package/lib/response/create-vbs-instance-response.js +15 -0
  109. package/lib/response/create-vbs-instance-response.js.map +1 -0
  110. package/lib/response/delete-vbs-instance-response.d.ts +25 -0
  111. package/lib/response/delete-vbs-instance-response.js +15 -0
  112. package/lib/response/delete-vbs-instance-response.js.map +1 -0
  113. package/lib/response/get-vbs-instance-response.d.ts +30 -0
  114. package/lib/response/get-vbs-instance-response.js +15 -0
  115. package/lib/response/get-vbs-instance-response.js.map +1 -0
  116. package/lib/response/get-work-request-response.d.ts +29 -0
  117. package/lib/response/get-work-request-response.js +15 -0
  118. package/lib/response/get-work-request-response.js.map +1 -0
  119. package/lib/response/index.d.ts +32 -0
  120. package/lib/response/index.js +15 -0
  121. package/lib/response/index.js.map +1 -0
  122. package/lib/response/list-vbs-instances-response.d.ts +32 -0
  123. package/lib/response/list-vbs-instances-response.js +15 -0
  124. package/lib/response/list-vbs-instances-response.js.map +1 -0
  125. package/lib/response/list-work-request-errors-response.d.ts +32 -0
  126. package/lib/response/list-work-request-errors-response.js +15 -0
  127. package/lib/response/list-work-request-errors-response.js.map +1 -0
  128. package/lib/response/list-work-request-logs-response.d.ts +32 -0
  129. package/lib/response/list-work-request-logs-response.js +15 -0
  130. package/lib/response/list-work-request-logs-response.js.map +1 -0
  131. package/lib/response/list-work-requests-response.d.ts +32 -0
  132. package/lib/response/list-work-requests-response.js +15 -0
  133. package/lib/response/list-work-requests-response.js.map +1 -0
  134. package/lib/response/update-vbs-instance-response.d.ts +25 -0
  135. package/lib/response/update-vbs-instance-response.js +15 -0
  136. package/lib/response/update-vbs-instance-response.js.map +1 -0
  137. package/lib/vbsinstance-waiter.d.ts +36 -0
  138. package/lib/vbsinstance-waiter.js +76 -0
  139. package/lib/vbsinstance-waiter.js.map +1 -0
  140. package/package.json +29 -0
package/lib/client.js ADDED
@@ -0,0 +1,804 @@
1
+ "use strict";
2
+ /**
3
+ * VbsControlplaneInstance API
4
+ * A description of the VbsControlplaneInstance API
5
+ * OpenAPI spec version: 20180828
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OracleSDKGenerator.
9
+ * Do not edit the class manually.
10
+ *
11
+ * Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
12
+ * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
13
+ */
14
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
15
+ if (k2 === undefined) k2 = k;
16
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
17
+ }) : (function(o, m, k, k2) {
18
+ if (k2 === undefined) k2 = k;
19
+ o[k2] = m[k];
20
+ }));
21
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
22
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
23
+ }) : function(o, v) {
24
+ o["default"] = v;
25
+ });
26
+ var __importStar = (this && this.__importStar) || function (mod) {
27
+ if (mod && mod.__esModule) return mod;
28
+ var result = {};
29
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
30
+ __setModuleDefault(result, mod);
31
+ return result;
32
+ };
33
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
34
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
35
+ return new (P || (P = Promise))(function (resolve, reject) {
36
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
37
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
38
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
39
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
40
+ });
41
+ };
42
+ Object.defineProperty(exports, "__esModule", { value: true });
43
+ exports.VbsInstanceClient = exports.VbsInstanceApiKeys = void 0;
44
+ const common = require("oci-common");
45
+ const model = __importStar(require("./model"));
46
+ const vbsinstance_waiter_1 = require("./vbsinstance-waiter");
47
+ const oci_common_1 = require("oci-common");
48
+ // ===============================================
49
+ // This file is autogenerated - Please do not edit
50
+ // ===============================================
51
+ var VbsInstanceApiKeys;
52
+ (function (VbsInstanceApiKeys) {
53
+ })(VbsInstanceApiKeys = exports.VbsInstanceApiKeys || (exports.VbsInstanceApiKeys = {}));
54
+ /**
55
+ * This service client uses {@link common.CircuitBreaker.DefaultConfiguration} for all the operations by default if no circuit breaker configuration is defined by the user.
56
+ */
57
+ class VbsInstanceClient {
58
+ constructor(params, clientConfiguration) {
59
+ this["_endpoint"] = "";
60
+ this["_defaultHeaders"] = {};
61
+ this._circuitBreaker = null;
62
+ this._httpOptions = undefined;
63
+ this.targetService = "VbsInstance";
64
+ const requestSigner = params.authenticationDetailsProvider
65
+ ? new common.DefaultRequestSigner(params.authenticationDetailsProvider)
66
+ : null;
67
+ if (clientConfiguration) {
68
+ this._clientConfiguration = clientConfiguration;
69
+ this._circuitBreaker = clientConfiguration.circuitBreaker
70
+ ? clientConfiguration.circuitBreaker.circuit
71
+ : null;
72
+ this._httpOptions = clientConfiguration.httpOptions
73
+ ? clientConfiguration.httpOptions
74
+ : undefined;
75
+ }
76
+ // if circuit breaker is not created, check if circuit breaker system is enabled to use default circuit breaker
77
+ const specCircuitBreakerEnabled = true;
78
+ if (!this._circuitBreaker &&
79
+ common.utils.isCircuitBreakerSystemEnabled(clientConfiguration) &&
80
+ (specCircuitBreakerEnabled || common.CircuitBreaker.DefaultCircuitBreakerOverriden)) {
81
+ this._circuitBreaker = new common.CircuitBreaker().circuit;
82
+ }
83
+ this._httpClient =
84
+ params.httpClient ||
85
+ new common.FetchHttpClient(requestSigner, this._circuitBreaker, this._httpOptions);
86
+ if (params.authenticationDetailsProvider &&
87
+ common.isRegionProvider(params.authenticationDetailsProvider)) {
88
+ const provider = params.authenticationDetailsProvider;
89
+ if (provider.getRegion()) {
90
+ this.region = provider.getRegion();
91
+ }
92
+ }
93
+ }
94
+ /**
95
+ * Get the endpoint that is being used to call (ex, https://www.example.com).
96
+ */
97
+ get endpoint() {
98
+ return this._endpoint;
99
+ }
100
+ /**
101
+ * Sets the endpoint to call (ex, https://www.example.com).
102
+ * @param endpoint The endpoint of the service.
103
+ */
104
+ set endpoint(endpoint) {
105
+ this._endpoint = endpoint;
106
+ this._endpoint = this._endpoint + "/20180828";
107
+ if (this.logger)
108
+ this.logger.info(`VbsInstanceClient endpoint set to ${this._endpoint}`);
109
+ }
110
+ get logger() {
111
+ return common.LOG.logger;
112
+ }
113
+ /**
114
+ * Sets the region to call (ex, Region.US_PHOENIX_1).
115
+ * Note, this will call {@link #endpoint(String) endpoint} after resolving the endpoint.
116
+ * @param region The region of the service.
117
+ */
118
+ set region(region) {
119
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegion(VbsInstanceClient.serviceEndpointTemplate, region, VbsInstanceClient.endpointServiceName);
120
+ }
121
+ /**
122
+ * Sets the regionId to call (ex, 'us-phoenix-1').
123
+ *
124
+ * Note, this will first try to map the region ID to a known Region and call {@link #region(Region) region}.
125
+ * If no known Region could be determined, it will create an endpoint assuming its in default Realm OC1
126
+ * and then call {@link #endpoint(String) endpoint}.
127
+ * @param regionId The public region ID.
128
+ */
129
+ set regionId(regionId) {
130
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(VbsInstanceClient.serviceEndpointTemplate, regionId, VbsInstanceClient.endpointServiceName);
131
+ }
132
+ /**
133
+ * Creates a new VbsInstanceWaiter for resources for this service.
134
+ *
135
+ * @param config The waiter configuration for termination and delay strategy
136
+ * @return The service waiters.
137
+ */
138
+ createWaiters(config) {
139
+ this._waiters = new vbsinstance_waiter_1.VbsInstanceWaiter(this, config);
140
+ return this._waiters;
141
+ }
142
+ /**
143
+ * Gets the waiters available for resources for this service.
144
+ *
145
+ * @return The service waiters.
146
+ */
147
+ getWaiters() {
148
+ if (this._waiters) {
149
+ return this._waiters;
150
+ }
151
+ throw Error("Waiters do not exist. Please create waiters.");
152
+ }
153
+ /**
154
+ * Moves a VbsInstance resource from one compartment identifier to another. When provided, If-Match is checked against ETag values of the resource.
155
+ * This operation does not retry by default if the user has not defined a retry configuration.
156
+ * @param ChangeVbsInstanceCompartmentRequest
157
+ * @return ChangeVbsInstanceCompartmentResponse
158
+ * @throws OciError when an error occurs
159
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.52.0/vbsinst/ChangeVbsInstanceCompartment.ts.html |here} to see how to use ChangeVbsInstanceCompartment API.
160
+ */
161
+ changeVbsInstanceCompartment(changeVbsInstanceCompartmentRequest) {
162
+ return __awaiter(this, void 0, void 0, function* () {
163
+ if (this.logger)
164
+ this.logger.debug("Calling operation VbsInstanceClient#changeVbsInstanceCompartment.");
165
+ const operationName = "changeVbsInstanceCompartment";
166
+ const apiReferenceLink = "";
167
+ const pathParams = {
168
+ "{vbsInstanceId}": changeVbsInstanceCompartmentRequest.vbsInstanceId
169
+ };
170
+ const queryParams = {};
171
+ let headerParams = {
172
+ "Content-Type": common.Constants.APPLICATION_JSON,
173
+ "if-match": changeVbsInstanceCompartmentRequest.ifMatch,
174
+ "opc-request-id": changeVbsInstanceCompartmentRequest.opcRequestId
175
+ };
176
+ const specRetryConfiguration = common.NoRetryConfigurationDetails;
177
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, changeVbsInstanceCompartmentRequest.retryConfiguration, specRetryConfiguration);
178
+ if (this.logger)
179
+ retrier.logger = this.logger;
180
+ const request = yield oci_common_1.composeRequest({
181
+ baseEndpoint: this._endpoint,
182
+ defaultHeaders: this._defaultHeaders,
183
+ path: "/vbsInstances/{vbsInstanceId}/actions/changeCompartment",
184
+ method: "POST",
185
+ bodyContent: common.ObjectSerializer.serialize(changeVbsInstanceCompartmentRequest.changeVbsInstanceCompartmentDetails, "ChangeVbsInstanceCompartmentDetails", model.ChangeVbsInstanceCompartmentDetails.getJsonObj),
186
+ pathParams: pathParams,
187
+ headerParams: headerParams,
188
+ queryParams: queryParams
189
+ });
190
+ try {
191
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
192
+ const sdkResponse = oci_common_1.composeResponse({
193
+ responseObject: {},
194
+ responseHeaders: [
195
+ {
196
+ value: response.headers.get("opc-work-request-id"),
197
+ key: "opcWorkRequestId",
198
+ dataType: "string"
199
+ },
200
+ {
201
+ value: response.headers.get("opc-request-id"),
202
+ key: "opcRequestId",
203
+ dataType: "string"
204
+ }
205
+ ]
206
+ });
207
+ return sdkResponse;
208
+ }
209
+ catch (err) {
210
+ throw err;
211
+ }
212
+ });
213
+ }
214
+ /**
215
+ * Creates a new VbsInstance.
216
+ *
217
+ * This operation does not retry by default if the user has not defined a retry configuration.
218
+ * @param CreateVbsInstanceRequest
219
+ * @return CreateVbsInstanceResponse
220
+ * @throws OciError when an error occurs
221
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.52.0/vbsinst/CreateVbsInstance.ts.html |here} to see how to use CreateVbsInstance API.
222
+ */
223
+ createVbsInstance(createVbsInstanceRequest) {
224
+ return __awaiter(this, void 0, void 0, function* () {
225
+ if (this.logger)
226
+ this.logger.debug("Calling operation VbsInstanceClient#createVbsInstance.");
227
+ const operationName = "createVbsInstance";
228
+ const apiReferenceLink = "";
229
+ const pathParams = {};
230
+ const queryParams = {};
231
+ let headerParams = {
232
+ "Content-Type": common.Constants.APPLICATION_JSON,
233
+ "idcs-access-token": createVbsInstanceRequest.idcsAccessToken,
234
+ "opc-retry-token": createVbsInstanceRequest.opcRetryToken,
235
+ "opc-request-id": createVbsInstanceRequest.opcRequestId
236
+ };
237
+ const specRetryConfiguration = common.NoRetryConfigurationDetails;
238
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, createVbsInstanceRequest.retryConfiguration, specRetryConfiguration);
239
+ if (this.logger)
240
+ retrier.logger = this.logger;
241
+ const request = yield oci_common_1.composeRequest({
242
+ baseEndpoint: this._endpoint,
243
+ defaultHeaders: this._defaultHeaders,
244
+ path: "/vbsInstances",
245
+ method: "POST",
246
+ bodyContent: common.ObjectSerializer.serialize(createVbsInstanceRequest.createVbsInstanceDetails, "CreateVbsInstanceDetails", model.CreateVbsInstanceDetails.getJsonObj),
247
+ pathParams: pathParams,
248
+ headerParams: headerParams,
249
+ queryParams: queryParams
250
+ });
251
+ try {
252
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
253
+ const sdkResponse = oci_common_1.composeResponse({
254
+ responseObject: {},
255
+ responseHeaders: [
256
+ {
257
+ value: response.headers.get("opc-work-request-id"),
258
+ key: "opcWorkRequestId",
259
+ dataType: "string"
260
+ },
261
+ {
262
+ value: response.headers.get("opc-request-id"),
263
+ key: "opcRequestId",
264
+ dataType: "string"
265
+ }
266
+ ]
267
+ });
268
+ return sdkResponse;
269
+ }
270
+ catch (err) {
271
+ throw err;
272
+ }
273
+ });
274
+ }
275
+ /**
276
+ * Deletes a VbsInstance resource by identifier
277
+ * This operation does not retry by default if the user has not defined a retry configuration.
278
+ * @param DeleteVbsInstanceRequest
279
+ * @return DeleteVbsInstanceResponse
280
+ * @throws OciError when an error occurs
281
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.52.0/vbsinst/DeleteVbsInstance.ts.html |here} to see how to use DeleteVbsInstance API.
282
+ */
283
+ deleteVbsInstance(deleteVbsInstanceRequest) {
284
+ return __awaiter(this, void 0, void 0, function* () {
285
+ if (this.logger)
286
+ this.logger.debug("Calling operation VbsInstanceClient#deleteVbsInstance.");
287
+ const operationName = "deleteVbsInstance";
288
+ const apiReferenceLink = "";
289
+ const pathParams = {
290
+ "{vbsInstanceId}": deleteVbsInstanceRequest.vbsInstanceId
291
+ };
292
+ const queryParams = {};
293
+ let headerParams = {
294
+ "Content-Type": common.Constants.APPLICATION_JSON,
295
+ "if-match": deleteVbsInstanceRequest.ifMatch,
296
+ "opc-request-id": deleteVbsInstanceRequest.opcRequestId
297
+ };
298
+ const specRetryConfiguration = common.NoRetryConfigurationDetails;
299
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, deleteVbsInstanceRequest.retryConfiguration, specRetryConfiguration);
300
+ if (this.logger)
301
+ retrier.logger = this.logger;
302
+ const request = yield oci_common_1.composeRequest({
303
+ baseEndpoint: this._endpoint,
304
+ defaultHeaders: this._defaultHeaders,
305
+ path: "/vbsInstances/{vbsInstanceId}",
306
+ method: "DELETE",
307
+ pathParams: pathParams,
308
+ headerParams: headerParams,
309
+ queryParams: queryParams
310
+ });
311
+ try {
312
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
313
+ const sdkResponse = oci_common_1.composeResponse({
314
+ responseObject: {},
315
+ responseHeaders: [
316
+ {
317
+ value: response.headers.get("opc-work-request-id"),
318
+ key: "opcWorkRequestId",
319
+ dataType: "string"
320
+ },
321
+ {
322
+ value: response.headers.get("opc-request-id"),
323
+ key: "opcRequestId",
324
+ dataType: "string"
325
+ }
326
+ ]
327
+ });
328
+ return sdkResponse;
329
+ }
330
+ catch (err) {
331
+ throw err;
332
+ }
333
+ });
334
+ }
335
+ /**
336
+ * Gets a VbsInstance by identifier
337
+ * This operation does not retry by default if the user has not defined a retry configuration.
338
+ * @param GetVbsInstanceRequest
339
+ * @return GetVbsInstanceResponse
340
+ * @throws OciError when an error occurs
341
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.52.0/vbsinst/GetVbsInstance.ts.html |here} to see how to use GetVbsInstance API.
342
+ */
343
+ getVbsInstance(getVbsInstanceRequest) {
344
+ return __awaiter(this, void 0, void 0, function* () {
345
+ if (this.logger)
346
+ this.logger.debug("Calling operation VbsInstanceClient#getVbsInstance.");
347
+ const operationName = "getVbsInstance";
348
+ const apiReferenceLink = "";
349
+ const pathParams = {
350
+ "{vbsInstanceId}": getVbsInstanceRequest.vbsInstanceId
351
+ };
352
+ const queryParams = {};
353
+ let headerParams = {
354
+ "Content-Type": common.Constants.APPLICATION_JSON,
355
+ "opc-request-id": getVbsInstanceRequest.opcRequestId
356
+ };
357
+ const specRetryConfiguration = common.NoRetryConfigurationDetails;
358
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getVbsInstanceRequest.retryConfiguration, specRetryConfiguration);
359
+ if (this.logger)
360
+ retrier.logger = this.logger;
361
+ const request = yield oci_common_1.composeRequest({
362
+ baseEndpoint: this._endpoint,
363
+ defaultHeaders: this._defaultHeaders,
364
+ path: "/vbsInstances/{vbsInstanceId}",
365
+ method: "GET",
366
+ pathParams: pathParams,
367
+ headerParams: headerParams,
368
+ queryParams: queryParams
369
+ });
370
+ try {
371
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
372
+ const sdkResponse = oci_common_1.composeResponse({
373
+ responseObject: {},
374
+ body: yield response.json(),
375
+ bodyKey: "vbsInstance",
376
+ bodyModel: model.VbsInstance,
377
+ type: "model.VbsInstance",
378
+ responseHeaders: [
379
+ {
380
+ value: response.headers.get("etag"),
381
+ key: "etag",
382
+ dataType: "string"
383
+ },
384
+ {
385
+ value: response.headers.get("opc-request-id"),
386
+ key: "opcRequestId",
387
+ dataType: "string"
388
+ }
389
+ ]
390
+ });
391
+ return sdkResponse;
392
+ }
393
+ catch (err) {
394
+ throw err;
395
+ }
396
+ });
397
+ }
398
+ /**
399
+ * Gets the status of the work request with the given ID.
400
+ * This operation does not retry by default if the user has not defined a retry configuration.
401
+ * @param GetWorkRequestRequest
402
+ * @return GetWorkRequestResponse
403
+ * @throws OciError when an error occurs
404
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.52.0/vbsinst/GetWorkRequest.ts.html |here} to see how to use GetWorkRequest API.
405
+ */
406
+ getWorkRequest(getWorkRequestRequest) {
407
+ return __awaiter(this, void 0, void 0, function* () {
408
+ if (this.logger)
409
+ this.logger.debug("Calling operation VbsInstanceClient#getWorkRequest.");
410
+ const operationName = "getWorkRequest";
411
+ const apiReferenceLink = "";
412
+ const pathParams = {
413
+ "{workRequestId}": getWorkRequestRequest.workRequestId
414
+ };
415
+ const queryParams = {};
416
+ let headerParams = {
417
+ "Content-Type": common.Constants.APPLICATION_JSON,
418
+ "opc-request-id": getWorkRequestRequest.opcRequestId
419
+ };
420
+ const specRetryConfiguration = common.NoRetryConfigurationDetails;
421
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getWorkRequestRequest.retryConfiguration, specRetryConfiguration);
422
+ if (this.logger)
423
+ retrier.logger = this.logger;
424
+ const request = yield oci_common_1.composeRequest({
425
+ baseEndpoint: this._endpoint,
426
+ defaultHeaders: this._defaultHeaders,
427
+ path: "/workRequests/{workRequestId}",
428
+ method: "GET",
429
+ pathParams: pathParams,
430
+ headerParams: headerParams,
431
+ queryParams: queryParams
432
+ });
433
+ try {
434
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
435
+ const sdkResponse = oci_common_1.composeResponse({
436
+ responseObject: {},
437
+ body: yield response.json(),
438
+ bodyKey: "workRequest",
439
+ bodyModel: model.WorkRequest,
440
+ type: "model.WorkRequest",
441
+ responseHeaders: [
442
+ {
443
+ value: response.headers.get("opc-request-id"),
444
+ key: "opcRequestId",
445
+ dataType: "string"
446
+ },
447
+ {
448
+ value: response.headers.get("retry-after"),
449
+ key: "retryAfter",
450
+ dataType: "number"
451
+ }
452
+ ]
453
+ });
454
+ return sdkResponse;
455
+ }
456
+ catch (err) {
457
+ throw err;
458
+ }
459
+ });
460
+ }
461
+ /**
462
+ * Returns a list of VbsInstances.
463
+ *
464
+ * This operation does not retry by default if the user has not defined a retry configuration.
465
+ * @param ListVbsInstancesRequest
466
+ * @return ListVbsInstancesResponse
467
+ * @throws OciError when an error occurs
468
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.52.0/vbsinst/ListVbsInstances.ts.html |here} to see how to use ListVbsInstances API.
469
+ */
470
+ listVbsInstances(listVbsInstancesRequest) {
471
+ return __awaiter(this, void 0, void 0, function* () {
472
+ if (this.logger)
473
+ this.logger.debug("Calling operation VbsInstanceClient#listVbsInstances.");
474
+ const operationName = "listVbsInstances";
475
+ const apiReferenceLink = "";
476
+ const pathParams = {};
477
+ const queryParams = {
478
+ "compartmentId": listVbsInstancesRequest.compartmentId,
479
+ "lifecycleState": listVbsInstancesRequest.lifecycleState,
480
+ "id": listVbsInstancesRequest.id,
481
+ "name": listVbsInstancesRequest.name,
482
+ "limit": listVbsInstancesRequest.limit,
483
+ "page": listVbsInstancesRequest.page,
484
+ "sortOrder": listVbsInstancesRequest.sortOrder,
485
+ "sortBy": listVbsInstancesRequest.sortBy
486
+ };
487
+ let headerParams = {
488
+ "Content-Type": common.Constants.APPLICATION_JSON,
489
+ "opc-request-id": listVbsInstancesRequest.opcRequestId
490
+ };
491
+ const specRetryConfiguration = common.NoRetryConfigurationDetails;
492
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listVbsInstancesRequest.retryConfiguration, specRetryConfiguration);
493
+ if (this.logger)
494
+ retrier.logger = this.logger;
495
+ const request = yield oci_common_1.composeRequest({
496
+ baseEndpoint: this._endpoint,
497
+ defaultHeaders: this._defaultHeaders,
498
+ path: "/vbsInstances",
499
+ method: "GET",
500
+ pathParams: pathParams,
501
+ headerParams: headerParams,
502
+ queryParams: queryParams
503
+ });
504
+ try {
505
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
506
+ const sdkResponse = oci_common_1.composeResponse({
507
+ responseObject: {},
508
+ body: yield response.json(),
509
+ bodyKey: "vbsInstanceSummaryCollection",
510
+ bodyModel: model.VbsInstanceSummaryCollection,
511
+ type: "model.VbsInstanceSummaryCollection",
512
+ responseHeaders: [
513
+ {
514
+ value: response.headers.get("opc-request-id"),
515
+ key: "opcRequestId",
516
+ dataType: "string"
517
+ },
518
+ {
519
+ value: response.headers.get("opc-next-page"),
520
+ key: "opcNextPage",
521
+ dataType: "string"
522
+ }
523
+ ]
524
+ });
525
+ return sdkResponse;
526
+ }
527
+ catch (err) {
528
+ throw err;
529
+ }
530
+ });
531
+ }
532
+ /**
533
+ * Return a (paginated) list of errors for a given work request.
534
+ *
535
+ * This operation does not retry by default if the user has not defined a retry configuration.
536
+ * @param ListWorkRequestErrorsRequest
537
+ * @return ListWorkRequestErrorsResponse
538
+ * @throws OciError when an error occurs
539
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.52.0/vbsinst/ListWorkRequestErrors.ts.html |here} to see how to use ListWorkRequestErrors API.
540
+ */
541
+ listWorkRequestErrors(listWorkRequestErrorsRequest) {
542
+ return __awaiter(this, void 0, void 0, function* () {
543
+ if (this.logger)
544
+ this.logger.debug("Calling operation VbsInstanceClient#listWorkRequestErrors.");
545
+ const operationName = "listWorkRequestErrors";
546
+ const apiReferenceLink = "";
547
+ const pathParams = {
548
+ "{workRequestId}": listWorkRequestErrorsRequest.workRequestId
549
+ };
550
+ const queryParams = {
551
+ "page": listWorkRequestErrorsRequest.page,
552
+ "limit": listWorkRequestErrorsRequest.limit,
553
+ "sortBy": listWorkRequestErrorsRequest.sortBy,
554
+ "sortOrder": listWorkRequestErrorsRequest.sortOrder
555
+ };
556
+ let headerParams = {
557
+ "Content-Type": common.Constants.APPLICATION_JSON,
558
+ "opc-request-id": listWorkRequestErrorsRequest.opcRequestId
559
+ };
560
+ const specRetryConfiguration = common.NoRetryConfigurationDetails;
561
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listWorkRequestErrorsRequest.retryConfiguration, specRetryConfiguration);
562
+ if (this.logger)
563
+ retrier.logger = this.logger;
564
+ const request = yield oci_common_1.composeRequest({
565
+ baseEndpoint: this._endpoint,
566
+ defaultHeaders: this._defaultHeaders,
567
+ path: "/workRequests/{workRequestId}/errors",
568
+ method: "GET",
569
+ pathParams: pathParams,
570
+ headerParams: headerParams,
571
+ queryParams: queryParams
572
+ });
573
+ try {
574
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
575
+ const sdkResponse = oci_common_1.composeResponse({
576
+ responseObject: {},
577
+ body: yield response.json(),
578
+ bodyKey: "workRequestErrorCollection",
579
+ bodyModel: model.WorkRequestErrorCollection,
580
+ type: "model.WorkRequestErrorCollection",
581
+ responseHeaders: [
582
+ {
583
+ value: response.headers.get("opc-next-page"),
584
+ key: "opcNextPage",
585
+ dataType: "string"
586
+ },
587
+ {
588
+ value: response.headers.get("opc-request-id"),
589
+ key: "opcRequestId",
590
+ dataType: "string"
591
+ }
592
+ ]
593
+ });
594
+ return sdkResponse;
595
+ }
596
+ catch (err) {
597
+ throw err;
598
+ }
599
+ });
600
+ }
601
+ /**
602
+ * Return a (paginated) list of logs for a given work request.
603
+ *
604
+ * This operation does not retry by default if the user has not defined a retry configuration.
605
+ * @param ListWorkRequestLogsRequest
606
+ * @return ListWorkRequestLogsResponse
607
+ * @throws OciError when an error occurs
608
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.52.0/vbsinst/ListWorkRequestLogs.ts.html |here} to see how to use ListWorkRequestLogs API.
609
+ */
610
+ listWorkRequestLogs(listWorkRequestLogsRequest) {
611
+ return __awaiter(this, void 0, void 0, function* () {
612
+ if (this.logger)
613
+ this.logger.debug("Calling operation VbsInstanceClient#listWorkRequestLogs.");
614
+ const operationName = "listWorkRequestLogs";
615
+ const apiReferenceLink = "";
616
+ const pathParams = {
617
+ "{workRequestId}": listWorkRequestLogsRequest.workRequestId
618
+ };
619
+ const queryParams = {
620
+ "page": listWorkRequestLogsRequest.page,
621
+ "limit": listWorkRequestLogsRequest.limit,
622
+ "sortBy": listWorkRequestLogsRequest.sortBy,
623
+ "sortOrder": listWorkRequestLogsRequest.sortOrder
624
+ };
625
+ let headerParams = {
626
+ "Content-Type": common.Constants.APPLICATION_JSON,
627
+ "opc-request-id": listWorkRequestLogsRequest.opcRequestId
628
+ };
629
+ const specRetryConfiguration = common.NoRetryConfigurationDetails;
630
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listWorkRequestLogsRequest.retryConfiguration, specRetryConfiguration);
631
+ if (this.logger)
632
+ retrier.logger = this.logger;
633
+ const request = yield oci_common_1.composeRequest({
634
+ baseEndpoint: this._endpoint,
635
+ defaultHeaders: this._defaultHeaders,
636
+ path: "/workRequests/{workRequestId}/logs",
637
+ method: "GET",
638
+ pathParams: pathParams,
639
+ headerParams: headerParams,
640
+ queryParams: queryParams
641
+ });
642
+ try {
643
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
644
+ const sdkResponse = oci_common_1.composeResponse({
645
+ responseObject: {},
646
+ body: yield response.json(),
647
+ bodyKey: "workRequestLogEntryCollection",
648
+ bodyModel: model.WorkRequestLogEntryCollection,
649
+ type: "model.WorkRequestLogEntryCollection",
650
+ responseHeaders: [
651
+ {
652
+ value: response.headers.get("opc-next-page"),
653
+ key: "opcNextPage",
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
+ * Lists the work requests in a compartment.
672
+ *
673
+ * This operation does not retry by default if the user has not defined a retry configuration.
674
+ * @param ListWorkRequestsRequest
675
+ * @return ListWorkRequestsResponse
676
+ * @throws OciError when an error occurs
677
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.52.0/vbsinst/ListWorkRequests.ts.html |here} to see how to use ListWorkRequests API.
678
+ */
679
+ listWorkRequests(listWorkRequestsRequest) {
680
+ return __awaiter(this, void 0, void 0, function* () {
681
+ if (this.logger)
682
+ this.logger.debug("Calling operation VbsInstanceClient#listWorkRequests.");
683
+ const operationName = "listWorkRequests";
684
+ const apiReferenceLink = "";
685
+ const pathParams = {};
686
+ const queryParams = {
687
+ "compartmentId": listWorkRequestsRequest.compartmentId,
688
+ "workRequestId": listWorkRequestsRequest.workRequestId,
689
+ "page": listWorkRequestsRequest.page,
690
+ "limit": listWorkRequestsRequest.limit,
691
+ "sortOrder": listWorkRequestsRequest.sortOrder,
692
+ "sortBy": listWorkRequestsRequest.sortBy
693
+ };
694
+ let headerParams = {
695
+ "Content-Type": common.Constants.APPLICATION_JSON,
696
+ "opc-request-id": listWorkRequestsRequest.opcRequestId
697
+ };
698
+ const specRetryConfiguration = common.NoRetryConfigurationDetails;
699
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listWorkRequestsRequest.retryConfiguration, specRetryConfiguration);
700
+ if (this.logger)
701
+ retrier.logger = this.logger;
702
+ const request = yield oci_common_1.composeRequest({
703
+ baseEndpoint: this._endpoint,
704
+ defaultHeaders: this._defaultHeaders,
705
+ path: "/workRequests",
706
+ method: "GET",
707
+ pathParams: pathParams,
708
+ headerParams: headerParams,
709
+ queryParams: queryParams
710
+ });
711
+ try {
712
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
713
+ const sdkResponse = oci_common_1.composeResponse({
714
+ responseObject: {},
715
+ body: yield response.json(),
716
+ bodyKey: "workRequestSummaryCollection",
717
+ bodyModel: model.WorkRequestSummaryCollection,
718
+ type: "model.WorkRequestSummaryCollection",
719
+ responseHeaders: [
720
+ {
721
+ value: response.headers.get("opc-request-id"),
722
+ key: "opcRequestId",
723
+ dataType: "string"
724
+ },
725
+ {
726
+ value: response.headers.get("opc-next-page"),
727
+ key: "opcNextPage",
728
+ dataType: "string"
729
+ }
730
+ ]
731
+ });
732
+ return sdkResponse;
733
+ }
734
+ catch (err) {
735
+ throw err;
736
+ }
737
+ });
738
+ }
739
+ /**
740
+ * Updates the VbsInstance
741
+ * This operation does not retry by default if the user has not defined a retry configuration.
742
+ * @param UpdateVbsInstanceRequest
743
+ * @return UpdateVbsInstanceResponse
744
+ * @throws OciError when an error occurs
745
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.52.0/vbsinst/UpdateVbsInstance.ts.html |here} to see how to use UpdateVbsInstance API.
746
+ */
747
+ updateVbsInstance(updateVbsInstanceRequest) {
748
+ return __awaiter(this, void 0, void 0, function* () {
749
+ if (this.logger)
750
+ this.logger.debug("Calling operation VbsInstanceClient#updateVbsInstance.");
751
+ const operationName = "updateVbsInstance";
752
+ const apiReferenceLink = "";
753
+ const pathParams = {
754
+ "{vbsInstanceId}": updateVbsInstanceRequest.vbsInstanceId
755
+ };
756
+ const queryParams = {};
757
+ let headerParams = {
758
+ "Content-Type": common.Constants.APPLICATION_JSON,
759
+ "if-match": updateVbsInstanceRequest.ifMatch,
760
+ "opc-request-id": updateVbsInstanceRequest.opcRequestId
761
+ };
762
+ const specRetryConfiguration = common.NoRetryConfigurationDetails;
763
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, updateVbsInstanceRequest.retryConfiguration, specRetryConfiguration);
764
+ if (this.logger)
765
+ retrier.logger = this.logger;
766
+ const request = yield oci_common_1.composeRequest({
767
+ baseEndpoint: this._endpoint,
768
+ defaultHeaders: this._defaultHeaders,
769
+ path: "/vbsInstances/{vbsInstanceId}",
770
+ method: "PUT",
771
+ bodyContent: common.ObjectSerializer.serialize(updateVbsInstanceRequest.updateVbsInstanceDetails, "UpdateVbsInstanceDetails", model.UpdateVbsInstanceDetails.getJsonObj),
772
+ pathParams: pathParams,
773
+ headerParams: headerParams,
774
+ queryParams: queryParams
775
+ });
776
+ try {
777
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
778
+ const sdkResponse = oci_common_1.composeResponse({
779
+ responseObject: {},
780
+ responseHeaders: [
781
+ {
782
+ value: response.headers.get("opc-work-request-id"),
783
+ key: "opcWorkRequestId",
784
+ dataType: "string"
785
+ },
786
+ {
787
+ value: response.headers.get("opc-request-id"),
788
+ key: "opcRequestId",
789
+ dataType: "string"
790
+ }
791
+ ]
792
+ });
793
+ return sdkResponse;
794
+ }
795
+ catch (err) {
796
+ throw err;
797
+ }
798
+ });
799
+ }
800
+ }
801
+ exports.VbsInstanceClient = VbsInstanceClient;
802
+ VbsInstanceClient.serviceEndpointTemplate = "https://vbstudio.{region}.ocp.{secondLevelDomain}";
803
+ VbsInstanceClient.endpointServiceName = "";
804
+ //# sourceMappingURL=client.js.map