ucloud-sdk-python3 0.11.81__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ucloud/__init__.py +0 -0
- ucloud/client.py +469 -0
- ucloud/core/__init__.py +0 -0
- ucloud/core/auth/__init__.py +3 -0
- ucloud/core/auth/_cfg.py +72 -0
- ucloud/core/client/__init__.py +8 -0
- ucloud/core/client/_cfg.py +96 -0
- ucloud/core/client/_client.py +176 -0
- ucloud/core/exc/__init__.py +9 -0
- ucloud/core/exc/_exc.py +94 -0
- ucloud/core/transport/__init__.py +4 -0
- ucloud/core/transport/_requests.py +135 -0
- ucloud/core/transport/http.py +120 -0
- ucloud/core/transport/utils.py +40 -0
- ucloud/core/typesystem/__init__.py +0 -0
- ucloud/core/typesystem/abstract.py +60 -0
- ucloud/core/typesystem/encoder.py +33 -0
- ucloud/core/typesystem/fields.py +149 -0
- ucloud/core/typesystem/schema.py +97 -0
- ucloud/core/utils/__init__.py +0 -0
- ucloud/core/utils/compat.py +15 -0
- ucloud/core/utils/deco.py +31 -0
- ucloud/core/utils/log.py +29 -0
- ucloud/core/utils/middleware.py +63 -0
- ucloud/helpers/__init__.py +0 -0
- ucloud/helpers/utils.py +90 -0
- ucloud/helpers/wait.py +108 -0
- ucloud/services/__init__.py +0 -0
- ucloud/services/cube/__init__.py +0 -0
- ucloud/services/cube/client.py +618 -0
- ucloud/services/cube/schemas/__init__.py +0 -0
- ucloud/services/cube/schemas/apis.py +548 -0
- ucloud/services/cube/schemas/models.py +58 -0
- ucloud/services/iam/__init__.py +0 -0
- ucloud/services/iam/client.py +1078 -0
- ucloud/services/iam/schemas/__init__.py +0 -0
- ucloud/services/iam/schemas/apis.py +973 -0
- ucloud/services/iam/schemas/models.py +127 -0
- ucloud/services/ipsecvpn/__init__.py +0 -0
- ucloud/services/ipsecvpn/client.py +522 -0
- ucloud/services/ipsecvpn/schemas/__init__.py +0 -0
- ucloud/services/ipsecvpn/schemas/apis.py +455 -0
- ucloud/services/ipsecvpn/schemas/models.py +134 -0
- ucloud/services/ipv6gw/__init__.py +0 -0
- ucloud/services/ipv6gw/client.py +44 -0
- ucloud/services/ipv6gw/schemas/__init__.py +0 -0
- ucloud/services/ipv6gw/schemas/apis.py +34 -0
- ucloud/services/ipv6gw/schemas/models.py +3 -0
- ucloud/services/isms/__init__.py +0 -0
- ucloud/services/isms/client.py +330 -0
- ucloud/services/isms/schemas/__init__.py +0 -0
- ucloud/services/isms/schemas/apis.py +272 -0
- ucloud/services/isms/schemas/models.py +50 -0
- ucloud/services/pathx/__init__.py +0 -0
- ucloud/services/pathx/client.py +1656 -0
- ucloud/services/pathx/schemas/__init__.py +0 -0
- ucloud/services/pathx/schemas/apis.py +1289 -0
- ucloud/services/pathx/schemas/models.py +420 -0
- ucloud/services/stepflow/__init__.py +0 -0
- ucloud/services/stepflow/client.py +98 -0
- ucloud/services/stepflow/schemas/__init__.py +0 -0
- ucloud/services/stepflow/schemas/apis.py +67 -0
- ucloud/services/stepflow/schemas/models.py +37 -0
- ucloud/services/sts/__init__.py +0 -0
- ucloud/services/sts/client.py +46 -0
- ucloud/services/sts/schemas/__init__.py +0 -0
- ucloud/services/sts/schemas/apis.py +35 -0
- ucloud/services/sts/schemas/models.py +16 -0
- ucloud/services/tidb/__init__.py +0 -0
- ucloud/services/tidb/client.py +120 -0
- ucloud/services/tidb/schemas/__init__.py +0 -0
- ucloud/services/tidb/schemas/apis.py +103 -0
- ucloud/services/tidb/schemas/models.py +11 -0
- ucloud/services/uaaa/__init__.py +0 -0
- ucloud/services/uaaa/client.py +311 -0
- ucloud/services/uaaa/schemas/__init__.py +0 -0
- ucloud/services/uaaa/schemas/apis.py +252 -0
- ucloud/services/uaaa/schemas/models.py +47 -0
- ucloud/services/uaccount/__init__.py +0 -0
- ucloud/services/uaccount/client.py +547 -0
- ucloud/services/uaccount/schemas/__init__.py +0 -0
- ucloud/services/uaccount/schemas/apis.py +442 -0
- ucloud/services/uaccount/schemas/models.py +128 -0
- ucloud/services/uads/__init__.py +0 -0
- ucloud/services/uads/client.py +1148 -0
- ucloud/services/uads/schemas/__init__.py +0 -0
- ucloud/services/uads/schemas/apis.py +983 -0
- ucloud/services/uads/schemas/models.py +199 -0
- ucloud/services/ubill/__init__.py +0 -0
- ucloud/services/ubill/client.py +248 -0
- ucloud/services/ubill/schemas/__init__.py +0 -0
- ucloud/services/ubill/schemas/apis.py +183 -0
- ucloud/services/ubill/schemas/models.py +107 -0
- ucloud/services/ucdn/__init__.py +0 -0
- ucloud/services/ucdn/client.py +1964 -0
- ucloud/services/ucdn/schemas/__init__.py +0 -0
- ucloud/services/ucdn/schemas/apis.py +1395 -0
- ucloud/services/ucdn/schemas/models.py +576 -0
- ucloud/services/ucloudstack/__init__.py +0 -0
- ucloud/services/ucloudstack/client.py +3352 -0
- ucloud/services/ucloudstack/schemas/__init__.py +0 -0
- ucloud/services/ucloudstack/schemas/apis.py +2887 -0
- ucloud/services/ucloudstack/schemas/models.py +560 -0
- ucloud/services/ucompshare/__init__.py +0 -0
- ucloud/services/ucompshare/client.py +820 -0
- ucloud/services/ucompshare/schemas/__init__.py +0 -0
- ucloud/services/ucompshare/schemas/apis.py +623 -0
- ucloud/services/ucompshare/schemas/models.py +241 -0
- ucloud/services/udb/__init__.py +0 -0
- ucloud/services/udb/client.py +2463 -0
- ucloud/services/udb/schemas/__init__.py +0 -0
- ucloud/services/udb/schemas/apis.py +2053 -0
- ucloud/services/udb/schemas/models.py +319 -0
- ucloud/services/udbproxy/__init__.py +0 -0
- ucloud/services/udbproxy/client.py +67 -0
- ucloud/services/udbproxy/schemas/__init__.py +0 -0
- ucloud/services/udbproxy/schemas/apis.py +38 -0
- ucloud/services/udbproxy/schemas/models.py +31 -0
- ucloud/services/uddb/__init__.py +0 -0
- ucloud/services/uddb/client.py +456 -0
- ucloud/services/uddb/schemas/__init__.py +0 -0
- ucloud/services/uddb/schemas/apis.py +520 -0
- ucloud/services/uddb/schemas/models.py +96 -0
- ucloud/services/udi/__init__.py +0 -0
- ucloud/services/udi/client.py +250 -0
- ucloud/services/udi/schemas/__init__.py +0 -0
- ucloud/services/udi/schemas/apis.py +205 -0
- ucloud/services/udi/schemas/models.py +58 -0
- ucloud/services/udisk/__init__.py +0 -0
- ucloud/services/udisk/client.py +832 -0
- ucloud/services/udisk/schemas/__init__.py +0 -0
- ucloud/services/udisk/schemas/apis.py +741 -0
- ucloud/services/udisk/schemas/models.py +100 -0
- ucloud/services/udns/__init__.py +0 -0
- ucloud/services/udns/client.py +380 -0
- ucloud/services/udns/schemas/__init__.py +0 -0
- ucloud/services/udns/schemas/apis.py +293 -0
- ucloud/services/udns/schemas/models.py +58 -0
- ucloud/services/udpn/__init__.py +0 -0
- ucloud/services/udpn/client.py +240 -0
- ucloud/services/udpn/schemas/__init__.py +0 -0
- ucloud/services/udpn/schemas/apis.py +203 -0
- ucloud/services/udpn/schemas/models.py +29 -0
- ucloud/services/udts/__init__.py +0 -0
- ucloud/services/udts/client.py +410 -0
- ucloud/services/udts/schemas/__init__.py +0 -0
- ucloud/services/udts/schemas/apis.py +403 -0
- ucloud/services/udts/schemas/models.py +93 -0
- ucloud/services/uec/__init__.py +0 -0
- ucloud/services/uec/client.py +1510 -0
- ucloud/services/uec/schemas/__init__.py +0 -0
- ucloud/services/uec/schemas/apis.py +1195 -0
- ucloud/services/uec/schemas/models.py +316 -0
- ucloud/services/ufile/__init__.py +0 -0
- ucloud/services/ufile/client.py +698 -0
- ucloud/services/ufile/schemas/__init__.py +0 -0
- ucloud/services/ufile/schemas/apis.py +542 -0
- ucloud/services/ufile/schemas/models.py +139 -0
- ucloud/services/ufs/__init__.py +0 -0
- ucloud/services/ufs/client.py +328 -0
- ucloud/services/ufs/schemas/__init__.py +0 -0
- ucloud/services/ufs/schemas/apis.py +265 -0
- ucloud/services/ufs/schemas/models.py +52 -0
- ucloud/services/ugn/__init__.py +0 -0
- ucloud/services/ugn/client.py +857 -0
- ucloud/services/ugn/schemas/__init__.py +0 -0
- ucloud/services/ugn/schemas/apis.py +678 -0
- ucloud/services/ugn/schemas/models.py +191 -0
- ucloud/services/uhost/__init__.py +0 -0
- ucloud/services/uhost/client.py +1647 -0
- ucloud/services/uhost/schemas/__init__.py +0 -0
- ucloud/services/uhost/schemas/apis.py +1483 -0
- ucloud/services/uhost/schemas/models.py +427 -0
- ucloud/services/uhub/__init__.py +0 -0
- ucloud/services/uhub/client.py +229 -0
- ucloud/services/uhub/schemas/__init__.py +0 -0
- ucloud/services/uhub/schemas/apis.py +194 -0
- ucloud/services/uhub/schemas/models.py +39 -0
- ucloud/services/uk8s/__init__.py +0 -0
- ucloud/services/uk8s/client.py +729 -0
- ucloud/services/uk8s/schemas/__init__.py +0 -0
- ucloud/services/uk8s/schemas/apis.py +639 -0
- ucloud/services/uk8s/schemas/models.py +179 -0
- ucloud/services/ulb/__init__.py +0 -0
- ucloud/services/ulb/client.py +2285 -0
- ucloud/services/ulb/schemas/__init__.py +0 -0
- ucloud/services/ulb/schemas/apis.py +1678 -0
- ucloud/services/ulb/schemas/models.py +591 -0
- ucloud/services/ulighthost/__init__.py +0 -0
- ucloud/services/ulighthost/client.py +576 -0
- ucloud/services/ulighthost/schemas/__init__.py +0 -0
- ucloud/services/ulighthost/schemas/apis.py +445 -0
- ucloud/services/ulighthost/schemas/models.py +133 -0
- ucloud/services/umem/__init__.py +0 -0
- ucloud/services/umem/client.py +1829 -0
- ucloud/services/umem/schemas/__init__.py +0 -0
- ucloud/services/umem/schemas/apis.py +1477 -0
- ucloud/services/umem/schemas/models.py +327 -0
- ucloud/services/umongodb/__init__.py +0 -0
- ucloud/services/umongodb/client.py +752 -0
- ucloud/services/umongodb/schemas/__init__.py +0 -0
- ucloud/services/umongodb/schemas/apis.py +567 -0
- ucloud/services/umongodb/schemas/models.py +220 -0
- ucloud/services/unet/__init__.py +0 -0
- ucloud/services/unet/client.py +1278 -0
- ucloud/services/unet/schemas/__init__.py +0 -0
- ucloud/services/unet/schemas/apis.py +1006 -0
- ucloud/services/unet/schemas/models.py +275 -0
- ucloud/services/unvs/__init__.py +0 -0
- ucloud/services/unvs/client.py +87 -0
- ucloud/services/unvs/schemas/__init__.py +0 -0
- ucloud/services/unvs/schemas/apis.py +66 -0
- ucloud/services/unvs/schemas/models.py +19 -0
- ucloud/services/upfs/__init__.py +0 -0
- ucloud/services/upfs/client.py +252 -0
- ucloud/services/upfs/schemas/__init__.py +0 -0
- ucloud/services/upfs/schemas/apis.py +204 -0
- ucloud/services/upfs/schemas/models.py +36 -0
- ucloud/services/upgsql/__init__.py +0 -0
- ucloud/services/upgsql/client.py +1007 -0
- ucloud/services/upgsql/schemas/__init__.py +0 -0
- ucloud/services/upgsql/schemas/apis.py +827 -0
- ucloud/services/upgsql/schemas/models.py +158 -0
- ucloud/services/uphone/__init__.py +0 -0
- ucloud/services/uphone/client.py +2122 -0
- ucloud/services/uphone/schemas/__init__.py +0 -0
- ucloud/services/uphone/schemas/apis.py +1799 -0
- ucloud/services/uphone/schemas/models.py +357 -0
- ucloud/services/uphost/__init__.py +0 -0
- ucloud/services/uphost/client.py +847 -0
- ucloud/services/uphost/schemas/__init__.py +0 -0
- ucloud/services/uphost/schemas/apis.py +689 -0
- ucloud/services/uphost/schemas/models.py +175 -0
- ucloud/services/urocketmq/__init__.py +0 -0
- ucloud/services/urocketmq/client.py +117 -0
- ucloud/services/urocketmq/schemas/__init__.py +0 -0
- ucloud/services/urocketmq/schemas/apis.py +92 -0
- ucloud/services/urocketmq/schemas/models.py +14 -0
- ucloud/services/uslk/__init__.py +0 -0
- ucloud/services/uslk/client.py +249 -0
- ucloud/services/uslk/schemas/__init__.py +0 -0
- ucloud/services/uslk/schemas/apis.py +191 -0
- ucloud/services/uslk/schemas/models.py +74 -0
- ucloud/services/usms/__init__.py +0 -0
- ucloud/services/usms/client.py +759 -0
- ucloud/services/usms/schemas/__init__.py +0 -0
- ucloud/services/usms/schemas/apis.py +653 -0
- ucloud/services/usms/schemas/models.py +215 -0
- ucloud/services/utsdb/__init__.py +0 -0
- ucloud/services/utsdb/client.py +604 -0
- ucloud/services/utsdb/schemas/__init__.py +0 -0
- ucloud/services/utsdb/schemas/apis.py +515 -0
- ucloud/services/utsdb/schemas/models.py +61 -0
- ucloud/services/uvms/__init__.py +0 -0
- ucloud/services/uvms/client.py +119 -0
- ucloud/services/uvms/schemas/__init__.py +0 -0
- ucloud/services/uvms/schemas/apis.py +88 -0
- ucloud/services/uvms/schemas/models.py +40 -0
- ucloud/services/vpc/__init__.py +0 -0
- ucloud/services/vpc/client.py +3233 -0
- ucloud/services/vpc/schemas/__init__.py +0 -0
- ucloud/services/vpc/schemas/apis.py +2529 -0
- ucloud/services/vpc/schemas/models.py +651 -0
- ucloud/testing/__init__.py +0 -0
- ucloud/testing/driver/__init__.py +5 -0
- ucloud/testing/driver/_scenario.py +93 -0
- ucloud/testing/driver/_specification.py +57 -0
- ucloud/testing/driver/_step.py +166 -0
- ucloud/testing/env.py +28 -0
- ucloud/testing/exc.py +18 -0
- ucloud/testing/funcs.py +68 -0
- ucloud/testing/mock.py +28 -0
- ucloud/testing/op.py +177 -0
- ucloud/testing/utest.py +195 -0
- ucloud/version.py +1 -0
- ucloud_sdk_python3-0.11.81.dist-info/LICENSE +202 -0
- ucloud_sdk_python3-0.11.81.dist-info/METADATA +71 -0
- ucloud_sdk_python3-0.11.81.dist-info/RECORD +280 -0
- ucloud_sdk_python3-0.11.81.dist-info/WHEEL +5 -0
- ucloud_sdk_python3-0.11.81.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,857 @@
|
|
|
1
|
+
""" Code is generated by ucloud-model, DO NOT EDIT IT. """
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
from ucloud.core.client import Client
|
|
7
|
+
from ucloud.services.ugn.schemas import apis
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class UGNClient(Client):
|
|
11
|
+
def __init__(
|
|
12
|
+
self, config: dict, transport=None, middleware=None, logger=None
|
|
13
|
+
):
|
|
14
|
+
super(UGNClient, self).__init__(config, transport, middleware, logger)
|
|
15
|
+
|
|
16
|
+
def attach_ugn_instance(
|
|
17
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
18
|
+
) -> dict:
|
|
19
|
+
"""AttachUGNInstance - 实例加入云联网
|
|
20
|
+
|
|
21
|
+
**Request**
|
|
22
|
+
|
|
23
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
24
|
+
- **InstanceId** (str) - (Required) 实例Id
|
|
25
|
+
- **InstanceProjectId** (str) - (Required) 实例归属ProjectId
|
|
26
|
+
- **InstanceRegion** (str) - (Required) 实例归属地域
|
|
27
|
+
- **InstanceType** (str) - (Required) 实例类型
|
|
28
|
+
- **UGNId** (str) - (Required) 云联网Id
|
|
29
|
+
|
|
30
|
+
**Response**
|
|
31
|
+
|
|
32
|
+
- **Message** (str) - 返回码描述信息
|
|
33
|
+
|
|
34
|
+
"""
|
|
35
|
+
# build request
|
|
36
|
+
d = {
|
|
37
|
+
"ProjectId": self.config.project_id,
|
|
38
|
+
}
|
|
39
|
+
req and d.update(req)
|
|
40
|
+
d = apis.AttachUGNInstanceRequestSchema().dumps(d)
|
|
41
|
+
|
|
42
|
+
resp = self.invoke("AttachUGNInstance", d, **kwargs)
|
|
43
|
+
return apis.AttachUGNInstanceResponseSchema().loads(resp)
|
|
44
|
+
|
|
45
|
+
def batch_detach_ugn_instance(
|
|
46
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
47
|
+
) -> dict:
|
|
48
|
+
"""BatchDetachUGNInstance - 批量移除云联网中实例
|
|
49
|
+
|
|
50
|
+
**Request**
|
|
51
|
+
|
|
52
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
53
|
+
- **InstanceIds** (list) - (Required) 实例id
|
|
54
|
+
- **UGNId** (str) - (Required) 云联网id
|
|
55
|
+
|
|
56
|
+
**Response**
|
|
57
|
+
|
|
58
|
+
- **InstanceIds** (list) - 删除成功的实例id
|
|
59
|
+
|
|
60
|
+
"""
|
|
61
|
+
# build request
|
|
62
|
+
d = {
|
|
63
|
+
"ProjectId": self.config.project_id,
|
|
64
|
+
}
|
|
65
|
+
req and d.update(req)
|
|
66
|
+
d = apis.BatchDetachUGNInstanceRequestSchema().dumps(d)
|
|
67
|
+
|
|
68
|
+
resp = self.invoke("BatchDetachUGNInstance", d, **kwargs)
|
|
69
|
+
return apis.BatchDetachUGNInstanceResponseSchema().loads(resp)
|
|
70
|
+
|
|
71
|
+
def create_inter_region_bandwidth(
|
|
72
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
73
|
+
) -> dict:
|
|
74
|
+
"""CreateInterRegionBandwidth - 购买跨域带宽
|
|
75
|
+
|
|
76
|
+
**Request**
|
|
77
|
+
|
|
78
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
79
|
+
- **Bandwidth** (int) - (Required) 带宽(单位为Mb/s)
|
|
80
|
+
- **ChargeType** (str) - (Required) 计费类型
|
|
81
|
+
- **PayMode** (str) - (Required) 付费类型
|
|
82
|
+
- **Quantity** (int) - (Required) 购买时长
|
|
83
|
+
- **Region0** (str) - (Required) 跨域带宽归属地域
|
|
84
|
+
- **Region1** (str) - (Required) 跨域带宽归属地域
|
|
85
|
+
- **UGNId** (str) - (Required) 云联网Id
|
|
86
|
+
- **CouponId** (str) - 代金券Id
|
|
87
|
+
|
|
88
|
+
**Response**
|
|
89
|
+
|
|
90
|
+
- **InterRegionBandwidthId** (str) - 跨域带宽Id
|
|
91
|
+
- **Message** (str) - 返回码描述信息
|
|
92
|
+
|
|
93
|
+
"""
|
|
94
|
+
# build request
|
|
95
|
+
d = {
|
|
96
|
+
"ProjectId": self.config.project_id,
|
|
97
|
+
}
|
|
98
|
+
req and d.update(req)
|
|
99
|
+
d = apis.CreateInterRegionBandwidthRequestSchema().dumps(d)
|
|
100
|
+
|
|
101
|
+
# build options
|
|
102
|
+
kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
|
|
103
|
+
|
|
104
|
+
resp = self.invoke("CreateInterRegionBandwidth", d, **kwargs)
|
|
105
|
+
return apis.CreateInterRegionBandwidthResponseSchema().loads(resp)
|
|
106
|
+
|
|
107
|
+
def create_ugn(self, req: typing.Optional[dict] = None, **kwargs) -> dict:
|
|
108
|
+
"""CreateUGN -
|
|
109
|
+
|
|
110
|
+
**Request**
|
|
111
|
+
|
|
112
|
+
- **ProjectId** (str) - (Config)
|
|
113
|
+
- **Name** (str) -
|
|
114
|
+
- **Networks** (list) -
|
|
115
|
+
- **Remark** (str) -
|
|
116
|
+
|
|
117
|
+
**Response**
|
|
118
|
+
|
|
119
|
+
- **Message** (str) -
|
|
120
|
+
- **UGNID** (str) -
|
|
121
|
+
|
|
122
|
+
"""
|
|
123
|
+
# build request
|
|
124
|
+
d = {
|
|
125
|
+
"ProjectId": self.config.project_id,
|
|
126
|
+
}
|
|
127
|
+
req and d.update(req)
|
|
128
|
+
d = apis.CreateUGNRequestSchema().dumps(d)
|
|
129
|
+
|
|
130
|
+
# build options
|
|
131
|
+
kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
|
|
132
|
+
|
|
133
|
+
resp = self.invoke("CreateUGN", d, **kwargs)
|
|
134
|
+
return apis.CreateUGNResponseSchema().loads(resp)
|
|
135
|
+
|
|
136
|
+
def delete_inter_region_bandwidth(
|
|
137
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
138
|
+
) -> dict:
|
|
139
|
+
"""DeleteInterRegionBandwidth - 删除跨域带宽
|
|
140
|
+
|
|
141
|
+
**Request**
|
|
142
|
+
|
|
143
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
144
|
+
- **InterRegionBandwidthId** (str) - (Required) 跨域带宽Id
|
|
145
|
+
- **UGNId** (str) - (Required) 云联网Id
|
|
146
|
+
|
|
147
|
+
**Response**
|
|
148
|
+
|
|
149
|
+
- **Message** (str) - 返回码描述信息
|
|
150
|
+
|
|
151
|
+
"""
|
|
152
|
+
# build request
|
|
153
|
+
d = {
|
|
154
|
+
"ProjectId": self.config.project_id,
|
|
155
|
+
}
|
|
156
|
+
req and d.update(req)
|
|
157
|
+
d = apis.DeleteInterRegionBandwidthRequestSchema().dumps(d)
|
|
158
|
+
|
|
159
|
+
resp = self.invoke("DeleteInterRegionBandwidth", d, **kwargs)
|
|
160
|
+
return apis.DeleteInterRegionBandwidthResponseSchema().loads(resp)
|
|
161
|
+
|
|
162
|
+
def delete_ugn(self, req: typing.Optional[dict] = None, **kwargs) -> dict:
|
|
163
|
+
"""DeleteUGN - 删除云联网
|
|
164
|
+
|
|
165
|
+
**Request**
|
|
166
|
+
|
|
167
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
168
|
+
- **UGNId** (str) - (Required) 云联网Id
|
|
169
|
+
|
|
170
|
+
**Response**
|
|
171
|
+
|
|
172
|
+
- **Message** (str) - 返回码描述信息
|
|
173
|
+
|
|
174
|
+
"""
|
|
175
|
+
# build request
|
|
176
|
+
d = {
|
|
177
|
+
"ProjectId": self.config.project_id,
|
|
178
|
+
}
|
|
179
|
+
req and d.update(req)
|
|
180
|
+
d = apis.DeleteUGNRequestSchema().dumps(d)
|
|
181
|
+
|
|
182
|
+
resp = self.invoke("DeleteUGN", d, **kwargs)
|
|
183
|
+
return apis.DeleteUGNResponseSchema().loads(resp)
|
|
184
|
+
|
|
185
|
+
def describe_inter_region_bandwidth(
|
|
186
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
187
|
+
) -> dict:
|
|
188
|
+
"""DescribeInterRegionBandwidth - 查询跨域带宽
|
|
189
|
+
|
|
190
|
+
**Request**
|
|
191
|
+
|
|
192
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
193
|
+
- **UGNId** (str) - (Required) 云联网Id
|
|
194
|
+
- **InterRegionBandwidthIds** (list) - 跨域带宽Id
|
|
195
|
+
- **Limit** (int) - 数据分页值。默认为20
|
|
196
|
+
- **Offset** (int) - 数据偏移量。默认为0
|
|
197
|
+
|
|
198
|
+
**Response**
|
|
199
|
+
|
|
200
|
+
- **InterRegionBandwidths** (list) - 见 **InterRegionBandwidth** 模型定义
|
|
201
|
+
- **Message** (str) - 返回码描述信息
|
|
202
|
+
- **TotalCount** (int) - InterRegionBandwidths字段的数量
|
|
203
|
+
|
|
204
|
+
**Response Model**
|
|
205
|
+
|
|
206
|
+
**InterRegionBandwidth**
|
|
207
|
+
- **Bandwidth** (int) - 带宽(单位为Mb/s)
|
|
208
|
+
- **ChargeType** (str) - 计费类型
|
|
209
|
+
- **CreateTime** (int) - 创建时间
|
|
210
|
+
- **ExpireTime** (int) - 到期时间
|
|
211
|
+
- **InterRegionBandwidthId** (str) - 跨域带宽Id
|
|
212
|
+
- **PayMode** (str) - 付费类型
|
|
213
|
+
- **Region0** (str) - 跨域带宽地域
|
|
214
|
+
- **Region1** (str) - 跨域带宽地域
|
|
215
|
+
- **State** (int) - 跨域带宽状态
|
|
216
|
+
- **UGNId** (str) - 云联网Id
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
"""
|
|
220
|
+
# build request
|
|
221
|
+
d = {
|
|
222
|
+
"ProjectId": self.config.project_id,
|
|
223
|
+
}
|
|
224
|
+
req and d.update(req)
|
|
225
|
+
d = apis.DescribeInterRegionBandwidthRequestSchema().dumps(d)
|
|
226
|
+
|
|
227
|
+
resp = self.invoke("DescribeInterRegionBandwidth", d, **kwargs)
|
|
228
|
+
return apis.DescribeInterRegionBandwidthResponseSchema().loads(resp)
|
|
229
|
+
|
|
230
|
+
def describe_simple_ugn(
|
|
231
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
232
|
+
) -> dict:
|
|
233
|
+
"""DescribeSimpleUGN - 获取简洁版UGN详情
|
|
234
|
+
|
|
235
|
+
**Request**
|
|
236
|
+
|
|
237
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
238
|
+
- **UGNID** (str) - (Required) UGN ID
|
|
239
|
+
|
|
240
|
+
**Response**
|
|
241
|
+
|
|
242
|
+
- **BwPackages** (list) - 见 **SimpleBwPackage** 模型定义
|
|
243
|
+
- **Message** (str) -
|
|
244
|
+
- **Networks** (list) - 见 **SimpleNetwork** 模型定义
|
|
245
|
+
- **Routes** (list) - 见 **SimpleRoute** 模型定义
|
|
246
|
+
- **UGN** (dict) - 见 **UGN** 模型定义
|
|
247
|
+
|
|
248
|
+
**Response Model**
|
|
249
|
+
|
|
250
|
+
**SimpleBwPackage**
|
|
251
|
+
- **BandWidth** (float) - 带宽值
|
|
252
|
+
- **ChangePayMode** (str) - 带宽包切换计费类型
|
|
253
|
+
- **ChangeStatus** (int) - 带宽包切换状态
|
|
254
|
+
- **ChangeTime** (int) - 带宽包切换时间
|
|
255
|
+
- **CreateTime** (int) - 创建时间
|
|
256
|
+
- **ExpireTime** (int) - 过期时间
|
|
257
|
+
- **Name** (str) -
|
|
258
|
+
- **PackageID** (str) -
|
|
259
|
+
- **Path** (str) - 智能路径Delay:最低时延|IGP:普通线路|TCO:最低成本
|
|
260
|
+
- **PayMode** (str) - 计费模式 FixedBw:固定带宽|Peak95:经典95|Max5:第五峰值|Traffic:流量计费
|
|
261
|
+
- **Qos** (str) - 服务质量Diamond:钻石|Platinum:铂金|Gold:黄金
|
|
262
|
+
- **RegionA** (str) - 地域A名称
|
|
263
|
+
- **RegionB** (str) - 地域B名称
|
|
264
|
+
- **Remark** (str) -
|
|
265
|
+
- **UGNID** (str) -
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
**SimpleNetwork**
|
|
269
|
+
- **CreateTime** (int) -
|
|
270
|
+
- **Name** (str) - 网络实例名称
|
|
271
|
+
- **NetworkID** (str) - 网络实例的ID,如 vnet-xxxxx
|
|
272
|
+
- **OrgID** (int) - 网络实例所在项目的ID
|
|
273
|
+
- **OrgName** (str) - 网络实例所在项目名
|
|
274
|
+
- **Region** (str) - 网络实例所在地域
|
|
275
|
+
- **RegionID** (int) - 网络实例所在地域ID
|
|
276
|
+
- **Type** (str) - 网络实例类型:VPC/HybridGW/...
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
**SimpleRoute**
|
|
280
|
+
- **DstAddr** (str) - 目的网段
|
|
281
|
+
- **NextHopID** (str) - 下一跳网络实例 ID
|
|
282
|
+
- **NextHopRegion** (str) - 下一跳网络实例所属地域
|
|
283
|
+
- **NextHopRegionID** (int) - 下一跳网络实例所属地域 id
|
|
284
|
+
- **NextHopType** (str) - 下一跳网络实例类型
|
|
285
|
+
- **Priority** (int) - 路由优先级
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
**UGN**
|
|
289
|
+
- **BwPackageCount** (int) - 绑定带宽包数量
|
|
290
|
+
- **CreateTime** (int) - 云联网创建时间
|
|
291
|
+
- **Name** (str) - 云联网名称
|
|
292
|
+
- **NetworkCount** (int) - 关联网络实例数量
|
|
293
|
+
- **Remark** (str) - 云联网备注
|
|
294
|
+
- **UGNID** (str) - 云联网资源 ID
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
"""
|
|
298
|
+
# build request
|
|
299
|
+
d = {
|
|
300
|
+
"ProjectId": self.config.project_id,
|
|
301
|
+
}
|
|
302
|
+
req and d.update(req)
|
|
303
|
+
d = apis.DescribeSimpleUGNRequestSchema().dumps(d)
|
|
304
|
+
|
|
305
|
+
resp = self.invoke("DescribeSimpleUGN", d, **kwargs)
|
|
306
|
+
return apis.DescribeSimpleUGNResponseSchema().loads(resp)
|
|
307
|
+
|
|
308
|
+
def describe_ugn_instance(
|
|
309
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
310
|
+
) -> dict:
|
|
311
|
+
"""DescribeUGNInstance - 查询云联网实例
|
|
312
|
+
|
|
313
|
+
**Request**
|
|
314
|
+
|
|
315
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
316
|
+
- **UGNId** (str) - (Required) 云联网Id
|
|
317
|
+
- **InstanceIds** (list) - 实例Id
|
|
318
|
+
- **Limit** (int) - 数据分页值。默认为20
|
|
319
|
+
- **Offset** (int) - 数据偏移量。默认为0
|
|
320
|
+
|
|
321
|
+
**Response**
|
|
322
|
+
|
|
323
|
+
- **Message** (str) - 返回码描述信息
|
|
324
|
+
- **TotalCount** (int) - UGNInstances字段的数量
|
|
325
|
+
- **UGNInstances** (list) - 见 **Instance** 模型定义
|
|
326
|
+
|
|
327
|
+
**Response Model**
|
|
328
|
+
|
|
329
|
+
**Instance**
|
|
330
|
+
- **CreateTime** (int) - 加入时间
|
|
331
|
+
- **InstanceId** (str) - 实例Id
|
|
332
|
+
- **InstanceOrganizationName** (str) - 实例归属项目名称
|
|
333
|
+
- **InstanceProjectId** (str) - 实例归属ProjectId
|
|
334
|
+
- **InstanceRegion** (str) - 实例归属地域
|
|
335
|
+
- **InstanceType** (str) - 实例类型
|
|
336
|
+
- **Networks** (list) - 网段信息
|
|
337
|
+
- **State** (int) - 实例状态
|
|
338
|
+
- **UGNId** (str) - 云联网Id
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
"""
|
|
342
|
+
# build request
|
|
343
|
+
d = {
|
|
344
|
+
"ProjectId": self.config.project_id,
|
|
345
|
+
}
|
|
346
|
+
req and d.update(req)
|
|
347
|
+
d = apis.DescribeUGNInstanceRequestSchema().dumps(d)
|
|
348
|
+
|
|
349
|
+
resp = self.invoke("DescribeUGNInstance", d, **kwargs)
|
|
350
|
+
return apis.DescribeUGNInstanceResponseSchema().loads(resp)
|
|
351
|
+
|
|
352
|
+
def describe_ugn_region_list(
|
|
353
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
354
|
+
) -> dict:
|
|
355
|
+
"""DescribeUGNRegionList - 获取ugn支持的地域
|
|
356
|
+
|
|
357
|
+
**Request**
|
|
358
|
+
|
|
359
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
360
|
+
|
|
361
|
+
**Response**
|
|
362
|
+
|
|
363
|
+
- **Message** (str) - 返回码描述信息
|
|
364
|
+
- **RegionList** (list) - 地域列表
|
|
365
|
+
|
|
366
|
+
"""
|
|
367
|
+
# build request
|
|
368
|
+
d = {
|
|
369
|
+
"ProjectId": self.config.project_id,
|
|
370
|
+
}
|
|
371
|
+
req and d.update(req)
|
|
372
|
+
d = apis.DescribeUGNRegionListRequestSchema().dumps(d)
|
|
373
|
+
|
|
374
|
+
resp = self.invoke("DescribeUGNRegionList", d, **kwargs)
|
|
375
|
+
return apis.DescribeUGNRegionListResponseSchema().loads(resp)
|
|
376
|
+
|
|
377
|
+
def describe_ugn_route_rule(
|
|
378
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
379
|
+
) -> dict:
|
|
380
|
+
"""DescribeUGNRouteRule - 查询路由规则
|
|
381
|
+
|
|
382
|
+
**Request**
|
|
383
|
+
|
|
384
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
385
|
+
- **UGNId** (str) - (Required) 云联网Id
|
|
386
|
+
- **Limit** (int) - 数据分页值。默认为20
|
|
387
|
+
- **Offset** (int) - 数据偏移量。默认为0
|
|
388
|
+
- **RouteRuleIds** (list) - 路由规则Id
|
|
389
|
+
|
|
390
|
+
**Response**
|
|
391
|
+
|
|
392
|
+
- **Message** (str) - 返回码描述信息
|
|
393
|
+
- **TotalCount** (int) - UGNRouteRules字段的数量
|
|
394
|
+
- **UGNRouteRules** (list) - 见 **RouteRule** 模型定义
|
|
395
|
+
|
|
396
|
+
**Response Model**
|
|
397
|
+
|
|
398
|
+
**RouteRule**
|
|
399
|
+
- **CreateTime** (int) - 创建时间
|
|
400
|
+
- **DeriveInstanceId** (str) - 归属实例Id
|
|
401
|
+
- **DeriveInstanceRegion** (str) - 归属实例地域
|
|
402
|
+
- **DeriveInstanceType** (str) - 归属实例类型
|
|
403
|
+
- **DeriveRouteRuleId** (str) - 归属实例路由规则Id
|
|
404
|
+
- **DeriveRouteTableId** (str) - 归属实例路由表Id
|
|
405
|
+
- **DstAddr** (str) - 目的地址
|
|
406
|
+
- **Enable** (bool) - false:未使能true:已使能
|
|
407
|
+
- **NextHopId** (str) - 归属实例路由下一跳
|
|
408
|
+
- **NextHopType** (str) - 归属实例路由下一跳类型
|
|
409
|
+
- **Priority** (int) - 优先级
|
|
410
|
+
- **Rollback** (bool) - false:不可撤回true:可撤回
|
|
411
|
+
- **RouteRuleId** (str) - 路由规则Id
|
|
412
|
+
- **RouteRuleType** (int) - 路由规则类型,枚举值 0:自动发布的LOCAL和动态路由1:手动发布的自定义路由
|
|
413
|
+
|
|
414
|
+
|
|
415
|
+
"""
|
|
416
|
+
# build request
|
|
417
|
+
d = {
|
|
418
|
+
"ProjectId": self.config.project_id,
|
|
419
|
+
}
|
|
420
|
+
req and d.update(req)
|
|
421
|
+
d = apis.DescribeUGNRouteRuleRequestSchema().dumps(d)
|
|
422
|
+
|
|
423
|
+
resp = self.invoke("DescribeUGNRouteRule", d, **kwargs)
|
|
424
|
+
return apis.DescribeUGNRouteRuleResponseSchema().loads(resp)
|
|
425
|
+
|
|
426
|
+
def detach_ugn_instance(
|
|
427
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
428
|
+
) -> dict:
|
|
429
|
+
"""DetachUGNInstance - 实例退出云联网
|
|
430
|
+
|
|
431
|
+
**Request**
|
|
432
|
+
|
|
433
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
434
|
+
- **InstanceId** (str) - (Required) 实例Id
|
|
435
|
+
- **InstanceType** (str) - (Required) 实例类型
|
|
436
|
+
- **UGNId** (str) - (Required) 云联网Id
|
|
437
|
+
|
|
438
|
+
**Response**
|
|
439
|
+
|
|
440
|
+
- **Message** (str) - 返回码描述信息
|
|
441
|
+
|
|
442
|
+
"""
|
|
443
|
+
# build request
|
|
444
|
+
d = {
|
|
445
|
+
"ProjectId": self.config.project_id,
|
|
446
|
+
}
|
|
447
|
+
req and d.update(req)
|
|
448
|
+
d = apis.DetachUGNInstanceRequestSchema().dumps(d)
|
|
449
|
+
|
|
450
|
+
resp = self.invoke("DetachUGNInstance", d, **kwargs)
|
|
451
|
+
return apis.DetachUGNInstanceResponseSchema().loads(resp)
|
|
452
|
+
|
|
453
|
+
def get_simple_ugn_bw_packages(
|
|
454
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
455
|
+
) -> dict:
|
|
456
|
+
"""GetSimpleUGNBwPackages - 获取指定云联网内的带宽包
|
|
457
|
+
|
|
458
|
+
**Request**
|
|
459
|
+
|
|
460
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
461
|
+
- **UGNID** (str) - (Required)
|
|
462
|
+
- **Limit** (int) - 分页大小,默认20
|
|
463
|
+
- **Offset** (int) - 偏移量,默认0
|
|
464
|
+
|
|
465
|
+
**Response**
|
|
466
|
+
|
|
467
|
+
- **BwPackages** (list) - 见 **SimpleBwPackage** 模型定义
|
|
468
|
+
- **Limit** (int) -
|
|
469
|
+
- **Message** (str) -
|
|
470
|
+
- **Offset** (int) -
|
|
471
|
+
- **TotalCount** (int) -
|
|
472
|
+
|
|
473
|
+
**Response Model**
|
|
474
|
+
|
|
475
|
+
**SimpleBwPackage**
|
|
476
|
+
- **BandWidth** (float) - 带宽值
|
|
477
|
+
- **ChangePayMode** (str) - 带宽包切换计费类型
|
|
478
|
+
- **ChangeStatus** (int) - 带宽包切换状态
|
|
479
|
+
- **ChangeTime** (int) - 带宽包切换时间
|
|
480
|
+
- **CreateTime** (int) - 创建时间
|
|
481
|
+
- **ExpireTime** (int) - 过期时间
|
|
482
|
+
- **Name** (str) -
|
|
483
|
+
- **PackageID** (str) -
|
|
484
|
+
- **Path** (str) - 智能路径Delay:最低时延|IGP:普通线路|TCO:最低成本
|
|
485
|
+
- **PayMode** (str) - 计费模式 FixedBw:固定带宽|Peak95:经典95|Max5:第五峰值|Traffic:流量计费
|
|
486
|
+
- **Qos** (str) - 服务质量Diamond:钻石|Platinum:铂金|Gold:黄金
|
|
487
|
+
- **RegionA** (str) - 地域A名称
|
|
488
|
+
- **RegionB** (str) - 地域B名称
|
|
489
|
+
- **Remark** (str) -
|
|
490
|
+
- **UGNID** (str) -
|
|
491
|
+
|
|
492
|
+
|
|
493
|
+
"""
|
|
494
|
+
# build request
|
|
495
|
+
d = {
|
|
496
|
+
"ProjectId": self.config.project_id,
|
|
497
|
+
}
|
|
498
|
+
req and d.update(req)
|
|
499
|
+
d = apis.GetSimpleUGNBwPackagesRequestSchema().dumps(d)
|
|
500
|
+
|
|
501
|
+
resp = self.invoke("GetSimpleUGNBwPackages", d, **kwargs)
|
|
502
|
+
return apis.GetSimpleUGNBwPackagesResponseSchema().loads(resp)
|
|
503
|
+
|
|
504
|
+
def list_simple_bw_package(
|
|
505
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
506
|
+
) -> dict:
|
|
507
|
+
"""ListSimpleBwPackage - 获取当前项目下的带宽包列表
|
|
508
|
+
|
|
509
|
+
**Request**
|
|
510
|
+
|
|
511
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
512
|
+
- **Limit** (int) -
|
|
513
|
+
- **Offset** (int) -
|
|
514
|
+
|
|
515
|
+
**Response**
|
|
516
|
+
|
|
517
|
+
- **BwPackages** (list) - 见 **SimpleBwPackage** 模型定义
|
|
518
|
+
- **Limit** (int) -
|
|
519
|
+
- **Offset** (int) -
|
|
520
|
+
- **TotalCount** (int) -
|
|
521
|
+
|
|
522
|
+
**Response Model**
|
|
523
|
+
|
|
524
|
+
**SimpleBwPackage**
|
|
525
|
+
- **BandWidth** (float) - 带宽值
|
|
526
|
+
- **ChangePayMode** (str) - 带宽包切换计费类型
|
|
527
|
+
- **ChangeStatus** (int) - 带宽包切换状态
|
|
528
|
+
- **ChangeTime** (int) - 带宽包切换时间
|
|
529
|
+
- **CreateTime** (int) - 创建时间
|
|
530
|
+
- **ExpireTime** (int) - 过期时间
|
|
531
|
+
- **Name** (str) -
|
|
532
|
+
- **PackageID** (str) -
|
|
533
|
+
- **Path** (str) - 智能路径Delay:最低时延|IGP:普通线路|TCO:最低成本
|
|
534
|
+
- **PayMode** (str) - 计费模式 FixedBw:固定带宽|Peak95:经典95|Max5:第五峰值|Traffic:流量计费
|
|
535
|
+
- **Qos** (str) - 服务质量Diamond:钻石|Platinum:铂金|Gold:黄金
|
|
536
|
+
- **RegionA** (str) - 地域A名称
|
|
537
|
+
- **RegionB** (str) - 地域B名称
|
|
538
|
+
- **Remark** (str) -
|
|
539
|
+
- **UGNID** (str) -
|
|
540
|
+
|
|
541
|
+
|
|
542
|
+
"""
|
|
543
|
+
# build request
|
|
544
|
+
d = {
|
|
545
|
+
"ProjectId": self.config.project_id,
|
|
546
|
+
}
|
|
547
|
+
req and d.update(req)
|
|
548
|
+
d = apis.ListSimpleBwPackageRequestSchema().dumps(d)
|
|
549
|
+
|
|
550
|
+
resp = self.invoke("ListSimpleBwPackage", d, **kwargs)
|
|
551
|
+
return apis.ListSimpleBwPackageResponseSchema().loads(resp)
|
|
552
|
+
|
|
553
|
+
def list_ugn(self, req: typing.Optional[dict] = None, **kwargs) -> dict:
|
|
554
|
+
"""ListUGN - 获取当前项目下所有云联网资源
|
|
555
|
+
|
|
556
|
+
**Request**
|
|
557
|
+
|
|
558
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
559
|
+
- **Limit** (int) - 分页大小,默认20
|
|
560
|
+
- **Offset** (int) - 偏移量,默认0
|
|
561
|
+
|
|
562
|
+
**Response**
|
|
563
|
+
|
|
564
|
+
- **Limit** (int) -
|
|
565
|
+
- **Message** (str) -
|
|
566
|
+
- **Offset** (int) -
|
|
567
|
+
- **TotalCount** (int) -
|
|
568
|
+
- **UGNs** (list) - 见 **UGN** 模型定义
|
|
569
|
+
|
|
570
|
+
**Response Model**
|
|
571
|
+
|
|
572
|
+
**UGN**
|
|
573
|
+
- **BwPackageCount** (int) - 绑定带宽包数量
|
|
574
|
+
- **CreateTime** (int) - 云联网创建时间
|
|
575
|
+
- **Name** (str) - 云联网名称
|
|
576
|
+
- **NetworkCount** (int) - 关联网络实例数量
|
|
577
|
+
- **Remark** (str) - 云联网备注
|
|
578
|
+
- **UGNID** (str) - 云联网资源 ID
|
|
579
|
+
|
|
580
|
+
|
|
581
|
+
"""
|
|
582
|
+
# build request
|
|
583
|
+
d = {
|
|
584
|
+
"ProjectId": self.config.project_id,
|
|
585
|
+
}
|
|
586
|
+
req and d.update(req)
|
|
587
|
+
d = apis.ListUGNRequestSchema().dumps(d)
|
|
588
|
+
|
|
589
|
+
resp = self.invoke("ListUGN", d, **kwargs)
|
|
590
|
+
return apis.ListUGNResponseSchema().loads(resp)
|
|
591
|
+
|
|
592
|
+
def modify_inter_region_bandwidth(
|
|
593
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
594
|
+
) -> dict:
|
|
595
|
+
"""ModifyInterRegionBandwidth - 修改跨域带宽
|
|
596
|
+
|
|
597
|
+
**Request**
|
|
598
|
+
|
|
599
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
600
|
+
- **Bandwidth** (str) - (Required) 带宽(单位为Mb/s)
|
|
601
|
+
- **InterRegionBandwidthId** (str) - (Required) 跨域带宽Id
|
|
602
|
+
- **UGNId** (str) - (Required) 云联网Id
|
|
603
|
+
- **PayMode** (str) - 付费类型
|
|
604
|
+
|
|
605
|
+
**Response**
|
|
606
|
+
|
|
607
|
+
- **Message** (str) - 返回码描述信息
|
|
608
|
+
|
|
609
|
+
"""
|
|
610
|
+
# build request
|
|
611
|
+
d = {
|
|
612
|
+
"ProjectId": self.config.project_id,
|
|
613
|
+
}
|
|
614
|
+
req and d.update(req)
|
|
615
|
+
d = apis.ModifyInterRegionBandwidthRequestSchema().dumps(d)
|
|
616
|
+
|
|
617
|
+
resp = self.invoke("ModifyInterRegionBandwidth", d, **kwargs)
|
|
618
|
+
return apis.ModifyInterRegionBandwidthResponseSchema().loads(resp)
|
|
619
|
+
|
|
620
|
+
def modify_ugn_attribute(
|
|
621
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
622
|
+
) -> dict:
|
|
623
|
+
"""ModifyUGNAttribute - 修改云联网属性
|
|
624
|
+
|
|
625
|
+
**Request**
|
|
626
|
+
|
|
627
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
628
|
+
- **UGNId** (str) - (Required) 云联网Id
|
|
629
|
+
- **Name** (str) - 云联网名称
|
|
630
|
+
- **Remark** (str) - 云联网备注
|
|
631
|
+
|
|
632
|
+
**Response**
|
|
633
|
+
|
|
634
|
+
- **Message** (str) - 错误码描述信息
|
|
635
|
+
|
|
636
|
+
"""
|
|
637
|
+
# build request
|
|
638
|
+
d = {
|
|
639
|
+
"ProjectId": self.config.project_id,
|
|
640
|
+
}
|
|
641
|
+
req and d.update(req)
|
|
642
|
+
d = apis.ModifyUGNAttributeRequestSchema().dumps(d)
|
|
643
|
+
|
|
644
|
+
resp = self.invoke("ModifyUGNAttribute", d, **kwargs)
|
|
645
|
+
return apis.ModifyUGNAttributeResponseSchema().loads(resp)
|
|
646
|
+
|
|
647
|
+
def modify_ugn_bandwidth(
|
|
648
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
649
|
+
) -> dict:
|
|
650
|
+
"""ModifyUGNBandwidth - 修改云联网带宽大小
|
|
651
|
+
|
|
652
|
+
**Request**
|
|
653
|
+
|
|
654
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
655
|
+
- **BandWidth** (int) - (Required) 带宽值
|
|
656
|
+
- **PackageID** (str) - (Required) 带宽包id
|
|
657
|
+
- **UGNID** (str) - (Required) 云联网id
|
|
658
|
+
|
|
659
|
+
**Response**
|
|
660
|
+
|
|
661
|
+
- **Message** (str) -
|
|
662
|
+
|
|
663
|
+
"""
|
|
664
|
+
# build request
|
|
665
|
+
d = {
|
|
666
|
+
"ProjectId": self.config.project_id,
|
|
667
|
+
}
|
|
668
|
+
req and d.update(req)
|
|
669
|
+
d = apis.ModifyUGNBandwidthRequestSchema().dumps(d)
|
|
670
|
+
|
|
671
|
+
resp = self.invoke("ModifyUGNBandwidth", d, **kwargs)
|
|
672
|
+
return apis.ModifyUGNBandwidthResponseSchema().loads(resp)
|
|
673
|
+
|
|
674
|
+
def publish_ugn_route_rule(
|
|
675
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
676
|
+
) -> dict:
|
|
677
|
+
"""PublishUGNRouteRule - 发布云联网路由规则
|
|
678
|
+
|
|
679
|
+
**Request**
|
|
680
|
+
|
|
681
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
682
|
+
- **DeriveRouteRuleId** (str) - (Required) 归属实例路由规则Id
|
|
683
|
+
- **DeriveRouteTableId** (str) - (Required) 归属实例路由表Id
|
|
684
|
+
- **InstanceId** (str) - (Required) 实例Id
|
|
685
|
+
- **UGNId** (str) - (Required) 云联网Id
|
|
686
|
+
|
|
687
|
+
**Response**
|
|
688
|
+
|
|
689
|
+
- **Message** (str) - 返回码描述信息
|
|
690
|
+
- **RouteRuleId** (str) - 路由规则Id
|
|
691
|
+
|
|
692
|
+
"""
|
|
693
|
+
# build request
|
|
694
|
+
d = {
|
|
695
|
+
"ProjectId": self.config.project_id,
|
|
696
|
+
}
|
|
697
|
+
req and d.update(req)
|
|
698
|
+
d = apis.PublishUGNRouteRuleRequestSchema().dumps(d)
|
|
699
|
+
|
|
700
|
+
# build options
|
|
701
|
+
kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
|
|
702
|
+
|
|
703
|
+
resp = self.invoke("PublishUGNRouteRule", d, **kwargs)
|
|
704
|
+
return apis.PublishUGNRouteRuleResponseSchema().loads(resp)
|
|
705
|
+
|
|
706
|
+
def s_describe_ugn(
|
|
707
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
708
|
+
) -> dict:
|
|
709
|
+
"""SDescribeUGN - 获取简洁版UGN详情
|
|
710
|
+
|
|
711
|
+
**Request**
|
|
712
|
+
|
|
713
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
714
|
+
- **UGNID** (str) - (Required) UGN ID
|
|
715
|
+
|
|
716
|
+
**Response**
|
|
717
|
+
|
|
718
|
+
- **BwPackages** (list) - 见 **SBwPackage** 模型定义
|
|
719
|
+
- **Message** (str) -
|
|
720
|
+
- **Networks** (list) - 见 **SNetwork** 模型定义
|
|
721
|
+
- **Policies** (list) - 暂不支持
|
|
722
|
+
- **Routes** (list) - 见 **Route** 模型定义
|
|
723
|
+
- **UGN** (dict) - 见 **UGN** 模型定义
|
|
724
|
+
|
|
725
|
+
**Response Model**
|
|
726
|
+
|
|
727
|
+
**SBwPackage**
|
|
728
|
+
- **BandWidth** (int) - 带宽值
|
|
729
|
+
- **ChangePayMode** (str) - 带宽包切换计费类型
|
|
730
|
+
- **ChangeStatus** (int) - 带宽包切换状态
|
|
731
|
+
- **ChangeTime** (int) - 带宽包切换时间
|
|
732
|
+
- **CreateTime** (int) - 创建时间
|
|
733
|
+
- **ExpireTime** (int) - 过期时间
|
|
734
|
+
- **Message** (str) - 备注信息
|
|
735
|
+
- **Name** (str) -
|
|
736
|
+
- **PackageID** (str) -
|
|
737
|
+
- **Path** (str) - 智能路径Delay:最低时延|IGP:普通线路|TCO:最低成本
|
|
738
|
+
- **PayMode** (str) - 计费模式 FixedBw:固定带宽|Peak95:经典95|Max5:第五峰值|Traffic:流量计费
|
|
739
|
+
- **Qos** (str) - 服务质量Diamond:钻石|Platinum:铂金|Gold:黄金
|
|
740
|
+
- **RegionA** (str) - 地域A名称
|
|
741
|
+
- **RegionB** (str) - 地域B名称
|
|
742
|
+
- **Remark** (str) -
|
|
743
|
+
- **UGNID** (str) -
|
|
744
|
+
|
|
745
|
+
|
|
746
|
+
**SNetwork**
|
|
747
|
+
- **CreateTime** (str) -
|
|
748
|
+
- **Name** (str) - 网络实例名称
|
|
749
|
+
- **NetworkID** (str) - 网络实例的ID,如 vnet-xxxxx
|
|
750
|
+
- **OrgID** (int) - 网络实例所在项目的ID
|
|
751
|
+
- **OrgName** (str) - 网络实例所在项目名
|
|
752
|
+
- **Region** (str) - 网络实例所在地域
|
|
753
|
+
- **RegionID** (int) - 网络实例所在地域ID
|
|
754
|
+
- **Type** (str) - 网络实例类型:VPC/HybridGW/...
|
|
755
|
+
|
|
756
|
+
|
|
757
|
+
**Route**
|
|
758
|
+
- **DstAddr** (str) - 目的网段
|
|
759
|
+
- **NexthopID** (str) - 下一跳网络实例 ID
|
|
760
|
+
- **NexthopRegion** (str) - 下一跳网络实例所属地域
|
|
761
|
+
- **NexthopRegionID** (int) - 下一跳网络实例所属地域 id
|
|
762
|
+
- **NexthopType** (str) - 下一跳网络实例类型
|
|
763
|
+
- **Priority** (int) - 路由优先级
|
|
764
|
+
|
|
765
|
+
|
|
766
|
+
**UGN**
|
|
767
|
+
- **BwPackageCount** (int) - 绑定带宽包数量
|
|
768
|
+
- **CreateTime** (int) - 云联网创建时间
|
|
769
|
+
- **Name** (str) - 云联网名称
|
|
770
|
+
- **NetworkCount** (int) - 关联网络实例数量
|
|
771
|
+
- **Remark** (str) - 云联网备注
|
|
772
|
+
- **UGNID** (str) - 云联网资源 ID
|
|
773
|
+
|
|
774
|
+
|
|
775
|
+
"""
|
|
776
|
+
# build request
|
|
777
|
+
d = {
|
|
778
|
+
"ProjectId": self.config.project_id,
|
|
779
|
+
}
|
|
780
|
+
req and d.update(req)
|
|
781
|
+
d = apis.SDescribeUGNRequestSchema().dumps(d)
|
|
782
|
+
|
|
783
|
+
resp = self.invoke("SDescribeUGN", d, **kwargs)
|
|
784
|
+
return apis.SDescribeUGNResponseSchema().loads(resp)
|
|
785
|
+
|
|
786
|
+
def unpublish_ugn_route_rule(
|
|
787
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
788
|
+
) -> dict:
|
|
789
|
+
"""UnpublishUGNRouteRule - 取消发布云联网路由规则
|
|
790
|
+
|
|
791
|
+
**Request**
|
|
792
|
+
|
|
793
|
+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
|
|
794
|
+
- **DeriveRouteRuleId** (str) - (Required) 归属实例路由规则Id
|
|
795
|
+
- **DeriveRouteTableId** (str) - (Required) 归属实例路由表Id
|
|
796
|
+
- **InstanceId** (str) - (Required) 实例Id
|
|
797
|
+
- **UGNId** (str) - (Required) 云联网Id
|
|
798
|
+
|
|
799
|
+
**Response**
|
|
800
|
+
|
|
801
|
+
- **Message** (str) - 返回码描述信息
|
|
802
|
+
|
|
803
|
+
"""
|
|
804
|
+
# build request
|
|
805
|
+
d = {
|
|
806
|
+
"ProjectId": self.config.project_id,
|
|
807
|
+
}
|
|
808
|
+
req and d.update(req)
|
|
809
|
+
d = apis.UnpublishUGNRouteRuleRequestSchema().dumps(d)
|
|
810
|
+
|
|
811
|
+
resp = self.invoke("UnpublishUGNRouteRule", d, **kwargs)
|
|
812
|
+
return apis.UnpublishUGNRouteRuleResponseSchema().loads(resp)
|
|
813
|
+
|
|
814
|
+
def update_ugn_bw_package(
|
|
815
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
816
|
+
) -> dict:
|
|
817
|
+
"""UpdateUGNBwPackage -
|
|
818
|
+
|
|
819
|
+
**Request**
|
|
820
|
+
|
|
821
|
+
- **ProjectId** (str) - (Config)
|
|
822
|
+
- **BwBidRate** (float) - (Required)
|
|
823
|
+
- **BwULRate** (float) - (Required)
|
|
824
|
+
- **PackageID** (str) - (Required)
|
|
825
|
+
- **Path** (str) - (Required)
|
|
826
|
+
- **PayMode** (str) - (Required)
|
|
827
|
+
- **Qos** (str) - (Required)
|
|
828
|
+
- **RegionA** (str) - (Required)
|
|
829
|
+
- **RegionABwMax** (int) - (Required)
|
|
830
|
+
- **RegionABwMin** (int) - (Required)
|
|
831
|
+
- **RegionB** (str) - (Required)
|
|
832
|
+
- **RegionBBwMax** (int) - (Required)
|
|
833
|
+
- **RegionBBwMin** (int) - (Required)
|
|
834
|
+
- **UGNID** (str) - (Required)
|
|
835
|
+
- **ChargeType** (str) -
|
|
836
|
+
- **Coupon** (str) -
|
|
837
|
+
- **Name** (str) -
|
|
838
|
+
- **Quantity** (str) -
|
|
839
|
+
- **Remark** (str) -
|
|
840
|
+
|
|
841
|
+
**Response**
|
|
842
|
+
|
|
843
|
+
- **Message** (str) -
|
|
844
|
+
|
|
845
|
+
"""
|
|
846
|
+
# build request
|
|
847
|
+
d = {
|
|
848
|
+
"ProjectId": self.config.project_id,
|
|
849
|
+
}
|
|
850
|
+
req and d.update(req)
|
|
851
|
+
d = apis.UpdateUGNBwPackageRequestSchema().dumps(d)
|
|
852
|
+
|
|
853
|
+
# build options
|
|
854
|
+
kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
|
|
855
|
+
|
|
856
|
+
resp = self.invoke("UpdateUGNBwPackage", d, **kwargs)
|
|
857
|
+
return apis.UpdateUGNBwPackageResponseSchema().loads(resp)
|