Skip to content

Commit 2cfd650

Browse files
committed
Merge branch 'ecs-Python-2020-04-01-online-485-2024_05_09_16_49_56' into 'master'
Ecs python 2020 04 01 online 485 2024 05 09 16 49 56 See merge request iaasng/volcengine-python-sdk!294
2 parents f393905 + 4b36ac0 commit 2cfd650

18 files changed

+1100
-16
lines changed

meta.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"lasted": "1.0.78",
3-
"meta_commit": "b59de31606872af9acb9113fa227e1ad0cd42f98"
2+
"lasted": "1.0.79",
3+
"meta_commit": "47356c17fece2006e8b3a1348f420fdf1de04d4e"
44
}

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from setuptools import setup, find_packages # noqa: H301
44

55
NAME = "volcengine-python-sdk"
6-
VERSION = "1.0.78"
6+
VERSION = "1.0.79"
77
# To install the library, run the following
88
#
99
# python setup.py install

volcenginesdkcore/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
6767
self.default_headers[header_name] = header_value
6868
self.cookie = cookie
6969
# Set default User-Agent.
70-
self.user_agent = 'volcstack-python-sdk/1.0.78'
70+
self.user_agent = 'volcstack-python-sdk/1.0.79'
7171
self.client_side_validation = configuration.client_side_validation
7272

7373
def __del__(self):

volcenginesdkcore/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,5 +221,5 @@ def to_debug_report(self):
221221
"OS: {env}\n"\
222222
"Python Version: {pyversion}\n"\
223223
"Version of the API: 0.1.0\n"\
224-
"SDK Package Version: 1.0.78".\
224+
"SDK Package Version: 1.0.79".\
225225
format(env=sys.platform, pyversion=sys.version)

volcenginesdkecs/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,9 @@
135135
from volcenginesdkecs.models.describe_zones_response import DescribeZonesResponse
136136
from volcenginesdkecs.models.detach_key_pair_request import DetachKeyPairRequest
137137
from volcenginesdkecs.models.detach_key_pair_response import DetachKeyPairResponse
138+
from volcenginesdkecs.models.detect_image_request import DetectImageRequest
139+
from volcenginesdkecs.models.detect_image_response import DetectImageResponse
140+
from volcenginesdkecs.models.detection_result_for_describe_images_output import DetectionResultForDescribeImagesOutput
138141
from volcenginesdkecs.models.disassociate_instances_iam_role_request import DisassociateInstancesIamRoleRequest
139142
from volcenginesdkecs.models.disassociate_instances_iam_role_response import DisassociateInstancesIamRoleResponse
140143
from volcenginesdkecs.models.eip_address_for_describe_instances_output import EipAddressForDescribeInstancesOutput
@@ -183,6 +186,7 @@
183186
from volcenginesdkecs.models.invocation_result_for_describe_invocation_results_output import InvocationResultForDescribeInvocationResultsOutput
184187
from volcenginesdkecs.models.invoke_command_request import InvokeCommandRequest
185188
from volcenginesdkecs.models.invoke_command_response import InvokeCommandResponse
189+
from volcenginesdkecs.models.item_for_describe_images_output import ItemForDescribeImagesOutput
186190
from volcenginesdkecs.models.key_pair_for_describe_key_pairs_output import KeyPairForDescribeKeyPairsOutput
187191
from volcenginesdkecs.models.local_volume_for_describe_instance_types_output import LocalVolumeForDescribeInstanceTypesOutput
188192
from volcenginesdkecs.models.local_volume_for_describe_instances_output import LocalVolumeForDescribeInstancesOutput
@@ -256,6 +260,7 @@
256260
from volcenginesdkecs.models.run_command_response import RunCommandResponse
257261
from volcenginesdkecs.models.run_instances_request import RunInstancesRequest
258262
from volcenginesdkecs.models.run_instances_response import RunInstancesResponse
263+
from volcenginesdkecs.models.snapshot_for_describe_images_output import SnapshotForDescribeImagesOutput
259264
from volcenginesdkecs.models.spot_price_for_describe_spot_price_history_output import SpotPriceForDescribeSpotPriceHistoryOutput
260265
from volcenginesdkecs.models.start_instance_request import StartInstanceRequest
261266
from volcenginesdkecs.models.start_instance_response import StartInstanceResponse

volcenginesdkecs/api/ecs_api.py

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4980,6 +4980,103 @@ def detach_key_pair_with_http_info(self, body, **kwargs): # noqa: E501
49804980
_request_timeout=params.get('_request_timeout'),
49814981
collection_formats=collection_formats)
49824982

