Skip to content

Commit 9da92f4

Browse files
committed
feat: update vpc api
1 parent 8b095ce commit 9da92f4

11 files changed

+830
-4
lines changed

volcenginesdkvpc/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
from volcenginesdkvpc.models.add_bandwidth_package_ip_response import AddBandwidthPackageIpResponse
2424
from volcenginesdkvpc.models.allocate_eip_address_request import AllocateEipAddressRequest
2525
from volcenginesdkvpc.models.allocate_eip_address_response import AllocateEipAddressResponse
26+
from volcenginesdkvpc.models.assign_ipv6_addresses_request import AssignIpv6AddressesRequest
27+
from volcenginesdkvpc.models.assign_ipv6_addresses_response import AssignIpv6AddressesResponse
2628
from volcenginesdkvpc.models.assign_private_ip_addresses_request import AssignPrivateIpAddressesRequest
2729
from volcenginesdkvpc.models.assign_private_ip_addresses_response import AssignPrivateIpAddressesResponse
2830
from volcenginesdkvpc.models.associate_cen_for_describe_vpc_attributes_output import AssociateCenForDescribeVpcAttributesOutput
@@ -213,6 +215,8 @@
213215
from volcenginesdkvpc.models.tag_for_tag_resources_input import TagForTagResourcesInput
214216
from volcenginesdkvpc.models.tag_resources_request import TagResourcesRequest
215217
from volcenginesdkvpc.models.tag_resources_response import TagResourcesResponse
218+
from volcenginesdkvpc.models.unassign_ipv6_addresses_request import UnassignIpv6AddressesRequest
219+
from volcenginesdkvpc.models.unassign_ipv6_addresses_response import UnassignIpv6AddressesResponse
216220
from volcenginesdkvpc.models.unassign_private_ip_addresses_request import UnassignPrivateIpAddressesRequest
217221
from volcenginesdkvpc.models.unassign_private_ip_addresses_response import UnassignPrivateIpAddressesResponse
218222
from volcenginesdkvpc.models.untag_resources_request import UntagResourcesRequest

volcenginesdkvpc/api/vpc_api.py

Lines changed: 194 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,103 @@ def allocate_eip_address_with_http_info(self, body, **kwargs): # noqa: E501
227227
_request_timeout=params.get('_request_timeout'),
228228
collection_formats=collection_formats)
229229

