第一次提交:阿龙电竞 Django 后端最新版本

This commit is contained in:
XingQue
2026-06-14 02:23:24 +08:00
commit 4f7bf00224
9654 changed files with 5417000 additions and 0 deletions

View File

@@ -0,0 +1,168 @@
# -*- 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'
# 欠费账户不能创建实例
FAILEDOPERATION_ARREARSACCOUNTCANNOTRUNINSTANCES = 'FailedOperation.ArrearsAccountCannotRunInstances'
# 资源不允许退还
FAILEDOPERATION_CANNOTRETURN = 'FailedOperation.CannotReturn'
# 并发操作实例失败
FAILEDOPERATION_OPERATEINSTANCEREPEATEDLY = 'FailedOperation.OperateInstanceRepeatedly'
# 内部错误。
INTERNALERROR = 'InternalError'
# 计费异常
INTERNALERROR_TRADEERROR = 'InternalError.TradeError'
# 参数错误。
INVALIDPARAMETER = 'InvalidParameter'
# 两个指定的入参每次只能使用其中一个
INVALIDPARAMETER_ATMOSTONE = 'InvalidParameter.AtMostOne'
# 参数取值错误。
INVALIDPARAMETERVALUE = 'InvalidParameterValue'
# 指定的应用不存在
INVALIDPARAMETERVALUE_APPLICATIONIDNOTFOUND = 'InvalidParameterValue.ApplicationIdNotFound'
# 算力套餐类型不存在
INVALIDPARAMETERVALUE_BUNDLETYPENOTFOUND = 'InvalidParameterValue.BundleTypeNotFound'
# 云盘大小设置必须大于实例当前的云盘大小
INVALIDPARAMETERVALUE_DISKSIZEMUSTLARGETHANCURRENTDISKSIZE = 'InvalidParameterValue.DiskSizeMustLargeThanCurrentDiskSize'
# 云盘大小需要大于应用所需云盘最小大小
INVALIDPARAMETERVALUE_DISKSIZEMUSTLARGERTHANAPPLICATIONMINREQUIREDSIZE = 'InvalidParameterValue.DiskSizeMustLargerThanApplicationMinRequiredSize'
# 云盘大小达到上限值
INVALIDPARAMETERVALUE_DISKSIZEREACHLIMIT = 'InvalidParameterValue.DiskSizeReachLimit'
# 列表入参中存在重复值
INVALIDPARAMETERVALUE_DUPLICATED = 'InvalidParameterValue.Duplicated'
# 指定的实例不存在
INVALIDPARAMETERVALUE_INSTANCEIDNOTFOUND = 'InvalidParameterValue.InstanceIdNotFound'
# 实例名称过长
INVALIDPARAMETERVALUE_INSTANCENAMETOOLONG = 'InvalidParameterValue.InstanceNameTooLong'
# 应用ID格式非法
INVALIDPARAMETERVALUE_INVALIDAPPLICATIONIDMALFORMED = 'InvalidParameterValue.InvalidApplicationIdMalformed'
# 自定义应用名称重复
INVALIDPARAMETERVALUE_INVALIDAPPLICATIONNAMEDUPLICATE = 'InvalidParameterValue.InvalidApplicationNameDuplicate'
# 应用类型application-type仅可以选择PUBLIC_APPLICATION,PRIVATE_APPLICATION或COMMUNITY_APPLICATION
INVALIDPARAMETERVALUE_INVALIDAPPLICATIONTYPE = 'InvalidParameterValue.InvalidApplicationType'
# 付费方式字段不符合规范
INVALIDPARAMETERVALUE_INVALIDCHARGETYPE = 'InvalidParameterValue.InvalidChargeType'
# 付费方式与时间单位不匹配
INVALIDPARAMETERVALUE_INVALIDCHARGETYPEANDTIMEUNIT = 'InvalidParameterValue.InvalidChargeTypeAndTimeUnit'
# 每次购买的实例数目不在合理范围内
INVALIDPARAMETERVALUE_INVALIDINSTANCECOUNT = 'InvalidParameterValue.InvalidInstanceCount'
# 实例ID格式非法
INVALIDPARAMETERVALUE_INVALIDINSTANCEIDMALFORMED = 'InvalidParameterValue.InvalidInstanceIdMalformed'
# 无效的排练顺序
INVALIDPARAMETERVALUE_INVALIDORDER = 'InvalidParameterValue.InvalidOrder'
# 无效的排序字段
INVALIDPARAMETERVALUE_INVALIDORDERFIELD = 'InvalidParameterValue.InvalidOrderField'
# 指定的密码不合规范。
INVALIDPARAMETERVALUE_INVALIDPASSWORD = 'InvalidParameterValue.InvalidPassword'
# 场景ID格式非法
INVALIDPARAMETERVALUE_INVALIDSCENEIDMALFORMED = 'InvalidParameterValue.InvalidSceneIdMalformed'
# 地域非法
INVALIDPARAMETERVALUE_REGIONINVALID = 'InvalidParameterValue.RegionInvalid'
# 无法找到指定的安全组
INVALIDPARAMETERVALUE_SECURITYGROUPNOTFOUND = 'InvalidParameterValue.SecurityGroupNotFound'
# 入参中若存在子网ID则必须同时存在VPC ID。
INVALIDPARAMETERVALUE_SUBNETMUSTCOEXISTWITHVPC = 'InvalidParameterValue.SubnetMustCoexistWithVpc'
# 无法找到指定的子网或该子网不属于指定的VPC
INVALIDPARAMETERVALUE_SUBNETNOTFOUND = 'InvalidParameterValue.SubnetNotFound'
# 无法找到指定的VPC
INVALIDPARAMETERVALUE_VPCNOTFOUND = 'InvalidParameterValue.VpcNotFound'
# 没有配额去为HAI创建新的安全组
LIMITEXCEEDED_SECURITYGROUPLIMITEXCEEDED = 'LimitExceeded.SecurityGroupLimitExceeded'
# 没有配额去为HAI创建新的VPC
LIMITEXCEEDED_VPCLIMITEXCEEDED = 'LimitExceeded.VpcLimitExceeded'
# 指定实例有正在执行的操作,不能执行新的操作
OPERATIONDENIED_INSTANCEOPERATIONINPROGRESS = 'OperationDenied.InstanceOperationInProgress'
# 指定的算力套餐库存不足
RESOURCEINSUFFICIENT_BUNDLEINVENTORYSHORTAGE = 'ResourceInsufficient.BundleInventoryShortage'
# 高性能应用服务相关角色获取失败,无法完成操作
UNAUTHORIZEDOPERATION_GETROLEERROR = 'UnauthorizedOperation.GetRoleError'
# token不正确
UNAUTHORIZEDOPERATION_INVALIDTOKEN = 'UnauthorizedOperation.InvalidToken'
# 用户账号的网络类型是传统型不允许使用HAI
UNAUTHORIZEDOPERATION_UNAUTHORIZEDNETWORKUSER = 'UnauthorizedOperation.UnauthorizedNetworkUser'
# 未认证的STS操作
UNAUTHORIZEDOPERATION_UNAUTHORIZEDSTSOPERATION = 'UnauthorizedOperation.UnauthorizedSTSOperation'
# 客户未授权使用本产品
UNAUTHORIZEDOPERATION_UNAUTHORIZEDUSER = 'UnauthorizedOperation.UnauthorizedUser'
# 不允许同时操作预付费过期实例和未过期实例
UNSUPPORTEDOPERATION_CANNOTTERMINATEEXPIREDANDNOTEXPIREDINSTANCES = 'UnsupportedOperation.CannotTerminateExpiredAndNotExpiredInstances'
# 实例不支持创建自定义应用
UNSUPPORTEDOPERATION_INSTANCECREATEAPPLICATIONNOTSUPPORT = 'UnsupportedOperation.InstanceCreateApplicationNotSupport'
# 不支持对处于`Arrears`状态的实例执行当前操作。
UNSUPPORTEDOPERATION_INSTANCESTATEARREARS = 'UnsupportedOperation.InstanceStateArrears'
# 不支持对处于`LaunchFailed`状态的实例执行当前操作。
UNSUPPORTEDOPERATION_INSTANCESTATELAUNCHFAILED = 'UnsupportedOperation.InstanceStateLaunchFailed'
# 不支持对处于`Pending`状态的实例执行当前操作。
UNSUPPORTEDOPERATION_INSTANCESTATEPENDING = 'UnsupportedOperation.InstanceStatePending'
# 不支持对处于`Running`状态的实例执行当前操作。
UNSUPPORTEDOPERATION_INSTANCESTATERUNNING = 'UnsupportedOperation.InstanceStateRunning'
# 不支持对处于`StoppedNoCharge`状态的实例执行当前操作。
UNSUPPORTEDOPERATION_INSTANCESTATESTOPPEDNOCHARGE = 'UnsupportedOperation.InstanceStateStoppedNoCharge'
# 不支持对处于`Terminated`状态的实例执行当前操作。
UNSUPPORTEDOPERATION_INSTANCESTATETERMINATED = 'UnsupportedOperation.InstanceStateTerminated'
# 不支持同时操作预付费和后付费实例
UNSUPPORTEDOPERATION_NOTSUPPORTTERMINATEPREPAIDANDPOSTPAID = 'UnsupportedOperation.NotSupportTerminatePrePaidAndPostPaid'

