Skip to content

Commit 20db3f8

Browse files
committed
feat: update auto scaling
1 parent 3d56189 commit 20db3f8

13 files changed

+1038
-6
lines changed

volcenginesdkautoscaling/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
from volcenginesdkautoscaling.models.alarm_policy_for_create_scaling_policy_input import AlarmPolicyForCreateScalingPolicyInput
2525
from volcenginesdkautoscaling.models.alarm_policy_for_describe_scaling_policies_output import AlarmPolicyForDescribeScalingPoliciesOutput
2626
from volcenginesdkautoscaling.models.alarm_policy_for_modify_scaling_policy_input import AlarmPolicyForModifyScalingPolicyInput
27+
from volcenginesdkautoscaling.models.attach_db_instances_request import AttachDBInstancesRequest
28+
from volcenginesdkautoscaling.models.attach_db_instances_response import AttachDBInstancesResponse
2729
from volcenginesdkautoscaling.models.attach_instances_request import AttachInstancesRequest
2830
from volcenginesdkautoscaling.models.attach_instances_response import AttachInstancesResponse
2931
from volcenginesdkautoscaling.models.attach_server_groups_request import AttachServerGroupsRequest
@@ -61,6 +63,8 @@
6163
from volcenginesdkautoscaling.models.describe_scaling_instances_response import DescribeScalingInstancesResponse
6264
from volcenginesdkautoscaling.models.describe_scaling_policies_request import DescribeScalingPoliciesRequest
6365
from volcenginesdkautoscaling.models.describe_scaling_policies_response import DescribeScalingPoliciesResponse
66+
from volcenginesdkautoscaling.models.detach_db_instances_request import DetachDBInstancesRequest
67+
from volcenginesdkautoscaling.models.detach_db_instances_response import DetachDBInstancesResponse
6468
from volcenginesdkautoscaling.models.detach_instances_request import DetachInstancesRequest
6569
from volcenginesdkautoscaling.models.detach_instances_response import DetachInstancesResponse
6670
from volcenginesdkautoscaling.models.detach_server_groups_request import DetachServerGroupsRequest

volcenginesdkautoscaling/api/auto_scaling_api.py

Lines changed: 194 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,103 @@ def __init__(self, api_client=None):
3333
api_client = volcenginesdkcore.ApiClient()
3434
self.api_client = api_client
3535

