Skip to content

Commit e07f171

Browse files
authored
sdk: rolling update for 0.11.82 (#295)
1 parent 41da70c commit e07f171

File tree

3 files changed

+243
-1
lines changed

3 files changed

+243
-1
lines changed

ucloud/services/ipv6gw/client.py

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,133 @@ def __init__(
1515
config, transport, middleware, logger
1616
)
1717

18+
def allocate_ipv_6internet_bandwidth(
19+
self, req: typing.Optional[dict] = None, **kwargs
20+
) -> dict:
21+
"""AllocateIpv6InternetBandwidth - 分配ipv6公网带宽
22+
23+
**Request**
24+
25+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
26+
- **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
27+
- **Bandwidth** (int) - (Required) 出向带宽峰值。带宽值范围[1, 2000]
28+
- **Ipv6AddressId** (str) - (Required) Ipv6地址ID
29+
- **ChargeType** (str) - 付费方式;默认值:"Month";枚举值:"Dynamic" -> 按时付费,"Month" -> 月付,"Year" ->年付,"Day" -> 天付
30+
- **Ipv6GatewayId** (str) - ipv6网关ID;与VPCId二选一必填
31+
- **Name** (str) - 资源名称;默认值:"Ipv6InternetBandwidth"
32+
- **PayMode** (str) - 付费模式;默认值:"Bandwidth";枚举值:"Bandwidth" -> 带宽计费
33+
- **Quantity** (int) - 购买数量;默认值:1。 月付时,此参数传0,代表了购买至月末。
34+
- **Remark** (str) - 备注
35+
- **Tag** (str) - 业务组名称;默认值:"Default"
36+
- **VPCId** (str) - vpcId;与Ipv6GatewayId二选一必填
37+
38+
**Response**
39+
40+
- **InternetBandwidthId** (str) - 开通公网带宽后,对应的公网带宽实例 ID。
41+
- **Ipv6Address** (str) - ipv6地址
42+
- **Ipv6AddressId** (str) - ipv6地址ID
43+
44+
"""
45+
# build request
46+
d = {
47+
"ProjectId": self.config.project_id,
48+
"Region": self.config.region,
49+
}
50+
req and d.update(req)
51+
d = apis.AllocateIpv6InternetBandwidthRequestSchema().dumps(d)
52+
53+
# build options
54+
kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
55+
56+
resp = self.invoke("AllocateIpv6InternetBandwidth", d, **kwargs)
57+
return apis.AllocateIpv6InternetBandwidthResponseSchema().loads(resp)
58+
59+
def create_ipv_6gateway(
60+
self, req: typing.Optional[dict] = None, **kwargs
61+
) -> dict:
62+
"""CreateIpv6Gateway - 创建ipv6网关
63+
64+
**Request**
65+
66+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
67+
- **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
68+
- **VPCId** (str) - (Required) ipv6网关所属的VPCID
69+
- **Name** (str) - IPv6 网关的名称 默认值 Ipv6Gateway
70+
- **Remark** (str) - IPv6 网关的备注信息。
71+
- **Tag** (str) - 业务组名称;默认值:"Default"
72+
73+
**Response**
74+
75+
- **Ipv6GatewayId** (str) - ipv6网关ID
76+
77+
"""
78+
# build request
79+
d = {
80+
"ProjectId": self.config.project_id,
81+
"Region": self.config.region,
82+
}
83+
req and d.update(req)
84+
d = apis.CreateIpv6GatewayRequestSchema().dumps(d)
85+
86+
# build options
87+
kwargs["max_retries"] = 0 # ignore retry when api is not idempotent
88+
89+
resp = self.invoke("CreateIpv6Gateway", d, **kwargs)
90+
return apis.CreateIpv6GatewayResponseSchema().loads(resp)
91+
92+
def delete_ipv_6gateway(
93+
self, req: typing.Optional[dict] = None, **kwargs
94+
) -> dict:
95+
"""DeleteIpv6Gateway - 删除ipv6网关
96+
97+
**Request**
98+
99+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
100+
- **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
101+
- **Ipv6GatewayId** (str) - (Required) ipv6网关ID
102+
103+
**Response**
104+
105+
106+
"""
107+
# build request
108+
d = {
109+
"ProjectId": self.config.project_id,
110+
"Region": self.config.region,
111+
}
112+
req and d.update(req)
113+
d = apis.DeleteIpv6GatewayRequestSchema().dumps(d)
114+
115+
resp = self.invoke("DeleteIpv6Gateway", d, **kwargs)
116+
return apis.DeleteIpv6GatewayResponseSchema().loads(resp)
117+
118+
def delete_ipv_6internet_bandwidth(
119+
self, req: typing.Optional[dict] = None, **kwargs
120+
) -> dict:
121+
"""DeleteIpv6InternetBandwidth - 删除ipv6公网带宽
122+
123+
**Request**
124+
125+
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
126+
- **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
127+
- **InternetBandwidthId** (str) - ipv6公网带宽ID;与Ipv6AddressId二选一必填
128+
- **Ipv6AddressId** (str) - ipv6 ID;与InternetBandwidthId二选一必填
129+
130+
**Response**
131+
132+
133+
"""
134+
# build request
135+
d = {
136+
"ProjectId": self.config.project_id,
137+
"Region": self.config.region,
138+
}
139+
req and d.update(req)
140+
d = apis.DeleteIpv6InternetBandwidthRequestSchema().dumps(d)
141+
142+
resp = self.invoke("DeleteIpv6InternetBandwidth", d, **kwargs)
143+
return apis.DeleteIpv6InternetBandwidthResponseSchema().loads(resp)
144+
18145
def modify_ipv_6internet_bandwidth(
19146
self, req: typing.Optional[dict] = None, **kwargs
20147
) -> dict:

ucloud/services/ipv6gw/schemas/apis.py

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,121 @@
77
"""
88

99

10+
"""
11+
API: AllocateIpv6InternetBandwidth
12+
13+
分配ipv6公网带宽
14+
"""
15+
16+
17+
class AllocateIpv6InternetBandwidthRequestSchema(schema.RequestSchema):
18+
"""AllocateIpv6InternetBandwidth - 分配ipv6公网带宽"""
19+
20+
fields = {
21+
"Bandwidth": fields.Int(required=True, dump_to="Bandwidth"),
22+
"ChargeType": fields.Str(required=False, dump_to="ChargeType"),
23+
"Ipv6AddressId": fields.Str(required=True, dump_to="Ipv6AddressId"),
24+
"Ipv6GatewayId": fields.Str(required=False, dump_to="Ipv6GatewayId"),
25+
"Name": fields.Str(required=False, dump_to="Name"),
26+
"PayMode": fields.Str(required=False, dump_to="PayMode"),
27+
"ProjectId": fields.Str(required=True, dump_to="ProjectId"),
28+
"Quantity": fields.Int(required=False, dump_to="Quantity"),
29+
"Region": fields.Str(required=True, dump_to="Region"),
30+
"Remark": fields.Str(required=False, dump_to="Remark"),
31+
"Tag": fields.Str(required=False, dump_to="Tag"),
32+
"VPCId": fields.Str(required=False, dump_to="VPCId"),
33+
}
34+
35+
36+
class AllocateIpv6InternetBandwidthResponseSchema(schema.ResponseSchema):
37+
"""AllocateIpv6InternetBandwidth - 分配ipv6公网带宽"""
38+
39+
fields = {
40+
"InternetBandwidthId": fields.Str(
41+
required=True, load_from="InternetBandwidthId"
42+
),
43+
"Ipv6Address": fields.Str(required=False, load_from="Ipv6Address"),
44+
"Ipv6AddressId": fields.Str(required=False, load_from="Ipv6AddressId"),
45+
}
46+
47+
48+
"""
49+
API: CreateIpv6Gateway
50+
51+
创建ipv6网关
52+
"""
53+
54+
55+
class CreateIpv6GatewayRequestSchema(schema.RequestSchema):
56+
"""CreateIpv6Gateway - 创建ipv6网关"""
57+
58+
fields = {
59+
"Name": fields.Str(required=False, dump_to="Name"),
60+
"ProjectId": fields.Str(required=True, dump_to="ProjectId"),
61+
"Region": fields.Str(required=True, dump_to="Region"),
62+
"Remark": fields.Str(required=False, dump_to="Remark"),
63+
"Tag": fields.Str(required=False, dump_to="Tag"),
64+
"VPCId": fields.Str(required=True, dump_to="VPCId"),
65+
}
66+
67+
68+
class CreateIpv6GatewayResponseSchema(schema.ResponseSchema):
69+
"""CreateIpv6Gateway - 创建ipv6网关"""
70+
71+
fields = {
72+
"Ipv6GatewayId": fields.Str(required=True, load_from="Ipv6GatewayId"),
73+
}
74+
75+
76+
"""
77+
API: DeleteIpv6Gateway
78+
79+
删除ipv6网关
80+
"""
81+
82+
83+
class DeleteIpv6GatewayRequestSchema(schema.RequestSchema):
84+
"""DeleteIpv6Gateway - 删除ipv6网关"""
85+
86+
fields = {
87+
"Ipv6GatewayId": fields.Str(required=True, dump_to="Ipv6GatewayId"),
88+
"ProjectId": fields.Str(required=True, dump_to="ProjectId"),
89+
"Region": fields.Str(required=True, dump_to="Region"),
90+
}
91+
92+
93+
class DeleteIpv6GatewayResponseSchema(schema.ResponseSchema):
94+
"""DeleteIpv6Gateway - 删除ipv6网关"""
95+
96+
fields = {}
97+
98+
99+
"""
100+
API: DeleteIpv6InternetBandwidth
101+
102+
删除ipv6公网带宽
103+
"""
104+
105+
106+
class DeleteIpv6InternetBandwidthRequestSchema(schema.RequestSchema):
107+
"""DeleteIpv6InternetBandwidth - 删除ipv6公网带宽"""
108+
109+
fields = {
110+
"InternetBandwidthId": fields.Str(
111+
required=False, dump_to="InternetBandwidthId"
112+
),
113+
"Ipv6AddressId": fields.Str(required=False, dump_to="Ipv6AddressId"),
114+
"ProjectId": fields.Str(required=True, dump_to="ProjectId"),
115+
"Region": fields.Str(required=True, dump_to="Region"),
116+
}
117+
118+
119+
class DeleteIpv6InternetBandwidthResponseSchema(schema.ResponseSchema):
120+
"""DeleteIpv6InternetBandwidth - 删除ipv6公网带宽"""
121+
122+
fields = {}
123+
124+
10125
"""
11126
API: ModifyIpv6InternetBandwidth
12127

ucloud/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version = "0.11.81"
1+
version = "0.11.82"

0 commit comments

Comments
 (0)