oci-apmtraces 2.111.2 → 2.112.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 (133) hide show
  1. package/index.d.ts +3 -0
  2. package/index.js +4 -1
  3. package/index.js.map +1 -1
  4. package/lib/client.d.ts +145 -4
  5. package/lib/client.js +570 -5
  6. package/lib/client.js.map +1 -1
  7. package/lib/model/attribute-metadata.d.ts +55 -0
  8. package/lib/model/attribute-metadata.js +54 -0
  9. package/lib/model/attribute-metadata.js.map +1 -0
  10. package/lib/model/attribute-response.d.ts +1 -1
  11. package/lib/model/attribute-update-response.d.ts +1 -1
  12. package/lib/model/attribute.d.ts +33 -0
  13. package/lib/model/attribute.js +30 -0
  14. package/lib/model/attribute.js.map +1 -0
  15. package/lib/model/auto-activate-status.d.ts +10 -1
  16. package/lib/model/auto-activate-status.js +10 -0
  17. package/lib/model/auto-activate-status.js.map +1 -1
  18. package/lib/model/auto-activate-toggle-status.d.ts +10 -1
  19. package/lib/model/auto-activate-toggle-status.js +10 -0
  20. package/lib/model/auto-activate-toggle-status.js.map +1 -1
  21. package/lib/model/bulk-activate-attribute-detail.d.ts +10 -3
  22. package/lib/model/bulk-activate-attribute-detail.js +2 -0
  23. package/lib/model/bulk-activate-attribute-detail.js.map +1 -1
  24. package/lib/model/bulk-de-activate-attribute-detail.d.ts +2 -1
  25. package/lib/model/bulk-de-activate-attribute-detail.js +1 -0
  26. package/lib/model/bulk-de-activate-attribute-detail.js.map +1 -1
  27. package/lib/model/bulk-pin-attribute-detail.d.ts +2 -1
  28. package/lib/model/bulk-pin-attribute-detail.js +1 -0
  29. package/lib/model/bulk-pin-attribute-detail.js.map +1 -1
  30. package/lib/model/bulk-unpin-attribute-detail.d.ts +2 -1
  31. package/lib/model/bulk-unpin-attribute-detail.js +1 -0
  32. package/lib/model/bulk-unpin-attribute-detail.js.map +1 -1
  33. package/lib/model/bulk-update-attribute-detail.d.ts +3 -2
  34. package/lib/model/bulk-update-attribute-detail.js +1 -0
  35. package/lib/model/bulk-update-attribute-detail.js.map +1 -1
  36. package/lib/model/bulk-update-attribute-notes-detail.d.ts +2 -1
  37. package/lib/model/bulk-update-attribute-notes-detail.js +1 -0
  38. package/lib/model/bulk-update-attribute-notes-detail.js.map +1 -1
  39. package/lib/model/create-scheduled-query-details.d.ts +88 -0
  40. package/lib/model/create-scheduled-query-details.js +58 -0
  41. package/lib/model/create-scheduled-query-details.js.map +1 -0
  42. package/lib/model/custom-metric.d.ts +67 -0
  43. package/lib/model/custom-metric.js +30 -0
  44. package/lib/model/custom-metric.js.map +1 -0
  45. package/lib/model/index.d.ts +34 -0
  46. package/lib/model/index.js +36 -2
  47. package/lib/model/index.js.map +1 -1
  48. package/lib/model/lifecycle-states.d.ts +33 -0
  49. package/lib/model/lifecycle-states.js +44 -0
  50. package/lib/model/lifecycle-states.js.map +1 -0
  51. package/lib/model/log.d.ts +97 -0
  52. package/lib/model/log.js +69 -0
  53. package/lib/model/log.js.map +1 -0
  54. package/lib/model/object-storage.d.ts +38 -0
  55. package/lib/model/object-storage.js +30 -0
  56. package/lib/model/object-storage.js.map +1 -0
  57. package/lib/model/scheduled-query-collection.d.ts +29 -0
  58. package/lib/model/scheduled-query-collection.js +62 -0
  59. package/lib/model/scheduled-query-collection.js.map +1 -0
  60. package/lib/model/scheduled-query-processing-config.d.ts +27 -0
  61. package/lib/model/scheduled-query-processing-config.js +68 -0
  62. package/lib/model/scheduled-query-processing-config.js.map +1 -0
  63. package/lib/model/scheduled-query-processing-sub-type.d.ts +32 -0
  64. package/lib/model/scheduled-query-processing-sub-type.js +43 -0
  65. package/lib/model/scheduled-query-processing-sub-type.js.map +1 -0
  66. package/lib/model/scheduled-query-processing-type.d.ts +31 -0
  67. package/lib/model/scheduled-query-processing-type.js +42 -0
  68. package/lib/model/scheduled-query-processing-type.js.map +1 -0
  69. package/lib/model/scheduled-query-retention-criteria.d.ts +30 -0
  70. package/lib/model/scheduled-query-retention-criteria.js +41 -0
  71. package/lib/model/scheduled-query-retention-criteria.js.map +1 -0
  72. package/lib/model/scheduled-query-summary.d.ts +103 -0
  73. package/lib/model/scheduled-query-summary.js +58 -0
  74. package/lib/model/scheduled-query-summary.js.map +1 -0
  75. package/lib/model/scheduled-query.d.ts +118 -0
  76. package/lib/model/scheduled-query.js +58 -0
  77. package/lib/model/scheduled-query.js.map +1 -0
  78. package/lib/model/sort-order.d.ts +24 -0
  79. package/lib/model/sort-order.js +35 -0
  80. package/lib/model/sort-order.js.map +1 -0
  81. package/lib/model/streaming.d.ts +28 -0
  82. package/lib/model/streaming.js +30 -0
  83. package/lib/model/streaming.js.map +1 -0
  84. package/lib/model/tag-metadata.d.ts +1 -1
  85. package/lib/model/update-scheduled-query-details.d.ts +88 -0
  86. package/lib/model/update-scheduled-query-details.js +58 -0
  87. package/lib/model/update-scheduled-query-details.js.map +1 -0
  88. package/lib/request/create-scheduled-query-request.d.ts +50 -0
  89. package/lib/request/create-scheduled-query-request.js +15 -0
  90. package/lib/request/create-scheduled-query-request.js.map +1 -0
  91. package/lib/request/delete-scheduled-query-request.d.ts +52 -0
  92. package/lib/request/delete-scheduled-query-request.js +15 -0
  93. package/lib/request/delete-scheduled-query-request.js.map +1 -0
  94. package/lib/request/get-log-request.d.ts +53 -0
  95. package/lib/request/get-log-request.js +15 -0
  96. package/lib/request/get-log-request.js.map +1 -0
  97. package/lib/request/get-scheduled-query-request.d.ts +43 -0
  98. package/lib/request/get-scheduled-query-request.js +15 -0
  99. package/lib/request/get-scheduled-query-request.js.map +1 -0
  100. package/lib/request/get-trace-request.d.ts +2 -2
  101. package/lib/request/index.d.ts +12 -0
  102. package/lib/request/index.js +3 -1
  103. package/lib/request/index.js.map +1 -1
  104. package/lib/request/list-scheduled-queries-request.d.ts +74 -0
  105. package/lib/request/list-scheduled-queries-request.js +27 -0
  106. package/lib/request/list-scheduled-queries-request.js.map +1 -0
  107. package/lib/request/query-request.d.ts +6 -4
  108. package/lib/request/update-scheduled-query-request.d.ts +64 -0
  109. package/lib/request/update-scheduled-query-request.js +15 -0
  110. package/lib/request/update-scheduled-query-request.js.map +1 -0
  111. package/lib/response/create-scheduled-query-response.d.ts +30 -0
  112. package/lib/response/create-scheduled-query-response.js +15 -0
  113. package/lib/response/create-scheduled-query-response.js.map +1 -0
  114. package/lib/response/delete-scheduled-query-response.d.ts +20 -0
  115. package/lib/response/delete-scheduled-query-response.js +15 -0
  116. package/lib/response/delete-scheduled-query-response.js.map +1 -0
  117. package/lib/response/get-log-response.d.ts +30 -0
  118. package/lib/response/get-log-response.js +15 -0
  119. package/lib/response/get-log-response.js.map +1 -0
  120. package/lib/response/get-scheduled-query-response.d.ts +30 -0
  121. package/lib/response/get-scheduled-query-response.js +15 -0
  122. package/lib/response/get-scheduled-query-response.js.map +1 -0
  123. package/lib/response/index.d.ts +12 -0
  124. package/lib/response/list-scheduled-queries-response.d.ts +32 -0
  125. package/lib/response/list-scheduled-queries-response.js +15 -0
  126. package/lib/response/list-scheduled-queries-response.js.map +1 -0
  127. package/lib/response/update-scheduled-query-response.d.ts +30 -0
  128. package/lib/response/update-scheduled-query-response.js +15 -0
  129. package/lib/response/update-scheduled-query-response.js.map +1 -0
  130. package/lib/scheduledquery-waiter.d.ts +30 -0
  131. package/lib/scheduledquery-waiter.js +66 -0
  132. package/lib/scheduledquery-waiter.js.map +1 -0
  133. package/package.json +3 -3