4983+
def detect_image(self, body, **kwargs): # noqa: E501
4984+
"""detect_image # noqa: E501
4985+
4986+
This method makes a synchronous HTTP request by default. To make an
4987+
asynchronous HTTP request, please pass async_req=True
4988+
>>> thread = api.detect_image(body, async_req=True)
4989+
>>> result = thread.get()
4990+
4991+
:param async_req bool
4992+
:param DetectImageRequest body: (required)
4993+
:return: DetectImageResponse
4994+
If the method is called asynchronously,
4995+
returns the request thread.
4996+
"""
4997+
kwargs['_return_http_data_only'] = True
4998+
if kwargs.get('async_req'):
4999+
return self.detect_image_with_http_info(body, **kwargs) # noqa: E501
5000+
else:
5001+
(data) = self.detect_image_with_http_info(body, **kwargs) # noqa: E501
5002+
return data
5003+
5004+
def detect_image_with_http_info(self, body, **kwargs): # noqa: E501
5005+
"""detect_image # noqa: E501
5006+
5007+
This method makes a synchronous HTTP request by default. To make an
5008+
asynchronous HTTP request, please pass async_req=True
5009+
>>> thread = api.detect_image_with_http_info(body, async_req=True)
5010+
>>> result = thread.get()
5011+
5012+
:param async_req bool
5013+
:param DetectImageRequest body: (required)
5014+
:return: DetectImageResponse
5015+
If the method is called asynchronously,
5016+
returns the request thread.
5017+
"""
5018+
5019+
all_params = ['body'] # noqa: E501
5020+
all_params.append('async_req')
5021+
all_params.append('_return_http_data_only')
5022+
all_params.append('_preload_content')
5023+
all_params.append('_request_timeout')
5024+
5025+
params = locals()
5026+
for key, val in six.iteritems(params['kwargs']):
5027+
if key not in all_params:
5028+
raise TypeError(
5029+
"Got an unexpected keyword argument '%s'"
5030+
" to method detect_image" % key
5031+
)
5032+
params[key] = val
5033+
del params['kwargs']
5034+
# verify the required parameter 'body' is set
5035+
if self.api_client.client_side_validation and ('body' not in params or
5036+
params['body'] is None): # noqa: E501
5037+
raise ValueError("Missing the required parameter `body` when calling `detect_image`") # noqa: E501
5038+
5039+
collection_formats = {}
5040+
5041+
path_params = {}
5042+
5043+
query_params = []
5044+
5045+
header_params = {}
5046+
5047+
form_params = []
5048+
local_var_files = {}
5049+
5050+
body_params = None
5051+
if 'body' in params:
5052+
body_params = params['body']
5053+
# HTTP header `Accept`
5054+
header_params['Accept'] = self.api_client.select_header_accept(
5055+
['application/json']) # noqa: E501
5056+
5057+
# HTTP header `Content-Type`
5058+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
5059+
['text/plain']) # noqa: E501
5060+
5061+
# Authentication setting
5062+
auth_settings = ['volcengineSign'] # noqa: E501
5063+
5064+
return self.api_client.call_api(
5065+
'/DetectImage/2020-04-01/ecs/get/text_plain/', 'GET',
5066+
path_params,
5067+
query_params,
5068+
header_params,
5069+
body=body_params,
5070+
post_params=form_params,
5071+
files=local_var_files,
5072+
response_type='DetectImageResponse', # noqa: E501
5073+
auth_settings=auth_settings,
5074+
async_req=params.get('async_req'),
5075+
_return_http_data_only=params.get('_return_http_data_only'),
5076+
_preload_content=params.get('_preload_content', True),
5077+
_request_timeout=params.get('_request_timeout'),
5078+
collection_formats=collection_formats)
5079+
49835080
def disassociate_instances_iam_role(self, body, **kwargs): # noqa: E501
49845081
"""disassociate_instances_iam_role # noqa: E501
49855082

volcenginesdkecs/models/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@
131131
from volcenginesdkecs.models.describe_zones_response import DescribeZonesResponse
132132
from volcenginesdkecs.models.detach_key_pair_request import DetachKeyPairRequest
133133
from volcenginesdkecs.models.detach_key_pair_response import DetachKeyPairResponse
134+
from volcenginesdkecs.models.detect_image_request import DetectImageRequest
135+
from volcenginesdkecs.models.detect_image_response import DetectImageResponse
136+
from volcenginesdkecs.models.detection_result_for_describe_images_output import DetectionResultForDescribeImagesOutput
134137
from volcenginesdkecs.models.disassociate_instances_iam_role_request import DisassociateInstancesIamRoleRequest
135138
from volcenginesdkecs.models.disassociate_instances_iam_role_response import DisassociateInstancesIamRoleResponse
136139
from volcenginesdkecs.models.eip_address_for_describe_instances_output import EipAddressForDescribeInstancesOutput
@@ -179,6 +182,7 @@
179182
from volcenginesdkecs.models.invocation_result_for_describe_invocation_results_output import InvocationResultForDescribeInvocationResultsOutput
180183
from volcenginesdkecs.models.invoke_command_request import InvokeCommandRequest
181184
from volcenginesdkecs.models.invoke_command_response import InvokeCommandResponse
185+
from volcenginesdkecs.models.item_for_describe_images_output import ItemForDescribeImagesOutput
182186
from volcenginesdkecs.models.key_pair_for_describe_key_pairs_output import KeyPairForDescribeKeyPairsOutput
183187
from volcenginesdkecs.models.local_volume_for_describe_instance_types_output import LocalVolumeForDescribeInstanceTypesOutput
184188
from volcenginesdkecs.models.local_volume_for_describe_instances_output import LocalVolumeForDescribeInstancesOutput
@@ -252,6 +256,7 @@
252256
from volcenginesdkecs.models.run_command_response import RunCommandResponse
253257
from volcenginesdkecs.models.run_instances_request import RunInstancesRequest
254258
from volcenginesdkecs.models.run_instances_response import RunInstancesResponse
259+
from volcenginesdkecs.models.snapshot_for_describe_images_output import SnapshotForDescribeImagesOutput
255260
from volcenginesdkecs.models.spot_price_for_describe_spot_price_history_output import SpotPriceForDescribeSpotPriceHistoryOutput
256261
from volcenginesdkecs.models.start_instance_request import StartInstanceRequest
257262
from volcenginesdkecs.models.start_instance_response import StartInstanceResponse

volcenginesdkecs/models/create_image_request.py

Lines changed: 81 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,25 @@ class CreateImageRequest(object):
3636
'description': 'str',
3737
'image_name': 'str',
3838
'instance_id': 'str',
39+
'need_detection': 'bool',
3940
'project_name': 'str',
41+
'snapshot_group_id': 'str',
42+
'snapshot_id': 'str',
4043
'tags': 'list[TagForCreateImageInput]'
4144
}
4245

4346
attribute_map = {
4447
'description': 'Description',
4548
'image_name': 'ImageName',
4649
'instance_id': 'InstanceId',
50+
'need_detection': 'NeedDetection',
4751
'project_name': 'ProjectName',
52+
'snapshot_group_id': 'SnapshotGroupId',
53+
'snapshot_id': 'SnapshotId',
4854
'tags': 'Tags'
4955
}
5056

51-
def __init__(self, description=None, image_name=None, instance_id=None, project_name=None, tags=None, _configuration=None): # noqa: E501
57+
def __init__(self, description=None, image_name=None, instance_id=None, need_detection=None, project_name=None, snapshot_group_id=None, snapshot_id=None, tags=None, _configuration=None): # noqa: E501
5258
"""CreateImageRequest - a model defined in Swagger""" # noqa: E501
5359
if _configuration is None:
5460
_configuration = Configuration()
@@ -57,16 +63,26 @@ def __init__(self, description=None, image_name=None, instance_id=None, project_
5763
self._description = None
5864
self._image_name = None
5965
self._instance_id = None
66+
self._need_detection = None
6067
self._project_name = None
68+
self._snapshot_group_id = None
69+
self._snapshot_id = None
6170
self._tags = None
6271
self.discriminator = None
6372

6473
if description is not None:
6574
self.description = description
6675
self.image_name = image_name
67-
self.instance_id = instance_id
76+
if instance_id is not None:
77+
self.instance_id = instance_id
78+
if need_detection is not None:
79+
self.need_detection = need_detection
6880
if project_name is not None:
6981
self.project_name = project_name
82+
if snapshot_group_id is not None:
83+
self.snapshot_group_id = snapshot_group_id
84+
if snapshot_id is not None:
85+
self.snapshot_id = snapshot_id
7086
if tags is not None:
7187
self.tags = tags
7288

@@ -132,11 +148,30 @@ def instance_id(self, instance_id):
132148
:param instance_id: The instance_id of this CreateImageRequest. # noqa: E501
133149
:type: str
134150
"""
135-
if self._configuration.client_side_validation and instance_id is None:
136-
raise ValueError("Invalid value for `instance_id`, must not be `None`") # noqa: E501
137151

