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,547 @@
|
|
|
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.uaccount.schemas import apis
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class UAccountClient(Client):
|
|
11
|
+
def __init__(
|
|
12
|
+
self, config: dict, transport=None, middleware=None, logger=None
|
|
13
|
+
):
|
|
14
|
+
super(UAccountClient, self).__init__(
|
|
15
|
+
config, transport, middleware, logger
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
def add_member_to_project(
|
|
19
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
20
|
+
) -> dict:
|
|
21
|
+
"""AddMemberToProject - 添加成员到项目
|
|
22
|
+
|
|
23
|
+
**Request**
|
|
24
|
+
|
|
25
|
+
- **ProjectId** (str) - (Config) 项目ID,请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_ 的描述。不填写为创建时间最早的项目。
|
|
26
|
+
- **CharacterId** (str) - (Required) 被加入成员归属角色ID
|
|
27
|
+
- **MemberEmail** (str) - (Required) 被加入成员Email
|
|
28
|
+
|
|
29
|
+
**Response**
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
"""
|
|
33
|
+
# build request
|
|
34
|
+
d = {
|
|
35
|
+
"ProjectId": self.config.project_id,
|
|
36
|
+
}
|
|
37
|
+
req and d.update(req)
|
|
38
|
+
d = apis.AddMemberToProjectRequestSchema().dumps(d)
|
|
39
|
+
|
|
40
|
+
# build options
|
|
41
|
+
kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
|
|
42
|
+
|
|
43
|
+
resp = self.invoke("AddMemberToProject", d, **kwargs)
|
|
44
|
+
return apis.AddMemberToProjectResponseSchema().loads(resp)
|
|
45
|
+
|
|
46
|
+
def create_character(
|
|
47
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
48
|
+
) -> dict:
|
|
49
|
+
"""CreateCharacter - 创建角色
|
|
50
|
+
|
|
51
|
+
**Request**
|
|
52
|
+
|
|
53
|
+
- **CharacterName** (str) - (Required) 角色名称,不得与现有角色重名
|
|
54
|
+
- **Add** (list) - 角色对产品的权限(增)
|
|
55
|
+
- **CharacterDescription** (str) - 角色描述
|
|
56
|
+
- **Del** (list) - 角色对产品的权限(删)
|
|
57
|
+
- **Get** (list) - 角色对产品的权限(查)
|
|
58
|
+
- **Mod** (list) - 角色对产品的权限(改)
|
|
59
|
+
|
|
60
|
+
**Response**
|
|
61
|
+
|
|
62
|
+
- **CharacterId** (str) - 角色ID
|
|
63
|
+
|
|
64
|
+
"""
|
|
65
|
+
# build request
|
|
66
|
+
d = {}
|
|
67
|
+
req and d.update(req)
|
|
68
|
+
d = apis.CreateCharacterRequestSchema().dumps(d)
|
|
69
|
+
|
|
70
|
+
# build options
|
|
71
|
+
kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
|
|
72
|
+
|
|
73
|
+
resp = self.invoke("CreateCharacter", d, **kwargs)
|
|
74
|
+
return apis.CreateCharacterResponseSchema().loads(resp)
|
|
75
|
+
|
|
76
|
+
def create_project(
|
|
77
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
78
|
+
) -> dict:
|
|
79
|
+
"""CreateProject -
|
|
80
|
+
|
|
81
|
+
**Request**
|
|
82
|
+
|
|
83
|
+
- **ProjectName** (str) - (Required)
|
|
84
|
+
|
|
85
|
+
**Response**
|
|
86
|
+
|
|
87
|
+
- **ProjectId** (str) -
|
|
88
|
+
|
|
89
|
+
"""
|
|
90
|
+
# build request
|
|
91
|
+
d = {}
|
|
92
|
+
req and d.update(req)
|
|
93
|
+
d = apis.CreateProjectRequestSchema().dumps(d)
|
|
94
|
+
|
|
95
|
+
# build options
|
|
96
|
+
kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
|
|
97
|
+
|
|
98
|
+
resp = self.invoke("CreateProject", d, **kwargs)
|
|
99
|
+
return apis.CreateProjectResponseSchema().loads(resp)
|
|
100
|
+
|
|
101
|
+
def describe_character_list(
|
|
102
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
103
|
+
) -> dict:
|
|
104
|
+
"""DescribeCharacterList - 获取角色列表
|
|
105
|
+
|
|
106
|
+
**Request**
|
|
107
|
+
|
|
108
|
+
- **Limit** (int) - 角色列表的最大数量,默认为20
|
|
109
|
+
- **Offset** (int) - 角色列表的偏移量,默认为0
|
|
110
|
+
|
|
111
|
+
**Response**
|
|
112
|
+
|
|
113
|
+
- **CharacterSet** (list) - 见 **CharacterSet** 模型定义
|
|
114
|
+
- **TotalCount** (int) - 角色总数
|
|
115
|
+
|
|
116
|
+
**Response Model**
|
|
117
|
+
|
|
118
|
+
**CharacterSet**
|
|
119
|
+
- **CharacterDescription** (str) - 角色描述
|
|
120
|
+
- **CharacterId** (str) - 角色ID
|
|
121
|
+
- **CharacterName** (str) - 角色名
|
|
122
|
+
- **Modifiable** (bool) - 可修改性
|
|
123
|
+
- **PermissionSet** (list) - 见 **PermissionSet** 模型定义
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
**PermissionSet**
|
|
127
|
+
- **Add** (list) - 有增权限的产品列表
|
|
128
|
+
- **Del** (list) - 有删权限的产品列表
|
|
129
|
+
- **Get** (list) - 有查权限的产品列表
|
|
130
|
+
- **Mod** (list) - 有改权限的产品列表
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
"""
|
|
134
|
+
# build request
|
|
135
|
+
d = {}
|
|
136
|
+
req and d.update(req)
|
|
137
|
+
d = apis.DescribeCharacterListRequestSchema().dumps(d)
|
|
138
|
+
|
|
139
|
+
resp = self.invoke("DescribeCharacterList", d, **kwargs)
|
|
140
|
+
return apis.DescribeCharacterListResponseSchema().loads(resp)
|
|
141
|
+
|
|
142
|
+
def describe_member_list(
|
|
143
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
144
|
+
) -> dict:
|
|
145
|
+
"""DescribeMemberList - 获取成员列表,限主账号使用。
|
|
146
|
+
|
|
147
|
+
**Request**
|
|
148
|
+
|
|
149
|
+
- **ProjectId** (str) - (Config) 项目ID,请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_ 。不填写为查询所有项目。
|
|
150
|
+
- **Limit** (str) - 成员列表的最大数量,默认为200
|
|
151
|
+
- **Offset** (str) - 成员列表的偏移量,默认为0
|
|
152
|
+
|
|
153
|
+
**Response**
|
|
154
|
+
|
|
155
|
+
- **MemberSet** (list) - 见 **MemberInfo** 模型定义
|
|
156
|
+
- **TotalCount** (int) - 成员总数
|
|
157
|
+
|
|
158
|
+
**Response Model**
|
|
159
|
+
|
|
160
|
+
**MemberInfo**
|
|
161
|
+
- **ActivateFlag** (int) - 激活状态(0:未激活,1:已激活)
|
|
162
|
+
- **Created** (int) - 创建时间
|
|
163
|
+
- **DefultProjectId** (str) - 默认项目
|
|
164
|
+
- **IsAdmin** (int) - 是否主账号(0:子账号,1:主账号)
|
|
165
|
+
- **IsFinance** (int) - 是否有财务权限(0:无财务权限,1:有财务权限)
|
|
166
|
+
- **LastLogin** (int) - 最后一次登录时间
|
|
167
|
+
- **LastRegionId** (str) - 最后访问的机房
|
|
168
|
+
- **MemberEmail** (str) - 成员邮箱
|
|
169
|
+
- **MemberName** (str) - 成员名字
|
|
170
|
+
- **MemberPhone** (str) - 成员手机
|
|
171
|
+
- **MemberPosition** (str) - 成员地址
|
|
172
|
+
- **MemberQQ** (str) - 成员QQ
|
|
173
|
+
- **PasswordPolicyDate** (int) - 密码安全策略开启时间,格式:unix timestamp
|
|
174
|
+
- **ProjectSet** (list) - 见 **ProjectInfo** 模型定义
|
|
175
|
+
- **PublicKey** (str) - 公钥
|
|
176
|
+
- **State** (str) - 状态
|
|
177
|
+
- **TOTPStatus** (int) - TOTP状态(0:未开启,1:已开启)
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
**ProjectInfo**
|
|
181
|
+
- **CharacterId** (str) - 角色ID
|
|
182
|
+
- **ProjectId** (str) - 项目ID,请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_
|
|
183
|
+
- **ProjectName** (str) - 项目名
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
"""
|
|
187
|
+
# build request
|
|
188
|
+
d = {
|
|
189
|
+
"ProjectId": self.config.project_id,
|
|
190
|
+
}
|
|
191
|
+
req and d.update(req)
|
|
192
|
+
d = apis.DescribeMemberListRequestSchema().dumps(d)
|
|
193
|
+
|
|
194
|
+
resp = self.invoke("DescribeMemberList", d, **kwargs)
|
|
195
|
+
return apis.DescribeMemberListResponseSchema().loads(resp)
|
|
196
|
+
|
|
197
|
+
def freeze_member(
|
|
198
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
199
|
+
) -> dict:
|
|
200
|
+
"""FreezeMember - 冻结成员
|
|
201
|
+
|
|
202
|
+
**Request**
|
|
203
|
+
|
|
204
|
+
- **MemberEmail** (str) - (Required) 需要被冻结的成员Email
|
|
205
|
+
|
|
206
|
+
**Response**
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
"""
|
|
210
|
+
# build request
|
|
211
|
+
d = {}
|
|
212
|
+
req and d.update(req)
|
|
213
|
+
d = apis.FreezeMemberRequestSchema().dumps(d)
|
|
214
|
+
|
|
215
|
+
resp = self.invoke("FreezeMember", d, **kwargs)
|
|
216
|
+
return apis.FreezeMemberResponseSchema().loads(resp)
|
|
217
|
+
|
|
218
|
+
def get_network_mask(
|
|
219
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
220
|
+
) -> dict:
|
|
221
|
+
"""GetNetworkMask - 查询登录与API调用的网络掩码
|
|
222
|
+
|
|
223
|
+
**Request**
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
**Response**
|
|
227
|
+
|
|
228
|
+
- **Data** (dict) - 见 **NetworkMask** 模型定义
|
|
229
|
+
- **Message** (str) - 接口信息,成功时为`success`,错误时显示具体错误信息。
|
|
230
|
+
|
|
231
|
+
**Response Model**
|
|
232
|
+
|
|
233
|
+
**NetworkMask**
|
|
234
|
+
- **APINetworkMask** (str) - API调用网络掩码,默认空字符串,不限制登录IP,多个IP以英文逗号分隔。
|
|
235
|
+
- **LoginNetworkMask** (str) - 登录网络掩码,默认空字符串,不限制登录IP,多个IP以英文逗号分隔。
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
"""
|
|
239
|
+
# build request
|
|
240
|
+
d = {}
|
|
241
|
+
req and d.update(req)
|
|
242
|
+
d = apis.GetNetworkMaskRequestSchema().dumps(d)
|
|
243
|
+
|
|
244
|
+
resp = self.invoke("GetNetworkMask", d, **kwargs)
|
|
245
|
+
return apis.GetNetworkMaskResponseSchema().loads(resp)
|
|
246
|
+
|
|
247
|
+
def get_project_list(
|
|
248
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
249
|
+
) -> dict:
|
|
250
|
+
"""GetProjectList - 获取项目列表
|
|
251
|
+
|
|
252
|
+
**Request**
|
|
253
|
+
|
|
254
|
+
- **IsFinance** (str) - 是否是财务账号(Yes:是,No:否)
|
|
255
|
+
|
|
256
|
+
**Response**
|
|
257
|
+
|
|
258
|
+
- **ProjectCount** (int) - 项目总数
|
|
259
|
+
- **ProjectSet** (list) - 见 **ProjectListInfo** 模型定义
|
|
260
|
+
|
|
261
|
+
**Response Model**
|
|
262
|
+
|
|
263
|
+
**ProjectListInfo**
|
|
264
|
+
- **CreateTime** (int) - 创建时间(Unix时间戳)
|
|
265
|
+
- **IsDefault** (bool) - 是否为默认项目
|
|
266
|
+
- **MemberCount** (int) - 项目下成员数量
|
|
267
|
+
- **ParentId** (str) - 父项目ID(已废弃)
|
|
268
|
+
- **ParentName** (str) - 父项目名称(已废弃)
|
|
269
|
+
- **ProjectId** (str) - 项目ID
|
|
270
|
+
- **ProjectName** (str) - 项目名称
|
|
271
|
+
- **ResourceCount** (int) - 项目下资源数量(已废弃,不建议使用)
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
"""
|
|
275
|
+
# build request
|
|
276
|
+
d = {}
|
|
277
|
+
req and d.update(req)
|
|
278
|
+
d = apis.GetProjectListRequestSchema().dumps(d)
|
|
279
|
+
|
|
280
|
+
resp = self.invoke("GetProjectList", d, **kwargs)
|
|
281
|
+
return apis.GetProjectListResponseSchema().loads(resp)
|
|
282
|
+
|
|
283
|
+
def get_region(self, req: typing.Optional[dict] = None, **kwargs) -> dict:
|
|
284
|
+
"""GetRegion - 获取用户在各数据中心的权限等信息
|
|
285
|
+
|
|
286
|
+
**Request**
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
**Response**
|
|
290
|
+
|
|
291
|
+
- **Regions** (list) - 见 **RegionInfo** 模型定义
|
|
292
|
+
|
|
293
|
+
**Response Model**
|
|
294
|
+
|
|
295
|
+
**RegionInfo**
|
|
296
|
+
- **BitMaps** (str) - 用户在此数据中心的权限位
|
|
297
|
+
- **IsDefault** (bool) - 是否用户当前默认数据中心
|
|
298
|
+
- **Region** (str) - 地域名字,如cn-bj
|
|
299
|
+
- **RegionId** (int) - 数据中心ID
|
|
300
|
+
- **RegionName** (str) - 数据中心名称
|
|
301
|
+
- **Zone** (str) - 可用区名字,如cn-bj-01
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
"""
|
|
305
|
+
# build request
|
|
306
|
+
d = {}
|
|
307
|
+
req and d.update(req)
|
|
308
|
+
d = apis.GetRegionRequestSchema().dumps(d)
|
|
309
|
+
|
|
310
|
+
resp = self.invoke("GetRegion", d, **kwargs)
|
|
311
|
+
return apis.GetRegionResponseSchema().loads(resp)
|
|
312
|
+
|
|
313
|
+
def get_user_info(
|
|
314
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
315
|
+
) -> dict:
|
|
316
|
+
"""GetUserInfo -
|
|
317
|
+
|
|
318
|
+
**Request**
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
**Response**
|
|
322
|
+
|
|
323
|
+
- **DataSet** (list) - 见 **UserInfo** 模型定义
|
|
324
|
+
|
|
325
|
+
**Response Model**
|
|
326
|
+
|
|
327
|
+
**UserInfo**
|
|
328
|
+
- **Admin** (int) -
|
|
329
|
+
- **Administrator** (str) -
|
|
330
|
+
- **AuthState** (str) -
|
|
331
|
+
- **City** (str) -
|
|
332
|
+
- **CompanyName** (str) -
|
|
333
|
+
- **Finance** (int) -
|
|
334
|
+
- **IndustryType** (int) -
|
|
335
|
+
- **PhonePrefix** (str) -
|
|
336
|
+
- **Province** (str) -
|
|
337
|
+
- **UserAddress** (str) -
|
|
338
|
+
- **UserEmail** (str) -
|
|
339
|
+
- **UserId** (int) -
|
|
340
|
+
- **UserName** (str) -
|
|
341
|
+
- **UserPhone** (str) -
|
|
342
|
+
- **UserType** (int) -
|
|
343
|
+
- **UserVersion** (int) -
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
"""
|
|
347
|
+
# build request
|
|
348
|
+
d = {}
|
|
349
|
+
req and d.update(req)
|
|
350
|
+
d = apis.GetUserInfoRequestSchema().dumps(d)
|
|
351
|
+
|
|
352
|
+
# build options
|
|
353
|
+
kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
|
|
354
|
+
|
|
355
|
+
resp = self.invoke("GetUserInfo", d, **kwargs)
|
|
356
|
+
return apis.GetUserInfoResponseSchema().loads(resp)
|
|
357
|
+
|
|
358
|
+
def invite_subaccount(
|
|
359
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
360
|
+
) -> dict:
|
|
361
|
+
"""InviteSubaccount - 邀请子帐号成员
|
|
362
|
+
|
|
363
|
+
**Request**
|
|
364
|
+
|
|
365
|
+
- **IsFinance** (str) - (Required) 是否有财务权限(true:是,false:否,默认为否)
|
|
366
|
+
- **UserEmail** (str) - (Required) 受邀成员邮箱地址,不得重复
|
|
367
|
+
- **UserName** (str) - (Required) 受邀成员姓名
|
|
368
|
+
- **UserPhone** (str) - (Required) 受邀成员手机号码
|
|
369
|
+
|
|
370
|
+
**Response**
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
"""
|
|
374
|
+
# build request
|
|
375
|
+
d = {}
|
|
376
|
+
req and d.update(req)
|
|
377
|
+
d = apis.InviteSubaccountRequestSchema().dumps(d)
|
|
378
|
+
|
|
379
|
+
resp = self.invoke("InviteSubaccount", d, **kwargs)
|
|
380
|
+
return apis.InviteSubaccountResponseSchema().loads(resp)
|
|
381
|
+
|
|
382
|
+
def modify_character(
|
|
383
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
384
|
+
) -> dict:
|
|
385
|
+
"""ModifyCharacter - 修改角色
|
|
386
|
+
|
|
387
|
+
**Request**
|
|
388
|
+
|
|
389
|
+
- **CharacterId** (str) - (Required) 角色ID
|
|
390
|
+
- **Add** (list) - 角色权限(增)
|
|
391
|
+
- **CharacterDescription** (str) - 角色描述
|
|
392
|
+
- **CharacterName** (str) - 新角色名称
|
|
393
|
+
- **Del** (list) - 角色权限(删)
|
|
394
|
+
- **Get** (list) - 角色权限(查)
|
|
395
|
+
- **Mod** (list) - 角色权限(改)
|
|
396
|
+
|
|
397
|
+
**Response**
|
|
398
|
+
|
|
399
|
+
|
|
400
|
+
"""
|
|
401
|
+
# build request
|
|
402
|
+
d = {}
|
|
403
|
+
req and d.update(req)
|
|
404
|
+
d = apis.ModifyCharacterRequestSchema().dumps(d)
|
|
405
|
+
|
|
406
|
+
resp = self.invoke("ModifyCharacter", d, **kwargs)
|
|
407
|
+
return apis.ModifyCharacterResponseSchema().loads(resp)
|
|
408
|
+
|
|
409
|
+
def modify_project(
|
|
410
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
411
|
+
) -> dict:
|
|
412
|
+
"""ModifyProject -
|
|
413
|
+
|
|
414
|
+
**Request**
|
|
415
|
+
|
|
416
|
+
- **ProjectId** (str) - (Config)
|
|
417
|
+
- **ProjectName** (str) - (Required)
|
|
418
|
+
|
|
419
|
+
**Response**
|
|
420
|
+
|
|
421
|
+
|
|
422
|
+
"""
|
|
423
|
+
# build request
|
|
424
|
+
d = {
|
|
425
|
+
"ProjectId": self.config.project_id,
|
|
426
|
+
}
|
|
427
|
+
req and d.update(req)
|
|
428
|
+
d = apis.ModifyProjectRequestSchema().dumps(d)
|
|
429
|
+
|
|
430
|
+
# build options
|
|
431
|
+
kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
|
|
432
|
+
|
|
433
|
+
resp = self.invoke("ModifyProject", d, **kwargs)
|
|
434
|
+
return apis.ModifyProjectResponseSchema().loads(resp)
|
|
435
|
+
|
|
436
|
+
def remove_member_from_project(
|
|
437
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
438
|
+
) -> dict:
|
|
439
|
+
"""RemoveMemberFromProject - 从项目中移除成员
|
|
440
|
+
|
|
441
|
+
**Request**
|
|
442
|
+
|
|
443
|
+
- **ProjectId** (str) - (Config) 项目ID,请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_ 的描述。不填写为默认项目,子帐号必须填写。
|
|
444
|
+
- **MemberEmail** (str) - (Required) 需要被移除成员Email
|
|
445
|
+
|
|
446
|
+
**Response**
|
|
447
|
+
|
|
448
|
+
|
|
449
|
+
"""
|
|
450
|
+
# build request
|
|
451
|
+
d = {
|
|
452
|
+
"ProjectId": self.config.project_id,
|
|
453
|
+
}
|
|
454
|
+
req and d.update(req)
|
|
455
|
+
d = apis.RemoveMemberFromProjectRequestSchema().dumps(d)
|
|
456
|
+
|
|
457
|
+
resp = self.invoke("RemoveMemberFromProject", d, **kwargs)
|
|
458
|
+
return apis.RemoveMemberFromProjectResponseSchema().loads(resp)
|
|
459
|
+
|
|
460
|
+
def set_network_mask(
|
|
461
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
462
|
+
) -> dict:
|
|
463
|
+
"""SetNetworkMask - 设置登录与API调用的网络掩码
|
|
464
|
+
|
|
465
|
+
**Request**
|
|
466
|
+
|
|
467
|
+
- **Code** (str) - (Required) 短信验证码
|
|
468
|
+
- **APINetworkMask** (str) - API调用网络掩码,多个IP以英文逗号分隔。默认空字符串,不限制登录IP。
|
|
469
|
+
- **LoginNetworkMask** (str) - 登录网络掩码,多个IP以英文逗号分隔。默认空字符串,不限制登录IP。
|
|
470
|
+
|
|
471
|
+
**Response**
|
|
472
|
+
|
|
473
|
+
- **Message** (str) - 接口信息,成功时为`success`,错误时显示具体错误信息。
|
|
474
|
+
|
|
475
|
+
"""
|
|
476
|
+
# build request
|
|
477
|
+
d = {}
|
|
478
|
+
req and d.update(req)
|
|
479
|
+
d = apis.SetNetworkMaskRequestSchema().dumps(d)
|
|
480
|
+
|
|
481
|
+
resp = self.invoke("SetNetworkMask", d, **kwargs)
|
|
482
|
+
return apis.SetNetworkMaskResponseSchema().loads(resp)
|
|
483
|
+
|
|
484
|
+
def terminate_character(
|
|
485
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
486
|
+
) -> dict:
|
|
487
|
+
"""TerminateCharacter - 删除用户角色管理列表中的指定角色
|
|
488
|
+
|
|
489
|
+
**Request**
|
|
490
|
+
|
|
491
|
+
- **CharacterId** (str) - (Required) 角色ID,使用 `DescribeCharacterList接口 <https://docs.ucloud.cn/api/summary/describe_character_list.html>`_ 获取角色ID
|
|
492
|
+
|
|
493
|
+
**Response**
|
|
494
|
+
|
|
495
|
+
|
|
496
|
+
"""
|
|
497
|
+
# build request
|
|
498
|
+
d = {}
|
|
499
|
+
req and d.update(req)
|
|
500
|
+
d = apis.TerminateCharacterRequestSchema().dumps(d)
|
|
501
|
+
|
|
502
|
+
resp = self.invoke("TerminateCharacter", d, **kwargs)
|
|
503
|
+
return apis.TerminateCharacterResponseSchema().loads(resp)
|
|
504
|
+
|
|
505
|
+
def terminate_member(
|
|
506
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
507
|
+
) -> dict:
|
|
508
|
+
"""TerminateMember - 删除管理员人员管理页面的指定子账号
|
|
509
|
+
|
|
510
|
+
**Request**
|
|
511
|
+
|
|
512
|
+
- **MemberEmail** (str) - (Required) 用户邮箱
|
|
513
|
+
|
|
514
|
+
**Response**
|
|
515
|
+
|
|
516
|
+
|
|
517
|
+
"""
|
|
518
|
+
# build request
|
|
519
|
+
d = {}
|
|
520
|
+
req and d.update(req)
|
|
521
|
+
d = apis.TerminateMemberRequestSchema().dumps(d)
|
|
522
|
+
|
|
523
|
+
resp = self.invoke("TerminateMember", d, **kwargs)
|
|
524
|
+
return apis.TerminateMemberResponseSchema().loads(resp)
|
|
525
|
+
|
|
526
|
+
def terminate_project(
|
|
527
|
+
self, req: typing.Optional[dict] = None, **kwargs
|
|
528
|
+
) -> dict:
|
|
529
|
+
"""TerminateProject - 删除项目
|
|
530
|
+
|
|
531
|
+
**Request**
|
|
532
|
+
|
|
533
|
+
- **ProjectId** (str) - (Config) 项目ID,请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list.html>`_ 的描述。
|
|
534
|
+
|
|
535
|
+
**Response**
|
|
536
|
+
|
|
537
|
+
|
|
538
|
+
"""
|
|
539
|
+
# build request
|
|
540
|
+
d = {
|
|
541
|
+
"ProjectId": self.config.project_id,
|
|
542
|
+
}
|
|
543
|
+
req and d.update(req)
|
|
544
|
+
d = apis.TerminateProjectRequestSchema().dumps(d)
|
|
545
|
+
|
|
546
|
+
resp = self.invoke("TerminateProject", d, **kwargs)
|
|
547
|
+
return apis.TerminateProjectResponseSchema().loads(resp)
|
|
File without changes
|