Skip to content

Commit 566e925

Browse files
author
BitsAdmin
committed
Merge 'storage_ebs-Python-2020-04-01-online-2361-2026_03_17_15_22_46' into 'integration_2026-03-19_1127023116802'
feat: [development task] storage_ebs-2361-Python (2198819) See merge request: !1110
2 parents ce37866 + f12f227 commit 566e925

9 files changed

Lines changed: 506 additions & 30 deletions

volcenginesdkstorageebs/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@
109109
from volcenginesdkstorageebs.models.placement_group_for_describe_placement_groups_output import PlacementGroupForDescribePlacementGroupsOutput
110110
from volcenginesdkstorageebs.models.purchase_reserved_storage_capacity_request import PurchaseReservedStorageCapacityRequest
111111
from volcenginesdkstorageebs.models.purchase_reserved_storage_capacity_response import PurchaseReservedStorageCapacityResponse
112+
from volcenginesdkstorageebs.models.re_initialize_volume_request import ReInitializeVolumeRequest
113+
from volcenginesdkstorageebs.models.re_initialize_volume_response import ReInitializeVolumeResponse
112114
from volcenginesdkstorageebs.models.rollback_snapshot_group_request import RollbackSnapshotGroupRequest
113115
from volcenginesdkstorageebs.models.rollback_snapshot_group_response import RollbackSnapshotGroupResponse
114116
from volcenginesdkstorageebs.models.rollback_volume_request import RollbackVolumeRequest

volcenginesdkstorageebs/api/storage_ebs_api.py

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3816,6 +3816,103 @@ def purchase_reserved_storage_capacity_with_http_info(self, body, **kwargs): #
38163816
_request_timeout=params.get('_request_timeout'),
38173817
collection_formats=collection_formats)
38183818

