oci-mysql 2.139.1 → 2.140.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 +3 -0
- package/index.js +4 -1
- package/index.js.map +1 -1
- package/lib/bluegreendeployments-waiter.d.ts +29 -0
- package/lib/bluegreendeployments-waiter.js +65 -0
- package/lib/bluegreendeployments-waiter.js.map +1 -0
- package/lib/client.d.ts +173 -0
- package/lib/client.js +650 -1
- package/lib/client.js.map +1 -1
- package/lib/model/blue-green-deployment-collection.d.ts +26 -0
- package/lib/model/blue-green-deployment-collection.js +61 -0
- package/lib/model/blue-green-deployment-collection.js.map +1 -0
- package/lib/model/blue-green-deployment-summary.d.ts +109 -0
- package/lib/model/blue-green-deployment-summary.js +43 -0
- package/lib/model/blue-green-deployment-summary.js.map +1 -0
- package/lib/model/blue-green-deployment-switchover-status.d.ts +33 -0
- package/lib/model/blue-green-deployment-switchover-status.js +44 -0
- package/lib/model/blue-green-deployment-switchover-status.js.map +1 -0
- package/lib/model/blue-green-deployment-target-db-system-details.d.ts +42 -0
- package/lib/model/blue-green-deployment-target-db-system-details.js +29 -0
- package/lib/model/blue-green-deployment-target-db-system-details.js.map +1 -0
- package/lib/model/blue-green-deployment.d.ts +118 -0
- package/lib/model/blue-green-deployment.js +71 -0
- package/lib/model/blue-green-deployment.js.map +1 -0
- package/lib/model/change-blue-green-deployment-compartment-details.d.ts +25 -0
- package/lib/model/change-blue-green-deployment-compartment-details.js +29 -0
- package/lib/model/change-blue-green-deployment-compartment-details.js.map +1 -0
- package/lib/model/create-blue-green-deployment-channel-details.d.ts +49 -0
- package/lib/model/create-blue-green-deployment-channel-details.js +57 -0
- package/lib/model/create-blue-green-deployment-channel-details.js.map +1 -0
- package/lib/model/create-blue-green-deployment-details.d.ts +54 -0
- package/lib/model/create-blue-green-deployment-details.js +63 -0
- package/lib/model/create-blue-green-deployment-details.js.map +1 -0
- package/lib/model/create-blue-green-deployment-target-db-system-details.d.ts +47 -0
- package/lib/model/create-blue-green-deployment-target-db-system-details.js +29 -0
- package/lib/model/create-blue-green-deployment-target-db-system-details.js.map +1 -0
- package/lib/model/index.d.ts +22 -0
- package/lib/model/index.js +26 -3
- package/lib/model/index.js.map +1 -1
- package/lib/model/ssl-mode.d.ts +6 -1
- package/lib/model/ssl-mode.js +5 -0
- package/lib/model/ssl-mode.js.map +1 -1
- package/lib/model/switchover-blue-green-deployment-details.d.ts +28 -0
- package/lib/model/switchover-blue-green-deployment-details.js +29 -0
- package/lib/model/switchover-blue-green-deployment-details.js.map +1 -0
- package/lib/model/update-blue-green-deployment-details.d.ts +45 -0
- package/lib/model/update-blue-green-deployment-details.js +29 -0
- package/lib/model/update-blue-green-deployment-details.js.map +1 -0
- package/lib/model/work-request-operation-type.d.ts +5 -0
- package/lib/model/work-request-operation-type.js +5 -0
- package/lib/model/work-request-operation-type.js.map +1 -1
- package/lib/request/change-blue-green-deployment-compartment-request.d.ts +53 -0
- package/lib/request/change-blue-green-deployment-compartment-request.js +15 -0
- package/lib/request/change-blue-green-deployment-compartment-request.js.map +1 -0
- package/lib/request/create-blue-green-deployment-request.d.ts +40 -0
- package/lib/request/create-blue-green-deployment-request.js +15 -0
- package/lib/request/create-blue-green-deployment-request.js.map +1 -0
- package/lib/request/delete-blue-green-deployment-request.d.ts +38 -0
- package/lib/request/delete-blue-green-deployment-request.js +15 -0
- package/lib/request/delete-blue-green-deployment-request.js.map +1 -0
- package/lib/request/get-blue-green-deployment-request.d.ts +38 -0
- package/lib/request/get-blue-green-deployment-request.js +15 -0
- package/lib/request/get-blue-green-deployment-request.js.map +1 -0
- package/lib/request/index.d.ts +14 -0
- package/lib/request/index.js +3 -1
- package/lib/request/index.js.map +1 -1
- package/lib/request/list-blue-green-deployments-request.d.ts +77 -0
- package/lib/request/list-blue-green-deployments-request.js +29 -0
- package/lib/request/list-blue-green-deployments-request.js.map +1 -0
- package/lib/request/switchover-blue-green-deployment-request.d.ts +53 -0
- package/lib/request/switchover-blue-green-deployment-request.js +15 -0
- package/lib/request/switchover-blue-green-deployment-request.js.map +1 -0
- package/lib/request/update-blue-green-deployment-request.d.ts +43 -0
- package/lib/request/update-blue-green-deployment-request.js +15 -0
- package/lib/request/update-blue-green-deployment-request.js.map +1 -0
- package/lib/response/change-blue-green-deployment-compartment-response.d.ts +25 -0
- package/lib/response/change-blue-green-deployment-compartment-response.js +15 -0
- package/lib/response/change-blue-green-deployment-compartment-response.js.map +1 -0
- package/lib/response/create-blue-green-deployment-response.d.ts +35 -0
- package/lib/response/create-blue-green-deployment-response.js +15 -0
- package/lib/response/create-blue-green-deployment-response.js.map +1 -0
- package/lib/response/delete-blue-green-deployment-response.d.ts +25 -0
- package/lib/response/delete-blue-green-deployment-response.js +15 -0
- package/lib/response/delete-blue-green-deployment-response.js.map +1 -0
- package/lib/response/get-blue-green-deployment-response.d.ts +37 -0
- package/lib/response/get-blue-green-deployment-response.js +15 -0
- package/lib/response/get-blue-green-deployment-response.js.map +1 -0
- package/lib/response/index.d.ts +14 -0
- package/lib/response/list-blue-green-deployments-response.d.ts +32 -0
- package/lib/response/list-blue-green-deployments-response.js +15 -0
- package/lib/response/list-blue-green-deployments-response.js.map +1 -0
- package/lib/response/switchover-blue-green-deployment-response.d.ts +35 -0
- package/lib/response/switchover-blue-green-deployment-response.js +15 -0
- package/lib/response/switchover-blue-green-deployment-response.js.map +1 -0
- package/lib/response/update-blue-green-deployment-response.d.ts +25 -0
- package/lib/response/update-blue-green-deployment-response.js +15 -0
- package/lib/response/update-blue-green-deployment-response.js.map +1 -0
- package/package.json +2 -2
package/lib/client.js
CHANGED
|
@@ -40,10 +40,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
40
40
|
});
|
|
41
41
|
};
|
|
42
42
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
43
|
-
exports.WorkRequestsClient = exports.WorkRequestsApiKeys = exports.ReplicasClient = exports.ReplicasApiKeys = exports.MysqlaasClient = exports.MysqlaasApiKeys = exports.DbSystemClient = exports.DbSystemApiKeys = exports.DbBackupsClient = exports.DbBackupsApiKeys = exports.ChannelsClient = exports.ChannelsApiKeys = void 0;
|
|
43
|
+
exports.WorkRequestsClient = exports.WorkRequestsApiKeys = exports.ReplicasClient = exports.ReplicasApiKeys = exports.MysqlaasClient = exports.MysqlaasApiKeys = exports.DbSystemClient = exports.DbSystemApiKeys = exports.DbBackupsClient = exports.DbBackupsApiKeys = exports.ChannelsClient = exports.ChannelsApiKeys = exports.BlueGreenDeploymentsClient = exports.BlueGreenDeploymentsApiKeys = 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 bluegreendeployments_waiter_1 = require("./bluegreendeployments-waiter");
|
|
47
48
|
const channels_waiter_1 = require("./channels-waiter");
|
|
48
49
|
const dbbackups_waiter_1 = require("./dbbackups-waiter");
|
|
49
50
|
const dbsystem_waiter_1 = require("./dbsystem-waiter");
|
|
@@ -55,6 +56,654 @@ const Breaker = require("opossum");
|
|
|
55
56
|
// ===============================================
|
|
56
57
|
// This file is autogenerated - Please do not edit
|
|
57
58
|
// ===============================================
|
|
59
|
+
var BlueGreenDeploymentsApiKeys;
|
|
60
|
+
(function (BlueGreenDeploymentsApiKeys) {
|
|
61
|
+
})(BlueGreenDeploymentsApiKeys = exports.BlueGreenDeploymentsApiKeys || (exports.BlueGreenDeploymentsApiKeys = {}));
|
|
62
|
+
/**
|
|
63
|
+
* This service client uses {@link common.CircuitBreaker.DefaultConfiguration} for all the operations by default if no circuit breaker configuration is defined by the user.
|
|
64
|
+
*/
|
|
65
|
+
class BlueGreenDeploymentsClient {
|
|
66
|
+
constructor(params, clientConfiguration) {
|
|
67
|
+
this["_realmSpecificEndpointTemplateEnabled"] = undefined;
|
|
68
|
+
this["_endpoint"] = "";
|
|
69
|
+
this["_defaultHeaders"] = {};
|
|
70
|
+
this._circuitBreaker = null;
|
|
71
|
+
this._httpOptions = undefined;
|
|
72
|
+
this._bodyDuplexMode = undefined;
|
|
73
|
+
this.targetService = "BlueGreenDeployments";
|
|
74
|
+
this._regionId = "";
|
|
75
|
+
this._lastSetRegionOrRegionId = "";
|
|
76
|
+
const requestSigner = params.authenticationDetailsProvider
|
|
77
|
+
? new common.DefaultRequestSigner(params.authenticationDetailsProvider)
|
|
78
|
+
: null;
|
|
79
|
+
this._authProvider = params.authenticationDetailsProvider;
|
|
80
|
+
if (clientConfiguration) {
|
|
81
|
+
this._clientConfiguration = clientConfiguration;
|
|
82
|
+
this._circuitBreaker = clientConfiguration.circuitBreaker
|
|
83
|
+
? clientConfiguration.circuitBreaker.circuit
|
|
84
|
+
: null;
|
|
85
|
+
this._httpOptions = clientConfiguration.httpOptions
|
|
86
|
+
? clientConfiguration.httpOptions
|
|
87
|
+
: undefined;
|
|
88
|
+
this._bodyDuplexMode = clientConfiguration.bodyDuplexMode
|
|
89
|
+
? clientConfiguration.bodyDuplexMode
|
|
90
|
+
: undefined;
|
|
91
|
+
}
|
|
92
|
+
if (!oci_common_2.developerToolConfiguration.isServiceEnabled("mysql")) {
|
|
93
|
+
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 : ";
|
|
94
|
+
throw errmsg.concat("mysql");
|
|
95
|
+
}
|
|
96
|
+
// if circuit breaker is not created, check if circuit breaker system is enabled to use default circuit breaker
|
|
97
|
+
const specCircuitBreakerEnabled = true;
|
|
98
|
+
if (!this._circuitBreaker &&
|
|
99
|
+
common.utils.isCircuitBreakerSystemEnabled(clientConfiguration) &&
|
|
100
|
+
(specCircuitBreakerEnabled || common.CircuitBreaker.DefaultCircuitBreakerOverriden)) {
|
|
101
|
+
this._circuitBreaker = new common.CircuitBreaker().circuit;
|
|
102
|
+
}
|
|
103
|
+
this._httpClient =
|
|
104
|
+
params.httpClient ||
|
|
105
|
+
new common.FetchHttpClient(requestSigner, this._circuitBreaker, this._httpOptions, this._bodyDuplexMode);
|
|
106
|
+
if (params.authenticationDetailsProvider &&
|
|
107
|
+
common.isRegionProvider(params.authenticationDetailsProvider)) {
|
|
108
|
+
const provider = params.authenticationDetailsProvider;
|
|
109
|
+
if (provider.getRegion()) {
|
|
110
|
+
this.region = provider.getRegion();
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Get the endpoint that is being used to call (ex, https://www.example.com).
|
|
116
|
+
*/
|
|
117
|
+
get endpoint() {
|
|
118
|
+
return this._endpoint;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Sets the endpoint to call (ex, https://www.example.com).
|
|
122
|
+
* @param endpoint The endpoint of the service.
|
|
123
|
+
*/
|
|
124
|
+
set endpoint(endpoint) {
|
|
125
|
+
this._endpoint = endpoint;
|
|
126
|
+
this._endpoint = this._endpoint + "/20190415";
|
|
127
|
+
if (this.logger)
|
|
128
|
+
this.logger.info(`BlueGreenDeploymentsClient endpoint set to ${this._endpoint}`);
|
|
129
|
+
}
|
|
130
|
+
get logger() {
|
|
131
|
+
return common.LOG.logger;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Determines whether realm specific endpoint should be used or not.
|
|
135
|
+
* Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false"
|
|
136
|
+
* @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template
|
|
137
|
+
*/
|
|
138
|
+
set useRealmSpecificEndpointTemplate(realmSpecificEndpointTemplateEnabled) {
|
|
139
|
+
this._realmSpecificEndpointTemplateEnabled = realmSpecificEndpointTemplateEnabled;
|
|
140
|
+
if (this.logger)
|
|
141
|
+
this.logger.info(`realmSpecificEndpointTemplateEnabled set to ${this._realmSpecificEndpointTemplateEnabled}`);
|
|
142
|
+
if (this._lastSetRegionOrRegionId === common.Region.REGION_STRING) {
|
|
143
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegion(BlueGreenDeploymentsClient.serviceEndpointTemplate, this._region, BlueGreenDeploymentsClient.endpointServiceName);
|
|
144
|
+
}
|
|
145
|
+
else if (this._lastSetRegionOrRegionId === common.Region.REGION_ID_STRING) {
|
|
146
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(BlueGreenDeploymentsClient.serviceEndpointTemplate, this._regionId, BlueGreenDeploymentsClient.endpointServiceName);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Sets the region to call (ex, Region.US_PHOENIX_1).
|
|
151
|
+
* Note, this will call {@link #endpoint(String) endpoint} after resolving the endpoint.
|
|
152
|
+
* @param region The region of the service.
|
|
153
|
+
*/
|
|
154
|
+
set region(region) {
|
|
155
|
+
this._region = region;
|
|
156
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegion(BlueGreenDeploymentsClient.serviceEndpointTemplate, region, BlueGreenDeploymentsClient.endpointServiceName);
|
|
157
|
+
this._lastSetRegionOrRegionId = common.Region.REGION_STRING;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Sets the regionId to call (ex, 'us-phoenix-1').
|
|
161
|
+
*
|
|
162
|
+
* Note, this will first try to map the region ID to a known Region and call {@link #region(Region) region}.
|
|
163
|
+
* If no known Region could be determined, it will create an endpoint assuming its in default Realm OC1
|
|
164
|
+
* and then call {@link #endpoint(String) endpoint}.
|
|
165
|
+
* @param regionId The public region ID.
|
|
166
|
+
*/
|
|
167
|
+
set regionId(regionId) {
|
|
168
|
+
this._regionId = regionId;
|
|
169
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(BlueGreenDeploymentsClient.serviceEndpointTemplate, regionId, BlueGreenDeploymentsClient.endpointServiceName);
|
|
170
|
+
this._lastSetRegionOrRegionId = common.Region.REGION_ID_STRING;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Creates a new BlueGreenDeploymentsWaiter for resources for this service.
|
|
174
|
+
*
|
|
175
|
+
* @param config The waiter configuration for termination and delay strategy
|
|
176
|
+
* @return The service waiters.
|
|
177
|
+
*/
|
|
178
|
+
createWaiters(config) {
|
|
179
|
+
this._waiters = new bluegreendeployments_waiter_1.BlueGreenDeploymentsWaiter(this, config);
|
|
180
|
+
return this._waiters;
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Gets the waiters available for resources for this service.
|
|
184
|
+
*
|
|
185
|
+
* @return The service waiters.
|
|
186
|
+
*/
|
|
187
|
+
getWaiters() {
|
|
188
|
+
if (this._waiters) {
|
|
189
|
+
return this._waiters;
|
|
190
|
+
}
|
|
191
|
+
throw Error("Waiters do not exist. Please create waiters.");
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Shutdown the circuit breaker used by the client when it is no longer needed
|
|
195
|
+
*/
|
|
196
|
+
shutdownCircuitBreaker() {
|
|
197
|
+
if (this._circuitBreaker) {
|
|
198
|
+
this._circuitBreaker.shutdown();
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Close the provider if possible which in turn shuts down any associated circuit breaker
|
|
203
|
+
*/
|
|
204
|
+
closeProvider() {
|
|
205
|
+
if (this._authProvider) {
|
|
206
|
+
if (this._authProvider instanceof common.AbstractRequestingAuthenticationDetailsProvider)
|
|
207
|
+
(this._authProvider).closeProvider();
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Close the client once it is no longer needed
|
|
212
|
+
*/
|
|
213
|
+
close() {
|
|
214
|
+
this.shutdownCircuitBreaker();
|
|
215
|
+
this.closeProvider();
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Moves only the blue/green deployment wrapper resource into a different compartment.
|
|
219
|
+
* This operation does not move the source DB system, target DB system, or replication channel referenced by the deployment.
|
|
220
|
+
* When provided, If-Match is checked against ETag values of the blue/green deployment.
|
|
221
|
+
*
|
|
222
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
223
|
+
* @param ChangeBlueGreenDeploymentCompartmentRequest
|
|
224
|
+
* @return ChangeBlueGreenDeploymentCompartmentResponse
|
|
225
|
+
* @throws OciError when an error occurs
|
|
226
|
+
* @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/mysql/ChangeBlueGreenDeploymentCompartment.ts.html |here} to see how to use ChangeBlueGreenDeploymentCompartment API.
|
|
227
|
+
*/
|
|
228
|
+
changeBlueGreenDeploymentCompartment(changeBlueGreenDeploymentCompartmentRequest) {
|
|
229
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
230
|
+
if (this.logger)
|
|
231
|
+
this.logger.debug("Calling operation BlueGreenDeploymentsClient#changeBlueGreenDeploymentCompartment.");
|
|
232
|
+
const operationName = "changeBlueGreenDeploymentCompartment";
|
|
233
|
+
const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/mysql/20190415/BlueGreenDeployment/ChangeBlueGreenDeploymentCompartment";
|
|
234
|
+
const pathParams = {
|
|
235
|
+
"{blueGreenDeploymentId}": changeBlueGreenDeploymentCompartmentRequest.blueGreenDeploymentId
|
|
236
|
+
};
|
|
237
|
+
const queryParams = {};
|
|
238
|
+
let headerParams = {
|
|
239
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
240
|
+
"if-match": changeBlueGreenDeploymentCompartmentRequest.ifMatch,
|
|
241
|
+
"opc-request-id": changeBlueGreenDeploymentCompartmentRequest.opcRequestId,
|
|
242
|
+
"opc-retry-token": changeBlueGreenDeploymentCompartmentRequest.opcRetryToken
|
|
243
|
+
};
|
|
244
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
245
|
+
const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, changeBlueGreenDeploymentCompartmentRequest.retryConfiguration, specRetryConfiguration);
|
|
246
|
+
if (this.logger)
|
|
247
|
+
retrier.logger = this.logger;
|
|
248
|
+
const request = yield oci_common_2.composeRequest({
|
|
249
|
+
baseEndpoint: this._endpoint,
|
|
250
|
+
defaultHeaders: this._defaultHeaders,
|
|
251
|
+
path: "/blueGreenDeployments/{blueGreenDeploymentId}/actions/changeCompartment",
|
|
252
|
+
method: "POST",
|
|
253
|
+
bodyContent: common.ObjectSerializer.serialize(changeBlueGreenDeploymentCompartmentRequest.changeBlueGreenDeploymentCompartmentDetails, "ChangeBlueGreenDeploymentCompartmentDetails", model.ChangeBlueGreenDeploymentCompartmentDetails.getJsonObj),
|
|
254
|
+
pathParams: pathParams,
|
|
255
|
+
headerParams: headerParams,
|
|
256
|
+
queryParams: queryParams
|
|
257
|
+
});
|
|
258
|
+
try {
|
|
259
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
260
|
+
const sdkResponse = oci_common_2.composeResponse({
|
|
261
|
+
responseObject: {},
|
|
262
|
+
responseHeaders: [
|
|
263
|
+
{
|
|
264
|
+
value: response.headers.get("opc-request-id"),
|
|
265
|
+
key: "opcRequestId",
|
|
266
|
+
dataType: "string"
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
value: response.headers.get("opc-work-request-id"),
|
|
270
|
+
key: "opcWorkRequestId",
|
|
271
|
+
dataType: "string"
|
|
272
|
+
}
|
|
273
|
+
]
|
|
274
|
+
});
|
|
275
|
+
return sdkResponse;
|
|
276
|
+
}
|
|
277
|
+
catch (err) {
|
|
278
|
+
throw err;
|
|
279
|
+
}
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* Creates a blue/green deployment resource and its replication channel.
|
|
284
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
285
|
+
* @param CreateBlueGreenDeploymentRequest
|
|
286
|
+
* @return CreateBlueGreenDeploymentResponse
|
|
287
|
+
* @throws OciError when an error occurs
|
|
288
|
+
* @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/mysql/CreateBlueGreenDeployment.ts.html |here} to see how to use CreateBlueGreenDeployment API.
|
|
289
|
+
*/
|
|
290
|
+
createBlueGreenDeployment(createBlueGreenDeploymentRequest) {
|
|
291
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
292
|
+
if (this.logger)
|
|
293
|
+
this.logger.debug("Calling operation BlueGreenDeploymentsClient#createBlueGreenDeployment.");
|
|
294
|
+
const operationName = "createBlueGreenDeployment";
|
|
295
|
+
const apiReferenceLink = "";
|
|
296
|
+
const pathParams = {};
|
|
297
|
+
const queryParams = {};
|
|
298
|
+
let headerParams = {
|
|
299
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
300
|
+
"opc-request-id": createBlueGreenDeploymentRequest.opcRequestId,
|
|
301
|
+
"opc-retry-token": createBlueGreenDeploymentRequest.opcRetryToken
|
|
302
|
+
};
|
|
303
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
304
|
+
const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, createBlueGreenDeploymentRequest.retryConfiguration, specRetryConfiguration);
|
|
305
|
+
if (this.logger)
|
|
306
|
+
retrier.logger = this.logger;
|
|
307
|
+
const request = yield oci_common_2.composeRequest({
|
|
308
|
+
baseEndpoint: this._endpoint,
|
|
309
|
+
defaultHeaders: this._defaultHeaders,
|
|
310
|
+
path: "/blueGreenDeployments",
|
|
311
|
+
method: "POST",
|
|
312
|
+
bodyContent: common.ObjectSerializer.serialize(createBlueGreenDeploymentRequest.createBlueGreenDeploymentDetails, "CreateBlueGreenDeploymentDetails", model.CreateBlueGreenDeploymentDetails.getJsonObj),
|
|
313
|
+
pathParams: pathParams,
|
|
314
|
+
headerParams: headerParams,
|
|
315
|
+
queryParams: queryParams
|
|
316
|
+
});
|
|
317
|
+
try {
|
|
318
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
319
|
+
const sdkResponse = oci_common_2.composeResponse({
|
|
320
|
+
responseObject: {},
|
|
321
|
+
body: yield response.json(),
|
|
322
|
+
bodyKey: "blueGreenDeployment",
|
|
323
|
+
bodyModel: model.BlueGreenDeployment,
|
|
324
|
+
type: "model.BlueGreenDeployment",
|
|
325
|
+
responseHeaders: [
|
|
326
|
+
{
|
|
327
|
+
value: response.headers.get("etag"),
|
|
328
|
+
key: "etag",
|
|
329
|
+
dataType: "string"
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
value: response.headers.get("opc-request-id"),
|
|
333
|
+
key: "opcRequestId",
|
|
334
|
+
dataType: "string"
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
value: response.headers.get("opc-work-request-id"),
|
|
338
|
+
key: "opcWorkRequestId",
|
|
339
|
+
dataType: "string"
|
|
340
|
+
}
|
|
341
|
+
]
|
|
342
|
+
});
|
|
343
|
+
return sdkResponse;
|
|
344
|
+
}
|
|
345
|
+
catch (err) {
|
|
346
|
+
throw err;
|
|
347
|
+
}
|
|
348
|
+
});
|
|
349
|
+
}
|
|
350
|
+
/**
|
|
351
|
+
* Deletes only the blue/green deployment wrapper resource. This operation does not delete the source DB system, target DB system, or replication channel associated with the deployment.
|
|
352
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
353
|
+
* @param DeleteBlueGreenDeploymentRequest
|
|
354
|
+
* @return DeleteBlueGreenDeploymentResponse
|
|
355
|
+
* @throws OciError when an error occurs
|
|
356
|
+
* @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/mysql/DeleteBlueGreenDeployment.ts.html |here} to see how to use DeleteBlueGreenDeployment API.
|
|
357
|
+
*/
|
|
358
|
+
deleteBlueGreenDeployment(deleteBlueGreenDeploymentRequest) {
|
|
359
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
360
|
+
if (this.logger)
|
|
361
|
+
this.logger.debug("Calling operation BlueGreenDeploymentsClient#deleteBlueGreenDeployment.");
|
|
362
|
+
const operationName = "deleteBlueGreenDeployment";
|
|
363
|
+
const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/mysql/20190415/BlueGreenDeployment/DeleteBlueGreenDeployment";
|
|
364
|
+
const pathParams = {
|
|
365
|
+
"{blueGreenDeploymentId}": deleteBlueGreenDeploymentRequest.blueGreenDeploymentId
|
|
366
|
+
};
|
|
367
|
+
const queryParams = {};
|
|
368
|
+
let headerParams = {
|
|
369
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
370
|
+
"if-match": deleteBlueGreenDeploymentRequest.ifMatch,
|
|
371
|
+
"opc-request-id": deleteBlueGreenDeploymentRequest.opcRequestId
|
|
372
|
+
};
|
|
373
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
374
|
+
const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, deleteBlueGreenDeploymentRequest.retryConfiguration, specRetryConfiguration);
|
|
375
|
+
if (this.logger)
|
|
376
|
+
retrier.logger = this.logger;
|
|
377
|
+
const request = yield oci_common_2.composeRequest({
|
|
378
|
+
baseEndpoint: this._endpoint,
|
|
379
|
+
defaultHeaders: this._defaultHeaders,
|
|
380
|
+
path: "/blueGreenDeployments/{blueGreenDeploymentId}",
|
|
381
|
+
method: "DELETE",
|
|
382
|
+
pathParams: pathParams,
|
|
383
|
+
headerParams: headerParams,
|
|
384
|
+
queryParams: queryParams
|
|
385
|
+
});
|
|
386
|
+
try {
|
|
387
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
388
|
+
const sdkResponse = oci_common_2.composeResponse({
|
|
389
|
+
responseObject: {},
|
|
390
|
+
responseHeaders: [
|
|
391
|
+
{
|
|
392
|
+
value: response.headers.get("opc-request-id"),
|
|
393
|
+
key: "opcRequestId",
|
|
394
|
+
dataType: "string"
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
value: response.headers.get("opc-work-request-id"),
|
|
398
|
+
key: "opcWorkRequestId",
|
|
399
|
+
dataType: "string"
|
|
400
|
+
}
|
|
401
|
+
]
|
|
402
|
+
});
|
|
403
|
+
return sdkResponse;
|
|
404
|
+
}
|
|
405
|
+
catch (err) {
|
|
406
|
+
throw err;
|
|
407
|
+
}
|
|
408
|
+
});
|
|
409
|
+
}
|
|
410
|
+
/**
|
|
411
|
+
* Gets a blue/green deployment by identifier.
|
|
412
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
413
|
+
* @param GetBlueGreenDeploymentRequest
|
|
414
|
+
* @return GetBlueGreenDeploymentResponse
|
|
415
|
+
* @throws OciError when an error occurs
|
|
416
|
+
* @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/mysql/GetBlueGreenDeployment.ts.html |here} to see how to use GetBlueGreenDeployment API.
|
|
417
|
+
*/
|
|
418
|
+
getBlueGreenDeployment(getBlueGreenDeploymentRequest) {
|
|
419
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
420
|
+
if (this.logger)
|
|
421
|
+
this.logger.debug("Calling operation BlueGreenDeploymentsClient#getBlueGreenDeployment.");
|
|
422
|
+
const operationName = "getBlueGreenDeployment";
|
|
423
|
+
const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/mysql/20190415/BlueGreenDeployment/GetBlueGreenDeployment";
|
|
424
|
+
const pathParams = {
|
|
425
|
+
"{blueGreenDeploymentId}": getBlueGreenDeploymentRequest.blueGreenDeploymentId
|
|
426
|
+
};
|
|
427
|
+
const queryParams = {};
|
|
428
|
+
let headerParams = {
|
|
429
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
430
|
+
"opc-request-id": getBlueGreenDeploymentRequest.opcRequestId,
|
|
431
|
+
"if-none-match": getBlueGreenDeploymentRequest.ifNoneMatch
|
|
432
|
+
};
|
|
433
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
434
|
+
const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getBlueGreenDeploymentRequest.retryConfiguration, specRetryConfiguration);
|
|
435
|
+
if (this.logger)
|
|
436
|
+
retrier.logger = this.logger;
|
|
437
|
+
const request = yield oci_common_2.composeRequest({
|
|
438
|
+
baseEndpoint: this._endpoint,
|
|
439
|
+
defaultHeaders: this._defaultHeaders,
|
|
440
|
+
path: "/blueGreenDeployments/{blueGreenDeploymentId}",
|
|
441
|
+
method: "GET",
|
|
442
|
+
pathParams: pathParams,
|
|
443
|
+
headerParams: headerParams,
|
|
444
|
+
queryParams: queryParams
|
|
445
|
+
});
|
|
446
|
+
try {
|
|
447
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
448
|
+
const sdkResponse = oci_common_2.composeResponse({
|
|
449
|
+
responseObject: {},
|
|
450
|
+
body: yield response.json(),
|
|
451
|
+
bodyKey: "blueGreenDeployment",
|
|
452
|
+
bodyModel: model.BlueGreenDeployment,
|
|
453
|
+
type: "model.BlueGreenDeployment",
|
|
454
|
+
responseHeaders: [
|
|
455
|
+
{
|
|
456
|
+
value: response.headers.get("etag"),
|
|
457
|
+
key: "etag",
|
|
458
|
+
dataType: "string"
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
value: response.headers.get("opc-request-id"),
|
|
462
|
+
key: "opcRequestId",
|
|
463
|
+
dataType: "string"
|
|
464
|
+
}
|
|
465
|
+
]
|
|
466
|
+
});
|
|
467
|
+
return sdkResponse;
|
|
468
|
+
}
|
|
469
|
+
catch (err) {
|
|
470
|
+
throw err;
|
|
471
|
+
}
|
|
472
|
+
});
|
|
473
|
+
}
|
|
474
|
+
/**
|
|
475
|
+
* Lists blue/green deployments in a compartment.
|
|
476
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
477
|
+
* @param ListBlueGreenDeploymentsRequest
|
|
478
|
+
* @return ListBlueGreenDeploymentsResponse
|
|
479
|
+
* @throws OciError when an error occurs
|
|
480
|
+
* @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/mysql/ListBlueGreenDeployments.ts.html |here} to see how to use ListBlueGreenDeployments API.
|
|
481
|
+
*/
|
|
482
|
+
listBlueGreenDeployments(listBlueGreenDeploymentsRequest) {
|
|
483
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
484
|
+
if (this.logger)
|
|
485
|
+
this.logger.debug("Calling operation BlueGreenDeploymentsClient#listBlueGreenDeployments.");
|
|
486
|
+
const operationName = "listBlueGreenDeployments";
|
|
487
|
+
const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/mysql/20190415/BlueGreenDeploymentCollection/ListBlueGreenDeployments";
|
|
488
|
+
const pathParams = {};
|
|
489
|
+
const queryParams = {
|
|
490
|
+
"compartmentId": listBlueGreenDeploymentsRequest.compartmentId,
|
|
491
|
+
"limit": listBlueGreenDeploymentsRequest.limit,
|
|
492
|
+
"page": listBlueGreenDeploymentsRequest.page,
|
|
493
|
+
"sourceDbSystemId": listBlueGreenDeploymentsRequest.sourceDbSystemId,
|
|
494
|
+
"targetDbSystemId": listBlueGreenDeploymentsRequest.targetDbSystemId,
|
|
495
|
+
"displayName": listBlueGreenDeploymentsRequest.displayName,
|
|
496
|
+
"lifecycleState": listBlueGreenDeploymentsRequest.lifecycleState,
|
|
497
|
+
"sortBy": listBlueGreenDeploymentsRequest.sortBy,
|
|
498
|
+
"sortOrder": listBlueGreenDeploymentsRequest.sortOrder
|
|
499
|
+
};
|
|
500
|
+
let headerParams = {
|
|
501
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
502
|
+
"opc-request-id": listBlueGreenDeploymentsRequest.opcRequestId
|
|
503
|
+
};
|
|
504
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
505
|
+
const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listBlueGreenDeploymentsRequest.retryConfiguration, specRetryConfiguration);
|
|
506
|
+
if (this.logger)
|
|
507
|
+
retrier.logger = this.logger;
|
|
508
|
+
const request = yield oci_common_2.composeRequest({
|
|
509
|
+
baseEndpoint: this._endpoint,
|
|
510
|
+
defaultHeaders: this._defaultHeaders,
|
|
511
|
+
path: "/blueGreenDeployments",
|
|
512
|
+
method: "GET",
|
|
513
|
+
pathParams: pathParams,
|
|
514
|
+
headerParams: headerParams,
|
|
515
|
+
queryParams: queryParams
|
|
516
|
+
});
|
|
517
|
+
try {
|
|
518
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
519
|
+
const sdkResponse = oci_common_2.composeResponse({
|
|
520
|
+
responseObject: {},
|
|
521
|
+
body: yield response.json(),
|
|
522
|
+
bodyKey: "blueGreenDeploymentCollection",
|
|
523
|
+
bodyModel: model.BlueGreenDeploymentCollection,
|
|
524
|
+
type: "model.BlueGreenDeploymentCollection",
|
|
525
|
+
responseHeaders: [
|
|
526
|
+
{
|
|
527
|
+
value: response.headers.get("opc-request-id"),
|
|
528
|
+
key: "opcRequestId",
|
|
529
|
+
dataType: "string"
|
|
530
|
+
},
|
|
531
|
+
{
|
|
532
|
+
value: response.headers.get("opc-next-page"),
|
|
533
|
+
key: "opcNextPage",
|
|
534
|
+
dataType: "string"
|
|
535
|
+
}
|
|
536
|
+
]
|
|
537
|
+
});
|
|
538
|
+
return sdkResponse;
|
|
539
|
+
}
|
|
540
|
+
catch (err) {
|
|
541
|
+
throw err;
|
|
542
|
+
}
|
|
543
|
+
});
|
|
544
|
+
}
|
|
545
|
+
/**
|
|
546
|
+
* Initiates switchover for a blue/green deployment.
|
|
547
|
+
* <p>
|
|
548
|
+
This action is asynchronous and supports idempotent retry only when the
|
|
549
|
+
* same `opc-retry-token` is reused for an equivalent switchover request on
|
|
550
|
+
* the same blue/green deployment. Equivalent request identity includes
|
|
551
|
+
* materially equivalent request parameters after applying defaults and
|
|
552
|
+
* preconditions, including the effective `waitTimeInSeconds`
|
|
553
|
+
* from the request body and the same `If-Match` value when provided. An
|
|
554
|
+
* empty switchover details body and a body that explicitly passes the
|
|
555
|
+
* default `waitTimeInSeconds=300` are equivalent.
|
|
556
|
+
* <p>
|
|
557
|
+
Requests that change `If-Match` or other material preconditions are
|
|
558
|
+
* treated as new requests and follow normal conflict (`409`) or
|
|
559
|
+
* precondition (`412`) handling instead of ordinary retry reuse.
|
|
560
|
+
* <p>
|
|
561
|
+
Switchover outcome and partial/failure conditions are surfaced through
|
|
562
|
+
* `lifecycleState`, `lifecycleDetails`, `switchoverStatus`,
|
|
563
|
+
* and `activeDbSystemId` in the
|
|
564
|
+
* blue/green deployment resource.
|
|
565
|
+
* <p>
|
|
566
|
+
When `waitTimeInSeconds` is omitted from the request body, the default
|
|
567
|
+
* wait time applies. The effective wait time provides upper bound guidance
|
|
568
|
+
* for waiting while the target DB System applies remaining replication
|
|
569
|
+
* changes during switchover processing.
|
|
570
|
+
*
|
|
571
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
572
|
+
* @param SwitchoverBlueGreenDeploymentRequest
|
|
573
|
+
* @return SwitchoverBlueGreenDeploymentResponse
|
|
574
|
+
* @throws OciError when an error occurs
|
|
575
|
+
* @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/mysql/SwitchoverBlueGreenDeployment.ts.html |here} to see how to use SwitchoverBlueGreenDeployment API.
|
|
576
|
+
*/
|
|
577
|
+
switchoverBlueGreenDeployment(switchoverBlueGreenDeploymentRequest) {
|
|
578
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
579
|
+
if (this.logger)
|
|
580
|
+
this.logger.debug("Calling operation BlueGreenDeploymentsClient#switchoverBlueGreenDeployment.");
|
|
581
|
+
const operationName = "switchoverBlueGreenDeployment";
|
|
582
|
+
const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/mysql/20190415/BlueGreenDeployment/SwitchoverBlueGreenDeployment";
|
|
583
|
+
const pathParams = {
|
|
584
|
+
"{blueGreenDeploymentId}": switchoverBlueGreenDeploymentRequest.blueGreenDeploymentId
|
|
585
|
+
};
|
|
586
|
+
const queryParams = {};
|
|
587
|
+
let headerParams = {
|
|
588
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
589
|
+
"if-match": switchoverBlueGreenDeploymentRequest.ifMatch,
|
|
590
|
+
"opc-request-id": switchoverBlueGreenDeploymentRequest.opcRequestId,
|
|
591
|
+
"opc-retry-token": switchoverBlueGreenDeploymentRequest.opcRetryToken
|
|
592
|
+
};
|
|
593
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
594
|
+
const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, switchoverBlueGreenDeploymentRequest.retryConfiguration, specRetryConfiguration);
|
|
595
|
+
if (this.logger)
|
|
596
|
+
retrier.logger = this.logger;
|
|
597
|
+
const request = yield oci_common_2.composeRequest({
|
|
598
|
+
baseEndpoint: this._endpoint,
|
|
599
|
+
defaultHeaders: this._defaultHeaders,
|
|
600
|
+
path: "/blueGreenDeployments/{blueGreenDeploymentId}/actions/switchover",
|
|
601
|
+
method: "POST",
|
|
602
|
+
bodyContent: common.ObjectSerializer.serialize(switchoverBlueGreenDeploymentRequest.switchoverBlueGreenDeploymentDetails, "SwitchoverBlueGreenDeploymentDetails", model.SwitchoverBlueGreenDeploymentDetails.getJsonObj),
|
|
603
|
+
pathParams: pathParams,
|
|
604
|
+
headerParams: headerParams,
|
|
605
|
+
queryParams: queryParams
|
|
606
|
+
});
|
|
607
|
+
try {
|
|
608
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
609
|
+
const sdkResponse = oci_common_2.composeResponse({
|
|
610
|
+
responseObject: {},
|
|
611
|
+
body: yield response.json(),
|
|
612
|
+
bodyKey: "blueGreenDeployment",
|
|
613
|
+
bodyModel: model.BlueGreenDeployment,
|
|
614
|
+
type: "model.BlueGreenDeployment",
|
|
615
|
+
responseHeaders: [
|
|
616
|
+
{
|
|
617
|
+
value: response.headers.get("etag"),
|
|
618
|
+
key: "etag",
|
|
619
|
+
dataType: "string"
|
|
620
|
+
},
|
|
621
|
+
{
|
|
622
|
+
value: response.headers.get("opc-request-id"),
|
|
623
|
+
key: "opcRequestId",
|
|
624
|
+
dataType: "string"
|
|
625
|
+
},
|
|
626
|
+
{
|
|
627
|
+
value: response.headers.get("opc-work-request-id"),
|
|
628
|
+
key: "opcWorkRequestId",
|
|
629
|
+
dataType: "string"
|
|
630
|
+
}
|
|
631
|
+
]
|
|
632
|
+
});
|
|
633
|
+
return sdkResponse;
|
|
634
|
+
}
|
|
635
|
+
catch (err) {
|
|
636
|
+
throw err;
|
|
637
|
+
}
|
|
638
|
+
});
|
|
639
|
+
}
|
|
640
|
+
/**
|
|
641
|
+
* Updates mutable metadata for a blue/green deployment.
|
|
642
|
+
* Currently only `displayName`, `freeformTags`, and `definedTags` can be changed.
|
|
643
|
+
*
|
|
644
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
645
|
+
* @param UpdateBlueGreenDeploymentRequest
|
|
646
|
+
* @return UpdateBlueGreenDeploymentResponse
|
|
647
|
+
* @throws OciError when an error occurs
|
|
648
|
+
* @example Click {@link https://docs.oracle.com/en-us/iaas/tools/typescript-sdk-examples/latest/mysql/UpdateBlueGreenDeployment.ts.html |here} to see how to use UpdateBlueGreenDeployment API.
|
|
649
|
+
*/
|
|
650
|
+
updateBlueGreenDeployment(updateBlueGreenDeploymentRequest) {
|
|
651
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
652
|
+
if (this.logger)
|
|
653
|
+
this.logger.debug("Calling operation BlueGreenDeploymentsClient#updateBlueGreenDeployment.");
|
|
654
|
+
const operationName = "updateBlueGreenDeployment";
|
|
655
|
+
const apiReferenceLink = "https://docs.oracle.com/iaas/api/#/en/mysql/20190415/BlueGreenDeployment/UpdateBlueGreenDeployment";
|
|
656
|
+
const pathParams = {
|
|
657
|
+
"{blueGreenDeploymentId}": updateBlueGreenDeploymentRequest.blueGreenDeploymentId
|
|
658
|
+
};
|
|
659
|
+
const queryParams = {};
|
|
660
|
+
let headerParams = {
|
|
661
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
662
|
+
"if-match": updateBlueGreenDeploymentRequest.ifMatch,
|
|
663
|
+
"opc-request-id": updateBlueGreenDeploymentRequest.opcRequestId
|
|
664
|
+
};
|
|
665
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
666
|
+
const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, updateBlueGreenDeploymentRequest.retryConfiguration, specRetryConfiguration);
|
|
667
|
+
if (this.logger)
|
|
668
|
+
retrier.logger = this.logger;
|
|
669
|
+
const request = yield oci_common_2.composeRequest({
|
|
670
|
+
baseEndpoint: this._endpoint,
|
|
671
|
+
defaultHeaders: this._defaultHeaders,
|
|
672
|
+
path: "/blueGreenDeployments/{blueGreenDeploymentId}",
|
|
673
|
+
method: "PUT",
|
|
674
|
+
bodyContent: common.ObjectSerializer.serialize(updateBlueGreenDeploymentRequest.updateBlueGreenDeploymentDetails, "UpdateBlueGreenDeploymentDetails", model.UpdateBlueGreenDeploymentDetails.getJsonObj),
|
|
675
|
+
pathParams: pathParams,
|
|
676
|
+
headerParams: headerParams,
|
|
677
|
+
queryParams: queryParams
|
|
678
|
+
});
|
|
679
|
+
try {
|
|
680
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
681
|
+
const sdkResponse = oci_common_2.composeResponse({
|
|
682
|
+
responseObject: {},
|
|
683
|
+
responseHeaders: [
|
|
684
|
+
{
|
|
685
|
+
value: response.headers.get("opc-request-id"),
|
|
686
|
+
key: "opcRequestId",
|
|
687
|
+
dataType: "string"
|
|
688
|
+
},
|
|
689
|
+
{
|
|
690
|
+
value: response.headers.get("opc-work-request-id"),
|
|
691
|
+
key: "opcWorkRequestId",
|
|
692
|
+
dataType: "string"
|
|
693
|
+
}
|
|
694
|
+
]
|
|
695
|
+
});
|
|
696
|
+
return sdkResponse;
|
|
697
|
+
}
|
|
698
|
+
catch (err) {
|
|
699
|
+
throw err;
|
|
700
|
+
}
|
|
701
|
+
});
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
exports.BlueGreenDeploymentsClient = BlueGreenDeploymentsClient;
|
|
705
|
+
BlueGreenDeploymentsClient.serviceEndpointTemplate = "https://mysql.{region}.ocp.{secondLevelDomain}";
|
|
706
|
+
BlueGreenDeploymentsClient.endpointServiceName = "";
|
|
58
707
|
var ChannelsApiKeys;
|
|
59
708
|
(function (ChannelsApiKeys) {
|
|
60
709
|
})(ChannelsApiKeys = exports.ChannelsApiKeys || (exports.ChannelsApiKeys = {}));
|