oci-usageapi 2.22.0 → 2.24.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 (113) hide show
  1. package/index.d.ts +2 -0
  2. package/index.js +3 -1
  3. package/index.js.map +1 -1
  4. package/lib/client.d.ts +98 -12
  5. package/lib/client.js +477 -13
  6. package/lib/client.js.map +1 -1
  7. package/lib/model/create-schedule-details.d.ts +59 -0
  8. package/lib/model/create-schedule-details.js +63 -0
  9. package/lib/model/create-schedule-details.js.map +1 -0
  10. package/lib/model/date-range.d.ts +24 -0
  11. package/lib/model/date-range.js +69 -0
  12. package/lib/model/date-range.js.map +1 -0
  13. package/lib/model/dynamic-date-range.d.ts +39 -0
  14. package/lib/model/dynamic-date-range.js +67 -0
  15. package/lib/model/dynamic-date-range.js.map +1 -0
  16. package/lib/model/index.d.ts +28 -0
  17. package/lib/model/index.js +29 -1
  18. package/lib/model/index.js.map +1 -1
  19. package/lib/model/object-storage-location.d.ts +36 -0
  20. package/lib/model/object-storage-location.js +52 -0
  21. package/lib/model/object-storage-location.js.map +1 -0
  22. package/lib/model/query-properties.d.ts +78 -0
  23. package/lib/model/query-properties.js +88 -0
  24. package/lib/model/query-properties.js.map +1 -0
  25. package/lib/model/result-location.d.ts +24 -0
  26. package/lib/model/result-location.js +65 -0
  27. package/lib/model/result-location.js.map +1 -0
  28. package/lib/model/schedule-collection.d.ts +26 -0
  29. package/lib/model/schedule-collection.js +61 -0
  30. package/lib/model/schedule-collection.js.map +1 -0
  31. package/lib/model/schedule-summary.d.ts +69 -0
  32. package/lib/model/schedule-summary.js +29 -0
  33. package/lib/model/schedule-summary.js.map +1 -0
  34. package/lib/model/schedule.d.ts +89 -0
  35. package/lib/model/schedule.js +73 -0
  36. package/lib/model/schedule.js.map +1 -0
  37. package/lib/model/scheduled-run-collection.d.ts +26 -0
  38. package/lib/model/scheduled-run-collection.js +61 -0
  39. package/lib/model/scheduled-run-collection.js.map +1 -0
  40. package/lib/model/scheduled-run-summary.d.ts +45 -0
  41. package/lib/model/scheduled-run-summary.js +29 -0
  42. package/lib/model/scheduled-run-summary.js.map +1 -0
  43. package/lib/model/scheduled-run.d.ts +54 -0
  44. package/lib/model/scheduled-run.js +39 -0
  45. package/lib/model/scheduled-run.js.map +1 -0
  46. package/lib/model/static-date-range.d.ts +32 -0
  47. package/lib/model/static-date-range.js +50 -0
  48. package/lib/model/static-date-range.js.map +1 -0
  49. package/lib/model/update-schedule-details.d.ts +39 -0
  50. package/lib/model/update-schedule-details.js +29 -0
  51. package/lib/model/update-schedule-details.js.map +1 -0
  52. package/lib/request/create-custom-table-request.d.ts +1 -1
  53. package/lib/request/create-query-request.d.ts +1 -1
  54. package/lib/request/create-schedule-request.d.ts +38 -0
  55. package/lib/request/create-schedule-request.js +15 -0
  56. package/lib/request/create-schedule-request.js.map +1 -0
  57. package/lib/request/delete-custom-table-request.d.ts +1 -1
  58. package/lib/request/delete-query-request.d.ts +1 -1
  59. package/lib/request/delete-schedule-request.d.ts +37 -0
  60. package/lib/request/delete-schedule-request.js +15 -0
  61. package/lib/request/delete-schedule-request.js.map +1 -0
  62. package/lib/request/get-custom-table-request.d.ts +1 -1
  63. package/lib/request/get-query-request.d.ts +1 -1
  64. package/lib/request/get-schedule-request.d.ts +28 -0
  65. package/lib/request/get-schedule-request.js +15 -0
  66. package/lib/request/get-schedule-request.js.map +1 -0
  67. package/lib/request/get-scheduled-run-request.d.ts +28 -0
  68. package/lib/request/get-scheduled-run-request.js +15 -0
  69. package/lib/request/get-scheduled-run-request.js.map +1 -0
  70. package/lib/request/index.d.ts +14 -0
  71. package/lib/request/index.js +5 -1
  72. package/lib/request/index.js.map +1 -1
  73. package/lib/request/list-custom-tables-request.d.ts +1 -1
  74. package/lib/request/list-queries-request.d.ts +1 -1
  75. package/lib/request/list-scheduled-runs-request.d.ts +56 -0
  76. package/lib/request/list-scheduled-runs-request.js +28 -0
  77. package/lib/request/list-scheduled-runs-request.js.map +1 -0
  78. package/lib/request/list-schedules-request.d.ts +62 -0
  79. package/lib/request/list-schedules-request.js +29 -0
  80. package/lib/request/list-schedules-request.js.map +1 -0
  81. package/lib/request/request-summarized-configurations-request.d.ts +1 -1
  82. package/lib/request/request-summarized-usages-request.d.ts +1 -1
  83. package/lib/request/update-custom-table-request.d.ts +1 -1
  84. package/lib/request/update-query-request.d.ts +1 -1
  85. package/lib/request/update-schedule-request.d.ts +42 -0
  86. package/lib/request/update-schedule-request.js +15 -0
  87. package/lib/request/update-schedule-request.js.map +1 -0
  88. package/lib/response/create-schedule-response.d.ts +29 -0
  89. package/lib/response/create-schedule-response.js +15 -0
  90. package/lib/response/create-schedule-response.js.map +1 -0
  91. package/lib/response/delete-schedule-response.d.ts +20 -0
  92. package/lib/response/delete-schedule-response.js +15 -0
  93. package/lib/response/delete-schedule-response.js.map +1 -0
  94. package/lib/response/get-schedule-response.d.ts +29 -0
  95. package/lib/response/get-schedule-response.js +15 -0
  96. package/lib/response/get-schedule-response.js.map +1 -0
  97. package/lib/response/get-scheduled-run-response.d.ts +29 -0
  98. package/lib/response/get-scheduled-run-response.js +15 -0
  99. package/lib/response/get-scheduled-run-response.js.map +1 -0
  100. package/lib/response/index.d.ts +14 -0
  101. package/lib/response/list-scheduled-runs-response.d.ts +32 -0
  102. package/lib/response/list-scheduled-runs-response.js +15 -0
  103. package/lib/response/list-scheduled-runs-response.js.map +1 -0
  104. package/lib/response/list-schedules-response.d.ts +32 -0
  105. package/lib/response/list-schedules-response.js +15 -0
  106. package/lib/response/list-schedules-response.js.map +1 -0
  107. package/lib/response/update-schedule-response.d.ts +29 -0
  108. package/lib/response/update-schedule-response.js +15 -0
  109. package/lib/response/update-schedule-response.js.map +1 -0
  110. package/lib/usageapi-waiter.d.ts +37 -0
  111. package/lib/usageapi-waiter.js +57 -0
  112. package/lib/usageapi-waiter.js.map +1 -0
  113. package/package.json +3 -3
