oci-redis 2.71.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.txt +89 -0
- package/NOTICE.txt +1 -0
- package/README.md +22 -0
- package/THIRD_PARTY_LICENSES.txt +576 -0
- package/index.d.ts +22 -0
- package/index.js +45 -0
- package/index.js.map +1 -0
- package/lib/client.d.ts +187 -0
- package/lib/client.js +902 -0
- package/lib/client.js.map +1 -0
- package/lib/model/action-type.d.ts +32 -0
- package/lib/model/action-type.js +43 -0
- package/lib/model/action-type.js.map +1 -0
- package/lib/model/change-redis-cluster-compartment-details.d.ts +27 -0
- package/lib/model/change-redis-cluster-compartment-details.js +29 -0
- package/lib/model/change-redis-cluster-compartment-details.js.map +1 -0
- package/lib/model/create-redis-cluster-details.d.ts +63 -0
- package/lib/model/create-redis-cluster-details.js +29 -0
- package/lib/model/create-redis-cluster-details.js.map +1 -0
- package/lib/model/index.d.ts +52 -0
- package/lib/model/index.js +75 -0
- package/lib/model/index.js.map +1 -0
- package/lib/model/node-collection.d.ts +26 -0
- package/lib/model/node-collection.js +61 -0
- package/lib/model/node-collection.js.map +1 -0
- package/lib/model/node.d.ts +33 -0
- package/lib/model/node.js +29 -0
- package/lib/model/node.js.map +1 -0
- package/lib/model/operation-status.d.ts +34 -0
- package/lib/model/operation-status.js +45 -0
- package/lib/model/operation-status.js.map +1 -0
- package/lib/model/operation-type.d.ts +35 -0
- package/lib/model/operation-type.js +46 -0
- package/lib/model/operation-type.js.map +1 -0
- package/lib/model/redis-cluster-collection.d.ts +26 -0
- package/lib/model/redis-cluster-collection.js +61 -0
- package/lib/model/redis-cluster-collection.js.map +1 -0
- package/lib/model/redis-cluster-summary.d.ts +110 -0
- package/lib/model/redis-cluster-summary.js +29 -0
- package/lib/model/redis-cluster-summary.js.map +1 -0
- package/lib/model/redis-cluster.d.ts +132 -0
- package/lib/model/redis-cluster.js +80 -0
- package/lib/model/redis-cluster.js.map +1 -0
- package/lib/model/sort-order.d.ts +23 -0
- package/lib/model/sort-order.js +34 -0
- package/lib/model/sort-order.js.map +1 -0
- package/lib/model/update-redis-cluster-details.d.ts +51 -0
- package/lib/model/update-redis-cluster-details.js +29 -0
- package/lib/model/update-redis-cluster-details.js.map +1 -0
- package/lib/model/work-request-error-collection.d.ts +26 -0
- package/lib/model/work-request-error-collection.js +61 -0
- package/lib/model/work-request-error-collection.js.map +1 -0
- package/lib/model/work-request-error.d.ts +34 -0
- package/lib/model/work-request-error.js +29 -0
- package/lib/model/work-request-error.js.map +1 -0
- package/lib/model/work-request-log-entry-collection.d.ts +26 -0
- package/lib/model/work-request-log-entry-collection.js +61 -0
- package/lib/model/work-request-log-entry-collection.js.map +1 -0
- package/lib/model/work-request-log-entry.d.ts +29 -0
- package/lib/model/work-request-log-entry.js +29 -0
- package/lib/model/work-request-log-entry.js.map +1 -0
- package/lib/model/work-request-resource.d.ts +42 -0
- package/lib/model/work-request-resource.js +29 -0
- package/lib/model/work-request-resource.js.map +1 -0
- package/lib/model/work-request-summary-collection.d.ts +26 -0
- package/lib/model/work-request-summary-collection.js +61 -0
- package/lib/model/work-request-summary-collection.js.map +1 -0
- package/lib/model/work-request-summary.d.ts +80 -0
- package/lib/model/work-request-summary.js +61 -0
- package/lib/model/work-request-summary.js.map +1 -0
- package/lib/model/work-request.d.ts +62 -0
- package/lib/model/work-request.js +61 -0
- package/lib/model/work-request.js.map +1 -0
- package/lib/rediscluster-waiter.d.ts +36 -0
- package/lib/rediscluster-waiter.js +76 -0
- package/lib/rediscluster-waiter.js.map +1 -0
- package/lib/request/cancel-work-request-request.d.ts +35 -0
- package/lib/request/cancel-work-request-request.js +15 -0
- package/lib/request/cancel-work-request-request.js.map +1 -0
- package/lib/request/change-redis-cluster-compartment-request.d.ts +49 -0
- package/lib/request/change-redis-cluster-compartment-request.js +15 -0
- package/lib/request/change-redis-cluster-compartment-request.js.map +1 -0
- package/lib/request/create-redis-cluster-request.d.ts +36 -0
- package/lib/request/create-redis-cluster-request.js +15 -0
- package/lib/request/create-redis-cluster-request.js.map +1 -0
- package/lib/request/delete-redis-cluster-request.d.ts +35 -0
- package/lib/request/delete-redis-cluster-request.js +15 -0
- package/lib/request/delete-redis-cluster-request.js.map +1 -0
- package/lib/request/get-redis-cluster-request.d.ts +26 -0
- package/lib/request/get-redis-cluster-request.js +15 -0
- package/lib/request/get-redis-cluster-request.js.map +1 -0
- package/lib/request/get-work-request-request.d.ts +26 -0
- package/lib/request/get-work-request-request.js +15 -0
- package/lib/request/get-work-request-request.js.map +1 -0
- package/lib/request/index.d.ts +34 -0
- package/lib/request/index.js +43 -0
- package/lib/request/index.js.map +1 -0
- package/lib/request/list-redis-clusters-request.d.ts +62 -0
- package/lib/request/list-redis-clusters-request.js +24 -0
- package/lib/request/list-redis-clusters-request.js.map +1 -0
- package/lib/request/list-work-request-errors-request.d.ts +49 -0
- package/lib/request/list-work-request-errors-request.js +23 -0
- package/lib/request/list-work-request-errors-request.js.map +1 -0
- package/lib/request/list-work-request-logs-request.d.ts +49 -0
- package/lib/request/list-work-request-logs-request.js +23 -0
- package/lib/request/list-work-request-logs-request.js.map +1 -0
- package/lib/request/list-work-requests-request.d.ts +61 -0
- package/lib/request/list-work-requests-request.js +23 -0
- package/lib/request/list-work-requests-request.js.map +1 -0
- package/lib/request/update-redis-cluster-request.d.ts +40 -0
- package/lib/request/update-redis-cluster-request.js +15 -0
- package/lib/request/update-redis-cluster-request.js.map +1 -0
- package/lib/response/cancel-work-request-response.d.ts +20 -0
- package/lib/response/cancel-work-request-response.js +15 -0
- package/lib/response/cancel-work-request-response.js.map +1 -0
- package/lib/response/change-redis-cluster-compartment-response.d.ts +25 -0
- package/lib/response/change-redis-cluster-compartment-response.js +15 -0
- package/lib/response/change-redis-cluster-compartment-response.js.map +1 -0
- package/lib/response/create-redis-cluster-response.d.ts +35 -0
- package/lib/response/create-redis-cluster-response.js +15 -0
- package/lib/response/create-redis-cluster-response.js.map +1 -0
- package/lib/response/delete-redis-cluster-response.d.ts +25 -0
- package/lib/response/delete-redis-cluster-response.js +15 -0
- package/lib/response/delete-redis-cluster-response.js.map +1 -0
- package/lib/response/get-redis-cluster-response.d.ts +30 -0
- package/lib/response/get-redis-cluster-response.js +15 -0
- package/lib/response/get-redis-cluster-response.js.map +1 -0
- package/lib/response/get-work-request-response.d.ts +34 -0
- package/lib/response/get-work-request-response.js +15 -0
- package/lib/response/get-work-request-response.js.map +1 -0
- package/lib/response/index.d.ts +34 -0
- package/lib/response/index.js +15 -0
- package/lib/response/index.js.map +1 -0
- package/lib/response/list-redis-clusters-response.d.ts +32 -0
- package/lib/response/list-redis-clusters-response.js +15 -0
- package/lib/response/list-redis-clusters-response.js.map +1 -0
- package/lib/response/list-work-request-errors-response.d.ts +32 -0
- package/lib/response/list-work-request-errors-response.js +15 -0
- package/lib/response/list-work-request-errors-response.js.map +1 -0
- package/lib/response/list-work-request-logs-response.d.ts +32 -0
- package/lib/response/list-work-request-logs-response.js +15 -0
- package/lib/response/list-work-request-logs-response.js.map +1 -0
- package/lib/response/list-work-requests-response.d.ts +32 -0
- package/lib/response/list-work-requests-response.js +15 -0
- package/lib/response/list-work-requests-response.js.map +1 -0
- package/lib/response/update-redis-cluster-response.d.ts +25 -0
- package/lib/response/update-redis-cluster-response.js +15 -0
- package/lib/response/update-redis-cluster-response.js.map +1 -0
- package/package.json +29 -0
package/lib/client.js
ADDED
|
@@ -0,0 +1,902 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Redis Service API
|
|
4
|
+
* Use the Redis Service API to create and manage Redis clusters. A Redis cluster is a memory-based storage solution. For more information, see [OCI Caching Service with Redis](/iaas/Content/redis/home.htm).
|
|
5
|
+
* OpenAPI spec version: 20220315
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OracleSDKGenerator.
|
|
9
|
+
* Do not edit the class manually.
|
|
10
|
+
*
|
|
11
|
+
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
|
|
12
|
+
* This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
|
|
13
|
+
*/
|
|
14
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
15
|
+
if (k2 === undefined) k2 = k;
|
|
16
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
17
|
+
}) : (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
o[k2] = m[k];
|
|
20
|
+
}));
|
|
21
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
22
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
23
|
+
}) : function(o, v) {
|
|
24
|
+
o["default"] = v;
|
|
25
|
+
});
|
|
26
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
27
|
+
if (mod && mod.__esModule) return mod;
|
|
28
|
+
var result = {};
|
|
29
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
30
|
+
__setModuleDefault(result, mod);
|
|
31
|
+
return result;
|
|
32
|
+
};
|
|
33
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
34
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
35
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
36
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
37
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
38
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
39
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
43
|
+
exports.RedisClusterClient = exports.RedisClusterApiKeys = void 0;
|
|
44
|
+
const common = require("oci-common");
|
|
45
|
+
const model = __importStar(require("./model"));
|
|
46
|
+
const rediscluster_waiter_1 = require("./rediscluster-waiter");
|
|
47
|
+
const oci_common_1 = require("oci-common");
|
|
48
|
+
// ===============================================
|
|
49
|
+
// This file is autogenerated - Please do not edit
|
|
50
|
+
// ===============================================
|
|
51
|
+
var RedisClusterApiKeys;
|
|
52
|
+
(function (RedisClusterApiKeys) {
|
|
53
|
+
})(RedisClusterApiKeys = exports.RedisClusterApiKeys || (exports.RedisClusterApiKeys = {}));
|
|
54
|
+
/**
|
|
55
|
+
* This service client uses {@link common.CircuitBreaker.DefaultConfiguration} for all the operations by default if no circuit breaker configuration is defined by the user.
|
|
56
|
+
*/
|
|
57
|
+
class RedisClusterClient {
|
|
58
|
+
constructor(params, clientConfiguration) {
|
|
59
|
+
this["_realmSpecificEndpointTemplateEnabled"] = false;
|
|
60
|
+
this["_endpoint"] = "";
|
|
61
|
+
this["_defaultHeaders"] = {};
|
|
62
|
+
this._circuitBreaker = null;
|
|
63
|
+
this._httpOptions = undefined;
|
|
64
|
+
this._bodyDuplexMode = undefined;
|
|
65
|
+
this.targetService = "RedisCluster";
|
|
66
|
+
this._regionId = "";
|
|
67
|
+
this._lastSetRegionOrRegionId = "";
|
|
68
|
+
const requestSigner = params.authenticationDetailsProvider
|
|
69
|
+
? new common.DefaultRequestSigner(params.authenticationDetailsProvider)
|
|
70
|
+
: null;
|
|
71
|
+
if (clientConfiguration) {
|
|
72
|
+
this._clientConfiguration = clientConfiguration;
|
|
73
|
+
this._circuitBreaker = clientConfiguration.circuitBreaker
|
|
74
|
+
? clientConfiguration.circuitBreaker.circuit
|
|
75
|
+
: null;
|
|
76
|
+
this._httpOptions = clientConfiguration.httpOptions
|
|
77
|
+
? clientConfiguration.httpOptions
|
|
78
|
+
: undefined;
|
|
79
|
+
this._bodyDuplexMode = clientConfiguration.bodyDuplexMode
|
|
80
|
+
? clientConfiguration.bodyDuplexMode
|
|
81
|
+
: undefined;
|
|
82
|
+
}
|
|
83
|
+
// if circuit breaker is not created, check if circuit breaker system is enabled to use default circuit breaker
|
|
84
|
+
const specCircuitBreakerEnabled = true;
|
|
85
|
+
if (!this._circuitBreaker &&
|
|
86
|
+
common.utils.isCircuitBreakerSystemEnabled(clientConfiguration) &&
|
|
87
|
+
(specCircuitBreakerEnabled || common.CircuitBreaker.DefaultCircuitBreakerOverriden)) {
|
|
88
|
+
this._circuitBreaker = new common.CircuitBreaker().circuit;
|
|
89
|
+
}
|
|
90
|
+
this._httpClient =
|
|
91
|
+
params.httpClient ||
|
|
92
|
+
new common.FetchHttpClient(requestSigner, this._circuitBreaker, this._httpOptions, this._bodyDuplexMode);
|
|
93
|
+
if (params.authenticationDetailsProvider &&
|
|
94
|
+
common.isRegionProvider(params.authenticationDetailsProvider)) {
|
|
95
|
+
const provider = params.authenticationDetailsProvider;
|
|
96
|
+
if (provider.getRegion()) {
|
|
97
|
+
this.region = provider.getRegion();
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Get the endpoint that is being used to call (ex, https://www.example.com).
|
|
103
|
+
*/
|
|
104
|
+
get endpoint() {
|
|
105
|
+
return this._endpoint;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Sets the endpoint to call (ex, https://www.example.com).
|
|
109
|
+
* @param endpoint The endpoint of the service.
|
|
110
|
+
*/
|
|
111
|
+
set endpoint(endpoint) {
|
|
112
|
+
this._endpoint = endpoint;
|
|
113
|
+
this._endpoint = this._endpoint + "/20220315";
|
|
114
|
+
if (this.logger)
|
|
115
|
+
this.logger.info(`RedisClusterClient endpoint set to ${this._endpoint}`);
|
|
116
|
+
}
|
|
117
|
+
get logger() {
|
|
118
|
+
return common.LOG.logger;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Determines whether realm specific endpoint should be used or not.
|
|
122
|
+
* Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false"
|
|
123
|
+
* @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template
|
|
124
|
+
*/
|
|
125
|
+
set useRealmSpecificEndpointTemplate(realmSpecificEndpointTemplateEnabled) {
|
|
126
|
+
this._realmSpecificEndpointTemplateEnabled = realmSpecificEndpointTemplateEnabled;
|
|
127
|
+
if (this.logger)
|
|
128
|
+
this.logger.info(`realmSpecificEndpointTemplateEnabled set to ${this._realmSpecificEndpointTemplateEnabled}`);
|
|
129
|
+
if (this._lastSetRegionOrRegionId === common.Region.REGION_STRING) {
|
|
130
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegion(RedisClusterClient.serviceEndpointTemplate, this._region, RedisClusterClient.endpointServiceName);
|
|
131
|
+
}
|
|
132
|
+
else if (this._lastSetRegionOrRegionId === common.Region.REGION_ID_STRING) {
|
|
133
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(RedisClusterClient.serviceEndpointTemplate, this._regionId, RedisClusterClient.endpointServiceName);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Sets the region to call (ex, Region.US_PHOENIX_1).
|
|
138
|
+
* Note, this will call {@link #endpoint(String) endpoint} after resolving the endpoint.
|
|
139
|
+
* @param region The region of the service.
|
|
140
|
+
*/
|
|
141
|
+
set region(region) {
|
|
142
|
+
this._region = region;
|
|
143
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegion(RedisClusterClient.serviceEndpointTemplate, region, RedisClusterClient.endpointServiceName);
|
|
144
|
+
this._lastSetRegionOrRegionId = common.Region.REGION_STRING;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Sets the regionId to call (ex, 'us-phoenix-1').
|
|
148
|
+
*
|
|
149
|
+
* Note, this will first try to map the region ID to a known Region and call {@link #region(Region) region}.
|
|
150
|
+
* If no known Region could be determined, it will create an endpoint assuming its in default Realm OC1
|
|
151
|
+
* and then call {@link #endpoint(String) endpoint}.
|
|
152
|
+
* @param regionId The public region ID.
|
|
153
|
+
*/
|
|
154
|
+
set regionId(regionId) {
|
|
155
|
+
this._regionId = regionId;
|
|
156
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(RedisClusterClient.serviceEndpointTemplate, regionId, RedisClusterClient.endpointServiceName);
|
|
157
|
+
this._lastSetRegionOrRegionId = common.Region.REGION_ID_STRING;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Creates a new RedisClusterWaiter for resources for this service.
|
|
161
|
+
*
|
|
162
|
+
* @param config The waiter configuration for termination and delay strategy
|
|
163
|
+
* @return The service waiters.
|
|
164
|
+
*/
|
|
165
|
+
createWaiters(config) {
|
|
166
|
+
this._waiters = new rediscluster_waiter_1.RedisClusterWaiter(this, config);
|
|
167
|
+
return this._waiters;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Gets the waiters available for resources for this service.
|
|
171
|
+
*
|
|
172
|
+
* @return The service waiters.
|
|
173
|
+
*/
|
|
174
|
+
getWaiters() {
|
|
175
|
+
if (this._waiters) {
|
|
176
|
+
return this._waiters;
|
|
177
|
+
}
|
|
178
|
+
throw Error("Waiters do not exist. Please create waiters.");
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Cancels the specified work request.
|
|
182
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
183
|
+
* @param CancelWorkRequestRequest
|
|
184
|
+
* @return CancelWorkRequestResponse
|
|
185
|
+
* @throws OciError when an error occurs
|
|
186
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.71.0/redis/CancelWorkRequest.ts.html |here} to see how to use CancelWorkRequest API.
|
|
187
|
+
*/
|
|
188
|
+
cancelWorkRequest(cancelWorkRequestRequest) {
|
|
189
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
190
|
+
if (this.logger)
|
|
191
|
+
this.logger.debug("Calling operation RedisClusterClient#cancelWorkRequest.");
|
|
192
|
+
const operationName = "cancelWorkRequest";
|
|
193
|
+
const apiReferenceLink = "";
|
|
194
|
+
const pathParams = {
|
|
195
|
+
"{workRequestId}": cancelWorkRequestRequest.workRequestId
|
|
196
|
+
};
|
|
197
|
+
const queryParams = {};
|
|
198
|
+
let headerParams = {
|
|
199
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
200
|
+
"if-match": cancelWorkRequestRequest.ifMatch,
|
|
201
|
+
"opc-request-id": cancelWorkRequestRequest.opcRequestId
|
|
202
|
+
};
|
|
203
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
204
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, cancelWorkRequestRequest.retryConfiguration, specRetryConfiguration);
|
|
205
|
+
if (this.logger)
|
|
206
|
+
retrier.logger = this.logger;
|
|
207
|
+
const request = yield oci_common_1.composeRequest({
|
|
208
|
+
baseEndpoint: this._endpoint,
|
|
209
|
+
defaultHeaders: this._defaultHeaders,
|
|
210
|
+
path: "/workRequests/{workRequestId}",
|
|
211
|
+
method: "DELETE",
|
|
212
|
+
pathParams: pathParams,
|
|
213
|
+
headerParams: headerParams,
|
|
214
|
+
queryParams: queryParams
|
|
215
|
+
});
|
|
216
|
+
try {
|
|
217
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
218
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
219
|
+
responseObject: {},
|
|
220
|
+
responseHeaders: [
|
|
221
|
+
{
|
|
222
|
+
value: response.headers.get("opc-request-id"),
|
|
223
|
+
key: "opcRequestId",
|
|
224
|
+
dataType: "string"
|
|
225
|
+
}
|
|
226
|
+
]
|
|
227
|
+
});
|
|
228
|
+
return sdkResponse;
|
|
229
|
+
}
|
|
230
|
+
catch (err) {
|
|
231
|
+
throw err;
|
|
232
|
+
}
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* Moves a Redis cluster into a different compartment within the same tenancy. A Redis cluster is a memory-based storage solution. For more information, see [OCI Caching Service with Redis](https://docs.cloud.oracle.com/iaas/Content/redis/home.htm).
|
|
237
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
238
|
+
* @param ChangeRedisClusterCompartmentRequest
|
|
239
|
+
* @return ChangeRedisClusterCompartmentResponse
|
|
240
|
+
* @throws OciError when an error occurs
|
|
241
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.71.0/redis/ChangeRedisClusterCompartment.ts.html |here} to see how to use ChangeRedisClusterCompartment API.
|
|
242
|
+
*/
|
|
243
|
+
changeRedisClusterCompartment(changeRedisClusterCompartmentRequest) {
|
|
244
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
245
|
+
if (this.logger)
|
|
246
|
+
this.logger.debug("Calling operation RedisClusterClient#changeRedisClusterCompartment.");
|
|
247
|
+
const operationName = "changeRedisClusterCompartment";
|
|
248
|
+
const apiReferenceLink = "";
|
|
249
|
+
const pathParams = {
|
|
250
|
+
"{redisClusterId}": changeRedisClusterCompartmentRequest.redisClusterId
|
|
251
|
+
};
|
|
252
|
+
const queryParams = {};
|
|
253
|
+
let headerParams = {
|
|
254
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
255
|
+
"if-match": changeRedisClusterCompartmentRequest.ifMatch,
|
|
256
|
+
"opc-retry-token": changeRedisClusterCompartmentRequest.opcRetryToken,
|
|
257
|
+
"opc-request-id": changeRedisClusterCompartmentRequest.opcRequestId
|
|
258
|
+
};
|
|
259
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
260
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, changeRedisClusterCompartmentRequest.retryConfiguration, specRetryConfiguration);
|
|
261
|
+
if (this.logger)
|
|
262
|
+
retrier.logger = this.logger;
|
|
263
|
+
const request = yield oci_common_1.composeRequest({
|
|
264
|
+
baseEndpoint: this._endpoint,
|
|
265
|
+
defaultHeaders: this._defaultHeaders,
|
|
266
|
+
path: "/redisClusters/{redisClusterId}/actions/changeCompartment",
|
|
267
|
+
method: "POST",
|
|
268
|
+
bodyContent: common.ObjectSerializer.serialize(changeRedisClusterCompartmentRequest.changeRedisClusterCompartmentDetails, "ChangeRedisClusterCompartmentDetails", model.ChangeRedisClusterCompartmentDetails.getJsonObj),
|
|
269
|
+
pathParams: pathParams,
|
|
270
|
+
headerParams: headerParams,
|
|
271
|
+
queryParams: queryParams
|
|
272
|
+
});
|
|
273
|
+
try {
|
|
274
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
275
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
276
|
+
responseObject: {},
|
|
277
|
+
responseHeaders: [
|
|
278
|
+
{
|
|
279
|
+
value: response.headers.get("opc-work-request-id"),
|
|
280
|
+
key: "opcWorkRequestId",
|
|
281
|
+
dataType: "string"
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
value: response.headers.get("opc-request-id"),
|
|
285
|
+
key: "opcRequestId",
|
|
286
|
+
dataType: "string"
|
|
287
|
+
}
|
|
288
|
+
]
|
|
289
|
+
});
|
|
290
|
+
return sdkResponse;
|
|
291
|
+
}
|
|
292
|
+
catch (err) {
|
|
293
|
+
throw err;
|
|
294
|
+
}
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* Creates a new Redis cluster. A Redis cluster is a memory-based storage solution. For more information, see [OCI Caching Service with Redis](https://docs.cloud.oracle.com/iaas/Content/redis/home.htm).
|
|
299
|
+
*
|
|
300
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
301
|
+
* @param CreateRedisClusterRequest
|
|
302
|
+
* @return CreateRedisClusterResponse
|
|
303
|
+
* @throws OciError when an error occurs
|
|
304
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.71.0/redis/CreateRedisCluster.ts.html |here} to see how to use CreateRedisCluster API.
|
|
305
|
+
*/
|
|
306
|
+
createRedisCluster(createRedisClusterRequest) {
|
|
307
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
308
|
+
if (this.logger)
|
|
309
|
+
this.logger.debug("Calling operation RedisClusterClient#createRedisCluster.");
|
|
310
|
+
const operationName = "createRedisCluster";
|
|
311
|
+
const apiReferenceLink = "";
|
|
312
|
+
const pathParams = {};
|
|
313
|
+
const queryParams = {};
|
|
314
|
+
let headerParams = {
|
|
315
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
316
|
+
"opc-retry-token": createRedisClusterRequest.opcRetryToken,
|
|
317
|
+
"opc-request-id": createRedisClusterRequest.opcRequestId
|
|
318
|
+
};
|
|
319
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
320
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, createRedisClusterRequest.retryConfiguration, specRetryConfiguration);
|
|
321
|
+
if (this.logger)
|
|
322
|
+
retrier.logger = this.logger;
|
|
323
|
+
const request = yield oci_common_1.composeRequest({
|
|
324
|
+
baseEndpoint: this._endpoint,
|
|
325
|
+
defaultHeaders: this._defaultHeaders,
|
|
326
|
+
path: "/redisClusters",
|
|
327
|
+
method: "POST",
|
|
328
|
+
bodyContent: common.ObjectSerializer.serialize(createRedisClusterRequest.createRedisClusterDetails, "CreateRedisClusterDetails", model.CreateRedisClusterDetails.getJsonObj),
|
|
329
|
+
pathParams: pathParams,
|
|
330
|
+
headerParams: headerParams,
|
|
331
|
+
queryParams: queryParams
|
|
332
|
+
});
|
|
333
|
+
try {
|
|
334
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
335
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
336
|
+
responseObject: {},
|
|
337
|
+
body: yield response.json(),
|
|
338
|
+
bodyKey: "redisCluster",
|
|
339
|
+
bodyModel: model.RedisCluster,
|
|
340
|
+
type: "model.RedisCluster",
|
|
341
|
+
responseHeaders: [
|
|
342
|
+
{
|
|
343
|
+
value: response.headers.get("etag"),
|
|
344
|
+
key: "etag",
|
|
345
|
+
dataType: "string"
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
value: response.headers.get("opc-work-request-id"),
|
|
349
|
+
key: "opcWorkRequestId",
|
|
350
|
+
dataType: "string"
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
value: response.headers.get("opc-request-id"),
|
|
354
|
+
key: "opcRequestId",
|
|
355
|
+
dataType: "string"
|
|
356
|
+
}
|
|
357
|
+
]
|
|
358
|
+
});
|
|
359
|
+
return sdkResponse;
|
|
360
|
+
}
|
|
361
|
+
catch (err) {
|
|
362
|
+
throw err;
|
|
363
|
+
}
|
|
364
|
+
});
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* Deletes the specified Redis cluster. A Redis cluster is a memory-based storage solution. For more information, see [OCI Caching Service with Redis](https://docs.cloud.oracle.com/iaas/Content/redis/home.htm).
|
|
368
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
369
|
+
* @param DeleteRedisClusterRequest
|
|
370
|
+
* @return DeleteRedisClusterResponse
|
|
371
|
+
* @throws OciError when an error occurs
|
|
372
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.71.0/redis/DeleteRedisCluster.ts.html |here} to see how to use DeleteRedisCluster API.
|
|
373
|
+
*/
|
|
374
|
+
deleteRedisCluster(deleteRedisClusterRequest) {
|
|
375
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
376
|
+
if (this.logger)
|
|
377
|
+
this.logger.debug("Calling operation RedisClusterClient#deleteRedisCluster.");
|
|
378
|
+
const operationName = "deleteRedisCluster";
|
|
379
|
+
const apiReferenceLink = "";
|
|
380
|
+
const pathParams = {
|
|
381
|
+
"{redisClusterId}": deleteRedisClusterRequest.redisClusterId
|
|
382
|
+
};
|
|
383
|
+
const queryParams = {};
|
|
384
|
+
let headerParams = {
|
|
385
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
386
|
+
"if-match": deleteRedisClusterRequest.ifMatch,
|
|
387
|
+
"opc-request-id": deleteRedisClusterRequest.opcRequestId
|
|
388
|
+
};
|
|
389
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
390
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, deleteRedisClusterRequest.retryConfiguration, specRetryConfiguration);
|
|
391
|
+
if (this.logger)
|
|
392
|
+
retrier.logger = this.logger;
|
|
393
|
+
const request = yield oci_common_1.composeRequest({
|
|
394
|
+
baseEndpoint: this._endpoint,
|
|
395
|
+
defaultHeaders: this._defaultHeaders,
|
|
396
|
+
path: "/redisClusters/{redisClusterId}",
|
|
397
|
+
method: "DELETE",
|
|
398
|
+
pathParams: pathParams,
|
|
399
|
+
headerParams: headerParams,
|
|
400
|
+
queryParams: queryParams
|
|
401
|
+
});
|
|
402
|
+
try {
|
|
403
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
404
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
405
|
+
responseObject: {},
|
|
406
|
+
responseHeaders: [
|
|
407
|
+
{
|
|
408
|
+
value: response.headers.get("opc-work-request-id"),
|
|
409
|
+
key: "opcWorkRequestId",
|
|
410
|
+
dataType: "string"
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
value: response.headers.get("opc-request-id"),
|
|
414
|
+
key: "opcRequestId",
|
|
415
|
+
dataType: "string"
|
|
416
|
+
}
|
|
417
|
+
]
|
|
418
|
+
});
|
|
419
|
+
return sdkResponse;
|
|
420
|
+
}
|
|
421
|
+
catch (err) {
|
|
422
|
+
throw err;
|
|
423
|
+
}
|
|
424
|
+
});
|
|
425
|
+
}
|
|
426
|
+
/**
|
|
427
|
+
* Retrieves the specified Redis cluster. A Redis cluster is a memory-based storage solution. For more information, see [OCI Caching Service with Redis](https://docs.cloud.oracle.com/iaas/Content/redis/home.htm).
|
|
428
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
429
|
+
* @param GetRedisClusterRequest
|
|
430
|
+
* @return GetRedisClusterResponse
|
|
431
|
+
* @throws OciError when an error occurs
|
|
432
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.71.0/redis/GetRedisCluster.ts.html |here} to see how to use GetRedisCluster API.
|
|
433
|
+
*/
|
|
434
|
+
getRedisCluster(getRedisClusterRequest) {
|
|
435
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
436
|
+
if (this.logger)
|
|
437
|
+
this.logger.debug("Calling operation RedisClusterClient#getRedisCluster.");
|
|
438
|
+
const operationName = "getRedisCluster";
|
|
439
|
+
const apiReferenceLink = "";
|
|
440
|
+
const pathParams = {
|
|
441
|
+
"{redisClusterId}": getRedisClusterRequest.redisClusterId
|
|
442
|
+
};
|
|
443
|
+
const queryParams = {};
|
|
444
|
+
let headerParams = {
|
|
445
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
446
|
+
"opc-request-id": getRedisClusterRequest.opcRequestId
|
|
447
|
+
};
|
|
448
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
449
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getRedisClusterRequest.retryConfiguration, specRetryConfiguration);
|
|
450
|
+
if (this.logger)
|
|
451
|
+
retrier.logger = this.logger;
|
|
452
|
+
const request = yield oci_common_1.composeRequest({
|
|
453
|
+
baseEndpoint: this._endpoint,
|
|
454
|
+
defaultHeaders: this._defaultHeaders,
|
|
455
|
+
path: "/redisClusters/{redisClusterId}",
|
|
456
|
+
method: "GET",
|
|
457
|
+
pathParams: pathParams,
|
|
458
|
+
headerParams: headerParams,
|
|
459
|
+
queryParams: queryParams
|
|
460
|
+
});
|
|
461
|
+
try {
|
|
462
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
463
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
464
|
+
responseObject: {},
|
|
465
|
+
body: yield response.json(),
|
|
466
|
+
bodyKey: "redisCluster",
|
|
467
|
+
bodyModel: model.RedisCluster,
|
|
468
|
+
type: "model.RedisCluster",
|
|
469
|
+
responseHeaders: [
|
|
470
|
+
{
|
|
471
|
+
value: response.headers.get("etag"),
|
|
472
|
+
key: "etag",
|
|
473
|
+
dataType: "string"
|
|
474
|
+
},
|
|
475
|
+
{
|
|
476
|
+
value: response.headers.get("opc-request-id"),
|
|
477
|
+
key: "opcRequestId",
|
|
478
|
+
dataType: "string"
|
|
479
|
+
}
|
|
480
|
+
]
|
|
481
|
+
});
|
|
482
|
+
return sdkResponse;
|
|
483
|
+
}
|
|
484
|
+
catch (err) {
|
|
485
|
+
throw err;
|
|
486
|
+
}
|
|
487
|
+
});
|
|
488
|
+
}
|
|
489
|
+
/**
|
|
490
|
+
* Gets the status of the work request with the given ID.
|
|
491
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
492
|
+
* @param GetWorkRequestRequest
|
|
493
|
+
* @return GetWorkRequestResponse
|
|
494
|
+
* @throws OciError when an error occurs
|
|
495
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.71.0/redis/GetWorkRequest.ts.html |here} to see how to use GetWorkRequest API.
|
|
496
|
+
*/
|
|
497
|
+
getWorkRequest(getWorkRequestRequest) {
|
|
498
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
499
|
+
if (this.logger)
|
|
500
|
+
this.logger.debug("Calling operation RedisClusterClient#getWorkRequest.");
|
|
501
|
+
const operationName = "getWorkRequest";
|
|
502
|
+
const apiReferenceLink = "";
|
|
503
|
+
const pathParams = {
|
|
504
|
+
"{workRequestId}": getWorkRequestRequest.workRequestId
|
|
505
|
+
};
|
|
506
|
+
const queryParams = {};
|
|
507
|
+
let headerParams = {
|
|
508
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
509
|
+
"opc-request-id": getWorkRequestRequest.opcRequestId
|
|
510
|
+
};
|
|
511
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
512
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getWorkRequestRequest.retryConfiguration, specRetryConfiguration);
|
|
513
|
+
if (this.logger)
|
|
514
|
+
retrier.logger = this.logger;
|
|
515
|
+
const request = yield oci_common_1.composeRequest({
|
|
516
|
+
baseEndpoint: this._endpoint,
|
|
517
|
+
defaultHeaders: this._defaultHeaders,
|
|
518
|
+
path: "/workRequests/{workRequestId}",
|
|
519
|
+
method: "GET",
|
|
520
|
+
pathParams: pathParams,
|
|
521
|
+
headerParams: headerParams,
|
|
522
|
+
queryParams: queryParams
|
|
523
|
+
});
|
|
524
|
+
try {
|
|
525
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
526
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
527
|
+
responseObject: {},
|
|
528
|
+
body: yield response.json(),
|
|
529
|
+
bodyKey: "workRequest",
|
|
530
|
+
bodyModel: model.WorkRequest,
|
|
531
|
+
type: "model.WorkRequest",
|
|
532
|
+
responseHeaders: [
|
|
533
|
+
{
|
|
534
|
+
value: response.headers.get("etag"),
|
|
535
|
+
key: "etag",
|
|
536
|
+
dataType: "string"
|
|
537
|
+
},
|
|
538
|
+
{
|
|
539
|
+
value: response.headers.get("opc-request-id"),
|
|
540
|
+
key: "opcRequestId",
|
|
541
|
+
dataType: "string"
|
|
542
|
+
},
|
|
543
|
+
{
|
|
544
|
+
value: response.headers.get("retry-after"),
|
|
545
|
+
key: "retryAfter",
|
|
546
|
+
dataType: "number"
|
|
547
|
+
}
|
|
548
|
+
]
|
|
549
|
+
});
|
|
550
|
+
return sdkResponse;
|
|
551
|
+
}
|
|
552
|
+
catch (err) {
|
|
553
|
+
throw err;
|
|
554
|
+
}
|
|
555
|
+
});
|
|
556
|
+
}
|
|
557
|
+
/**
|
|
558
|
+
* Lists the Redis clusters in the specified compartment. A Redis cluster is a memory-based storage solution. For more information, see [OCI Caching Service with Redis](https://docs.cloud.oracle.com/iaas/Content/redis/home.htm).
|
|
559
|
+
*
|
|
560
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
561
|
+
* @param ListRedisClustersRequest
|
|
562
|
+
* @return ListRedisClustersResponse
|
|
563
|
+
* @throws OciError when an error occurs
|
|
564
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.71.0/redis/ListRedisClusters.ts.html |here} to see how to use ListRedisClusters API.
|
|
565
|
+
*/
|
|
566
|
+
listRedisClusters(listRedisClustersRequest) {
|
|
567
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
568
|
+
if (this.logger)
|
|
569
|
+
this.logger.debug("Calling operation RedisClusterClient#listRedisClusters.");
|
|
570
|
+
const operationName = "listRedisClusters";
|
|
571
|
+
const apiReferenceLink = "";
|
|
572
|
+
const pathParams = {};
|
|
573
|
+
const queryParams = {
|
|
574
|
+
"compartmentId": listRedisClustersRequest.compartmentId,
|
|
575
|
+
"lifecycleState": listRedisClustersRequest.lifecycleState,
|
|
576
|
+
"displayName": listRedisClustersRequest.displayName,
|
|
577
|
+
"id": listRedisClustersRequest.id,
|
|
578
|
+
"limit": listRedisClustersRequest.limit,
|
|
579
|
+
"page": listRedisClustersRequest.page,
|
|
580
|
+
"sortOrder": listRedisClustersRequest.sortOrder,
|
|
581
|
+
"sortBy": listRedisClustersRequest.sortBy
|
|
582
|
+
};
|
|
583
|
+
let headerParams = {
|
|
584
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
585
|
+
"opc-request-id": listRedisClustersRequest.opcRequestId
|
|
586
|
+
};
|
|
587
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
588
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listRedisClustersRequest.retryConfiguration, specRetryConfiguration);
|
|
589
|
+
if (this.logger)
|
|
590
|
+
retrier.logger = this.logger;
|
|
591
|
+
const request = yield oci_common_1.composeRequest({
|
|
592
|
+
baseEndpoint: this._endpoint,
|
|
593
|
+
defaultHeaders: this._defaultHeaders,
|
|
594
|
+
path: "/redisClusters",
|
|
595
|
+
method: "GET",
|
|
596
|
+
pathParams: pathParams,
|
|
597
|
+
headerParams: headerParams,
|
|
598
|
+
queryParams: queryParams
|
|
599
|
+
});
|
|
600
|
+
try {
|
|
601
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
602
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
603
|
+
responseObject: {},
|
|
604
|
+
body: yield response.json(),
|
|
605
|
+
bodyKey: "redisClusterCollection",
|
|
606
|
+
bodyModel: model.RedisClusterCollection,
|
|
607
|
+
type: "model.RedisClusterCollection",
|
|
608
|
+
responseHeaders: [
|
|
609
|
+
{
|
|
610
|
+
value: response.headers.get("opc-request-id"),
|
|
611
|
+
key: "opcRequestId",
|
|
612
|
+
dataType: "string"
|
|
613
|
+
},
|
|
614
|
+
{
|
|
615
|
+
value: response.headers.get("opc-next-page"),
|
|
616
|
+
key: "opcNextPage",
|
|
617
|
+
dataType: "string"
|
|
618
|
+
}
|
|
619
|
+
]
|
|
620
|
+
});
|
|
621
|
+
return sdkResponse;
|
|
622
|
+
}
|
|
623
|
+
catch (err) {
|
|
624
|
+
throw err;
|
|
625
|
+
}
|
|
626
|
+
});
|
|
627
|
+
}
|
|
628
|
+
/**
|
|
629
|
+
* Returns a list of errors for a given work request.
|
|
630
|
+
*
|
|
631
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
632
|
+
* @param ListWorkRequestErrorsRequest
|
|
633
|
+
* @return ListWorkRequestErrorsResponse
|
|
634
|
+
* @throws OciError when an error occurs
|
|
635
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.71.0/redis/ListWorkRequestErrors.ts.html |here} to see how to use ListWorkRequestErrors API.
|
|
636
|
+
*/
|
|
637
|
+
listWorkRequestErrors(listWorkRequestErrorsRequest) {
|
|
638
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
639
|
+
if (this.logger)
|
|
640
|
+
this.logger.debug("Calling operation RedisClusterClient#listWorkRequestErrors.");
|
|
641
|
+
const operationName = "listWorkRequestErrors";
|
|
642
|
+
const apiReferenceLink = "";
|
|
643
|
+
const pathParams = {
|
|
644
|
+
"{workRequestId}": listWorkRequestErrorsRequest.workRequestId
|
|
645
|
+
};
|
|
646
|
+
const queryParams = {
|
|
647
|
+
"page": listWorkRequestErrorsRequest.page,
|
|
648
|
+
"limit": listWorkRequestErrorsRequest.limit,
|
|
649
|
+
"sortBy": listWorkRequestErrorsRequest.sortBy,
|
|
650
|
+
"sortOrder": listWorkRequestErrorsRequest.sortOrder
|
|
651
|
+
};
|
|
652
|
+
let headerParams = {
|
|
653
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
654
|
+
"opc-request-id": listWorkRequestErrorsRequest.opcRequestId
|
|
655
|
+
};
|
|
656
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
657
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listWorkRequestErrorsRequest.retryConfiguration, specRetryConfiguration);
|
|
658
|
+
if (this.logger)
|
|
659
|
+
retrier.logger = this.logger;
|
|
660
|
+
const request = yield oci_common_1.composeRequest({
|
|
661
|
+
baseEndpoint: this._endpoint,
|
|
662
|
+
defaultHeaders: this._defaultHeaders,
|
|
663
|
+
path: "/workRequests/{workRequestId}/errors",
|
|
664
|
+
method: "GET",
|
|
665
|
+
pathParams: pathParams,
|
|
666
|
+
headerParams: headerParams,
|
|
667
|
+
queryParams: queryParams
|
|
668
|
+
});
|
|
669
|
+
try {
|
|
670
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
671
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
672
|
+
responseObject: {},
|
|
673
|
+
body: yield response.json(),
|
|
674
|
+
bodyKey: "workRequestErrorCollection",
|
|
675
|
+
bodyModel: model.WorkRequestErrorCollection,
|
|
676
|
+
type: "model.WorkRequestErrorCollection",
|
|
677
|
+
responseHeaders: [
|
|
678
|
+
{
|
|
679
|
+
value: response.headers.get("opc-next-page"),
|
|
680
|
+
key: "opcNextPage",
|
|
681
|
+
dataType: "string"
|
|
682
|
+
},
|
|
683
|
+
{
|
|
684
|
+
value: response.headers.get("opc-request-id"),
|
|
685
|
+
key: "opcRequestId",
|
|
686
|
+
dataType: "string"
|
|
687
|
+
}
|
|
688
|
+
]
|
|
689
|
+
});
|
|
690
|
+
return sdkResponse;
|
|
691
|
+
}
|
|
692
|
+
catch (err) {
|
|
693
|
+
throw err;
|
|
694
|
+
}
|
|
695
|
+
});
|
|
696
|
+
}
|
|
697
|
+
/**
|
|
698
|
+
* Returns a list of logs for a given work request.
|
|
699
|
+
*
|
|
700
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
701
|
+
* @param ListWorkRequestLogsRequest
|
|
702
|
+
* @return ListWorkRequestLogsResponse
|
|
703
|
+
* @throws OciError when an error occurs
|
|
704
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.71.0/redis/ListWorkRequestLogs.ts.html |here} to see how to use ListWorkRequestLogs API.
|
|
705
|
+
*/
|
|
706
|
+
listWorkRequestLogs(listWorkRequestLogsRequest) {
|
|
707
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
708
|
+
if (this.logger)
|
|
709
|
+
this.logger.debug("Calling operation RedisClusterClient#listWorkRequestLogs.");
|
|
710
|
+
const operationName = "listWorkRequestLogs";
|
|
711
|
+
const apiReferenceLink = "";
|
|
712
|
+
const pathParams = {
|
|
713
|
+
"{workRequestId}": listWorkRequestLogsRequest.workRequestId
|
|
714
|
+
};
|
|
715
|
+
const queryParams = {
|
|
716
|
+
"page": listWorkRequestLogsRequest.page,
|
|
717
|
+
"limit": listWorkRequestLogsRequest.limit,
|
|
718
|
+
"sortBy": listWorkRequestLogsRequest.sortBy,
|
|
719
|
+
"sortOrder": listWorkRequestLogsRequest.sortOrder
|
|
720
|
+
};
|
|
721
|
+
let headerParams = {
|
|
722
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
723
|
+
"opc-request-id": listWorkRequestLogsRequest.opcRequestId
|
|
724
|
+
};
|
|
725
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
726
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listWorkRequestLogsRequest.retryConfiguration, specRetryConfiguration);
|
|
727
|
+
if (this.logger)
|
|
728
|
+
retrier.logger = this.logger;
|
|
729
|
+
const request = yield oci_common_1.composeRequest({
|
|
730
|
+
baseEndpoint: this._endpoint,
|
|
731
|
+
defaultHeaders: this._defaultHeaders,
|
|
732
|
+
path: "/workRequests/{workRequestId}/logs",
|
|
733
|
+
method: "GET",
|
|
734
|
+
pathParams: pathParams,
|
|
735
|
+
headerParams: headerParams,
|
|
736
|
+
queryParams: queryParams
|
|
737
|
+
});
|
|
738
|
+
try {
|
|
739
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
740
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
741
|
+
responseObject: {},
|
|
742
|
+
body: yield response.json(),
|
|
743
|
+
bodyKey: "workRequestLogEntryCollection",
|
|
744
|
+
bodyModel: model.WorkRequestLogEntryCollection,
|
|
745
|
+
type: "model.WorkRequestLogEntryCollection",
|
|
746
|
+
responseHeaders: [
|
|
747
|
+
{
|
|
748
|
+
value: response.headers.get("opc-next-page"),
|
|
749
|
+
key: "opcNextPage",
|
|
750
|
+
dataType: "string"
|
|
751
|
+
},
|
|
752
|
+
{
|
|
753
|
+
value: response.headers.get("opc-request-id"),
|
|
754
|
+
key: "opcRequestId",
|
|
755
|
+
dataType: "string"
|
|
756
|
+
}
|
|
757
|
+
]
|
|
758
|
+
});
|
|
759
|
+
return sdkResponse;
|
|
760
|
+
}
|
|
761
|
+
catch (err) {
|
|
762
|
+
throw err;
|
|
763
|
+
}
|
|
764
|
+
});
|
|
765
|
+
}
|
|
766
|
+
/**
|
|
767
|
+
* Lists the work requests in a compartment.
|
|
768
|
+
*
|
|
769
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
770
|
+
* @param ListWorkRequestsRequest
|
|
771
|
+
* @return ListWorkRequestsResponse
|
|
772
|
+
* @throws OciError when an error occurs
|
|
773
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.71.0/redis/ListWorkRequests.ts.html |here} to see how to use ListWorkRequests API.
|
|
774
|
+
*/
|
|
775
|
+
listWorkRequests(listWorkRequestsRequest) {
|
|
776
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
777
|
+
if (this.logger)
|
|
778
|
+
this.logger.debug("Calling operation RedisClusterClient#listWorkRequests.");
|
|
779
|
+
const operationName = "listWorkRequests";
|
|
780
|
+
const apiReferenceLink = "";
|
|
781
|
+
const pathParams = {};
|
|
782
|
+
const queryParams = {
|
|
783
|
+
"compartmentId": listWorkRequestsRequest.compartmentId,
|
|
784
|
+
"workRequestId": listWorkRequestsRequest.workRequestId,
|
|
785
|
+
"status": listWorkRequestsRequest.status,
|
|
786
|
+
"resourceId": listWorkRequestsRequest.resourceId,
|
|
787
|
+
"page": listWorkRequestsRequest.page,
|
|
788
|
+
"limit": listWorkRequestsRequest.limit,
|
|
789
|
+
"sortOrder": listWorkRequestsRequest.sortOrder,
|
|
790
|
+
"sortBy": listWorkRequestsRequest.sortBy
|
|
791
|
+
};
|
|
792
|
+
let headerParams = {
|
|
793
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
794
|
+
"opc-request-id": listWorkRequestsRequest.opcRequestId
|
|
795
|
+
};
|
|
796
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
797
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listWorkRequestsRequest.retryConfiguration, specRetryConfiguration);
|
|
798
|
+
if (this.logger)
|
|
799
|
+
retrier.logger = this.logger;
|
|
800
|
+
const request = yield oci_common_1.composeRequest({
|
|
801
|
+
baseEndpoint: this._endpoint,
|
|
802
|
+
defaultHeaders: this._defaultHeaders,
|
|
803
|
+
path: "/workRequests",
|
|
804
|
+
method: "GET",
|
|
805
|
+
pathParams: pathParams,
|
|
806
|
+
headerParams: headerParams,
|
|
807
|
+
queryParams: queryParams
|
|
808
|
+
});
|
|
809
|
+
try {
|
|
810
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
811
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
812
|
+
responseObject: {},
|
|
813
|
+
body: yield response.json(),
|
|
814
|
+
bodyKey: "workRequestSummaryCollection",
|
|
815
|
+
bodyModel: model.WorkRequestSummaryCollection,
|
|
816
|
+
type: "model.WorkRequestSummaryCollection",
|
|
817
|
+
responseHeaders: [
|
|
818
|
+
{
|
|
819
|
+
value: response.headers.get("opc-request-id"),
|
|
820
|
+
key: "opcRequestId",
|
|
821
|
+
dataType: "string"
|
|
822
|
+
},
|
|
823
|
+
{
|
|
824
|
+
value: response.headers.get("opc-next-page"),
|
|
825
|
+
key: "opcNextPage",
|
|
826
|
+
dataType: "string"
|
|
827
|
+
}
|
|
828
|
+
]
|
|
829
|
+
});
|
|
830
|
+
return sdkResponse;
|
|
831
|
+
}
|
|
832
|
+
catch (err) {
|
|
833
|
+
throw err;
|
|
834
|
+
}
|
|
835
|
+
});
|
|
836
|
+
}
|
|
837
|
+
/**
|
|
838
|
+
* Updates the specified Redis cluster. A Redis cluster is a memory-based storage solution. For more information, see [OCI Caching Service with Redis](https://docs.cloud.oracle.com/iaas/Content/redis/home.htm).
|
|
839
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
840
|
+
* @param UpdateRedisClusterRequest
|
|
841
|
+
* @return UpdateRedisClusterResponse
|
|
842
|
+
* @throws OciError when an error occurs
|
|
843
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.71.0/redis/UpdateRedisCluster.ts.html |here} to see how to use UpdateRedisCluster API.
|
|
844
|
+
*/
|
|
845
|
+
updateRedisCluster(updateRedisClusterRequest) {
|
|
846
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
847
|
+
if (this.logger)
|
|
848
|
+
this.logger.debug("Calling operation RedisClusterClient#updateRedisCluster.");
|
|
849
|
+
const operationName = "updateRedisCluster";
|
|
850
|
+
const apiReferenceLink = "";
|
|
851
|
+
const pathParams = {
|
|
852
|
+
"{redisClusterId}": updateRedisClusterRequest.redisClusterId
|
|
853
|
+
};
|
|
854
|
+
const queryParams = {};
|
|
855
|
+
let headerParams = {
|
|
856
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
857
|
+
"if-match": updateRedisClusterRequest.ifMatch,
|
|
858
|
+
"opc-request-id": updateRedisClusterRequest.opcRequestId
|
|
859
|
+
};
|
|
860
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
861
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, updateRedisClusterRequest.retryConfiguration, specRetryConfiguration);
|
|
862
|
+
if (this.logger)
|
|
863
|
+
retrier.logger = this.logger;
|
|
864
|
+
const request = yield oci_common_1.composeRequest({
|
|
865
|
+
baseEndpoint: this._endpoint,
|
|
866
|
+
defaultHeaders: this._defaultHeaders,
|
|
867
|
+
path: "/redisClusters/{redisClusterId}",
|
|
868
|
+
method: "PUT",
|
|
869
|
+
bodyContent: common.ObjectSerializer.serialize(updateRedisClusterRequest.updateRedisClusterDetails, "UpdateRedisClusterDetails", model.UpdateRedisClusterDetails.getJsonObj),
|
|
870
|
+
pathParams: pathParams,
|
|
871
|
+
headerParams: headerParams,
|
|
872
|
+
queryParams: queryParams
|
|
873
|
+
});
|
|
874
|
+
try {
|
|
875
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
876
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
877
|
+
responseObject: {},
|
|
878
|
+
responseHeaders: [
|
|
879
|
+
{
|
|
880
|
+
value: response.headers.get("opc-work-request-id"),
|
|
881
|
+
key: "opcWorkRequestId",
|
|
882
|
+
dataType: "string"
|
|
883
|
+
},
|
|
884
|
+
{
|
|
885
|
+
value: response.headers.get("opc-request-id"),
|
|
886
|
+
key: "opcRequestId",
|
|
887
|
+
dataType: "string"
|
|
888
|
+
}
|
|
889
|
+
]
|
|
890
|
+
});
|
|
891
|
+
return sdkResponse;
|
|
892
|
+
}
|
|
893
|
+
catch (err) {
|
|
894
|
+
throw err;
|
|
895
|
+
}
|
|
896
|
+
});
|
|
897
|
+
}
|
|
898
|
+
}
|
|
899
|
+
exports.RedisClusterClient = RedisClusterClient;
|
|
900
|
+
RedisClusterClient.serviceEndpointTemplate = "https://redis.{region}.oci.{secondLevelDomain}";
|
|
901
|
+
RedisClusterClient.endpointServiceName = "";
|
|
902
|
+
//# sourceMappingURL=client.js.map
|