oci-redis 2.111.0 → 2.111.2

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 (131) hide show
  1. package/index.d.ts +4 -0
  2. package/index.js +5 -1
  3. package/index.js.map +1 -1
  4. package/lib/client.d.ts +311 -0
  5. package/lib/client.js +1154 -56
  6. package/lib/client.js.map +1 -1
  7. package/lib/model/attach-oci-cache-users-details.d.ts +25 -0
  8. package/lib/model/attach-oci-cache-users-details.js +29 -0
  9. package/lib/model/attach-oci-cache-users-details.js.map +1 -0
  10. package/lib/model/attached-oci-cache-cluster.d.ts +26 -0
  11. package/lib/model/attached-oci-cache-cluster.js +29 -0
  12. package/lib/model/attached-oci-cache-cluster.js.map +1 -0
  13. package/lib/model/attached-oci-cache-user.d.ts +26 -0
  14. package/lib/model/attached-oci-cache-user.js +29 -0
  15. package/lib/model/attached-oci-cache-user.js.map +1 -0
  16. package/lib/model/authentication-mode.d.ts +22 -0
  17. package/lib/model/authentication-mode.js +72 -0
  18. package/lib/model/authentication-mode.js.map +1 -0
  19. package/lib/model/change-oci-cache-user-compartment-details.d.ts +25 -0
  20. package/lib/model/change-oci-cache-user-compartment-details.js +29 -0
  21. package/lib/model/change-oci-cache-user-compartment-details.js.map +1 -0
  22. package/lib/model/create-identity-token-details.d.ts +47 -0
  23. package/lib/model/create-identity-token-details.js +29 -0
  24. package/lib/model/create-identity-token-details.js.map +1 -0
  25. package/lib/model/create-oci-cache-user-details.d.ts +61 -0
  26. package/lib/model/create-oci-cache-user-details.js +57 -0
  27. package/lib/model/create-oci-cache-user-details.js.map +1 -0
  28. package/lib/model/detach-oci-cache-users-details.d.ts +25 -0
  29. package/lib/model/detach-oci-cache-users-details.js +29 -0
  30. package/lib/model/detach-oci-cache-users-details.js.map +1 -0
  31. package/lib/model/iam-authentication-mode.d.ts +24 -0
  32. package/lib/model/iam-authentication-mode.js +54 -0
  33. package/lib/model/iam-authentication-mode.js.map +1 -0
  34. package/lib/model/identity-token-details-response.d.ts +29 -0
  35. package/lib/model/identity-token-details-response.js +29 -0
  36. package/lib/model/identity-token-details-response.js.map +1 -0
  37. package/lib/model/index.d.ts +30 -0
  38. package/lib/model/index.js +31 -1
  39. package/lib/model/index.js.map +1 -1
  40. package/lib/model/oci-cache-user-collection.d.ts +26 -0
  41. package/lib/model/oci-cache-user-collection.js +61 -0
  42. package/lib/model/oci-cache-user-collection.js.map +1 -0
  43. package/lib/model/oci-cache-user-summary.d.ts +81 -0
  44. package/lib/model/oci-cache-user-summary.js +29 -0
  45. package/lib/model/oci-cache-user-summary.js.map +1 -0
  46. package/lib/model/oci-cache-user.d.ts +109 -0
  47. package/lib/model/oci-cache-user.js +81 -0
  48. package/lib/model/oci-cache-user.js.map +1 -0
  49. package/lib/model/operation-type.d.ts +6 -0
  50. package/lib/model/operation-type.js +6 -0
  51. package/lib/model/operation-type.js.map +1 -1
  52. package/lib/model/password-authentication-mode.d.ts +28 -0
  53. package/lib/model/password-authentication-mode.js +54 -0
  54. package/lib/model/password-authentication-mode.js.map +1 -0
  55. package/lib/model/update-oci-cache-user-details.d.ts +53 -0
  56. package/lib/model/update-oci-cache-user-details.js +57 -0
  57. package/lib/model/update-oci-cache-user-details.js.map +1 -0
  58. package/lib/ocicacheuser-waiter.d.ts +29 -0
  59. package/lib/ocicacheuser-waiter.js +65 -0
  60. package/lib/ocicacheuser-waiter.js.map +1 -0
  61. package/lib/request/attach-oci-cache-users-request.d.ts +49 -0
  62. package/lib/request/attach-oci-cache-users-request.js +15 -0
  63. package/lib/request/attach-oci-cache-users-request.js.map +1 -0
  64. package/lib/request/change-oci-cache-user-compartment-request.d.ts +49 -0
  65. package/lib/request/change-oci-cache-user-compartment-request.js +15 -0
  66. package/lib/request/change-oci-cache-user-compartment-request.js.map +1 -0
  67. package/lib/request/create-identity-token-request.d.ts +49 -0
  68. package/lib/request/create-identity-token-request.js +15 -0
  69. package/lib/request/create-identity-token-request.js.map +1 -0
  70. package/lib/request/create-oci-cache-user-request.d.ts +36 -0
  71. package/lib/request/create-oci-cache-user-request.js +15 -0
  72. package/lib/request/create-oci-cache-user-request.js.map +1 -0
  73. package/lib/request/delete-oci-cache-user-request.d.ts +35 -0
  74. package/lib/request/delete-oci-cache-user-request.js +15 -0
  75. package/lib/request/delete-oci-cache-user-request.js.map +1 -0
  76. package/lib/request/detach-oci-cache-users-request.d.ts +49 -0
  77. package/lib/request/detach-oci-cache-users-request.js +15 -0
  78. package/lib/request/detach-oci-cache-users-request.js.map +1 -0
  79. package/lib/request/get-oci-cache-user-request.d.ts +26 -0
  80. package/lib/request/get-oci-cache-user-request.js +15 -0
  81. package/lib/request/get-oci-cache-user-request.js.map +1 -0
  82. package/lib/request/index.d.ts +22 -0
  83. package/lib/request/index.js +7 -1
  84. package/lib/request/index.js.map +1 -1
  85. package/lib/request/list-attached-oci-cache-users-request.d.ts +58 -0
  86. package/lib/request/list-attached-oci-cache-users-request.js +24 -0
  87. package/lib/request/list-attached-oci-cache-users-request.js.map +1 -0
  88. package/lib/request/list-attached-redis-clusters-request.d.ts +58 -0
  89. package/lib/request/list-attached-redis-clusters-request.js +24 -0
  90. package/lib/request/list-attached-redis-clusters-request.js.map +1 -0
  91. package/lib/request/list-oci-cache-users-request.d.ts +58 -0
  92. package/lib/request/list-oci-cache-users-request.js +24 -0
  93. package/lib/request/list-oci-cache-users-request.js.map +1 -0
  94. package/lib/request/update-oci-cache-user-request.d.ts +40 -0
  95. package/lib/request/update-oci-cache-user-request.js +15 -0
  96. package/lib/request/update-oci-cache-user-request.js.map +1 -0
  97. package/lib/response/attach-oci-cache-users-response.d.ts +25 -0
  98. package/lib/response/attach-oci-cache-users-response.js +15 -0
  99. package/lib/response/attach-oci-cache-users-response.js.map +1 -0
  100. package/lib/response/change-oci-cache-user-compartment-response.d.ts +25 -0
  101. package/lib/response/change-oci-cache-user-compartment-response.js +15 -0
  102. package/lib/response/change-oci-cache-user-compartment-response.js.map +1 -0
  103. package/lib/response/create-identity-token-response.d.ts +30 -0
  104. package/lib/response/create-identity-token-response.js +15 -0
  105. package/lib/response/create-identity-token-response.js.map +1 -0
  106. package/lib/response/create-oci-cache-user-response.d.ts +35 -0
  107. package/lib/response/create-oci-cache-user-response.js +15 -0
  108. package/lib/response/create-oci-cache-user-response.js.map +1 -0
  109. package/lib/response/delete-oci-cache-user-response.d.ts +25 -0
  110. package/lib/response/delete-oci-cache-user-response.js +15 -0
  111. package/lib/response/delete-oci-cache-user-response.js.map +1 -0
  112. package/lib/response/detach-oci-cache-users-response.d.ts +25 -0
  113. package/lib/response/detach-oci-cache-users-response.js +15 -0
  114. package/lib/response/detach-oci-cache-users-response.js.map +1 -0
  115. package/lib/response/get-oci-cache-user-response.d.ts +30 -0
  116. package/lib/response/get-oci-cache-user-response.js +15 -0
  117. package/lib/response/get-oci-cache-user-response.js.map +1 -0
  118. package/lib/response/index.d.ts +22 -0
  119. package/lib/response/list-attached-oci-cache-users-response.d.ts +32 -0
  120. package/lib/response/list-attached-oci-cache-users-response.js +15 -0
  121. package/lib/response/list-attached-oci-cache-users-response.js.map +1 -0
  122. package/lib/response/list-attached-redis-clusters-response.d.ts +32 -0
  123. package/lib/response/list-attached-redis-clusters-response.js +15 -0
  124. package/lib/response/list-attached-redis-clusters-response.js.map +1 -0
  125. package/lib/response/list-oci-cache-users-response.d.ts +32 -0
  126. package/lib/response/list-oci-cache-users-response.js +15 -0
  127. package/lib/response/list-oci-cache-users-response.js.map +1 -0
  128. package/lib/response/update-oci-cache-user-response.d.ts +25 -0
  129. package/lib/response/update-oci-cache-user-response.js +15 -0
  130. package/lib/response/update-oci-cache-user-response.js.map +1 -0
  131. package/package.json +3 -3
package/lib/client.js CHANGED
@@ -40,15 +40,672 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
40
40
  });
41
41
  };
42
42
  Object.defineProperty(exports, "__esModule", { value: true });