230+
def assign_ipv6_addresses(self, body, **kwargs): # noqa: E501
231+
"""assign_ipv6_addresses # noqa: E501
232+
233+
This method makes a synchronous HTTP request by default. To make an
234+
asynchronous HTTP request, please pass async_req=True
235+
>>> thread = api.assign_ipv6_addresses(body, async_req=True)
236+
>>> result = thread.get()
237+
238+
:param async_req bool
239+
:param AssignIpv6AddressesRequest body: (required)
240+
:return: AssignIpv6AddressesResponse
241+
If the method is called asynchronously,
242+
returns the request thread.
243+
"""
244+
kwargs['_return_http_data_only'] = True
245+
if kwargs.get('async_req'):
246+
return self.assign_ipv6_addresses_with_http_info(body, **kwargs) # noqa: E501
247+
else:
248+
(data) = self.assign_ipv6_addresses_with_http_info(body, **kwargs) # noqa: E501
249+
return data
250+
251+
def assign_ipv6_addresses_with_http_info(self, body, **kwargs): # noqa: E501
252+
"""assign_ipv6_addresses # noqa: E501
253+
254+
This method makes a synchronous HTTP request by default. To make an
255+
asynchronous HTTP request, please pass async_req=True
256+
>>> thread = api.assign_ipv6_addresses_with_http_info(body, async_req=True)
257+
>>> result = thread.get()
258+
259+
:param async_req bool
260+
:param AssignIpv6AddressesRequest body: (required)
261+
:return: AssignIpv6AddressesResponse
262+
If the method is called asynchronously,
263+
returns the request thread.
264+
"""
265+
266+
all_params = ['body'] # noqa: E501
267+
all_params.append('async_req')
268+
all_params.append('_return_http_data_only')
269+
all_params.append('_preload_content')
270+
all_params.append('_request_timeout')
271+
272+
params = locals()
273+
for key, val in six.iteritems(params['kwargs']):
274+
if key not in all_params:
275+
raise TypeError(
276+
"Got an unexpected keyword argument '%s'"
277+
" to method assign_ipv6_addresses" % key
278+
)
279+
params[key] = val
280+
del params['kwargs']
281+
# verify the required parameter 'body' is set
282+
if self.api_client.client_side_validation and ('body' not in params or
283+
params['body'] is None): # noqa: E501
284+
raise ValueError("Missing the required parameter `body` when calling `assign_ipv6_addresses`") # noqa: E501
285+
286+
collection_formats = {}
287+
288+
path_params = {}
289+
290+
query_params = []
291+
292+
header_params = {}
293+
294+
form_params = []
295+
local_var_files = {}
296+
297+
body_params = None
298+
if 'body' in params:
299+
body_params = params['body']
300+
# HTTP header `Accept`
301+
header_params['Accept'] = self.api_client.select_header_accept(
302+
['application/json']) # noqa: E501
303+
304+
# HTTP header `Content-Type`
305+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
306+
['text/plain']) # noqa: E501
307+
308+
# Authentication setting
309+
auth_settings = ['volcengineSign'] # noqa: E501
310+
311+
return self.api_client.call_api(
312+
'/AssignIpv6Addresses/2020-04-01/vpc/get/text_plain/', 'GET',
313+
path_params,
314+
query_params,
315+
header_params,
316+
body=body_params,
317+
post_params=form_params,
318+
files=local_var_files,
319+
response_type='AssignIpv6AddressesResponse', # noqa: E501
320+
auth_settings=auth_settings,
321+
async_req=params.get('async_req'),
322+
_return_http_data_only=params.get('_return_http_data_only'),
323+
_preload_content=params.get('_preload_content', True),
324+
_request_timeout=params.get('_request_timeout'),
325+
collection_formats=collection_formats)
326+
230327
def assign_private_ip_addresses(self, body, **kwargs): # noqa: E501
231328
"""assign_private_ip_addresses # noqa: E501
232329
@@ -6823,6 +6920,103 @@ def tag_resources_with_http_info(self, body, **kwargs): # noqa: E501
68236920
_request_timeout=params.get('_request_timeout'),
68246921
collection_formats=collection_formats)
68256922

6923+
def unassign_ipv6_addresses(self, body, **kwargs): # noqa: E501
6924+
"""unassign_ipv6_addresses # noqa: E501
6925+
6926+
This method makes a synchronous HTTP request by default. To make an
6927+
asynchronous HTTP request, please pass async_req=True
6928+
>>> thread = api.unassign_ipv6_addresses(body, async_req=True)
6929+
>>> result = thread.get()
6930+
6931+
:param async_req bool
6932+
:param UnassignIpv6AddressesRequest body: (required)
6933+
:return: UnassignIpv6AddressesResponse
6934+
If the method is called asynchronously,
6935+
returns the request thread.
6936+
"""
6937+
kwargs['_return_http_data_only'] = True
6938+
if kwargs.get('async_req'):
6939+
return self.unassign_ipv6_addresses_with_http_info(body, **kwargs) # noqa: E501
6940+
else:
6941+
(data) = self.unassign_ipv6_addresses_with_http_info(body, **kwargs) # noqa: E501
6942+
return data
6943+
6944+
def unassign_ipv6_addresses_with_http_info(self, body, **kwargs): # noqa: E501
6945+
"""unassign_ipv6_addresses # noqa: E501
6946+
6947+
This method makes a synchronous HTTP request by default. To make an
6948+
asynchronous HTTP request, please pass async_req=True
6949+
>>> thread = api.unassign_ipv6_addresses_with_http_info(body, async_req=True)
6950+
>>> result = thread.get()
6951+
6952+
:param async_req bool
6953+
:param UnassignIpv6AddressesRequest body: (required)
6954+
:return: UnassignIpv6AddressesResponse
6955+
If the method is called asynchronously,
6956+
returns the request thread.
6957+
"""
6958+
6959+
all_params = ['body'] # noqa: E501
6960+
all_params.append('async_req')
6961+
all_params.append('_return_http_data_only')
6962+
all_params.append('_preload_content')
6963+
all_params.append('_request_timeout')
6964+
6965+
params = locals()
6966+
for key, val in six.iteritems(params['kwargs']):
6967+
if key not in all_params:
6968+
raise TypeError(
6969+
"Got an unexpected keyword argument '%s'"
6970+
" to method unassign_ipv6_addresses" % key
6971+
)
6972+
params[key] = val
6973+
del params['kwargs']
6974+
# verify the required parameter 'body' is set
6975+
if self.api_client.client_side_validation and ('body' not in params or
6976+
params['body'] is None): # noqa: E501
6977+
raise ValueError("Missing the required parameter `body` when calling `unassign_ipv6_addresses`") # noqa: E501
6978+
6979+
collection_formats = {}
6980+
6981+
path_params = {}
6982+
6983+
query_params = []
6984+
6985+
header_params = {}
6986+
6987+
form_params = []
6988+
local_var_files = {}
6989+
6990+
body_params = None
6991+
if 'body' in params:
6992+
body_params = params['body']
6993+
# HTTP header `Accept`
6994+
header_params['Accept'] = self.api_client.select_header_accept(
6995+
['application/json']) # noqa: E501
6996+
6997+
# HTTP header `Content-Type`
6998+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
6999+
['text/plain']) # noqa: E501
7000+
7001+
# Authentication setting
7002+
auth_settings = ['volcengineSign'] # noqa: E501
7003+
7004+
return self.api_client.call_api(
7005+
'/UnassignIpv6Addresses/2020-04-01/vpc/get/text_plain/', 'GET',
7006+
path_params,
7007+
query_params,
7008+
header_params,
7009+
body=body_params,
7010+
post_params=form_params,
7011+
files=local_var_files,
7012+
response_type='UnassignIpv6AddressesResponse', # noqa: E501
7013+
auth_settings=auth_settings,
7014+
async_req=params.get('async_req'),
7015+
_return_http_data_only=params.get('_return_http_data_only'),
7016+
_preload_content=params.get('_preload_content', True),
7017+
_request_timeout=params.get('_request_timeout'),
7018+
collection_formats=collection_formats)
7019+
68267020
def unassign_private_ip_addresses(self, body, **kwargs): # noqa: E501
68277021
"""unassign_private_ip_addresses # noqa: E501
68287022

