oci-mysql 2.123.1 → 2.125.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 (34) hide show
  1. package/lib/client.d.ts +19 -0
  2. package/lib/client.js +117 -0
  3. package/lib/client.js.map +1 -1
  4. package/lib/model/compression-options.d.ts +37 -0
  5. package/lib/model/compression-options.js +34 -0
  6. package/lib/model/compression-options.js.map +1 -0
  7. package/lib/model/export-backup-details.d.ts +38 -0
  8. package/lib/model/export-backup-details.js +57 -0
  9. package/lib/model/export-backup-details.js.map +1 -0
  10. package/lib/model/export-options.d.ts +37 -0
  11. package/lib/model/export-options.js +62 -0
  12. package/lib/model/export-options.js.map +1 -0
  13. package/lib/model/index.d.ts +6 -0
  14. package/lib/model/index.js +9 -3
  15. package/lib/model/index.js.map +1 -1
  16. package/lib/model/work-request-operation-type.d.ts +1 -0
  17. package/lib/model/work-request-operation-type.js +1 -0
  18. package/lib/model/work-request-operation-type.js.map +1 -1
  19. package/lib/request/cancel-work-request-request.d.ts +38 -0
  20. package/lib/request/cancel-work-request-request.js +15 -0
  21. package/lib/request/cancel-work-request-request.js.map +1 -0
  22. package/lib/request/export-backup-request.d.ts +44 -0
  23. package/lib/request/export-backup-request.js +15 -0
  24. package/lib/request/export-backup-request.js.map +1 -0
  25. package/lib/request/index.d.ts +4 -0
  26. package/lib/request/index.js.map +1 -1
  27. package/lib/response/cancel-work-request-response.d.ts +20 -0
  28. package/lib/response/cancel-work-request-response.js +15 -0
  29. package/lib/response/cancel-work-request-response.js.map +1 -0
  30. package/lib/response/export-backup-response.d.ts +25 -0
  31. package/lib/response/export-backup-response.js +15 -0
  32. package/lib/response/export-backup-response.js.map +1 -0
  33. package/lib/response/index.d.ts +4 -0
  34. package/package.json +3 -3
package/lib/client.d.ts CHANGED
@@ -339,6 +339,16 @@ export declare class DbBackupsClient {
339
339
  * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/mysql/DeleteBackup.ts.html |here} to see how to use DeleteBackup API.
340
340
  */
341
341
  deleteBackup(deleteBackupRequest: requests.DeleteBackupRequest): Promise<responses.DeleteBackupResponse>;
342
+ /**
343
+ * Export logical data from a DB system backup to an Object Storage bucket.
344
+ *
345
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
346
+ * @param ExportBackupRequest
347
+ * @return ExportBackupResponse
348
+ * @throws OciError when an error occurs
349
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/mysql/ExportBackup.ts.html |here} to see how to use ExportBackup API.
350
+ */
351
+ exportBackup(exportBackupRequest: requests.ExportBackupRequest): Promise<responses.ExportBackupResponse>;
342
352
  /**
343
353
  * Get information about the specified Backup
344
354
  * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
@@ -1127,6 +1137,15 @@ export declare class WorkRequestsClient {
1127
1137
  * Close the client once it is no longer needed
1128
1138
  */
1129
1139
  close(): void;