View File

@@ -0,0 +1,396 @@
# -*- 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.hai.v20230812 import models
class HaiClient(AbstractClient):
_apiVersion = '2023-08-12'
_endpoint = 'hai.tencentcloudapi.com'
_service = 'hai'
def CreateApplication(self, request):
r"""本接口CreateApplication用于对HAI实例制作自定义应用。
:param request: Request instance for CreateApplication.
:type request: :class:`tencentcloud.hai.v20230812.models.CreateApplicationRequest`
:rtype: :class:`tencentcloud.hai.v20230812.models.CreateApplicationResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CreateApplication", params, headers=headers)
response = json.loads(body)
model = models.CreateApplicationResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def CreateMuskPrompt(self, request):
r"""创建musk prompt 任务
:param request: Request instance for CreateMuskPrompt.
:type request: :class:`tencentcloud.hai.v20230812.models.CreateMuskPromptRequest`
:rtype: :class:`tencentcloud.hai.v20230812.models.CreateMuskPromptResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("CreateMuskPrompt", params, headers=headers)
response = json.loads(body)
model = models.CreateMuskPromptResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeApplications(self, request):
r"""本接口DescribeApplications用于查询应用
:param request: Request instance for DescribeApplications.
:type request: :class:`tencentcloud.hai.v20230812.models.DescribeApplicationsRequest`
:rtype: :class:`tencentcloud.hai.v20230812.models.DescribeApplicationsResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeApplications", params, headers=headers)
response = json.loads(body)
model = models.DescribeApplicationsResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeInstanceNetworkStatus(self, request):
r"""本接口DescribeInstanceNetworkStatus用于查询实例的网络配置及消耗情况
:param request: Request instance for DescribeInstanceNetworkStatus.
:type request: :class:`tencentcloud.hai.v20230812.models.DescribeInstanceNetworkStatusRequest`
:rtype: :class:`tencentcloud.hai.v20230812.models.DescribeInstanceNetworkStatusResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeInstanceNetworkStatus", params, headers=headers)
response = json.loads(body)
model = models.DescribeInstanceNetworkStatusResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeInstances(self, request):
r"""本接口DescribeInstances用户查询实例
:param request: Request instance for DescribeInstances.
:type request: :class:`tencentcloud.hai.v20230812.models.DescribeInstancesRequest`
:rtype: :class:`tencentcloud.hai.v20230812.models.DescribeInstancesResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeInstances", params, headers=headers)
response = json.loads(body)
model = models.DescribeInstancesResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeMuskPrompts(self, request):
r"""获取prompt任务列表
:param request: Request instance for DescribeMuskPrompts.
:type request: :class:`tencentcloud.hai.v20230812.models.DescribeMuskPromptsRequest`
:rtype: :class:`tencentcloud.hai.v20230812.models.DescribeMuskPromptsResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeMuskPrompts", params, headers=headers)
response = json.loads(body)
model = models.DescribeMuskPromptsResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeRegions(self, request):
r"""本接口DescribeRegions用于查询地域列表
:param request: Request instance for DescribeRegions.
:type request: :class:`tencentcloud.hai.v20230812.models.DescribeRegionsRequest`
:rtype: :class:`tencentcloud.hai.v20230812.models.DescribeRegionsResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeRegions", params, headers=headers)
response = json.loads(body)
model = models.DescribeRegionsResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeScenes(self, request):
r"""本接口DescribeScenes用于查询场景
:param request: Request instance for DescribeScenes.
:type request: :class:`tencentcloud.hai.v20230812.models.DescribeScenesRequest`
:rtype: :class:`tencentcloud.hai.v20230812.models.DescribeScenesResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeScenes", params, headers=headers)
response = json.loads(body)
model = models.DescribeScenesResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def DescribeServiceLoginSettings(self, request):
r"""本接口DescribeServiceLoginSettings用于查询服务登录配置
:param request: Request instance for DescribeServiceLoginSettings.
:type request: :class:`tencentcloud.hai.v20230812.models.DescribeServiceLoginSettingsRequest`
:rtype: :class:`tencentcloud.hai.v20230812.models.DescribeServiceLoginSettingsResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("DescribeServiceLoginSettings", params, headers=headers)
response = json.loads(body)
model = models.DescribeServiceLoginSettingsResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def InquirePriceRunInstances(self, request):
r"""本接口 (InquirePriceRunInstances) 用于实例询价。
:param request: Request instance for InquirePriceRunInstances.
:type request: :class:`tencentcloud.hai.v20230812.models.InquirePriceRunInstancesRequest`
:rtype: :class:`tencentcloud.hai.v20230812.models.InquirePriceRunInstancesResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("InquirePriceRunInstances", params, headers=headers)
response = json.loads(body)
model = models.InquirePriceRunInstancesResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def ResetInstancesPassword(self, request):
r"""本接口 (ResetInstancesPassword) 用于重置实例的用户密码。
:param request: Request instance for ResetInstancesPassword.
:type request: :class:`tencentcloud.hai.v20230812.models.ResetInstancesPasswordRequest`
:rtype: :class:`tencentcloud.hai.v20230812.models.ResetInstancesPasswordResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("ResetInstancesPassword", params, headers=headers)
response = json.loads(body)
model = models.ResetInstancesPasswordResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def ResizeInstanceDisk(self, request):
r"""本接口ResizeInstanceDisk用于对指定HAI实例进行扩容云硬盘操作。
:param request: Request instance for ResizeInstanceDisk.
:type request: :class:`tencentcloud.hai.v20230812.models.ResizeInstanceDiskRequest`
:rtype: :class:`tencentcloud.hai.v20230812.models.ResizeInstanceDiskResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("ResizeInstanceDisk", params, headers=headers)
response = json.loads(body)
model = models.ResizeInstanceDiskResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def RunInstances(self, request):
r"""本接口 (RunInstances) 用于创建一个或多个指定配置的实例。
:param request: Request instance for RunInstances.
:type request: :class:`tencentcloud.hai.v20230812.models.RunInstancesRequest`
:rtype: :class:`tencentcloud.hai.v20230812.models.RunInstancesResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("RunInstances", params, headers=headers)
response = json.loads(body)
model = models.RunInstancesResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def StartInstance(self, request):
r"""本接口 (StartInstance) 用于主动启动实例。
‘运行中’、‘预付费’的实例不支持启动实例
:param request: Request instance for StartInstance.
:type request: :class:`tencentcloud.hai.v20230812.models.StartInstanceRequest`
:rtype: :class:`tencentcloud.hai.v20230812.models.StartInstanceResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("StartInstance", params, headers=headers)
response = json.loads(body)
model = models.StartInstanceResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def StopInstance(self, request):
r"""本接口 (StopInstance) 用于主动关闭实例。
‘已关机’、‘预付费’的实例不支持关机
:param request: Request instance for StopInstance.
:type request: :class:`tencentcloud.hai.v20230812.models.StopInstanceRequest`
:rtype: :class:`tencentcloud.hai.v20230812.models.StopInstanceResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("StopInstance", params, headers=headers)
response = json.loads(body)
model = models.StopInstanceResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))
def TerminateInstances(self, request):
r"""本接口 (TerminateInstances) 用于主动退还实例。
:param request: Request instance for TerminateInstances.
:type request: :class:`tencentcloud.hai.v20230812.models.TerminateInstancesRequest`
:rtype: :class:`tencentcloud.hai.v20230812.models.TerminateInstancesResponse`
"""
try:
params = request._serialize()
headers = request.headers
body = self.call("TerminateInstances", params, headers=headers)
response = json.loads(body)
model = models.TerminateInstancesResponse()
model._deserialize(response["Response"])
return model
except Exception as e:
if isinstance(e, TencentCloudSDKException):
raise
else:
raise TencentCloudSDKException(type(e).__name__, str(e))