package/lib/client.js CHANGED
@@ -43,6 +43,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
43
43
  exports.UsageapiClient = exports.UsageapiApiKeys = void 0;
44
44
  const common = require("oci-common");
45
45
  const model = __importStar(require("./model"));
46
+ const usageapi_waiter_1 = require("./usageapi-waiter");
46
47
  const oci_common_1 = require("oci-common");
47
48
  // ===============================================
48
49
  // This file is autogenerated - Please do not edit
@@ -58,6 +59,7 @@ class UsageapiClient {
58
59
  this["_endpoint"] = "";
59
60
  this["_defaultHeaders"] = {};
60
61
  this._circuitBreaker = null;
62
+ this._httpOptions = undefined;
61
63
  const requestSigner = params.authenticationDetailsProvider
62
64
  ? new common.DefaultRequestSigner(params.authenticationDetailsProvider)
63
65
  : null;
@@ -66,6 +68,9 @@ class UsageapiClient {
66
68
  this._circuitBreaker = clientConfiguration.circuitBreaker
67
69
  ? clientConfiguration.circuitBreaker.circuit
68
70
  : null;
71
+ this._httpOptions = clientConfiguration.httpOptions
72
+ ? clientConfiguration.httpOptions
73
+ : undefined;
69
74
  }
70
75
  // if circuit breaker is not created, check if circuit breaker system is enabled to use default circuit breaker
71
76
  const specCircuitBreakerEnabled = true;
@@ -75,7 +80,8 @@ class UsageapiClient {
75
80
  this._circuitBreaker = new common.CircuitBreaker().circuit;
76
81
  }
77
82
  this._httpClient =
78
- params.httpClient || new common.FetchHttpClient(requestSigner, this._circuitBreaker);
83
+ params.httpClient ||
84
+ new common.FetchHttpClient(requestSigner, this._circuitBreaker, this._httpOptions);
79
85
  if (params.authenticationDetailsProvider &&
80
86
  common.isRegionProvider(params.authenticationDetailsProvider)) {
81
87
  const provider = params.authenticationDetailsProvider;
@@ -122,6 +128,27 @@ class UsageapiClient {
122
128
  set regionId(regionId) {
123
129
  this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(UsageapiClient.serviceEndpointTemplate, regionId, UsageapiClient.endpointServiceName);
124
130
  }
131
+ /**
132
+ * Creates a new UsageapiWaiter for resources for this service.
133
+ *
134
+ * @param config The waiter configuration for termination and delay strategy
135
+ * @return The service waiters.
136
+ */
137
+ createWaiters(config) {
138
+ this._waiters = new usageapi_waiter_1.UsageapiWaiter(this, config);
139
+ return this._waiters;
140
+ }
141
+ /**
142
+ * Gets the waiters available for resources for this service.
143
+ *
144
+ * @return The service waiters.
145
+ */
146
+ getWaiters() {
147
+ if (this._waiters) {
148
+ return this._waiters;
149
+ }
150
+ throw Error("Waiters do not exist. Please create waiters.");
151
+ }
125
152
  /**
126
153
  * Returns the created custom table.
127
154
  *
@@ -129,7 +156,7 @@ class UsageapiClient {
129
156
  * @param CreateCustomTableRequest
130
157
  * @return CreateCustomTableResponse
131
158
  * @throws OciError when an error occurs
132
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.22.0/usageapi/CreateCustomTable.ts.html |here} to see how to use CreateCustomTable API.
159
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.24.0/usageapi/CreateCustomTable.ts.html |here} to see how to use CreateCustomTable API.
133
160
  */
134
161
  createCustomTable(createCustomTableRequest) {
135
162
  return __awaiter(this, void 0, void 0, function* () {
@@ -191,7 +218,7 @@ class UsageapiClient {
191
218
  * @param CreateQueryRequest
192
219
  * @return CreateQueryResponse
193
220
  * @throws OciError when an error occurs
194
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.22.0/usageapi/CreateQuery.ts.html |here} to see how to use CreateQuery API.
221
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.24.0/usageapi/CreateQuery.ts.html |here} to see how to use CreateQuery API.
195
222
  */
196
223
  createQuery(createQueryRequest) {
197
224
  return __awaiter(this, void 0, void 0, function* () {
@@ -246,6 +273,68 @@ class UsageapiClient {
246
273
  }
247
274
  });
248
275
  }
276
+ /**
277
+ * Returns the created schedule.
278
+ *
279
+ * This operation does not retry by default if the user has not defined a retry configuration.
280
+ * @param CreateScheduleRequest
281
+ * @return CreateScheduleResponse
282
+ * @throws OciError when an error occurs
283
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.24.0/usageapi/CreateSchedule.ts.html |here} to see how to use CreateSchedule API.
284
+ */
285
+ createSchedule(createScheduleRequest) {
286
+ return __awaiter(this, void 0, void 0, function* () {
287
+ if (this.logger)
288
+ this.logger.debug("Calling operation UsageapiClient#createSchedule.");
289
+ const pathParams = {};
290
+ const queryParams = {};
291
+ let headerParams = {
292
+ "Content-Type": common.Constants.APPLICATION_JSON,
293
+ "opc-request-id": createScheduleRequest.opcRequestId,
294
+ "opc-retry-token": createScheduleRequest.opcRetryToken
295
+ };
296
+ const specRetryConfiguration = common.NoRetryConfigurationDetails;
297
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, createScheduleRequest.retryConfiguration, specRetryConfiguration);
298
+ if (this.logger)
299
+ retrier.logger = this.logger;
300
+ const request = yield oci_common_1.composeRequest({
301
+ baseEndpoint: this._endpoint,
302
+ defaultHeaders: this._defaultHeaders,
303
+ path: "/schedules",
304
+ method: "POST",
305
+ bodyContent: common.ObjectSerializer.serialize(createScheduleRequest.createScheduleDetails, "CreateScheduleDetails", model.CreateScheduleDetails.getJsonObj),
306
+ pathParams: pathParams,
307
+ headerParams: headerParams,
308
+ queryParams: queryParams
309
+ });
310
+ try {
311
+ const response = yield retrier.makeServiceCall(this._httpClient, request);
312
+ const sdkResponse = oci_common_1.composeResponse({
313
+ responseObject: {},
314
+ body: yield response.json(),
315
+ bodyKey: "schedule",
316
+ bodyModel: model.Schedule,
317
+ type: "model.Schedule",
318
+ responseHeaders: [
319
+ {
320
+ value: response.headers.get("opc-request-id"),
321
+ key: "opcRequestId",
322
+ dataType: "string"
323
+ },
324
+ {
325
+ value: response.headers.get("etag"),
326
+ key: "etag",
327
+ dataType: "string"
328
+ }
329
+ ]
330
+ });
331
+ return sdkResponse;
332
+ }
333
+ catch (err) {
334
+ throw err;
335
+ }
336
+ });
337
+ }
249
338
  /**
250
339
  * Delete a saved custom table by the OCID.
251
340
  *
@@ -253,7 +342,7 @@ class UsageapiClient {
253
342
  * @param DeleteCustomTableRequest
254
343
  * @return DeleteCustomTableResponse
255
344
  * @throws OciError when an error occurs
256
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.22.0/usageapi/DeleteCustomTable.ts.html |here} to see how to use DeleteCustomTable API.
345
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.24.0/usageapi/DeleteCustomTable.ts.html |here} to see how to use DeleteCustomTable API.
257
346
  */
258
347
  deleteCustomTable(deleteCustomTableRequest) {
259
348
  return __awaiter(this, void 0, void 0, function* () {
@@ -307,7 +396,7 @@ class UsageapiClient {
307
396
  * @param DeleteQueryRequest
308
397
  * @return DeleteQueryResponse
309
398
  * @throws OciError when an error occurs
310
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.22.0/usageapi/DeleteQuery.ts.html |here} to see how to use DeleteQuery API.
399
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.24.0/usageapi/DeleteQuery.ts.html |here} to see how to use DeleteQuery API.
311
400
  */
312
401
  deleteQuery(deleteQueryRequest) {
313
402
  return __awaiter(this, void 0, void 0, function* () {
@@ -354,6 +443,60 @@ class UsageapiClient {
354
443
  }
355
444
  });
356
445
  }
446
+ /**
447
+ * Delete a saved scheduled report by the OCID.
448
+ *
449
+ * This operation does not retry by default if the user has not defined a retry configuration.
450
+ * @param DeleteScheduleRequest
451
+ * @return DeleteScheduleResponse
452
+ * @throws OciError when an error occurs
453
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.24.0/usageapi/DeleteSchedule.ts.html |here} to see how to use DeleteSchedule API.
454
+ */
455
+ deleteSchedule(deleteScheduleRequest) {
456
+ return __awaiter(this, void 0, void 0, function* () {
457
+ if (this.logger)
458
+ this.logger.debug("Calling operation UsageapiClient#deleteSchedule.");
459
+ const pathParams = {
460
+ "{scheduleId}": deleteScheduleRequest.scheduleId
461
+ };
462
+ const queryParams = {};
463
+ let headerParams = {
464
+ "Content-Type": common.Constants.APPLICATION_JSON,
465
+ "opc-request-id": deleteScheduleRequest.opcRequestId,
466
+ "if-match": deleteScheduleRequest.ifMatch
467
+ };
468
+ const specRetryConfiguration = common.NoRetryConfigurationDetails;
469
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, deleteScheduleRequest.retryConfiguration, specRetryConfiguration);
470
+ if (this.logger)
471
+ retrier.logger = this.logger;
472
+ const request = yield oci_common_1.composeRequest({
473
+ baseEndpoint: this._endpoint,
474
+ defaultHeaders: this._defaultHeaders,
475
+ path: "/schedules/{scheduleId}",
476
+ method: "DELETE",
477
+ pathParams: pathParams,
478
+ headerParams: headerParams,
479
+ queryParams: queryParams
480
+ });
481
+ try {
482
+ const response = yield retrier.makeServiceCall(this._httpClient, request);
483
+ const sdkResponse = oci_common_1.composeResponse({
484
+ responseObject: {},
485
+ responseHeaders: [
486
+ {
487
+ value: response.headers.get("opc-request-id"),
488
+ key: "opcRequestId",
489
+ dataType: "string"
490
+ }
491
+ ]
492
+ });
493
+ return sdkResponse;
494
+ }
495
+ catch (err) {
496
+ throw err;
497
+ }
498
+ });
499
+ }
357
500
  /**
358
501
  * Returns the saved custom table.
359
502
  *
@@ -361,7 +504,7 @@ class UsageapiClient {
361
504
  * @param GetCustomTableRequest
362
505
  * @return GetCustomTableResponse
363
506
  * @throws OciError when an error occurs
364
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.22.0/usageapi/GetCustomTable.ts.html |here} to see how to use GetCustomTable API.
507
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.24.0/usageapi/GetCustomTable.ts.html |here} to see how to use GetCustomTable API.
365
508
  */
366
509
  getCustomTable(getCustomTableRequest) {
367
510
  return __awaiter(this, void 0, void 0, function* () {
@@ -423,7 +566,7 @@ class UsageapiClient {
423
566
  * @param GetQueryRequest
424
567
  * @return GetQueryResponse
425
568
  * @throws OciError when an error occurs
426
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.22.0/usageapi/GetQuery.ts.html |here} to see how to use GetQuery API.
569
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.24.0/usageapi/GetQuery.ts.html |here} to see how to use GetQuery API.
427
570
  */
428
571
  getQuery(getQueryRequest) {
429
572
  return __awaiter(this, void 0, void 0, function* () {
@@ -478,6 +621,130 @@ class UsageapiClient {
478
621
  }
479
622
  });
480
623
  }
624
+ /**
625
+ * Returns the saved schedule.
626
+ *
627
+ * This operation does not retry by default if the user has not defined a retry configuration.
628
+ * @param GetScheduleRequest
629
+ * @return GetScheduleResponse
630
+ * @throws OciError when an error occurs
631
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.24.0/usageapi/GetSchedule.ts.html |here} to see how to use GetSchedule API.
632
+ */
633
+ getSchedule(getScheduleRequest) {
634
+ return __awaiter(this, void 0, void 0, function* () {
635
+ if (this.logger)
636
+ this.logger.debug("Calling operation UsageapiClient#getSchedule.");
637
+ const pathParams = {
638
+ "{scheduleId}": getScheduleRequest.scheduleId
639
+ };
640
+ const queryParams = {};
641
+ let headerParams = {
642
+ "Content-Type": common.Constants.APPLICATION_JSON,
643
+ "opc-request-id": getScheduleRequest.opcRequestId
644
+ };
645
+ const specRetryConfiguration = common.NoRetryConfigurationDetails;
646
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getScheduleRequest.retryConfiguration, specRetryConfiguration);
647
+ if (this.logger)
648
+ retrier.logger = this.logger;
649
+ const request = yield oci_common_1.composeRequest({
650
+ baseEndpoint: this._endpoint,
651
+ defaultHeaders: this._defaultHeaders,
652
+ path: "/schedules/{scheduleId}",
653
+ method: "GET",
654
+ pathParams: pathParams,
655
+ headerParams: headerParams,
656
+ queryParams: queryParams
657
+ });
658
+ try {
659
+ const response = yield retrier.makeServiceCall(this._httpClient, request);
660
+ const sdkResponse = oci_common_1.composeResponse({
661
+ responseObject: {},
662
+ body: yield response.json(),
663
+ bodyKey: "schedule",
664
+ bodyModel: model.Schedule,
665
+ type: "model.Schedule",
666
+ responseHeaders: [
667
+ {
668
+ value: response.headers.get("opc-request-id"),
669
+ key: "opcRequestId",
670
+ dataType: "string"
671
+ },
672
+ {
673
+ value: response.headers.get("etag"),
674
+ key: "etag",
675
+ dataType: "string"
676
+ }
677
+ ]
678
+ });
679
+ return sdkResponse;
680
+ }
681
+ catch (err) {
682
+ throw err;
683
+ }
684
+ });
685
+ }
686
+ /**
687
+ * Returns the saved schedule run.
688
+ *
689
+ * This operation does not retry by default if the user has not defined a retry configuration.
690
+ * @param GetScheduledRunRequest
691
+ * @return GetScheduledRunResponse
692
+ * @throws OciError when an error occurs
693
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.24.0/usageapi/GetScheduledRun.ts.html |here} to see how to use GetScheduledRun API.
694
+ */
695
+ getScheduledRun(getScheduledRunRequest) {
696
+ return __awaiter(this, void 0, void 0, function* () {
697
+ if (this.logger)
698
+ this.logger.debug("Calling operation UsageapiClient#getScheduledRun.");
699
+ const pathParams = {
700
+ "{scheduledRunId}": getScheduledRunRequest.scheduledRunId
701
+ };
702
+ const queryParams = {};
703
+ let headerParams = {
704
+ "Content-Type": common.Constants.APPLICATION_JSON,
705
+ "opc-request-id": getScheduledRunRequest.opcRequestId
706
+ };
707
+ const specRetryConfiguration = common.NoRetryConfigurationDetails;
708
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getScheduledRunRequest.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: "/scheduledRuns/{scheduledRunId}",
715
+ method: "GET",
716
+ pathParams: pathParams,
717
+ headerParams: headerParams,
718
+ queryParams: queryParams
719
+ });
720
+ try {
721
+ const response = yield retrier.makeServiceCall(this._httpClient, request);
722
+ const sdkResponse = oci_common_1.composeResponse({
723
+ responseObject: {},
724
+ body: yield response.json(),
725
+ bodyKey: "scheduledRun",
726
+ bodyModel: model.ScheduledRun,
727
+ type: "model.ScheduledRun",
728
+ responseHeaders: [
729
+ {
730
+ value: response.headers.get("opc-request-id"),
731
+ key: "opcRequestId",
732
+ dataType: "string"
733
+ },
734
+ {
735
+ value: response.headers.get("etag"),
736
+ key: "etag",
737
+ dataType: "string"
738
+ }
739
+ ]
740
+ });
741
+ return sdkResponse;
742
+ }
743
+ catch (err) {
744
+ throw err;
745
+ }
746
+ });
747
+ }
481
748
  /**
482
749
  * Returns the saved custom table list.
483
750
  *
@@ -485,7 +752,7 @@ class UsageapiClient {
485
752
  * @param ListCustomTablesRequest
486
753
  * @return ListCustomTablesResponse
487
754
  * @throws OciError when an error occurs
488
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.22.0/usageapi/ListCustomTables.ts.html |here} to see how to use ListCustomTables API.
755
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.24.0/usageapi/ListCustomTables.ts.html |here} to see how to use ListCustomTables API.
489
756
  */
490
757
  listCustomTables(listCustomTablesRequest) {
491
758
  return __awaiter(this, void 0, void 0, function* () {
@@ -552,7 +819,7 @@ class UsageapiClient {
552
819
  * @param ListQueriesRequest
553
820
  * @return ListQueriesResponse
554
821
  * @throws OciError when an error occurs
555
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.22.0/usageapi/ListQueries.ts.html |here} to see how to use ListQueries API.
822
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.24.0/usageapi/ListQueries.ts.html |here} to see how to use ListQueries API.
556
823
  */
557
824
  listQueries(listQueriesRequest) {
558
825
  return __awaiter(this, void 0, void 0, function* () {
@@ -611,6 +878,139 @@ class UsageapiClient {
611
878
  }
612
879
  });
613
880
  }
881
+ /**
882
+ * Returns schedule history list.
883
+ *
884
+ * This operation does not retry by default if the user has not defined a retry configuration.
885
+ * @param ListScheduledRunsRequest
886
+ * @return ListScheduledRunsResponse
887
+ * @throws OciError when an error occurs
888
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.24.0/usageapi/ListScheduledRuns.ts.html |here} to see how to use ListScheduledRuns API.
889
+ */
890
+ listScheduledRuns(listScheduledRunsRequest) {
891
+ return __awaiter(this, void 0, void 0, function* () {
892
+ if (this.logger)
893
+ this.logger.debug("Calling operation UsageapiClient#listScheduledRuns.");
894
+ const pathParams = {};
895
+ const queryParams = {
896
+ "page": listScheduledRunsRequest.page,
897
+ "limit": listScheduledRunsRequest.limit,
898
+ "scheduleId": listScheduledRunsRequest.scheduleId,
899
+ "sortBy": listScheduledRunsRequest.sortBy,
900
+ "sortOrder": listScheduledRunsRequest.sortOrder
901
+ };
902
+ let headerParams = {
903
+ "Content-Type": common.Constants.APPLICATION_JSON,
904
+ "opc-request-id": listScheduledRunsRequest.opcRequestId
905
+ };
906
+ const specRetryConfiguration = common.NoRetryConfigurationDetails;
907
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listScheduledRunsRequest.retryConfiguration, specRetryConfiguration);
908
+ if (this.logger)
909
+ retrier.logger = this.logger;
910
+ const request = yield oci_common_1.composeRequest({
911
+ baseEndpoint: this._endpoint,
912
+ defaultHeaders: this._defaultHeaders,
913
+ path: "/scheduledRuns",
914
+ method: "GET",
915
+ pathParams: pathParams,
916
+ headerParams: headerParams,
917
+ queryParams: queryParams
918
+ });
919
+ try {
920
+ const response = yield retrier.makeServiceCall(this._httpClient, request);
921
+ const sdkResponse = oci_common_1.composeResponse({
922
+ responseObject: {},
923
+ body: yield response.json(),
924
+ bodyKey: "scheduledRunCollection",
925
+ bodyModel: model.ScheduledRunCollection,
926
+ type: "model.ScheduledRunCollection",
927
+ responseHeaders: [
928
+ {
929
+ value: response.headers.get("opc-request-id"),
930
+ key: "opcRequestId",
931
+ dataType: "string"
932
+ },
933
+ {
934
+ value: response.headers.get("opc-next-page"),
935
+ key: "opcNextPage",
936
+ dataType: "string"
937
+ }
938
+ ]
939
+ });
940
+ return sdkResponse;
941
+ }
942
+ catch (err) {
943
+ throw err;
944
+ }
945
+ });
946
+ }
947
+ /**
948
+ * Returns the saved schedule list.
949
+ *
950
+ * This operation does not retry by default if the user has not defined a retry configuration.
951
+ * @param ListSchedulesRequest
952
+ * @return ListSchedulesResponse
953
+ * @throws OciError when an error occurs
954
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.24.0/usageapi/ListSchedules.ts.html |here} to see how to use ListSchedules API.
955
+ */
956
+ listSchedules(listSchedulesRequest) {
957
+ return __awaiter(this, void 0, void 0, function* () {
958
+ if (this.logger)
959
+ this.logger.debug("Calling operation UsageapiClient#listSchedules.");
960
+ const pathParams = {};
961
+ const queryParams = {
962
+ "compartmentId": listSchedulesRequest.compartmentId,
963
+ "page": listSchedulesRequest.page,
964
+ "limit": listSchedulesRequest.limit,
965
+ "sortBy": listSchedulesRequest.sortBy,
966
+ "sortOrder": listSchedulesRequest.sortOrder,
967
+ "name": listSchedulesRequest.name
968
+ };
969
+ let headerParams = {
970
+ "Content-Type": common.Constants.APPLICATION_JSON,
971
+ "opc-request-id": listSchedulesRequest.opcRequestId
972
+ };
973
+ const specRetryConfiguration = common.NoRetryConfigurationDetails;
974
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listSchedulesRequest.retryConfiguration, specRetryConfiguration);
975
+ if (this.logger)
976
+ retrier.logger = this.logger;
977
+ const request = yield oci_common_1.composeRequest({
978
+ baseEndpoint: this._endpoint,
979
+ defaultHeaders: this._defaultHeaders,
980
+ path: "/schedules",
981
+ method: "GET",
982
+ pathParams: pathParams,
983
+ headerParams: headerParams,
984
+ queryParams: queryParams
985
+ });
986
+ try {
987
+ const response = yield retrier.makeServiceCall(this._httpClient, request);
988
+ const sdkResponse = oci_common_1.composeResponse({
989
+ responseObject: {},
990
+ body: yield response.json(),
991
+ bodyKey: "scheduleCollection",
992
+ bodyModel: model.ScheduleCollection,
993
+ type: "model.ScheduleCollection",
994
+ responseHeaders: [
995
+ {
996
+ value: response.headers.get("opc-request-id"),
997
+ key: "opcRequestId",
998
+ dataType: "string"
999
+ },
1000
+ {
1001
+ value: response.headers.get("opc-next-page"),
1002
+ key: "opcNextPage",
1003
+ dataType: "string"
1004
+ }
1005
+ ]
1006
+ });
1007
+ return sdkResponse;
1008
+ }
1009
+ catch (err) {
1010
+ throw err;
1011
+ }
1012
+ });
1013
+ }
614
1014
  /**
615
1015
  * Returns the configurations list for the UI drop-down list.
616
1016
  *
@@ -618,7 +1018,7 @@ class UsageapiClient {
618
1018
  * @param RequestSummarizedConfigurationsRequest
619
1019
  * @return RequestSummarizedConfigurationsResponse
620
1020
  * @throws OciError when an error occurs
621
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.22.0/usageapi/RequestSummarizedConfigurations.ts.html |here} to see how to use RequestSummarizedConfigurations API.
1021
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.24.0/usageapi/RequestSummarizedConfigurations.ts.html |here} to see how to use RequestSummarizedConfigurations API.
622
1022
  */
623
1023
  requestSummarizedConfigurations(requestSummarizedConfigurationsRequest) {
624
1024
  return __awaiter(this, void 0, void 0, function* () {
@@ -675,7 +1075,7 @@ class UsageapiClient {
675
1075
  * @param RequestSummarizedUsagesRequest
676
1076
  * @return RequestSummarizedUsagesResponse
677
1077
  * @throws OciError when an error occurs
678
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.22.0/usageapi/RequestSummarizedUsages.ts.html |here} to see how to use RequestSummarizedUsages API.
1078
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.24.0/usageapi/RequestSummarizedUsages.ts.html |here} to see how to use RequestSummarizedUsages API.
679
1079
  */
680
1080
  requestSummarizedUsages(requestSummarizedUsagesRequest) {
681
1081
  return __awaiter(this, void 0, void 0, function* () {
@@ -739,7 +1139,7 @@ class UsageapiClient {
739
1139
  * @param UpdateCustomTableRequest
740
1140
  * @return UpdateCustomTableResponse
741
1141
  * @throws OciError when an error occurs
742
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.22.0/usageapi/UpdateCustomTable.ts.html |here} to see how to use UpdateCustomTable API.
1142
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.24.0/usageapi/UpdateCustomTable.ts.html |here} to see how to use UpdateCustomTable API.
743
1143
  */
744
1144
  updateCustomTable(updateCustomTableRequest) {
745
1145
  return __awaiter(this, void 0, void 0, function* () {
@@ -803,7 +1203,7 @@ class UsageapiClient {
803
1203
  * @param UpdateQueryRequest
804
1204
  * @return UpdateQueryResponse
805
1205
  * @throws OciError when an error occurs
806
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.22.0/usageapi/UpdateQuery.ts.html |here} to see how to use UpdateQuery API.
1206
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.24.0/usageapi/UpdateQuery.ts.html |here} to see how to use UpdateQuery API.
807
1207
  */
808
1208
  updateQuery(updateQueryRequest) {
809
1209
  return __awaiter(this, void 0, void 0, function* () {
@@ -860,6 +1260,70 @@ class UsageapiClient {
860
1260
  }
861
1261
  });
862
1262
  }
1263
+ /**
1264
+ * Update a saved schedule
1265
+ *
1266
+ * This operation does not retry by default if the user has not defined a retry configuration.
1267
+ * @param UpdateScheduleRequest
1268
+ * @return UpdateScheduleResponse
1269
+ * @throws OciError when an error occurs
1270
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.24.0/usageapi/UpdateSchedule.ts.html |here} to see how to use UpdateSchedule API.
1271
+ */
1272
+ updateSchedule(updateScheduleRequest) {
1273
+ return __awaiter(this, void 0, void 0, function* () {
1274
+ if (this.logger)
1275
+ this.logger.debug("Calling operation UsageapiClient#updateSchedule.");
1276
+ const pathParams = {
1277
+ "{scheduleId}": updateScheduleRequest.scheduleId
1278
+ };
1279
+ const queryParams = {};
1280
+ let headerParams = {
1281
+ "Content-Type": common.Constants.APPLICATION_JSON,
1282
+ "opc-request-id": updateScheduleRequest.opcRequestId,
1283
+ "if-match": updateScheduleRequest.ifMatch
1284
+ };
1285
+ const specRetryConfiguration = common.NoRetryConfigurationDetails;
1286
+ const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, updateScheduleRequest.retryConfiguration, specRetryConfiguration);
1287
+ if (this.logger)
1288
+ retrier.logger = this.logger;
1289
+ const request = yield oci_common_1.composeRequest({
1290
+ baseEndpoint: this._endpoint,
1291
+ defaultHeaders: this._defaultHeaders,
1292
+ path: "/schedules/{scheduleId}",
1293
+ method: "PUT",
1294
+ bodyContent: common.ObjectSerializer.serialize(updateScheduleRequest.updateScheduleDetails, "UpdateScheduleDetails", model.UpdateScheduleDetails.getJsonObj),
1295
+ pathParams: pathParams,
1296
+ headerParams: headerParams,
1297
+ queryParams: queryParams
1298
+ });
1299
+ try {
1300
+ const response = yield retrier.makeServiceCall(this._httpClient, request);
1301
+ const sdkResponse = oci_common_1.composeResponse({
1302
+ responseObject: {},
1303
+ body: yield response.json(),
1304
+ bodyKey: "schedule",
1305
+ bodyModel: model.Schedule,
1306
+ type: "model.Schedule",
1307
+ responseHeaders: [
1308
+ {
1309
+ value: response.headers.get("opc-request-id"),
1310
+ key: "opcRequestId",
1311
+ dataType: "string"
1312
+ },
1313
+ {
1314
+ value: response.headers.get("etag"),
1315
+ key: "etag",
1316
+ dataType: "string"
1317
+ }
1318
+ ]
1319
+ });
1320
+ return sdkResponse;
1321
+ }
1322
+ catch (err) {
1323
+ throw err;
1324
+ }
1325
+ });
1326
+ }
863
1327
  }
864
1328
  exports.UsageapiClient = UsageapiClient;
865
1329
  UsageapiClient.serviceEndpointTemplate = "https://usageapi.{region}.oci.{secondLevelDomain}";