volcenginesdkvpc/models/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
from volcenginesdkvpc.models.add_bandwidth_package_ip_response import AddBandwidthPackageIpResponse
2020
from volcenginesdkvpc.models.allocate_eip_address_request import AllocateEipAddressRequest
2121
from volcenginesdkvpc.models.allocate_eip_address_response import AllocateEipAddressResponse
22+
from volcenginesdkvpc.models.assign_ipv6_addresses_request import AssignIpv6AddressesRequest
23+
from volcenginesdkvpc.models.assign_ipv6_addresses_response import AssignIpv6AddressesResponse
2224
from volcenginesdkvpc.models.assign_private_ip_addresses_request import AssignPrivateIpAddressesRequest
2325
from volcenginesdkvpc.models.assign_private_ip_addresses_response import AssignPrivateIpAddressesResponse
2426
from volcenginesdkvpc.models.associate_cen_for_describe_vpc_attributes_output import AssociateCenForDescribeVpcAttributesOutput
@@ -209,6 +211,8 @@
209211
from volcenginesdkvpc.models.tag_for_tag_resources_input import TagForTagResourcesInput
210212
from volcenginesdkvpc.models.tag_resources_request import TagResourcesRequest
211213
from volcenginesdkvpc.models.tag_resources_response import TagResourcesResponse
214+
from volcenginesdkvpc.models.unassign_ipv6_addresses_request import UnassignIpv6AddressesRequest
215+
from volcenginesdkvpc.models.unassign_ipv6_addresses_response import UnassignIpv6AddressesResponse
212216
from volcenginesdkvpc.models.unassign_private_ip_addresses_request import UnassignPrivateIpAddressesRequest
213217
from volcenginesdkvpc.models.unassign_private_ip_addresses_response import UnassignPrivateIpAddressesResponse
214218
from volcenginesdkvpc.models.untag_resources_request import UntagResourcesRequest

volcenginesdkvpc/models/allocate_eip_address_request.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ def isp(self, isp):
258258
:param isp: The isp of this AllocateEipAddressRequest. # noqa: E501
259259
:type: str
260260
"""
261-
allowed_values = ["BGP", "ChinaMobile", "ChinaUnicom", "ChinaTelecom"] # noqa: E501
261+
allowed_values = ["BGP", "ChinaMobile", "ChinaUnicom", "ChinaTelecom", "ChinaMobile_Value", "ChinaUnicom_Value", "ChinaTelecom_Value"] # noqa: E501
262262
if (self._configuration.client_side_validation and
263263
isp not in allowed_values):
264264
raise ValueError(

0 commit comments

Comments
 (0)