package/lib/client.js CHANGED
@@ -41,10 +41,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
41
41
  });
42
42
  };
43
43
  Object.defineProperty(exports, "__esModule", { value: true });
44
- exports.TraceClient = exports.TraceApiKeys = exports.QueryClient = exports.QueryApiKeys = exports.AttributesClient = exports.AttributesApiKeys = void 0;
44
+ exports.TraceClient = exports.TraceApiKeys = exports.ScheduledQueryClient = exports.ScheduledQueryApiKeys = exports.QueryClient = exports.QueryApiKeys = exports.AttributesClient = exports.AttributesApiKeys = void 0;
45
45
  const common = require("oci-common");
46
46
  const model = __importStar(require("./model"));
47
47
  const oci_common_1 = require("oci-common");
48
+ const scheduledquery_waiter_1 = require("./scheduledquery-waiter");
48
49
  const oci_common_2 = require("oci-common");
49
50
  const Breaker = require("opossum");
50
51
  // ===============================================
@@ -188,9 +189,9 @@ class AttributesClient {
188
189
  this.closeProvider();
189
190
  }
190
191
  /**
191
- * Activates a set of attributes for the given APM Domain. The API is not case-sensitive. Any duplicates present in the bulk activation
192
+ * Activates a set of attributes for the given APM Domain. Attribute names are not case-sensitive. Any duplicates present in the bulk activation
192
193
  * request are deduplicated and only unique attributes are activated. A maximum number of 700 string attributes and 100 numeric attributes
193
- * can be activated in an APM Domain subject to the available string and numeric slots. Once an attribute has been activated, it may take sometime
194
+ * can be activated in an APM Domain subject to the available string and numeric slots. Once an attribute has been activated, it may take some time
194
195
  * for it to be appear in searches as ingest might not have picked up the changes or any associated caches might not have refreshed. The
195
196
  * bulk activation operation is atomic, and the operation succeeds only if all the attributes in the request have been processed successfully and they
196
197
  * get a success status back. If the processing of any attribute results in a processing or validation error, then none of the attributes in the bulk
@@ -254,10 +255,10 @@ class AttributesClient {
254
255
  });
255
256
  }
256
257
  /**
257
- * Deactivates a set of attributes for the given APM Domain. The API is case in-sensitive. Any duplicates present in the bulk deactivation
258
+ * Deactivates a set of attributes for the given APM Domain. Attribute names are not case-sensitive. Any duplicates present in the bulk deactivation
258
259
  * request are deduplicated and only unique attributes are deactivated. A maximum number of 700 string attributes and 100 numeric attributes
259
260
  * can be deactivated in an APM Domain subject to the available string and numeric slots. Out of box attributes (Trace and Span) cannot be
260
- * deactivated, and will result in a processing error. Once an attribute has been deactivated, it may take sometime for it to disappear in
261
+ * deactivated, and will result in a processing error. Once an attribute has been deactivated, it may take some time for it to disappear in
261
262
  * searches as ingest might not have picked up the changes or any associated caches might not have refreshed. The bulk deactivation
262
263
  * operation is atomic, and the operation succeeds only if all the attributes in the request have been processed successfully and they get a success
263
264
  * status back. If the processing of any attribute results in a processing or validation error, then none of the attributes in the bulk request
@@ -1018,6 +1019,501 @@ class QueryClient {
1018
1019
  exports.QueryClient = QueryClient;
1019
1020
  QueryClient.serviceEndpointTemplate = "https://apm-trace.{region}.oci.{secondLevelDomain}";
1020
1021
  QueryClient.endpointServiceName = "";
1022
+ var ScheduledQueryApiKeys;
1023
+ (function (ScheduledQueryApiKeys) {
1024
+ })(ScheduledQueryApiKeys = exports.ScheduledQueryApiKeys || (exports.ScheduledQueryApiKeys = {}));
1025
+ /**
1026
+ * This service client uses {@link common.CircuitBreaker.DefaultConfiguration} for all the operations by default if no circuit breaker configuration is defined by the user.
1027
+ */
1028
+ class ScheduledQueryClient {
1029
+ constructor(params, clientConfiguration) {
1030
+ this["_realmSpecificEndpointTemplateEnabled"] = undefined;
1031
+ this["_endpoint"] = "";
1032
+ this["_defaultHeaders"] = {};
1033
+ this._circuitBreaker = null;
1034
+ this._httpOptions = undefined;
1035
+ this._bodyDuplexMode = undefined;
1036
+ this.targetService = "ScheduledQuery";
1037
+ this._regionId = "";
1038
+ this._lastSetRegionOrRegionId = "";
1039
+ const requestSigner = params.authenticationDetailsProvider
1040
+ ? new common.DefaultRequestSigner(params.authenticationDetailsProvider)
1041
+ : null;
1042
+ this._authProvider = params.authenticationDetailsProvider;
1043
+ if (clientConfiguration) {
1044
+ this._clientConfiguration = clientConfiguration;
1045
+ this._circuitBreaker = clientConfiguration.circuitBreaker
1046
+ ? clientConfiguration.circuitBreaker.circuit
1047
+ : null;
1048
+ this._httpOptions = clientConfiguration.httpOptions
1049
+ ? clientConfiguration.httpOptions
1050
+ : undefined;
1051
+ this._bodyDuplexMode = clientConfiguration.bodyDuplexMode
1052
+ ? clientConfiguration.bodyDuplexMode
1053
+ : undefined;
1054
+ }
1055
+ if (!oci_common_2.developerToolConfiguration.isServiceEnabled("apmtraces")) {
1056
+ 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 : ";
1057
+ throw errmsg.concat("apmtraces");
1058
+ }
1059
+ // if circuit breaker is not created, check if circuit breaker system is enabled to use default circuit breaker
1060
+ const specCircuitBreakerEnabled = true;
1061
+ if (!this._circuitBreaker &&
1062
+ common.utils.isCircuitBreakerSystemEnabled(clientConfiguration) &&
1063
+ (specCircuitBreakerEnabled || common.CircuitBreaker.DefaultCircuitBreakerOverriden)) {
1064
+ this._circuitBreaker = new common.CircuitBreaker().circuit;
1065
+ }
1066
+ this._httpClient =
1067
+ params.httpClient ||
1068
+ new common.FetchHttpClient(requestSigner, this._circuitBreaker, this._httpOptions, this._bodyDuplexMode);
1069
+ if (params.authenticationDetailsProvider &&
1070
+ common.isRegionProvider(params.authenticationDetailsProvider)) {
1071
+ const provider = params.authenticationDetailsProvider;
1072
+ if (provider.getRegion()) {
1073
+ this.region = provider.getRegion();
1074
+ }
1075
+ }
1076
+ }
1077
+ /**
1078
+ * Get the endpoint that is being used to call (ex, https://www.example.com).
1079
+ */
1080
+ get endpoint() {
1081
+ return this._endpoint;
1082
+ }
1083
+ /**
1084
+ * Sets the endpoint to call (ex, https://www.example.com).
1085
+ * @param endpoint The endpoint of the service.
1086
+ */
1087
+ set endpoint(endpoint) {
1088
+ this._endpoint = endpoint;
1089
+ this._endpoint = this._endpoint + "/20200630";
1090
+ if (this.logger)
1091
+ this.logger.info(`ScheduledQueryClient endpoint set to ${this._endpoint}`);
1092
+ }
1093
+ get logger() {
1094
+ return common.LOG.logger;
1095
+ }
1096
+ /**
1097
+ * Determines whether realm specific endpoint should be used or not.
1098
+ * Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false"
1099
+ * @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template
1100
+ */
1101
+ set useRealmSpecificEndpointTemplate(realmSpecificEndpointTemplateEnabled) {
1102
+ this._realmSpecificEndpointTemplateEnabled = realmSpecificEndpointTemplateEnabled;
1103
+ if (this.logger)
1104
+ this.logger.info(`realmSpecificEndpointTemplateEnabled set to ${this._realmSpecificEndpointTemplateEnabled}`);
1105
+ if (this._lastSetRegionOrRegionId === common.Region.REGION_STRING) {
1106
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegion(ScheduledQueryClient.serviceEndpointTemplate, this._region, ScheduledQueryClient.endpointServiceName);
1107
+ }
1108
+ else if (this._lastSetRegionOrRegionId === common.Region.REGION_ID_STRING) {
1109
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(ScheduledQueryClient.serviceEndpointTemplate, this._regionId, ScheduledQueryClient.endpointServiceName);
1110
+ }
1111
+ }
1112
+ /**
1113
+ * Sets the region to call (ex, Region.US_PHOENIX_1).
1114
+ * Note, this will call {@link #endpoint(String) endpoint} after resolving the endpoint.
1115
+ * @param region The region of the service.
1116
+ */
1117
+ set region(region) {
1118
+ this._region = region;
1119
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegion(ScheduledQueryClient.serviceEndpointTemplate, region, ScheduledQueryClient.endpointServiceName);
1120
+ this._lastSetRegionOrRegionId = common.Region.REGION_STRING;
1121
+ }
1122
+ /**
1123
+ * Sets the regionId to call (ex, 'us-phoenix-1').
1124
+ *
1125
+ * Note, this will first try to map the region ID to a known Region and call {@link #region(Region) region}.
1126
+ * If no known Region could be determined, it will create an endpoint assuming its in default Realm OC1
1127
+ * and then call {@link #endpoint(String) endpoint}.
1128
+ * @param regionId The public region ID.
1129
+ */
1130
+ set regionId(regionId) {
1131
+ this._regionId = regionId;
1132
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(ScheduledQueryClient.serviceEndpointTemplate, regionId, ScheduledQueryClient.endpointServiceName);
1133
+ this._lastSetRegionOrRegionId = common.Region.REGION_ID_STRING;
1134
+ }
1135
+ /**
1136
+ * Creates a new ScheduledQueryWaiter for resources for this service.
1137
+ *
1138
+ * @param config The waiter configuration for termination and delay strategy
1139
+ * @return The service waiters.
1140
+ */
1141
+ createWaiters(config) {
1142
+ this._waiters = new scheduledquery_waiter_1.ScheduledQueryWaiter(this, config);
1143
+ return this._waiters;
1144
+ }
1145
+ /**
1146
+ * Gets the waiters available for resources for this service.
1147
+ *
1148
+ * @return The service waiters.
1149
+ */
1150
+ getWaiters() {
1151
+ if (this._waiters) {
1152
+ return this._waiters;
1153
+ }
1154
+ throw Error("Waiters do not exist. Please create waiters.");
1155
+ }
1156
+ /**
1157
+ * Shutdown the circuit breaker used by the client when it is no longer needed
1158
+ */
1159
+ shutdownCircuitBreaker() {
1160
+ if (this._circuitBreaker) {
1161
+ this._circuitBreaker.shutdown();
1162
+ }
1163
+ }
1164
+ /**
1165
+ * Close the provider if possible which in turn shuts down any associated circuit breaker
1166
+ */
1167
+ closeProvider() {
1168
+ if (this._authProvider) {
1169
+ if (this._authProvider instanceof common.AbstractRequestingAuthenticationDetailsProvider)
1170
+ (this._authProvider).closeProvider();
1171
+ }
1172
+ }
1173
+ /**
1174
+ * Close the client once it is no longer needed
1175
+ */
1176
+ close() {
1177
+ this.shutdownCircuitBreaker();
1178
+ this.closeProvider();
1179
+ }
1180
+ /**
1181
+ * Create a scheduled query in the APM Domain.
1182
+ *
1183
+ * This operation does not retry by default if the user has not defined a retry configuration.
1184
+ * @param CreateScheduledQueryRequest
1185
+ * @return CreateScheduledQueryResponse
1186
+ * @throws OciError when an error occurs
1187
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/apmtraces/CreateScheduledQuery.ts.html |here} to see how to use CreateScheduledQuery API.
1188
+ */
1189
+ createScheduledQuery(createScheduledQueryRequest) {
1190
+ return __awaiter(this, void 0, void 0, function* () {
1191
+ if (this.logger)
1192
+ this.logger.debug("Calling operation ScheduledQueryClient#createScheduledQuery.");
1193
+ const operationName = "createScheduledQuery";
1194
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/apm-trace-explorer/20200630/ScheduledQuery/CreateScheduledQuery";
1195
+ const pathParams = {};
1196
+ const queryParams = {
1197
+ "apmDomainId": createScheduledQueryRequest.apmDomainId
1198
+ };
1199
+ let headerParams = {
1200
+ "Content-Type": common.Constants.APPLICATION_JSON,
1201
+ "opc-request-id": createScheduledQueryRequest.opcRequestId,
1202
+ "opc-retry-token": createScheduledQueryRequest.opcRetryToken,
1203
+ "opc-dry-run": createScheduledQueryRequest.opcDryRun
1204
+ };
1205
+ const specRetryConfiguration = common.NoRetryConfigurationDetails;
1206
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, createScheduledQueryRequest.retryConfiguration, specRetryConfiguration);
1207
+ if (this.logger)
1208
+ retrier.logger = this.logger;
1209
+ const request = yield oci_common_2.composeRequest({
1210
+ baseEndpoint: this._endpoint,
1211
+ defaultHeaders: this._defaultHeaders,
1212
+ path: "/scheduledQueries",
1213
+ method: "POST",
1214
+ bodyContent: common.ObjectSerializer.serialize(createScheduledQueryRequest.createScheduledQueryDetails, "CreateScheduledQueryDetails", model.CreateScheduledQueryDetails.getJsonObj),
1215
+ pathParams: pathParams,
1216
+ headerParams: headerParams,
1217
+ queryParams: queryParams
1218
+ });
1219
+ try {
1220
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1221
+ const sdkResponse = oci_common_2.composeResponse({
1222
+ responseObject: {},
1223
+ body: yield response.json(),
1224
+ bodyKey: "scheduledQuery",
1225
+ bodyModel: model.ScheduledQuery,
1226
+ type: "model.ScheduledQuery",
1227
+ responseHeaders: [
1228
+ {
1229
+ value: response.headers.get("opc-request-id"),
1230
+ key: "opcRequestId",
1231
+ dataType: "string"
1232
+ },
1233
+ {
1234
+ value: response.headers.get("etag"),
1235
+ key: "etag",
1236
+ dataType: "string"
1237
+ }
1238
+ ]
1239
+ });
1240
+ return sdkResponse;
1241
+ }
1242
+ catch (err) {
1243
+ throw err;
1244
+ }
1245
+ });
1246
+ }
1247
+ /**
1248
+ * Delete a scheduled query in the APM Domain.
1249
+ *
1250
+ * This operation does not retry by default if the user has not defined a retry configuration.
1251
+ * @param DeleteScheduledQueryRequest
1252
+ * @return DeleteScheduledQueryResponse
1253
+ * @throws OciError when an error occurs
1254
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/apmtraces/DeleteScheduledQuery.ts.html |here} to see how to use DeleteScheduledQuery API.
1255
+ */
1256
+ deleteScheduledQuery(deleteScheduledQueryRequest) {
1257
+ return __awaiter(this, void 0, void 0, function* () {
1258
+ if (this.logger)
1259
+ this.logger.debug("Calling operation ScheduledQueryClient#deleteScheduledQuery.");
1260
+ const operationName = "deleteScheduledQuery";
1261
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/apm-trace-explorer/20200630/ScheduledQuery/DeleteScheduledQuery";
1262
+ const pathParams = {
1263
+ "{scheduledQueryId}": deleteScheduledQueryRequest.scheduledQueryId
1264
+ };
1265
+ const queryParams = {
1266
+ "apmDomainId": deleteScheduledQueryRequest.apmDomainId
1267
+ };
1268
+ let headerParams = {
1269
+ "Content-Type": common.Constants.APPLICATION_JSON,
1270
+ "opc-request-id": deleteScheduledQueryRequest.opcRequestId,
1271
+ "if-match": deleteScheduledQueryRequest.ifMatch,
1272
+ "opc-retry-token": deleteScheduledQueryRequest.opcRetryToken
1273
+ };
1274
+ const specRetryConfiguration = common.NoRetryConfigurationDetails;
1275
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, deleteScheduledQueryRequest.retryConfiguration, specRetryConfiguration);
1276
+ if (this.logger)
1277
+ retrier.logger = this.logger;
1278
+ const request = yield oci_common_2.composeRequest({
1279
+ baseEndpoint: this._endpoint,
1280
+ defaultHeaders: this._defaultHeaders,
1281
+ path: "/scheduledQueries/{scheduledQueryId}",
1282
+ method: "DELETE",
1283
+ pathParams: pathParams,
1284
+ headerParams: headerParams,
1285
+ queryParams: queryParams
1286
+ });
1287
+ try {
1288
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1289
+ const sdkResponse = oci_common_2.composeResponse({
1290
+ responseObject: {},
1291
+ responseHeaders: [
1292
+ {
1293
+ value: response.headers.get("opc-request-id"),
1294
+ key: "opcRequestId",
1295
+ dataType: "string"
1296
+ }
1297
+ ]
1298
+ });
1299
+ return sdkResponse;
1300
+ }
1301
+ catch (err) {
1302
+ throw err;
1303
+ }
1304
+ });
1305
+ }
1306
+ /**
1307
+ * Retrieve a scheduled query in the APM Domain.
1308
+ *
1309
+ * This operation does not retry by default if the user has not defined a retry configuration.
1310
+ * @param GetScheduledQueryRequest
1311
+ * @return GetScheduledQueryResponse
1312
+ * @throws OciError when an error occurs
1313
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/apmtraces/GetScheduledQuery.ts.html |here} to see how to use GetScheduledQuery API.
1314
+ */
1315
+ getScheduledQuery(getScheduledQueryRequest) {
1316
+ return __awaiter(this, void 0, void 0, function* () {
1317
+ if (this.logger)
1318
+ this.logger.debug("Calling operation ScheduledQueryClient#getScheduledQuery.");
1319
+ const operationName = "getScheduledQuery";
1320
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/apm-trace-explorer/20200630/ScheduledQuery/GetScheduledQuery";
1321
+ const pathParams = {
1322
+ "{scheduledQueryId}": getScheduledQueryRequest.scheduledQueryId
1323
+ };
1324
+ const queryParams = {
1325
+ "apmDomainId": getScheduledQueryRequest.apmDomainId
1326
+ };
1327
+ let headerParams = {
1328
+ "Content-Type": common.Constants.APPLICATION_JSON,
1329
+ "opc-request-id": getScheduledQueryRequest.opcRequestId,
1330
+ "opc-retry-token": getScheduledQueryRequest.opcRetryToken
1331
+ };
1332
+ const specRetryConfiguration = common.NoRetryConfigurationDetails;
1333
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getScheduledQueryRequest.retryConfiguration, specRetryConfiguration);
1334
+ if (this.logger)
1335
+ retrier.logger = this.logger;
1336
+ const request = yield oci_common_2.composeRequest({
1337
+ baseEndpoint: this._endpoint,
1338
+ defaultHeaders: this._defaultHeaders,
1339
+ path: "/scheduledQueries/{scheduledQueryId}",
1340
+ method: "GET",
1341
+ pathParams: pathParams,
1342
+ headerParams: headerParams,
1343
+ queryParams: queryParams
1344
+ });
1345
+ try {
1346
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1347
+ const sdkResponse = oci_common_2.composeResponse({
1348
+ responseObject: {},
1349
+ body: yield response.json(),
1350
+ bodyKey: "scheduledQuery",
1351
+ bodyModel: model.ScheduledQuery,
1352
+ type: "model.ScheduledQuery",
1353
+ responseHeaders: [
1354
+ {
1355
+ value: response.headers.get("opc-request-id"),
1356
+ key: "opcRequestId",
1357
+ dataType: "string"
1358
+ },
1359
+ {
1360
+ value: response.headers.get("etag"),
1361
+ key: "etag",
1362
+ dataType: "string"
1363
+ }
1364
+ ]
1365
+ });
1366
+ return sdkResponse;
1367
+ }
1368
+ catch (err) {
1369
+ throw err;
1370
+ }
1371
+ });
1372
+ }
1373
+ /**
1374
+ * Returns a list of all scheduled queries in the APM Domain.
1375
+ *
1376
+ * This operation does not retry by default if the user has not defined a retry configuration.
1377
+ * @param ListScheduledQueriesRequest
1378
+ * @return ListScheduledQueriesResponse
1379
+ * @throws OciError when an error occurs
1380
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/apmtraces/ListScheduledQueries.ts.html |here} to see how to use ListScheduledQueries API.
1381
+ */
1382
+ listScheduledQueries(listScheduledQueriesRequest) {
1383
+ return __awaiter(this, void 0, void 0, function* () {
1384
+ if (this.logger)
1385
+ this.logger.debug("Calling operation ScheduledQueryClient#listScheduledQueries.");
1386
+ const operationName = "listScheduledQueries";
1387
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/apm-trace-explorer/20200630/ScheduledQueryCollection/ListScheduledQueries";
1388
+ const pathParams = {};
1389
+ const queryParams = {
1390
+ "apmDomainId": listScheduledQueriesRequest.apmDomainId,
1391
+ "limit": listScheduledQueriesRequest.limit,
1392
+ "page": listScheduledQueriesRequest.page,
1393
+ "displayName": listScheduledQueriesRequest.displayName,
1394
+ "sortOrder": listScheduledQueriesRequest.sortOrder,
1395
+ "sortBy": listScheduledQueriesRequest.sortBy
1396
+ };
1397
+ let headerParams = {
1398
+ "Content-Type": common.Constants.APPLICATION_JSON,
1399
+ "opc-request-id": listScheduledQueriesRequest.opcRequestId,
1400
+ "opc-retry-token": listScheduledQueriesRequest.opcRetryToken
1401
+ };
1402
+ const specRetryConfiguration = common.NoRetryConfigurationDetails;
1403
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listScheduledQueriesRequest.retryConfiguration, specRetryConfiguration);
1404
+ if (this.logger)
1405
+ retrier.logger = this.logger;
1406
+ const request = yield oci_common_2.composeRequest({
1407
+ baseEndpoint: this._endpoint,
1408
+ defaultHeaders: this._defaultHeaders,
1409
+ path: "/scheduledQueries",
1410
+ method: "GET",
1411
+ pathParams: pathParams,
1412
+ headerParams: headerParams,
1413
+ queryParams: queryParams
1414
+ });
1415
+ try {
1416
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1417
+ const sdkResponse = oci_common_2.composeResponse({
1418
+ responseObject: {},
1419
+ body: yield response.json(),
1420
+ bodyKey: "scheduledQueryCollection",
1421
+ bodyModel: model.ScheduledQueryCollection,
1422
+ type: "model.ScheduledQueryCollection",
1423
+ responseHeaders: [
1424
+ {
1425
+ value: response.headers.get("opc-request-id"),
1426
+ key: "opcRequestId",
1427
+ dataType: "string"
1428
+ },
1429
+ {
1430
+ value: response.headers.get("opc-next-page"),
1431
+ key: "opcNextPage",
1432
+ dataType: "string"
1433
+ }
1434
+ ]
1435
+ });
1436
+ return sdkResponse;
1437
+ }
1438
+ catch (err) {
1439
+ throw err;
1440
+ }
1441
+ });
1442
+ }
1443
+ /**
1444
+ * Update a scheduled query in the APM Domain.
1445
+ *
1446
+ * This operation does not retry by default if the user has not defined a retry configuration.
1447
+ * @param UpdateScheduledQueryRequest
1448
+ * @return UpdateScheduledQueryResponse
1449
+ * @throws OciError when an error occurs
1450
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/apmtraces/UpdateScheduledQuery.ts.html |here} to see how to use UpdateScheduledQuery API.
1451
+ */
1452
+ updateScheduledQuery(updateScheduledQueryRequest) {
1453
+ return __awaiter(this, void 0, void 0, function* () {
1454
+ if (this.logger)
1455
+ this.logger.debug("Calling operation ScheduledQueryClient#updateScheduledQuery.");
1456
+ const operationName = "updateScheduledQuery";
1457
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/apm-trace-explorer/20200630/ScheduledQuery/UpdateScheduledQuery";
1458
+ const pathParams = {
1459
+ "{scheduledQueryId}": updateScheduledQueryRequest.scheduledQueryId
1460
+ };
1461
+ const queryParams = {
1462
+ "apmDomainId": updateScheduledQueryRequest.apmDomainId
1463
+ };
1464
+ let headerParams = {
1465
+ "Content-Type": common.Constants.APPLICATION_JSON,
1466
+ "if-match": updateScheduledQueryRequest.ifMatch,
1467
+ "opc-request-id": updateScheduledQueryRequest.opcRequestId,
1468
+ "opc-retry-token": updateScheduledQueryRequest.opcRetryToken,
1469
+ "opc-dry-run": updateScheduledQueryRequest.opcDryRun
1470
+ };
1471
+ const specRetryConfiguration = common.NoRetryConfigurationDetails;
1472
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, updateScheduledQueryRequest.retryConfiguration, specRetryConfiguration);
1473
+ if (this.logger)
1474
+ retrier.logger = this.logger;
1475
+ const request = yield oci_common_2.composeRequest({
1476
+ baseEndpoint: this._endpoint,
1477
+ defaultHeaders: this._defaultHeaders,
1478
+ path: "/scheduledQueries/{scheduledQueryId}",
1479
+ method: "PUT",
1480
+ bodyContent: common.ObjectSerializer.serialize(updateScheduledQueryRequest.updateScheduledQueryDetails, "UpdateScheduledQueryDetails", model.UpdateScheduledQueryDetails.getJsonObj),
1481
+ pathParams: pathParams,
1482
+ headerParams: headerParams,
1483
+ queryParams: queryParams
1484
+ });
1485
+ try {
1486
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1487
+ const sdkResponse = oci_common_2.composeResponse({
1488
+ responseObject: {},
1489
+ body: yield response.json(),
1490
+ bodyKey: "scheduledQuery",
1491
+ bodyModel: model.ScheduledQuery,
1492
+ type: "model.ScheduledQuery",
1493
+ responseHeaders: [
1494
+ {
1495
+ value: response.headers.get("opc-request-id"),
1496
+ key: "opcRequestId",
1497
+ dataType: "string"
1498
+ },
1499
+ {
1500
+ value: response.headers.get("etag"),
1501
+ key: "etag",
1502
+ dataType: "string"
1503
+ }
1504
+ ]
1505
+ });
1506
+ return sdkResponse;
1507
+ }
1508
+ catch (err) {
1509
+ throw err;
1510
+ }
1511
+ });
1512
+ }
1513
+ }
1514
+ exports.ScheduledQueryClient = ScheduledQueryClient;
1515
+ ScheduledQueryClient.serviceEndpointTemplate = "https://apm-trace.{region}.oci.{secondLevelDomain}";
1516
+ ScheduledQueryClient.endpointServiceName = "";
1021
1517
  var TraceApiKeys;