43
- exports.RedisClusterClient = exports.RedisClusterApiKeys = void 0;
43
+ exports.RedisIdentityClient = exports.RedisIdentityApiKeys = exports.RedisClusterClient = exports.RedisClusterApiKeys = exports.OciCacheUserClient = exports.OciCacheUserApiKeys = void 0;
44
44
  const common = require("oci-common");
45
45
  const model = __importStar(require("./model"));
46
- const rediscluster_waiter_1 = require("./rediscluster-waiter");
47
46
  const oci_common_1 = require("oci-common");
47
+ const ocicacheuser_waiter_1 = require("./ocicacheuser-waiter");
48
+ const rediscluster_waiter_1 = require("./rediscluster-waiter");
49
+ const oci_common_2 = require("oci-common");
48
50
  const Breaker = require("opossum");
49
51
  // ===============================================
50
52
  // This file is autogenerated - Please do not edit
51
53
  // ===============================================
54
+ var OciCacheUserApiKeys;
55
+ (function (OciCacheUserApiKeys) {
56
+ })(OciCacheUserApiKeys = exports.OciCacheUserApiKeys || (exports.OciCacheUserApiKeys = {}));
57
+ /**
58
+ * This service client uses {@link common.CircuitBreaker.DefaultConfiguration} for all the operations by default if no circuit breaker configuration is defined by the user.
59
+ */
60
+ class OciCacheUserClient {
61
+ constructor(params, clientConfiguration) {
62
+ this["_realmSpecificEndpointTemplateEnabled"] = undefined;
63
+ this["_endpoint"] = "";
64
+ this["_defaultHeaders"] = {};
65
+ this._circuitBreaker = null;
66
+ this._httpOptions = undefined;
67
+ this._bodyDuplexMode = undefined;
68
+ this.targetService = "OciCacheUser";
69
+ this._regionId = "";
70
+ this._lastSetRegionOrRegionId = "";
71
+ const requestSigner = params.authenticationDetailsProvider
72
+ ? new common.DefaultRequestSigner(params.authenticationDetailsProvider)
73
+ : null;
74
+ this._authProvider = params.authenticationDetailsProvider;
75
+ if (clientConfiguration) {
76
+ this._clientConfiguration = clientConfiguration;
77
+ this._circuitBreaker = clientConfiguration.circuitBreaker
78
+ ? clientConfiguration.circuitBreaker.circuit
79
+ : null;
80
+ this._httpOptions = clientConfiguration.httpOptions
81
+ ? clientConfiguration.httpOptions
82
+ : undefined;
83
+ this._bodyDuplexMode = clientConfiguration.bodyDuplexMode
84
+ ? clientConfiguration.bodyDuplexMode
85
+ : undefined;
86
+ }
87
+ if (!oci_common_2.developerToolConfiguration.isServiceEnabled("redis")) {
88
+ 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 : ";
89
+ throw errmsg.concat("redis");
90
+ }
91
+ // if circuit breaker is not created, check if circuit breaker system is enabled to use default circuit breaker
92
+ const specCircuitBreakerEnabled = true;
93
+ if (!this._circuitBreaker &&
94
+ common.utils.isCircuitBreakerSystemEnabled(clientConfiguration) &&
95
+ (specCircuitBreakerEnabled || common.CircuitBreaker.DefaultCircuitBreakerOverriden)) {
96
+ this._circuitBreaker = new common.CircuitBreaker().circuit;
97
+ }
98
+ this._httpClient =
99
+ params.httpClient ||
100
+ new common.FetchHttpClient(requestSigner, this._circuitBreaker, this._httpOptions, this._bodyDuplexMode);
101
+ if (params.authenticationDetailsProvider &&
102
+ common.isRegionProvider(params.authenticationDetailsProvider)) {
103
+ const provider = params.authenticationDetailsProvider;
104
+ if (provider.getRegion()) {
105
+ this.region = provider.getRegion();
106
+ }
107
+ }
108
+ }
109
+ /**
110
+ * Get the endpoint that is being used to call (ex, https://www.example.com).
111
+ */
112
+ get endpoint() {
113
+ return this._endpoint;
114
+ }
115
+ /**
116
+ * Sets the endpoint to call (ex, https://www.example.com).
117
+ * @param endpoint The endpoint of the service.
118
+ */
119
+ set endpoint(endpoint) {
120
+ this._endpoint = endpoint;
121
+ this._endpoint = this._endpoint + "/20220315";
122
+ if (this.logger)
123
+ this.logger.info(`OciCacheUserClient endpoint set to ${this._endpoint}`);
124
+ }
125
+ get logger() {
126
+ return common.LOG.logger;
127
+ }
128
+ /**
129
+ * Determines whether realm specific endpoint should be used or not.
130
+ * Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false"
131
+ * @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template
132
+ */
133
+ set useRealmSpecificEndpointTemplate(realmSpecificEndpointTemplateEnabled) {
134
+ this._realmSpecificEndpointTemplateEnabled = realmSpecificEndpointTemplateEnabled;
135
+ if (this.logger)
136
+ this.logger.info(`realmSpecificEndpointTemplateEnabled set to ${this._realmSpecificEndpointTemplateEnabled}`);
137
+ if (this._lastSetRegionOrRegionId === common.Region.REGION_STRING) {
138
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegion(OciCacheUserClient.serviceEndpointTemplate, this._region, OciCacheUserClient.endpointServiceName);
139
+ }
140
+ else if (this._lastSetRegionOrRegionId === common.Region.REGION_ID_STRING) {
141
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(OciCacheUserClient.serviceEndpointTemplate, this._regionId, OciCacheUserClient.endpointServiceName);
142
+ }
143
+ }
144
+ /**
145
+ * Sets the region to call (ex, Region.US_PHOENIX_1).
146
+ * Note, this will call {@link #endpoint(String) endpoint} after resolving the endpoint.
147
+ * @param region The region of the service.
148
+ */
149
+ set region(region) {
150
+ this._region = region;
151
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegion(OciCacheUserClient.serviceEndpointTemplate, region, OciCacheUserClient.endpointServiceName);
152
+ this._lastSetRegionOrRegionId = common.Region.REGION_STRING;
153
+ }
154
+ /**
155
+ * Sets the regionId to call (ex, 'us-phoenix-1').
156
+ *
157
+ * Note, this will first try to map the region ID to a known Region and call {@link #region(Region) region}.
158
+ * If no known Region could be determined, it will create an endpoint assuming its in default Realm OC1
159
+ * and then call {@link #endpoint(String) endpoint}.
160
+ * @param regionId The public region ID.
161
+ */
162
+ set regionId(regionId) {
163
+ this._regionId = regionId;
164
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(OciCacheUserClient.serviceEndpointTemplate, regionId, OciCacheUserClient.endpointServiceName);
165
+ this._lastSetRegionOrRegionId = common.Region.REGION_ID_STRING;
166
+ }
167
+ /**
168
+ * Creates a new OciCacheUserWaiter for resources for this service.
169
+ *
170
+ * @param config The waiter configuration for termination and delay strategy
171
+ * @return The service waiters.
172
+ */
173
+ createWaiters(config) {
174
+ this._waiters = new ocicacheuser_waiter_1.OciCacheUserWaiter(this, config);
175
+ return this._waiters;
176
+ }
177
+ /**
178
+ * Gets the waiters available for resources for this service.
179
+ *
180
+ * @return The service waiters.
181
+ */
182
+ getWaiters() {
183
+ if (this._waiters) {
184
+ return this._waiters;
185
+ }
186
+ throw Error("Waiters do not exist. Please create waiters.");
187
+ }
188
+ /**
189
+ * Shutdown the circuit breaker used by the client when it is no longer needed
190
+ */
191
+ shutdownCircuitBreaker() {
192
+ if (this._circuitBreaker) {
193
+ this._circuitBreaker.shutdown();
194
+ }
195
+ }
196
+ /**
197
+ * Close the provider if possible which in turn shuts down any associated circuit breaker
198
+ */
199
+ closeProvider() {
200
+ if (this._authProvider) {
201
+ if (this._authProvider instanceof common.AbstractRequestingAuthenticationDetailsProvider)
202
+ (this._authProvider).closeProvider();
203
+ }
204
+ }
205
+ /**
206
+ * Close the client once it is no longer needed
207
+ */
208
+ close() {
209
+ this.shutdownCircuitBreaker();
210
+ this.closeProvider();
211
+ }
212
+ /**
213
+ * Moves an OCI Cache User from one compartment to another within the same tenancy.
214
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
215
+ * @param ChangeOciCacheUserCompartmentRequest
216
+ * @return ChangeOciCacheUserCompartmentResponse
217
+ * @throws OciError when an error occurs
218
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/redis/ChangeOciCacheUserCompartment.ts.html |here} to see how to use ChangeOciCacheUserCompartment API.
219
+ */
220
+ changeOciCacheUserCompartment(changeOciCacheUserCompartmentRequest) {
221
+ return __awaiter(this, void 0, void 0, function* () {
222
+ if (this.logger)
223
+ this.logger.debug("Calling operation OciCacheUserClient#changeOciCacheUserCompartment.");
224
+ const operationName = "changeOciCacheUserCompartment";
225
+ const apiReferenceLink = "";
226
+ const pathParams = {
227
+ "{ociCacheUserId}": changeOciCacheUserCompartmentRequest.ociCacheUserId
228
+ };
229
+ const queryParams = {};
230
+ let headerParams = {
231
+ "Content-Type": common.Constants.APPLICATION_JSON,
232
+ "if-match": changeOciCacheUserCompartmentRequest.ifMatch,
233
+ "opc-retry-token": changeOciCacheUserCompartmentRequest.opcRetryToken,
234
+ "opc-request-id": changeOciCacheUserCompartmentRequest.opcRequestId
235
+ };
236
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
237
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, changeOciCacheUserCompartmentRequest.retryConfiguration, specRetryConfiguration);
238
+ if (this.logger)
239
+ retrier.logger = this.logger;
240
+ const request = yield oci_common_2.composeRequest({
241
+ baseEndpoint: this._endpoint,
242
+ defaultHeaders: this._defaultHeaders,
243
+ path: "/ociCacheUsers/{ociCacheUserId}/actions/changeCompartment",
244
+ method: "POST",
245
+ bodyContent: common.ObjectSerializer.serialize(changeOciCacheUserCompartmentRequest.changeOciCacheUserCompartmentDetails, "ChangeOciCacheUserCompartmentDetails", model.ChangeOciCacheUserCompartmentDetails.getJsonObj),
246
+ pathParams: pathParams,
247
+ headerParams: headerParams,
248
+ queryParams: queryParams
249
+ });
250
+ try {
251
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
252
+ const sdkResponse = oci_common_2.composeResponse({
253
+ responseObject: {},
254
+ responseHeaders: [
255
+ {
256
+ value: response.headers.get("opc-work-request-id"),
257
+ key: "opcWorkRequestId",
258
+ dataType: "string"
259
+ },
260
+ {
261
+ value: response.headers.get("opc-request-id"),
262
+ key: "opcRequestId",
263
+ dataType: "string"
264
+ }
265
+ ]
266
+ });
267
+ return sdkResponse;
268
+ }
269
+ catch (err) {
270
+ throw err;
271
+ }
272
+ });
273
+ }
274
+ /**
275
+ * Creates a new OCI Cache user. OCI Cache user is required to authenticate to OCI Cache cluster.
276
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
277
+ * @param CreateOciCacheUserRequest
278
+ * @return CreateOciCacheUserResponse
279
+ * @throws OciError when an error occurs
280
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/redis/CreateOciCacheUser.ts.html |here} to see how to use CreateOciCacheUser API.
281
+ */
282
+ createOciCacheUser(createOciCacheUserRequest) {
283
+ return __awaiter(this, void 0, void 0, function* () {
284
+ if (this.logger)
285
+ this.logger.debug("Calling operation OciCacheUserClient#createOciCacheUser.");
286
+ const operationName = "createOciCacheUser";
287
+ const apiReferenceLink = "";
288
+ const pathParams = {};
289
+ const queryParams = {};
290
+ let headerParams = {
291
+ "Content-Type": common.Constants.APPLICATION_JSON,
292
+ "opc-retry-token": createOciCacheUserRequest.opcRetryToken,
293
+ "opc-request-id": createOciCacheUserRequest.opcRequestId
294
+ };
295
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
296
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, createOciCacheUserRequest.retryConfiguration, specRetryConfiguration);
297
+ if (this.logger)
298
+ retrier.logger = this.logger;
299
+ const request = yield oci_common_2.composeRequest({
300
+ baseEndpoint: this._endpoint,
301
+ defaultHeaders: this._defaultHeaders,
302
+ path: "/ociCacheUsers",
303
+ method: "POST",
304
+ bodyContent: common.ObjectSerializer.serialize(createOciCacheUserRequest.createOciCacheUserDetails, "CreateOciCacheUserDetails", model.CreateOciCacheUserDetails.getJsonObj),
305
+ pathParams: pathParams,
306
+ headerParams: headerParams,
307
+ queryParams: queryParams
308
+ });
309
+ try {
310
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
311
+ const sdkResponse = oci_common_2.composeResponse({
312
+ responseObject: {},
313
+ body: yield response.json(),
314
+ bodyKey: "ociCacheUser",
315
+ bodyModel: model.OciCacheUser,
316
+ type: "model.OciCacheUser",
317
+ responseHeaders: [
318
+ {
319
+ value: response.headers.get("etag"),
320
+ key: "etag",
321
+ dataType: "string"
322
+ },
323
+ {
324
+ value: response.headers.get("opc-work-request-id"),
325
+ key: "opcWorkRequestId",
326
+ dataType: "string"
327
+ },
328
+ {
329
+ value: response.headers.get("opc-request-id"),
330
+ key: "opcRequestId",
331
+ dataType: "string"
332
+ }
333
+ ]
334
+ });
335
+ return sdkResponse;
336
+ }
337
+ catch (err) {
338
+ throw err;
339
+ }
340
+ });
341
+ }
342
+ /**
343
+ * Deletes an existing OCI Cache User based on the OCI cache user unique ID (OCID).
344
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
345
+ * @param DeleteOciCacheUserRequest
346
+ * @return DeleteOciCacheUserResponse
347
+ * @throws OciError when an error occurs
348
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/redis/DeleteOciCacheUser.ts.html |here} to see how to use DeleteOciCacheUser API.
349
+ */
350
+ deleteOciCacheUser(deleteOciCacheUserRequest) {
351
+ return __awaiter(this, void 0, void 0, function* () {
352
+ if (this.logger)
353
+ this.logger.debug("Calling operation OciCacheUserClient#deleteOciCacheUser.");
354
+ const operationName = "deleteOciCacheUser";
355
+ const apiReferenceLink = "";
356
+ const pathParams = {
357
+ "{ociCacheUserId}": deleteOciCacheUserRequest.ociCacheUserId
358
+ };
359
+ const queryParams = {};
360
+ let headerParams = {
361
+ "Content-Type": common.Constants.APPLICATION_JSON,
362
+ "if-match": deleteOciCacheUserRequest.ifMatch,
363
+ "opc-request-id": deleteOciCacheUserRequest.opcRequestId
364
+ };
365
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
366
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, deleteOciCacheUserRequest.retryConfiguration, specRetryConfiguration);
367
+ if (this.logger)
368
+ retrier.logger = this.logger;
369
+ const request = yield oci_common_2.composeRequest({
370
+ baseEndpoint: this._endpoint,
371
+ defaultHeaders: this._defaultHeaders,
372
+ path: "/ociCacheUsers/{ociCacheUserId}",
373
+ method: "DELETE",
374
+ pathParams: pathParams,
375
+ headerParams: headerParams,
376
+ queryParams: queryParams
377
+ });
378
+ try {
379
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
380
+ const sdkResponse = oci_common_2.composeResponse({
381
+ responseObject: {},
382
+ responseHeaders: [
383
+ {
384
+ value: response.headers.get("opc-work-request-id"),
385
+ key: "opcWorkRequestId",
386
+ dataType: "string"
387
+ },
388
+ {
389
+ value: response.headers.get("opc-request-id"),
390
+ key: "opcRequestId",
391
+ dataType: "string"
392
+ }
393
+ ]
394
+ });
395
+ return sdkResponse;
396
+ }
397
+ catch (err) {
398
+ throw err;
399
+ }
400
+ });
401
+ }
402
+ /**
403
+ * Get an existing OCI Cache users based on the ID (OCID).
404
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
405
+ * @param GetOciCacheUserRequest
406
+ * @return GetOciCacheUserResponse
407
+ * @throws OciError when an error occurs
408
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/redis/GetOciCacheUser.ts.html |here} to see how to use GetOciCacheUser API.
409
+ */
410
+ getOciCacheUser(getOciCacheUserRequest) {
411
+ return __awaiter(this, void 0, void 0, function* () {
412
+ if (this.logger)
413
+ this.logger.debug("Calling operation OciCacheUserClient#getOciCacheUser.");
414
+ const operationName = "getOciCacheUser";
415
+ const apiReferenceLink = "";
416
+ const pathParams = {
417
+ "{ociCacheUserId}": getOciCacheUserRequest.ociCacheUserId
418
+ };
419
+ const queryParams = {};
420
+ let headerParams = {
421
+ "Content-Type": common.Constants.APPLICATION_JSON,
422
+ "opc-request-id": getOciCacheUserRequest.opcRequestId
423
+ };
424
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
425
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getOciCacheUserRequest.retryConfiguration, specRetryConfiguration);
426
+ if (this.logger)
427
+ retrier.logger = this.logger;
428
+ const request = yield oci_common_2.composeRequest({
429
+ baseEndpoint: this._endpoint,
430
+ defaultHeaders: this._defaultHeaders,
431
+ path: "/ociCacheUsers/{ociCacheUserId}",
432
+ method: "GET",
433
+ pathParams: pathParams,
434
+ headerParams: headerParams,
435
+ queryParams: queryParams
436
+ });
437
+ try {
438
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
439
+ const sdkResponse = oci_common_2.composeResponse({
440
+ responseObject: {},
441
+ body: yield response.json(),
442
+ bodyKey: "ociCacheUser",
443
+ bodyModel: model.OciCacheUser,
444
+ type: "model.OciCacheUser",
445
+ responseHeaders: [
446
+ {
447
+ value: response.headers.get("opc-request-id"),
448
+ key: "opcRequestId",
449
+ dataType: "string"
450
+ },
451
+ {
452
+ value: response.headers.get("etag"),
453
+ key: "etag",
454
+ dataType: "string"
455
+ }
456
+ ]
457
+ });
458
+ return sdkResponse;
459
+ }
460
+ catch (err) {
461
+ throw err;
462
+ }
463
+ });
464
+ }
465
+ /**
466
+ * Gets a list of associated redis cluster for an OCI cache user.
467
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
468
+ * @param ListAttachedRedisClustersRequest
469
+ * @return ListAttachedRedisClustersResponse
470
+ * @throws OciError when an error occurs
471
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/redis/ListAttachedRedisClusters.ts.html |here} to see how to use ListAttachedRedisClusters API.
472
+ */
473
+ listAttachedRedisClusters(listAttachedRedisClustersRequest) {
474
+ return __awaiter(this, void 0, void 0, function* () {
475
+ if (this.logger)
476
+ this.logger.debug("Calling operation OciCacheUserClient#listAttachedRedisClusters.");
477
+ const operationName = "listAttachedRedisClusters";
478
+ const apiReferenceLink = "";
479
+ const pathParams = {
480
+ "{ociCacheUserId}": listAttachedRedisClustersRequest.ociCacheUserId
481
+ };
482
+ const queryParams = {
483
+ "compartmentId": listAttachedRedisClustersRequest.compartmentId,
484
+ "displayName": listAttachedRedisClustersRequest.displayName,
485
+ "limit": listAttachedRedisClustersRequest.limit,
486
+ "page": listAttachedRedisClustersRequest.page,
487
+ "sortOrder": listAttachedRedisClustersRequest.sortOrder,
488
+ "sortBy": listAttachedRedisClustersRequest.sortBy
489
+ };
490
+ let headerParams = {
491
+ "Content-Type": common.Constants.APPLICATION_JSON,
492
+ "opc-request-id": listAttachedRedisClustersRequest.opcRequestId
493
+ };
494
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
495
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listAttachedRedisClustersRequest.retryConfiguration, specRetryConfiguration);
496
+ if (this.logger)
497
+ retrier.logger = this.logger;
498
+ const request = yield oci_common_2.composeRequest({
499
+ baseEndpoint: this._endpoint,
500
+ defaultHeaders: this._defaultHeaders,
501
+ path: "/ociCacheUsers/{ociCacheUserId}/actions/getRedisClusters",
502
+ method: "POST",
503
+ pathParams: pathParams,
504
+ headerParams: headerParams,
505
+ queryParams: queryParams
506
+ });
507
+ try {
508
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
509
+ const sdkResponse = oci_common_2.composeResponse({
510
+ responseObject: {},
511
+ body: yield response.json(),
512
+ bodyKey: "items",
513
+ bodyModel: model.AttachedOciCacheCluster,
514
+ type: "Array<model.AttachedOciCacheCluster>",
515
+ responseHeaders: [
516
+ {
517
+ value: response.headers.get("opc-request-id"),
518
+ key: "opcRequestId",
519
+ dataType: "string"
520
+ },
521
+ {
522
+ value: response.headers.get("opc-next-page"),
523
+ key: "opcNextPage",
524
+ dataType: "string"
525
+ }
526
+ ]
527
+ });
528
+ return sdkResponse;
529
+ }
530
+ catch (err) {
531
+ throw err;
532
+ }
533
+ });
534
+ }
535
+ /**
536
+ * NOTE: This function is deprecated in favor of listAttachedRedisClustersRecordIterator function.
537
+ * Creates a new async iterator which will iterate over the models.AttachedOciCacheCluster objects
538
+ * contained in responses from the listAttachedRedisClusters operation. This iterator will fetch more data from the
539
+ * server as needed.
540
+ *
541
+ * @param request a request which can be sent to the service operation
542
+ */
543
+ listAllAttachedRedisClusters(request) {
544
+ return oci_common_1.paginateRecords(request, req => this.listAttachedRedisClusters(req));
545
+ }
546
+ /**
547
+ * NOTE: This function is deprecated in favor of listAttachedRedisClustersResponseIterator function.
548
+ * Creates a new async iterator which will iterate over the responses received from the listAttachedRedisClusters operation. This iterator
549
+ * will fetch more data from the server as needed.
550
+ *
551
+ * @param request a request which can be sent to the service operation
552
+ */
553
+ listAllAttachedRedisClustersResponses(request) {
554
+ return oci_common_1.paginateResponses(request, req => this.listAttachedRedisClusters(req));
555
+ }
556
+ /**
557
+ * Creates a new async iterator which will iterate over the models.AttachedOciCacheCluster objects
558
+ * contained in responses from the listAttachedRedisClusters operation. This iterator will fetch more data from the
559
+ * server as needed.
560
+ *
561
+ * @param request a request which can be sent to the service operation
562
+ */
563
+ listAttachedRedisClustersRecordIterator(request) {
564
+ return oci_common_1.paginateRecords(request, req => this.listAttachedRedisClusters(req));
565
+ }
566
+ /**
567
+ * Creates a new async iterator which will iterate over the responses received from the listAttachedRedisClusters operation. This iterator
568
+ * will fetch more data from the server as needed.
569
+ *
570
+ * @param request a request which can be sent to the service operation
571
+ */
572
+ listAttachedRedisClustersResponseIterator(request) {
573
+ return oci_common_1.paginateResponses(request, req => this.listAttachedRedisClusters(req));
574
+ }
575
+ /**
576
+ * Lists the OCI Cache users based on the supplied parameters.
577
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
578
+ * @param ListOciCacheUsersRequest
579
+ * @return ListOciCacheUsersResponse
580
+ * @throws OciError when an error occurs
581
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/redis/ListOciCacheUsers.ts.html |here} to see how to use ListOciCacheUsers API.
582
+ */
583
+ listOciCacheUsers(listOciCacheUsersRequest) {
584
+ return __awaiter(this, void 0, void 0, function* () {
585
+ if (this.logger)
586
+ this.logger.debug("Calling operation OciCacheUserClient#listOciCacheUsers.");
587
+ const operationName = "listOciCacheUsers";
588
+ const apiReferenceLink = "";
589
+ const pathParams = {};
590
+ const queryParams = {
591
+ "compartmentId": listOciCacheUsersRequest.compartmentId,
592
+ "name": listOciCacheUsersRequest.name,
593
+ "lifecycleState": listOciCacheUsersRequest.lifecycleState,
594
+ "limit": listOciCacheUsersRequest.limit,
595
+ "page": listOciCacheUsersRequest.page,
596
+ "sortOrder": listOciCacheUsersRequest.sortOrder,
597
+ "sortBy": listOciCacheUsersRequest.sortBy
598
+ };
599
+ let headerParams = {
600
+ "Content-Type": common.Constants.APPLICATION_JSON,
601
+ "opc-request-id": listOciCacheUsersRequest.opcRequestId
602
+ };
603
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
604
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listOciCacheUsersRequest.retryConfiguration, specRetryConfiguration);
605
+ if (this.logger)
606
+ retrier.logger = this.logger;
607
+ const request = yield oci_common_2.composeRequest({
608
+ baseEndpoint: this._endpoint,
609
+ defaultHeaders: this._defaultHeaders,
610
+ path: "/ociCacheUsers",
611
+ method: "GET",
612
+ pathParams: pathParams,
613
+ headerParams: headerParams,
614
+ queryParams: queryParams
615
+ });
616
+ try {
617
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
618
+ const sdkResponse = oci_common_2.composeResponse({
619
+ responseObject: {},
620
+ body: yield response.json(),
621
+ bodyKey: "ociCacheUserCollection",
622
+ bodyModel: model.OciCacheUserCollection,
623
+ type: "model.OciCacheUserCollection",
624
+ responseHeaders: [
625
+ {
626
+ value: response.headers.get("opc-request-id"),
627
+ key: "opcRequestId",
628
+ dataType: "string"
629
+ },
630
+ {
631
+ value: response.headers.get("opc-next-page"),
632
+ key: "opcNextPage",
633
+ dataType: "string"
634
+ }
635
+ ]
636
+ });
637
+ return sdkResponse;
638
+ }
639
+ catch (err) {
640
+ throw err;
641
+ }
642
+ });
643
+ }
644
+ /**
645
+ * Update an existing OCI Cache User with new details.
646
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
647
+ * @param UpdateOciCacheUserRequest
648
+ * @return UpdateOciCacheUserResponse
649
+ * @throws OciError when an error occurs
650
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/redis/UpdateOciCacheUser.ts.html |here} to see how to use UpdateOciCacheUser API.
651
+ */
652
+ updateOciCacheUser(updateOciCacheUserRequest) {
653
+ return __awaiter(this, void 0, void 0, function* () {
654
+ if (this.logger)
655
+ this.logger.debug("Calling operation OciCacheUserClient#updateOciCacheUser.");
656
+ const operationName = "updateOciCacheUser";
657
+ const apiReferenceLink = "";
658
+ const pathParams = {
659
+ "{ociCacheUserId}": updateOciCacheUserRequest.ociCacheUserId
660
+ };
661
+ const queryParams = {};
662
+ let headerParams = {
663
+ "Content-Type": common.Constants.APPLICATION_JSON,
664
+ "if-match": updateOciCacheUserRequest.ifMatch,
665
+ "opc-request-id": updateOciCacheUserRequest.opcRequestId
666
+ };
667
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
668
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, updateOciCacheUserRequest.retryConfiguration, specRetryConfiguration);
669
+ if (this.logger)
670
+ retrier.logger = this.logger;
671
+ const request = yield oci_common_2.composeRequest({
672
+ baseEndpoint: this._endpoint,
673
+ defaultHeaders: this._defaultHeaders,
674
+ path: "/ociCacheUsers/{ociCacheUserId}",
675
+ method: "PUT",
676
+ bodyContent: common.ObjectSerializer.serialize(updateOciCacheUserRequest.updateOciCacheUserDetails, "UpdateOciCacheUserDetails", model.UpdateOciCacheUserDetails.getJsonObj),
677
+ pathParams: pathParams,
678
+ headerParams: headerParams,
679
+ queryParams: queryParams
680
+ });
681
+ try {
682
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
683
+ const sdkResponse = oci_common_2.composeResponse({
684
+ responseObject: {},
685
+ responseHeaders: [
686
+ {
687
+ value: response.headers.get("opc-work-request-id"),
688
+ key: "opcWorkRequestId",
689
+ dataType: "string"
690
+ },
691
+ {
692
+ value: response.headers.get("opc-request-id"),
693
+ key: "opcRequestId",
694
+ dataType: "string"
695
+ }
696
+ ]
697
+ });
698
+ return sdkResponse;
699
+ }
700
+ catch (err) {
701
+ throw err;
702
+ }
703
+ });
704
+ }
705
+ }
706
+ exports.OciCacheUserClient = OciCacheUserClient;
707
+ OciCacheUserClient.serviceEndpointTemplate = "https://redis.{region}.oci.{secondLevelDomain}";
708
+ OciCacheUserClient.endpointServiceName = "";
52
709
  var RedisClusterApiKeys;
