def RestartInstance(self, request): """This API is used to restart an ES cluster instance (for operations such as system update). :param request: Request instance for RestartInstance. :type request: :class:`tencentcloud.es.v20180416.models.RestartInstanceRequest` :rtype: :class:`tencentcloud.es.v20180416.models.RestartInstanceResponse` """ try: params = request._serialize() body = self.call("RestartInstance", params) response = json.loads(body) if "Error" not in response["Response"]: model = models.RestartInstanceResponse() model._deserialize(response["Response"]) return model else: code = response["Response"]["Error"]["Code"] message = response["Response"]["Error"]["Message"] reqid = response["Response"]["RequestId"] raise TencentCloudSDKException(code, message, reqid) except Exception as e: if isinstance(e, TencentCloudSDKException): raise else: raise TencentCloudSDKException(e.message, e.message)
def RestartInstance(self, request): """重启ES集群实例(用于系统版本更新等操作) :param request: 调用RestartInstance所需参数的结构体。 :type request: :class:`tencentcloud.es.v20180416.models.RestartInstanceRequest` :rtype: :class:`tencentcloud.es.v20180416.models.RestartInstanceResponse` """ try: params = request._serialize() body = self.call("RestartInstance", params) response = json.loads(body) if "Error" not in response["Response"]: model = models.RestartInstanceResponse() model._deserialize(response["Response"]) return model else: code = response["Response"]["Error"]["Code"] message = response["Response"]["Error"]["Message"] reqid = response["Response"]["RequestId"] raise TencentCloudSDKException(code, message, reqid) except Exception as e: if isinstance(e, TencentCloudSDKException): raise else: raise TencentCloudSDKException(e.message, e.message)