36+
def attach_db_instances(self, body, **kwargs): # noqa: E501
37+
"""attach_db_instances # noqa: E501
38+
39+
This method makes a synchronous HTTP request by default. To make an
40+
asynchronous HTTP request, please pass async_req=True
41+
>>> thread = api.attach_db_instances(body, async_req=True)
42+
>>> result = thread.get()
43+
44+
:param async_req bool
45+
:param AttachDBInstancesRequest body: (required)
46+
:return: AttachDBInstancesResponse
47+
If the method is called asynchronously,
48+
returns the request thread.
49+
"""
50+
kwargs['_return_http_data_only'] = True
51+
if kwargs.get('async_req'):
52+
return self.attach_db_instances_with_http_info(body, **kwargs) # noqa: E501
53+
else:
54+
(data) = self.attach_db_instances_with_http_info(body, **kwargs) # noqa: E501
55+
return data
56+
57+
def attach_db_instances_with_http_info(self, body, **kwargs): # noqa: E501
58+
"""attach_db_instances # noqa: E501
59+
60+
This method makes a synchronous HTTP request by default. To make an
61+
asynchronous HTTP request, please pass async_req=True
62+
>>> thread = api.attach_db_instances_with_http_info(body, async_req=True)
63+
>>> result = thread.get()
64+
65+
:param async_req bool
66+
:param AttachDBInstancesRequest body: (required)
67+
:return: AttachDBInstancesResponse
68+
If the method is called asynchronously,
69+
returns the request thread.
70+
"""
71+
72+
all_params = ['body'] # noqa: E501
73+
all_params.append('async_req')
74+
all_params.append('_return_http_data_only')
75+
all_params.append('_preload_content')
76+
all_params.append('_request_timeout')
77+
78+
params = locals()
79+
for key, val in six.iteritems(params['kwargs']):
80+
if key not in all_params:
81+
raise TypeError(
82+
"Got an unexpected keyword argument '%s'"
83+
" to method attach_db_instances" % key
84+
)
85+
params[key] = val
86+
del params['kwargs']
87+
# verify the required parameter 'body' is set
88+
if self.api_client.client_side_validation and ('body' not in params or
89+
params['body'] is None): # noqa: E501
90+
raise ValueError("Missing the required parameter `body` when calling `attach_db_instances`") # noqa: E501
91+
92+
collection_formats = {}
93+
94+
path_params = {}
95+
96+
query_params = []
97+
98+
header_params = {}
99+
100+
form_params = []
101+
local_var_files = {}
102+
103+
body_params = None
104+
if 'body' in params:
105+
body_params = params['body']
106+
# HTTP header `Accept`
107+
header_params['Accept'] = self.api_client.select_header_accept(
108+
['application/json']) # noqa: E501
109+
110+
# HTTP header `Content-Type`
111+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
112+
['text/plain']) # noqa: E501
113+
114+
# Authentication setting
115+
auth_settings = ['volcengineSign'] # noqa: E501
116+
117+
return self.api_client.call_api(
118+
'/AttachDBInstances/2020-01-01/auto_scaling/get/', 'GET',
119+
path_params,
120+
query_params,
121+
header_params,
122+
body=body_params,
123+
post_params=form_params,
124+
files=local_var_files,
125+
response_type='AttachDBInstancesResponse', # noqa: E501
126+
auth_settings=auth_settings,
127+
async_req=params.get('async_req'),
128+
_return_http_data_only=params.get('_return_http_data_only'),
129+
_preload_content=params.get('_preload_content', True),
130+
_request_timeout=params.get('_request_timeout'),
131+
collection_formats=collection_formats)
132+
36133
def attach_instances(self, body, **kwargs): # noqa: E501
37134
"""attach_instances # noqa: E501
38135
@@ -1779,6 +1876,103 @@ def describe_scaling_policies_with_http_info(self, body, **kwargs): # noqa: E50
17791876
_request_timeout=params.get('_request_timeout'),
17801877
collection_formats=collection_formats)
17811878

1879+
def detach_db_instances(self, body, **kwargs): # noqa: E501
1880+
"""detach_db_instances # noqa: E501
1881+
1882+
This method makes a synchronous HTTP request by default. To make an
1883+
asynchronous HTTP request, please pass async_req=True
1884+
>>> thread = api.detach_db_instances(body, async_req=True)
1885+
>>> result = thread.get()
1886+
1887+
:param async_req bool
1888+
:param DetachDBInstancesRequest body: (required)
1889+
:return: DetachDBInstancesResponse
1890+
If the method is called asynchronously,
1891+
returns the request thread.
1892+
"""
1893+
kwargs['_return_http_data_only'] = True
1894+
if kwargs.get('async_req'):
1895+
return self.detach_db_instances_with_http_info(body, **kwargs) # noqa: E501
1896+
else:
1897+
(data) = self.detach_db_instances_with_http_info(body, **kwargs) # noqa: E501
1898+
return data
1899+
1900+
def detach_db_instances_with_http_info(self, body, **kwargs): # noqa: E501
1901+
"""detach_db_instances # noqa: E501
1902+
1903+
This method makes a synchronous HTTP request by default. To make an
1904+
asynchronous HTTP request, please pass async_req=True
1905+
>>> thread = api.detach_db_instances_with_http_info(body, async_req=True)
1906+
>>> result = thread.get()
1907+
1908+
:param async_req bool
1909+
:param DetachDBInstancesRequest body: (required)
1910+
:return: DetachDBInstancesResponse
1911+
If the method is called asynchronously,
1912+
returns the request thread.
1913+
"""
1914+
1915+
all_params = ['body'] # noqa: E501
1916+
all_params.append('async_req')
1917+
all_params.append('_return_http_data_only')
1918+
all_params.append('_preload_content')
1919+
all_params.append('_request_timeout')
1920+
1921+
params = locals()
1922+
for key, val in six.iteritems(params['kwargs']):
1923+
if key not in all_params:
1924+
raise TypeError(
1925+
"Got an unexpected keyword argument '%s'"
1926+
" to method detach_db_instances" % key
1927+
)
1928+
params[key] = val
1929+
del params['kwargs']
1930+
# verify the required parameter 'body' is set
1931+
if self.api_client.client_side_validation and ('body' not in params or
1932+
params['body'] is None): # noqa: E501
1933+
raise ValueError("Missing the required parameter `body` when calling `detach_db_instances`") # noqa: E501
1934+
1935+
collection_formats = {}
1936+
1937+
path_params = {}
1938+
1939+
query_params = []
1940+
1941+
header_params = {}
1942+
1943+
form_params = []
1944+
local_var_files = {}
1945+
1946+
body_params = None
1947+
if 'body' in params:
1948+
body_params = params['body']
1949+
# HTTP header `Accept`
1950+
header_params['Accept'] = self.api_client.select_header_accept(
1951+
['application/json']) # noqa: E501
1952+
1953+
# HTTP header `Content-Type`
1954+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
1955+
['text/plain']) # noqa: E501
1956+
1957+
# Authentication setting
1958+
auth_settings = ['volcengineSign'] # noqa: E501
1959+
1960+
return self.api_client.call_api(
1961+
'/DetachDBInstances/2020-01-01/auto_scaling/get/', 'GET',
1962+
path_params,
1963+
query_params,
1964+
header_params,
1965+
body=body_params,
1966+
post_params=form_params,
1967+
files=local_var_files,
1968+
response_type='DetachDBInstancesResponse', # noqa: E501
1969+
auth_settings=auth_settings,
1970+
async_req=params.get('async_req'),
1971+
_return_http_data_only=params.get('_return_http_data_only'),
1972+
_preload_content=params.get('_preload_content', True),
1973+
_request_timeout=params.get('_request_timeout'),
1974+
collection_formats=collection_formats)
1975+
17821976
def detach_instances(self, body, **kwargs): # noqa: E501
17831977
"""detach_instances # noqa: E501
17841978

