oci-redis 2.114.0 → 2.115.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/index.d.ts +6 -0
- package/index.js +7 -1
- package/index.js.map +1 -1
- package/lib/client.d.ts +246 -0
- package/lib/client.js +919 -1
- package/lib/client.js.map +1 -1
- package/lib/model/associated-oci-cache-cluster-collection.d.ts +26 -0
- package/lib/model/associated-oci-cache-cluster-collection.js +61 -0
- package/lib/model/associated-oci-cache-cluster-collection.js.map +1 -0
- package/lib/model/associated-oci-cache-cluster-summary.d.ts +26 -0
- package/lib/model/associated-oci-cache-cluster-summary.js +29 -0
- package/lib/model/associated-oci-cache-cluster-summary.js.map +1 -0
- package/lib/model/change-oci-cache-config-set-compartment-details.d.ts +27 -0
- package/lib/model/change-oci-cache-config-set-compartment-details.js +29 -0
- package/lib/model/change-oci-cache-config-set-compartment-details.js.map +1 -0
- package/lib/model/configuration-details.d.ts +26 -0
- package/lib/model/configuration-details.js +61 -0
- package/lib/model/configuration-details.js.map +1 -0
- package/lib/model/configuration-info.d.ts +31 -0
- package/lib/model/configuration-info.js +29 -0
- package/lib/model/configuration-info.js.map +1 -0
- package/lib/model/create-oci-cache-config-set-details.d.ts +57 -0
- package/lib/model/create-oci-cache-config-set-details.js +57 -0
- package/lib/model/create-oci-cache-config-set-details.js.map +1 -0
- package/lib/model/create-redis-cluster-details.d.ts +4 -0
- package/lib/model/create-redis-cluster-details.js.map +1 -1
- package/lib/model/default-configuration-details.d.ts +26 -0
- package/lib/model/default-configuration-details.js +61 -0
- package/lib/model/default-configuration-details.js.map +1 -0
- package/lib/model/default-configuration-info.d.ts +45 -0
- package/lib/model/default-configuration-info.js +29 -0
- package/lib/model/default-configuration-info.js.map +1 -0
- package/lib/model/index.d.ts +30 -0
- package/lib/model/index.js +32 -1
- package/lib/model/index.js.map +1 -1
- package/lib/model/oci-cache-config-set-collection.d.ts +26 -0
- package/lib/model/oci-cache-config-set-collection.js +61 -0
- package/lib/model/oci-cache-config-set-collection.js.map +1 -0
- package/lib/model/oci-cache-config-set-summary.d.ts +81 -0
- package/lib/model/oci-cache-config-set-summary.js +29 -0
- package/lib/model/oci-cache-config-set-summary.js.map +1 -0
- package/lib/model/oci-cache-config-set.d.ts +110 -0
- package/lib/model/oci-cache-config-set.js +82 -0
- package/lib/model/oci-cache-config-set.js.map +1 -0
- package/lib/model/oci-cache-default-config-set-collection.d.ts +26 -0
- package/lib/model/oci-cache-default-config-set-collection.js +61 -0
- package/lib/model/oci-cache-default-config-set-collection.js.map +1 -0
- package/lib/model/oci-cache-default-config-set-summary.d.ts +41 -0
- package/lib/model/oci-cache-default-config-set-summary.js +29 -0
- package/lib/model/oci-cache-default-config-set-summary.js.map +1 -0
- package/lib/model/oci-cache-default-config-set.d.ts +56 -0
- package/lib/model/oci-cache-default-config-set.js +67 -0
- package/lib/model/oci-cache-default-config-set.js.map +1 -0
- package/lib/model/redis-cluster-summary.d.ts +4 -0
- package/lib/model/redis-cluster-summary.js.map +1 -1
- package/lib/model/redis-cluster.d.ts +4 -0
- package/lib/model/redis-cluster.js.map +1 -1
- package/lib/model/update-oci-cache-config-set-details.d.ts +47 -0
- package/lib/model/update-oci-cache-config-set-details.js +29 -0
- package/lib/model/update-oci-cache-config-set-details.js.map +1 -0
- package/lib/model/update-redis-cluster-details.d.ts +4 -0
- package/lib/model/update-redis-cluster-details.js.map +1 -1
- package/lib/ocicacheconfigset-waiter.d.ts +29 -0
- package/lib/ocicacheconfigset-waiter.js +65 -0
- package/lib/ocicacheconfigset-waiter.js.map +1 -0
- package/lib/ocicachedefaultconfigset-waiter.d.ts +29 -0
- package/lib/ocicachedefaultconfigset-waiter.js +45 -0
- package/lib/ocicachedefaultconfigset-waiter.js.map +1 -0
- package/lib/request/change-oci-cache-config-set-compartment-request.d.ts +49 -0
- package/lib/request/change-oci-cache-config-set-compartment-request.js +15 -0
- package/lib/request/change-oci-cache-config-set-compartment-request.js.map +1 -0
- package/lib/request/create-oci-cache-config-set-request.d.ts +36 -0
- package/lib/request/create-oci-cache-config-set-request.js +15 -0
- package/lib/request/create-oci-cache-config-set-request.js.map +1 -0
- package/lib/request/delete-oci-cache-config-set-request.d.ts +35 -0
- package/lib/request/delete-oci-cache-config-set-request.js +15 -0
- package/lib/request/delete-oci-cache-config-set-request.js.map +1 -0
- package/lib/request/get-oci-cache-config-set-request.d.ts +26 -0
- package/lib/request/get-oci-cache-config-set-request.js +15 -0
- package/lib/request/get-oci-cache-config-set-request.js.map +1 -0
- package/lib/request/get-oci-cache-default-config-set-request.d.ts +30 -0
- package/lib/request/get-oci-cache-default-config-set-request.js +15 -0
- package/lib/request/get-oci-cache-default-config-set-request.js.map +1 -0
- package/lib/request/index.d.ts +18 -0
- package/lib/request/index.js +7 -1
- package/lib/request/index.js.map +1 -1
- package/lib/request/list-associated-oci-cache-clusters-request.d.ts +50 -0
- package/lib/request/list-associated-oci-cache-clusters-request.js +24 -0
- package/lib/request/list-associated-oci-cache-clusters-request.js.map +1 -0
- package/lib/request/list-oci-cache-config-sets-request.d.ts +66 -0
- package/lib/request/list-oci-cache-config-sets-request.js +24 -0
- package/lib/request/list-oci-cache-config-sets-request.js.map +1 -0
- package/lib/request/list-oci-cache-default-config-sets-request.d.ts +66 -0
- package/lib/request/list-oci-cache-default-config-sets-request.js +24 -0
- package/lib/request/list-oci-cache-default-config-sets-request.js.map +1 -0
- package/lib/request/update-oci-cache-config-set-request.d.ts +40 -0
- package/lib/request/update-oci-cache-config-set-request.js +15 -0
- package/lib/request/update-oci-cache-config-set-request.js.map +1 -0
- package/lib/response/change-oci-cache-config-set-compartment-response.d.ts +25 -0
- package/lib/response/change-oci-cache-config-set-compartment-response.js +15 -0
- package/lib/response/change-oci-cache-config-set-compartment-response.js.map +1 -0
- package/lib/response/create-oci-cache-config-set-response.d.ts +35 -0
- package/lib/response/create-oci-cache-config-set-response.js +15 -0
- package/lib/response/create-oci-cache-config-set-response.js.map +1 -0
- package/lib/response/delete-oci-cache-config-set-response.d.ts +25 -0
- package/lib/response/delete-oci-cache-config-set-response.js +15 -0
- package/lib/response/delete-oci-cache-config-set-response.js.map +1 -0
- package/lib/response/get-oci-cache-config-set-response.d.ts +30 -0
- package/lib/response/get-oci-cache-config-set-response.js +15 -0
- package/lib/response/get-oci-cache-config-set-response.js.map +1 -0
- package/lib/response/get-oci-cache-default-config-set-response.d.ts +30 -0
- package/lib/response/get-oci-cache-default-config-set-response.js +15 -0
- package/lib/response/get-oci-cache-default-config-set-response.js.map +1 -0
- package/lib/response/index.d.ts +18 -0
- package/lib/response/list-associated-oci-cache-clusters-response.d.ts +32 -0
- package/lib/response/list-associated-oci-cache-clusters-response.js +15 -0
- package/lib/response/list-associated-oci-cache-clusters-response.js.map +1 -0
- package/lib/response/list-oci-cache-config-sets-response.d.ts +32 -0
- package/lib/response/list-oci-cache-config-sets-response.js +15 -0
- package/lib/response/list-oci-cache-config-sets-response.js.map +1 -0
- package/lib/response/list-oci-cache-default-config-sets-response.d.ts +32 -0
- package/lib/response/list-oci-cache-default-config-sets-response.js +15 -0
- package/lib/response/list-oci-cache-default-config-sets-response.js.map +1 -0
- package/lib/response/update-oci-cache-config-set-response.d.ts +25 -0
- package/lib/response/update-oci-cache-config-set-response.js +15 -0
- package/lib/response/update-oci-cache-config-set-response.js.map +1 -0
- package/package.json +3 -3
package/lib/client.js
CHANGED
|
@@ -40,10 +40,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
40
40
|
});
|
|
41
41
|
};
|
|
42
42
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
43
|
-
exports.RedisIdentityClient = exports.RedisIdentityApiKeys = exports.RedisClusterClient = exports.RedisClusterApiKeys = exports.OciCacheUserClient = exports.OciCacheUserApiKeys = void 0;
|
|
43
|
+
exports.RedisIdentityClient = exports.RedisIdentityApiKeys = exports.RedisClusterClient = exports.RedisClusterApiKeys = exports.OciCacheUserClient = exports.OciCacheUserApiKeys = exports.OciCacheDefaultConfigSetClient = exports.OciCacheDefaultConfigSetApiKeys = exports.OciCacheConfigSetClient = exports.OciCacheConfigSetApiKeys = void 0;
|
|
44
44
|
const common = require("oci-common");
|
|
45
45
|
const model = __importStar(require("./model"));
|
|
46
46
|
const oci_common_1 = require("oci-common");
|
|
47
|
+
const ocicacheconfigset_waiter_1 = require("./ocicacheconfigset-waiter");
|
|
48
|
+
const ocicachedefaultconfigset_waiter_1 = require("./ocicachedefaultconfigset-waiter");
|
|
47
49
|
const ocicacheuser_waiter_1 = require("./ocicacheuser-waiter");
|
|
48
50
|
const rediscluster_waiter_1 = require("./rediscluster-waiter");
|
|
49
51
|
const oci_common_2 = require("oci-common");
|
|
@@ -51,6 +53,922 @@ const Breaker = require("opossum");
|
|
|
51
53
|
// ===============================================
|
|
52
54
|
// This file is autogenerated - Please do not edit
|
|
53
55
|
// ===============================================
|
|
56
|
+
var OciCacheConfigSetApiKeys;
|
|
57
|
+
(function (OciCacheConfigSetApiKeys) {
|
|
58
|
+
})(OciCacheConfigSetApiKeys = exports.OciCacheConfigSetApiKeys || (exports.OciCacheConfigSetApiKeys = {}));
|
|
59
|
+
/**
|
|
60
|
+
* This service client uses {@link common.CircuitBreaker.DefaultConfiguration} for all the operations by default if no circuit breaker configuration is defined by the user.
|
|
61
|
+
*/
|
|
62
|
+
class OciCacheConfigSetClient {
|
|
63
|
+
constructor(params, clientConfiguration) {
|
|
64
|
+
this["_realmSpecificEndpointTemplateEnabled"] = undefined;
|
|
65
|
+
this["_endpoint"] = "";
|
|
66
|
+
this["_defaultHeaders"] = {};
|
|
67
|
+
this._circuitBreaker = null;
|
|
68
|
+
this._httpOptions = undefined;
|
|
69
|
+
this._bodyDuplexMode = undefined;
|
|
70
|
+
this.targetService = "OciCacheConfigSet";
|
|
71
|
+
this._regionId = "";
|
|
72
|
+
this._lastSetRegionOrRegionId = "";
|
|
73
|
+
const requestSigner = params.authenticationDetailsProvider
|
|
74
|
+
? new common.DefaultRequestSigner(params.authenticationDetailsProvider)
|
|
75
|
+
: null;
|
|
76
|
+
this._authProvider = params.authenticationDetailsProvider;
|
|
77
|
+
if (clientConfiguration) {
|
|
78
|
+
this._clientConfiguration = clientConfiguration;
|
|
79
|
+
this._circuitBreaker = clientConfiguration.circuitBreaker
|
|
80
|
+
? clientConfiguration.circuitBreaker.circuit
|
|
81
|
+
: null;
|
|
82
|
+
this._httpOptions = clientConfiguration.httpOptions
|
|
83
|
+
? clientConfiguration.httpOptions
|
|
84
|
+
: undefined;
|
|
85
|
+
this._bodyDuplexMode = clientConfiguration.bodyDuplexMode
|
|
86
|
+
? clientConfiguration.bodyDuplexMode
|
|
87
|
+
: undefined;
|
|
88
|
+
}
|
|
89
|
+
if (!oci_common_2.developerToolConfiguration.isServiceEnabled("redis")) {
|
|
90
|
+
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 : ";
|
|
91
|
+
throw errmsg.concat("redis");
|
|
92
|
+
}
|
|
93
|
+
// if circuit breaker is not created, check if circuit breaker system is enabled to use default circuit breaker
|
|
94
|
+
const specCircuitBreakerEnabled = true;
|
|
95
|
+
if (!this._circuitBreaker &&
|
|
96
|
+
common.utils.isCircuitBreakerSystemEnabled(clientConfiguration) &&
|
|
97
|
+
(specCircuitBreakerEnabled || common.CircuitBreaker.DefaultCircuitBreakerOverriden)) {
|
|
98
|
+
this._circuitBreaker = new common.CircuitBreaker().circuit;
|
|
99
|
+
}
|
|
100
|
+
this._httpClient =
|
|
101
|
+
params.httpClient ||
|
|
102
|
+
new common.FetchHttpClient(requestSigner, this._circuitBreaker, this._httpOptions, this._bodyDuplexMode);
|
|
103
|
+
if (params.authenticationDetailsProvider &&
|
|
104
|
+
common.isRegionProvider(params.authenticationDetailsProvider)) {
|
|
105
|
+
const provider = params.authenticationDetailsProvider;
|
|
106
|
+
if (provider.getRegion()) {
|
|
107
|
+
this.region = provider.getRegion();
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Get the endpoint that is being used to call (ex, https://www.example.com).
|
|
113
|
+
*/
|
|
114
|
+
get endpoint() {
|
|
115
|
+
return this._endpoint;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Sets the endpoint to call (ex, https://www.example.com).
|
|
119
|
+
* @param endpoint The endpoint of the service.
|
|
120
|
+
*/
|
|
121
|
+
set endpoint(endpoint) {
|
|
122
|
+
this._endpoint = endpoint;
|
|
123
|
+
this._endpoint = this._endpoint + "/20220315";
|
|
124
|
+
if (this.logger)
|
|
125
|
+
this.logger.info(`OciCacheConfigSetClient endpoint set to ${this._endpoint}`);
|
|
126
|
+
}
|
|
127
|
+
get logger() {
|
|
128
|
+
return common.LOG.logger;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Determines whether realm specific endpoint should be used or not.
|
|
132
|
+
* Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false"
|
|
133
|
+
* @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template
|
|
134
|
+
*/
|
|
135
|
+
set useRealmSpecificEndpointTemplate(realmSpecificEndpointTemplateEnabled) {
|
|
136
|
+
this._realmSpecificEndpointTemplateEnabled = realmSpecificEndpointTemplateEnabled;
|
|
137
|
+
if (this.logger)
|
|
138
|
+
this.logger.info(`realmSpecificEndpointTemplateEnabled set to ${this._realmSpecificEndpointTemplateEnabled}`);
|
|
139
|
+
if (this._lastSetRegionOrRegionId === common.Region.REGION_STRING) {
|
|
140
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegion(OciCacheConfigSetClient.serviceEndpointTemplate, this._region, OciCacheConfigSetClient.endpointServiceName);
|
|
141
|
+
}
|
|
142
|
+
else if (this._lastSetRegionOrRegionId === common.Region.REGION_ID_STRING) {
|
|
143
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(OciCacheConfigSetClient.serviceEndpointTemplate, this._regionId, OciCacheConfigSetClient.endpointServiceName);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Sets the region to call (ex, Region.US_PHOENIX_1).
|
|
148
|
+
* Note, this will call {@link #endpoint(String) endpoint} after resolving the endpoint.
|
|
149
|
+
* @param region The region of the service.
|
|
150
|
+
*/
|
|
151
|
+
set region(region) {
|
|
152
|
+
this._region = region;
|
|
153
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegion(OciCacheConfigSetClient.serviceEndpointTemplate, region, OciCacheConfigSetClient.endpointServiceName);
|
|
154
|
+
this._lastSetRegionOrRegionId = common.Region.REGION_STRING;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Sets the regionId to call (ex, 'us-phoenix-1').
|
|
158
|
+
*
|
|
159
|
+
* Note, this will first try to map the region ID to a known Region and call {@link #region(Region) region}.
|
|
160
|
+
* If no known Region could be determined, it will create an endpoint assuming its in default Realm OC1
|
|
161
|
+
* and then call {@link #endpoint(String) endpoint}.
|
|
162
|
+
* @param regionId The public region ID.
|
|
163
|
+
*/
|
|
164
|
+
set regionId(regionId) {
|
|
165
|
+
this._regionId = regionId;
|
|
166
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(OciCacheConfigSetClient.serviceEndpointTemplate, regionId, OciCacheConfigSetClient.endpointServiceName);
|
|
167
|
+
this._lastSetRegionOrRegionId = common.Region.REGION_ID_STRING;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Creates a new OciCacheConfigSetWaiter for resources for this service.
|
|
171
|
+
*
|
|
172
|
+
* @param config The waiter configuration for termination and delay strategy
|
|
173
|
+
* @return The service waiters.
|
|
174
|
+
*/
|
|
175
|
+
createWaiters(config) {
|
|
176
|
+
this._waiters = new ocicacheconfigset_waiter_1.OciCacheConfigSetWaiter(this, config);
|
|
177
|
+
return this._waiters;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Gets the waiters available for resources for this service.
|
|
181
|
+
*
|
|
182
|
+
* @return The service waiters.
|
|
183
|
+
*/
|
|
184
|
+
getWaiters() {
|
|
185
|
+
if (this._waiters) {
|
|
186
|
+
return this._waiters;
|
|
187
|
+
}
|
|
188
|
+
throw Error("Waiters do not exist. Please create waiters.");
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Shutdown the circuit breaker used by the client when it is no longer needed
|
|
192
|
+
*/
|
|
193
|
+
shutdownCircuitBreaker() {
|
|
194
|
+
if (this._circuitBreaker) {
|
|
195
|
+
this._circuitBreaker.shutdown();
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Close the provider if possible which in turn shuts down any associated circuit breaker
|
|
200
|
+
*/
|
|
201
|
+
closeProvider() {
|
|
202
|
+
if (this._authProvider) {
|
|
203
|
+
if (this._authProvider instanceof common.AbstractRequestingAuthenticationDetailsProvider)
|
|
204
|
+
(this._authProvider).closeProvider();
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Close the client once it is no longer needed
|
|
209
|
+
*/
|
|
210
|
+
close() {
|
|
211
|
+
this.shutdownCircuitBreaker();
|
|
212
|
+
this.closeProvider();
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Moves an OCI Cache Config Set into a different compartment within the same tenancy.
|
|
216
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
217
|
+
* @param ChangeOciCacheConfigSetCompartmentRequest
|
|
218
|
+
* @return ChangeOciCacheConfigSetCompartmentResponse
|
|
219
|
+
* @throws OciError when an error occurs
|
|
220
|
+
* @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/redis/ChangeOciCacheConfigSetCompartment.ts.html |here} to see how to use ChangeOciCacheConfigSetCompartment API.
|
|
221
|
+
*/
|
|
222
|
+
changeOciCacheConfigSetCompartment(changeOciCacheConfigSetCompartmentRequest) {
|
|
223
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
224
|
+
if (this.logger)
|
|
225
|
+
this.logger.debug("Calling operation OciCacheConfigSetClient#changeOciCacheConfigSetCompartment.");
|
|
226
|
+
const operationName = "changeOciCacheConfigSetCompartment";
|
|
227
|
+
const apiReferenceLink = "";
|
|
228
|
+
const pathParams = {
|
|
229
|
+
"{ociCacheConfigSetId}": changeOciCacheConfigSetCompartmentRequest.ociCacheConfigSetId
|
|
230
|
+
};
|
|
231
|
+
const queryParams = {};
|
|
232
|
+
let headerParams = {
|
|
233
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
234
|
+
"if-match": changeOciCacheConfigSetCompartmentRequest.ifMatch,
|
|
235
|
+
"opc-request-id": changeOciCacheConfigSetCompartmentRequest.opcRequestId,
|
|
236
|
+
"opc-retry-token": changeOciCacheConfigSetCompartmentRequest.opcRetryToken
|
|
237
|
+
};
|
|
238
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
239
|
+
const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, changeOciCacheConfigSetCompartmentRequest.retryConfiguration, specRetryConfiguration);
|
|
240
|
+
if (this.logger)
|
|
241
|
+
retrier.logger = this.logger;
|
|
242
|
+
const request = yield oci_common_2.composeRequest({
|
|
243
|
+
baseEndpoint: this._endpoint,
|
|
244
|
+
defaultHeaders: this._defaultHeaders,
|
|
245
|
+
path: "/ociCacheConfigSets/{ociCacheConfigSetId}/actions/changeCompartment",
|
|
246
|
+
method: "POST",
|
|
247
|
+
bodyContent: common.ObjectSerializer.serialize(changeOciCacheConfigSetCompartmentRequest.changeOciCacheConfigSetCompartmentDetails, "ChangeOciCacheConfigSetCompartmentDetails", model.ChangeOciCacheConfigSetCompartmentDetails.getJsonObj),
|
|
248
|
+
pathParams: pathParams,
|
|
249
|
+
headerParams: headerParams,
|
|
250
|
+
queryParams: queryParams
|
|
251
|
+
});
|
|
252
|
+
try {
|
|
253
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
254
|
+
const sdkResponse = oci_common_2.composeResponse({
|
|
255
|
+
responseObject: {},
|
|
256
|
+
responseHeaders: [
|
|
257
|
+
{
|
|
258
|
+
value: response.headers.get("opc-work-request-id"),
|
|
259
|
+
key: "opcWorkRequestId",
|
|
260
|
+
dataType: "string"
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
value: response.headers.get("opc-request-id"),
|
|
264
|
+
key: "opcRequestId",
|
|
265
|
+
dataType: "string"
|
|
266
|
+
}
|
|
267
|
+
]
|
|
268
|
+
});
|
|
269
|
+
return sdkResponse;
|
|
270
|
+
}
|
|
271
|
+
catch (err) {
|
|
272
|
+
throw err;
|
|
273
|
+
}
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* Create a new OCI Cache Config Set for the given OCI cache engine version.
|
|
278
|
+
*
|
|
279
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
280
|
+
* @param CreateOciCacheConfigSetRequest
|
|
281
|
+
* @return CreateOciCacheConfigSetResponse
|
|
282
|
+
* @throws OciError when an error occurs
|
|
283
|
+
* @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/redis/CreateOciCacheConfigSet.ts.html |here} to see how to use CreateOciCacheConfigSet API.
|
|
284
|
+
*/
|
|
285
|
+
createOciCacheConfigSet(createOciCacheConfigSetRequest) {
|
|
286
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
287
|
+
if (this.logger)
|
|
288
|
+
this.logger.debug("Calling operation OciCacheConfigSetClient#createOciCacheConfigSet.");
|
|
289
|
+
const operationName = "createOciCacheConfigSet";
|
|
290
|
+
const apiReferenceLink = "";
|
|
291
|
+
const pathParams = {};
|
|
292
|
+
const queryParams = {};
|
|
293
|
+
let headerParams = {
|
|
294
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
295
|
+
"opc-retry-token": createOciCacheConfigSetRequest.opcRetryToken,
|
|
296
|
+
"opc-request-id": createOciCacheConfigSetRequest.opcRequestId
|
|
297
|
+
};
|
|
298
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
299
|
+
const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, createOciCacheConfigSetRequest.retryConfiguration, specRetryConfiguration);
|
|
300
|
+
if (this.logger)
|
|
301
|
+
retrier.logger = this.logger;
|
|
302
|
+
const request = yield oci_common_2.composeRequest({
|
|
303
|
+
baseEndpoint: this._endpoint,
|
|
304
|
+
defaultHeaders: this._defaultHeaders,
|
|
305
|
+
path: "/ociCacheConfigSets",
|
|
306
|
+
method: "POST",
|
|
307
|
+
bodyContent: common.ObjectSerializer.serialize(createOciCacheConfigSetRequest.createOciCacheConfigSetDetails, "CreateOciCacheConfigSetDetails", model.CreateOciCacheConfigSetDetails.getJsonObj),
|
|
308
|
+
pathParams: pathParams,
|
|
309
|
+
headerParams: headerParams,
|
|
310
|
+
queryParams: queryParams
|
|
311
|
+
});
|
|
312
|
+
try {
|
|
313
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
314
|
+
const sdkResponse = oci_common_2.composeResponse({
|
|
315
|
+
responseObject: {},
|
|
316
|
+
body: yield response.json(),
|
|
317
|
+
bodyKey: "ociCacheConfigSet",
|
|
318
|
+
bodyModel: model.OciCacheConfigSet,
|
|
319
|
+
type: "model.OciCacheConfigSet",
|
|
320
|
+
responseHeaders: [
|
|
321
|
+
{
|
|
322
|
+
value: response.headers.get("etag"),
|
|
323
|
+
key: "etag",
|
|
324
|
+
dataType: "string"
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
value: response.headers.get("opc-work-request-id"),
|
|
328
|
+
key: "opcWorkRequestId",
|
|
329
|
+
dataType: "string"
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
value: response.headers.get("opc-request-id"),
|
|
333
|
+
key: "opcRequestId",
|
|
334
|
+
dataType: "string"
|
|
335
|
+
}
|
|
336
|
+
]
|
|
337
|
+
});
|
|
338
|
+
return sdkResponse;
|
|
339
|
+
}
|
|
340
|
+
catch (err) {
|
|
341
|
+
throw err;
|
|
342
|
+
}
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* Deletes the specified OCI Cache Config Set.
|
|
347
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
348
|
+
* @param DeleteOciCacheConfigSetRequest
|
|
349
|
+
* @return DeleteOciCacheConfigSetResponse
|
|
350
|
+
* @throws OciError when an error occurs
|
|
351
|
+
* @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/redis/DeleteOciCacheConfigSet.ts.html |here} to see how to use DeleteOciCacheConfigSet API.
|
|
352
|
+
*/
|
|
353
|
+
deleteOciCacheConfigSet(deleteOciCacheConfigSetRequest) {
|
|
354
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
355
|
+
if (this.logger)
|
|
356
|
+
this.logger.debug("Calling operation OciCacheConfigSetClient#deleteOciCacheConfigSet.");
|
|
357
|
+
const operationName = "deleteOciCacheConfigSet";
|
|
358
|
+
const apiReferenceLink = "";
|
|
359
|
+
const pathParams = {
|
|
360
|
+
"{ociCacheConfigSetId}": deleteOciCacheConfigSetRequest.ociCacheConfigSetId
|
|
361
|
+
};
|
|
362
|
+
const queryParams = {};
|
|
363
|
+
let headerParams = {
|
|
364
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
365
|
+
"if-match": deleteOciCacheConfigSetRequest.ifMatch,
|
|
366
|
+
"opc-request-id": deleteOciCacheConfigSetRequest.opcRequestId
|
|
367
|
+
};
|
|
368
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
369
|
+
const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, deleteOciCacheConfigSetRequest.retryConfiguration, specRetryConfiguration);
|
|
370
|
+
if (this.logger)
|
|
371
|
+
retrier.logger = this.logger;
|
|
372
|
+
const request = yield oci_common_2.composeRequest({
|
|
373
|
+
baseEndpoint: this._endpoint,
|
|
374
|
+
defaultHeaders: this._defaultHeaders,
|
|
375
|
+
path: "/ociCacheConfigSets/{ociCacheConfigSetId}",
|
|
376
|
+
method: "DELETE",
|
|
377
|
+
pathParams: pathParams,
|
|
378
|
+
headerParams: headerParams,
|
|
379
|
+
queryParams: queryParams
|
|
380
|
+
});
|
|
381
|
+
try {
|
|
382
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
383
|
+
const sdkResponse = oci_common_2.composeResponse({
|
|
384
|
+
responseObject: {},
|
|
385
|
+
responseHeaders: [
|
|
386
|
+
{
|
|
387
|
+
value: response.headers.get("opc-work-request-id"),
|
|
388
|
+
key: "opcWorkRequestId",
|
|
389
|
+
dataType: "string"
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
value: response.headers.get("opc-request-id"),
|
|
393
|
+
key: "opcRequestId",
|
|
394
|
+
dataType: "string"
|
|
395
|
+
}
|
|
396
|
+
]
|
|
397
|
+
});
|
|
398
|
+
return sdkResponse;
|
|
399
|
+
}
|
|
400
|
+
catch (err) {
|
|
401
|
+
throw err;
|
|
402
|
+
}
|
|
403
|
+
});
|
|
404
|
+
}
|
|
405
|
+
/**
|
|
406
|
+
* Retrieves the specified OCI Cache Config Set.
|
|
407
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
408
|
+
* @param GetOciCacheConfigSetRequest
|
|
409
|
+
* @return GetOciCacheConfigSetResponse
|
|
410
|
+
* @throws OciError when an error occurs
|
|
411
|
+
* @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/redis/GetOciCacheConfigSet.ts.html |here} to see how to use GetOciCacheConfigSet API.
|
|
412
|
+
*/
|
|
413
|
+
getOciCacheConfigSet(getOciCacheConfigSetRequest) {
|
|
414
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
415
|
+
if (this.logger)
|
|
416
|
+
this.logger.debug("Calling operation OciCacheConfigSetClient#getOciCacheConfigSet.");
|
|
417
|
+
const operationName = "getOciCacheConfigSet";
|
|
418
|
+
const apiReferenceLink = "";
|
|
419
|
+
const pathParams = {
|
|
420
|
+
"{ociCacheConfigSetId}": getOciCacheConfigSetRequest.ociCacheConfigSetId
|
|
421
|
+
};
|
|
422
|
+
const queryParams = {};
|
|
423
|
+
let headerParams = {
|
|
424
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
425
|
+
"opc-request-id": getOciCacheConfigSetRequest.opcRequestId
|
|
426
|
+
};
|
|
427
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
428
|
+
const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getOciCacheConfigSetRequest.retryConfiguration, specRetryConfiguration);
|
|
429
|
+
if (this.logger)
|
|
430
|
+
retrier.logger = this.logger;
|
|
431
|
+
const request = yield oci_common_2.composeRequest({
|
|
432
|
+
baseEndpoint: this._endpoint,
|
|
433
|
+
defaultHeaders: this._defaultHeaders,
|
|
434
|
+
path: "/ociCacheConfigSets/{ociCacheConfigSetId}",
|
|
435
|
+
method: "GET",
|
|
436
|
+
pathParams: pathParams,
|
|
437
|
+
headerParams: headerParams,
|
|
438
|
+
queryParams: queryParams
|
|
439
|
+
});
|
|
440
|
+
try {
|
|
441
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
442
|
+
const sdkResponse = oci_common_2.composeResponse({
|
|
443
|
+
responseObject: {},
|
|
444
|
+
body: yield response.json(),
|
|
445
|
+
bodyKey: "ociCacheConfigSet",
|
|
446
|
+
bodyModel: model.OciCacheConfigSet,
|
|
447
|
+
type: "model.OciCacheConfigSet",
|
|
448
|
+
responseHeaders: [
|
|
449
|
+
{
|
|
450
|
+
value: response.headers.get("etag"),
|
|
451
|
+
key: "etag",
|
|
452
|
+
dataType: "string"
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
value: response.headers.get("opc-request-id"),
|
|
456
|
+
key: "opcRequestId",
|
|
457
|
+
dataType: "string"
|
|
458
|
+
}
|
|
459
|
+
]
|
|
460
|
+
});
|
|
461
|
+
return sdkResponse;
|
|
462
|
+
}
|
|
463
|
+
catch (err) {
|
|
464
|
+
throw err;
|
|
465
|
+
}
|
|
466
|
+
});
|
|
467
|
+
}
|
|
468
|
+
/**
|
|
469
|
+
* Gets a list of associated OCI Cache clusters for an OCI Cache Config Set.
|
|
470
|
+
*
|
|
471
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
472
|
+
* @param ListAssociatedOciCacheClustersRequest
|
|
473
|
+
* @return ListAssociatedOciCacheClustersResponse
|
|
474
|
+
* @throws OciError when an error occurs
|
|
475
|
+
* @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/redis/ListAssociatedOciCacheClusters.ts.html |here} to see how to use ListAssociatedOciCacheClusters API.
|
|
476
|
+
*/
|
|
477
|
+
listAssociatedOciCacheClusters(listAssociatedOciCacheClustersRequest) {
|
|
478
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
479
|
+
if (this.logger)
|
|
480
|
+
this.logger.debug("Calling operation OciCacheConfigSetClient#listAssociatedOciCacheClusters.");
|
|
481
|
+
const operationName = "listAssociatedOciCacheClusters";
|
|
482
|
+
const apiReferenceLink = "";
|
|
483
|
+
const pathParams = {
|
|
484
|
+
"{ociCacheConfigSetId}": listAssociatedOciCacheClustersRequest.ociCacheConfigSetId
|
|
485
|
+
};
|
|
486
|
+
const queryParams = {
|
|
487
|
+
"limit": listAssociatedOciCacheClustersRequest.limit,
|
|
488
|
+
"page": listAssociatedOciCacheClustersRequest.page,
|
|
489
|
+
"sortOrder": listAssociatedOciCacheClustersRequest.sortOrder,
|
|
490
|
+
"sortBy": listAssociatedOciCacheClustersRequest.sortBy
|
|
491
|
+
};
|
|
492
|
+
let headerParams = {
|
|
493
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
494
|
+
"opc-request-id": listAssociatedOciCacheClustersRequest.opcRequestId
|
|
495
|
+
};
|
|
496
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
497
|
+
const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listAssociatedOciCacheClustersRequest.retryConfiguration, specRetryConfiguration);
|
|
498
|
+
if (this.logger)
|
|
499
|
+
retrier.logger = this.logger;
|
|
500
|
+
const request = yield oci_common_2.composeRequest({
|
|
501
|
+
baseEndpoint: this._endpoint,
|
|
502
|
+
defaultHeaders: this._defaultHeaders,
|
|
503
|
+
path: "/ociCacheConfigSets/{ociCacheConfigSetId}/actions/listAssociatedOciCacheClusters",
|
|
504
|
+
method: "POST",
|
|
505
|
+
pathParams: pathParams,
|
|
506
|
+
headerParams: headerParams,
|
|
507
|
+
queryParams: queryParams
|
|
508
|
+
});
|
|
509
|
+
try {
|
|
510
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
511
|
+
const sdkResponse = oci_common_2.composeResponse({
|
|
512
|
+
responseObject: {},
|
|
513
|
+
body: yield response.json(),
|
|
514
|
+
bodyKey: "associatedOciCacheClusterCollection",
|
|
515
|
+
bodyModel: model.AssociatedOciCacheClusterCollection,
|
|
516
|
+
type: "model.AssociatedOciCacheClusterCollection",
|
|
517
|
+
responseHeaders: [
|
|
518
|
+
{
|
|
519
|
+
value: response.headers.get("opc-request-id"),
|
|
520
|
+
key: "opcRequestId",
|
|
521
|
+
dataType: "string"
|
|
522
|
+
},
|
|
523
|
+
{
|
|
524
|
+
value: response.headers.get("opc-next-page"),
|
|
525
|
+
key: "opcNextPage",
|
|
526
|
+
dataType: "string"
|
|
527
|
+
}
|
|
528
|
+
]
|
|
529
|
+
});
|
|
530
|
+
return sdkResponse;
|
|
531
|
+
}
|
|
532
|
+
catch (err) {
|
|
533
|
+
throw err;
|
|
534
|
+
}
|
|
535
|
+
});
|
|
536
|
+
}
|
|
537
|
+
/**
|
|
538
|
+
* Lists the OCI Cache Config Sets in the specified compartment.
|
|
539
|
+
*
|
|
540
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
541
|
+
* @param ListOciCacheConfigSetsRequest
|
|
542
|
+
* @return ListOciCacheConfigSetsResponse
|
|
543
|
+
* @throws OciError when an error occurs
|
|
544
|
+
* @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/redis/ListOciCacheConfigSets.ts.html |here} to see how to use ListOciCacheConfigSets API.
|
|
545
|
+
*/
|
|
546
|
+
listOciCacheConfigSets(listOciCacheConfigSetsRequest) {
|
|
547
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
548
|
+
if (this.logger)
|
|
549
|
+
this.logger.debug("Calling operation OciCacheConfigSetClient#listOciCacheConfigSets.");
|
|
550
|
+
const operationName = "listOciCacheConfigSets";
|
|
551
|
+
const apiReferenceLink = "";
|
|
552
|
+
const pathParams = {};
|
|
553
|
+
const queryParams = {
|
|
554
|
+
"compartmentId": listOciCacheConfigSetsRequest.compartmentId,
|
|
555
|
+
"lifecycleState": listOciCacheConfigSetsRequest.lifecycleState,
|
|
556
|
+
"softwareVersion": listOciCacheConfigSetsRequest.softwareVersion,
|
|
557
|
+
"displayName": listOciCacheConfigSetsRequest.displayName,
|
|
558
|
+
"id": listOciCacheConfigSetsRequest.id,
|
|
559
|
+
"limit": listOciCacheConfigSetsRequest.limit,
|
|
560
|
+
"page": listOciCacheConfigSetsRequest.page,
|
|
561
|
+
"sortOrder": listOciCacheConfigSetsRequest.sortOrder,
|
|
562
|
+
"sortBy": listOciCacheConfigSetsRequest.sortBy
|
|
563
|
+
};
|
|
564
|
+
let headerParams = {
|
|
565
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
566
|
+
"opc-request-id": listOciCacheConfigSetsRequest.opcRequestId
|
|
567
|
+
};
|
|
568
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
569
|
+
const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listOciCacheConfigSetsRequest.retryConfiguration, specRetryConfiguration);
|
|
570
|
+
if (this.logger)
|
|
571
|
+
retrier.logger = this.logger;
|
|
572
|
+
const request = yield oci_common_2.composeRequest({
|
|
573
|
+
baseEndpoint: this._endpoint,
|
|
574
|
+
defaultHeaders: this._defaultHeaders,
|
|
575
|
+
path: "/ociCacheConfigSets",
|
|
576
|
+
method: "GET",
|
|
577
|
+
pathParams: pathParams,
|
|
578
|
+
headerParams: headerParams,
|
|
579
|
+
queryParams: queryParams
|
|
580
|
+
});
|
|
581
|
+
try {
|
|
582
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
583
|
+
const sdkResponse = oci_common_2.composeResponse({
|
|
584
|
+
responseObject: {},
|
|
585
|
+
body: yield response.json(),
|
|
586
|
+
bodyKey: "ociCacheConfigSetCollection",
|
|
587
|
+
bodyModel: model.OciCacheConfigSetCollection,
|
|
588
|
+
type: "model.OciCacheConfigSetCollection",
|
|
589
|
+
responseHeaders: [
|
|
590
|
+
{
|
|
591
|
+
value: response.headers.get("opc-request-id"),
|
|
592
|
+
key: "opcRequestId",
|
|
593
|
+
dataType: "string"
|
|
594
|
+
},
|
|
595
|
+
{
|
|
596
|
+
value: response.headers.get("opc-next-page"),
|
|
597
|
+
key: "opcNextPage",
|
|
598
|
+
dataType: "string"
|
|
599
|
+
}
|
|
600
|
+
]
|
|
601
|
+
});
|
|
602
|
+
return sdkResponse;
|
|
603
|
+
}
|
|
604
|
+
catch (err) {
|
|
605
|
+
throw err;
|
|
606
|
+
}
|
|
607
|
+
});
|
|
608
|
+
}
|
|
609
|
+
/**
|
|
610
|
+
* Updates the specified OCI Cache Config Set.
|
|
611
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
612
|
+
* @param UpdateOciCacheConfigSetRequest
|
|
613
|
+
* @return UpdateOciCacheConfigSetResponse
|
|
614
|
+
* @throws OciError when an error occurs
|
|
615
|
+
* @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/redis/UpdateOciCacheConfigSet.ts.html |here} to see how to use UpdateOciCacheConfigSet API.
|
|
616
|
+
*/
|
|
617
|
+
updateOciCacheConfigSet(updateOciCacheConfigSetRequest) {
|
|
618
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
619
|
+
if (this.logger)
|
|
620
|
+
this.logger.debug("Calling operation OciCacheConfigSetClient#updateOciCacheConfigSet.");
|
|
621
|
+
const operationName = "updateOciCacheConfigSet";
|
|
622
|
+
const apiReferenceLink = "";
|
|
623
|
+
const pathParams = {
|
|
624
|
+
"{ociCacheConfigSetId}": updateOciCacheConfigSetRequest.ociCacheConfigSetId
|
|
625
|
+
};
|
|
626
|
+
const queryParams = {};
|
|
627
|
+
let headerParams = {
|
|
628
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
629
|
+
"if-match": updateOciCacheConfigSetRequest.ifMatch,
|
|
630
|
+
"opc-request-id": updateOciCacheConfigSetRequest.opcRequestId
|
|
631
|
+
};
|
|
632
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
633
|
+
const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, updateOciCacheConfigSetRequest.retryConfiguration, specRetryConfiguration);
|
|
634
|
+
if (this.logger)
|
|
635
|
+
retrier.logger = this.logger;
|
|
636
|
+
const request = yield oci_common_2.composeRequest({
|
|
637
|
+
baseEndpoint: this._endpoint,
|
|
638
|
+
defaultHeaders: this._defaultHeaders,
|
|
639
|
+
path: "/ociCacheConfigSets/{ociCacheConfigSetId}",
|
|
640
|
+
method: "PUT",
|
|
641
|
+
bodyContent: common.ObjectSerializer.serialize(updateOciCacheConfigSetRequest.updateOciCacheConfigSetDetails, "UpdateOciCacheConfigSetDetails", model.UpdateOciCacheConfigSetDetails.getJsonObj),
|
|
642
|
+
pathParams: pathParams,
|
|
643
|
+
headerParams: headerParams,
|
|
644
|
+
queryParams: queryParams
|
|
645
|
+
});
|
|
646
|
+
try {
|
|
647
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
648
|
+
const sdkResponse = oci_common_2.composeResponse({
|
|
649
|
+
responseObject: {},
|
|
650
|
+
responseHeaders: [
|
|
651
|
+
{
|
|
652
|
+
value: response.headers.get("opc-work-request-id"),
|
|
653
|
+
key: "opcWorkRequestId",
|
|
654
|
+
dataType: "string"
|
|
655
|
+
},
|
|
656
|
+
{
|
|
657
|
+
value: response.headers.get("opc-request-id"),
|
|
658
|
+
key: "opcRequestId",
|
|
659
|
+
dataType: "string"
|
|
660
|
+
}
|
|
661
|
+
]
|
|
662
|
+
});
|
|
663
|
+
return sdkResponse;
|
|
664
|
+
}
|
|
665
|
+
catch (err) {
|
|
666
|
+
throw err;
|
|
667
|
+
}
|
|
668
|
+
});
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
exports.OciCacheConfigSetClient = OciCacheConfigSetClient;
|
|
672
|
+
OciCacheConfigSetClient.serviceEndpointTemplate = "https://redis.{region}.oci.{secondLevelDomain}";
|
|
673
|
+
OciCacheConfigSetClient.endpointServiceName = "";
|
|
674
|
+
var OciCacheDefaultConfigSetApiKeys;
|
|
675
|
+
(function (OciCacheDefaultConfigSetApiKeys) {
|
|
676
|
+
})(OciCacheDefaultConfigSetApiKeys = exports.OciCacheDefaultConfigSetApiKeys || (exports.OciCacheDefaultConfigSetApiKeys = {}));
|
|
677
|
+
/**
|
|
678
|
+
* This service client uses {@link common.CircuitBreaker.DefaultConfiguration} for all the operations by default if no circuit breaker configuration is defined by the user.
|
|
679
|
+
*/
|
|
680
|
+
class OciCacheDefaultConfigSetClient {
|
|
681
|
+
constructor(params, clientConfiguration) {
|
|
682
|
+
this["_realmSpecificEndpointTemplateEnabled"] = undefined;
|
|
683
|
+
this["_endpoint"] = "";
|
|
684
|
+
this["_defaultHeaders"] = {};
|
|
685
|
+
this._circuitBreaker = null;
|
|
686
|
+
this._httpOptions = undefined;
|
|
687
|
+
this._bodyDuplexMode = undefined;
|
|
688
|
+
this.targetService = "OciCacheDefaultConfigSet";
|
|
689
|
+
this._regionId = "";
|
|
690
|
+
this._lastSetRegionOrRegionId = "";
|
|
691
|
+
const requestSigner = params.authenticationDetailsProvider
|
|
692
|
+
? new common.DefaultRequestSigner(params.authenticationDetailsProvider)
|
|
693
|
+
: null;
|
|
694
|
+
this._authProvider = params.authenticationDetailsProvider;
|
|
695
|
+
if (clientConfiguration) {
|
|
696
|
+
this._clientConfiguration = clientConfiguration;
|
|
697
|
+
this._circuitBreaker = clientConfiguration.circuitBreaker
|
|
698
|
+
? clientConfiguration.circuitBreaker.circuit
|
|
699
|
+
: null;
|
|
700
|
+
this._httpOptions = clientConfiguration.httpOptions
|
|
701
|
+
? clientConfiguration.httpOptions
|
|
702
|
+
: undefined;
|
|
703
|
+
this._bodyDuplexMode = clientConfiguration.bodyDuplexMode
|
|
704
|
+
? clientConfiguration.bodyDuplexMode
|
|
705
|
+
: undefined;
|
|
706
|
+
}
|
|
707
|
+
if (!oci_common_2.developerToolConfiguration.isServiceEnabled("redis")) {
|
|
708
|
+
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 : ";
|
|
709
|
+
throw errmsg.concat("redis");
|
|
710
|
+
}
|
|
711
|
+
// if circuit breaker is not created, check if circuit breaker system is enabled to use default circuit breaker
|
|
712
|
+
const specCircuitBreakerEnabled = true;
|
|
713
|
+
if (!this._circuitBreaker &&
|
|
714
|
+
common.utils.isCircuitBreakerSystemEnabled(clientConfiguration) &&
|
|
715
|
+
(specCircuitBreakerEnabled || common.CircuitBreaker.DefaultCircuitBreakerOverriden)) {
|
|
716
|
+
this._circuitBreaker = new common.CircuitBreaker().circuit;
|
|
717
|
+
}
|
|
718
|
+
this._httpClient =
|
|
719
|
+
params.httpClient ||
|
|
720
|
+
new common.FetchHttpClient(requestSigner, this._circuitBreaker, this._httpOptions, this._bodyDuplexMode);
|
|
721
|
+
if (params.authenticationDetailsProvider &&
|
|
722
|
+
common.isRegionProvider(params.authenticationDetailsProvider)) {
|
|
723
|
+
const provider = params.authenticationDetailsProvider;
|
|
724
|
+
if (provider.getRegion()) {
|
|
725
|
+
this.region = provider.getRegion();
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
/**
|
|
730
|
+
* Get the endpoint that is being used to call (ex, https://www.example.com).
|
|
731
|
+
*/
|
|
732
|
+
get endpoint() {
|
|
733
|
+
return this._endpoint;
|
|
734
|
+
}
|
|
735
|
+
/**
|
|
736
|
+
* Sets the endpoint to call (ex, https://www.example.com).
|
|
737
|
+
* @param endpoint The endpoint of the service.
|
|
738
|
+
*/
|
|
739
|
+
set endpoint(endpoint) {
|
|
740
|
+
this._endpoint = endpoint;
|
|
741
|
+
this._endpoint = this._endpoint + "/20220315";
|
|
742
|
+
if (this.logger)
|
|
743
|
+
this.logger.info(`OciCacheDefaultConfigSetClient endpoint set to ${this._endpoint}`);
|
|
744
|
+
}
|
|
745
|
+
get logger() {
|
|
746
|
+
return common.LOG.logger;
|
|
747
|
+
}
|
|
748
|
+
/**
|
|
749
|
+
* Determines whether realm specific endpoint should be used or not.
|
|
750
|
+
* Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false"
|
|
751
|
+
* @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template
|
|
752
|
+
*/
|
|
753
|
+
set useRealmSpecificEndpointTemplate(realmSpecificEndpointTemplateEnabled) {
|
|
754
|
+
this._realmSpecificEndpointTemplateEnabled = realmSpecificEndpointTemplateEnabled;
|
|
755
|
+
if (this.logger)
|
|
756
|
+
this.logger.info(`realmSpecificEndpointTemplateEnabled set to ${this._realmSpecificEndpointTemplateEnabled}`);
|
|
757
|
+
if (this._lastSetRegionOrRegionId === common.Region.REGION_STRING) {
|
|
758
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegion(OciCacheDefaultConfigSetClient.serviceEndpointTemplate, this._region, OciCacheDefaultConfigSetClient.endpointServiceName);
|
|
759
|
+
}
|
|
760
|
+
else if (this._lastSetRegionOrRegionId === common.Region.REGION_ID_STRING) {
|
|
761
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(OciCacheDefaultConfigSetClient.serviceEndpointTemplate, this._regionId, OciCacheDefaultConfigSetClient.endpointServiceName);
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
/**
|
|
765
|
+
* Sets the region to call (ex, Region.US_PHOENIX_1).
|
|
766
|
+
* Note, this will call {@link #endpoint(String) endpoint} after resolving the endpoint.
|
|
767
|
+
* @param region The region of the service.
|
|
768
|
+
*/
|
|
769
|
+
set region(region) {
|
|
770
|
+
this._region = region;
|
|
771
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegion(OciCacheDefaultConfigSetClient.serviceEndpointTemplate, region, OciCacheDefaultConfigSetClient.endpointServiceName);
|
|
772
|
+
this._lastSetRegionOrRegionId = common.Region.REGION_STRING;
|
|
773
|
+
}
|
|
774
|
+
/**
|
|
775
|
+
* Sets the regionId to call (ex, 'us-phoenix-1').
|
|
776
|
+
*
|
|
777
|
+
* Note, this will first try to map the region ID to a known Region and call {@link #region(Region) region}.
|
|
778
|
+
* If no known Region could be determined, it will create an endpoint assuming its in default Realm OC1
|
|
779
|
+
* and then call {@link #endpoint(String) endpoint}.
|
|
780
|
+
* @param regionId The public region ID.
|
|
781
|
+
*/
|
|
782
|
+
set regionId(regionId) {
|
|
783
|
+
this._regionId = regionId;
|
|
784
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(OciCacheDefaultConfigSetClient.serviceEndpointTemplate, regionId, OciCacheDefaultConfigSetClient.endpointServiceName);
|
|
785
|
+
this._lastSetRegionOrRegionId = common.Region.REGION_ID_STRING;
|
|
786
|
+
}
|
|
787
|
+
/**
|
|
788
|
+
* Creates a new OciCacheDefaultConfigSetWaiter for resources for this service.
|
|
789
|
+
*
|
|
790
|
+
* @param config The waiter configuration for termination and delay strategy
|
|
791
|
+
* @return The service waiters.
|
|
792
|
+
*/
|
|
793
|
+
createWaiters(config) {
|
|
794
|
+
this._waiters = new ocicachedefaultconfigset_waiter_1.OciCacheDefaultConfigSetWaiter(this, config);
|
|
795
|
+
return this._waiters;
|
|
796
|
+
}
|
|
797
|
+
/**
|
|
798
|
+
* Gets the waiters available for resources for this service.
|
|
799
|
+
*
|
|
800
|
+
* @return The service waiters.
|
|
801
|
+
*/
|
|
802
|
+
getWaiters() {
|
|
803
|
+
if (this._waiters) {
|
|
804
|
+
return this._waiters;
|
|
805
|
+
}
|
|
806
|
+
throw Error("Waiters do not exist. Please create waiters.");
|
|
807
|
+
}
|
|
808
|
+
/**
|
|
809
|
+
* Shutdown the circuit breaker used by the client when it is no longer needed
|
|
810
|
+
*/
|
|
811
|
+
shutdownCircuitBreaker() {
|
|
812
|
+
if (this._circuitBreaker) {
|
|
813
|
+
this._circuitBreaker.shutdown();
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
/**
|
|
817
|
+
* Close the provider if possible which in turn shuts down any associated circuit breaker
|
|
818
|
+
*/
|
|
819
|
+
closeProvider() {
|
|
820
|
+
if (this._authProvider) {
|
|
821
|
+
if (this._authProvider instanceof common.AbstractRequestingAuthenticationDetailsProvider)
|
|
822
|
+
(this._authProvider).closeProvider();
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
/**
|
|
826
|
+
* Close the client once it is no longer needed
|
|
827
|
+
*/
|
|
828
|
+
close() {
|
|
829
|
+
this.shutdownCircuitBreaker();
|
|
830
|
+
this.closeProvider();
|
|
831
|
+
}
|
|
832
|
+
/**
|
|
833
|
+
* Retrieves the specified OCI Cache Default Config Set.
|
|
834
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
835
|
+
* @param GetOciCacheDefaultConfigSetRequest
|
|
836
|
+
* @return GetOciCacheDefaultConfigSetResponse
|
|
837
|
+
* @throws OciError when an error occurs
|
|
838
|
+
* @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/redis/GetOciCacheDefaultConfigSet.ts.html |here} to see how to use GetOciCacheDefaultConfigSet API.
|
|
839
|
+
*/
|
|
840
|
+
getOciCacheDefaultConfigSet(getOciCacheDefaultConfigSetRequest) {
|
|
841
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
842
|
+
if (this.logger)
|
|
843
|
+
this.logger.debug("Calling operation OciCacheDefaultConfigSetClient#getOciCacheDefaultConfigSet.");
|
|
844
|
+
const operationName = "getOciCacheDefaultConfigSet";
|
|
845
|
+
const apiReferenceLink = "";
|
|
846
|
+
const pathParams = {
|
|
847
|
+
"{ociCacheDefaultConfigSetId}": getOciCacheDefaultConfigSetRequest.ociCacheDefaultConfigSetId
|
|
848
|
+
};
|
|
849
|
+
const queryParams = {
|
|
850
|
+
"compartmentId": getOciCacheDefaultConfigSetRequest.compartmentId
|
|
851
|
+
};
|
|
852
|
+
let headerParams = {
|
|
853
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
854
|
+
"opc-request-id": getOciCacheDefaultConfigSetRequest.opcRequestId
|
|
855
|
+
};
|
|
856
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
857
|
+
const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getOciCacheDefaultConfigSetRequest.retryConfiguration, specRetryConfiguration);
|
|
858
|
+
if (this.logger)
|
|
859
|
+
retrier.logger = this.logger;
|
|
860
|
+
const request = yield oci_common_2.composeRequest({
|
|
861
|
+
baseEndpoint: this._endpoint,
|
|
862
|
+
defaultHeaders: this._defaultHeaders,
|
|
863
|
+
path: "/ociCacheDefaultConfigSets/{ociCacheDefaultConfigSetId}",
|
|
864
|
+
method: "GET",
|
|
865
|
+
pathParams: pathParams,
|
|
866
|
+
headerParams: headerParams,
|
|
867
|
+
queryParams: queryParams
|
|
868
|
+
});
|
|
869
|
+
try {
|
|
870
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
871
|
+
const sdkResponse = oci_common_2.composeResponse({
|
|
872
|
+
responseObject: {},
|
|
873
|
+
body: yield response.json(),
|
|
874
|
+
bodyKey: "ociCacheDefaultConfigSet",
|
|
875
|
+
bodyModel: model.OciCacheDefaultConfigSet,
|
|
876
|
+
type: "model.OciCacheDefaultConfigSet",
|
|
877
|
+
responseHeaders: [
|
|
878
|
+
{
|
|
879
|
+
value: response.headers.get("etag"),
|
|
880
|
+
key: "etag",
|
|
881
|
+
dataType: "string"
|
|
882
|
+
},
|
|
883
|
+
{
|
|
884
|
+
value: response.headers.get("opc-request-id"),
|
|
885
|
+
key: "opcRequestId",
|
|
886
|
+
dataType: "string"
|
|
887
|
+
}
|
|
888
|
+
]
|
|
889
|
+
});
|
|
890
|
+
return sdkResponse;
|
|
891
|
+
}
|
|
892
|
+
catch (err) {
|
|
893
|
+
throw err;
|
|
894
|
+
}
|
|
895
|
+
});
|
|
896
|
+
}
|
|
897
|
+
/**
|
|
898
|
+
* Lists the OCI Cache Default Config Sets in the specified compartment.
|
|
899
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
900
|
+
* @param ListOciCacheDefaultConfigSetsRequest
|
|
901
|
+
* @return ListOciCacheDefaultConfigSetsResponse
|
|
902
|
+
* @throws OciError when an error occurs
|
|
903
|
+
* @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/redis/ListOciCacheDefaultConfigSets.ts.html |here} to see how to use ListOciCacheDefaultConfigSets API.
|
|
904
|
+
*/
|
|
905
|
+
listOciCacheDefaultConfigSets(listOciCacheDefaultConfigSetsRequest) {
|
|
906
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
907
|
+
if (this.logger)
|
|
908
|
+
this.logger.debug("Calling operation OciCacheDefaultConfigSetClient#listOciCacheDefaultConfigSets.");
|
|
909
|
+
const operationName = "listOciCacheDefaultConfigSets";
|
|
910
|
+
const apiReferenceLink = "";
|
|
911
|
+
const pathParams = {};
|
|
912
|
+
const queryParams = {
|
|
913
|
+
"compartmentId": listOciCacheDefaultConfigSetsRequest.compartmentId,
|
|
914
|
+
"id": listOciCacheDefaultConfigSetsRequest.id,
|
|
915
|
+
"lifecycleState": listOciCacheDefaultConfigSetsRequest.lifecycleState,
|
|
916
|
+
"softwareVersion": listOciCacheDefaultConfigSetsRequest.softwareVersion,
|
|
917
|
+
"displayName": listOciCacheDefaultConfigSetsRequest.displayName,
|
|
918
|
+
"sortBy": listOciCacheDefaultConfigSetsRequest.sortBy,
|
|
919
|
+
"sortOrder": listOciCacheDefaultConfigSetsRequest.sortOrder,
|
|
920
|
+
"limit": listOciCacheDefaultConfigSetsRequest.limit,
|
|
921
|
+
"page": listOciCacheDefaultConfigSetsRequest.page
|
|
922
|
+
};
|
|
923
|
+
let headerParams = {
|
|
924
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
925
|
+
"opc-request-id": listOciCacheDefaultConfigSetsRequest.opcRequestId
|
|
926
|
+
};
|
|
927
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
928
|
+
const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listOciCacheDefaultConfigSetsRequest.retryConfiguration, specRetryConfiguration);
|
|
929
|
+
if (this.logger)
|
|
930
|
+
retrier.logger = this.logger;
|
|
931
|
+
const request = yield oci_common_2.composeRequest({
|
|
932
|
+
baseEndpoint: this._endpoint,
|
|
933
|
+
defaultHeaders: this._defaultHeaders,
|
|
934
|
+
path: "/ociCacheDefaultConfigSets",
|
|
935
|
+
method: "GET",
|
|
936
|
+
pathParams: pathParams,
|
|
937
|
+
headerParams: headerParams,
|
|
938
|
+
queryParams: queryParams
|
|
939
|
+
});
|
|
940
|
+
try {
|
|
941
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
942
|
+
const sdkResponse = oci_common_2.composeResponse({
|
|
943
|
+
responseObject: {},
|
|
944
|
+
body: yield response.json(),
|
|
945
|
+
bodyKey: "ociCacheDefaultConfigSetCollection",
|
|
946
|
+
bodyModel: model.OciCacheDefaultConfigSetCollection,
|
|
947
|
+
type: "model.OciCacheDefaultConfigSetCollection",
|
|
948
|
+
responseHeaders: [
|
|
949
|
+
{
|
|
950
|
+
value: response.headers.get("opc-request-id"),
|
|
951
|
+
key: "opcRequestId",
|
|
952
|
+
dataType: "string"
|
|
953
|
+
},
|
|
954
|
+
{
|
|
955
|
+
value: response.headers.get("opc-next-page"),
|
|
956
|
+
key: "opcNextPage",
|
|
957
|
+
dataType: "string"
|
|
958
|
+
}
|
|
959
|
+
]
|
|
960
|
+
});
|
|
961
|
+
return sdkResponse;
|
|
962
|
+
}
|
|
963
|
+
catch (err) {
|
|
964
|
+
throw err;
|
|
965
|
+
}
|
|
966
|
+
});
|
|
967
|
+
}
|
|
968
|
+
}
|
|
969
|
+
exports.OciCacheDefaultConfigSetClient = OciCacheDefaultConfigSetClient;
|
|
970
|
+
OciCacheDefaultConfigSetClient.serviceEndpointTemplate = "https://redis.{region}.oci.{secondLevelDomain}";
|
|
971
|
+
OciCacheDefaultConfigSetClient.endpointServiceName = "";
|
|
54
972
|
var OciCacheUserApiKeys;
|
|
55
973
|
(function (OciCacheUserApiKeys) {
|
|
56
974
|
})(OciCacheUserApiKeys = exports.OciCacheUserApiKeys || (exports.OciCacheUserApiKeys = {}));
|