View File

@@ -0,0 +1,316 @@
# -*- 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.hai.v20230812 import models
from typing import Dict
class HaiClient(AbstractClient):
_apiVersion = '2023-08-12'
_endpoint = 'hai.tencentcloudapi.com'
_service = 'hai'
async def CreateApplication(
self,
request: models.CreateApplicationRequest,
opts: Dict = None,
) -> models.CreateApplicationResponse:
"""
本接口CreateApplication用于对HAI实例制作自定义应用。
"""
kwargs = {}
kwargs["action"] = "CreateApplication"
kwargs["params"] = request._serialize()
kwargs["resp_cls"] = models.CreateApplicationResponse
kwargs["headers"] = request.headers
kwargs["opts"] = opts or {}
return await self.call_and_deserialize(**kwargs)
async def CreateMuskPrompt(
self,
request: models.CreateMuskPromptRequest,
opts: Dict = None,
) -> models.CreateMuskPromptResponse:
"""
创建musk prompt 任务
"""
kwargs = {}
kwargs["action"] = "CreateMuskPrompt"
kwargs["params"] = request._serialize()
kwargs["resp_cls"] = models.CreateMuskPromptResponse
kwargs["headers"] = request.headers
kwargs["opts"] = opts or {}
return await self.call_and_deserialize(**kwargs)
async def DescribeApplications(
self,
request: models.DescribeApplicationsRequest,
opts: Dict = None,
) -> models.DescribeApplicationsResponse:
"""
本接口DescribeApplications用于查询应用
"""
kwargs = {}
kwargs["action"] = "DescribeApplications"
kwargs["params"] = request._serialize()
kwargs["resp_cls"] = models.DescribeApplicationsResponse
kwargs["headers"] = request.headers
kwargs["opts"] = opts or {}
return await self.call_and_deserialize(**kwargs)
async def DescribeInstanceNetworkStatus(
self,
request: models.DescribeInstanceNetworkStatusRequest,
opts: Dict = None,
) -> models.DescribeInstanceNetworkStatusResponse:
"""
本接口DescribeInstanceNetworkStatus用于查询实例的网络配置及消耗情况
"""
kwargs = {}
kwargs["action"] = "DescribeInstanceNetworkStatus"
kwargs["params"] = request._serialize()
kwargs["resp_cls"] = models.DescribeInstanceNetworkStatusResponse
kwargs["headers"] = request.headers
kwargs["opts"] = opts or {}
return await self.call_and_deserialize(**kwargs)
async def DescribeInstances(
self,
request: models.DescribeInstancesRequest,
opts: Dict = None,
) -> models.DescribeInstancesResponse:
"""
本接口DescribeInstances用户查询实例
"""
kwargs = {}
kwargs["action"] = "DescribeInstances"
kwargs["params"] = request._serialize()
kwargs["resp_cls"] = models.DescribeInstancesResponse
kwargs["headers"] = request.headers
kwargs["opts"] = opts or {}
return await self.call_and_deserialize(**kwargs)
async def DescribeMuskPrompts(
self,
request: models.DescribeMuskPromptsRequest,
opts: Dict = None,
) -> models.DescribeMuskPromptsResponse:
"""
获取prompt任务列表
"""
kwargs = {}
kwargs["action"] = "DescribeMuskPrompts"
kwargs["params"] = request._serialize()
kwargs["resp_cls"] = models.DescribeMuskPromptsResponse
kwargs["headers"] = request.headers
kwargs["opts"] = opts or {}
return await self.call_and_deserialize(**kwargs)
async def DescribeRegions(
self,
request: models.DescribeRegionsRequest,
opts: Dict = None,
) -> models.DescribeRegionsResponse:
"""
本接口DescribeRegions用于查询地域列表
"""
kwargs = {}
kwargs["action"] = "DescribeRegions"
kwargs["params"] = request._serialize()
kwargs["resp_cls"] = models.DescribeRegionsResponse
kwargs["headers"] = request.headers
kwargs["opts"] = opts or {}
return await self.call_and_deserialize(**kwargs)
async def DescribeScenes(
self,
request: models.DescribeScenesRequest,
opts: Dict = None,
) -> models.DescribeScenesResponse:
"""
本接口DescribeScenes用于查询场景
"""
kwargs = {}
kwargs["action"] = "DescribeScenes"
kwargs["params"] = request._serialize()
kwargs["resp_cls"] = models.DescribeScenesResponse
kwargs["headers"] = request.headers
kwargs["opts"] = opts or {}
return await self.call_and_deserialize(**kwargs)
async def DescribeServiceLoginSettings(
self,
request: models.DescribeServiceLoginSettingsRequest,
opts: Dict = None,
) -> models.DescribeServiceLoginSettingsResponse:
"""
本接口DescribeServiceLoginSettings用于查询服务登录配置
"""
kwargs = {}
kwargs["action"] = "DescribeServiceLoginSettings"
kwargs["params"] = request._serialize()
kwargs["resp_cls"] = models.DescribeServiceLoginSettingsResponse
kwargs["headers"] = request.headers
kwargs["opts"] = opts or {}
return await self.call_and_deserialize(**kwargs)
async def InquirePriceRunInstances(
self,
request: models.InquirePriceRunInstancesRequest,
opts: Dict = None,
) -> models.InquirePriceRunInstancesResponse:
"""
本接口 (InquirePriceRunInstances) 用于实例询价。
"""
kwargs = {}
kwargs["action"] = "InquirePriceRunInstances"
kwargs["params"] = request._serialize()
kwargs["resp_cls"] = models.InquirePriceRunInstancesResponse
kwargs["headers"] = request.headers
kwargs["opts"] = opts or {}
return await self.call_and_deserialize(**kwargs)
async def ResetInstancesPassword(
self,
request: models.ResetInstancesPasswordRequest,
opts: Dict = None,
) -> models.ResetInstancesPasswordResponse:
"""
本接口 (ResetInstancesPassword) 用于重置实例的用户密码。
"""
kwargs = {}
kwargs["action"] = "ResetInstancesPassword"
kwargs["params"] = request._serialize()
kwargs["resp_cls"] = models.ResetInstancesPasswordResponse
kwargs["headers"] = request.headers
kwargs["opts"] = opts or {}
return await self.call_and_deserialize(**kwargs)
async def ResizeInstanceDisk(
self,
request: models.ResizeInstanceDiskRequest,
opts: Dict = None,
) -> models.ResizeInstanceDiskResponse:
"""
本接口ResizeInstanceDisk用于对指定HAI实例进行扩容云硬盘操作。
"""
kwargs = {}
kwargs["action"] = "ResizeInstanceDisk"
kwargs["params"] = request._serialize()
kwargs["resp_cls"] = models.ResizeInstanceDiskResponse
kwargs["headers"] = request.headers
kwargs["opts"] = opts or {}
return await self.call_and_deserialize(**kwargs)
async def RunInstances(
self,
request: models.RunInstancesRequest,
opts: Dict = None,
) -> models.RunInstancesResponse:
"""
本接口 (RunInstances) 用于创建一个或多个指定配置的实例。
"""
kwargs = {}
kwargs["action"] = "RunInstances"
kwargs["params"] = request._serialize()
kwargs["resp_cls"] = models.RunInstancesResponse
kwargs["headers"] = request.headers
kwargs["opts"] = opts or {}
return await self.call_and_deserialize(**kwargs)
async def StartInstance(
self,
request: models.StartInstanceRequest,
opts: Dict = None,
) -> models.StartInstanceResponse:
"""
本接口 (StartInstance) 用于主动启动实例。
‘运行中’、‘预付费’的实例不支持启动实例
"""
kwargs = {}
kwargs["action"] = "StartInstance"
kwargs["params"] = request._serialize()
kwargs["resp_cls"] = models.StartInstanceResponse
kwargs["headers"] = request.headers
kwargs["opts"] = opts or {}
return await self.call_and_deserialize(**kwargs)
async def StopInstance(
self,
request: models.StopInstanceRequest,
opts: Dict = None,
) -> models.StopInstanceResponse:
"""
本接口 (StopInstance) 用于主动关闭实例。
‘已关机’、‘预付费’的实例不支持关机
"""
kwargs = {}
kwargs["action"] = "StopInstance"
kwargs["params"] = request._serialize()
kwargs["resp_cls"] = models.StopInstanceResponse
kwargs["headers"] = request.headers
kwargs["opts"] = opts or {}
return await self.call_and_deserialize(**kwargs)
async def TerminateInstances(
self,
request: models.TerminateInstancesRequest,
opts: Dict = None,
) -> models.TerminateInstancesResponse:
"""
本接口 (TerminateInstances) 用于主动退还实例。
"""
kwargs = {}
kwargs["action"] = "TerminateInstances"
kwargs["params"] = request._serialize()
kwargs["resp_cls"] = models.TerminateInstancesResponse
kwargs["headers"] = request.headers
kwargs["opts"] = opts or {}
return await self.call_and_deserialize(**kwargs)

File diff suppressed because it is too large Load Diff