volcenginesdkautoscaling/models/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
from volcenginesdkautoscaling.models.alarm_policy_for_create_scaling_policy_input import AlarmPolicyForCreateScalingPolicyInput
2121
from volcenginesdkautoscaling.models.alarm_policy_for_describe_scaling_policies_output import AlarmPolicyForDescribeScalingPoliciesOutput
2222
from volcenginesdkautoscaling.models.alarm_policy_for_modify_scaling_policy_input import AlarmPolicyForModifyScalingPolicyInput
23+
from volcenginesdkautoscaling.models.attach_db_instances_request import AttachDBInstancesRequest
24+
from volcenginesdkautoscaling.models.attach_db_instances_response import AttachDBInstancesResponse
2325
from volcenginesdkautoscaling.models.attach_instances_request import AttachInstancesRequest
2426
from volcenginesdkautoscaling.models.attach_instances_response import AttachInstancesResponse
2527
from volcenginesdkautoscaling.models.attach_server_groups_request import AttachServerGroupsRequest
@@ -57,6 +59,8 @@
5759
from volcenginesdkautoscaling.models.describe_scaling_instances_response import DescribeScalingInstancesResponse
5860
from volcenginesdkautoscaling.models.describe_scaling_policies_request import DescribeScalingPoliciesRequest
5961
from volcenginesdkautoscaling.models.describe_scaling_policies_response import DescribeScalingPoliciesResponse
62+
from volcenginesdkautoscaling.models.detach_db_instances_request import DetachDBInstancesRequest
63+
from volcenginesdkautoscaling.models.detach_db_instances_response import DetachDBInstancesResponse
6064
from volcenginesdkautoscaling.models.detach_instances_request import DetachInstancesRequest
6165
from volcenginesdkautoscaling.models.detach_instances_response import DetachInstancesResponse
6266
from volcenginesdkautoscaling.models.detach_server_groups_request import DetachServerGroupsRequest

0 commit comments

Comments
 (0)