3819+
def re_initialize_volume(self, body, **kwargs): # noqa: E501
3820+
"""re_initialize_volume # noqa: E501
3821+
3822+
This method makes a synchronous HTTP request by default. To make an
3823+
asynchronous HTTP request, please pass async_req=True
3824+
>>> thread = api.re_initialize_volume(body, async_req=True)
3825+
>>> result = thread.get()
3826+
3827+
:param async_req bool
3828+
:param ReInitializeVolumeRequest body: (required)
3829+
:return: ReInitializeVolumeResponse
3830+
If the method is called asynchronously,
3831+
returns the request thread.
3832+
"""
3833+
kwargs['_return_http_data_only'] = True
3834+
if kwargs.get('async_req'):
3835+
return self.re_initialize_volume_with_http_info(body, **kwargs) # noqa: E501
3836+
else:
3837+
(data) = self.re_initialize_volume_with_http_info(body, **kwargs) # noqa: E501
3838+
return data
3839+
3840+
def re_initialize_volume_with_http_info(self, body, **kwargs): # noqa: E501
3841+
"""re_initialize_volume # noqa: E501
3842+
3843+
This method makes a synchronous HTTP request by default. To make an
3844+
asynchronous HTTP request, please pass async_req=True
3845+
>>> thread = api.re_initialize_volume_with_http_info(body, async_req=True)
3846+
>>> result = thread.get()
3847+
3848+
:param async_req bool
3849+
:param ReInitializeVolumeRequest body: (required)
3850+
:return: ReInitializeVolumeResponse
3851+
If the method is called asynchronously,
3852+
returns the request thread.
3853+
"""
3854+
3855+
all_params = ['body'] # noqa: E501
3856+
all_params.append('async_req')
3857+
all_params.append('_return_http_data_only')
3858+
all_params.append('_preload_content')
3859+
all_params.append('_request_timeout')
3860+
3861+
params = locals()
3862+
for key, val in six.iteritems(params['kwargs']):
3863+
if key not in all_params:
3864+
raise TypeError(
3865+
"Got an unexpected keyword argument '%s'"
3866+
" to method re_initialize_volume" % key
3867+
)
3868+
params[key] = val
3869+
del params['kwargs']
3870+
# verify the required parameter 'body' is set
3871+
if self.api_client.client_side_validation and ('body' not in params or
3872+
params['body'] is None): # noqa: E501
3873+
raise ValueError("Missing the required parameter `body` when calling `re_initialize_volume`") # noqa: E501
3874+
3875+
collection_formats = {}
3876+
3877+
path_params = {}
3878+
3879+
query_params = []
3880+
3881+
header_params = {}
3882+
3883+
form_params = []
3884+
local_var_files = {}
3885+
3886+
body_params = None
3887+
if 'body' in params:
3888+
body_params = params['body']
3889+
# HTTP header `Accept`
3890+
header_params['Accept'] = self.api_client.select_header_accept(
3891+
['application/json']) # noqa: E501
3892+
3893+
# HTTP header `Content-Type`
3894+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
3895+
['application/json']) # noqa: E501
3896+
3897+
# Authentication setting
3898+
auth_settings = ['volcengineSign'] # noqa: E501
3899+
3900+
return self.api_client.call_api(
3901+
'/ReInitializeVolume/2020-04-01/storage_ebs/post/application_json/', 'POST',
3902+
path_params,
3903+
query_params,
3904+
header_params,
3905+
body=body_params,
3906+
post_params=form_params,
3907+
files=local_var_files,
3908+
response_type='ReInitializeVolumeResponse', # noqa: E501
3909+
auth_settings=auth_settings,
3910+
async_req=params.get('async_req'),
3911+
_return_http_data_only=params.get('_return_http_data_only'),
3912+
_preload_content=params.get('_preload_content', True),
3913+
_request_timeout=params.get('_request_timeout'),
3914+
collection_formats=collection_formats)
3915+
38193916
def rollback_snapshot_group(self, body, **kwargs): # noqa: E501
38203917
"""rollback_snapshot_group # noqa: E501
38213918

volcenginesdkstorageebs/models/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@
105105
from volcenginesdkstorageebs.models.placement_group_for_describe_placement_groups_output import PlacementGroupForDescribePlacementGroupsOutput
106106
from volcenginesdkstorageebs.models.purchase_reserved_storage_capacity_request import PurchaseReservedStorageCapacityRequest
107107
from volcenginesdkstorageebs.models.purchase_reserved_storage_capacity_response import PurchaseReservedStorageCapacityResponse
108+
from volcenginesdkstorageebs.models.re_initialize_volume_request import ReInitializeVolumeRequest
109+
from volcenginesdkstorageebs.models.re_initialize_volume_response import ReInitializeVolumeResponse
108110
from volcenginesdkstorageebs.models.rollback_snapshot_group_request import RollbackSnapshotGroupRequest
109111
from volcenginesdkstorageebs.models.rollback_snapshot_group_response import RollbackSnapshotGroupResponse
110112
from volcenginesdkstorageebs.models.rollback_volume_request import RollbackVolumeRequest

volcenginesdkstorageebs/models/create_volume_request.py

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ class CreateVolumeRequest(object):
3434
"""
3535
swagger_types = {
3636
'client_token': 'str',
37+
'delete_protection': 'bool',
38+
'delete_protection_retention_days': 'int',
3739
'description': 'str',
3840
'extra_performance_iops': 'int',
3941
'extra_performance_throughput_mb': 'int',
@@ -54,6 +56,8 @@ class CreateVolumeRequest(object):
5456

5557
attribute_map = {
5658
'client_token': 'ClientToken',
59+
'delete_protection': 'DeleteProtection',
60+
'delete_protection_retention_days': 'DeleteProtectionRetentionDays',
5761
'description': 'Description',
5862
'extra_performance_iops': 'ExtraPerformanceIOPS',
5963
'extra_performance_throughput_mb': 'ExtraPerformanceThroughputMB',
@@ -72,13 +76,15 @@ class CreateVolumeRequest(object):
7276
'zone_id': 'ZoneId'
7377
}
7478

75-
def __init__(self, client_token=None, description=None, extra_performance_iops=None, extra_performance_throughput_mb=None, extra_performance_type_id=None, instance_id=None, kind=None, placement_group_id=None, project_name=None, size=None, snapshot_id=None, subgroup_number=None, tags=None, volume_charge_type=None, volume_name=None, volume_type=None, zone_id=None, _configuration=None): # noqa: E501
79+
def __init__(self, client_token=None, delete_protection=None, delete_protection_retention_days=None, description=None, extra_performance_iops=None, extra_performance_throughput_mb=None, extra_performance_type_id=None, instance_id=None, kind=None, placement_group_id=None, project_name=None, size=None, snapshot_id=None, subgroup_number=None, tags=None, volume_charge_type=None, volume_name=None, volume_type=None, zone_id=None, _configuration=None): # noqa: E501
7680
"""CreateVolumeRequest - a model defined in Swagger""" # noqa: E501
7781
if _configuration is None:
7882
_configuration = Configuration()
7983
self._configuration = _configuration
8084

8185
self._client_token = None
86+
self._delete_protection = None
87+
self._delete_protection_retention_days = None
8288
self._description = None
8389
self._extra_performance_iops = None
8490
self._extra_performance_throughput_mb = None
@@ -99,6 +105,10 @@ def __init__(self, client_token=None, description=None, extra_performance_iops=N
99105

100106
if client_token is not None:
101107
self.client_token = client_token
108+
if delete_protection is not None:
109+
self.delete_protection = delete_protection
110+
if delete_protection_retention_days is not None:
111+
self.delete_protection_retention_days = delete_protection_retention_days
102112
if description is not None:
103113
self.description = description
104114
if extra_performance_iops is not None:
@@ -150,6 +160,48 @@ def client_token(self, client_token):
150160

151161
self._client_token = client_token
152162

163+
@property
164+
def delete_protection(self):
165+
"""Gets the delete_protection of this CreateVolumeRequest. # noqa: E501
166+
167+
168+
:return: The delete_protection of this CreateVolumeRequest. # noqa: E501
169+
:rtype: bool
170+
"""
171+
return self._delete_protection
172+
173+
@delete_protection.setter
174+
def delete_protection(self, delete_protection):
175+
"""Sets the delete_protection of this CreateVolumeRequest.
176+
177+
178+
:param delete_protection: The delete_protection of this CreateVolumeRequest. # noqa: E501
179+
:type: bool
180+
"""
181+
182+
self._delete_protection = delete_protection
183+
184+
@property
185+
def delete_protection_retention_days(self):
186+
"""Gets the delete_protection_retention_days of this CreateVolumeRequest. # noqa: E501
187+
188+
189+
:return: The delete_protection_retention_days of this CreateVolumeRequest. # noqa: E501
190+
:rtype: int
191+
"""
192+
return self._delete_protection_retention_days
193+
194+
@delete_protection_retention_days.setter
195+
def delete_protection_retention_days(self, delete_protection_retention_days):
196+
"""Sets the delete_protection_retention_days of this CreateVolumeRequest.
197+
198+
199+
:param delete_protection_retention_days: The delete_protection_retention_days of this CreateVolumeRequest. # noqa: E501
200+
:type: int
201+
"""
202+
203+
self._delete_protection_retention_days = delete_protection_retention_days
204+
153205
@property
154206
def description(self):
155207
"""Gets the description of this CreateVolumeRequest. # noqa: E501

volcenginesdkstorageebs/models/modify_volume_attribute_request.py

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,38 +33,90 @@ class ModifyVolumeAttributeRequest(object):
3333
and the value is json key in definition.
3434
"""
3535
swagger_types = {
36+
'delete_protection': 'bool',
37+
'delete_protection_retention_days': 'int',
3638
'delete_with_instance': 'bool',
3739
'description': 'str',
3840
'volume_id': 'str',
3941
'volume_name': 'str'
4042
}
4143

4244
attribute_map = {
45+
'delete_protection': 'DeleteProtection',
46+
'delete_protection_retention_days': 'DeleteProtectionRetentionDays',
4347
'delete_with_instance': 'DeleteWithInstance',
4448
'description': 'Description',
4549
'volume_id': 'VolumeId',
4650
'volume_name': 'VolumeName'
4751
}
4852

49-
def __init__(self, delete_with_instance=None, description=None, volume_id=None, volume_name=None, _configuration=None): # noqa: E501
53+
def __init__(self, delete_protection=None, delete_protection_retention_days=None, delete_with_instance=None, description=None, volume_id=None, volume_name=None, _configuration=None): # noqa: E501
5054
"""ModifyVolumeAttributeRequest - a model defined in Swagger""" # noqa: E501
5155
if _configuration is None:
5256
_configuration = Configuration()
5357
self._configuration = _configuration
5458

59+
self._delete_protection = None
60+
self._delete_protection_retention_days = None
5561
self._delete_with_instance = None
5662
self._description = None
5763
self._volume_id = None
5864
self._volume_name = None
5965
self.discriminator = None
6066

67+
if delete_protection is not None:
68+
self.delete_protection = delete_protection
69+
if delete_protection_retention_days is not None:
70+
self.delete_protection_retention_days = delete_protection_retention_days
6171
if delete_with_instance is not None:
6272
self.delete_with_instance = delete_with_instance
6373
if description is not None:
6474
self.description = description
6575
self.volume_id = volume_id
6676
self.volume_name = volume_name
6777

78+
@property
79+
def delete_protection(self):
80+
"""Gets the delete_protection of this ModifyVolumeAttributeRequest. # noqa: E501
81+
82+
83+
:return: The delete_protection of this ModifyVolumeAttributeRequest. # noqa: E501
84+
:rtype: bool
85+
"""
86+
return self._delete_protection
87+
88+
@delete_protection.setter
89+
def delete_protection(self, delete_protection):
90+
"""Sets the delete_protection of this ModifyVolumeAttributeRequest.
91+
92+
93+
:param delete_protection: The delete_protection of this ModifyVolumeAttributeRequest. # noqa: E501
94+
:type: bool
95+
"""
96+
97+
self._delete_protection = delete_protection
98+
99+
@property
100+
def delete_protection_retention_days(self):
101+
"""Gets the delete_protection_retention_days of this ModifyVolumeAttributeRequest. # noqa: E501
102+
103+
104+
:return: The delete_protection_retention_days of this ModifyVolumeAttributeRequest. # noqa: E501
105+
:rtype: int
106+
"""
107+
return self._delete_protection_retention_days
108+
109+
@delete_protection_retention_days.setter
110+
def delete_protection_retention_days(self, delete_protection_retention_days):
111+
"""Sets the delete_protection_retention_days of this ModifyVolumeAttributeRequest.
112+
113+
114+
:param delete_protection_retention_days: The delete_protection_retention_days of this ModifyVolumeAttributeRequest. # noqa: E501
115+
:type: int
116+
"""
117+
118+
self._delete_protection_retention_days = delete_protection_retention_days
119+
68120
@property
69121
def delete_with_instance(self):
70122
"""Gets the delete_with_instance of this ModifyVolumeAttributeRequest. # noqa: E501

0 commit comments

Comments
 (0)