oci-apiplatform 2.114.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 (146) 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/apiplatform-waiter.d.ts +36 -0
  9. package/lib/apiplatform-waiter.js +76 -0
  10. package/lib/apiplatform-waiter.js.map +1 -0
  11. package/lib/client.d.ts +195 -0
  12. package/lib/client.js +888 -0
  13. package/lib/client.js.map +1 -0
  14. package/lib/model/action-type.d.ts +32 -0
  15. package/lib/model/action-type.js +43 -0
  16. package/lib/model/action-type.js.map +1 -0
  17. package/lib/model/api-platform-instance-collection.d.ts +26 -0
  18. package/lib/model/api-platform-instance-collection.js +61 -0
  19. package/lib/model/api-platform-instance-collection.js.map +1 -0
  20. package/lib/model/api-platform-instance-summary.d.ts +85 -0
  21. package/lib/model/api-platform-instance-summary.js +29 -0
  22. package/lib/model/api-platform-instance-summary.js.map +1 -0
  23. package/lib/model/api-platform-instance.d.ts +105 -0
  24. package/lib/model/api-platform-instance.js +69 -0
  25. package/lib/model/api-platform-instance.js.map +1 -0
  26. package/lib/model/change-api-platform-instance-compartment-details.d.ts +26 -0
  27. package/lib/model/change-api-platform-instance-compartment-details.js +29 -0
  28. package/lib/model/change-api-platform-instance-compartment-details.js.map +1 -0
  29. package/lib/model/create-api-platform-instance-details.d.ts +52 -0
  30. package/lib/model/create-api-platform-instance-details.js +29 -0
  31. package/lib/model/create-api-platform-instance-details.js.map +1 -0
  32. package/lib/model/idcs-app.d.ts +25 -0
  33. package/lib/model/idcs-app.js +29 -0
  34. package/lib/model/idcs-app.js.map +1 -0
  35. package/lib/model/index.d.ts +54 -0
  36. package/lib/model/index.js +77 -0
  37. package/lib/model/index.js.map +1 -0
  38. package/lib/model/operation-status.d.ts +34 -0
  39. package/lib/model/operation-status.js +45 -0
  40. package/lib/model/operation-status.js.map +1 -0
  41. package/lib/model/operation-type.d.ts +30 -0
  42. package/lib/model/operation-type.js +41 -0
  43. package/lib/model/operation-type.js.map +1 -0
  44. package/lib/model/sort-order.d.ts +30 -0
  45. package/lib/model/sort-order.js +41 -0
  46. package/lib/model/sort-order.js.map +1 -0
  47. package/lib/model/update-api-platform-instance-details.d.ts +43 -0
  48. package/lib/model/update-api-platform-instance-details.js +29 -0
  49. package/lib/model/update-api-platform-instance-details.js.map +1 -0
  50. package/lib/model/uris.d.ts +29 -0
  51. package/lib/model/uris.js +29 -0
  52. package/lib/model/uris.js.map +1 -0
  53. package/lib/model/work-request-error-collection.d.ts +26 -0
  54. package/lib/model/work-request-error-collection.js +61 -0
  55. package/lib/model/work-request-error-collection.js.map +1 -0
  56. package/lib/model/work-request-error.d.ts +37 -0
  57. package/lib/model/work-request-error.js +29 -0
  58. package/lib/model/work-request-error.js.map +1 -0
  59. package/lib/model/work-request-log-entry-collection.d.ts +26 -0
  60. package/lib/model/work-request-log-entry-collection.js +61 -0
  61. package/lib/model/work-request-log-entry-collection.js.map +1 -0
  62. package/lib/model/work-request-log-entry.d.ts +31 -0
  63. package/lib/model/work-request-log-entry.js +29 -0
  64. package/lib/model/work-request-log-entry.js.map +1 -0
  65. package/lib/model/work-request-resource-metadata-key.d.ts +27 -0
  66. package/lib/model/work-request-resource-metadata-key.js +38 -0
  67. package/lib/model/work-request-resource-metadata-key.js.map +1 -0
  68. package/lib/model/work-request-resource.d.ts +48 -0
  69. package/lib/model/work-request-resource.js +29 -0
  70. package/lib/model/work-request-resource.js.map +1 -0
  71. package/lib/model/work-request-summary-collection.d.ts +26 -0
  72. package/lib/model/work-request-summary-collection.js +61 -0
  73. package/lib/model/work-request-summary-collection.js.map +1 -0
  74. package/lib/model/work-request-summary.d.ts +73 -0
  75. package/lib/model/work-request-summary.js +61 -0
  76. package/lib/model/work-request-summary.js.map +1 -0
  77. package/lib/model/work-request.d.ts +76 -0
  78. package/lib/model/work-request.js +61 -0
  79. package/lib/model/work-request.js.map +1 -0
  80. package/lib/request/change-api-platform-instance-compartment-request.d.ts +52 -0
  81. package/lib/request/change-api-platform-instance-compartment-request.js +15 -0
  82. package/lib/request/change-api-platform-instance-compartment-request.js.map +1 -0
  83. package/lib/request/create-api-platform-instance-request.d.ts +40 -0
  84. package/lib/request/create-api-platform-instance-request.js +15 -0
  85. package/lib/request/create-api-platform-instance-request.js.map +1 -0
  86. package/lib/request/delete-api-platform-instance-request.d.ts +38 -0
  87. package/lib/request/delete-api-platform-instance-request.js +15 -0
  88. package/lib/request/delete-api-platform-instance-request.js.map +1 -0
  89. package/lib/request/get-api-platform-instance-request.d.ts +30 -0
  90. package/lib/request/get-api-platform-instance-request.js +15 -0
  91. package/lib/request/get-api-platform-instance-request.js.map +1 -0
  92. package/lib/request/get-work-request-request.d.ts +30 -0
  93. package/lib/request/get-work-request-request.js +15 -0
  94. package/lib/request/get-work-request-request.js.map +1 -0
  95. package/lib/request/index.d.ts +32 -0
  96. package/lib/request/index.js +43 -0
  97. package/lib/request/index.js.map +1 -0
  98. package/lib/request/list-api-platform-instances-request.d.ts +75 -0
  99. package/lib/request/list-api-platform-instances-request.js +24 -0
  100. package/lib/request/list-api-platform-instances-request.js.map +1 -0
  101. package/lib/request/list-work-request-errors-request.d.ts +59 -0
  102. package/lib/request/list-work-request-errors-request.js +23 -0
  103. package/lib/request/list-work-request-errors-request.js.map +1 -0
  104. package/lib/request/list-work-request-logs-request.d.ts +59 -0
  105. package/lib/request/list-work-request-logs-request.js +23 -0
  106. package/lib/request/list-work-request-logs-request.js.map +1 -0
  107. package/lib/request/list-work-requests-request.d.ts +71 -0
  108. package/lib/request/list-work-requests-request.js +23 -0
  109. package/lib/request/list-work-requests-request.js.map +1 -0
  110. package/lib/request/update-api-platform-instance-request.d.ts +43 -0
  111. package/lib/request/update-api-platform-instance-request.js +15 -0
  112. package/lib/request/update-api-platform-instance-request.js.map +1 -0
  113. package/lib/response/change-api-platform-instance-compartment-response.d.ts +20 -0
  114. package/lib/response/change-api-platform-instance-compartment-response.js +15 -0
  115. package/lib/response/change-api-platform-instance-compartment-response.js.map +1 -0
  116. package/lib/response/create-api-platform-instance-response.d.ts +44 -0
  117. package/lib/response/create-api-platform-instance-response.js +15 -0
  118. package/lib/response/create-api-platform-instance-response.js.map +1 -0
  119. package/lib/response/delete-api-platform-instance-response.d.ts +26 -0
  120. package/lib/response/delete-api-platform-instance-response.js +15 -0
  121. package/lib/response/delete-api-platform-instance-response.js.map +1 -0
  122. package/lib/response/get-api-platform-instance-response.d.ts +30 -0
  123. package/lib/response/get-api-platform-instance-response.js +15 -0
  124. package/lib/response/get-api-platform-instance-response.js.map +1 -0
  125. package/lib/response/get-work-request-response.d.ts +34 -0
  126. package/lib/response/get-work-request-response.js +15 -0
  127. package/lib/response/get-work-request-response.js.map +1 -0
  128. package/lib/response/index.d.ts +32 -0
  129. package/lib/response/index.js +15 -0
  130. package/lib/response/index.js.map +1 -0
  131. package/lib/response/list-api-platform-instances-response.d.ts +31 -0
  132. package/lib/response/list-api-platform-instances-response.js +15 -0
  133. package/lib/response/list-api-platform-instances-response.js.map +1 -0
  134. package/lib/response/list-work-request-errors-response.d.ts +31 -0
  135. package/lib/response/list-work-request-errors-response.js +15 -0
  136. package/lib/response/list-work-request-errors-response.js.map +1 -0
  137. package/lib/response/list-work-request-logs-response.d.ts +31 -0
  138. package/lib/response/list-work-request-logs-response.js +15 -0
  139. package/lib/response/list-work-request-logs-response.js.map +1 -0
  140. package/lib/response/list-work-requests-response.d.ts +31 -0
  141. package/lib/response/list-work-requests-response.js +15 -0
  142. package/lib/response/list-work-requests-response.js.map +1 -0
  143. package/lib/response/update-api-platform-instance-response.d.ts +30 -0
  144. package/lib/response/update-api-platform-instance-response.js +15 -0
  145. package/lib/response/update-api-platform-instance-response.js.map +1 -0
  146. package/package.json +29 -0
