Skip to content

Commit c6f6ef0

Browse files
authored
sdk: rolling update for 0.11.65 (#270)
1 parent eb8fa72 commit c6f6ef0

File tree

21 files changed

+922
-119
lines changed

21 files changed

+922
-119
lines changed

docs/services.rst

+7
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,13 @@ TiDB
129129
:members:
130130

131131

132+
UAAA
133+
----
134+
135+
.. autoclass:: ucloud.services.uaaa.client.UAAAClient
136+
:members:
137+
138+
132139
UADS
133140
----
134141

ucloud/client.py

+10
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,16 @@ def tidb(self):
9292
self.logger,
9393
)
9494

95+
def uaaa(self):
96+
from ucloud.services.uaaa.client import UAAAClient
97+
98+
return UAAAClient(
99+
self._auto_config("uaaa"),
100+
self.transport,
101+
self.middleware,
102+
self.logger,
103+
)
104+
95105
def uads(self):
96106
from ucloud.services.uads.client import UADSClient
97107

ucloud/services/uaaa/__init__.py

Whitespace-only changes.

ucloud/services/uaaa/client.py

+311
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,311 @@
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.uaaa.schemas import apis
8+
9+
10+
class UAAAClient(Client):
11+
def __init__(
12+
self, config: dict, transport=None, middleware=None, logger=None
13+
):
14+
super(UAAAClient, self).__init__(config, transport, middleware, logger)
15+
16+
def create_app_repo(
17+
self, req: typing.Optional[dict] = None, **kwargs
18+
) -> dict:
19+
"""CreateAppRepo - 创建应用仓库加速实例
20+
21+
**Request**
22+
23+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
24+
- **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
25+
- **ChargeType** (str) - (Required) 计费类型(年:'Year', 月:'Month',小时:'Dynamic')
26+
- **Name** (str) - (Required) 名称
27+
- **VPCId** (list) - (Required) 待加速的VPCId ( 目前只允许一个)
28+
- **CouponId** (str) - 代金券
29+
- **Description** (str) - 应用仓库描述
30+
- **Quantity** (int) - 数量(ChargeType对应的数值): ChargeType = Month 时,默认0 ,其他条件为必须字段
31+
- **RecordName** (list) - 记录名称,需在给定列表中
32+
33+
**Response**
34+
35+
- **InstanceId** (str) - 应用仓库加速实例ID
36+
- **Message** (str) - 错误信息
37+
38+
"""
39+
# build request
40+
d = {
41+
"ProjectId": self.config.project_id,
42+
"Region": self.config.region,
43+
}
44+
req and d.update(req)
45+
d = apis.CreateAppRepoRequestSchema().dumps(d)
46+
47+
# build options
48+
kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
49+
50+
resp = self.invoke("CreateAppRepo", d, **kwargs)
51+
return apis.CreateAppRepoResponseSchema().loads(resp)
52+
53+
def delete_app_repo(
54+
self, req: typing.Optional[dict] = None, **kwargs
55+
) -> dict:
56+
"""DeleteAppRepo - 删除应用仓库加速实例
57+
58+
**Request**
59+
60+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
61+
- **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
62+
- **InstanceId** (str) - (Required) 实例 ID
63+
64+
**Response**
65+
66+
67+
"""
68+
# build request
69+
d = {
70+
"ProjectId": self.config.project_id,
71+
"Region": self.config.region,
72+
}
73+
req and d.update(req)
74+
d = apis.DeleteAppRepoRequestSchema().dumps(d)
75+
76+
resp = self.invoke("DeleteAppRepo", d, **kwargs)
77+
return apis.DeleteAppRepoResponseSchema().loads(resp)
78+
79+
def describe_app_repo(
80+
self, req: typing.Optional[dict] = None, **kwargs
81+
) -> dict:
82+
"""DescribeAppRepo - 查询应用仓库实例信息
83+
84+
**Request**
85+
86+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
87+
- **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
88+
- **InstanceId** (str) - 应用仓库加速实例ID
89+
90+
**Response**
91+
92+
- **DataSet** (list) - 见 **AppRepoInstance** 模型定义
93+
- **Message** (str) - 错误信息
94+
95+
**Response Model**
96+
97+
**AppRepoInstance**
98+
- **ChargeType** (str) - 计费类型
99+
- **CreateTime** (int) - 创建时间。格式为Unix Timestamp
100+
- **Description** (str) - 应用仓库描述信息
101+
- **ExpireTime** (int) - 到期时间
102+
- **InstanceId** (str) - 应用仓库实例ID
103+
- **Name** (str) - 应用仓库名
104+
- **RecordName** (list) - 应用仓库绑定的加速域名
105+
- **VPC** (list) - 应用仓库绑定的vpc 信息
106+
107+
108+
"""
109+
# build request
110+
d = {
111+
"ProjectId": self.config.project_id,
112+
"Region": self.config.region,
113+
}
114+
req and d.update(req)
115+
d = apis.DescribeAppRepoRequestSchema().dumps(d)
116+
117+
resp = self.invoke("DescribeAppRepo", d, **kwargs)
118+
return apis.DescribeAppRepoResponseSchema().loads(resp)
119+
120+
def describe_app_repo_permit_domain(
121+
self, req: typing.Optional[dict] = None, **kwargs
122+
) -> dict:
123+
"""DescribeAppRepoPermitDomain - 查询允许加速的域名白名单
124+
125+
**Request**
126+
127+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
128+
- **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
129+
130+
**Response**
131+
132+
- **DataSet** (list) - 见 **DomainDetail** 模型定义
133+
- **Message** (str) - 错误信息
134+
135+
**Response Model**
136+
137+
**DomainInfo**
138+
- **Desc** (str) - 备注信息
139+
- **DomainName** (str) - 域名解析记录名称
140+
141+
142+
**DomainDetail**
143+
- **Info** (dict) - 见 **DomainInfo** 模型定义
144+
- **Redirect** (list) - 见 **DomainInfo** 模型定义
145+
146+
147+
"""
148+
# build request
149+
d = {
150+
"ProjectId": self.config.project_id,
151+
"Region": self.config.region,
152+
}
153+
req and d.update(req)
154+
d = apis.DescribeAppRepoPermitDomainRequestSchema().dumps(d)
155+
156+
resp = self.invoke("DescribeAppRepoPermitDomain", d, **kwargs)
157+
return apis.DescribeAppRepoPermitDomainResponseSchema().loads(resp)
158+
159+
def describe_app_repo_post_paid_record(
160+
self, req: typing.Optional[dict] = None, **kwargs
161+
) -> dict:
162+
"""DescribeAppRepoPostPaidRecord - 查询应用仓库实例后付费记录
163+
164+
**Request**
165+
166+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
167+
- **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
168+
- **EndTime** (int) - (Required) 结束时间 (StartTime <EndTime )
169+
- **InstanceId** (str) - (Required) 应用仓库实例
170+
- **StartTime** (int) - (Required) 开始时间 (StartTime <EndTime )
171+
- **Limit** (int) - 最大查询数量(默认30, 最大值200 )
172+
- **Offset** (int) - 偏移量(默认0,最小值 0)
173+
174+
**Response**
175+
176+
- **DataSet** (list) - 见 **TPostpaidBase** 模型定义
177+
- **TotalCount** (int) - 记录总数
178+
179+
**Response Model**
180+
181+
**TPostpaidBase**
182+
- **EndTime** (int) - 结束时间
183+
- **InstanceId** (str) - 应用仓库资源ID
184+
- **StartTime** (int) - 开始时间
185+
- **TrafficSum** (int) - 流量(单位: MB)
186+
187+
188+
"""
189+
# build request
190+
d = {
191+
"ProjectId": self.config.project_id,
192+
"Region": self.config.region,
193+
}
194+
req and d.update(req)
195+
d = apis.DescribeAppRepoPostPaidRecordRequestSchema().dumps(d)
196+
197+
resp = self.invoke("DescribeAppRepoPostPaidRecord", d, **kwargs)
198+
return apis.DescribeAppRepoPostPaidRecordResponseSchema().loads(resp)
199+
200+
def get_app_repo_price(
201+
self, req: typing.Optional[dict] = None, **kwargs
202+
) -> dict:
203+
"""GetAppRepoPrice - 获取应用仓库实例价格
204+
205+
**Request**
206+
207+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
208+
- **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
209+
- **ChargeType** (str) - (Required) 计费类型
210+
- **DomainQuantity** (int) - 域名绑定数量( >= 0) ,默认: 0
211+
- **Quantity** (int) - 数量(和ChargeType相关): ChargeType = Month, 默认值为0 , 其他情况为必传字段
212+
213+
**Response**
214+
215+
- **Price** (float) - 价格
216+
217+
"""
218+
# build request
219+
d = {
220+
"ProjectId": self.config.project_id,
221+
"Region": self.config.region,
222+
}
223+
req and d.update(req)
224+
d = apis.GetAppRepoPriceRequestSchema().dumps(d)
225+
226+
resp = self.invoke("GetAppRepoPrice", d, **kwargs)
227+
return apis.GetAppRepoPriceResponseSchema().loads(resp)
228+
229+
def get_app_repo_upgrade_price(
230+
self, req: typing.Optional[dict] = None, **kwargs
231+
) -> dict:
232+
"""GetAppRepoUpgradePrice - 获取改配后的退/补金额
233+
234+
**Request**
235+
236+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
237+
- **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
238+
- **InstanceId** (str) - (Required) 实例资源id
239+
- **DomainQuantity** (int) - 绑定域名的数量
240+
241+
**Response**
242+
243+
- **Price** (float) - 应补差价(单位:元)
244+
245+
"""
246+
# build request
247+
d = {
248+
"ProjectId": self.config.project_id,
249+
"Region": self.config.region,
250+
}
251+
req and d.update(req)
252+
d = apis.GetAppRepoUpgradePriceRequestSchema().dumps(d)
253+
254+
resp = self.invoke("GetAppRepoUpgradePrice", d, **kwargs)
255+
return apis.GetAppRepoUpgradePriceResponseSchema().loads(resp)
256+
257+
def update_app_repo(
258+
self, req: typing.Optional[dict] = None, **kwargs
259+
) -> dict:
260+
"""UpdateAppRepo - 修改应用仓库实例基本信息
261+
262+
**Request**
263+
264+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
265+
- **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
266+
- **InstanceId** (str) - (Required) 应用仓库实例ID
267+
- **Description** (str) - 应用仓库备注信息
268+
- **Name** (str) - 应用仓库名称
269+
270+
**Response**
271+
272+
273+
"""
274+
# build request
275+
d = {
276+
"ProjectId": self.config.project_id,
277+
"Region": self.config.region,
278+
}
279+
req and d.update(req)
280+
d = apis.UpdateAppRepoRequestSchema().dumps(d)
281+
282+
resp = self.invoke("UpdateAppRepo", d, **kwargs)
283+
return apis.UpdateAppRepoResponseSchema().loads(resp)
284+
285+
def update_app_repo_domain_name(
286+
self, req: typing.Optional[dict] = None, **kwargs
287+
) -> dict:
288+
"""UpdateAppRepoDomainName - 更新应用仓库实例绑定的加速域名
289+
290+
**Request**
291+
292+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
293+
- **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
294+
- **InstanceId** (str) - (Required) 应用仓库实例ID
295+
- **CouponId** (str) - 代金券
296+
- **RecordName** (list) - 加速域名列表。 不填写,相当于清空所有加速域名
297+
298+
**Response**
299+
300+
301+
"""
302+
# build request
303+
d = {
304+
"ProjectId": self.config.project_id,
305+
"Region": self.config.region,
306+
}
307+
req and d.update(req)
308+
d = apis.UpdateAppRepoDomainNameRequestSchema().dumps(d)
309+
310+
resp = self.invoke("UpdateAppRepoDomainName", d, **kwargs)
311+
return apis.UpdateAppRepoDomainNameResponseSchema().loads(resp)

ucloud/services/uaaa/schemas/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)