第一次提交:阿龙电竞 Django 后端最新版本
This commit is contained in:
@@ -0,0 +1,141 @@
|
||||
# -*- 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.controlcenter.v20230110 import models
|
||||
|
||||
|
||||
class ControlcenterClient(AbstractClient):
|
||||
_apiVersion = '2023-01-10'
|
||||
_endpoint = 'controlcenter.tencentcloudapi.com'
|
||||
_service = 'controlcenter'
|
||||
|
||||
|
||||
def BatchApplyAccountBaselines(self, request):
|
||||
r"""批量对存量账号应用基线
|
||||
|
||||
:param request: Request instance for BatchApplyAccountBaselines.
|
||||
:type request: :class:`tencentcloud.controlcenter.v20230110.models.BatchApplyAccountBaselinesRequest`
|
||||
:rtype: :class:`tencentcloud.controlcenter.v20230110.models.BatchApplyAccountBaselinesResponse`
|
||||
|
||||
"""
|
||||
try:
|
||||
params = request._serialize()
|
||||
headers = request.headers
|
||||
body = self.call("BatchApplyAccountBaselines", params, headers=headers)
|
||||
response = json.loads(body)
|
||||
model = models.BatchApplyAccountBaselinesResponse()
|
||||
model._deserialize(response["Response"])
|
||||
return model
|
||||
except Exception as e:
|
||||
if isinstance(e, TencentCloudSDKException):
|
||||
raise
|
||||
else:
|
||||
raise TencentCloudSDKException(type(e).__name__, str(e))
|
||||
|
||||
|
||||
def GetAccountFactoryBaseline(self, request):
|
||||
r"""获取用户基线配置数据
|
||||
|
||||
:param request: Request instance for GetAccountFactoryBaseline.
|
||||
:type request: :class:`tencentcloud.controlcenter.v20230110.models.GetAccountFactoryBaselineRequest`
|
||||
:rtype: :class:`tencentcloud.controlcenter.v20230110.models.GetAccountFactoryBaselineResponse`
|
||||
|
||||
"""
|
||||
try:
|
||||
params = request._serialize()
|
||||
headers = request.headers
|
||||
body = self.call("GetAccountFactoryBaseline", params, headers=headers)
|
||||
response = json.loads(body)
|
||||
model = models.GetAccountFactoryBaselineResponse()
|
||||
model._deserialize(response["Response"])
|
||||
return model
|
||||
except Exception as e:
|
||||
if isinstance(e, TencentCloudSDKException):
|
||||
raise
|
||||
else:
|
||||
raise TencentCloudSDKException(type(e).__name__, str(e))
|
||||
|
||||
|
||||
def ListAccountFactoryBaselineItems(self, request):
|
||||
r"""获取账号工厂系统基线项
|
||||
|
||||
:param request: Request instance for ListAccountFactoryBaselineItems.
|
||||
:type request: :class:`tencentcloud.controlcenter.v20230110.models.ListAccountFactoryBaselineItemsRequest`
|
||||
:rtype: :class:`tencentcloud.controlcenter.v20230110.models.ListAccountFactoryBaselineItemsResponse`
|
||||
|
||||
"""
|
||||
try:
|
||||
params = request._serialize()
|
||||
headers = request.headers
|
||||
body = self.call("ListAccountFactoryBaselineItems", params, headers=headers)
|
||||
response = json.loads(body)
|
||||
model = models.ListAccountFactoryBaselineItemsResponse()
|
||||
model._deserialize(response["Response"])
|
||||
return model
|
||||
except Exception as e:
|
||||
if isinstance(e, TencentCloudSDKException):
|
||||
raise
|
||||
else:
|
||||
raise TencentCloudSDKException(type(e).__name__, str(e))
|
||||
|
||||
|
||||
def ListDeployStepTasks(self, request):
|
||||
r"""获取某个基线项历史应用信息
|
||||
|
||||
:param request: Request instance for ListDeployStepTasks.
|
||||
:type request: :class:`tencentcloud.controlcenter.v20230110.models.ListDeployStepTasksRequest`
|
||||
:rtype: :class:`tencentcloud.controlcenter.v20230110.models.ListDeployStepTasksResponse`
|
||||
|
||||
"""
|
||||
try:
|
||||
params = request._serialize()
|
||||
headers = request.headers
|
||||
body = self.call("ListDeployStepTasks", params, headers=headers)
|
||||
response = json.loads(body)
|
||||
model = models.ListDeployStepTasksResponse()
|
||||
model._deserialize(response["Response"])
|
||||
return model
|
||||
except Exception as e:
|
||||
if isinstance(e, TencentCloudSDKException):
|
||||
raise
|
||||
else:
|
||||
raise TencentCloudSDKException(type(e).__name__, str(e))
|
||||
|
||||
|
||||
def UpdateAccountFactoryBaseline(self, request):
|
||||
r"""更新用户当前基线项配置,基线配置会覆盖更新为当前配置。新增基线项时需要将新增的基线配置加到现有配置,删除基线项时需要将删除的基线配置从现有配置移除,然后保存最新基线配置。
|
||||
|
||||
:param request: Request instance for UpdateAccountFactoryBaseline.
|
||||
:type request: :class:`tencentcloud.controlcenter.v20230110.models.UpdateAccountFactoryBaselineRequest`
|
||||
:rtype: :class:`tencentcloud.controlcenter.v20230110.models.UpdateAccountFactoryBaselineResponse`
|
||||
|
||||
"""
|
||||
try:
|
||||
params = request._serialize()
|
||||
headers = request.headers
|
||||
body = self.call("UpdateAccountFactoryBaseline", params, headers=headers)
|
||||
response = json.loads(body)
|
||||
model = models.UpdateAccountFactoryBaselineResponse()
|
||||
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,116 @@
|
||||
# -*- 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.controlcenter.v20230110 import models
|
||||
from typing import Dict
|
||||
|
||||
|
||||
class ControlcenterClient(AbstractClient):
|
||||
_apiVersion = '2023-01-10'
|
||||
_endpoint = 'controlcenter.tencentcloudapi.com'
|
||||
_service = 'controlcenter'
|
||||
|
||||
async def BatchApplyAccountBaselines(
|
||||
self,
|
||||
request: models.BatchApplyAccountBaselinesRequest,
|
||||
opts: Dict = None,
|
||||
) -> models.BatchApplyAccountBaselinesResponse:
|
||||
"""
|
||||
批量对存量账号应用基线
|
||||
"""
|
||||
|
||||
kwargs = {}
|
||||
kwargs["action"] = "BatchApplyAccountBaselines"
|
||||
kwargs["params"] = request._serialize()
|
||||
kwargs["resp_cls"] = models.BatchApplyAccountBaselinesResponse
|
||||
kwargs["headers"] = request.headers
|
||||
kwargs["opts"] = opts or {}
|
||||
|
||||
return await self.call_and_deserialize(**kwargs)
|
||||
|
||||
async def GetAccountFactoryBaseline(
|
||||
self,
|
||||
request: models.GetAccountFactoryBaselineRequest,
|
||||
opts: Dict = None,
|
||||
) -> models.GetAccountFactoryBaselineResponse:
|
||||
"""
|
||||
获取用户基线配置数据
|
||||
"""
|
||||
|
||||
kwargs = {}
|
||||
kwargs["action"] = "GetAccountFactoryBaseline"
|
||||
kwargs["params"] = request._serialize()
|
||||
kwargs["resp_cls"] = models.GetAccountFactoryBaselineResponse
|
||||
kwargs["headers"] = request.headers
|
||||
kwargs["opts"] = opts or {}
|
||||
|
||||
return await self.call_and_deserialize(**kwargs)
|
||||
|
||||
async def ListAccountFactoryBaselineItems(
|
||||
self,
|
||||
request: models.ListAccountFactoryBaselineItemsRequest,
|
||||
opts: Dict = None,
|
||||
) -> models.ListAccountFactoryBaselineItemsResponse:
|
||||
"""
|
||||
获取账号工厂系统基线项
|
||||
"""
|
||||
|
||||
kwargs = {}
|
||||
kwargs["action"] = "ListAccountFactoryBaselineItems"
|
||||
kwargs["params"] = request._serialize()
|
||||
kwargs["resp_cls"] = models.ListAccountFactoryBaselineItemsResponse
|
||||
kwargs["headers"] = request.headers
|
||||
kwargs["opts"] = opts or {}
|
||||
|
||||
return await self.call_and_deserialize(**kwargs)
|
||||
|
||||
async def ListDeployStepTasks(
|
||||
self,
|
||||
request: models.ListDeployStepTasksRequest,
|
||||
opts: Dict = None,
|
||||
) -> models.ListDeployStepTasksResponse:
|
||||
"""
|
||||
获取某个基线项历史应用信息
|
||||
"""
|
||||
|
||||
kwargs = {}
|
||||
kwargs["action"] = "ListDeployStepTasks"
|
||||
kwargs["params"] = request._serialize()
|
||||
kwargs["resp_cls"] = models.ListDeployStepTasksResponse
|
||||
kwargs["headers"] = request.headers
|
||||
kwargs["opts"] = opts or {}
|
||||
|
||||
return await self.call_and_deserialize(**kwargs)
|
||||
|
||||
async def UpdateAccountFactoryBaseline(
|
||||
self,
|
||||
request: models.UpdateAccountFactoryBaselineRequest,
|
||||
opts: Dict = None,
|
||||
) -> models.UpdateAccountFactoryBaselineResponse:
|
||||
"""
|
||||
更新用户当前基线项配置,基线配置会覆盖更新为当前配置。新增基线项时需要将新增的基线配置加到现有配置,删除基线项时需要将删除的基线配置从现有配置移除,然后保存最新基线配置。
|
||||
"""
|
||||
|
||||
kwargs = {}
|
||||
kwargs["action"] = "UpdateAccountFactoryBaseline"
|
||||
kwargs["params"] = request._serialize()
|
||||
kwargs["resp_cls"] = models.UpdateAccountFactoryBaselineResponse
|
||||
kwargs["headers"] = request.headers
|
||||
kwargs["opts"] = opts or {}
|
||||
|
||||
return await self.call_and_deserialize(**kwargs)
|
||||
@@ -0,0 +1,60 @@
|
||||
# -*- 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_AFREQUIREDITEMNOTSELECT = 'FailedOperation.AFRequiredItemNotSelect'
|
||||
|
||||
# 联系人邮箱未验证。
|
||||
FAILEDOPERATION_ACCOUNTFACTORYCONTACTEMAILNOTVERIFY = 'FailedOperation.AccountFactoryContactEmailNotVerify'
|
||||
|
||||
# 联系人手机未验证。
|
||||
FAILEDOPERATION_ACCOUNTFACTORYCONTACTPHONENOTVERIFY = 'FailedOperation.AccountFactoryContactPhoneNotVerify'
|
||||
|
||||
# 账号工厂基线项的依赖项未配置
|
||||
FAILEDOPERATION_ACCOUNTFACTORYDEPENDONITEMNOTCONFIG = 'FailedOperation.AccountFactoryDependOnItemNotConfig'
|
||||
|
||||
# 账号工厂批量应用基线的账号数量超过限制
|
||||
FAILEDOPERATION_ACCOUNTFACTORYMEMBERUINNUMEXCEED = 'FailedOperation.AccountFactoryMemberUinNumExceed'
|
||||
|
||||
# 用户正在部署账号基线中,无法重复部署
|
||||
FAILEDOPERATION_ACCOUNTFACTORYTASKISDEPLOYING = 'FailedOperation.AccountFactoryTaskIsDeploying'
|
||||
|
||||
# Control Center服务未开通
|
||||
FAILEDOPERATION_CONTROLCENTERNOTOPEN = 'FailedOperation.ControlCenterNotOpen'
|
||||
|
||||
# 数据库操作异常
|
||||
FAILEDOPERATION_DBOPERATIONERROR = 'FailedOperation.DBOperationError'
|
||||
|
||||
# 依赖的功能项未部署
|
||||
FAILEDOPERATION_DEPENDONITEMNOTDEPLOY = 'FailedOperation.DependOnItemNotDeploy'
|
||||
|
||||
# 远程调用失败
|
||||
FAILEDOPERATION_REMOTECALLERROR = 'FailedOperation.RemoteCallError'
|
||||
|
||||
# 基线项预设标签数量超过最大数量
|
||||
INVALIDPARAMETER_ACCOUNTFACTORYTAGEXCEEDMAXNUM = 'InvalidParameter.AccountFactoryTagExceedMaxNum'
|
||||
|
||||
# 入参校验错误
|
||||
INVALIDPARAMETER_PARAMERROR = 'InvalidParameter.ParamError'
|
||||
|
||||
# 用户基线配置数据不存在
|
||||
RESOURCENOTFOUND_ACCOUNTFACTORYBASELINENOTEXIST = 'ResourceNotFound.AccountFactoryBaselineNotExist'
|
||||
|
||||
# 用户所部署的基线项未配置
|
||||
RESOURCENOTFOUND_ACCOUNTFACTORYITEMNOTCONFIG = 'ResourceNotFound.AccountFactoryItemNotConfig'
|
||||
|
||||
# 账号工厂基线不存在
|
||||
RESOURCENOTFOUND_ACCOUNTFACTORYITEMNOTEXIST = 'ResourceNotFound.AccountFactoryItemNotExist'
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user