package/lib/client.js ADDED
@@ -0,0 +1,888 @@
1
+ "use strict";
2
+ /**
3
+ * APIP Control Plane API
4
+ * Control Plane designed to manage lifecycle of APIP Instances
5
+ * OpenAPI spec version: 20240829
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OracleSDKGenerator.
9
+ * Do not edit the class manually.
10
+ *
11
+ * Copyright (c) 2020, 2025, 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.ApiPlatformClient = exports.ApiPlatformApiKeys = void 0;
44
+ const common = require("oci-common");
45
+ const model = __importStar(require("./model"));
46
+ const apiplatform_waiter_1 = require("./apiplatform-waiter");
47
+ const oci_common_1 = require("oci-common");
48
+ const Breaker = require("opossum");
49
+ // ===============================================
50
+ // This file is autogenerated - Please do not edit
51
+ // ===============================================
52
+ var ApiPlatformApiKeys;
53
+ (function (ApiPlatformApiKeys) {
54
+ })(ApiPlatformApiKeys = exports.ApiPlatformApiKeys || (exports.ApiPlatformApiKeys = {}));
55
+ /**
56
+ * This service client uses {@link common.CircuitBreaker.DefaultConfiguration} for all the operations by default if no circuit breaker configuration is defined by the user.
57
+ */
58
+ class ApiPlatformClient {
59
+ constructor(params, clientConfiguration) {
60
+ this["_realmSpecificEndpointTemplateEnabled"] = undefined;
61
+ this["_endpoint"] = "";
62
+ this["_defaultHeaders"] = {};
63
+ this._circuitBreaker = null;
64
+ this._httpOptions = undefined;
65
+ this._bodyDuplexMode = undefined;
66
+ this.targetService = "ApiPlatform";
67
+ this._regionId = "";
68
+ this._lastSetRegionOrRegionId = "";
69
+ const requestSigner = params.authenticationDetailsProvider
70
+ ? new common.DefaultRequestSigner(params.authenticationDetailsProvider)
71
+ : null;
72
+ this._authProvider = params.authenticationDetailsProvider;
73
+ if (clientConfiguration) {
74
+ this._clientConfiguration = clientConfiguration;
75
+ this._circuitBreaker = clientConfiguration.circuitBreaker
76
+ ? clientConfiguration.circuitBreaker.circuit
77
+ : null;
78
+ this._httpOptions = clientConfiguration.httpOptions
79
+ ? clientConfiguration.httpOptions
80
+ : undefined;
81
+ this._bodyDuplexMode = clientConfiguration.bodyDuplexMode
82
+ ? clientConfiguration.bodyDuplexMode
83
+ : undefined;
84
+ }
85
+ if (!oci_common_1.developerToolConfiguration.isServiceEnabled("apiplatform")) {
86
+ 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 : ";
87
+ throw errmsg.concat("apiplatform");
88
+ }
89
+ // if circuit breaker is not created, check if circuit breaker system is enabled to use default circuit breaker
90
+ const specCircuitBreakerEnabled = true;
91
+ if (!this._circuitBreaker &&
92
+ common.utils.isCircuitBreakerSystemEnabled(clientConfiguration) &&
93
+ (specCircuitBreakerEnabled || common.CircuitBreaker.DefaultCircuitBreakerOverriden)) {
94
+ this._circuitBreaker = new common.CircuitBreaker().circuit;
95
+ }
96
+ this._httpClient =
97
+ params.httpClient ||
98
+ new common.FetchHttpClient(requestSigner, this._circuitBreaker, this._httpOptions, this._bodyDuplexMode);
99
+ if (params.authenticationDetailsProvider &&
100
+ common.isRegionProvider(params.authenticationDetailsProvider)) {
101
+ const provider = params.authenticationDetailsProvider;
102
+ if (provider.getRegion()) {
103
+ this.region = provider.getRegion();
104
+ }
105
+ }
106
+ }
107
+ /**
108
+ * Get the endpoint that is being used to call (ex, https://www.example.com).
109
+ */
110
+ get endpoint() {
111
+ return this._endpoint;
112
+ }
113
+ /**
114
+ * Sets the endpoint to call (ex, https://www.example.com).
115
+ * @param endpoint The endpoint of the service.
116
+ */
117
+ set endpoint(endpoint) {
118
+ this._endpoint = endpoint;
119
+ this._endpoint = this._endpoint + "/20240829";
120
+ if (this.logger)
121
+ this.logger.info(`ApiPlatformClient endpoint set to ${this._endpoint}`);
122
+ }
123
+ get logger() {
124
+ return common.LOG.logger;
125
+ }
126
+ /**
127
+ * Determines whether realm specific endpoint should be used or not.
128
+ * Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false"
129
+ * @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template
130
+ */
131
+ set useRealmSpecificEndpointTemplate(realmSpecificEndpointTemplateEnabled) {
132
+ this._realmSpecificEndpointTemplateEnabled = realmSpecificEndpointTemplateEnabled;
133
+ if (this.logger)
134
+ this.logger.info(`realmSpecificEndpointTemplateEnabled set to ${this._realmSpecificEndpointTemplateEnabled}`);
135
+ if (this._lastSetRegionOrRegionId === common.Region.REGION_STRING) {
136
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegion(ApiPlatformClient.serviceEndpointTemplate, this._region, ApiPlatformClient.endpointServiceName);
137
+ }
138
+ else if (this._lastSetRegionOrRegionId === common.Region.REGION_ID_STRING) {
139
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(ApiPlatformClient.serviceEndpointTemplate, this._regionId, ApiPlatformClient.endpointServiceName);
140
+ }
141
+ }
142
+ /**
143
+ * Sets the region to call (ex, Region.US_PHOENIX_1).
144
+ * Note, this will call {@link #endpoint(String) endpoint} after resolving the endpoint.
145
+ * @param region The region of the service.
146
+ */
147
+ set region(region) {
148
+ this._region = region;
149
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegion(ApiPlatformClient.serviceEndpointTemplate, region, ApiPlatformClient.endpointServiceName);
150
+ this._lastSetRegionOrRegionId = common.Region.REGION_STRING;
151
+ }
152
+ /**
153
+ * Sets the regionId to call (ex, 'us-phoenix-1').
154
+ *
155
+ * Note, this will first try to map the region ID to a known Region and call {@link #region(Region) region}.
156
+ * If no known Region could be determined, it will create an endpoint assuming its in default Realm OC1
157
+ * and then call {@link #endpoint(String) endpoint}.
158
+ * @param regionId The public region ID.
159
+ */
160
+ set regionId(regionId) {
161
+ this._regionId = regionId;
162
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(ApiPlatformClient.serviceEndpointTemplate, regionId, ApiPlatformClient.endpointServiceName);
163
+ this._lastSetRegionOrRegionId = common.Region.REGION_ID_STRING;
164
+ }
165
+ /**
166
+ * Creates a new ApiPlatformWaiter for resources for this service.
167
+ *
168
+ * @param config The waiter configuration for termination and delay strategy
169
+ * @return The service waiters.
170
+ */
171
+ createWaiters(config) {
172
+ this._waiters = new apiplatform_waiter_1.ApiPlatformWaiter(this, config);
173
+ return this._waiters;
174
+ }
175
+ /**
176
+ * Gets the waiters available for resources for this service.
177
+ *
178
+ * @return The service waiters.
179
+ */
180
+ getWaiters() {
181
+ if (this._waiters) {
182
+ return this._waiters;
183
+ }
184
+ throw Error("Waiters do not exist. Please create waiters.");
185
+ }
186
+ /**
187
+ * Shutdown the circuit breaker used by the client when it is no longer needed
188
+ */
189
+ shutdownCircuitBreaker() {
190
+ if (this._circuitBreaker) {
191
+ this._circuitBreaker.shutdown();
192
+ }
193
+ }
194
+ /**
195
+ * Close the provider if possible which in turn shuts down any associated circuit breaker
196
+ */
197
+ closeProvider() {
198
+ if (this._authProvider) {
199
+ if (this._authProvider instanceof common.AbstractRequestingAuthenticationDetailsProvider)
200
+ (this._authProvider).closeProvider();
201
+ }
202
+ }
203
+ /**
204
+ * Close the client once it is no longer needed
205
+ */
206
+ close() {
207
+ this.shutdownCircuitBreaker();
208
+ this.closeProvider();
209
+ }
210
+ /**
211
+ * Moves an API Platform Instance into a different compartment within the same tenancy. For information about moving resources between
212
+ * compartments, see [Moving Resources to a Different Compartment](https://docs.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).
213
+ *
214
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
215
+ * @param ChangeApiPlatformInstanceCompartmentRequest
216
+ * @return ChangeApiPlatformInstanceCompartmentResponse
217
+ * @throws OciError when an error occurs
218
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/apiplatform/ChangeApiPlatformInstanceCompartment.ts.html |here} to see how to use ChangeApiPlatformInstanceCompartment API.
219
+ */
220
+ changeApiPlatformInstanceCompartment(changeApiPlatformInstanceCompartmentRequest) {
221
+ return __awaiter(this, void 0, void 0, function* () {
222
+ if (this.logger)
223
+ this.logger.debug("Calling operation ApiPlatformClient#changeApiPlatformInstanceCompartment.");
224
+ const operationName = "changeApiPlatformInstanceCompartment";
225
+ const apiReferenceLink = "";
226
+ const pathParams = {
227
+ "{apiPlatformInstanceId}": changeApiPlatformInstanceCompartmentRequest.apiPlatformInstanceId
228
+ };
229
+ const queryParams = {};
230
+ let headerParams = {
231
+ "Content-Type": common.Constants.APPLICATION_JSON,
232
+ "if-match": changeApiPlatformInstanceCompartmentRequest.ifMatch,
233
+ "opc-retry-token": changeApiPlatformInstanceCompartmentRequest.opcRetryToken,
234
+ "opc-request-id": changeApiPlatformInstanceCompartmentRequest.opcRequestId
235
+ };
236
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
237
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, changeApiPlatformInstanceCompartmentRequest.retryConfiguration, specRetryConfiguration);
238
+ if (this.logger)
239
+ retrier.logger = this.logger;
240
+ const request = yield oci_common_1.composeRequest({
241
+ baseEndpoint: this._endpoint,
242
+ defaultHeaders: this._defaultHeaders,
243
+ path: "/apiPlatformInstances/{apiPlatformInstanceId}/actions/changeCompartment",
244
+ method: "POST",
245
+ bodyContent: common.ObjectSerializer.serialize(changeApiPlatformInstanceCompartmentRequest.changeApiPlatformInstanceCompartmentDetails, "ChangeApiPlatformInstanceCompartmentDetails", model.ChangeApiPlatformInstanceCompartmentDetails.getJsonObj),
246
+ pathParams: pathParams,
247
+ headerParams: headerParams,
248
+ queryParams: queryParams
249
+ });
250
+ try {
251
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
252
+ const sdkResponse = oci_common_1.composeResponse({
253
+ responseObject: {},
254
+ responseHeaders: [
255
+ {
256
+ value: response.headers.get("opc-request-id"),
257
+ key: "opcRequestId",
258
+ dataType: "string"
259
+ }
260
+ ]
261
+ });
262
+ return sdkResponse;
263
+ }
264
+ catch (err) {
265
+ throw err;
266
+ }
267
+ });
268
+ }
269
+ /**
270
+ * Creates an API Platform Instance
271
+ *
272
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
273
+ * @param CreateApiPlatformInstanceRequest
274
+ * @return CreateApiPlatformInstanceResponse
275
+ * @throws OciError when an error occurs
276
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/apiplatform/CreateApiPlatformInstance.ts.html |here} to see how to use CreateApiPlatformInstance API.
277
+ */
278
+ createApiPlatformInstance(createApiPlatformInstanceRequest) {
279
+ return __awaiter(this, void 0, void 0, function* () {
280
+ if (this.logger)
281
+ this.logger.debug("Calling operation ApiPlatformClient#createApiPlatformInstance.");
282
+ const operationName = "createApiPlatformInstance";
283
+ const apiReferenceLink = "";
284
+ const pathParams = {};
285
+ const queryParams = {};
286
+ let headerParams = {
287
+ "Content-Type": common.Constants.APPLICATION_JSON,
288
+ "opc-retry-token": createApiPlatformInstanceRequest.opcRetryToken,
289
+ "opc-request-id": createApiPlatformInstanceRequest.opcRequestId
290
+ };
291
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
292
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, createApiPlatformInstanceRequest.retryConfiguration, specRetryConfiguration);
293
+ if (this.logger)
294
+ retrier.logger = this.logger;
295
+ const request = yield oci_common_1.composeRequest({
296
+ baseEndpoint: this._endpoint,
297
+ defaultHeaders: this._defaultHeaders,
298
+ path: "/apiPlatformInstances",
299
+ method: "POST",
300
+ bodyContent: common.ObjectSerializer.serialize(createApiPlatformInstanceRequest.createApiPlatformInstanceDetails, "CreateApiPlatformInstanceDetails", model.CreateApiPlatformInstanceDetails.getJsonObj),
301
+ pathParams: pathParams,
302
+ headerParams: headerParams,
303
+ queryParams: queryParams
304
+ });
305
+ try {
306
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
307
+ const sdkResponse = oci_common_1.composeResponse({
308
+ responseObject: {},
309
+ body: yield response.json(),
310
+ bodyKey: "apiPlatformInstance",
311
+ bodyModel: model.ApiPlatformInstance,
312
+ type: "model.ApiPlatformInstance",
313
+ responseHeaders: [
314
+ {
315
+ value: response.headers.get("location"),
316
+ key: "location",
317
+ dataType: "string"
318
+ },
319
+ {
320
+ value: response.headers.get("content-location"),
321
+ key: "contentLocation",
322
+ dataType: "string"
323
+ },
324
+ {
325
+ value: response.headers.get("etag"),
326
+ key: "etag",
327
+ dataType: "string"
328
+ },
329
+ {
330
+ value: response.headers.get("opc-work-request-id"),
331
+ key: "opcWorkRequestId",
332
+ dataType: "string"
333
+ },
334
+ {
335
+ value: response.headers.get("opc-request-id"),
336
+ key: "opcRequestId",
337
+ dataType: "string"
338
+ }
339
+ ]
340
+ });
341
+ return sdkResponse;
342
+ }
343
+ catch (err) {
344
+ throw err;
345
+ }
346
+ });
347
+ }
348
+ /**
349
+ * Deletes an API Platform Instance
350
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
351
+ * @param DeleteApiPlatformInstanceRequest
352
+ * @return DeleteApiPlatformInstanceResponse
353
+ * @throws OciError when an error occurs
354
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/apiplatform/DeleteApiPlatformInstance.ts.html |here} to see how to use DeleteApiPlatformInstance API.
355
+ */
356
+ deleteApiPlatformInstance(deleteApiPlatformInstanceRequest) {
357
+ return __awaiter(this, void 0, void 0, function* () {
358
+ if (this.logger)
359
+ this.logger.debug("Calling operation ApiPlatformClient#deleteApiPlatformInstance.");
360
+ const operationName = "deleteApiPlatformInstance";
361
+ const apiReferenceLink = "";
362
+ const pathParams = {
363
+ "{apiPlatformInstanceId}": deleteApiPlatformInstanceRequest.apiPlatformInstanceId
364
+ };
365
+ const queryParams = {};
366
+ let headerParams = {
367
+ "Content-Type": common.Constants.APPLICATION_JSON,
368
+ "if-match": deleteApiPlatformInstanceRequest.ifMatch,
369
+ "opc-request-id": deleteApiPlatformInstanceRequest.opcRequestId
370
+ };
371
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
372
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, deleteApiPlatformInstanceRequest.retryConfiguration, specRetryConfiguration);
373
+ if (this.logger)
374
+ retrier.logger = this.logger;
375
+ const request = yield oci_common_1.composeRequest({
376
+ baseEndpoint: this._endpoint,
377
+ defaultHeaders: this._defaultHeaders,
378
+ path: "/apiPlatformInstances/{apiPlatformInstanceId}",
379
+ method: "DELETE",
380
+ pathParams: pathParams,
381
+ headerParams: headerParams,
382
+ queryParams: queryParams
383
+ });
384
+ try {
385
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
386
+ const sdkResponse = oci_common_1.composeResponse({
387
+ responseObject: {},
388
+ responseHeaders: [
389
+ {
390
+ value: response.headers.get("opc-work-request-id"),
391
+ key: "opcWorkRequestId",
392
+ dataType: "string"
393
+ },
394
+ {
395
+ value: response.headers.get("opc-request-id"),
396
+ key: "opcRequestId",
397
+ dataType: "string"
398
+ }
399
+ ]
400
+ });
401
+ return sdkResponse;
402
+ }
403
+ catch (err) {
404
+ throw err;
405
+ }
406
+ });
407
+ }
408
+ /**
409
+ * Gets information about an API Platform Instance
410
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
411
+ * @param GetApiPlatformInstanceRequest
412
+ * @return GetApiPlatformInstanceResponse
413
+ * @throws OciError when an error occurs
414
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/apiplatform/GetApiPlatformInstance.ts.html |here} to see how to use GetApiPlatformInstance API.
415
+ */
416
+ getApiPlatformInstance(getApiPlatformInstanceRequest) {
417
+ return __awaiter(this, void 0, void 0, function* () {
418
+ if (this.logger)
419
+ this.logger.debug("Calling operation ApiPlatformClient#getApiPlatformInstance.");
420
+ const operationName = "getApiPlatformInstance";
421
+ const apiReferenceLink = "";
422
+ const pathParams = {
423
+ "{apiPlatformInstanceId}": getApiPlatformInstanceRequest.apiPlatformInstanceId
424
+ };
425
+ const queryParams = {};
426
+ let headerParams = {
427
+ "Content-Type": common.Constants.APPLICATION_JSON,
428
+ "opc-request-id": getApiPlatformInstanceRequest.opcRequestId
429
+ };
430
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
431
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getApiPlatformInstanceRequest.retryConfiguration, specRetryConfiguration);
432
+ if (this.logger)
433
+ retrier.logger = this.logger;
434
+ const request = yield oci_common_1.composeRequest({
435
+ baseEndpoint: this._endpoint,
436
+ defaultHeaders: this._defaultHeaders,
437
+ path: "/apiPlatformInstances/{apiPlatformInstanceId}",
438
+ method: "GET",
439
+ pathParams: pathParams,
440
+ headerParams: headerParams,
441
+ queryParams: queryParams
442
+ });
443
+ try {
444
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
445
+ const sdkResponse = oci_common_1.composeResponse({
446
+ responseObject: {},
447
+ body: yield response.json(),
448
+ bodyKey: "apiPlatformInstance",
449
+ bodyModel: model.ApiPlatformInstance,
450
+ type: "model.ApiPlatformInstance",
451
+ responseHeaders: [
452
+ {
453
+ value: response.headers.get("etag"),
454
+ key: "etag",
455
+ dataType: "string"
456
+ },
457
+ {
458
+ value: response.headers.get("opc-request-id"),
459
+ key: "opcRequestId",
460
+ dataType: "string"
461
+ }
462
+ ]
463
+ });
464
+ return sdkResponse;
465
+ }
466
+ catch (err) {
467
+ throw err;
468
+ }
469
+ });
470
+ }
471
+ /**
472
+ * Gets the details of a work request.
473
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
474
+ * @param GetWorkRequestRequest
475
+ * @return GetWorkRequestResponse
476
+ * @throws OciError when an error occurs
477
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/apiplatform/GetWorkRequest.ts.html |here} to see how to use GetWorkRequest API.
478
+ */
479
+ getWorkRequest(getWorkRequestRequest) {
480
+ return __awaiter(this, void 0, void 0, function* () {
481
+ if (this.logger)
482
+ this.logger.debug("Calling operation ApiPlatformClient#getWorkRequest.");
483
+ const operationName = "getWorkRequest";
484
+ const apiReferenceLink = "";
485
+ const pathParams = {
486
+ "{workRequestId}": getWorkRequestRequest.workRequestId
487
+ };
488
+ const queryParams = {};
489
+ let headerParams = {
490
+ "Content-Type": common.Constants.APPLICATION_JSON,
491
+ "opc-request-id": getWorkRequestRequest.opcRequestId
492
+ };
493
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
494
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getWorkRequestRequest.retryConfiguration, specRetryConfiguration);
495
+ if (this.logger)
496
+ retrier.logger = this.logger;
497
+ const request = yield oci_common_1.composeRequest({
498
+ baseEndpoint: this._endpoint,
499
+ defaultHeaders: this._defaultHeaders,
500
+ path: "/workRequests/{workRequestId}",
501
+ method: "GET",
502
+ pathParams: pathParams,
503
+ headerParams: headerParams,
504
+ queryParams: queryParams
505
+ });
506
+ try {
507
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
508
+ const sdkResponse = oci_common_1.composeResponse({
509
+ responseObject: {},
510
+ body: yield response.json(),
511
+ bodyKey: "workRequest",
512
+ bodyModel: model.WorkRequest,
513
+ type: "model.WorkRequest",
514
+ responseHeaders: [
515
+ {
516
+ value: response.headers.get("etag"),
517
+ key: "etag",
518
+ dataType: "string"
519
+ },
520
+ {
521
+ value: response.headers.get("opc-request-id"),
522
+ key: "opcRequestId",
523
+ dataType: "string"
524
+ },
525
+ {
526
+ value: response.headers.get("retry-after"),
527
+ key: "retryAfter",
528
+ dataType: "number"
529
+ }
530
+ ]
531
+ });
532
+ return sdkResponse;
533
+ }
534
+ catch (err) {
535
+ throw err;
536
+ }
537
+ });
538
+ }
539
+ /**
540
+ * Gets a list of API Platform Instances
541
+ *
542
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
543
+ * @param ListApiPlatformInstancesRequest
544
+ * @return ListApiPlatformInstancesResponse
545
+ * @throws OciError when an error occurs
546
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/apiplatform/ListApiPlatformInstances.ts.html |here} to see how to use ListApiPlatformInstances API.
547
+ */
548
+ listApiPlatformInstances(listApiPlatformInstancesRequest) {
549
+ return __awaiter(this, void 0, void 0, function* () {
550
+ if (this.logger)
551
+ this.logger.debug("Calling operation ApiPlatformClient#listApiPlatformInstances.");
552
+ const operationName = "listApiPlatformInstances";
553
+ const apiReferenceLink = "";
554
+ const pathParams = {};
555
+ const queryParams = {
556
+ "compartmentId": listApiPlatformInstancesRequest.compartmentId,
557
+ "lifecycleState": listApiPlatformInstancesRequest.lifecycleState,
558
+ "name": listApiPlatformInstancesRequest.name,
559
+ "id": listApiPlatformInstancesRequest.id,
560
+ "limit": listApiPlatformInstancesRequest.limit,
561
+ "page": listApiPlatformInstancesRequest.page,
562
+ "sortOrder": listApiPlatformInstancesRequest.sortOrder,
563
+ "sortBy": listApiPlatformInstancesRequest.sortBy
564
+ };
565
+ let headerParams = {
566
+ "Content-Type": common.Constants.APPLICATION_JSON,
567
+ "opc-request-id": listApiPlatformInstancesRequest.opcRequestId
568
+ };
569
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
570
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listApiPlatformInstancesRequest.retryConfiguration, specRetryConfiguration);
571
+ if (this.logger)
572
+ retrier.logger = this.logger;
573
+ const request = yield oci_common_1.composeRequest({
574
+ baseEndpoint: this._endpoint,
575
+ defaultHeaders: this._defaultHeaders,
576
+ path: "/apiPlatformInstances",
577
+ method: "GET",
578
+ pathParams: pathParams,
579
+ headerParams: headerParams,
580
+ queryParams: queryParams
581
+ });
582
+ try {
583
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
584
+ const sdkResponse = oci_common_1.composeResponse({
585
+ responseObject: {},
586
+ body: yield response.json(),
587
+ bodyKey: "apiPlatformInstanceCollection",
588
+ bodyModel: model.ApiPlatformInstanceCollection,
589
+ type: "model.ApiPlatformInstanceCollection",
590
+ responseHeaders: [
591
+ {
592
+ value: response.headers.get("opc-request-id"),
593
+ key: "opcRequestId",
594
+ dataType: "string"
595
+ },
596
+ {
597
+ value: response.headers.get("opc-next-page"),
598
+ key: "opcNextPage",
599
+ dataType: "string"
600
+ }
601
+ ]
602
+ });
603
+ return sdkResponse;
604
+ }
605
+ catch (err) {
606
+ throw err;
607
+ }
608
+ });
609
+ }
610
+ /**
611
+ * Lists the errors for a work request.
612
+ *
613
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
614
+ * @param ListWorkRequestErrorsRequest
615
+ * @return ListWorkRequestErrorsResponse
616
+ * @throws OciError when an error occurs
617
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/apiplatform/ListWorkRequestErrors.ts.html |here} to see how to use ListWorkRequestErrors API.
618
+ */
619
+ listWorkRequestErrors(listWorkRequestErrorsRequest) {
620
+ return __awaiter(this, void 0, void 0, function* () {
621
+ if (this.logger)
622
+ this.logger.debug("Calling operation ApiPlatformClient#listWorkRequestErrors.");
623
+ const operationName = "listWorkRequestErrors";
624
+ const apiReferenceLink = "";
625
+ const pathParams = {
626
+ "{workRequestId}": listWorkRequestErrorsRequest.workRequestId
627
+ };
628
+ const queryParams = {
629
+ "page": listWorkRequestErrorsRequest.page,
630
+ "limit": listWorkRequestErrorsRequest.limit,
631
+ "sortBy": listWorkRequestErrorsRequest.sortBy,
632
+ "sortOrder": listWorkRequestErrorsRequest.sortOrder
633
+ };
634
+ let headerParams = {
635
+ "Content-Type": common.Constants.APPLICATION_JSON,
636
+ "opc-request-id": listWorkRequestErrorsRequest.opcRequestId
637
+ };
638
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
639
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listWorkRequestErrorsRequest.retryConfiguration, specRetryConfiguration);
640
+ if (this.logger)
641
+ retrier.logger = this.logger;
642
+ const request = yield oci_common_1.composeRequest({
643
+ baseEndpoint: this._endpoint,
644
+ defaultHeaders: this._defaultHeaders,
645
+ path: "/workRequests/{workRequestId}/errors",
646
+ method: "GET",
647
+ pathParams: pathParams,
648
+ headerParams: headerParams,
649
+ queryParams: queryParams
650
+ });
651
+ try {
652
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
653
+ const sdkResponse = oci_common_1.composeResponse({
654
+ responseObject: {},
655
+ body: yield response.json(),
656
+ bodyKey: "workRequestErrorCollection",
657
+ bodyModel: model.WorkRequestErrorCollection,
658
+ type: "model.WorkRequestErrorCollection",
659
+ responseHeaders: [
660
+ {
661
+ value: response.headers.get("opc-next-page"),
662
+ key: "opcNextPage",
663
+ dataType: "string"
664
+ },
665
+ {
666
+ value: response.headers.get("opc-request-id"),
667
+ key: "opcRequestId",
668
+ dataType: "string"
669
+ }
670
+ ]
671
+ });
672
+ return sdkResponse;
673
+ }
674
+ catch (err) {
675
+ throw err;
676
+ }
677
+ });
678
+ }
679
+ /**
680
+ * Lists the logs for a work request.
681
+ *
682
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
683
+ * @param ListWorkRequestLogsRequest
684
+ * @return ListWorkRequestLogsResponse
685
+ * @throws OciError when an error occurs
686
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/apiplatform/ListWorkRequestLogs.ts.html |here} to see how to use ListWorkRequestLogs API.
687
+ */
688
+ listWorkRequestLogs(listWorkRequestLogsRequest) {
689
+ return __awaiter(this, void 0, void 0, function* () {
690
+ if (this.logger)
691
+ this.logger.debug("Calling operation ApiPlatformClient#listWorkRequestLogs.");
692
+ const operationName = "listWorkRequestLogs";
693
+ const apiReferenceLink = "";
694
+ const pathParams = {
695
+ "{workRequestId}": listWorkRequestLogsRequest.workRequestId
696
+ };
697
+ const queryParams = {
698
+ "page": listWorkRequestLogsRequest.page,
699
+ "limit": listWorkRequestLogsRequest.limit,
700
+ "sortBy": listWorkRequestLogsRequest.sortBy,
701
+ "sortOrder": listWorkRequestLogsRequest.sortOrder
702
+ };
703
+ let headerParams = {
704
+ "Content-Type": common.Constants.APPLICATION_JSON,
705
+ "opc-request-id": listWorkRequestLogsRequest.opcRequestId
706
+ };
707
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
708
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listWorkRequestLogsRequest.retryConfiguration, specRetryConfiguration);
709
+ if (this.logger)
710
+ retrier.logger = this.logger;
711
+ const request = yield oci_common_1.composeRequest({
712
+ baseEndpoint: this._endpoint,
713
+ defaultHeaders: this._defaultHeaders,
714
+ path: "/workRequests/{workRequestId}/logs",
715
+ method: "GET",
716
+ pathParams: pathParams,
717
+ headerParams: headerParams,
718
+ queryParams: queryParams
719
+ });
720
+ try {
721
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
722
+ const sdkResponse = oci_common_1.composeResponse({
723
+ responseObject: {},
724
+ body: yield response.json(),
725
+ bodyKey: "workRequestLogEntryCollection",
726
+ bodyModel: model.WorkRequestLogEntryCollection,
727
+ type: "model.WorkRequestLogEntryCollection",
728
+ responseHeaders: [
729
+ {
730
+ value: response.headers.get("opc-next-page"),
731
+ key: "opcNextPage",
732
+ dataType: "string"
733
+ },
734
+ {
735
+ value: response.headers.get("opc-request-id"),
736
+ key: "opcRequestId",
737
+ dataType: "string"
738
+ }
739
+ ]
740
+ });
741
+ return sdkResponse;
742
+ }
743
+ catch (err) {
744
+ throw err;
745
+ }
746
+ });
747
+ }
748
+ /**
749
+ * Lists the work requests in a compartment.
750
+ *
751
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
752
+ * @param ListWorkRequestsRequest
753
+ * @return ListWorkRequestsResponse
754
+ * @throws OciError when an error occurs
755
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/apiplatform/ListWorkRequests.ts.html |here} to see how to use ListWorkRequests API.
756
+ */
757
+ listWorkRequests(listWorkRequestsRequest) {
758
+ return __awaiter(this, void 0, void 0, function* () {
759
+ if (this.logger)
760
+ this.logger.debug("Calling operation ApiPlatformClient#listWorkRequests.");
761
+ const operationName = "listWorkRequests";
762
+ const apiReferenceLink = "";
763
+ const pathParams = {};
764
+ const queryParams = {
765
+ "compartmentId": listWorkRequestsRequest.compartmentId,
766
+ "workRequestId": listWorkRequestsRequest.workRequestId,
767
+ "status": listWorkRequestsRequest.status,
768
+ "resourceId": listWorkRequestsRequest.resourceId,
769
+ "page": listWorkRequestsRequest.page,
770
+ "limit": listWorkRequestsRequest.limit,
771
+ "sortOrder": listWorkRequestsRequest.sortOrder,
772
+ "sortBy": listWorkRequestsRequest.sortBy
773
+ };
774
+ let headerParams = {
775
+ "Content-Type": common.Constants.APPLICATION_JSON,
776
+ "opc-request-id": listWorkRequestsRequest.opcRequestId
777
+ };
778
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
779
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listWorkRequestsRequest.retryConfiguration, specRetryConfiguration);
780
+ if (this.logger)
781
+ retrier.logger = this.logger;
782
+ const request = yield oci_common_1.composeRequest({
783
+ baseEndpoint: this._endpoint,
784
+ defaultHeaders: this._defaultHeaders,
785
+ path: "/workRequests",
786
+ method: "GET",
787
+ pathParams: pathParams,
788
+ headerParams: headerParams,
789
+ queryParams: queryParams
790
+ });
791
+ try {
792
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
793
+ const sdkResponse = oci_common_1.composeResponse({
794
+ responseObject: {},
795
+ body: yield response.json(),
796
+ bodyKey: "workRequestSummaryCollection",
797
+ bodyModel: model.WorkRequestSummaryCollection,
798
+ type: "model.WorkRequestSummaryCollection",
799
+ responseHeaders: [
800
+ {
801
+ value: response.headers.get("opc-request-id"),
802
+ key: "opcRequestId",
803
+ dataType: "string"
804
+ },
805
+ {
806
+ value: response.headers.get("opc-next-page"),
807
+ key: "opcNextPage",
808
+ dataType: "string"
809
+ }
810
+ ]
811
+ });
812
+ return sdkResponse;
813
+ }
814
+ catch (err) {
815
+ throw err;
816
+ }
817
+ });
818
+ }
819
+ /**
820
+ * Updates an API Platform Instance
821
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
822
+ * @param UpdateApiPlatformInstanceRequest
823
+ * @return UpdateApiPlatformInstanceResponse
824
+ * @throws OciError when an error occurs
825
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/apiplatform/UpdateApiPlatformInstance.ts.html |here} to see how to use UpdateApiPlatformInstance API.
826
+ */
827
+ updateApiPlatformInstance(updateApiPlatformInstanceRequest) {
828
+ return __awaiter(this, void 0, void 0, function* () {
829
+ if (this.logger)
830
+ this.logger.debug("Calling operation ApiPlatformClient#updateApiPlatformInstance.");
831
+ const operationName = "updateApiPlatformInstance";
832
+ const apiReferenceLink = "";
833
+ const pathParams = {
834
+ "{apiPlatformInstanceId}": updateApiPlatformInstanceRequest.apiPlatformInstanceId
835
+ };
836
+ const queryParams = {};
837
+ let headerParams = {
838
+ "Content-Type": common.Constants.APPLICATION_JSON,
839
+ "if-match": updateApiPlatformInstanceRequest.ifMatch,
840
+ "opc-request-id": updateApiPlatformInstanceRequest.opcRequestId
841
+ };
842
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
843
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, updateApiPlatformInstanceRequest.retryConfiguration, specRetryConfiguration);
844
+ if (this.logger)
845
+ retrier.logger = this.logger;
846
+ const request = yield oci_common_1.composeRequest({
847
+ baseEndpoint: this._endpoint,
848
+ defaultHeaders: this._defaultHeaders,
849
+ path: "/apiPlatformInstances/{apiPlatformInstanceId}",
850
+ method: "PUT",
851
+ bodyContent: common.ObjectSerializer.serialize(updateApiPlatformInstanceRequest.updateApiPlatformInstanceDetails, "UpdateApiPlatformInstanceDetails", model.UpdateApiPlatformInstanceDetails.getJsonObj),
852
+ pathParams: pathParams,
853
+ headerParams: headerParams,
854
+ queryParams: queryParams
855
+ });
856
+ try {
857
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
858
+ const sdkResponse = oci_common_1.composeResponse({
859
+ responseObject: {},
860
+ body: yield response.json(),
861
+ bodyKey: "apiPlatformInstance",
862
+ bodyModel: model.ApiPlatformInstance,
863
+ type: "model.ApiPlatformInstance",
864
+ responseHeaders: [
865
+ {
866
+ value: response.headers.get("etag"),
867
+ key: "etag",
868
+ dataType: "string"
869
+ },
870
+ {
871
+ value: response.headers.get("opc-request-id"),
872
+ key: "opcRequestId",
873
+ dataType: "string"
874
+ }
875
+ ]
876
+ });
877
+ return sdkResponse;
878
+ }
879
+ catch (err) {
880
+ throw err;
881
+ }
882
+ });
883
+ }
884
+ }
885
+ exports.ApiPlatformClient = ApiPlatformClient;
886
+ ApiPlatformClient.serviceEndpointTemplate = "https://apip.{region}.ocp.{secondLevelDomain}";
887
+ ApiPlatformClient.endpointServiceName = "";
888
+ //# sourceMappingURL=client.js.map