1022
1518
  (function (TraceApiKeys) {
1023
1519
  })(TraceApiKeys = exports.TraceApiKeys || (exports.TraceApiKeys = {}));
@@ -1220,6 +1716,75 @@ class TraceClient {
1220
1716
  }
1221
1717
  });
1222
1718
  }
1719
+ /**
1720
+ * Retrieve a log in the APM Domain.
1721
+ *
1722
+ * This operation does not retry by default if the user has not defined a retry configuration.
1723
+ * @param GetLogRequest
1724
+ * @return GetLogResponse
1725
+ * @throws OciError when an error occurs
1726
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/apmtraces/GetLog.ts.html |here} to see how to use GetLog API.
1727
+ */
1728
+ getLog(getLogRequest) {
1729
+ return __awaiter(this, void 0, void 0, function* () {
1730
+ if (this.logger)
1731
+ this.logger.debug("Calling operation TraceClient#getLog.");
1732
+ const operationName = "getLog";
1733
+ const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/apm-trace-explorer/20200630/Log/GetLog";
1734
+ const pathParams = {
1735
+ "{logKey}": getLogRequest.logKey
1736
+ };
1737
+ const queryParams = {
1738
+ "apmDomainId": getLogRequest.apmDomainId,
1739
+ "timeLogStartedGreaterThanOrEqualTo": getLogRequest.timeLogStartedGreaterThanOrEqualTo,
1740
+ "timeLogEndedLessThan": getLogRequest.timeLogEndedLessThan
1741
+ };
1742
+ let headerParams = {
1743
+ "Content-Type": common.Constants.APPLICATION_JSON,
1744
+ "opc-request-id": getLogRequest.opcRequestId,
1745
+ "opc-retry-token": getLogRequest.opcRetryToken
1746
+ };
1747
+ const specRetryConfiguration = common.NoRetryConfigurationDetails;
1748
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getLogRequest.retryConfiguration, specRetryConfiguration);
1749
+ if (this.logger)
1750
+ retrier.logger = this.logger;
1751
+ const request = yield oci_common_2.composeRequest({
1752
+ baseEndpoint: this._endpoint,
1753
+ defaultHeaders: this._defaultHeaders,
1754
+ path: "/logs/{logKey}",
1755
+ method: "GET",
1756
+ pathParams: pathParams,
1757
+ headerParams: headerParams,
1758
+ queryParams: queryParams
1759
+ });
1760
+ try {
1761
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1762
+ const sdkResponse = oci_common_2.composeResponse({
1763
+ responseObject: {},
1764
+ body: yield response.json(),
1765
+ bodyKey: "log",
1766
+ bodyModel: model.Log,
1767
+ type: "model.Log",
1768
+ responseHeaders: [
1769
+ {
1770
+ value: response.headers.get("opc-request-id"),
1771
+ key: "opcRequestId",
1772
+ dataType: "string"
1773
+ },
1774
+ {
1775
+ value: response.headers.get("etag"),
1776
+ key: "etag",
1777
+ dataType: "string"
1778
+ }
1779
+ ]
1780
+ });
1781
+ return sdkResponse;
1782
+ }
1783
+ catch (err) {
1784
+ throw err;
1785
+ }
1786
+ });
1787
+ }
1223
1788
  /**
1224
1789
  * Gets the span details identified by spanId.
1225
1790
  *