Skip to content

Commit d91f6cb

Browse files
committed
feat: update vke api
1 parent 42e199e commit d91f6cb

32 files changed

+4004
-26
lines changed

volcenginesdkvke/__init__.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
from volcenginesdkvke.models.condition_for_list_clusters_output import ConditionForListClustersOutput
3434
from volcenginesdkvke.models.condition_for_list_node_pools_output import ConditionForListNodePoolsOutput
3535
from volcenginesdkvke.models.condition_for_list_nodes_output import ConditionForListNodesOutput
36+
from volcenginesdkvke.models.convert_tag_for_list_node_pools_output import ConvertTagForListNodePoolsOutput
3637
from volcenginesdkvke.models.create_addon_request import CreateAddonRequest
3738
from volcenginesdkvke.models.create_addon_response import CreateAddonResponse
3839
from volcenginesdkvke.models.create_cluster_request import CreateClusterRequest
@@ -45,6 +46,7 @@
4546
from volcenginesdkvke.models.create_nodes_response import CreateNodesResponse
4647
from volcenginesdkvke.models.data_volume_for_create_node_pool_input import DataVolumeForCreateNodePoolInput
4748
from volcenginesdkvke.models.data_volume_for_list_node_pools_output import DataVolumeForListNodePoolsOutput
49+
from volcenginesdkvke.models.data_volume_for_update_node_pool_config_input import DataVolumeForUpdateNodePoolConfigInput
4850
from volcenginesdkvke.models.delete_addon_request import DeleteAddonRequest
4951
from volcenginesdkvke.models.delete_addon_response import DeleteAddonResponse
5052
from volcenginesdkvke.models.delete_cluster_request import DeleteClusterRequest
@@ -93,6 +95,8 @@
9395
from volcenginesdkvke.models.list_supported_addons_response import ListSupportedAddonsResponse
9496
from volcenginesdkvke.models.list_supported_resource_types_request import ListSupportedResourceTypesRequest
9597
from volcenginesdkvke.models.list_supported_resource_types_response import ListSupportedResourceTypesResponse
98+
from volcenginesdkvke.models.list_tags_for_resource_request import ListTagsForResourceRequest
99+
from volcenginesdkvke.models.list_tags_for_resource_response import ListTagsForResourceResponse
96100
from volcenginesdkvke.models.login_for_create_default_node_pool_input import LoginForCreateDefaultNodePoolInput
97101
from volcenginesdkvke.models.login_for_create_node_pool_input import LoginForCreateNodePoolInput
98102
from volcenginesdkvke.models.login_for_list_node_pools_output import LoginForListNodePoolsOutput
@@ -110,6 +114,7 @@
110114
from volcenginesdkvke.models.public_access_network_config_for_list_clusters_output import PublicAccessNetworkConfigForListClustersOutput
111115
from volcenginesdkvke.models.public_access_network_config_for_update_cluster_config_input import PublicAccessNetworkConfigForUpdateClusterConfigInput
112116
from volcenginesdkvke.models.public_ip_for_list_clusters_output import PublicIpForListClustersOutput
117+
from volcenginesdkvke.models.resource_tag_for_list_tags_for_resource_output import ResourceTagForListTagsForResourceOutput
113118
from volcenginesdkvke.models.security_for_create_default_node_pool_input import SecurityForCreateDefaultNodePoolInput
114119
from volcenginesdkvke.models.security_for_create_node_pool_input import SecurityForCreateNodePoolInput
115120
from volcenginesdkvke.models.security_for_list_node_pools_output import SecurityForListNodePoolsOutput
@@ -126,12 +131,26 @@
126131
from volcenginesdkvke.models.status_for_list_nodes_output import StatusForListNodesOutput
127132
from volcenginesdkvke.models.system_volume_for_create_node_pool_input import SystemVolumeForCreateNodePoolInput
128133
from volcenginesdkvke.models.system_volume_for_list_node_pools_output import SystemVolumeForListNodePoolsOutput
134+
from volcenginesdkvke.models.system_volume_for_update_node_pool_config_input import SystemVolumeForUpdateNodePoolConfigInput
135+
from volcenginesdkvke.models.tag_filter_for_list_tags_for_resource_input import TagFilterForListTagsForResourceInput
136+
from volcenginesdkvke.models.tag_for_create_cluster_input import TagForCreateClusterInput
137+
from volcenginesdkvke.models.tag_for_create_default_node_pool_input import TagForCreateDefaultNodePoolInput
138+
from volcenginesdkvke.models.tag_for_create_node_pool_input import TagForCreateNodePoolInput
139+
from volcenginesdkvke.models.tag_for_list_clusters_input import TagForListClustersInput
140+
from volcenginesdkvke.models.tag_for_list_clusters_output import TagForListClustersOutput
141+
from volcenginesdkvke.models.tag_for_list_node_pools_output import TagForListNodePoolsOutput
142+
from volcenginesdkvke.models.tag_for_tag_resources_input import TagForTagResourcesInput
143+
from volcenginesdkvke.models.tag_for_update_node_pool_config_input import TagForUpdateNodePoolConfigInput
144+
from volcenginesdkvke.models.tag_resources_request import TagResourcesRequest
145+
from volcenginesdkvke.models.tag_resources_response import TagResourcesResponse
129146
from volcenginesdkvke.models.taint_for_create_default_node_pool_input import TaintForCreateDefaultNodePoolInput
130147
from volcenginesdkvke.models.taint_for_create_node_pool_input import TaintForCreateNodePoolInput
131148
from volcenginesdkvke.models.taint_for_create_nodes_input import TaintForCreateNodesInput
132149
from volcenginesdkvke.models.taint_for_list_node_pools_output import TaintForListNodePoolsOutput
133150
from volcenginesdkvke.models.taint_for_list_nodes_output import TaintForListNodesOutput
134151
from volcenginesdkvke.models.taint_for_update_node_pool_config_input import TaintForUpdateNodePoolConfigInput
152+
from volcenginesdkvke.models.untag_resources_request import UntagResourcesRequest
153+
from volcenginesdkvke.models.untag_resources_response import UntagResourcesResponse
135154
from volcenginesdkvke.models.update_addon_config_request import UpdateAddonConfigRequest
136155
from volcenginesdkvke.models.update_addon_config_response import UpdateAddonConfigResponse
137156
from volcenginesdkvke.models.update_addon_version_request import UpdateAddonVersionRequest

