第一次提交:阿龙电竞 Django 后端最新版本
This commit is contained in:
@@ -0,0 +1,693 @@
|
||||
# -*- coding: utf8 -*-
|
||||
# Copyright (c) 2017-2025 Tencent. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import json
|
||||
|
||||
from tencentcloud.common.exception.tencent_cloud_sdk_exception import TencentCloudSDKException
|
||||
from tencentcloud.common.abstract_client import AbstractClient
|
||||
from tencentcloud.cdwch.v20200915 import models
|
||||
|
||||
|
||||
class CdwchClient(AbstractClient):
|
||||
_apiVersion = '2020-09-15'
|
||||
_endpoint = 'cdwch.tencentcloudapi.com'
|
||||
_service = 'cdwch'
|
||||
|
||||
|
||||
def ActionAlterCkUser(self, request):
|
||||
r"""新增和修改用户接口
|
||||
|
||||
:param request: Request instance for ActionAlterCkUser.
|
||||
:type request: :class:`tencentcloud.cdwch.v20200915.models.ActionAlterCkUserRequest`
|
||||
:rtype: :class:`tencentcloud.cdwch.v20200915.models.ActionAlterCkUserResponse`
|
||||
|
||||
"""
|
||||
try:
|
||||
params = request._serialize()
|
||||
headers = request.headers
|
||||
body = self.call("ActionAlterCkUser", params, headers=headers)
|
||||
response = json.loads(body)
|
||||
model = models.ActionAlterCkUserResponse()
|
||||
model._deserialize(response["Response"])
|
||||
return model
|
||||
except Exception as e:
|
||||
if isinstance(e, TencentCloudSDKException):
|
||||
raise
|
||||
else:
|
||||
raise TencentCloudSDKException(type(e).__name__, str(e))
|
||||
|
||||
|
||||
def CreateBackUpSchedule(self, request):
|
||||
r"""创建或者修改备份策略
|
||||
|
||||
:param request: Request instance for CreateBackUpSchedule.
|
||||
:type request: :class:`tencentcloud.cdwch.v20200915.models.CreateBackUpScheduleRequest`
|
||||
:rtype: :class:`tencentcloud.cdwch.v20200915.models.CreateBackUpScheduleResponse`
|
||||
|
||||
"""
|
||||
try:
|
||||
params = request._serialize()
|
||||
headers = request.headers
|
||||
body = self.call("CreateBackUpSchedule", params, headers=headers)
|
||||
response = json.loads(body)
|
||||
model = models.CreateBackUpScheduleResponse()
|
||||
model._deserialize(response["Response"])
|
||||
return model
|
||||
except Exception as e:
|
||||
if isinstance(e, TencentCloudSDKException):
|
||||
raise
|
||||
else:
|
||||
raise TencentCloudSDKException(type(e).__name__, str(e))
|
||||
|
||||
|
||||
def CreateInstanceNew(self, request):
|
||||
r"""创建集群
|
||||
|
||||
:param request: Request instance for CreateInstanceNew.
|
||||
:type request: :class:`tencentcloud.cdwch.v20200915.models.CreateInstanceNewRequest`
|
||||
:rtype: :class:`tencentcloud.cdwch.v20200915.models.CreateInstanceNewResponse`
|
||||
|
||||
"""
|
||||
try:
|
||||
params = request._serialize()
|
||||
headers = request.headers
|
||||
body = self.call("CreateInstanceNew", params, headers=headers)
|
||||
response = json.loads(body)
|
||||
model = models.CreateInstanceNewResponse()
|
||||
model._deserialize(response["Response"])
|
||||
return model
|
||||
except Exception as e:
|
||||
if isinstance(e, TencentCloudSDKException):
|
||||
raise
|
||||
else:
|
||||
raise TencentCloudSDKException(type(e).__name__, str(e))
|
||||
|
||||
|
||||
def DeleteBackUpData(self, request):
|
||||
r"""删除备份数据
|
||||
|
||||
:param request: Request instance for DeleteBackUpData.
|
||||
:type request: :class:`tencentcloud.cdwch.v20200915.models.DeleteBackUpDataRequest`
|
||||
:rtype: :class:`tencentcloud.cdwch.v20200915.models.DeleteBackUpDataResponse`
|
||||
|
||||
"""
|
||||
try:
|
||||
params = request._serialize()
|
||||
headers = request.headers
|
||||
body = self.call("DeleteBackUpData", params, headers=headers)
|
||||
response = json.loads(body)
|
||||
model = models.DeleteBackUpDataResponse()
|
||||
model._deserialize(response["Response"])
|
||||
return model
|
||||
except Exception as e:
|
||||
if isinstance(e, TencentCloudSDKException):
|
||||
raise
|
||||
else:
|
||||
raise TencentCloudSDKException(type(e).__name__, str(e))
|
||||
|
||||
|
||||
def DescribeBackUpJob(self, request):
|
||||
r"""查询备份任务列表
|
||||
|
||||
:param request: Request instance for DescribeBackUpJob.
|
||||
:type request: :class:`tencentcloud.cdwch.v20200915.models.DescribeBackUpJobRequest`
|
||||
:rtype: :class:`tencentcloud.cdwch.v20200915.models.DescribeBackUpJobResponse`
|
||||
|
||||
"""
|
||||
try:
|
||||
params = request._serialize()
|
||||
headers = request.headers
|
||||
body = self.call("DescribeBackUpJob", params, headers=headers)
|
||||
response = json.loads(body)
|
||||
model = models.DescribeBackUpJobResponse()
|
||||
model._deserialize(response["Response"])
|
||||
return model
|
||||
except Exception as e:
|
||||
if isinstance(e, TencentCloudSDKException):
|
||||
raise
|
||||
else:
|
||||
raise TencentCloudSDKException(type(e).__name__, str(e))
|
||||
|
||||
|
||||
def DescribeBackUpJobDetail(self, request):
|
||||
r"""查询备份任务详情
|
||||
|
||||
:param request: Request instance for DescribeBackUpJobDetail.
|
||||
:type request: :class:`tencentcloud.cdwch.v20200915.models.DescribeBackUpJobDetailRequest`
|
||||
:rtype: :class:`tencentcloud.cdwch.v20200915.models.DescribeBackUpJobDetailResponse`
|
||||
|
||||
"""
|
||||
try:
|
||||
params = request._serialize()
|
||||
headers = request.headers
|
||||
body = self.call("DescribeBackUpJobDetail", params, headers=headers)
|
||||
response = json.loads(body)
|
||||
model = models.DescribeBackUpJobDetailResponse()
|
||||
model._deserialize(response["Response"])
|
||||
return model
|
||||
except Exception as e:
|
||||
if isinstance(e, TencentCloudSDKException):
|
||||
raise
|
||||
else:
|
||||
raise TencentCloudSDKException(type(e).__name__, str(e))
|
||||
|
||||
|
||||
def DescribeBackUpSchedule(self, request):
|
||||
r"""查询备份策略信息
|
||||
|
||||
:param request: Request instance for DescribeBackUpSchedule.
|
||||
:type request: :class:`tencentcloud.cdwch.v20200915.models.DescribeBackUpScheduleRequest`
|
||||
:rtype: :class:`tencentcloud.cdwch.v20200915.models.DescribeBackUpScheduleResponse`
|
||||
|
||||
"""
|
||||
try:
|
||||
params = request._serialize()
|
||||
headers = request.headers
|
||||
body = self.call("DescribeBackUpSchedule", params, headers=headers)
|
||||
response = json.loads(body)
|
||||
model = models.DescribeBackUpScheduleResponse()
|
||||
model._deserialize(response["Response"])
|
||||
return model
|
||||
except Exception as e:
|
||||
if isinstance(e, TencentCloudSDKException):
|
||||
raise
|
||||
else:
|
||||
raise TencentCloudSDKException(type(e).__name__, str(e))
|
||||
|
||||
|
||||
def DescribeBackUpTables(self, request):
|
||||
r"""获取可备份表信息
|
||||
|
||||
:param request: Request instance for DescribeBackUpTables.
|
||||
:type request: :class:`tencentcloud.cdwch.v20200915.models.DescribeBackUpTablesRequest`
|
||||
:rtype: :class:`tencentcloud.cdwch.v20200915.models.DescribeBackUpTablesResponse`
|
||||
|
||||
"""
|
||||
try:
|
||||
params = request._serialize()
|
||||
headers = request.headers
|
||||
body = self.call("DescribeBackUpTables", params, headers=headers)
|
||||
response = json.loads(body)
|
||||
model = models.DescribeBackUpTablesResponse()
|
||||
model._deserialize(response["Response"])
|
||||
return model
|
||||
except Exception as e:
|
||||
if isinstance(e, TencentCloudSDKException):
|
||||
raise
|
||||
else:
|
||||
raise TencentCloudSDKException(type(e).__name__, str(e))
|
||||
|
||||
|
||||
def DescribeCNInstances(self, request):
|
||||
r"""获取云原生实例列表
|
||||
|
||||
:param request: Request instance for DescribeCNInstances.
|
||||
:type request: :class:`tencentcloud.cdwch.v20200915.models.DescribeCNInstancesRequest`
|
||||
:rtype: :class:`tencentcloud.cdwch.v20200915.models.DescribeCNInstancesResponse`
|
||||
|
||||
"""
|
||||
try:
|
||||
params = request._serialize()
|
||||
headers = request.headers
|
||||
body = self.call("DescribeCNInstances", params, headers=headers)
|
||||
response = json.loads(body)
|
||||
model = models.DescribeCNInstancesResponse()
|
||||
model._deserialize(response["Response"])
|
||||
return model
|
||||
except Exception as e:
|
||||
if isinstance(e, TencentCloudSDKException):
|
||||
raise
|
||||
else:
|
||||
raise TencentCloudSDKException(type(e).__name__, str(e))
|
||||
|
||||
|
||||
def DescribeCkSqlApis(self, request):
|
||||
r"""查询集群用户、集群表,数据库等相关信息
|
||||
|
||||
:param request: Request instance for DescribeCkSqlApis.
|
||||
:type request: :class:`tencentcloud.cdwch.v20200915.models.DescribeCkSqlApisRequest`
|
||||
:rtype: :class:`tencentcloud.cdwch.v20200915.models.DescribeCkSqlApisResponse`
|
||||
|
||||
"""
|
||||
try:
|
||||
params = request._serialize()
|
||||
headers = request.headers
|
||||
body = self.call("DescribeCkSqlApis", params, headers=headers)
|
||||
response = json.loads(body)
|
||||
model = models.DescribeCkSqlApisResponse()
|
||||
model._deserialize(response["Response"])
|
||||
return model
|
||||
except Exception as e:
|
||||
if isinstance(e, TencentCloudSDKException):
|
||||
raise
|
||||
else:
|
||||
raise TencentCloudSDKException(type(e).__name__, str(e))
|
||||
|
||||
|
||||
def DescribeClusterConfigs(self, request):
|
||||
r"""获取集群的最新的几个配置文件(config.xml、metrika.xml、user.xml)的内容,显示给用户
|
||||
|
||||
:param request: Request instance for DescribeClusterConfigs.
|
||||
:type request: :class:`tencentcloud.cdwch.v20200915.models.DescribeClusterConfigsRequest`
|
||||
:rtype: :class:`tencentcloud.cdwch.v20200915.models.DescribeClusterConfigsResponse`
|
||||
|
||||
"""
|
||||
try:
|
||||
params = request._serialize()
|
||||
headers = request.headers
|
||||
body = self.call("DescribeClusterConfigs", params, headers=headers)
|
||||
response = json.loads(body)
|
||||
model = models.DescribeClusterConfigsResponse()
|
||||
model._deserialize(response["Response"])
|
||||
return model
|
||||
except Exception as e:
|
||||
if isinstance(e, TencentCloudSDKException):
|
||||
raise
|
||||
else:
|
||||
raise TencentCloudSDKException(type(e).__name__, str(e))
|
||||
|
||||
|
||||
def DescribeInstance(self, request):
|
||||
r"""根据实例ID查询某个实例的具体信息
|
||||
|
||||
:param request: Request instance for DescribeInstance.
|
||||
:type request: :class:`tencentcloud.cdwch.v20200915.models.DescribeInstanceRequest`
|
||||
:rtype: :class:`tencentcloud.cdwch.v20200915.models.DescribeInstanceResponse`
|
||||
|
||||
"""
|
||||
try:
|
||||
params = request._serialize()
|
||||
headers = request.headers
|
||||
body = self.call("DescribeInstance", params, headers=headers)
|
||||
response = json.loads(body)
|
||||
model = models.DescribeInstanceResponse()
|
||||
model._deserialize(response["Response"])
|
||||
return model
|
||||
except Exception as e:
|
||||
if isinstance(e, TencentCloudSDKException):
|
||||
raise
|
||||
else:
|
||||
raise TencentCloudSDKException(type(e).__name__, str(e))
|
||||
|
||||
|
||||
def DescribeInstanceClusters(self, request):
|
||||
r"""集群vcluster列表
|
||||
|
||||
:param request: Request instance for DescribeInstanceClusters.
|
||||
:type request: :class:`tencentcloud.cdwch.v20200915.models.DescribeInstanceClustersRequest`
|
||||
:rtype: :class:`tencentcloud.cdwch.v20200915.models.DescribeInstanceClustersResponse`
|
||||
|
||||
"""
|
||||
try:
|
||||
params = request._serialize()
|
||||
headers = request.headers
|
||||
body = self.call("DescribeInstanceClusters", params, headers=headers)
|
||||
response = json.loads(body)
|
||||
model = models.DescribeInstanceClustersResponse()
|
||||
model._deserialize(response["Response"])
|
||||
return model
|
||||
except Exception as e:
|
||||
if isinstance(e, TencentCloudSDKException):
|
||||
raise
|
||||
else:
|
||||
raise TencentCloudSDKException(type(e).__name__, str(e))
|
||||
|
||||
|
||||
def DescribeInstanceKeyValConfigs(self, request):
|
||||
r"""在集群详情页面获取所有参数列表
|
||||
|
||||
:param request: Request instance for DescribeInstanceKeyValConfigs.
|
||||
:type request: :class:`tencentcloud.cdwch.v20200915.models.DescribeInstanceKeyValConfigsRequest`
|
||||
:rtype: :class:`tencentcloud.cdwch.v20200915.models.DescribeInstanceKeyValConfigsResponse`
|
||||
|
||||
"""
|
||||
try:
|
||||
params = request._serialize()
|
||||
headers = request.headers
|
||||
body = self.call("DescribeInstanceKeyValConfigs", params, headers=headers)
|
||||
response = json.loads(body)
|
||||
model = models.DescribeInstanceKeyValConfigsResponse()
|
||||
model._deserialize(response["Response"])
|
||||
return model
|
||||
except Exception as e:
|
||||
if isinstance(e, TencentCloudSDKException):
|
||||
raise
|
||||
else:
|
||||
raise TencentCloudSDKException(type(e).__name__, str(e))
|
||||
|
||||
|
||||
def DescribeInstanceNodes(self, request):
|
||||
r"""获取实例节点信息列表
|
||||
|
||||
:param request: Request instance for DescribeInstanceNodes.
|
||||
:type request: :class:`tencentcloud.cdwch.v20200915.models.DescribeInstanceNodesRequest`
|
||||
:rtype: :class:`tencentcloud.cdwch.v20200915.models.DescribeInstanceNodesResponse`
|
||||
|
||||
"""
|
||||
try:
|
||||
params = request._serialize()
|
||||
headers = request.headers
|
||||
body = self.call("DescribeInstanceNodes", params, headers=headers)
|
||||
response = json.loads(body)
|
||||
model = models.DescribeInstanceNodesResponse()
|
||||
model._deserialize(response["Response"])
|
||||
return model
|
||||
except Exception as e:
|
||||
if isinstance(e, TencentCloudSDKException):
|
||||
raise
|
||||
else:
|
||||
raise TencentCloudSDKException(type(e).__name__, str(e))
|
||||
|
||||
|
||||
def DescribeInstanceShards(self, request):
|
||||
r"""获取实例shard信息列表
|
||||
|
||||
:param request: Request instance for DescribeInstanceShards.
|
||||
:type request: :class:`tencentcloud.cdwch.v20200915.models.DescribeInstanceShardsRequest`
|
||||
:rtype: :class:`tencentcloud.cdwch.v20200915.models.DescribeInstanceShardsResponse`
|
||||
|
||||
"""
|
||||
try:
|
||||
params = request._serialize()
|
||||
headers = request.headers
|
||||
body = self.call("DescribeInstanceShards", params, headers=headers)
|
||||
response = json.loads(body)
|
||||
model = models.DescribeInstanceShardsResponse()
|
||||
model._deserialize(response["Response"])
|
||||
return model
|
||||
except Exception as e:
|
||||
if isinstance(e, TencentCloudSDKException):
|
||||
raise
|
||||
else:
|
||||
raise TencentCloudSDKException(type(e).__name__, str(e))
|
||||
|
||||
|
||||
def DescribeInstanceState(self, request):
|
||||
r"""集群详情页中显示集群状态、流程进度等
|
||||
|
||||
:param request: Request instance for DescribeInstanceState.
|
||||
:type request: :class:`tencentcloud.cdwch.v20200915.models.DescribeInstanceStateRequest`
|
||||
:rtype: :class:`tencentcloud.cdwch.v20200915.models.DescribeInstanceStateResponse`
|
||||
|
||||
"""
|
||||
try:
|
||||
params = request._serialize()
|
||||
headers = request.headers
|
||||
body = self.call("DescribeInstanceState", params, headers=headers)
|
||||
response = json.loads(body)
|
||||
model = models.DescribeInstanceStateResponse()
|
||||
model._deserialize(response["Response"])
|
||||
return model
|
||||
except Exception as e:
|
||||
if isinstance(e, TencentCloudSDKException):
|
||||
raise
|
||||
else:
|
||||
raise TencentCloudSDKException(type(e).__name__, str(e))
|
||||
|
||||
|
||||
def DescribeInstancesNew(self, request):
|
||||
r"""获取实例列表,供外部sdk使用
|
||||
|
||||
:param request: Request instance for DescribeInstancesNew.
|
||||
:type request: :class:`tencentcloud.cdwch.v20200915.models.DescribeInstancesNewRequest`
|
||||
:rtype: :class:`tencentcloud.cdwch.v20200915.models.DescribeInstancesNewResponse`
|
||||
|
||||
"""
|
||||
try:
|
||||
params = request._serialize()
|
||||
headers = request.headers
|
||||
body = self.call("DescribeInstancesNew", params, headers=headers)
|
||||
response = json.loads(body)
|
||||
model = models.DescribeInstancesNewResponse()
|
||||
model._deserialize(response["Response"])
|
||||
return model
|
||||
except Exception as e:
|
||||
if isinstance(e, TencentCloudSDKException):
|
||||
raise
|
||||
else:
|
||||
raise TencentCloudSDKException(type(e).__name__, str(e))
|
||||
|
||||
|
||||
def DescribeSpec(self, request):
|
||||
r"""购买页拉取集群的数据节点和zookeeper节点的规格列表
|
||||
|
||||
:param request: Request instance for DescribeSpec.
|
||||
:type request: :class:`tencentcloud.cdwch.v20200915.models.DescribeSpecRequest`
|
||||
:rtype: :class:`tencentcloud.cdwch.v20200915.models.DescribeSpecResponse`
|
||||
|
||||
"""
|
||||
try:
|
||||
params = request._serialize()
|
||||
headers = request.headers
|
||||
body = self.call("DescribeSpec", params, headers=headers)
|
||||
response = json.loads(body)
|
||||
model = models.DescribeSpecResponse()
|
||||
model._deserialize(response["Response"])
|
||||
return model
|
||||
except Exception as e:
|
||||
if isinstance(e, TencentCloudSDKException):
|
||||
raise
|
||||
else:
|
||||
raise TencentCloudSDKException(type(e).__name__, str(e))
|
||||
|
||||
|
||||
def DestroyInstance(self, request):
|
||||
r"""销毁集群 open api
|
||||
|
||||
:param request: Request instance for DestroyInstance.
|
||||
:type request: :class:`tencentcloud.cdwch.v20200915.models.DestroyInstanceRequest`
|
||||
:rtype: :class:`tencentcloud.cdwch.v20200915.models.DestroyInstanceResponse`
|
||||
|
||||
"""
|
||||
try:
|
||||
params = request._serialize()
|
||||
headers = request.headers
|
||||
body = self.call("DestroyInstance", params, headers=headers)
|
||||
response = json.loads(body)
|
||||
model = models.DestroyInstanceResponse()
|
||||
model._deserialize(response["Response"])
|
||||
return model
|
||||
except Exception as e:
|
||||
if isinstance(e, TencentCloudSDKException):
|
||||
raise
|
||||
else:
|
||||
raise TencentCloudSDKException(type(e).__name__, str(e))
|
||||
|
||||
|
||||
def ModifyClusterConfigs(self, request):
|
||||
r"""在集群配置页面修改集群配置文件接口,xml模式
|
||||
|
||||
:param request: Request instance for ModifyClusterConfigs.
|
||||
:type request: :class:`tencentcloud.cdwch.v20200915.models.ModifyClusterConfigsRequest`
|
||||
:rtype: :class:`tencentcloud.cdwch.v20200915.models.ModifyClusterConfigsResponse`
|
||||
|
||||
"""
|
||||
try:
|
||||
params = request._serialize()
|
||||
headers = request.headers
|
||||
body = self.call("ModifyClusterConfigs", params, headers=headers)
|
||||
response = json.loads(body)
|
||||
model = models.ModifyClusterConfigsResponse()
|
||||
model._deserialize(response["Response"])
|
||||
return model
|
||||
except Exception as e:
|
||||
if isinstance(e, TencentCloudSDKException):
|
||||
raise
|
||||
else:
|
||||
raise TencentCloudSDKException(type(e).__name__, str(e))
|
||||
|
||||
|
||||
def ModifyInstanceKeyValConfigs(self, request):
|
||||
r"""KV模式修改配置接口
|
||||
|
||||
:param request: Request instance for ModifyInstanceKeyValConfigs.
|
||||
:type request: :class:`tencentcloud.cdwch.v20200915.models.ModifyInstanceKeyValConfigsRequest`
|
||||
:rtype: :class:`tencentcloud.cdwch.v20200915.models.ModifyInstanceKeyValConfigsResponse`
|
||||
|
||||
"""
|
||||
try:
|
||||
params = request._serialize()
|
||||
headers = request.headers
|
||||
body = self.call("ModifyInstanceKeyValConfigs", params, headers=headers)
|
||||
response = json.loads(body)
|
||||
model = models.ModifyInstanceKeyValConfigsResponse()
|
||||
model._deserialize(response["Response"])
|
||||
return model
|
||||
except Exception as e:
|
||||
if isinstance(e, TencentCloudSDKException):
|
||||
raise
|
||||
else:
|
||||
raise TencentCloudSDKException(type(e).__name__, str(e))
|
||||
|
||||
|
||||
def ModifyUserNewPrivilege(self, request):
|
||||
r"""针对集群账号的权限做管控(新版)
|
||||
|
||||
:param request: Request instance for ModifyUserNewPrivilege.
|
||||
:type request: :class:`tencentcloud.cdwch.v20200915.models.ModifyUserNewPrivilegeRequest`
|
||||
:rtype: :class:`tencentcloud.cdwch.v20200915.models.ModifyUserNewPrivilegeResponse`
|
||||
|
||||
"""
|
||||
try:
|
||||
params = request._serialize()
|
||||
headers = request.headers
|
||||
body = self.call("ModifyUserNewPrivilege", params, headers=headers)
|
||||
response = json.loads(body)
|
||||
model = models.ModifyUserNewPrivilegeResponse()
|
||||
model._deserialize(response["Response"])
|
||||
return model
|
||||
except Exception as e:
|
||||
if isinstance(e, TencentCloudSDKException):
|
||||
raise
|
||||
else:
|
||||
raise TencentCloudSDKException(type(e).__name__, str(e))
|
||||
|
||||
|
||||
def OpenBackUp(self, request):
|
||||
r"""开启或者关闭策略
|
||||
|
||||
:param request: Request instance for OpenBackUp.
|
||||
:type request: :class:`tencentcloud.cdwch.v20200915.models.OpenBackUpRequest`
|
||||
:rtype: :class:`tencentcloud.cdwch.v20200915.models.OpenBackUpResponse`
|
||||
|
||||
"""
|
||||
try:
|
||||
params = request._serialize()
|
||||
headers = request.headers
|
||||
body = self.call("OpenBackUp", params, headers=headers)
|
||||
response = json.loads(body)
|
||||
model = models.OpenBackUpResponse()
|
||||
model._deserialize(response["Response"])
|
||||
return model
|
||||
except Exception as e:
|
||||
if isinstance(e, TencentCloudSDKException):
|
||||
raise
|
||||
else:
|
||||
raise TencentCloudSDKException(type(e).__name__, str(e))
|
||||
|
||||
|
||||
def RecoverBackUpJob(self, request):
|
||||
r"""备份恢复
|
||||
|
||||
:param request: Request instance for RecoverBackUpJob.
|
||||
:type request: :class:`tencentcloud.cdwch.v20200915.models.RecoverBackUpJobRequest`
|
||||
:rtype: :class:`tencentcloud.cdwch.v20200915.models.RecoverBackUpJobResponse`
|
||||
|
||||
"""
|
||||
try:
|
||||
params = request._serialize()
|
||||
headers = request.headers
|
||||
body = self.call("RecoverBackUpJob", params, headers=headers)
|
||||
response = json.loads(body)
|
||||
model = models.RecoverBackUpJobResponse()
|
||||
model._deserialize(response["Response"])
|
||||
return model
|
||||
except Exception as e:
|
||||
if isinstance(e, TencentCloudSDKException):
|
||||
raise
|
||||
else:
|
||||
raise TencentCloudSDKException(type(e).__name__, str(e))
|
||||
|
||||
|
||||
def ResizeDisk(self, request):
|
||||
r"""扩容磁盘,包含扩容数据节点,zk节点
|
||||
|
||||
:param request: Request instance for ResizeDisk.
|
||||
:type request: :class:`tencentcloud.cdwch.v20200915.models.ResizeDiskRequest`
|
||||
:rtype: :class:`tencentcloud.cdwch.v20200915.models.ResizeDiskResponse`
|
||||
|
||||
"""
|
||||
try:
|
||||
params = request._serialize()
|
||||
headers = request.headers
|
||||
body = self.call("ResizeDisk", params, headers=headers)
|
||||
response = json.loads(body)
|
||||
model = models.ResizeDiskResponse()
|
||||
model._deserialize(response["Response"])
|
||||
return model
|
||||
except Exception as e:
|
||||
if isinstance(e, TencentCloudSDKException):
|
||||
raise
|
||||
else:
|
||||
raise TencentCloudSDKException(type(e).__name__, str(e))
|
||||
|
||||
|
||||
def ScaleCNOutUpInstance(self, request):
|
||||
r"""open-api接口提供弹性伸缩云原生集群能力
|
||||
|
||||
:param request: Request instance for ScaleCNOutUpInstance.
|
||||
:type request: :class:`tencentcloud.cdwch.v20200915.models.ScaleCNOutUpInstanceRequest`
|
||||
:rtype: :class:`tencentcloud.cdwch.v20200915.models.ScaleCNOutUpInstanceResponse`
|
||||
|
||||
"""
|
||||
try:
|
||||
params = request._serialize()
|
||||
headers = request.headers
|
||||
body = self.call("ScaleCNOutUpInstance", params, headers=headers)
|
||||
response = json.loads(body)
|
||||
model = models.ScaleCNOutUpInstanceResponse()
|
||||
model._deserialize(response["Response"])
|
||||
return model
|
||||
except Exception as e:
|
||||
if isinstance(e, TencentCloudSDKException):
|
||||
raise
|
||||
else:
|
||||
raise TencentCloudSDKException(type(e).__name__, str(e))
|
||||
|
||||
|
||||
def ScaleOutInstance(self, request):
|
||||
r"""调整clickhouse节点数量
|
||||
|
||||
:param request: Request instance for ScaleOutInstance.
|
||||
:type request: :class:`tencentcloud.cdwch.v20200915.models.ScaleOutInstanceRequest`
|
||||
:rtype: :class:`tencentcloud.cdwch.v20200915.models.ScaleOutInstanceResponse`
|
||||
|
||||
"""
|
||||
try:
|
||||
params = request._serialize()
|
||||
headers = request.headers
|
||||
body = self.call("ScaleOutInstance", params, headers=headers)
|
||||
response = json.loads(body)
|
||||
model = models.ScaleOutInstanceResponse()
|
||||
model._deserialize(response["Response"])
|
||||
return model
|
||||
except Exception as e:
|
||||
if isinstance(e, TencentCloudSDKException):
|
||||
raise
|
||||
else:
|
||||
raise TencentCloudSDKException(type(e).__name__, str(e))
|
||||
|
||||
|
||||
def ScaleUpInstance(self, request):
|
||||
r"""垂直扩缩容节点规格,修改节点cvm的规格cpu,内存。 规格变化阶段,服务不可用。
|
||||
|
||||
:param request: Request instance for ScaleUpInstance.
|
||||
:type request: :class:`tencentcloud.cdwch.v20200915.models.ScaleUpInstanceRequest`
|
||||
:rtype: :class:`tencentcloud.cdwch.v20200915.models.ScaleUpInstanceResponse`
|
||||
|
||||
"""
|
||||
try:
|
||||
params = request._serialize()
|
||||
headers = request.headers
|
||||
body = self.call("ScaleUpInstance", params, headers=headers)
|
||||
response = json.loads(body)
|
||||
model = models.ScaleUpInstanceResponse()
|
||||
model._deserialize(response["Response"])
|
||||
return model
|
||||
except Exception as e:
|
||||
if isinstance(e, TencentCloudSDKException):
|
||||
raise
|
||||
else:
|
||||
raise TencentCloudSDKException(type(e).__name__, str(e))
|
||||
@@ -0,0 +1,548 @@
|
||||
# -*- coding: utf8 -*-
|
||||
# Copyright (c) 2017-2025 Tencent. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
|
||||
|
||||
from tencentcloud.common.abstract_client_async import AbstractClient
|
||||
from tencentcloud.cdwch.v20200915 import models
|
||||
from typing import Dict
|
||||
|
||||
|
||||
class CdwchClient(AbstractClient):
|
||||
_apiVersion = '2020-09-15'
|
||||
_endpoint = 'cdwch.tencentcloudapi.com'
|
||||
_service = 'cdwch'
|
||||
|
||||
async def ActionAlterCkUser(
|
||||
self,
|
||||
request: models.ActionAlterCkUserRequest,
|
||||
opts: Dict = None,
|
||||
) -> models.ActionAlterCkUserResponse:
|
||||
"""
|
||||
新增和修改用户接口
|
||||
"""
|
||||
|
||||
kwargs = {}
|
||||
kwargs["action"] = "ActionAlterCkUser"
|
||||
kwargs["params"] = request._serialize()
|
||||
kwargs["resp_cls"] = models.ActionAlterCkUserResponse
|
||||
kwargs["headers"] = request.headers
|
||||
kwargs["opts"] = opts or {}
|
||||
|
||||
return await self.call_and_deserialize(**kwargs)
|
||||
|
||||
async def CreateBackUpSchedule(
|
||||
self,
|
||||
request: models.CreateBackUpScheduleRequest,
|
||||
opts: Dict = None,
|
||||
) -> models.CreateBackUpScheduleResponse:
|
||||
"""
|
||||
创建或者修改备份策略
|
||||
"""
|
||||
|
||||
kwargs = {}
|
||||
kwargs["action"] = "CreateBackUpSchedule"
|
||||
kwargs["params"] = request._serialize()
|
||||
kwargs["resp_cls"] = models.CreateBackUpScheduleResponse
|
||||
kwargs["headers"] = request.headers
|
||||
kwargs["opts"] = opts or {}
|
||||
|
||||
return await self.call_and_deserialize(**kwargs)
|
||||
|
||||
async def CreateInstanceNew(
|
||||
self,
|
||||
request: models.CreateInstanceNewRequest,
|
||||
opts: Dict = None,
|
||||
) -> models.CreateInstanceNewResponse:
|
||||
"""
|
||||
创建集群
|
||||
"""
|
||||
|
||||
kwargs = {}
|
||||
kwargs["action"] = "CreateInstanceNew"
|
||||
kwargs["params"] = request._serialize()
|
||||
kwargs["resp_cls"] = models.CreateInstanceNewResponse
|
||||
kwargs["headers"] = request.headers
|
||||
kwargs["opts"] = opts or {}
|
||||
|
||||
return await self.call_and_deserialize(**kwargs)
|
||||
|
||||
async def DeleteBackUpData(
|
||||
self,
|
||||
request: models.DeleteBackUpDataRequest,
|
||||
opts: Dict = None,
|
||||
) -> models.DeleteBackUpDataResponse:
|
||||
"""
|
||||
删除备份数据
|
||||
"""
|
||||
|
||||
kwargs = {}
|
||||
kwargs["action"] = "DeleteBackUpData"
|
||||
kwargs["params"] = request._serialize()
|
||||
kwargs["resp_cls"] = models.DeleteBackUpDataResponse
|
||||
kwargs["headers"] = request.headers
|
||||
kwargs["opts"] = opts or {}
|
||||
|
||||
return await self.call_and_deserialize(**kwargs)
|
||||
|
||||
async def DescribeBackUpJob(
|
||||
self,
|
||||
request: models.DescribeBackUpJobRequest,
|
||||
opts: Dict = None,
|
||||
) -> models.DescribeBackUpJobResponse:
|
||||
"""
|
||||
查询备份任务列表
|
||||
"""
|
||||
|
||||
kwargs = {}
|
||||
kwargs["action"] = "DescribeBackUpJob"
|
||||
kwargs["params"] = request._serialize()
|
||||
kwargs["resp_cls"] = models.DescribeBackUpJobResponse
|
||||
kwargs["headers"] = request.headers
|
||||
kwargs["opts"] = opts or {}
|
||||
|
||||
return await self.call_and_deserialize(**kwargs)
|
||||
|
||||
async def DescribeBackUpJobDetail(
|
||||
self,
|
||||
request: models.DescribeBackUpJobDetailRequest,
|
||||
opts: Dict = None,
|
||||
) -> models.DescribeBackUpJobDetailResponse:
|
||||
"""
|
||||
查询备份任务详情
|
||||
"""
|
||||
|
||||
kwargs = {}
|
||||
kwargs["action"] = "DescribeBackUpJobDetail"
|
||||
kwargs["params"] = request._serialize()
|
||||
kwargs["resp_cls"] = models.DescribeBackUpJobDetailResponse
|
||||
kwargs["headers"] = request.headers
|
||||
kwargs["opts"] = opts or {}
|
||||
|
||||
return await self.call_and_deserialize(**kwargs)
|
||||
|
||||
async def DescribeBackUpSchedule(
|
||||
self,
|
||||
request: models.DescribeBackUpScheduleRequest,
|
||||
opts: Dict = None,
|
||||
) -> models.DescribeBackUpScheduleResponse:
|
||||
"""
|
||||
查询备份策略信息
|
||||
"""
|
||||
|
||||
kwargs = {}
|
||||
kwargs["action"] = "DescribeBackUpSchedule"
|
||||
kwargs["params"] = request._serialize()
|
||||
kwargs["resp_cls"] = models.DescribeBackUpScheduleResponse
|
||||
kwargs["headers"] = request.headers
|
||||
kwargs["opts"] = opts or {}
|
||||
|
||||
return await self.call_and_deserialize(**kwargs)
|
||||
|
||||
async def DescribeBackUpTables(
|
||||
self,
|
||||
request: models.DescribeBackUpTablesRequest,
|
||||
opts: Dict = None,
|
||||
) -> models.DescribeBackUpTablesResponse:
|
||||
"""
|
||||
获取可备份表信息
|
||||
"""
|
||||
|
||||
kwargs = {}
|
||||
kwargs["action"] = "DescribeBackUpTables"
|
||||
kwargs["params"] = request._serialize()
|
||||
kwargs["resp_cls"] = models.DescribeBackUpTablesResponse
|
||||
kwargs["headers"] = request.headers
|
||||
kwargs["opts"] = opts or {}
|
||||
|
||||
return await self.call_and_deserialize(**kwargs)
|
||||
|
||||
async def DescribeCNInstances(
|
||||
self,
|
||||
request: models.DescribeCNInstancesRequest,
|
||||
opts: Dict = None,
|
||||
) -> models.DescribeCNInstancesResponse:
|
||||
"""
|
||||
获取云原生实例列表
|
||||
"""
|
||||
|
||||
kwargs = {}
|
||||
kwargs["action"] = "DescribeCNInstances"
|
||||
kwargs["params"] = request._serialize()
|
||||
kwargs["resp_cls"] = models.DescribeCNInstancesResponse
|
||||
kwargs["headers"] = request.headers
|
||||
kwargs["opts"] = opts or {}
|
||||
|
||||
return await self.call_and_deserialize(**kwargs)
|
||||
|
||||
async def DescribeCkSqlApis(
|
||||
self,
|
||||
request: models.DescribeCkSqlApisRequest,
|
||||
opts: Dict = None,
|
||||
) -> models.DescribeCkSqlApisResponse:
|
||||
"""
|
||||
查询集群用户、集群表,数据库等相关信息
|
||||
"""
|
||||
|
||||
kwargs = {}
|
||||
kwargs["action"] = "DescribeCkSqlApis"
|
||||
kwargs["params"] = request._serialize()
|
||||
kwargs["resp_cls"] = models.DescribeCkSqlApisResponse
|
||||
kwargs["headers"] = request.headers
|
||||
kwargs["opts"] = opts or {}
|
||||
|
||||
return await self.call_and_deserialize(**kwargs)
|
||||
|
||||
async def DescribeClusterConfigs(
|
||||
self,
|
||||
request: models.DescribeClusterConfigsRequest,
|
||||
opts: Dict = None,
|
||||
) -> models.DescribeClusterConfigsResponse:
|
||||
"""
|
||||
获取集群的最新的几个配置文件(config.xml、metrika.xml、user.xml)的内容,显示给用户
|
||||
"""
|
||||
|
||||
kwargs = {}
|
||||
kwargs["action"] = "DescribeClusterConfigs"
|
||||
kwargs["params"] = request._serialize()
|
||||
kwargs["resp_cls"] = models.DescribeClusterConfigsResponse
|
||||
kwargs["headers"] = request.headers
|
||||
kwargs["opts"] = opts or {}
|
||||
|
||||
return await self.call_and_deserialize(**kwargs)
|
||||
|
||||
async def DescribeInstance(
|
||||
self,
|
||||
request: models.DescribeInstanceRequest,
|
||||
opts: Dict = None,
|
||||
) -> models.DescribeInstanceResponse:
|
||||
"""
|
||||
根据实例ID查询某个实例的具体信息
|
||||
"""
|
||||
|
||||
kwargs = {}
|
||||
kwargs["action"] = "DescribeInstance"
|
||||
kwargs["params"] = request._serialize()
|
||||
kwargs["resp_cls"] = models.DescribeInstanceResponse
|
||||
kwargs["headers"] = request.headers
|
||||
kwargs["opts"] = opts or {}
|
||||
|
||||
return await self.call_and_deserialize(**kwargs)
|
||||
|
||||
async def DescribeInstanceClusters(
|
||||
self,
|
||||
request: models.DescribeInstanceClustersRequest,
|
||||
opts: Dict = None,
|
||||
) -> models.DescribeInstanceClustersResponse:
|
||||
"""
|
||||
集群vcluster列表
|
||||
"""
|
||||
|
||||
kwargs = {}
|
||||
kwargs["action"] = "DescribeInstanceClusters"
|
||||
kwargs["params"] = request._serialize()
|
||||
kwargs["resp_cls"] = models.DescribeInstanceClustersResponse
|
||||
kwargs["headers"] = request.headers
|
||||
kwargs["opts"] = opts or {}
|
||||
|
||||
return await self.call_and_deserialize(**kwargs)
|
||||
|
||||
async def DescribeInstanceKeyValConfigs(
|
||||
self,
|
||||
request: models.DescribeInstanceKeyValConfigsRequest,
|
||||
opts: Dict = None,
|
||||
) -> models.DescribeInstanceKeyValConfigsResponse:
|
||||
"""
|
||||
在集群详情页面获取所有参数列表
|
||||
"""
|
||||
|
||||
kwargs = {}
|
||||
kwargs["action"] = "DescribeInstanceKeyValConfigs"
|
||||
kwargs["params"] = request._serialize()
|
||||
kwargs["resp_cls"] = models.DescribeInstanceKeyValConfigsResponse
|
||||
kwargs["headers"] = request.headers
|
||||
kwargs["opts"] = opts or {}
|
||||
|
||||
return await self.call_and_deserialize(**kwargs)
|
||||
|
||||
async def DescribeInstanceNodes(
|
||||
self,
|
||||
request: models.DescribeInstanceNodesRequest,
|
||||
opts: Dict = None,
|
||||
) -> models.DescribeInstanceNodesResponse:
|
||||
"""
|
||||
获取实例节点信息列表
|
||||
"""
|
||||
|
||||
kwargs = {}
|
||||
kwargs["action"] = "DescribeInstanceNodes"
|
||||
kwargs["params"] = request._serialize()
|
||||
kwargs["resp_cls"] = models.DescribeInstanceNodesResponse
|
||||
kwargs["headers"] = request.headers
|
||||
kwargs["opts"] = opts or {}
|
||||
|
||||
return await self.call_and_deserialize(**kwargs)
|
||||
|
||||
async def DescribeInstanceShards(
|
||||
self,
|
||||
request: models.DescribeInstanceShardsRequest,
|
||||
opts: Dict = None,
|
||||
) -> models.DescribeInstanceShardsResponse:
|
||||
"""
|
||||
获取实例shard信息列表
|
||||
"""
|
||||
|
||||
kwargs = {}
|
||||
kwargs["action"] = "DescribeInstanceShards"
|
||||
kwargs["params"] = request._serialize()
|
||||
kwargs["resp_cls"] = models.DescribeInstanceShardsResponse
|
||||
kwargs["headers"] = request.headers
|
||||
kwargs["opts"] = opts or {}
|
||||
|
||||
return await self.call_and_deserialize(**kwargs)
|
||||
|
||||
async def DescribeInstanceState(
|
||||
self,
|
||||
request: models.DescribeInstanceStateRequest,
|
||||
opts: Dict = None,
|
||||
) -> models.DescribeInstanceStateResponse:
|
||||
"""
|
||||
集群详情页中显示集群状态、流程进度等
|
||||
"""
|
||||
|
||||
kwargs = {}
|
||||
kwargs["action"] = "DescribeInstanceState"
|
||||
kwargs["params"] = request._serialize()
|
||||
kwargs["resp_cls"] = models.DescribeInstanceStateResponse
|
||||
kwargs["headers"] = request.headers
|
||||
kwargs["opts"] = opts or {}
|
||||
|
||||
return await self.call_and_deserialize(**kwargs)
|
||||
|
||||
async def DescribeInstancesNew(
|
||||
self,
|
||||
request: models.DescribeInstancesNewRequest,
|
||||
opts: Dict = None,
|
||||
) -> models.DescribeInstancesNewResponse:
|
||||
"""
|
||||
获取实例列表,供外部sdk使用
|
||||
"""
|
||||
|
||||
kwargs = {}
|
||||
kwargs["action"] = "DescribeInstancesNew"
|
||||
kwargs["params"] = request._serialize()
|
||||
kwargs["resp_cls"] = models.DescribeInstancesNewResponse
|
||||
kwargs["headers"] = request.headers
|
||||
kwargs["opts"] = opts or {}
|
||||
|
||||
return await self.call_and_deserialize(**kwargs)
|
||||
|
||||
async def DescribeSpec(
|
||||
self,
|
||||
request: models.DescribeSpecRequest,
|
||||
opts: Dict = None,
|
||||
) -> models.DescribeSpecResponse:
|
||||
"""
|
||||
购买页拉取集群的数据节点和zookeeper节点的规格列表
|
||||
"""
|
||||
|
||||
kwargs = {}
|
||||
kwargs["action"] = "DescribeSpec"
|
||||
kwargs["params"] = request._serialize()
|
||||
kwargs["resp_cls"] = models.DescribeSpecResponse
|
||||
kwargs["headers"] = request.headers
|
||||
kwargs["opts"] = opts or {}
|
||||
|
||||
return await self.call_and_deserialize(**kwargs)
|
||||
|
||||
async def DestroyInstance(
|
||||
self,
|
||||
request: models.DestroyInstanceRequest,
|
||||
opts: Dict = None,
|
||||
) -> models.DestroyInstanceResponse:
|
||||
"""
|
||||
销毁集群 open api
|
||||
"""
|
||||
|
||||
kwargs = {}
|
||||
kwargs["action"] = "DestroyInstance"
|
||||
kwargs["params"] = request._serialize()
|
||||
kwargs["resp_cls"] = models.DestroyInstanceResponse
|
||||
kwargs["headers"] = request.headers
|
||||
kwargs["opts"] = opts or {}
|
||||
|
||||
return await self.call_and_deserialize(**kwargs)
|
||||
|
||||
async def ModifyClusterConfigs(
|
||||
self,
|
||||
request: models.ModifyClusterConfigsRequest,
|
||||
opts: Dict = None,
|
||||
) -> models.ModifyClusterConfigsResponse:
|
||||
"""
|
||||
在集群配置页面修改集群配置文件接口,xml模式
|
||||
"""
|
||||
|
||||
kwargs = {}
|
||||
kwargs["action"] = "ModifyClusterConfigs"
|
||||
kwargs["params"] = request._serialize()
|
||||
kwargs["resp_cls"] = models.ModifyClusterConfigsResponse
|
||||
kwargs["headers"] = request.headers
|
||||
kwargs["opts"] = opts or {}
|
||||
|
||||
return await self.call_and_deserialize(**kwargs)
|
||||
|
||||
async def ModifyInstanceKeyValConfigs(
|
||||
self,
|
||||
request: models.ModifyInstanceKeyValConfigsRequest,
|
||||
opts: Dict = None,
|
||||
) -> models.ModifyInstanceKeyValConfigsResponse:
|
||||
"""
|
||||
KV模式修改配置接口
|
||||
"""
|
||||
|
||||
kwargs = {}
|
||||
kwargs["action"] = "ModifyInstanceKeyValConfigs"
|
||||
kwargs["params"] = request._serialize()
|
||||
kwargs["resp_cls"] = models.ModifyInstanceKeyValConfigsResponse
|
||||
kwargs["headers"] = request.headers
|
||||
kwargs["opts"] = opts or {}
|
||||
|
||||
return await self.call_and_deserialize(**kwargs)
|
||||
|
||||
async def ModifyUserNewPrivilege(
|
||||
self,
|
||||
request: models.ModifyUserNewPrivilegeRequest,
|
||||
opts: Dict = None,
|
||||
) -> models.ModifyUserNewPrivilegeResponse:
|
||||
"""
|
||||
针对集群账号的权限做管控(新版)
|
||||
"""
|
||||
|
||||
kwargs = {}
|
||||
kwargs["action"] = "ModifyUserNewPrivilege"
|
||||
kwargs["params"] = request._serialize()
|
||||
kwargs["resp_cls"] = models.ModifyUserNewPrivilegeResponse
|
||||
kwargs["headers"] = request.headers
|
||||
kwargs["opts"] = opts or {}
|
||||
|
||||
return await self.call_and_deserialize(**kwargs)
|
||||
|
||||
async def OpenBackUp(
|
||||
self,
|
||||
request: models.OpenBackUpRequest,
|
||||
opts: Dict = None,
|
||||
) -> models.OpenBackUpResponse:
|
||||
"""
|
||||
开启或者关闭策略
|
||||
"""
|
||||
|
||||
kwargs = {}
|
||||
kwargs["action"] = "OpenBackUp"
|
||||
kwargs["params"] = request._serialize()
|
||||
kwargs["resp_cls"] = models.OpenBackUpResponse
|
||||
kwargs["headers"] = request.headers
|
||||
kwargs["opts"] = opts or {}
|
||||
|
||||
return await self.call_and_deserialize(**kwargs)
|
||||
|
||||
async def RecoverBackUpJob(
|
||||
self,
|
||||
request: models.RecoverBackUpJobRequest,
|
||||
opts: Dict = None,
|
||||
) -> models.RecoverBackUpJobResponse:
|
||||
"""
|
||||
备份恢复
|
||||
"""
|
||||
|
||||
kwargs = {}
|
||||
kwargs["action"] = "RecoverBackUpJob"
|
||||
kwargs["params"] = request._serialize()
|
||||
kwargs["resp_cls"] = models.RecoverBackUpJobResponse
|
||||
kwargs["headers"] = request.headers
|
||||
kwargs["opts"] = opts or {}
|
||||
|
||||
return await self.call_and_deserialize(**kwargs)
|
||||
|
||||
async def ResizeDisk(
|
||||
self,
|
||||
request: models.ResizeDiskRequest,
|
||||
opts: Dict = None,
|
||||
) -> models.ResizeDiskResponse:
|
||||
"""
|
||||
扩容磁盘,包含扩容数据节点,zk节点
|
||||
"""
|
||||
|
||||
kwargs = {}
|
||||
kwargs["action"] = "ResizeDisk"
|
||||
kwargs["params"] = request._serialize()
|
||||
kwargs["resp_cls"] = models.ResizeDiskResponse
|
||||
kwargs["headers"] = request.headers
|
||||
kwargs["opts"] = opts or {}
|
||||
|
||||
return await self.call_and_deserialize(**kwargs)
|
||||
|
||||
async def ScaleCNOutUpInstance(
|
||||
self,
|
||||
request: models.ScaleCNOutUpInstanceRequest,
|
||||
opts: Dict = None,
|
||||
) -> models.ScaleCNOutUpInstanceResponse:
|
||||
"""
|
||||
open-api接口提供弹性伸缩云原生集群能力
|
||||
"""
|
||||
|
||||
kwargs = {}
|
||||
kwargs["action"] = "ScaleCNOutUpInstance"
|
||||
kwargs["params"] = request._serialize()
|
||||
kwargs["resp_cls"] = models.ScaleCNOutUpInstanceResponse
|
||||
kwargs["headers"] = request.headers
|
||||
kwargs["opts"] = opts or {}
|
||||
|
||||
return await self.call_and_deserialize(**kwargs)
|
||||
|
||||
async def ScaleOutInstance(
|
||||
self,
|
||||
request: models.ScaleOutInstanceRequest,
|
||||
opts: Dict = None,
|
||||
) -> models.ScaleOutInstanceResponse:
|
||||
"""
|
||||
调整clickhouse节点数量
|
||||
"""
|
||||
|
||||
kwargs = {}
|
||||
kwargs["action"] = "ScaleOutInstance"
|
||||
kwargs["params"] = request._serialize()
|
||||
kwargs["resp_cls"] = models.ScaleOutInstanceResponse
|
||||
kwargs["headers"] = request.headers
|
||||
kwargs["opts"] = opts or {}
|
||||
|
||||
return await self.call_and_deserialize(**kwargs)
|
||||
|
||||
async def ScaleUpInstance(
|
||||
self,
|
||||
request: models.ScaleUpInstanceRequest,
|
||||
opts: Dict = None,
|
||||
) -> models.ScaleUpInstanceResponse:
|
||||
"""
|
||||
垂直扩缩容节点规格,修改节点cvm的规格cpu,内存。 规格变化阶段,服务不可用。
|
||||
"""
|
||||
|
||||
kwargs = {}
|
||||
kwargs["action"] = "ScaleUpInstance"
|
||||
kwargs["params"] = request._serialize()
|
||||
kwargs["resp_cls"] = models.ScaleUpInstanceResponse
|
||||
kwargs["headers"] = request.headers
|
||||
kwargs["opts"] = opts or {}
|
||||
|
||||
return await self.call_and_deserialize(**kwargs)
|
||||
@@ -0,0 +1,42 @@
|
||||
# -*- coding: utf8 -*-
|
||||
# Copyright (c) 2017-2025 Tencent. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
|
||||
# 操作失败。
|
||||
FAILEDOPERATION = 'FailedOperation'
|
||||
|
||||
# Action连接集群执行sql超时
|
||||
FAILEDOPERATION_CLUSTEREXECUTEEXCEEDED = 'FailedOperation.ClusterExecuteExceeded'
|
||||
|
||||
# 内部错误。
|
||||
INTERNALERROR = 'InternalError'
|
||||
|
||||
# 参数错误。
|
||||
INVALIDPARAMETER = 'InvalidParameter'
|
||||
|
||||
# 参数取值错误。
|
||||
INVALIDPARAMETERVALUE = 'InvalidParameterValue'
|
||||
|
||||
# 操作被拒绝。
|
||||
OPERATIONDENIED = 'OperationDenied'
|
||||
|
||||
# 资源不存在。
|
||||
RESOURCENOTFOUND = 'ResourceNotFound'
|
||||
|
||||
# 资源不可用。
|
||||
RESOURCEUNAVAILABLE = 'ResourceUnavailable'
|
||||
|
||||
# 未知参数错误。
|
||||
UNKNOWNPARAMETER = 'UnknownParameter'
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user