1140
+ /**
1141
+ * Cancels a work request.
1142
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
1143
+ * @param CancelWorkRequestRequest
1144
+ * @return CancelWorkRequestResponse
1145
+ * @throws OciError when an error occurs
1146
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/mysql/CancelWorkRequest.ts.html |here} to see how to use CancelWorkRequest API.
1147
+ */
1148
+ cancelWorkRequest(cancelWorkRequestRequest: requests.CancelWorkRequestRequest): Promise<responses.CancelWorkRequestResponse>;
1130
1149
  /**
1131
1150
  * Gets the status of the work request with the given ID.
1132
1151
  * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
package/lib/client.js CHANGED
@@ -1202,6 +1202,68 @@ class DbBackupsClient {
1202
1202
  }
1203
1203
  });
1204
1204
  }
1205
+ /**
1206
+ * Export logical data from a DB system backup to an Object Storage bucket.
1207
+ *
1208
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
1209
+ * @param ExportBackupRequest
1210
+ * @return ExportBackupResponse
1211
+ * @throws OciError when an error occurs
1212
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/mysql/ExportBackup.ts.html |here} to see how to use ExportBackup API.
1213
+ */
1214
+ exportBackup(exportBackupRequest) {
1215
+ return __awaiter(this, void 0, void 0, function* () {
1216
+ if (this.logger)
1217
+ this.logger.debug("Calling operation DbBackupsClient#exportBackup.");
1218
+ const operationName = "exportBackup";
1219
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/mysql/20190415/Backup/ExportBackup";
1220
+ const pathParams = {
1221
+ "{backupId}": exportBackupRequest.backupId
1222
+ };
1223
+ const queryParams = {};
1224
+ let headerParams = {
1225
+ "Content-Type": common.Constants.APPLICATION_JSON,
1226
+ "opc-request-id": exportBackupRequest.opcRequestId,
1227
+ "opc-retry-token": exportBackupRequest.opcRetryToken
1228
+ };
1229
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
1230
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, exportBackupRequest.retryConfiguration, specRetryConfiguration);
1231
+ if (this.logger)
1232
+ retrier.logger = this.logger;
1233
+ const request = yield oci_common_2.composeRequest({
1234
+ baseEndpoint: this._endpoint,
1235
+ defaultHeaders: this._defaultHeaders,
1236
+ path: "/backups/{backupId}/actions/export",
1237
+ method: "POST",
1238
+ bodyContent: common.ObjectSerializer.serialize(exportBackupRequest.exportBackupDetails, "ExportBackupDetails", model.ExportBackupDetails.getJsonObj),
1239
+ pathParams: pathParams,
1240
+ headerParams: headerParams,
1241
+ queryParams: queryParams
1242
+ });
1243
+ try {
1244
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1245
+ const sdkResponse = oci_common_2.composeResponse({
1246
+ responseObject: {},
1247
+ responseHeaders: [
1248
+ {
1249
+ value: response.headers.get("opc-request-id"),
1250
+ key: "opcRequestId",
1251
+ dataType: "string"
1252
+ },
1253
+ {
1254
+ value: response.headers.get("opc-work-request-id"),
1255
+ key: "opcWorkRequestId",
1256
+ dataType: "string"
1257
+ }
1258
+ ]
1259
+ });
1260
+ return sdkResponse;
1261
+ }
1262
+ catch (err) {
1263
+ throw err;
1264
+ }
1265
+ });
1266
+ }
1205
1267
  /**
1206
1268
  * Get information about the specified Backup
1207
1269
  * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
@@ -4185,6 +4247,61 @@ class WorkRequestsClient {
4185
4247
  this.shutdownCircuitBreaker();
4186
4248
  this.closeProvider();
4187
4249
  }
4250
+ /**
4251
+ * Cancels a work request.
4252
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
4253
+ * @param CancelWorkRequestRequest
4254
+ * @return CancelWorkRequestResponse
4255
+ * @throws OciError when an error occurs
4256
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/mysql/CancelWorkRequest.ts.html |here} to see how to use CancelWorkRequest API.
4257
+ */
4258
+ cancelWorkRequest(cancelWorkRequestRequest) {
4259
+ return __awaiter(this, void 0, void 0, function* () {
4260
+ if (this.logger)
4261
+ this.logger.debug("Calling operation WorkRequestsClient#cancelWorkRequest.");
4262
+ const operationName = "cancelWorkRequest";
4263
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/mysql/20190415/WorkRequest/CancelWorkRequest";
4264
+ const pathParams = {
4265
+ "{workRequestId}": cancelWorkRequestRequest.workRequestId
4266
+ };
4267
+ const queryParams = {};
4268
+ let headerParams = {
4269
+ "Content-Type": common.Constants.APPLICATION_JSON,
4270
+ "if-match": cancelWorkRequestRequest.ifMatch,
4271
+ "opc-request-id": cancelWorkRequestRequest.opcRequestId
4272
+ };
4273
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
4274
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, cancelWorkRequestRequest.retryConfiguration, specRetryConfiguration);
4275
+ if (this.logger)
4276
+ retrier.logger = this.logger;
4277
+ const request = yield oci_common_2.composeRequest({
4278
+ baseEndpoint: this._endpoint,
4279
+ defaultHeaders: this._defaultHeaders,
4280
+ path: "/workRequests/{workRequestId}",
4281
+ method: "DELETE",
4282
+ pathParams: pathParams,
4283
+ headerParams: headerParams,
4284
+ queryParams: queryParams
4285
+ });
4286
+ try {
4287
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
4288
+ const sdkResponse = oci_common_2.composeResponse({
4289
+ responseObject: {},
4290
+ responseHeaders: [
4291
+ {
4292
+ value: response.headers.get("opc-request-id"),
4293
+ key: "opcRequestId",
4294
+ dataType: "string"
4295
+ }
4296
+ ]
4297
+ });
4298
+ return sdkResponse;
4299
+ }
4300
+ catch (err) {
4301
+ throw err;
4302
+ }
4303
+ });
4304
+ }
4188
4305
  /**
4189
4306
  * Gets the status of the work request with the given ID.
4190
4307
  * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.