138152
self._instance_id = instance_id
139153

154+
@property
155+
def need_detection(self):
156+
"""Gets the need_detection of this CreateImageRequest. # noqa: E501
157+
158+
159+
:return: The need_detection of this CreateImageRequest. # noqa: E501
160+
:rtype: bool
161+
"""
162+
return self._need_detection
163+
164+
@need_detection.setter
165+
def need_detection(self, need_detection):
166+
"""Sets the need_detection of this CreateImageRequest.
167+
168+
169+
:param need_detection: The need_detection of this CreateImageRequest. # noqa: E501
170+
:type: bool
171+
"""
172+
173+
self._need_detection = need_detection
174+
140175
@property
141176
def project_name(self):
142177
"""Gets the project_name of this CreateImageRequest. # noqa: E501
@@ -158,6 +193,48 @@ def project_name(self, project_name):
158193

159194
self._project_name = project_name
160195

196+
@property
197+
def snapshot_group_id(self):
198+
"""Gets the snapshot_group_id of this CreateImageRequest. # noqa: E501
199+
200+
201+
:return: The snapshot_group_id of this CreateImageRequest. # noqa: E501
202+
:rtype: str
203+
"""
204+
return self._snapshot_group_id
205+
206+
@snapshot_group_id.setter
207+
def snapshot_group_id(self, snapshot_group_id):
208+
"""Sets the snapshot_group_id of this CreateImageRequest.
209+
210+
211+
:param snapshot_group_id: The snapshot_group_id of this CreateImageRequest. # noqa: E501
212+
:type: str
213+
"""
214+
215+
self._snapshot_group_id = snapshot_group_id
216+
217+
@property
218+
def snapshot_id(self):
219+
"""Gets the snapshot_id of this CreateImageRequest. # noqa: E501
220+
221+
222+
:return: The snapshot_id of this CreateImageRequest. # noqa: E501
223+
:rtype: str
224+
"""
225+
return self._snapshot_id
226+
227+
@snapshot_id.setter
228+
def snapshot_id(self, snapshot_id):
229+
"""Sets the snapshot_id of this CreateImageRequest.
230+
231+
232+
:param snapshot_id: The snapshot_id of this CreateImageRequest. # noqa: E501
233+
:type: str
234+
"""
235+
236+
self._snapshot_id = snapshot_id
237+
161238
@property
162239
def tags(self):
163240
"""Gets the tags of this CreateImageRequest. # noqa: E501