volcenginesdkvke/api/vke_api.py

Lines changed: 291 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1585,6 +1585,297 @@ def list_supported_resource_types_with_http_info(self, body, **kwargs): # noqa:
15851585
_request_timeout=params.get('_request_timeout'),
15861586
collection_formats=collection_formats)
15871587

1588+
def list_tags_for_resource(self, body, **kwargs): # noqa: E501
1589+
"""list_tags_for_resource # noqa: E501
1590+
1591+
This method makes a synchronous HTTP request by default. To make an
1592+
asynchronous HTTP request, please pass async_req=True
1593+
>>> thread = api.list_tags_for_resource(body, async_req=True)
1594+
>>> result = thread.get()
1595+
1596+
:param async_req bool
1597+
:param ListTagsForResourceRequest body: (required)
1598+
:return: ListTagsForResourceResponse
1599+
If the method is called asynchronously,
1600+
returns the request thread.
1601+
"""
1602+
kwargs['_return_http_data_only'] = True
1603+
if kwargs.get('async_req'):
1604+
return self.list_tags_for_resource_with_http_info(body, **kwargs) # noqa: E501
1605+
else:
1606+
(data) = self.list_tags_for_resource_with_http_info(body, **kwargs) # noqa: E501
1607+
return data
1608+
1609+
def list_tags_for_resource_with_http_info(self, body, **kwargs): # noqa: E501
1610+
"""list_tags_for_resource # noqa: E501
1611+
1612+
This method makes a synchronous HTTP request by default. To make an
1613+
asynchronous HTTP request, please pass async_req=True
1614+
>>> thread = api.list_tags_for_resource_with_http_info(body, async_req=True)
1615+
>>> result = thread.get()
1616+
1617+
:param async_req bool
1618+
:param ListTagsForResourceRequest body: (required)
1619+
:return: ListTagsForResourceResponse
1620+
If the method is called asynchronously,
1621+
returns the request thread.
1622+
"""
1623+
1624+
all_params = ['body'] # noqa: E501
1625+
all_params.append('async_req')
1626+
all_params.append('_return_http_data_only')
1627+
all_params.append('_preload_content')
1628+
all_params.append('_request_timeout')
1629+
1630+
params = locals()
1631+
for key, val in six.iteritems(params['kwargs']):
1632+
if key not in all_params:
1633+
raise TypeError(
1634+
"Got an unexpected keyword argument '%s'"
1635+
" to method list_tags_for_resource" % key
1636+
)
1637+
params[key] = val
1638+
del params['kwargs']
1639+
# verify the required parameter 'body' is set
1640+
if self.api_client.client_side_validation and ('body' not in params or
1641+
params['body'] is None): # noqa: E501
1642+
raise ValueError("Missing the required parameter `body` when calling `list_tags_for_resource`") # noqa: E501
1643+
1644+
collection_formats = {}
1645+
1646+
path_params = {}
1647+
1648+
query_params = []
1649+
1650+
header_params = {}
1651+
1652+
form_params = []
1653+
local_var_files = {}
1654+
1655+
body_params = None
1656+
if 'body' in params:
1657+
body_params = params['body']
1658+
# HTTP header `Accept`
1659+
header_params['Accept'] = self.api_client.select_header_accept(
1660+
['application/json']) # noqa: E501
1661+
1662+
# HTTP header `Content-Type`
1663+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
1664+
['application/json']) # noqa: E501
1665+
1666+
# Authentication setting
1667+
auth_settings = ['volcengineSign'] # noqa: E501
1668+
1669+
return self.api_client.call_api(
1670+
'/ListTagsForResource/2022-05-12/vke/post/', 'POST',
1671+
path_params,
1672+
query_params,
1673+
header_params,
1674+
body=body_params,
1675+
post_params=form_params,
1676+
files=local_var_files,
1677+
response_type='ListTagsForResourceResponse', # noqa: E501
1678+
auth_settings=auth_settings,
1679+
async_req=params.get('async_req'),
1680+
_return_http_data_only=params.get('_return_http_data_only'),
1681+
_preload_content=params.get('_preload_content', True),
1682+
_request_timeout=params.get('_request_timeout'),
1683+
collection_formats=collection_formats)
1684+
1685+
def tag_resources(self, body, **kwargs): # noqa: E501
1686+
"""tag_resources # noqa: E501
1687+
1688+
This method makes a synchronous HTTP request by default. To make an
1689+
asynchronous HTTP request, please pass async_req=True
1690+
>>> thread = api.tag_resources(body, async_req=True)
1691+
>>> result = thread.get()
1692+
1693+
:param async_req bool
1694+
:param TagResourcesRequest body: (required)
1695+
:return: TagResourcesResponse
1696+
If the method is called asynchronously,
1697+
returns the request thread.
1698+
"""
1699+
kwargs['_return_http_data_only'] = True
1700+
if kwargs.get('async_req'):
1701+
return self.tag_resources_with_http_info(body, **kwargs) # noqa: E501
1702+
else:
1703+
(data) = self.tag_resources_with_http_info(body, **kwargs) # noqa: E501
1704+
return data
1705+
1706+
def tag_resources_with_http_info(self, body, **kwargs): # noqa: E501
1707+
"""tag_resources # noqa: E501
1708+
1709+
This method makes a synchronous HTTP request by default. To make an
1710+
asynchronous HTTP request, please pass async_req=True
1711+
>>> thread = api.tag_resources_with_http_info(body, async_req=True)
1712+
>>> result = thread.get()
1713+
1714+
:param async_req bool
1715+
:param TagResourcesRequest body: (required)
1716+
:return: TagResourcesResponse
1717+
If the method is called asynchronously,
1718+
returns the request thread.
1719+
"""
1720+
1721+
all_params = ['body'] # noqa: E501
1722+
all_params.append('async_req')
1723+
all_params.append('_return_http_data_only')
1724+
all_params.append('_preload_content')
1725+
all_params.append('_request_timeout')
1726+
1727+
params = locals()
1728+
for key, val in six.iteritems(params['kwargs']):
1729+
if key not in all_params:
1730+
raise TypeError(
1731+
"Got an unexpected keyword argument '%s'"
1732+
" to method tag_resources" % key
1733+
)
1734+
params[key] = val
1735+
del params['kwargs']
1736+
# verify the required parameter 'body' is set
1737+
if self.api_client.client_side_validation and ('body' not in params or
1738+
params['body'] is None): # noqa: E501
1739+
raise ValueError("Missing the required parameter `body` when calling `tag_resources`") # noqa: E501
1740+
1741+
collection_formats = {}
1742+
1743+
path_params = {}
1744+
1745+
query_params = []
1746+
1747+
header_params = {}
1748+
1749+
form_params = []
1750+
local_var_files = {}
1751+
1752+
body_params = None
1753+
if 'body' in params:
1754+
body_params = params['body']
1755+
# HTTP header `Accept`
1756+
header_params['Accept'] = self.api_client.select_header_accept(
1757+
['application/json']) # noqa: E501
1758+
1759+
# HTTP header `Content-Type`
1760+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
1761+
['application/json']) # noqa: E501
1762+
1763+
# Authentication setting
1764+
auth_settings = ['volcengineSign'] # noqa: E501
1765+
1766+
return self.api_client.call_api(
1767+
'/TagResources/2022-05-12/vke/post/', 'POST',
1768+
path_params,
1769+
query_params,
1770+
header_params,
1771+
body=body_params,
1772+
post_params=form_params,
1773+
files=local_var_files,
1774+
response_type='TagResourcesResponse', # noqa: E501
1775+
auth_settings=auth_settings,
1776+
async_req=params.get('async_req'),
1777+
_return_http_data_only=params.get('_return_http_data_only'),
1778+
_preload_content=params.get('_preload_content', True),
1779+
_request_timeout=params.get('_request_timeout'),
1780+
collection_formats=collection_formats)
1781+
1782+
def untag_resources(self, body, **kwargs): # noqa: E501
1783+
"""untag_resources # noqa: E501
1784+
1785+
This method makes a synchronous HTTP request by default. To make an
1786+
asynchronous HTTP request, please pass async_req=True
1787+
>>> thread = api.untag_resources(body, async_req=True)
1788+
>>> result = thread.get()
1789+
1790+
:param async_req bool
1791+
:param UntagResourcesRequest body: (required)
1792+
:return: UntagResourcesResponse
1793+
If the method is called asynchronously,
1794+
returns the request thread.
1795+
"""
1796+
kwargs['_return_http_data_only'] = True
1797+
if kwargs.get('async_req'):
1798+
return self.untag_resources_with_http_info(body, **kwargs) # noqa: E501
1799+
else:
1800+
(data) = self.untag_resources_with_http_info(body, **kwargs) # noqa: E501
1801+
return data
1802+
1803+
def untag_resources_with_http_info(self, body, **kwargs): # noqa: E501
1804+
"""untag_resources # noqa: E501
1805+
1806+
This method makes a synchronous HTTP request by default. To make an
1807+
asynchronous HTTP request, please pass async_req=True
1808+
>>> thread = api.untag_resources_with_http_info(body, async_req=True)
1809+
>>> result = thread.get()
1810+
1811+
:param async_req bool
1812+
:param UntagResourcesRequest body: (required)
1813+
:return: UntagResourcesResponse
1814+
If the method is called asynchronously,
1815+
returns the request thread.
1816+
"""
1817+
1818+
all_params = ['body'] # noqa: E501
1819+
all_params.append('async_req')
1820+
all_params.append('_return_http_data_only')
1821+
all_params.append('_preload_content')
1822+
all_params.append('_request_timeout')
1823+
1824+
params = locals()
1825+
for key, val in six.iteritems(params['kwargs']):
1826+
if key not in all_params:
1827+
raise TypeError(
1828+
"Got an unexpected keyword argument '%s'"
1829+
" to method untag_resources" % key
1830+
)
1831+
params[key] = val
1832+
del params['kwargs']
1833+
# verify the required parameter 'body' is set
1834+
if self.api_client.client_side_validation and ('body' not in params or
1835+
params['body'] is None): # noqa: E501
1836+
raise ValueError("Missing the required parameter `body` when calling `untag_resources`") # noqa: E501
1837+
1838+
collection_formats = {}
1839+
1840+
path_params = {}
1841+
1842+
query_params = []
1843+
1844+
header_params = {}
1845+
1846+
form_params = []
1847+
local_var_files = {}
1848+
1849+
body_params = None
1850+
if 'body' in params:
1851+
body_params = params['body']
1852+
# HTTP header `Accept`
1853+
header_params['Accept'] = self.api_client.select_header_accept(
1854+
['application/json']) # noqa: E501
1855+
1856+
# HTTP header `Content-Type`
1857+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
1858+
['application/json']) # noqa: E501
1859+
1860+
# Authentication setting
1861+
auth_settings = ['volcengineSign'] # noqa: E501
1862+
1863+
return self.api_client.call_api(
1864+
'/UntagResources/2022-05-12/vke/post/', 'POST',
1865+
path_params,
1866+
query_params,
1867+
header_params,
1868+
body=body_params,
1869+
post_params=form_params,
1870+
files=local_var_files,
1871+
response_type='UntagResourcesResponse', # noqa: E501
1872+
auth_settings=auth_settings,
1873+
async_req=params.get('async_req'),
1874+
_return_http_data_only=params.get('_return_http_data_only'),
1875+
_preload_content=params.get('_preload_content', True),
1876+
_request_timeout=params.get('_request_timeout'),
1877+
collection_formats=collection_formats)
1878+
15881879
def update_addon_config(self, body, **kwargs): # noqa: E501
15891880
"""update_addon_config # noqa: E501
15901881

0 commit comments

Comments
 (0)