@@ -15,6 +15,58 @@ def __init__(
1515 config , transport , middleware , logger
1616 )
1717
18+ def create_comp_share_instance (
19+ self , req : typing .Optional [dict ] = None , ** kwargs
20+ ) -> dict :
21+ """CreateCompShareInstance - 创建轻量级算力平台主机资源
22+
23+ **Request**
24+
25+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
26+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
27+ - **CPU** (int) - (Required) 虚拟CPU核数。可选参数:1-64(具体机型与CPU的对应关系参照控制台)。默认值: 4。
28+ - **CompShareImageId** (str) - (Required) 镜像ID
29+ - **GPU** (int) - (Required) GPU卡核心数。仅GPU机型支持此字段(可选范围与MachineType+GpuType相关)
30+ - **GpuType** (str) - (Required) GPU类型,枚举值["K80", "P40", "V100", "T4","T4A", "T4S","2080Ti","2080Ti-4C","1080Ti", "T4/4", "MI100", "V100S",2080","2080TiS","2080TiPro","3090","A100"],MachineType为G时必填
31+ - **MachineType** (str) - (Required) 云主机机型(V2.0),在本字段和字段UHostType中,仅需要其中1个字段即可。枚举值["N", "C", "G", "O", "OS", "OM", "OPRO", "OMAX", "O.BM", "O.EPC"]。参考 `云主机机型说明 <https://docs.ucloud.cn/api/uhost-api/uhost_type>`_ 。
32+ - **Memory** (int) - (Required) 内存大小。单位:MB。范围 :[1024, 262144],取值为1024的倍数(可选范围参考控制台)。默认值:8192
33+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
34+ - **ChargeType** (str) - 计费模式。枚举值为: \\ > Month,按月付费;\\ > Day,按天付费;\\ > Dynamic,按小时预付费 \\ > Postpay,按小时后付费(支持关机不收费,目前仅部分可用区支持,请联系您的客户经理) \\ > Spot计费为抢占式实例(内测阶段) \\ 默认为月付
35+ - **Disks** (list) - 见 **CreateCompShareInstanceParamDisks** 模型定义
36+ - **LoginMode** (str) - 主机登陆模式。密码(默认选项): Password
37+ - **MinimalCpuPlatform** (str) - 最低cpu平台,枚举值["Intel/Auto", "Intel/IvyBridge", "Intel/Haswell", "Intel/Broadwell", "Intel/Skylake", "Intel/Cascadelake", "Intel/CascadelakeR", "Intel/IceLake", "Amd/Epyc2", "Amd/Auto","Ampere/Auto","Ampere/Altra"],默认值是"Intel/Auto"。
38+ - **Name** (str) - 实例名称
39+ - **Password** (str) - UHost密码。请遵照 `字段规范 <https://docs.ucloud.cn/api/uhost-api/specification>`_ 设定密码。密码需使用base64进行编码,举例如下:# echo -n Password1 | base64UGFzc3dvcmQx。
40+ - **Quantity** (int) - 购买时长。默认:值 1。按小时购买(Dynamic/Postpay)时无需此参数。 月付时,此参数传0,代表购买至月末。
41+ - **SecurityGroupId** (str) - 防火墙Id
42+
43+ **Response**
44+
45+ - **UHostIds** (list) - UHost实例Id集合
46+
47+ **Request Model**
48+
49+ **CreateCompShareInstanceParamDisks**
50+ - **IsBoot** (bool) - 是否是系统盘。枚举值:\\ > True,是系统盘 \\ > False,是数据盘(默认)。Disks数组中有且只能有一块盘是系统盘。
51+ - **Size** (int) - 磁盘大小,单位GB。请参考 `磁盘类型 <https://docs.ucloud.cn/api/uhost-api/disk_type>`_ 。
52+ - **Type** (str) - 磁盘类型。请参考 `磁盘类型 <https://docs.ucloud.cn/api/uhost-api/disk_type>`_ 。
53+
54+
55+ """
56+ # build request
57+ d = {
58+ "ProjectId" : self .config .project_id ,
59+ "Region" : self .config .region ,
60+ }
61+ req and d .update (req )
62+ d = apis .CreateCompShareInstanceRequestSchema ().dumps (d )
63+
64+ # build options
65+ kwargs ["max_retries" ] = 0 # ignore retry when api is not idempotent
66+
67+ resp = self .invoke ("CreateCompShareInstance" , d , ** kwargs )
68+ return apis .CreateCompShareInstanceResponseSchema ().loads (resp )
69+
1870 def create_ul_host_instance (
1971 self , req : typing .Optional [dict ] = None , ** kwargs
2072 ) -> dict :
@@ -67,6 +119,7 @@ def describe_comp_share_instance(
67119 - **Limit** (int) - 返回数据长度,默认为20,最大100
68120 - **Offset** (int) - 列表起始位置偏移量,默认为0
69121 - **UHostIds** (list) - 【数组】UHost主机的资源ID,例如UHostIds.0代表希望获取信息 的主机1,UHostIds.1代表主机2。 如果不传入,则返回当前Region 所有符合条件的UHost实例。
122+ - **WithoutGpu** (bool) - 无卡GPU
70123 - **Zone** (str) - 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
71124
72125 **Response**
@@ -89,41 +142,35 @@ def describe_comp_share_instance(
89142 - **CompShareImageType** (str) - 镜像类型- System 系统镜像- App 应用镜像- Custom 自制镜像- Community 社区镜像
90143 - **CpuArch** (str) - CPU架构。"x86_64"/"i386"等
91144 - **CpuPlatform** (str) - CPU平台。如"Intel/Auto"、"Amd/Auto"等等
92- - **CreateTime** (str ) - 创建时间
145+ - **CreateTime** (int ) - 创建时间
93146 - **DiskSet** (list) - 见 **UHostDiskSet** 模型定义
94- - **ExpireTime** (str ) - 过期时间
147+ - **ExpireTime** (int ) - 过期时间
95148 - **GPU** (int) - GPU个数
96149 - **GpuType** (str) - GPU类型。如: "4090"
97150 - **GraphicsMemory** (dict) - 见 **GraphicsMemory** 模型定义
98- - **HostIp** (str) - 【内部API返回】宿主IP
99- - **HugepageCfg** (str) - 【内部API返回】大页内存
100151 - **IPSet** (list) - 见 **UHostIPSet** 模型定义
101152 - **InstancePrice** (float) - 主机价格
102153 - **InstanceType** (str) - 实例类型。"UHost": 普通主机;"Container": 容器主机
103154 - **IsExpire** (str) - 是否过期。Yes:已过期;No:未过期
104155 - **MachineType** (str) - 机型信息
105- - **Memory** (str ) - 内存大小,单位:MB
156+ - **Memory** (int ) - 内存大小,单位:MB
106157 - **Name** (str) - 实例名称
107158 - **OsName** (str) - 虚机镜像的名称
108159 - **OsType** (str) - 虚机镜像操作系统类型。"Linux"\" Windows"
109160 - **Password** (str) - 主机密码。由Base64编码
110- - **PodId** (str) - 【内部API返回】udisk podId
111- - **PostPayShutdown** (bool) - 【内部API返回】后付费关机
112- - **QemuFullVersion** (str) - 【内部API返回】Qemu完整版本号
113- - **QemuVersion** (str) - 【内部API返回】Qemu版本号
114161 - **Remark** (str) - 实例备注
115- - **SetId** (int) - 【内部API返回】宿主所在Set Id
116162 - **Softwares** (list) - 见 **SoftwareAddr** 模型定义
163+ - **SshLoginCommand** (str) - SSH登录命令
117164 - **State** (str) - 实例状态,枚举值:\\ >初始化: Initializing; \\ >启动中: Starting; \\ > 运行中: Running; \\ > 关机中: Stopping; \\ >关机: Stopped \\ >安装失败: Install Fail; \\ >重启中: Rebooting; \\ >升级改配中: Resizing; \\ > 未知(空字符串,获取状态超时或出错):
165+ - **SupportWithoutGpuStart** (bool) - 此实例是否支持无卡开机
118166 - **Tag** (str) - 实例业务组
119167 - **TotalDiskSpace** (int) - 总的数据盘存储空间
120168 - **UHostId** (str) - 实例Id
121- - **UUID ** (str ) - 【内部API返回】资源长Id
169+ - **WithoutGpuSpec ** (dict ) - 见 **WithoutGpuSpec** 模型定义
122170 - **Zone** (str) - 可用区
123171
124172
125173 **UHostDiskSet**
126- - **BackupType** (str) - 备份方案。若开通了数据方舟,则为DATAARK
127174 - **DiskId** (str) - 磁盘ID
128175 - **DiskType** (str) - 磁盘类型。请参考 `磁盘类型 <https://docs.ucloud.cn/api/uhost-api/disk_type>`_ 。
129176 - **Drive** (str) - 磁盘盘符
@@ -158,6 +205,12 @@ def describe_comp_share_instance(
158205 - **URL** (str) - 软件地址
159206
160207
208+ **WithoutGpuSpec**
209+ - **Cpu** (int) - cpu
210+ - **Gpu** (int) - gpu
211+ - **Memory** (int) - 内存
212+
213+
161214 """
162215 # build request
163216 d = {
@@ -235,7 +288,7 @@ def describe_ul_host_instance(
235288 - **ChargeType** (str) - 计费模式。枚举值:Month/Year
236289 - **CreateTime** (int) - 创建时间。Unix时间戳
237290 - **DiskSet** (list) - 见 **ULHostDiskSet** 模型定义
238- - **ExclusiveUTPInfo ** (dict) - 见 **ExclusiveUTPInfo** 模型定义
291+ - **EIPExclusiveUTPInfo ** (dict) - 见 **ExclusiveUTPInfo** 模型定义
239292 - **ExpireTime** (int) - 过期时间。Unix时间戳
240293 - **IPSet** (list) - 见 **UHostIPSet** 模型定义
241294 - **ImageId** (str) - 镜像Id。
@@ -427,6 +480,34 @@ def poweroff_ul_host_instance(
427480 resp = self .invoke ("PoweroffULHostInstance" , d , ** kwargs )
428481 return apis .PoweroffULHostInstanceResponseSchema ().loads (resp )
429482
483+ def reboot_comp_share_instance (
484+ self , req : typing .Optional [dict ] = None , ** kwargs
485+ ) -> dict :
486+ """RebootCompShareInstance - 重启轻量算力平台实例
487+
488+ **Request**
489+
490+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
491+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
492+ - **UHostId** (str) - (Required) 实例Id
493+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
494+
495+ **Response**
496+
497+ - **UHostId** (str) - 实例Id
498+
499+ """
500+ # build request
501+ d = {
502+ "ProjectId" : self .config .project_id ,
503+ "Region" : self .config .region ,
504+ }
505+ req and d .update (req )
506+ d = apis .RebootCompShareInstanceRequestSchema ().dumps (d )
507+
508+ resp = self .invoke ("RebootCompShareInstance" , d , ** kwargs )
509+ return apis .RebootCompShareInstanceResponseSchema ().loads (resp )
510+
430511 def reboot_ul_host_instance (
431512 self , req : typing .Optional [dict ] = None , ** kwargs
432513 ) -> dict :
@@ -464,9 +545,9 @@ def reinstall_comp_share_instance(
464545 - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
465546 - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
466547 - **CompShareImageId** (str) - (Required) 镜像Id
467- - **Password** (str) - (Required) 实例的新密码
468548 - **UHostId** (str) - (Required) 实例Id
469549 - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
550+ - **Password** (str) - 实例的新密码
470551
471552 **Response**
472553
@@ -514,6 +595,35 @@ def reinstall_ul_host_instance(
514595 resp = self .invoke ("ReinstallULHostInstance" , d , ** kwargs )
515596 return apis .ReinstallULHostInstanceResponseSchema ().loads (resp )
516597
598+ def reset_comp_share_instance_password (
599+ self , req : typing .Optional [dict ] = None , ** kwargs
600+ ) -> dict :
601+ """ResetCompShareInstancePassword - 重置算力平台实例密码
602+
603+ **Request**
604+
605+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
606+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
607+ - **Password** (str) - (Required) 新密码。需经Base64编码
608+ - **UHostId** (str) - (Required) 实例Id
609+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
610+
611+ **Response**
612+
613+ - **UHostId** (str) - 实例Id
614+
615+ """
616+ # build request
617+ d = {
618+ "ProjectId" : self .config .project_id ,
619+ "Region" : self .config .region ,
620+ }
621+ req and d .update (req )
622+ d = apis .ResetCompShareInstancePasswordRequestSchema ().dumps (d )
623+
624+ resp = self .invoke ("ResetCompShareInstancePassword" , d , ** kwargs )
625+ return apis .ResetCompShareInstancePasswordResponseSchema ().loads (resp )
626+
517627 def reset_ul_host_instance_password (
518628 self , req : typing .Optional [dict ] = None , ** kwargs
519629 ) -> dict :
@@ -652,6 +762,34 @@ def stop_ul_host_instance(
652762 resp = self .invoke ("StopULHostInstance" , d , ** kwargs )
653763 return apis .StopULHostInstanceResponseSchema ().loads (resp )
654764
765+ def terminate_comp_share_instance (
766+ self , req : typing .Optional [dict ] = None , ** kwargs
767+ ) -> dict :
768+ """TerminateCompShareInstance - 删除轻量算力共享平台虚机实例
769+
770+ **Request**
771+
772+ - **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
773+ - **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
774+ - **UHostId** (str) - (Required) 虚机资源id
775+ - **Zone** (str) - (Required) 可用区。参见 `可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
776+
777+ **Response**
778+
779+ - **UHostId** (str) - 虚机资源id
780+
781+ """
782+ # build request
783+ d = {
784+ "ProjectId" : self .config .project_id ,
785+ "Region" : self .config .region ,
786+ }
787+ req and d .update (req )
788+ d = apis .TerminateCompShareInstanceRequestSchema ().dumps (d )
789+
790+ resp = self .invoke ("TerminateCompShareInstance" , d , ** kwargs )
791+ return apis .TerminateCompShareInstanceResponseSchema ().loads (resp )
792+
655793 def terminate_ul_host_instance (
656794 self , req : typing .Optional [dict ] = None , ** kwargs
657795 ) -> dict :
0 commit comments