volcenginesdkecs/models/delete_images_request.py

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,25 +33,51 @@ class DeleteImagesRequest(object):
3333
and the value is json key in definition.
3434
"""
3535
swagger_types = {
36+
'delete_binded_snapshots': 'bool',
3637
'image_ids': 'list[str]'
3738
}
3839

3940
attribute_map = {
41+
'delete_binded_snapshots': 'DeleteBindedSnapshots',
4042
'image_ids': 'ImageIds'
4143
}
4244

43-
def __init__(self, image_ids=None, _configuration=None): # noqa: E501
45+
def __init__(self, delete_binded_snapshots=None, image_ids=None, _configuration=None): # noqa: E501
4446
"""DeleteImagesRequest - a model defined in Swagger""" # noqa: E501
4547
if _configuration is None:
4648
_configuration = Configuration()
4749
self._configuration = _configuration
4850

51+
self._delete_binded_snapshots = None
4952
self._image_ids = None
5053
self.discriminator = None
5154

55+
if delete_binded_snapshots is not None:
56+
self.delete_binded_snapshots = delete_binded_snapshots
5257
if image_ids is not None:
5358
self.image_ids = image_ids
5459

60+
@property
61+
def delete_binded_snapshots(self):
62+
"""Gets the delete_binded_snapshots of this DeleteImagesRequest. # noqa: E501
63+
64+
65+
:return: The delete_binded_snapshots of this DeleteImagesRequest. # noqa: E501
66+
:rtype: bool
67+
"""
68+
return self._delete_binded_snapshots
69+
70+
@delete_binded_snapshots.setter
71+
def delete_binded_snapshots(self, delete_binded_snapshots):
72+
"""Sets the delete_binded_snapshots of this DeleteImagesRequest.
73+
74+
75+
:param delete_binded_snapshots: The delete_binded_snapshots of this DeleteImagesRequest. # noqa: E501
76+
:type: bool
77+
"""
78+
79+
self._delete_binded_snapshots = delete_binded_snapshots
80+
5581
@property
5682
def image_ids(self):
5783
"""Gets the image_ids of this DeleteImagesRequest. # noqa: E501

0 commit comments

Comments
 (0)