Skip to content

Commit 8ccd011

Browse files
authored
sdk: rolling update for 0.11.35 (#234)
1 parent a1a35d1 commit 8ccd011

File tree

22 files changed

+752
-249
lines changed

22 files changed

+752
-249
lines changed

ucloud/services/pathx/client.py

Lines changed: 37 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -528,10 +528,13 @@ def describe_global_ssh_instance(
528528
- **BandwidthPackage** (int) - globalssh Ultimate带宽包大小
529529
- **ChargeType** (str) - 支付周期,如Month,Year,Dynamic等
530530
- **CreateTime** (int) - 资源创建时间戳
531+
- **DomainStatus** (dict) - 加速域名当前可用性检测结果 HashMap 结构 0表示可用, 1 表示有污染
531532
- **Expire** (bool) - 是否过期
532533
- **ExpireTime** (int) - 资源过期时间戳
534+
- **ExtraDomain** (list) - GlobalSSH分配的其他可用加速域名列表
533535
- **ForwardRegion** (str) - InstanceType为Basic版本时,需要展示具体分配的转发机房
534536
- **GlobalSSHPort** (int) - InstanceType等于Free时,由系统自动分配,不等于源站Port值。InstanceType不等于Free时,与源站Port值相同。
537+
- **IPV6Access** (bool) - 是否开启EIP IPV6 接入,Flase:未开启
535538
- **InstanceId** (str) - 实例ID,资源唯一标识
536539
- **InstanceType** (str) - 枚举值:["Enterprise","Basic","Free","Welfare"], 分别代表企业版,基础版本,免费版本,较早的公测免费版
537540
- **Port** (int) - 源站服务器监听的SSH端口,windows系统为RDP端口
@@ -699,29 +702,6 @@ def describe_uga_3instance(
699702
700703
**Response Model**
701704
702-
**SrcAreaInfo**
703-
- **Area** (str) - AreaCode对应城市名
704-
- **AreaCode** (str) - AreaCode ,城市机场代码
705-
- **FlagEmoji** (str) - 国旗Emoji
706-
- **FlagUnicode** (str) - 国旗Unicode
707-
708-
709-
**ForwardTask**
710-
- **Port** (int) - 加速端口
711-
- **Protocol** (str) - 转发协议,枚举值["TCP","UDP","HTTPHTTP","HTTPSHTTP","HTTPSHTTPS","WSWS","WSSWS","WSSWSS"]。TCP和UDP代表四层转发,其余为七层转发。
712-
- **RSPort** (int) - 源站服务器监听的端口号
713-
714-
715-
**OutPublicIpInfo**
716-
- **Area** (str) - 线路回源节点机房代号
717-
- **IP** (str) - 线路回源节点EIP
718-
719-
720-
**AccelerationAreaInfos**
721-
- **AccelerationArea** (str) - 加速区code
722-
- **AccelerationNodes** (list) - 见 **SrcAreaInfo** 模型定义
723-
724-
725705
**ForwardInfo**
726706
- **AccelerationArea** (str) - 加速大区代码
727707
- **AccelerationAreaInfos** (list) - 见 **AccelerationAreaInfos** 模型定义
@@ -742,6 +722,29 @@ def describe_uga_3instance(
742722
- **Remark** (str) - 备注
743723
744724
725+
**AccelerationAreaInfos**
726+
- **AccelerationArea** (str) - 加速区code
727+
- **AccelerationNodes** (list) - 见 **SrcAreaInfo** 模型定义
728+
729+
730+
**SrcAreaInfo**
731+
- **Area** (str) - AreaCode对应城市名
732+
- **AreaCode** (str) - AreaCode ,城市机场代码
733+
- **FlagEmoji** (str) - 国旗Emoji
734+
- **FlagUnicode** (str) - 国旗Unicode
735+
736+
737+
**OutPublicIpInfo**
738+
- **Area** (str) - 线路回源节点机房代号
739+
- **IP** (str) - 线路回源节点EIP
740+
741+
742+
**ForwardTask**
743+
- **Port** (int) - 加速端口
744+
- **Protocol** (str) - 转发协议,枚举值["TCP","UDP","HTTPHTTP","HTTPSHTTP","HTTPSHTTPS","WSWS","WSSWS","WSSWSS"]。TCP和UDP代表四层转发,其余为七层转发。
745+
- **RSPort** (int) - 源站服务器监听的端口号
746+
747+
745748
"""
746749
# build request
747750
d = {
@@ -771,6 +774,12 @@ def describe_uga_3optimization(
771774
772775
**Response Model**
773776
777+
**AccelerationInfo**
778+
- **AccelerationArea** (str) - 加速大区代码
779+
- **AccelerationName** (str) - 加速大区名称
780+
- **NodeInfo** (list) - 见 **NodeDelays** 模型定义
781+
782+
774783
**NodeDelays**
775784
- **Area** (str) - 加速区域
776785
- **AreaCode** (str) - 加速区域Code
@@ -785,12 +794,6 @@ def describe_uga_3optimization(
785794
- **LossOptimization** (float) - 丢包下降比例
786795
787796
788-
**AccelerationInfo**
789-
- **AccelerationArea** (str) - 加速大区代码
790-
- **AccelerationName** (str) - 加速大区名称
791-
- **NodeInfo** (list) - 见 **NodeDelays** 模型定义
792-
793-
794797
"""
795798
# build request
796799
d = {
@@ -1093,11 +1096,6 @@ def get_uga_3metric(
10931096
10941097
**Response Model**
10951098
1096-
**MatricPoint**
1097-
- **Timestamp** (int) - 时间戳
1098-
- **Value** (int) - 监控点数值
1099-
1100-
11011099
**UGA3Metric**
11021100
- **ConnectCount** (list) - 见 **MatricPoint** 模型定义
11031101
- **ConnectCountSubline** (list) - 见 **MatricPoint** 模型定义
@@ -1113,6 +1111,11 @@ def get_uga_3metric(
11131111
- **NetworkOutUsage** (list) - 见 **MatricPoint** 模型定义
11141112
11151113
1114+
**MatricPoint**
1115+
- **Timestamp** (int) - 时间戳
1116+
- **Value** (int) - 监控点数值
1117+
1118+
11161119
"""
11171120
# build request
11181121
d = {

ucloud/services/pathx/schemas/models.py

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,13 @@ class GlobalSSHInfoSchema(schema.ResponseSchema):
2626
),
2727
"ChargeType": fields.Str(required=True, load_from="ChargeType"),
2828
"CreateTime": fields.Int(required=True, load_from="CreateTime"),
29+
"DomainStatus": fields.Str(),
2930
"Expire": fields.Bool(required=True, load_from="Expire"),
3031
"ExpireTime": fields.Int(required=True, load_from="ExpireTime"),
32+
"ExtraDomain": fields.List(fields.Str()),
3133
"ForwardRegion": fields.Str(required=False, load_from="ForwardRegion"),
3234
"GlobalSSHPort": fields.Int(required=True, load_from="GlobalSSHPort"),
35+
"IPV6Access": fields.Bool(required=False, load_from="IPV6Access"),
3336
"InstanceId": fields.Str(required=True, load_from="InstanceId"),
3437
"InstanceType": fields.Str(required=True, load_from="InstanceType"),
3538
"Port": fields.Int(required=True, load_from="Port"),
@@ -113,6 +116,15 @@ class SrcAreaInfoSchema(schema.ResponseSchema):
113116
}
114117

115118

119+
class OutPublicIpInfoSchema(schema.ResponseSchema):
120+
"""OutPublicIpInfo - 线路回源IP信息"""
121+
122+
fields = {
123+
"Area": fields.Str(required=False, load_from="Area"),
124+
"IP": fields.Str(required=False, load_from="IP"),
125+
}
126+
127+
116128
class AccelerationAreaInfosSchema(schema.ResponseSchema):
117129
"""AccelerationAreaInfos - 加速大区信息"""
118130

@@ -134,15 +146,6 @@ class ForwardTaskSchema(schema.ResponseSchema):
134146
}
135147

136148

137-
class OutPublicIpInfoSchema(schema.ResponseSchema):
138-
"""OutPublicIpInfo - 线路回源IP信息"""
139-
140-
fields = {
141-
"Area": fields.Str(required=False, load_from="Area"),
142-
"IP": fields.Str(required=False, load_from="IP"),
143-
}
144-
145-
146149
class ForwardInfoSchema(schema.ResponseSchema):
147150
"""ForwardInfo - 全球统一接入加速实例配置信息"""
148151

@@ -224,15 +227,6 @@ class UPathSetSchema(schema.ResponseSchema):
224227
}
225228

226229

227-
class UGAATaskSchema(schema.ResponseSchema):
228-
"""UGAATask - 用户在UGAA实例下配置的多端口任务"""
229-
230-
fields = {
231-
"Port": fields.Int(required=True, load_from="Port"),
232-
"Protocol": fields.Str(required=True, load_from="Protocol"),
233-
}
234-
235-
236230
class UGAL7ForwarderSchema(schema.ResponseSchema):
237231
"""UGAL7Forwarder - UGA实例 7层转发器信息"""
238232

@@ -255,6 +249,15 @@ class UGAL4ForwarderSchema(schema.ResponseSchema):
255249
}
256250

257251

252+
class UGAATaskSchema(schema.ResponseSchema):
253+
"""UGAATask - 用户在UGAA实例下配置的多端口任务"""
254+
255+
fields = {
256+
"Port": fields.Int(required=True, load_from="Port"),
257+
"Protocol": fields.Str(required=True, load_from="Protocol"),
258+
}
259+
260+
258261
class UGAAInfoSchema(schema.ResponseSchema):
259262
"""UGAAInfo - 全球加速实例信息"""
260263

ucloud/services/ucdn/client.py

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,16 +1065,16 @@ def get_ucdn_domain_log_v2(
10651065
10661066
**Response Model**
10671067
1068-
**LogInfo**
1069-
- **LogTime** (int) - Unix时间戳
1070-
- **LogUrl** (str) - 日志url地址
1071-
1072-
10731068
**DomanLogList**
10741069
- **Domain** (str) - 域名
10751070
- **LogList** (list) - 见 **LogInfo** 模型定义
10761071
10771072
1073+
**LogInfo**
1074+
- **LogTime** (int) - Unix时间戳
1075+
- **LogUrl** (str) - 日志url地址
1076+
1077+
10781078
"""
10791079
# build request
10801080
d = {
@@ -1720,3 +1720,28 @@ def switch_ucdn_charge_type(
17201720

17211721
resp = self.invoke("SwitchUcdnChargeType", d, **kwargs)
17221722
return apis.SwitchUcdnChargeTypeResponseSchema().loads(resp)
1723+
1724+
def update_ucdn_domain_status(
1725+
self, req: typing.Optional[dict] = None, **kwargs
1726+
) -> dict:
1727+
"""UpdateUcdnDomainStatus - 更新加速域名状态
1728+
1729+
**Request**
1730+
1731+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
1732+
- **DomainId** (str) - (Required) 域名ID,创建加速域名时生成。
1733+
- **Status** (str) - (Required) 域名状态,enable代表加速中,disable代表停止加速,delete代表删除。
1734+
1735+
**Response**
1736+
1737+
1738+
"""
1739+
# build request
1740+
d = {
1741+
"ProjectId": self.config.project_id,
1742+
}
1743+
req and d.update(req)
1744+
d = apis.UpdateUcdnDomainStatusRequestSchema().dumps(d)
1745+
1746+
resp = self.invoke("UpdateUcdnDomainStatus", d, **kwargs)
1747+
return apis.UpdateUcdnDomainStatusResponseSchema().loads(resp)

ucloud/services/ucdn/schemas/apis.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,3 +1191,26 @@ class SwitchUcdnChargeTypeResponseSchema(schema.ResponseSchema):
11911191
"""SwitchUcdnChargeType - 切换账号计费方式"""
11921192

11931193
fields = {}
1194+
1195+
1196+
"""
1197+
API: UpdateUcdnDomainStatus
1198+
1199+
更新加速域名状态
1200+
"""
1201+
1202+
1203+
class UpdateUcdnDomainStatusRequestSchema(schema.RequestSchema):
1204+
"""UpdateUcdnDomainStatus - 更新加速域名状态"""
1205+
1206+
fields = {
1207+
"DomainId": fields.Str(required=True, dump_to="DomainId"),
1208+
"ProjectId": fields.Str(required=False, dump_to="ProjectId"),
1209+
"Status": fields.Str(required=True, dump_to="Status"),
1210+
}
1211+
1212+
1213+
class UpdateUcdnDomainStatusResponseSchema(schema.ResponseSchema):
1214+
"""UpdateUcdnDomainStatus - 更新加速域名状态"""
1215+
1216+
fields = {}

ucloud/services/ucdn/schemas/models.py

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
from ucloud.core.typesystem import schema, fields
44

55

6+
class AccessConfSchema(schema.ResponseSchema):
7+
"""AccessConf - 访问控制"""
8+
9+
fields = {
10+
"IpBlacklist": fields.Str(required=False, load_from="IpBlacklist"),
11+
}
12+
13+
614
class CacheConfSchema(schema.ResponseSchema):
715
"""CacheConf - 缓存配置"""
816

@@ -21,14 +29,6 @@ class CacheConfSchema(schema.ResponseSchema):
2129
}
2230

2331

24-
class AccessConfSchema(schema.ResponseSchema):
25-
"""AccessConf - 访问控制"""
26-
27-
fields = {
28-
"IpBlacklist": fields.Str(required=False, load_from="IpBlacklist"),
29-
}
30-
31-
3232
class DomainInfoSchema(schema.ResponseSchema):
3333
"""DomainInfo - 域名配置"""
3434

@@ -267,16 +267,6 @@ class BandwidthTrafficInfoSchema(schema.ResponseSchema):
267267
}
268268

269269

270-
class ReferConfSchema(schema.ResponseSchema):
271-
"""ReferConf - refer配置"""
272-
273-
fields = {
274-
"NullRefer": fields.Int(required=False, load_from="NullRefer"),
275-
"ReferList": fields.List(fields.Str()),
276-
"ReferType": fields.Int(required=False, load_from="ReferType"),
277-
}
278-
279-
280270
class CacheKeyInfoSchema(schema.ResponseSchema):
281271
"""CacheKeyInfo - 忽略参数缓存配置"""
282272

@@ -287,12 +277,13 @@ class CacheKeyInfoSchema(schema.ResponseSchema):
287277
}
288278

289279

290-
class AccessControlConfSchema(schema.ResponseSchema):
291-
"""AccessControlConf - 访问控制配置参数"""
280+
class ReferConfSchema(schema.ResponseSchema):
281+
"""ReferConf - refer配置"""
292282

293283
fields = {
294-
"IpBlackList": fields.List(fields.Str()),
295-
"ReferConf": ReferConfSchema(),
284+
"NullRefer": fields.Int(required=False, load_from="NullRefer"),
285+
"ReferList": fields.List(fields.Str()),
286+
"ReferType": fields.Int(required=False, load_from="ReferType"),
296287
}
297288

298289

@@ -346,6 +337,15 @@ class CacheAllConfigSchema(schema.ResponseSchema):
346337
}
347338

348339

340+
class AccessControlConfSchema(schema.ResponseSchema):
341+
"""AccessControlConf - 访问控制配置参数"""
342+
343+
fields = {
344+
"IpBlackList": fields.List(fields.Str()),
345+
"ReferConf": ReferConfSchema(),
346+
}
347+
348+
349349
class DomainConfigInfoSchema(schema.ResponseSchema):
350350
"""DomainConfigInfo - 更新域名配置"""
351351

ucloud/services/udisk/client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,7 @@ def describe_udisk(
397397
- **Limit** (int) - 返回数据长度, 默认为20
398398
- **Offset** (int) - 数据偏移量, 默认为0
399399
- **ProtocolVersion** (int) - 请求协议版本,建议升级为1,为1时DiskType与UHost磁盘类型定义一致;默认为0
400+
- **Status** (str) - 云盘状态。All(所有状态),Available(可用),Attaching(挂载中),InUse(已挂载), Detaching(卸载中), Initializating(分配中),Failed(创建失败),Cloning(克隆中),Restoring(恢复中),RestoreFailed(恢复失败)。默认值:All
400401
- **UDiskBasicInfo** (str) - 是否只返回云盘基础信息(只包含云盘及关联主机的资源信息)。Yes:是,No:否,默认值(No)。(如仅需要基础信息,建议选填“Yes”,可降低请求延时)
401402
- **UDiskId** (str) - UDisk Id(留空返回全部)
402403
- **UHostIdForAttachment** (str) - 根据传入的UHostIdForAttachment,筛选出能被挂载在该主机上的云盘【本字段即将废弃,建议使用HostIdForAttachment】
@@ -433,7 +434,7 @@ def describe_udisk(
433434
- **SnapEnable** (int) - 是否支持快照,1支持 ,0不支持
434435
- **SnapshotCount** (int) - 该盘快照个数
435436
- **SnapshotLimit** (int) - 该盘快照上限
436-
- **Status** (str) - 状态:Available(可用),Attaching(挂载中), InUse(已挂载), Detaching(卸载中), Initializating(分配中), Failed(创建失败),Cloning(克隆中),Restoring(恢复中),RestoreFailed(恢复失败),
437+
- **Status** (str) - 状态:Available(可用),Attaching(挂载中), InUse(已挂载), Detaching(卸载中), Initializating(分配中), Failed(创建失败),Cloning(克隆中),Restoring(恢复中),RestoreFailed(恢复失败)
437438
- **Tag** (str) - 业务组名称
438439
- **UDataArkMode** (str) - 是否开启数据方舟,开启:"Yes", 不支持:"No"
439440
- **UDiskId** (str) - UDisk实例Id

ucloud/services/udisk/schemas/apis.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,7 @@ class DescribeUDiskRequestSchema(schema.RequestSchema):
390390
required=False, dump_to="ProtocolVersion"
391391
),
392392
"Region": fields.Str(required=True, dump_to="Region"),
393+
"Status": fields.Str(required=False, dump_to="Status"),
393394
"UDiskBasicInfo": fields.Str(required=False, dump_to="UDiskBasicInfo"),
394395
"UDiskId": fields.Str(required=False, dump_to="UDiskId"),
395396
"UHostIdForAttachment": fields.Str(

0 commit comments

Comments
 (0)