oci-recovery 2.139.2 → 2.140.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.
- package/lib/client.d.ts +69 -8
- package/lib/client.js +415 -10
- package/lib/client.js.map +1 -1
- package/lib/databaserecovery-waiter.d.ts +8 -0
- package/lib/databaserecovery-waiter.js +12 -0
- package/lib/databaserecovery-waiter.js.map +1 -1
- package/lib/model/backup-cloud-location.d.ts +30 -0
- package/lib/model/backup-cloud-location.js +41 -0
- package/lib/model/backup-cloud-location.js.map +1 -0
- package/lib/model/create-long-term-backup-details.d.ts +60 -0
- package/lib/model/create-long-term-backup-details.js +61 -0
- package/lib/model/create-long-term-backup-details.js.map +1 -0
- package/lib/model/create-recovery-service-subnet-details.d.ts +12 -0
- package/lib/model/create-recovery-service-subnet-details.js.map +1 -1
- package/lib/model/index.d.ts +14 -0
- package/lib/model/index.js +15 -1
- package/lib/model/index.js.map +1 -1
- package/lib/model/long-term-backup-collection.d.ts +26 -0
- package/lib/model/long-term-backup-collection.js +61 -0
- package/lib/model/long-term-backup-collection.js.map +1 -0
- package/lib/model/long-term-backup-summary.d.ts +127 -0
- package/lib/model/long-term-backup-summary.js +61 -0
- package/lib/model/long-term-backup-summary.js.map +1 -0
- package/lib/model/long-term-backup.d.ts +152 -0
- package/lib/model/long-term-backup.js +88 -0
- package/lib/model/long-term-backup.js.map +1 -0
- package/lib/model/operation-type.d.ts +4 -0
- package/lib/model/operation-type.js +4 -0
- package/lib/model/operation-type.js.map +1 -1
- package/lib/model/protected-database-summary.d.ts +4 -0
- package/lib/model/protected-database-summary.js.map +1 -1
- package/lib/model/protected-database.d.ts +4 -0
- package/lib/model/protected-database.js.map +1 -1
- package/lib/model/recovery-service-subnet-summary.d.ts +12 -0
- package/lib/model/recovery-service-subnet-summary.js.map +1 -1
- package/lib/model/recovery-service-subnet.d.ts +12 -0
- package/lib/model/recovery-service-subnet.js.map +1 -1
- package/lib/model/retention-period-value.d.ts +39 -0
- package/lib/model/retention-period-value.js +39 -0
- package/lib/model/retention-period-value.js.map +1 -0
- package/lib/model/update-long-term-backup-details.d.ts +52 -0
- package/lib/model/update-long-term-backup-details.js +61 -0
- package/lib/model/update-long-term-backup-details.js.map +1 -0
- package/lib/model/update-recovery-service-subnet-details.d.ts +12 -0
- package/lib/model/update-recovery-service-subnet-details.js.map +1 -1
- package/lib/request/cancel-long-term-backup-request.d.ts +44 -0
- package/lib/request/cancel-long-term-backup-request.js +15 -0
- package/lib/request/cancel-long-term-backup-request.js.map +1 -0
- package/lib/request/cancel-protected-database-deletion-request.d.ts +9 -0
- package/lib/request/change-protected-database-compartment-request.d.ts +9 -0
- package/lib/request/change-protected-database-subscription-request.d.ts +9 -0
- package/lib/request/change-protection-policy-compartment-request.d.ts +9 -0
- package/lib/request/change-recovery-service-subnet-compartment-request.d.ts +9 -0
- package/lib/request/create-long-term-backup-request.d.ts +36 -0
- package/lib/request/create-long-term-backup-request.js +15 -0
- package/lib/request/create-long-term-backup-request.js.map +1 -0
- package/lib/request/delete-long-term-backup-request.d.ts +35 -0
- package/lib/request/delete-long-term-backup-request.js +15 -0
- package/lib/request/delete-long-term-backup-request.js.map +1 -0
- package/lib/request/fetch-protected-database-configuration-request.d.ts +9 -0
- package/lib/request/get-long-term-backup-request.d.ts +26 -0
- package/lib/request/get-long-term-backup-request.js +15 -0
- package/lib/request/get-long-term-backup-request.js.map +1 -0
- package/lib/request/index.d.ts +12 -0
- package/lib/request/index.js +3 -1
- package/lib/request/index.js.map +1 -1
- package/lib/request/list-long-term-backups-request.d.ts +72 -0
- package/lib/request/list-long-term-backups-request.js +24 -0
- package/lib/request/list-long-term-backups-request.js.map +1 -0
- package/lib/request/list-protected-databases-request.d.ts +5 -1
- package/lib/request/list-protected-databases-request.js.map +1 -1
- package/lib/request/list-protection-policies-request.d.ts +5 -1
- package/lib/request/list-protection-policies-request.js.map +1 -1
- package/lib/request/list-recovery-service-subnets-request.d.ts +1 -1
- package/lib/request/list-work-requests-request.d.ts +1 -1
- package/lib/request/schedule-protected-database-deletion-request.d.ts +9 -0
- package/lib/request/update-long-term-backup-request.d.ts +40 -0
- package/lib/request/update-long-term-backup-request.js +15 -0
- package/lib/request/update-long-term-backup-request.js.map +1 -0
- package/lib/response/cancel-long-term-backup-response.d.ts +25 -0
- package/lib/response/cancel-long-term-backup-response.js +15 -0
- package/lib/response/cancel-long-term-backup-response.js.map +1 -0
- package/lib/response/create-long-term-backup-response.d.ts +40 -0
- package/lib/response/create-long-term-backup-response.js +15 -0
- package/lib/response/create-long-term-backup-response.js.map +1 -0
- package/lib/response/delete-long-term-backup-response.d.ts +25 -0
- package/lib/response/delete-long-term-backup-response.js +15 -0
- package/lib/response/delete-long-term-backup-response.js.map +1 -0
- package/lib/response/get-long-term-backup-response.d.ts +30 -0
- package/lib/response/get-long-term-backup-response.js +15 -0
- package/lib/response/get-long-term-backup-response.js.map +1 -0
- package/lib/response/index.d.ts +12 -0
- package/lib/response/list-long-term-backups-response.d.ts +32 -0
- package/lib/response/list-long-term-backups-response.js +15 -0
- package/lib/response/list-long-term-backups-response.js.map +1 -0
- package/lib/response/update-long-term-backup-response.d.ts +25 -0
- package/lib/response/update-long-term-backup-response.js +15 -0
- package/lib/response/update-long-term-backup-response.js.map +1 -0
- package/package.json +2 -2
package/lib/client.d.ts
CHANGED
|
@@ -94,6 +94,15 @@ export declare class DatabaseRecoveryClient {
|
|
|
94
94
|
* Close the client once it is no longer needed
|
|
95
95
|
*/
|
|
96
96
|
close(): void;
|
|
97
|
+
/**
|
|
98
|
+
* Cancels a long-term backup that is being created or scheduled to be created. You must specify the unique identifier or OCID of the long-term backup that you want to cancel. You can cancel a long-term backup only if the current state of the backup resource is WAITING_FOR_BACKUP_FROM_DB, or SCHEDULED_FOR_ARCHIVAL, or ARCHIVAL_IN_PROGRESS.
|
|
99
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
100
|
+
* @param CancelLongTermBackupRequest
|
|
101
|
+
* @return CancelLongTermBackupResponse
|
|
102
|
+
* @throws OciError when an error occurs
|
|
103
|
+
* @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/recovery/CancelLongTermBackup.ts.html |here} to see how to use CancelLongTermBackup API.
|
|
104
|
+
*/
|
|
105
|
+
cancelLongTermBackup(cancelLongTermBackupRequest: requests.CancelLongTermBackupRequest): Promise<responses.CancelLongTermBackupResponse>;
|
|
97
106
|
/**
|
|
98
107
|
* Cancels the scheduled deletion of a protected database, and returns the protected database to an ACTIVE state. You can cancel the deletion only if the protected database is in the DELETE SCHEDULED state.
|
|
99
108
|
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
@@ -139,6 +148,16 @@ export declare class DatabaseRecoveryClient {
|
|
|
139
148
|
* @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/recovery/ChangeRecoveryServiceSubnetCompartment.ts.html |here} to see how to use ChangeRecoveryServiceSubnetCompartment API.
|
|
140
149
|
*/
|
|
141
150
|
changeRecoveryServiceSubnetCompartment(changeRecoveryServiceSubnetCompartmentRequest: requests.ChangeRecoveryServiceSubnetCompartmentRequest): Promise<responses.ChangeRecoveryServiceSubnetCompartmentResponse>;
|
|
151
|
+
/**
|
|
152
|
+
* Creates a long-term backup of a specified protected database.
|
|
153
|
+
*
|
|
154
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
155
|
+
* @param CreateLongTermBackupRequest
|
|
156
|
+
* @return CreateLongTermBackupResponse
|
|
157
|
+
* @throws OciError when an error occurs
|
|
158
|
+
* @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/recovery/CreateLongTermBackup.ts.html |here} to see how to use CreateLongTermBackup API.
|
|
159
|
+
*/
|
|
160
|
+
createLongTermBackup(createLongTermBackupRequest: requests.CreateLongTermBackupRequest): Promise<responses.CreateLongTermBackupResponse>;
|
|
142
161
|
/**
|
|
143
162
|
* Creates a new Protected Database.
|
|
144
163
|
*
|
|
@@ -169,8 +188,20 @@ export declare class DatabaseRecoveryClient {
|
|
|
169
188
|
* @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/recovery/CreateRecoveryServiceSubnet.ts.html |here} to see how to use CreateRecoveryServiceSubnet API.
|
|
170
189
|
*/
|
|
171
190
|
createRecoveryServiceSubnet(createRecoveryServiceSubnetRequest: requests.CreateRecoveryServiceSubnetRequest): Promise<responses.CreateRecoveryServiceSubnetResponse>;
|
|
191
|
+
/**
|
|
192
|
+
* Deletes a long-term backup. You can delete a long-term backup only if the current state of the backup is ACTIVE, FAILED, or CANCELED.
|
|
193
|
+
*
|
|
194
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
195
|
+
* @param DeleteLongTermBackupRequest
|
|
196
|
+
* @return DeleteLongTermBackupResponse
|
|
197
|
+
* @throws OciError when an error occurs
|
|
198
|
+
* @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/recovery/DeleteLongTermBackup.ts.html |here} to see how to use DeleteLongTermBackup API.
|
|
199
|
+
*/
|
|
200
|
+
deleteLongTermBackup(deleteLongTermBackupRequest: requests.DeleteLongTermBackupRequest): Promise<responses.DeleteLongTermBackupResponse>;
|
|
172
201
|
/**
|
|
173
202
|
* Deletes a protected database based on the specified protected database ID.
|
|
203
|
+
* Only the user or the Oracle Database service that created the protected database is allowed to modify or delete it.
|
|
204
|
+
*
|
|
174
205
|
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
175
206
|
* @param DeleteProtectedDatabaseRequest
|
|
176
207
|
* @return DeleteProtectedDatabaseResponse
|
|
@@ -207,6 +238,15 @@ export declare class DatabaseRecoveryClient {
|
|
|
207
238
|
* @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/recovery/FetchProtectedDatabaseConfiguration.ts.html |here} to see how to use FetchProtectedDatabaseConfiguration API.
|
|
208
239
|
*/
|
|
209
240
|
fetchProtectedDatabaseConfiguration(fetchProtectedDatabaseConfigurationRequest: requests.FetchProtectedDatabaseConfigurationRequest): Promise<responses.FetchProtectedDatabaseConfigurationResponse>;
|
|
241
|
+
/**
|
|
242
|
+
* Retrieves information regarding a long-term backup.
|
|
243
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
244
|
+
* @param GetLongTermBackupRequest
|
|
245
|
+
* @return GetLongTermBackupResponse
|
|
246
|
+
* @throws OciError when an error occurs
|
|
247
|
+
* @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/recovery/GetLongTermBackup.ts.html |here} to see how to use GetLongTermBackup API.
|
|
248
|
+
*/
|
|
249
|
+
getLongTermBackup(getLongTermBackupRequest: requests.GetLongTermBackupRequest): Promise<responses.GetLongTermBackupResponse>;
|
|
210
250
|
/**
|
|
211
251
|
* Gets information about a specified protected database.
|
|
212
252
|
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
@@ -243,6 +283,16 @@ export declare class DatabaseRecoveryClient {
|
|
|
243
283
|
* @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/recovery/GetWorkRequest.ts.html |here} to see how to use GetWorkRequest API.
|
|
244
284
|
*/
|
|
245
285
|
getWorkRequest(getWorkRequestRequest: requests.GetWorkRequestRequest): Promise<responses.GetWorkRequestResponse>;
|
|
286
|
+
/**
|
|
287
|
+
* Lists the long-term backups associated with a protected database. You can filter the results using the unique identifier (OCID) of a specific compartment, a protected database, or a long-term backup.
|
|
288
|
+
*
|
|
289
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
290
|
+
* @param ListLongTermBackupsRequest
|
|
291
|
+
* @return ListLongTermBackupsResponse
|
|
292
|
+
* @throws OciError when an error occurs
|
|
293
|
+
* @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/recovery/ListLongTermBackups.ts.html |here} to see how to use ListLongTermBackups API.
|
|
294
|
+
*/
|
|
295
|
+
listLongTermBackups(listLongTermBackupsRequest: requests.ListLongTermBackupsRequest): Promise<responses.ListLongTermBackupsResponse>;
|
|
246
296
|
/**
|
|
247
297
|
* Lists the protected databases based on the specified parameters.
|
|
248
298
|
*
|
|
@@ -304,17 +354,28 @@ export declare class DatabaseRecoveryClient {
|
|
|
304
354
|
*/
|
|
305
355
|
listWorkRequests(listWorkRequestsRequest: requests.ListWorkRequestsRequest): Promise<responses.ListWorkRequestsResponse>;
|
|
306
356
|
/**
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
357
|
+
* Defines a preferred schedule to delete a protected database after you terminate the source database.
|
|
358
|
+
* Only the user or the Oracle Database service that created the protected database is allowed to modify or delete it.
|
|
359
|
+
* <p>
|
|
360
|
+
The default schedule is DELETE_AFTER_72_HOURS, so that the delete operation can occur 72 hours (3 days) after the source database is terminated.
|
|
361
|
+
* The alternate schedule is DELETE_AFTER_RETENTION_PERIOD. Specify this option if you want to delete a protected database only after the policy-defined backup retention period expires.
|
|
362
|
+
*
|
|
363
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
364
|
+
* @param ScheduleProtectedDatabaseDeletionRequest
|
|
365
|
+
* @return ScheduleProtectedDatabaseDeletionResponse
|
|
366
|
+
* @throws OciError when an error occurs
|
|
367
|
+
* @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/recovery/ScheduleProtectedDatabaseDeletion.ts.html |here} to see how to use ScheduleProtectedDatabaseDeletion API.
|
|
368
|
+
*/
|
|
369
|
+
scheduleProtectedDatabaseDeletion(scheduleProtectedDatabaseDeletionRequest: requests.ScheduleProtectedDatabaseDeletionRequest): Promise<responses.ScheduleProtectedDatabaseDeletionResponse>;
|
|
370
|
+
/**
|
|
371
|
+
* Updates the specified long term backup.
|
|
311
372
|
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
312
|
-
* @param
|
|
313
|
-
* @return
|
|
373
|
+
* @param UpdateLongTermBackupRequest
|
|
374
|
+
* @return UpdateLongTermBackupResponse
|
|
314
375
|
* @throws OciError when an error occurs
|
|
315
|
-
* @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/recovery/
|
|
376
|
+
* @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/recovery/UpdateLongTermBackup.ts.html |here} to see how to use UpdateLongTermBackup API.
|
|
316
377
|
*/
|
|
317
|
-
|
|
378
|
+
updateLongTermBackup(updateLongTermBackupRequest: requests.UpdateLongTermBackupRequest): Promise<responses.UpdateLongTermBackupResponse>;
|
|
318
379
|
/**
|
|
319
380
|
* Updates the Protected Database
|
|
320
381
|
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
package/lib/client.js
CHANGED
|
@@ -207,6 +207,67 @@ class DatabaseRecoveryClient {
|
|
|
207
207
|
this.shutdownCircuitBreaker();
|
|
208
208
|
this.closeProvider();
|
|
209
209
|
}
|
|
210
|
+
/**
|
|
211
|
+
* Cancels a long-term backup that is being created or scheduled to be created. You must specify the unique identifier or OCID of the long-term backup that you want to cancel. You can cancel a long-term backup only if the current state of the backup resource is WAITING_FOR_BACKUP_FROM_DB, or SCHEDULED_FOR_ARCHIVAL, or ARCHIVAL_IN_PROGRESS.
|
|
212
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
213
|
+
* @param CancelLongTermBackupRequest
|
|
214
|
+
* @return CancelLongTermBackupResponse
|
|
215
|
+
* @throws OciError when an error occurs
|
|
216
|
+
* @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/recovery/CancelLongTermBackup.ts.html |here} to see how to use CancelLongTermBackup API.
|
|
217
|
+
*/
|
|
218
|
+
cancelLongTermBackup(cancelLongTermBackupRequest) {
|
|
219
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
220
|
+
if (this.logger)
|
|
221
|
+
this.logger.debug("Calling operation DatabaseRecoveryClient#cancelLongTermBackup.");
|
|
222
|
+
const operationName = "cancelLongTermBackup";
|
|
223
|
+
const apiReferenceLink = "";
|
|
224
|
+
const pathParams = {
|
|
225
|
+
"{longTermBackupId}": cancelLongTermBackupRequest.longTermBackupId
|
|
226
|
+
};
|
|
227
|
+
const queryParams = {};
|
|
228
|
+
let headerParams = {
|
|
229
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
230
|
+
"opc-retry-token": cancelLongTermBackupRequest.opcRetryToken,
|
|
231
|
+
"if-match": cancelLongTermBackupRequest.ifMatch,
|
|
232
|
+
"opc-request-id": cancelLongTermBackupRequest.opcRequestId
|
|
233
|
+
};
|
|
234
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
235
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, cancelLongTermBackupRequest.retryConfiguration, specRetryConfiguration);
|
|
236
|
+
if (this.logger)
|
|
237
|
+
retrier.logger = this.logger;
|
|
238
|
+
const request = yield oci_common_1.composeRequest({
|
|
239
|
+
baseEndpoint: this._endpoint,
|
|
240
|
+
defaultHeaders: this._defaultHeaders,
|
|
241
|
+
path: "/longTermBackups/{longTermBackupId}/actions/cancel",
|
|
242
|
+
method: "POST",
|
|
243
|
+
pathParams: pathParams,
|
|
244
|
+
headerParams: headerParams,
|
|
245
|
+
queryParams: queryParams
|
|
246
|
+
});
|
|
247
|
+
try {
|
|
248
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
249
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
250
|
+
responseObject: {},
|
|
251
|
+
responseHeaders: [
|
|
252
|
+
{
|
|
253
|
+
value: response.headers.get("opc-work-request-id"),
|
|
254
|
+
key: "opcWorkRequestId",
|
|
255
|
+
dataType: "string"
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
value: response.headers.get("opc-request-id"),
|
|
259
|
+
key: "opcRequestId",
|
|
260
|
+
dataType: "string"
|
|
261
|
+
}
|
|
262
|
+
]
|
|
263
|
+
});
|
|
264
|
+
return sdkResponse;
|
|
265
|
+
}
|
|
266
|
+
catch (err) {
|
|
267
|
+
throw err;
|
|
268
|
+
}
|
|
269
|
+
});
|
|
270
|
+
}
|
|
210
271
|
/**
|
|
211
272
|
* Cancels the scheduled deletion of a protected database, and returns the protected database to an ACTIVE state. You can cancel the deletion only if the protected database is in the DELETE SCHEDULED state.
|
|
212
273
|
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
@@ -227,6 +288,7 @@ class DatabaseRecoveryClient {
|
|
|
227
288
|
const queryParams = {};
|
|
228
289
|
let headerParams = {
|
|
229
290
|
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
291
|
+
"opc-retry-token": cancelProtectedDatabaseDeletionRequest.opcRetryToken,
|
|
230
292
|
"if-match": cancelProtectedDatabaseDeletionRequest.ifMatch,
|
|
231
293
|
"opc-request-id": cancelProtectedDatabaseDeletionRequest.opcRequestId
|
|
232
294
|
};
|
|
@@ -282,6 +344,7 @@ class DatabaseRecoveryClient {
|
|
|
282
344
|
const queryParams = {};
|
|
283
345
|
let headerParams = {
|
|
284
346
|
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
347
|
+
"opc-retry-token": changeProtectedDatabaseCompartmentRequest.opcRetryToken,
|
|
285
348
|
"if-match": changeProtectedDatabaseCompartmentRequest.ifMatch,
|
|
286
349
|
"opc-request-id": changeProtectedDatabaseCompartmentRequest.opcRequestId
|
|
287
350
|
};
|
|
@@ -343,6 +406,7 @@ class DatabaseRecoveryClient {
|
|
|
343
406
|
const queryParams = {};
|
|
344
407
|
let headerParams = {
|
|
345
408
|
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
409
|
+
"opc-retry-token": changeProtectedDatabaseSubscriptionRequest.opcRetryToken,
|
|
346
410
|
"opc-request-id": changeProtectedDatabaseSubscriptionRequest.opcRequestId,
|
|
347
411
|
"if-match": changeProtectedDatabaseSubscriptionRequest.ifMatch
|
|
348
412
|
};
|
|
@@ -404,6 +468,7 @@ class DatabaseRecoveryClient {
|
|
|
404
468
|
const queryParams = {};
|
|
405
469
|
let headerParams = {
|
|
406
470
|
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
471
|
+
"opc-retry-token": changeProtectionPolicyCompartmentRequest.opcRetryToken,
|
|
407
472
|
"if-match": changeProtectionPolicyCompartmentRequest.ifMatch,
|
|
408
473
|
"opc-request-id": changeProtectionPolicyCompartmentRequest.opcRequestId
|
|
409
474
|
};
|
|
@@ -465,6 +530,7 @@ class DatabaseRecoveryClient {
|
|
|
465
530
|
const queryParams = {};
|
|
466
531
|
let headerParams = {
|
|
467
532
|
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
533
|
+
"opc-retry-token": changeRecoveryServiceSubnetCompartmentRequest.opcRetryToken,
|
|
468
534
|
"if-match": changeRecoveryServiceSubnetCompartmentRequest.ifMatch,
|
|
469
535
|
"opc-request-id": changeRecoveryServiceSubnetCompartmentRequest.opcRequestId
|
|
470
536
|
};
|
|
@@ -506,6 +572,80 @@ class DatabaseRecoveryClient {
|
|
|
506
572
|
}
|
|
507
573
|
});
|
|
508
574
|
}
|
|
575
|
+
/**
|
|
576
|
+
* Creates a long-term backup of a specified protected database.
|
|
577
|
+
*
|
|
578
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
579
|
+
* @param CreateLongTermBackupRequest
|
|
580
|
+
* @return CreateLongTermBackupResponse
|
|
581
|
+
* @throws OciError when an error occurs
|
|
582
|
+
* @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/recovery/CreateLongTermBackup.ts.html |here} to see how to use CreateLongTermBackup API.
|
|
583
|
+
*/
|
|
584
|
+
createLongTermBackup(createLongTermBackupRequest) {
|
|
585
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
586
|
+
if (this.logger)
|
|
587
|
+
this.logger.debug("Calling operation DatabaseRecoveryClient#createLongTermBackup.");
|
|
588
|
+
const operationName = "createLongTermBackup";
|
|
589
|
+
const apiReferenceLink = "";
|
|
590
|
+
const pathParams = {};
|
|
591
|
+
const queryParams = {};
|
|
592
|
+
let headerParams = {
|
|
593
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
594
|
+
"opc-retry-token": createLongTermBackupRequest.opcRetryToken,
|
|
595
|
+
"opc-request-id": createLongTermBackupRequest.opcRequestId
|
|
596
|
+
};
|
|
597
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
598
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, createLongTermBackupRequest.retryConfiguration, specRetryConfiguration);
|
|
599
|
+
if (this.logger)
|
|
600
|
+
retrier.logger = this.logger;
|
|
601
|
+
const request = yield oci_common_1.composeRequest({
|
|
602
|
+
baseEndpoint: this._endpoint,
|
|
603
|
+
defaultHeaders: this._defaultHeaders,
|
|
604
|
+
path: "/longTermBackups",
|
|
605
|
+
method: "POST",
|
|
606
|
+
bodyContent: common.ObjectSerializer.serialize(createLongTermBackupRequest.createLongTermBackupDetails, "CreateLongTermBackupDetails", model.CreateLongTermBackupDetails.getJsonObj),
|
|
607
|
+
pathParams: pathParams,
|
|
608
|
+
headerParams: headerParams,
|
|
609
|
+
queryParams: queryParams
|
|
610
|
+
});
|
|
611
|
+
try {
|
|
612
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
613
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
614
|
+
responseObject: {},
|
|
615
|
+
body: yield response.json(),
|
|
616
|
+
bodyKey: "longTermBackup",
|
|
617
|
+
bodyModel: model.LongTermBackup,
|
|
618
|
+
type: "model.LongTermBackup",
|
|
619
|
+
responseHeaders: [
|
|
620
|
+
{
|
|
621
|
+
value: response.headers.get("location"),
|
|
622
|
+
key: "location",
|
|
623
|
+
dataType: "string"
|
|
624
|
+
},
|
|
625
|
+
{
|
|
626
|
+
value: response.headers.get("etag"),
|
|
627
|
+
key: "etag",
|
|
628
|
+
dataType: "string"
|
|
629
|
+
},
|
|
630
|
+
{
|
|
631
|
+
value: response.headers.get("opc-work-request-id"),
|
|
632
|
+
key: "opcWorkRequestId",
|
|
633
|
+
dataType: "string"
|
|
634
|
+
},
|
|
635
|
+
{
|
|
636
|
+
value: response.headers.get("opc-request-id"),
|
|
637
|
+
key: "opcRequestId",
|
|
638
|
+
dataType: "string"
|
|
639
|
+
}
|
|
640
|
+
]
|
|
641
|
+
});
|
|
642
|
+
return sdkResponse;
|
|
643
|
+
}
|
|
644
|
+
catch (err) {
|
|
645
|
+
throw err;
|
|
646
|
+
}
|
|
647
|
+
});
|
|
648
|
+
}
|
|
509
649
|
/**
|
|
510
650
|
* Creates a new Protected Database.
|
|
511
651
|
*
|
|
@@ -729,8 +869,71 @@ class DatabaseRecoveryClient {
|
|
|
729
869
|
}
|
|
730
870
|
});
|
|
731
871
|
}
|
|
872
|
+
/**
|
|
873
|
+
* Deletes a long-term backup. You can delete a long-term backup only if the current state of the backup is ACTIVE, FAILED, or CANCELED.
|
|
874
|
+
*
|
|
875
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
876
|
+
* @param DeleteLongTermBackupRequest
|
|
877
|
+
* @return DeleteLongTermBackupResponse
|
|
878
|
+
* @throws OciError when an error occurs
|
|
879
|
+
* @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/recovery/DeleteLongTermBackup.ts.html |here} to see how to use DeleteLongTermBackup API.
|
|
880
|
+
*/
|
|
881
|
+
deleteLongTermBackup(deleteLongTermBackupRequest) {
|
|
882
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
883
|
+
if (this.logger)
|
|
884
|
+
this.logger.debug("Calling operation DatabaseRecoveryClient#deleteLongTermBackup.");
|
|
885
|
+
const operationName = "deleteLongTermBackup";
|
|
886
|
+
const apiReferenceLink = "";
|
|
887
|
+
const pathParams = {
|
|
888
|
+
"{longTermBackupId}": deleteLongTermBackupRequest.longTermBackupId
|
|
889
|
+
};
|
|
890
|
+
const queryParams = {};
|
|
891
|
+
let headerParams = {
|
|
892
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
893
|
+
"if-match": deleteLongTermBackupRequest.ifMatch,
|
|
894
|
+
"opc-request-id": deleteLongTermBackupRequest.opcRequestId
|
|
895
|
+
};
|
|
896
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
897
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, deleteLongTermBackupRequest.retryConfiguration, specRetryConfiguration);
|
|
898
|
+
if (this.logger)
|
|
899
|
+
retrier.logger = this.logger;
|
|
900
|
+
const request = yield oci_common_1.composeRequest({
|
|
901
|
+
baseEndpoint: this._endpoint,
|
|
902
|
+
defaultHeaders: this._defaultHeaders,
|
|
903
|
+
path: "/longTermBackups/{longTermBackupId}",
|
|
904
|
+
method: "DELETE",
|
|
905
|
+
pathParams: pathParams,
|
|
906
|
+
headerParams: headerParams,
|
|
907
|
+
queryParams: queryParams
|
|
908
|
+
});
|
|
909
|
+
try {
|
|
910
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
911
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
912
|
+
responseObject: {},
|
|
913
|
+
responseHeaders: [
|
|
914
|
+
{
|
|
915
|
+
value: response.headers.get("opc-work-request-id"),
|
|
916
|
+
key: "opcWorkRequestId",
|
|
917
|
+
dataType: "string"
|
|
918
|
+
},
|
|
919
|
+
{
|
|
920
|
+
value: response.headers.get("opc-request-id"),
|
|
921
|
+
key: "opcRequestId",
|
|
922
|
+
dataType: "string"
|
|
923
|
+
}
|
|
924
|
+
]
|
|
925
|
+
});
|
|
926
|
+
return sdkResponse;
|
|
927
|
+
}
|
|
928
|
+
catch (err) {
|
|
929
|
+
throw err;
|
|
930
|
+
}
|
|
931
|
+
});
|
|
932
|
+
}
|
|
732
933
|
/**
|
|
733
934
|
* Deletes a protected database based on the specified protected database ID.
|
|
935
|
+
* Only the user or the Oracle Database service that created the protected database is allowed to modify or delete it.
|
|
936
|
+
*
|
|
734
937
|
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
735
938
|
* @param DeleteProtectedDatabaseRequest
|
|
736
939
|
* @return DeleteProtectedDatabaseResponse
|
|
@@ -933,6 +1136,7 @@ class DatabaseRecoveryClient {
|
|
|
933
1136
|
const queryParams = {};
|
|
934
1137
|
let headerParams = {
|
|
935
1138
|
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1139
|
+
"opc-retry-token": fetchProtectedDatabaseConfigurationRequest.opcRetryToken,
|
|
936
1140
|
"opc-request-id": fetchProtectedDatabaseConfigurationRequest.opcRequestId,
|
|
937
1141
|
"if-match": fetchProtectedDatabaseConfigurationRequest.ifMatch
|
|
938
1142
|
};
|
|
@@ -987,6 +1191,69 @@ class DatabaseRecoveryClient {
|
|
|
987
1191
|
}
|
|
988
1192
|
});
|
|
989
1193
|
}
|
|
1194
|
+
/**
|
|
1195
|
+
* Retrieves information regarding a long-term backup.
|
|
1196
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
1197
|
+
* @param GetLongTermBackupRequest
|
|
1198
|
+
* @return GetLongTermBackupResponse
|
|
1199
|
+
* @throws OciError when an error occurs
|
|
1200
|
+
* @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/recovery/GetLongTermBackup.ts.html |here} to see how to use GetLongTermBackup API.
|
|
1201
|
+
*/
|
|
1202
|
+
getLongTermBackup(getLongTermBackupRequest) {
|
|
1203
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1204
|
+
if (this.logger)
|
|
1205
|
+
this.logger.debug("Calling operation DatabaseRecoveryClient#getLongTermBackup.");
|
|
1206
|
+
const operationName = "getLongTermBackup";
|
|
1207
|
+
const apiReferenceLink = "";
|
|
1208
|
+
const pathParams = {
|
|
1209
|
+
"{longTermBackupId}": getLongTermBackupRequest.longTermBackupId
|
|
1210
|
+
};
|
|
1211
|
+
const queryParams = {};
|
|
1212
|
+
let headerParams = {
|
|
1213
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1214
|
+
"opc-request-id": getLongTermBackupRequest.opcRequestId
|
|
1215
|
+
};
|
|
1216
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
1217
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getLongTermBackupRequest.retryConfiguration, specRetryConfiguration);
|
|
1218
|
+
if (this.logger)
|
|
1219
|
+
retrier.logger = this.logger;
|
|
1220
|
+
const request = yield oci_common_1.composeRequest({
|
|
1221
|
+
baseEndpoint: this._endpoint,
|
|
1222
|
+
defaultHeaders: this._defaultHeaders,
|
|
1223
|
+
path: "/longTermBackups/{longTermBackupId}",
|
|
1224
|
+
method: "GET",
|
|
1225
|
+
pathParams: pathParams,
|
|
1226
|
+
headerParams: headerParams,
|
|
1227
|
+
queryParams: queryParams
|
|
1228
|
+
});
|
|
1229
|
+
try {
|
|
1230
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1231
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1232
|
+
responseObject: {},
|
|
1233
|
+
body: yield response.json(),
|
|
1234
|
+
bodyKey: "longTermBackup",
|
|
1235
|
+
bodyModel: model.LongTermBackup,
|
|
1236
|
+
type: "model.LongTermBackup",
|
|
1237
|
+
responseHeaders: [
|
|
1238
|
+
{
|
|
1239
|
+
value: response.headers.get("etag"),
|
|
1240
|
+
key: "etag",
|
|
1241
|
+
dataType: "string"
|
|
1242
|
+
},
|
|
1243
|
+
{
|
|
1244
|
+
value: response.headers.get("opc-request-id"),
|
|
1245
|
+
key: "opcRequestId",
|
|
1246
|
+
dataType: "string"
|
|
1247
|
+
}
|
|
1248
|
+
]
|
|
1249
|
+
});
|
|
1250
|
+
return sdkResponse;
|
|
1251
|
+
}
|
|
1252
|
+
catch (err) {
|
|
1253
|
+
throw err;
|
|
1254
|
+
}
|
|
1255
|
+
});
|
|
1256
|
+
}
|
|
990
1257
|
/**
|
|
991
1258
|
* Gets information about a specified protected database.
|
|
992
1259
|
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
@@ -1239,6 +1506,78 @@ class DatabaseRecoveryClient {
|
|
|
1239
1506
|
}
|
|
1240
1507
|
});
|
|
1241
1508
|
}
|
|
1509
|
+
/**
|
|
1510
|
+
* Lists the long-term backups associated with a protected database. You can filter the results using the unique identifier (OCID) of a specific compartment, a protected database, or a long-term backup.
|
|
1511
|
+
*
|
|
1512
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
1513
|
+
* @param ListLongTermBackupsRequest
|
|
1514
|
+
* @return ListLongTermBackupsResponse
|
|
1515
|
+
* @throws OciError when an error occurs
|
|
1516
|
+
* @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/recovery/ListLongTermBackups.ts.html |here} to see how to use ListLongTermBackups API.
|
|
1517
|
+
*/
|
|
1518
|
+
listLongTermBackups(listLongTermBackupsRequest) {
|
|
1519
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1520
|
+
if (this.logger)
|
|
1521
|
+
this.logger.debug("Calling operation DatabaseRecoveryClient#listLongTermBackups.");
|
|
1522
|
+
const operationName = "listLongTermBackups";
|
|
1523
|
+
const apiReferenceLink = "";
|
|
1524
|
+
const pathParams = {};
|
|
1525
|
+
const queryParams = {
|
|
1526
|
+
"compartmentId": listLongTermBackupsRequest.compartmentId,
|
|
1527
|
+
"id": listLongTermBackupsRequest.id,
|
|
1528
|
+
"displayName": listLongTermBackupsRequest.displayName,
|
|
1529
|
+
"protectedDatabaseId": listLongTermBackupsRequest.protectedDatabaseId,
|
|
1530
|
+
"lifecycleState": listLongTermBackupsRequest.lifecycleState,
|
|
1531
|
+
"limit": listLongTermBackupsRequest.limit,
|
|
1532
|
+
"page": listLongTermBackupsRequest.page,
|
|
1533
|
+
"sortOrder": listLongTermBackupsRequest.sortOrder,
|
|
1534
|
+
"sortBy": listLongTermBackupsRequest.sortBy
|
|
1535
|
+
};
|
|
1536
|
+
let headerParams = {
|
|
1537
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1538
|
+
"opc-request-id": listLongTermBackupsRequest.opcRequestId
|
|
1539
|
+
};
|
|
1540
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
1541
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listLongTermBackupsRequest.retryConfiguration, specRetryConfiguration);
|
|
1542
|
+
if (this.logger)
|
|
1543
|
+
retrier.logger = this.logger;
|
|
1544
|
+
const request = yield oci_common_1.composeRequest({
|
|
1545
|
+
baseEndpoint: this._endpoint,
|
|
1546
|
+
defaultHeaders: this._defaultHeaders,
|
|
1547
|
+
path: "/longTermBackups",
|
|
1548
|
+
method: "GET",
|
|
1549
|
+
pathParams: pathParams,
|
|
1550
|
+
headerParams: headerParams,
|
|
1551
|
+
queryParams: queryParams
|
|
1552
|
+
});
|
|
1553
|
+
try {
|
|
1554
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1555
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1556
|
+
responseObject: {},
|
|
1557
|
+
body: yield response.json(),
|
|
1558
|
+
bodyKey: "longTermBackupCollection",
|
|
1559
|
+
bodyModel: model.LongTermBackupCollection,
|
|
1560
|
+
type: "model.LongTermBackupCollection",
|
|
1561
|
+
responseHeaders: [
|
|
1562
|
+
{
|
|
1563
|
+
value: response.headers.get("opc-request-id"),
|
|
1564
|
+
key: "opcRequestId",
|
|
1565
|
+
dataType: "string"
|
|
1566
|
+
},
|
|
1567
|
+
{
|
|
1568
|
+
value: response.headers.get("opc-next-page"),
|
|
1569
|
+
key: "opcNextPage",
|
|
1570
|
+
dataType: "string"
|
|
1571
|
+
}
|
|
1572
|
+
]
|
|
1573
|
+
});
|
|
1574
|
+
return sdkResponse;
|
|
1575
|
+
}
|
|
1576
|
+
catch (err) {
|
|
1577
|
+
throw err;
|
|
1578
|
+
}
|
|
1579
|
+
});
|
|
1580
|
+
}
|
|
1242
1581
|
/**
|
|
1243
1582
|
* Lists the protected databases based on the specified parameters.
|
|
1244
1583
|
*
|
|
@@ -1262,6 +1601,7 @@ class DatabaseRecoveryClient {
|
|
|
1262
1601
|
"id": listProtectedDatabasesRequest.id,
|
|
1263
1602
|
"protectionPolicyId": listProtectedDatabasesRequest.protectionPolicyId,
|
|
1264
1603
|
"recoveryServiceSubnetId": listProtectedDatabasesRequest.recoveryServiceSubnetId,
|
|
1604
|
+
"backupCloudLocation": listProtectedDatabasesRequest.backupCloudLocation,
|
|
1265
1605
|
"limit": listProtectedDatabasesRequest.limit,
|
|
1266
1606
|
"page": listProtectedDatabasesRequest.page,
|
|
1267
1607
|
"sortOrder": listProtectedDatabasesRequest.sortOrder,
|
|
@@ -1334,6 +1674,7 @@ class DatabaseRecoveryClient {
|
|
|
1334
1674
|
"displayName": listProtectionPoliciesRequest.displayName,
|
|
1335
1675
|
"protectionPolicyId": listProtectionPoliciesRequest.protectionPolicyId,
|
|
1336
1676
|
"owner": listProtectionPoliciesRequest.owner,
|
|
1677
|
+
"mustEnforceCloudLocality": listProtectionPoliciesRequest.mustEnforceCloudLocality,
|
|
1337
1678
|
"limit": listProtectionPoliciesRequest.limit,
|
|
1338
1679
|
"page": listProtectionPoliciesRequest.page,
|
|
1339
1680
|
"sortOrder": listProtectionPoliciesRequest.sortOrder,
|
|
@@ -1666,16 +2007,18 @@ class DatabaseRecoveryClient {
|
|
|
1666
2007
|
});
|
|
1667
2008
|
}
|
|
1668
2009
|
/**
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
2010
|
+
* Defines a preferred schedule to delete a protected database after you terminate the source database.
|
|
2011
|
+
* Only the user or the Oracle Database service that created the protected database is allowed to modify or delete it.
|
|
2012
|
+
* <p>
|
|
2013
|
+
The default schedule is DELETE_AFTER_72_HOURS, so that the delete operation can occur 72 hours (3 days) after the source database is terminated.
|
|
2014
|
+
* The alternate schedule is DELETE_AFTER_RETENTION_PERIOD. Specify this option if you want to delete a protected database only after the policy-defined backup retention period expires.
|
|
2015
|
+
*
|
|
2016
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
2017
|
+
* @param ScheduleProtectedDatabaseDeletionRequest
|
|
2018
|
+
* @return ScheduleProtectedDatabaseDeletionResponse
|
|
2019
|
+
* @throws OciError when an error occurs
|
|
2020
|
+
* @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/recovery/ScheduleProtectedDatabaseDeletion.ts.html |here} to see how to use ScheduleProtectedDatabaseDeletion API.
|
|
2021
|
+
*/
|
|
1679
2022
|
scheduleProtectedDatabaseDeletion(scheduleProtectedDatabaseDeletionRequest) {
|
|
1680
2023
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1681
2024
|
if (this.logger)
|
|
@@ -1688,6 +2031,7 @@ class DatabaseRecoveryClient {
|
|
|
1688
2031
|
const queryParams = {};
|
|
1689
2032
|
let headerParams = {
|
|
1690
2033
|
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
2034
|
+
"opc-retry-token": scheduleProtectedDatabaseDeletionRequest.opcRetryToken,
|
|
1691
2035
|
"if-match": scheduleProtectedDatabaseDeletionRequest.ifMatch,
|
|
1692
2036
|
"opc-request-id": scheduleProtectedDatabaseDeletionRequest.opcRequestId
|
|
1693
2037
|
};
|
|
@@ -1729,6 +2073,67 @@ class DatabaseRecoveryClient {
|
|
|
1729
2073
|
}
|
|
1730
2074
|
});
|
|
1731
2075
|
}
|
|
2076
|
+
/**
|
|
2077
|
+
* Updates the specified long term backup.
|
|
2078
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
2079
|
+
* @param UpdateLongTermBackupRequest
|
|
2080
|
+
* @return UpdateLongTermBackupResponse
|
|
2081
|
+
* @throws OciError when an error occurs
|
|
2082
|
+
* @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/recovery/UpdateLongTermBackup.ts.html |here} to see how to use UpdateLongTermBackup API.
|
|
2083
|
+
*/
|
|
2084
|
+
updateLongTermBackup(updateLongTermBackupRequest) {
|
|
2085
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2086
|
+
if (this.logger)
|
|
2087
|
+
this.logger.debug("Calling operation DatabaseRecoveryClient#updateLongTermBackup.");
|
|
2088
|
+
const operationName = "updateLongTermBackup";
|
|
2089
|
+
const apiReferenceLink = "";
|
|
2090
|
+
const pathParams = {
|
|
2091
|
+
"{longTermBackupId}": updateLongTermBackupRequest.longTermBackupId
|
|
2092
|
+
};
|
|
2093
|
+
const queryParams = {};
|
|
2094
|
+
let headerParams = {
|
|
2095
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
2096
|
+
"if-match": updateLongTermBackupRequest.ifMatch,
|
|
2097
|
+
"opc-request-id": updateLongTermBackupRequest.opcRequestId
|
|
2098
|
+
};
|
|
2099
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
2100
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, updateLongTermBackupRequest.retryConfiguration, specRetryConfiguration);
|
|
2101
|
+
if (this.logger)
|
|
2102
|
+
retrier.logger = this.logger;
|
|
2103
|
+
const request = yield oci_common_1.composeRequest({
|
|
2104
|
+
baseEndpoint: this._endpoint,
|
|
2105
|
+
defaultHeaders: this._defaultHeaders,
|
|
2106
|
+
path: "/longTermBackups/{longTermBackupId}",
|
|
2107
|
+
method: "PUT",
|
|
2108
|
+
bodyContent: common.ObjectSerializer.serialize(updateLongTermBackupRequest.updateLongTermBackupDetails, "UpdateLongTermBackupDetails", model.UpdateLongTermBackupDetails.getJsonObj),
|
|
2109
|
+
pathParams: pathParams,
|
|
2110
|
+
headerParams: headerParams,
|
|
2111
|
+
queryParams: queryParams
|
|
2112
|
+
});
|
|
2113
|
+
try {
|
|
2114
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
2115
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
2116
|
+
responseObject: {},
|
|
2117
|
+
responseHeaders: [
|
|
2118
|
+
{
|
|
2119
|
+
value: response.headers.get("opc-work-request-id"),
|
|
2120
|
+
key: "opcWorkRequestId",
|
|
2121
|
+
dataType: "string"
|
|
2122
|
+
},
|
|
2123
|
+
{
|
|
2124
|
+
value: response.headers.get("opc-request-id"),
|
|
2125
|
+
key: "opcRequestId",
|
|
2126
|
+
dataType: "string"
|
|
2127
|
+
}
|
|
2128
|
+
]
|
|
2129
|
+
});
|
|
2130
|
+
return sdkResponse;
|
|
2131
|
+
}
|
|
2132
|
+
catch (err) {
|
|
2133
|
+
throw err;
|
|
2134
|
+
}
|
|
2135
|
+
});
|
|
2136
|
+
}
|
|
1732
2137
|
/**
|
|
1733
2138
|
* Updates the Protected Database
|
|
1734
2139
|
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|