53
710
  (function (RedisClusterApiKeys) {
54
711
  })(RedisClusterApiKeys = exports.RedisClusterApiKeys || (exports.RedisClusterApiKeys = {}));
@@ -82,7 +739,7 @@ class RedisClusterClient {
82
739
  ? clientConfiguration.bodyDuplexMode
83
740
  : undefined;
84
741
  }
85
- if (!oci_common_1.developerToolConfiguration.isServiceEnabled("redis")) {
742
+ if (!oci_common_2.developerToolConfiguration.isServiceEnabled("redis")) {
86
743
  let errmsg = "The developerToolConfiguration configuration disabled this service, this behavior is controlled by developerToolConfiguration.ociEnabledServiceSet variable. Please check if your local developer_tool_configuration file has configured the service you're targeting or contact the cloud provider on the availability of this service : ";
87
744
  throw errmsg.concat("redis");
88
745
  }
@@ -207,6 +864,68 @@ class RedisClusterClient {
207
864
  this.shutdownCircuitBreaker();
208
865
  this.closeProvider();
209
866
  }
867
+ /**
868
+ * Attach existing OCI cache users to a redis cluster.
869
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
870
+ * @param AttachOciCacheUsersRequest
871
+ * @return AttachOciCacheUsersResponse
872
+ * @throws OciError when an error occurs
873
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/redis/AttachOciCacheUsers.ts.html |here} to see how to use AttachOciCacheUsers API.
874
+ */
875
+ attachOciCacheUsers(attachOciCacheUsersRequest) {
876
+ return __awaiter(this, void 0, void 0, function* () {
877
+ if (this.logger)
878
+ this.logger.debug("Calling operation RedisClusterClient#attachOciCacheUsers.");
879
+ const operationName = "attachOciCacheUsers";
880
+ const apiReferenceLink = "";
881
+ const pathParams = {
882
+ "{redisClusterId}": attachOciCacheUsersRequest.redisClusterId
883
+ };
884
+ const queryParams = {};
885
+ let headerParams = {
886
+ "Content-Type": common.Constants.APPLICATION_JSON,
887
+ "if-match": attachOciCacheUsersRequest.ifMatch,
888
+ "opc-retry-token": attachOciCacheUsersRequest.opcRetryToken,
889
+ "opc-request-id": attachOciCacheUsersRequest.opcRequestId
890
+ };
891
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
892
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, attachOciCacheUsersRequest.retryConfiguration, specRetryConfiguration);
893
+ if (this.logger)
894
+ retrier.logger = this.logger;
895
+ const request = yield oci_common_2.composeRequest({
896
+ baseEndpoint: this._endpoint,
897
+ defaultHeaders: this._defaultHeaders,
898
+ path: "/redisClusters/{redisClusterId}/actions/attachOciCacheUsers",
899
+ method: "POST",
900
+ bodyContent: common.ObjectSerializer.serialize(attachOciCacheUsersRequest.attachOciCacheUsersDetails, "AttachOciCacheUsersDetails", model.AttachOciCacheUsersDetails.getJsonObj),
901
+ pathParams: pathParams,
902
+ headerParams: headerParams,
903
+ queryParams: queryParams
904
+ });
905
+ try {
906
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
907
+ const sdkResponse = oci_common_2.composeResponse({
908
+ responseObject: {},
909
+ responseHeaders: [
910
+ {
911
+ value: response.headers.get("opc-work-request-id"),
912
+ key: "opcWorkRequestId",
913
+ dataType: "string"
914
+ },
915
+ {
916
+ value: response.headers.get("opc-request-id"),
917
+ key: "opcRequestId",
918
+ dataType: "string"
919
+ }
920
+ ]
921
+ });
922
+ return sdkResponse;
923
+ }
924
+ catch (err) {
925
+ throw err;
926
+ }
927
+ });
928
+ }
210
929
  /**
211
930
  * Cancels the specified work request.
212
931
  * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
@@ -231,10 +950,10 @@ class RedisClusterClient {
231
950
  "opc-request-id": cancelWorkRequestRequest.opcRequestId
232
951
  };
233
952
  const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
234
- const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, cancelWorkRequestRequest.retryConfiguration, specRetryConfiguration);
953
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, cancelWorkRequestRequest.retryConfiguration, specRetryConfiguration);
235
954
  if (this.logger)
236
955
  retrier.logger = this.logger;
237
- const request = yield oci_common_1.composeRequest({
956
+ const request = yield oci_common_2.composeRequest({
238
957
  baseEndpoint: this._endpoint,
239
958
  defaultHeaders: this._defaultHeaders,
240
959
  path: "/workRequests/{workRequestId}",
@@ -245,7 +964,7 @@ class RedisClusterClient {
245
964
  });
246
965
  try {
247
966
  const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
248
- const sdkResponse = oci_common_1.composeResponse({
967
+ const sdkResponse = oci_common_2.composeResponse({
249
968
  responseObject: {},
250
969
  responseHeaders: [
251
970
  {
@@ -287,10 +1006,10 @@ class RedisClusterClient {
287
1006
  "opc-request-id": changeRedisClusterCompartmentRequest.opcRequestId
288
1007
  };
289
1008
  const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
290
- const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, changeRedisClusterCompartmentRequest.retryConfiguration, specRetryConfiguration);
1009
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, changeRedisClusterCompartmentRequest.retryConfiguration, specRetryConfiguration);
291
1010
  if (this.logger)
292
1011
  retrier.logger = this.logger;
293
- const request = yield oci_common_1.composeRequest({
1012
+ const request = yield oci_common_2.composeRequest({
294
1013
  baseEndpoint: this._endpoint,
295
1014
  defaultHeaders: this._defaultHeaders,
296
1015
  path: "/redisClusters/{redisClusterId}/actions/changeCompartment",
@@ -302,7 +1021,7 @@ class RedisClusterClient {
302
1021
  });
303
1022
  try {
304
1023
  const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
305
- const sdkResponse = oci_common_1.composeResponse({
1024
+ const sdkResponse = oci_common_2.composeResponse({
306
1025
  responseObject: {},
307
1026
  responseHeaders: [
308
1027
  {
@@ -347,10 +1066,10 @@ class RedisClusterClient {
347
1066
  "opc-request-id": createRedisClusterRequest.opcRequestId
348
1067
  };
349
1068
  const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
350
- const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, createRedisClusterRequest.retryConfiguration, specRetryConfiguration);
1069
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, createRedisClusterRequest.retryConfiguration, specRetryConfiguration);
351
1070
  if (this.logger)
352
1071
  retrier.logger = this.logger;
353
- const request = yield oci_common_1.composeRequest({
1072
+ const request = yield oci_common_2.composeRequest({
354
1073
  baseEndpoint: this._endpoint,
355
1074
  defaultHeaders: this._defaultHeaders,
356
1075
  path: "/redisClusters",
@@ -362,18 +1081,78 @@ class RedisClusterClient {
362
1081
  });
363
1082
  try {
364
1083
  const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
365
- const sdkResponse = oci_common_1.composeResponse({
1084
+ const sdkResponse = oci_common_2.composeResponse({
366
1085
  responseObject: {},
367
1086
  body: yield response.json(),
368
1087
  bodyKey: "redisCluster",
369
1088
  bodyModel: model.RedisCluster,
370
1089
  type: "model.RedisCluster",
371
1090
  responseHeaders: [
372
- {
373
- value: response.headers.get("etag"),
374
- key: "etag",
375
- dataType: "string"
376
- },
1091
+ {
1092
+ value: response.headers.get("etag"),
1093
+ key: "etag",
1094
+ dataType: "string"
1095
+ },
1096
+ {
1097
+ value: response.headers.get("opc-work-request-id"),
1098
+ key: "opcWorkRequestId",
1099
+ dataType: "string"
1100
+ },
1101
+ {
1102
+ value: response.headers.get("opc-request-id"),
1103
+ key: "opcRequestId",
1104
+ dataType: "string"
1105
+ }
1106
+ ]
1107
+ });
1108
+ return sdkResponse;
1109
+ }
1110
+ catch (err) {
1111
+ throw err;
1112
+ }
1113
+ });
1114
+ }
1115
+ /**
1116
+ * Deletes the specified OCI Cache cluster. A cluster is a memory-based storage solution. For more information, see [OCI Cache](https://docs.oracle.com/iaas/Content/ocicache/home.htm).
1117
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
1118
+ * @param DeleteRedisClusterRequest
1119
+ * @return DeleteRedisClusterResponse
1120
+ * @throws OciError when an error occurs
1121
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/redis/DeleteRedisCluster.ts.html |here} to see how to use DeleteRedisCluster API.
1122
+ */
1123
+ deleteRedisCluster(deleteRedisClusterRequest) {
1124
+ return __awaiter(this, void 0, void 0, function* () {
1125
+ if (this.logger)
1126
+ this.logger.debug("Calling operation RedisClusterClient#deleteRedisCluster.");
1127
+ const operationName = "deleteRedisCluster";
1128
+ const apiReferenceLink = "";
1129
+ const pathParams = {
1130
+ "{redisClusterId}": deleteRedisClusterRequest.redisClusterId
1131
+ };
1132
+ const queryParams = {};
1133
+ let headerParams = {
1134
+ "Content-Type": common.Constants.APPLICATION_JSON,
1135
+ "if-match": deleteRedisClusterRequest.ifMatch,
1136
+ "opc-request-id": deleteRedisClusterRequest.opcRequestId
1137
+ };
1138
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
1139
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, deleteRedisClusterRequest.retryConfiguration, specRetryConfiguration);
1140
+ if (this.logger)
1141
+ retrier.logger = this.logger;
1142
+ const request = yield oci_common_2.composeRequest({
1143
+ baseEndpoint: this._endpoint,
1144
+ defaultHeaders: this._defaultHeaders,
1145
+ path: "/redisClusters/{redisClusterId}",
1146
+ method: "DELETE",
1147
+ pathParams: pathParams,
1148
+ headerParams: headerParams,
1149
+ queryParams: queryParams
1150
+ });
1151
+ try {
1152
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1153
+ const sdkResponse = oci_common_2.composeResponse({
1154
+ responseObject: {},
1155
+ responseHeaders: [
377
1156
  {
378
1157
  value: response.headers.get("opc-work-request-id"),
379
1158
  key: "opcWorkRequestId",
@@ -394,44 +1173,46 @@ class RedisClusterClient {
394
1173
  });
395
1174
  }
396
1175
  /**
397
- * Deletes the specified OCI Cache cluster. A cluster is a memory-based storage solution. For more information, see [OCI Cache](https://docs.oracle.com/iaas/Content/ocicache/home.htm).
1176
+ * Detach existing OCI cache users to a redis cluster.
398
1177
  * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
399
- * @param DeleteRedisClusterRequest
400
- * @return DeleteRedisClusterResponse
1178
+ * @param DetachOciCacheUsersRequest
1179
+ * @return DetachOciCacheUsersResponse
401
1180
  * @throws OciError when an error occurs
402
- * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/redis/DeleteRedisCluster.ts.html |here} to see how to use DeleteRedisCluster API.
1181
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/redis/DetachOciCacheUsers.ts.html |here} to see how to use DetachOciCacheUsers API.
403
1182
  */
404
- deleteRedisCluster(deleteRedisClusterRequest) {
1183
+ detachOciCacheUsers(detachOciCacheUsersRequest) {
405
1184
  return __awaiter(this, void 0, void 0, function* () {
406
1185
  if (this.logger)
407
- this.logger.debug("Calling operation RedisClusterClient#deleteRedisCluster.");
408
- const operationName = "deleteRedisCluster";
1186
+ this.logger.debug("Calling operation RedisClusterClient#detachOciCacheUsers.");
1187
+ const operationName = "detachOciCacheUsers";
409
1188
  const apiReferenceLink = "";
410
1189
  const pathParams = {
411
- "{redisClusterId}": deleteRedisClusterRequest.redisClusterId
1190
+ "{redisClusterId}": detachOciCacheUsersRequest.redisClusterId
412
1191
  };
413
1192
  const queryParams = {};
414
1193
  let headerParams = {
415
1194
  "Content-Type": common.Constants.APPLICATION_JSON,
416
- "if-match": deleteRedisClusterRequest.ifMatch,
417
- "opc-request-id": deleteRedisClusterRequest.opcRequestId
1195
+ "if-match": detachOciCacheUsersRequest.ifMatch,
1196
+ "opc-retry-token": detachOciCacheUsersRequest.opcRetryToken,
1197
+ "opc-request-id": detachOciCacheUsersRequest.opcRequestId
418
1198
  };
419
1199
  const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
420
- const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, deleteRedisClusterRequest.retryConfiguration, specRetryConfiguration);
1200
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, detachOciCacheUsersRequest.retryConfiguration, specRetryConfiguration);
421
1201
  if (this.logger)
422
1202
  retrier.logger = this.logger;
423
- const request = yield oci_common_1.composeRequest({
1203
+ const request = yield oci_common_2.composeRequest({
424
1204
  baseEndpoint: this._endpoint,
425
1205
  defaultHeaders: this._defaultHeaders,
426
- path: "/redisClusters/{redisClusterId}",
427
- method: "DELETE",
1206
+ path: "/redisClusters/{redisClusterId}/actions/detachOciCacheUsers",
1207
+ method: "POST",
1208
+ bodyContent: common.ObjectSerializer.serialize(detachOciCacheUsersRequest.detachOciCacheUsersDetails, "DetachOciCacheUsersDetails", model.DetachOciCacheUsersDetails.getJsonObj),
428
1209
  pathParams: pathParams,
429
1210
  headerParams: headerParams,
430
1211
  queryParams: queryParams
431
1212
  });
432
1213
  try {
433
1214
  const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
434
- const sdkResponse = oci_common_1.composeResponse({
1215
+ const sdkResponse = oci_common_2.composeResponse({
435
1216
  responseObject: {},
436
1217
  responseHeaders: [
437
1218
  {
@@ -476,10 +1257,10 @@ class RedisClusterClient {
476
1257
  "opc-request-id": getRedisClusterRequest.opcRequestId
477
1258
  };
478
1259
  const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
479
- const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getRedisClusterRequest.retryConfiguration, specRetryConfiguration);
1260
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getRedisClusterRequest.retryConfiguration, specRetryConfiguration);
480
1261
  if (this.logger)
481
1262
  retrier.logger = this.logger;
482
- const request = yield oci_common_1.composeRequest({
1263
+ const request = yield oci_common_2.composeRequest({
483
1264
  baseEndpoint: this._endpoint,
484
1265
  defaultHeaders: this._defaultHeaders,
485
1266
  path: "/redisClusters/{redisClusterId}",
@@ -490,7 +1271,7 @@ class RedisClusterClient {
490
1271
  });
491
1272
  try {
492
1273
  const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
493
- const sdkResponse = oci_common_1.composeResponse({
1274
+ const sdkResponse = oci_common_2.composeResponse({
494
1275
  responseObject: {},
495
1276
  body: yield response.json(),
496
1277
  bodyKey: "redisCluster",
@@ -539,10 +1320,10 @@ class RedisClusterClient {
539
1320
  "opc-request-id": getWorkRequestRequest.opcRequestId
540
1321
  };
541
1322
  const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
542
- const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getWorkRequestRequest.retryConfiguration, specRetryConfiguration);
1323
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getWorkRequestRequest.retryConfiguration, specRetryConfiguration);
543
1324
  if (this.logger)
544
1325
  retrier.logger = this.logger;
545
- const request = yield oci_common_1.composeRequest({
1326
+ const request = yield oci_common_2.composeRequest({
546
1327
  baseEndpoint: this._endpoint,
547
1328
  defaultHeaders: this._defaultHeaders,
548
1329
  path: "/workRequests/{workRequestId}",
@@ -553,7 +1334,7 @@ class RedisClusterClient {
553
1334
  });
554
1335
  try {
555
1336
  const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
556
- const sdkResponse = oci_common_1.composeResponse({
1337
+ const sdkResponse = oci_common_2.composeResponse({
557
1338
  responseObject: {},
558
1339
  body: yield response.json(),
559
1340
  bodyKey: "workRequest",
@@ -584,6 +1365,116 @@ class RedisClusterClient {
584
1365
  }
585
1366
  });
586
1367
  }
1368
+ /**
1369
+ * Gets a list of associated OCI cache users for a redis cluster.
1370
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
1371
+ * @param ListAttachedOciCacheUsersRequest
1372
+ * @return ListAttachedOciCacheUsersResponse
1373
+ * @throws OciError when an error occurs
1374
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/redis/ListAttachedOciCacheUsers.ts.html |here} to see how to use ListAttachedOciCacheUsers API.
1375
+ */
1376
+ listAttachedOciCacheUsers(listAttachedOciCacheUsersRequest) {
1377
+ return __awaiter(this, void 0, void 0, function* () {
1378
+ if (this.logger)
1379
+ this.logger.debug("Calling operation RedisClusterClient#listAttachedOciCacheUsers.");
1380
+ const operationName = "listAttachedOciCacheUsers";
1381
+ const apiReferenceLink = "";
1382
+ const pathParams = {
1383
+ "{redisClusterId}": listAttachedOciCacheUsersRequest.redisClusterId
1384
+ };
1385
+ const queryParams = {
1386
+ "compartmentId": listAttachedOciCacheUsersRequest.compartmentId,
1387
+ "displayName": listAttachedOciCacheUsersRequest.displayName,
1388
+ "limit": listAttachedOciCacheUsersRequest.limit,
1389
+ "page": listAttachedOciCacheUsersRequest.page,
1390
+ "sortOrder": listAttachedOciCacheUsersRequest.sortOrder,
1391
+ "sortBy": listAttachedOciCacheUsersRequest.sortBy
1392
+ };
1393
+ let headerParams = {
1394
+ "Content-Type": common.Constants.APPLICATION_JSON,
1395
+ "opc-request-id": listAttachedOciCacheUsersRequest.opcRequestId
1396
+ };
1397
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
1398
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listAttachedOciCacheUsersRequest.retryConfiguration, specRetryConfiguration);
1399
+ if (this.logger)
1400
+ retrier.logger = this.logger;
1401
+ const request = yield oci_common_2.composeRequest({
1402
+ baseEndpoint: this._endpoint,
1403
+ defaultHeaders: this._defaultHeaders,
1404
+ path: "/redisClusters/{redisClusterId}/actions/getOciCacheUsers",
1405
+ method: "POST",
1406
+ pathParams: pathParams,
1407
+ headerParams: headerParams,
1408
+ queryParams: queryParams
1409
+ });
1410
+ try {
1411
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
1412
+ const sdkResponse = oci_common_2.composeResponse({
1413
+ responseObject: {},
1414
+ body: yield response.json(),
1415
+ bodyKey: "items",
1416
+ bodyModel: model.AttachedOciCacheUser,
1417
+ type: "Array<model.AttachedOciCacheUser>",
1418
+ responseHeaders: [
1419
+ {
1420
+ value: response.headers.get("opc-request-id"),
1421
+ key: "opcRequestId",
1422
+ dataType: "string"
1423
+ },
1424
+ {
1425
+ value: response.headers.get("opc-next-page"),
1426
+ key: "opcNextPage",
1427
+ dataType: "string"
1428
+ }
1429
+ ]
1430
+ });
1431
+ return sdkResponse;
1432
+ }
1433
+ catch (err) {
1434
+ throw err;
1435
+ }
1436
+ });
1437
+ }
1438
+ /**
1439
+ * NOTE: This function is deprecated in favor of listAttachedOciCacheUsersRecordIterator function.
1440
+ * Creates a new async iterator which will iterate over the models.AttachedOciCacheUser objects
1441
+ * contained in responses from the listAttachedOciCacheUsers operation. This iterator will fetch more data from the
1442
+ * server as needed.
1443
+ *
1444
+ * @param request a request which can be sent to the service operation
1445
+ */
1446
+ listAllAttachedOciCacheUsers(request) {
1447
+ return oci_common_1.paginateRecords(request, req => this.listAttachedOciCacheUsers(req));
1448
+ }
1449
+ /**
1450
+ * NOTE: This function is deprecated in favor of listAttachedOciCacheUsersResponseIterator function.
1451
+ * Creates a new async iterator which will iterate over the responses received from the listAttachedOciCacheUsers operation. This iterator
1452
+ * will fetch more data from the server as needed.
1453
+ *
1454
+ * @param request a request which can be sent to the service operation
1455
+ */
1456
+ listAllAttachedOciCacheUsersResponses(request) {
1457
+ return oci_common_1.paginateResponses(request, req => this.listAttachedOciCacheUsers(req));
1458
+ }
1459
+ /**
1460
+ * Creates a new async iterator which will iterate over the models.AttachedOciCacheUser objects
1461
+ * contained in responses from the listAttachedOciCacheUsers operation. This iterator will fetch more data from the
1462
+ * server as needed.
1463
+ *
1464
+ * @param request a request which can be sent to the service operation
1465
+ */
1466
+ listAttachedOciCacheUsersRecordIterator(request) {
1467
+ return oci_common_1.paginateRecords(request, req => this.listAttachedOciCacheUsers(req));
1468
+ }
1469
+ /**
1470
+ * Creates a new async iterator which will iterate over the responses received from the listAttachedOciCacheUsers operation. This iterator
1471
+ * will fetch more data from the server as needed.
1472
+ *
1473
+ * @param request a request which can be sent to the service operation
1474
+ */
1475
+ listAttachedOciCacheUsersResponseIterator(request) {
1476
+ return oci_common_1.paginateResponses(request, req => this.listAttachedOciCacheUsers(req));
1477
+ }
587
1478
  /**
588
1479
  * Gets the list of all nodes in a cluster.
589
1480
  *
@@ -614,10 +1505,10 @@ class RedisClusterClient {
614
1505
  "opc-request-id": listRedisClusterNodesRequest.opcRequestId
615
1506
  };
616
1507
  const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
617
- const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listRedisClusterNodesRequest.retryConfiguration, specRetryConfiguration);
1508
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listRedisClusterNodesRequest.retryConfiguration, specRetryConfiguration);
618
1509
  if (this.logger)
619
1510
  retrier.logger = this.logger;
620
- const request = yield oci_common_1.composeRequest({
1511
+ const request = yield oci_common_2.composeRequest({
621
1512
  baseEndpoint: this._endpoint,
622
1513
  defaultHeaders: this._defaultHeaders,
623
1514
  path: "/redisClusters/{redisClusterId}/nodes",
@@ -628,7 +1519,7 @@ class RedisClusterClient {
628
1519
  });
629
1520
  try {
630
1521
  const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
631
- const sdkResponse = oci_common_1.composeResponse({
1522
+ const sdkResponse = oci_common_2.composeResponse({
632
1523
  responseObject: {},
633
1524
  body: yield response.json(),
634
1525
  bodyKey: "redisNodeCollection",
@@ -685,10 +1576,10 @@ class RedisClusterClient {
685
1576
  "opc-request-id": listRedisClustersRequest.opcRequestId
686
1577
  };
687
1578
  const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
688
- const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listRedisClustersRequest.retryConfiguration, specRetryConfiguration);
1579
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listRedisClustersRequest.retryConfiguration, specRetryConfiguration);
689
1580
  if (this.logger)
690
1581
  retrier.logger = this.logger;
691
- const request = yield oci_common_1.composeRequest({
1582
+ const request = yield oci_common_2.composeRequest({
692
1583
  baseEndpoint: this._endpoint,
693
1584
  defaultHeaders: this._defaultHeaders,
694
1585
  path: "/redisClusters",
@@ -699,7 +1590,7 @@ class RedisClusterClient {
699
1590
  });
700
1591
  try {
701
1592
  const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
702
- const sdkResponse = oci_common_1.composeResponse({
1593
+ const sdkResponse = oci_common_2.composeResponse({
703
1594
  responseObject: {},
704
1595
  body: yield response.json(),
705
1596
  bodyKey: "redisClusterCollection",
@@ -754,10 +1645,10 @@ class RedisClusterClient {
754
1645
  "opc-request-id": listWorkRequestErrorsRequest.opcRequestId
755
1646
  };
756
1647
  const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
757
- const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listWorkRequestErrorsRequest.retryConfiguration, specRetryConfiguration);
1648
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listWorkRequestErrorsRequest.retryConfiguration, specRetryConfiguration);
758
1649
  if (this.logger)
759
1650
  retrier.logger = this.logger;
760
- const request = yield oci_common_1.composeRequest({
1651
+ const request = yield oci_common_2.composeRequest({
761
1652
  baseEndpoint: this._endpoint,
762
1653
  defaultHeaders: this._defaultHeaders,
763
1654
  path: "/workRequests/{workRequestId}/errors",
@@ -768,7 +1659,7 @@ class RedisClusterClient {
768
1659
  });
769
1660
  try {
770
1661
  const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
771
- const sdkResponse = oci_common_1.composeResponse({
1662
+ const sdkResponse = oci_common_2.composeResponse({
772
1663
  responseObject: {},
773
1664
  body: yield response.json(),
774
1665
  bodyKey: "workRequestErrorCollection",
@@ -823,10 +1714,10 @@ class RedisClusterClient {
823
1714
  "opc-request-id": listWorkRequestLogsRequest.opcRequestId
824
1715
  };
825
1716
  const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
826
- const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listWorkRequestLogsRequest.retryConfiguration, specRetryConfiguration);
1717
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listWorkRequestLogsRequest.retryConfiguration, specRetryConfiguration);
827
1718
  if (this.logger)
828
1719
  retrier.logger = this.logger;
829
- const request = yield oci_common_1.composeRequest({
1720
+ const request = yield oci_common_2.composeRequest({
830
1721
  baseEndpoint: this._endpoint,
831
1722
  defaultHeaders: this._defaultHeaders,
832
1723
  path: "/workRequests/{workRequestId}/logs",
@@ -837,7 +1728,7 @@ class RedisClusterClient {
837
1728
  });
838
1729
  try {
839
1730
  const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
840
- const sdkResponse = oci_common_1.composeResponse({
1731
+ const sdkResponse = oci_common_2.composeResponse({
841
1732
  responseObject: {},
842
1733
  body: yield response.json(),
843
1734
  bodyKey: "workRequestLogEntryCollection",
@@ -894,10 +1785,10 @@ class RedisClusterClient {
894
1785
  "opc-request-id": listWorkRequestsRequest.opcRequestId
895
1786
  };
896
1787
  const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
897
- const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listWorkRequestsRequest.retryConfiguration, specRetryConfiguration);
1788
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listWorkRequestsRequest.retryConfiguration, specRetryConfiguration);
898
1789
  if (this.logger)
899
1790
  retrier.logger = this.logger;
900
- const request = yield oci_common_1.composeRequest({
1791
+ const request = yield oci_common_2.composeRequest({
901
1792
  baseEndpoint: this._endpoint,
902
1793
  defaultHeaders: this._defaultHeaders,
903
1794
  path: "/workRequests",
@@ -908,7 +1799,7 @@ class RedisClusterClient {
908
1799
  });
909
1800
  try {
910
1801
  const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
911
- const sdkResponse = oci_common_1.composeResponse({
1802
+ const sdkResponse = oci_common_2.composeResponse({
912
1803
  responseObject: {},
913
1804
  body: yield response.json(),
914
1805
  bodyKey: "workRequestSummaryCollection",
@@ -958,10 +1849,10 @@ class RedisClusterClient {
958
1849
  "opc-request-id": updateRedisClusterRequest.opcRequestId
959
1850
  };
960
1851
  const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
961
- const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, updateRedisClusterRequest.retryConfiguration, specRetryConfiguration);
1852
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, updateRedisClusterRequest.retryConfiguration, specRetryConfiguration);
962
1853
  if (this.logger)
963
1854
  retrier.logger = this.logger;
964
- const request = yield oci_common_1.composeRequest({
1855
+ const request = yield oci_common_2.composeRequest({
965
1856
  baseEndpoint: this._endpoint,
966
1857
  defaultHeaders: this._defaultHeaders,
967
1858
  path: "/redisClusters/{redisClusterId}",
@@ -973,7 +1864,7 @@ class RedisClusterClient {
973
1864
  });
974
1865
  try {
975
1866
  const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
976
- const sdkResponse = oci_common_1.composeResponse({
1867
+ const sdkResponse = oci_common_2.composeResponse({
977
1868
  responseObject: {},
978
1869
  responseHeaders: [
979
1870
  {
@@ -999,4 +1890,211 @@ class RedisClusterClient {
999
1890
  exports.RedisClusterClient = RedisClusterClient;
1000
1891
  RedisClusterClient.serviceEndpointTemplate = "https://redis.{region}.oci.{secondLevelDomain}";
1001
1892
  RedisClusterClient.endpointServiceName = "";
1893
+ var RedisIdentityApiKeys;
1894
+ (function (RedisIdentityApiKeys) {
1895
+ })(RedisIdentityApiKeys = exports.RedisIdentityApiKeys || (exports.RedisIdentityApiKeys = {}));
1896
+ /**
1897
+ * This service client uses {@link common.CircuitBreaker.DefaultConfiguration} for all the operations by default if no circuit breaker configuration is defined by the user.
1898
+ */
1899
+ class RedisIdentityClient {
1900
+ constructor(params, clientConfiguration) {
1901
+ this["_realmSpecificEndpointTemplateEnabled"] = undefined;
1902
+ this["_endpoint"] = "";
1903
+ this["_defaultHeaders"] = {};
1904
+ this._circuitBreaker = null;
1905
+ this._httpOptions = undefined;
1906
+ this._bodyDuplexMode = undefined;
1907
+ this.targetService = "RedisIdentity";
1908
+ this._regionId = "";
1909
+ this._lastSetRegionOrRegionId = "";
1910
+ const requestSigner = params.authenticationDetailsProvider
1911
+ ? new common.DefaultRequestSigner(params.authenticationDetailsProvider)
1912
+ : null;
1913
+ this._authProvider = params.authenticationDetailsProvider;
1914
+ if (clientConfiguration) {
1915
+ this._clientConfiguration = clientConfiguration;
1916
+ this._circuitBreaker = clientConfiguration.circuitBreaker
1917
+ ? clientConfiguration.circuitBreaker.circuit
1918
+ : null;
1919
+ this._httpOptions = clientConfiguration.httpOptions
1920
+ ? clientConfiguration.httpOptions
1921
+ : undefined;
1922
+ this._bodyDuplexMode = clientConfiguration.bodyDuplexMode
1923
+ ? clientConfiguration.bodyDuplexMode
1924
+ : undefined;
1925
+ }
1926
+ if (!oci_common_2.developerToolConfiguration.isServiceEnabled("redis")) {
1927
+ 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 : ";
1928
+ throw errmsg.concat("redis");
1929
+ }
1930
+ // if circuit breaker is not created, check if circuit breaker system is enabled to use default circuit breaker
1931
+ const specCircuitBreakerEnabled = true;
1932
+ if (!this._circuitBreaker &&
1933
+ common.utils.isCircuitBreakerSystemEnabled(clientConfiguration) &&
1934
+ (specCircuitBreakerEnabled || common.CircuitBreaker.DefaultCircuitBreakerOverriden)) {
1935
+ this._circuitBreaker = new common.CircuitBreaker().circuit;
1936
+ }
1937
+ this._httpClient =
1938
+ params.httpClient ||
1939
+ new common.FetchHttpClient(requestSigner, this._circuitBreaker, this._httpOptions, this._bodyDuplexMode);
1940
+ if (params.authenticationDetailsProvider &&
1941
+ common.isRegionProvider(params.authenticationDetailsProvider)) {
1942
+ const provider = params.authenticationDetailsProvider;
1943
+ if (provider.getRegion()) {
1944
+ this.region = provider.getRegion();
1945
+ }
1946
+ }
1947
+ }
1948
+ /**
1949
+ * Get the endpoint that is being used to call (ex, https://www.example.com).
1950
+ */
1951
+ get endpoint() {
1952
+ return this._endpoint;
1953
+ }
1954
+ /**
1955
+ * Sets the endpoint to call (ex, https://www.example.com).
1956
+ * @param endpoint The endpoint of the service.
1957
+ */
1958
+ set endpoint(endpoint) {
1959
+ this._endpoint = endpoint;
1960
+ this._endpoint = this._endpoint + "/20220315";
1961
+ if (this.logger)
1962
+ this.logger.info(`RedisIdentityClient endpoint set to ${this._endpoint}`);
1963
+ }
1964
+ get logger() {
1965
+ return common.LOG.logger;
1966
+ }
1967
+ /**
1968
+ * Determines whether realm specific endpoint should be used or not.
1969
+ * Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false"
1970
+ * @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template
1971
+ */
1972
+ set useRealmSpecificEndpointTemplate(realmSpecificEndpointTemplateEnabled) {
1973
+ this._realmSpecificEndpointTemplateEnabled = realmSpecificEndpointTemplateEnabled;
1974
+ if (this.logger)
1975
+ this.logger.info(`realmSpecificEndpointTemplateEnabled set to ${this._realmSpecificEndpointTemplateEnabled}`);
1976
+ if (this._lastSetRegionOrRegionId === common.Region.REGION_STRING) {
1977
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegion(RedisIdentityClient.serviceEndpointTemplate, this._region, RedisIdentityClient.endpointServiceName);
1978
+ }
1979
+ else if (this._lastSetRegionOrRegionId === common.Region.REGION_ID_STRING) {
1980
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(RedisIdentityClient.serviceEndpointTemplate, this._regionId, RedisIdentityClient.endpointServiceName);
1981
+ }
1982
+ }
1983
+ /**
1984
+ * Sets the region to call (ex, Region.US_PHOENIX_1).
1985
+ * Note, this will call {@link #endpoint(String) endpoint} after resolving the endpoint.
1986
+ * @param region The region of the service.
1987
+ */
1988
+ set region(region) {
1989
+ this._region = region;
1990
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegion(RedisIdentityClient.serviceEndpointTemplate, region, RedisIdentityClient.endpointServiceName);
1991
+ this._lastSetRegionOrRegionId = common.Region.REGION_STRING;
1992
+ }
1993
+ /**
1994
+ * Sets the regionId to call (ex, 'us-phoenix-1').
1995
+ *
1996
+ * Note, this will first try to map the region ID to a known Region and call {@link #region(Region) region}.
1997
+ * If no known Region could be determined, it will create an endpoint assuming its in default Realm OC1
1998
+ * and then call {@link #endpoint(String) endpoint}.
1999
+ * @param regionId The public region ID.
2000
+ */
2001
+ set regionId(regionId) {
2002
+ this._regionId = regionId;
2003
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(RedisIdentityClient.serviceEndpointTemplate, regionId, RedisIdentityClient.endpointServiceName);
2004
+ this._lastSetRegionOrRegionId = common.Region.REGION_ID_STRING;
2005
+ }
2006
+ /**
2007
+ * Shutdown the circuit breaker used by the client when it is no longer needed
2008
+ */
2009
+ shutdownCircuitBreaker() {
2010
+ if (this._circuitBreaker) {
2011
+ this._circuitBreaker.shutdown();
2012
+ }
2013
+ }
2014
+ /**
2015
+ * Close the provider if possible which in turn shuts down any associated circuit breaker
2016
+ */
2017
+ closeProvider() {
2018
+ if (this._authProvider) {
2019
+ if (this._authProvider instanceof common.AbstractRequestingAuthenticationDetailsProvider)
2020
+ (this._authProvider).closeProvider();
2021
+ }
2022
+ }
2023
+ /**
2024
+ * Close the client once it is no longer needed
2025
+ */
2026
+ close() {
2027
+ this.shutdownCircuitBreaker();
2028
+ this.closeProvider();
2029
+ }
2030
+ /**
2031
+ * Generates an identity token to sign in with the specified redis user for the redis cluster
2032
+ * This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
2033
+ * @param CreateIdentityTokenRequest
2034
+ * @return CreateIdentityTokenResponse
2035
+ * @throws OciError when an error occurs
2036
+ * @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/redis/CreateIdentityToken.ts.html |here} to see how to use CreateIdentityToken API.
2037
+ */
2038
+ createIdentityToken(createIdentityTokenRequest) {
2039
+ return __awaiter(this, void 0, void 0, function* () {
2040
+ if (this.logger)
2041
+ this.logger.debug("Calling operation RedisIdentityClient#createIdentityToken.");
2042
+ const operationName = "createIdentityToken";
2043
+ const apiReferenceLink = "";
2044
+ const pathParams = {
2045
+ "{redisClusterId}": createIdentityTokenRequest.redisClusterId
2046
+ };
2047
+ const queryParams = {};
2048
+ let headerParams = {
2049
+ "Content-Type": common.Constants.APPLICATION_JSON,
2050
+ "if-match": createIdentityTokenRequest.ifMatch,
2051
+ "opc-request-id": createIdentityTokenRequest.opcRequestId,
2052
+ "opc-retry-token": createIdentityTokenRequest.opcRetryToken
2053
+ };
2054
+ const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
2055
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, createIdentityTokenRequest.retryConfiguration, specRetryConfiguration);
2056
+ if (this.logger)
2057
+ retrier.logger = this.logger;
2058
+ const request = yield oci_common_2.composeRequest({
2059
+ baseEndpoint: this._endpoint,
2060
+ defaultHeaders: this._defaultHeaders,
2061
+ path: "/redisClusters/{redisClusterId}/actions/identityToken",
2062
+ method: "POST",
2063
+ bodyContent: common.ObjectSerializer.serialize(createIdentityTokenRequest.createIdentityTokenDetails, "CreateIdentityTokenDetails", model.CreateIdentityTokenDetails.getJsonObj),
2064
+ pathParams: pathParams,
2065
+ headerParams: headerParams,
2066
+ queryParams: queryParams
2067
+ });
2068
+ try {
2069
+ const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
2070
+ const sdkResponse = oci_common_2.composeResponse({
2071
+ responseObject: {},
2072
+ body: yield response.json(),
2073
+ bodyKey: "identityTokenDetailsResponse",
2074
+ bodyModel: model.IdentityTokenDetailsResponse,
2075
+ type: "model.IdentityTokenDetailsResponse",
2076
+ responseHeaders: [
2077
+ {
2078
+ value: response.headers.get("etag"),
2079
+ key: "etag",
2080
+ dataType: "string"
2081
+ },
2082
+ {
2083
+ value: response.headers.get("opc-request-id"),
2084
+ key: "opcRequestId",
2085
+ dataType: "string"
2086
+ }
2087
+ ]
2088
+ });
2089
+ return sdkResponse;
2090
+ }
2091
+ catch (err) {
2092
+ throw err;
2093
+ }
2094
+ });
2095
+ }
2096
+ }
2097
+ exports.RedisIdentityClient = RedisIdentityClient;
2098
+ RedisIdentityClient.serviceEndpointTemplate = "https://redis.{region}.oci.{secondLevelDomain}";
2099
+ RedisIdentityClient.endpointServiceName = "";
1002
2100
  //# sourceMappingURL=client.js.map