Skip to content

Commit 90dfab6

Browse files
committed
feat: update ecs and vpc api
1 parent 98f42e1 commit 90dfab6

14 files changed

+306
-23
lines changed

volcenginesdkecs/models/instance_for_describe_instances_output.py

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ class InstanceForDescribeInstancesOutput(object):
4040
'eip_address': 'EipAddressForDescribeInstancesOutput',
4141
'expired_at': 'str',
4242
'host_name': 'str',
43+
'hostname': 'str',
4344
'image_id': 'str',
4445
'instance_charge_type': 'str',
4546
'instance_id': 'str',
@@ -54,6 +55,7 @@ class InstanceForDescribeInstancesOutput(object):
5455
'os_type': 'str',
5556
'project_name': 'str',
5657
'rdma_ip_addresses': 'list[str]',
58+
'spot_strategy': 'str',
5759
'status': 'str',
5860
'stopped_mode': 'str',
5961
'tags': 'list[TagForDescribeInstancesOutput]',
@@ -71,6 +73,7 @@ class InstanceForDescribeInstancesOutput(object):
7173
'eip_address': 'EipAddress',
7274
'expired_at': 'ExpiredAt',
7375
'host_name': 'HostName',
76+
'hostname': 'Hostname',
7477
'image_id': 'ImageId',
7578
'instance_charge_type': 'InstanceChargeType',
7679
'instance_id': 'InstanceId',
@@ -85,6 +88,7 @@ class InstanceForDescribeInstancesOutput(object):
8588
'os_type': 'OsType',
8689
'project_name': 'ProjectName',
8790
'rdma_ip_addresses': 'RdmaIpAddresses',
91+
'spot_strategy': 'SpotStrategy',
8892
'status': 'Status',
8993
'stopped_mode': 'StoppedMode',
9094
'tags': 'Tags',
@@ -94,7 +98,7 @@ class InstanceForDescribeInstancesOutput(object):
9498
'zone_id': 'ZoneId'
9599
}
96100

97-
def __init__(self, cpu_options=None, cpus=None, created_at=None, description=None, eip_address=None, expired_at=None, host_name=None, image_id=None, instance_charge_type=None, instance_id=None, instance_name=None, instance_type_id=None, key_pair_id=None, key_pair_name=None, local_volumes=None, memory_size=None, network_interfaces=None, os_name=None, os_type=None, project_name=None, rdma_ip_addresses=None, status=None, stopped_mode=None, tags=None, updated_at=None, uuid=None, vpc_id=None, zone_id=None, _configuration=None): # noqa: E501
101+
def __init__(self, cpu_options=None, cpus=None, created_at=None, description=None, eip_address=None, expired_at=None, host_name=None, hostname=None, image_id=None, instance_charge_type=None, instance_id=None, instance_name=None, instance_type_id=None, key_pair_id=None, key_pair_name=None, local_volumes=None, memory_size=None, network_interfaces=None, os_name=None, os_type=None, project_name=None, rdma_ip_addresses=None, spot_strategy=None, status=None, stopped_mode=None, tags=None, updated_at=None, uuid=None, vpc_id=None, zone_id=None, _configuration=None): # noqa: E501
98102
"""InstanceForDescribeInstancesOutput - a model defined in Swagger""" # noqa: E501
99103
if _configuration is None:
100104
_configuration = Configuration()
@@ -107,6 +111,7 @@ def __init__(self, cpu_options=None, cpus=None, created_at=None, description=Non
107111
self._eip_address = None
108112
self._expired_at = None
109113
self._host_name = None
114+
self._hostname = None
110115
self._image_id = None
111116
self._instance_charge_type = None
112117
self._instance_id = None
@@ -121,6 +126,7 @@ def __init__(self, cpu_options=None, cpus=None, created_at=None, description=Non
121126
self._os_type = None
122127
self._project_name = None
123128
self._rdma_ip_addresses = None
129+
self._spot_strategy = None
124130
self._status = None
125131
self._stopped_mode = None
126132
self._tags = None
@@ -144,6 +150,8 @@ def __init__(self, cpu_options=None, cpus=None, created_at=None, description=Non
144150
self.expired_at = expired_at
145151
if host_name is not None:
146152
self.host_name = host_name
153+
if hostname is not None:
154+
self.hostname = hostname
147155
if image_id is not None:
148156
self.image_id = image_id
149157
if instance_charge_type is not None:
@@ -172,6 +180,8 @@ def __init__(self, cpu_options=None, cpus=None, created_at=None, description=Non
172180
self.project_name = project_name
173181
if rdma_ip_addresses is not None:
174182
self.rdma_ip_addresses = rdma_ip_addresses
183+
if spot_strategy is not None:
184+
self.spot_strategy = spot_strategy
175185
if status is not None:
176186
self.status = status
177187
if stopped_mode is not None:
@@ -334,6 +344,27 @@ def host_name(self, host_name):
334344

335345
self._host_name = host_name
336346

347+
@property
348+
def hostname(self):
349+
"""Gets the hostname of this InstanceForDescribeInstancesOutput. # noqa: E501
350+
351+
352+
:return: The hostname of this InstanceForDescribeInstancesOutput. # noqa: E501
353+
:rtype: str
354+
"""
355+
return self._hostname
356+
357+
@hostname.setter
358+
def hostname(self, hostname):
359+
"""Sets the hostname of this InstanceForDescribeInstancesOutput.
360+
361+
362+
:param hostname: The hostname of this InstanceForDescribeInstancesOutput. # noqa: E501
363+
:type: str
364+
"""
365+
366+
self._hostname = hostname
367+
337368
@property
338369
def image_id(self):
339370
"""Gets the image_id of this InstanceForDescribeInstancesOutput. # noqa: E501
@@ -628,6 +659,27 @@ def rdma_ip_addresses(self, rdma_ip_addresses):
628659

629660
self._rdma_ip_addresses = rdma_ip_addresses
630661

662+
@property
663+
def spot_strategy(self):
664+
"""Gets the spot_strategy of this InstanceForDescribeInstancesOutput. # noqa: E501
665+
666+
667+
:return: The spot_strategy of this InstanceForDescribeInstancesOutput. # noqa: E501
668+
:rtype: str
669+
"""
670+
return self._spot_strategy
671+
672+
@spot_strategy.setter
673+
def spot_strategy(self, spot_strategy):
674+
"""Sets the spot_strategy of this InstanceForDescribeInstancesOutput.
675+
676+
677+
:param spot_strategy: The spot_strategy of this InstanceForDescribeInstancesOutput. # noqa: E501
678+
:type: str
679+
"""
680+
681+
self._spot_strategy = spot_strategy
682+
631683
@property
632684
def status(self):
633685
"""Gets the status of this InstanceForDescribeInstancesOutput. # noqa: E501

volcenginesdkecs/models/replace_system_volume_request.py

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ class ReplaceSystemVolumeRequest(object):
3636
'client_token': 'str',
3737
'image_id': 'str',
3838
'instance_id': 'str',
39+
'keep_image_credential': 'bool',
3940
'key_pair_name': 'str',
4041
'password': 'str',
4142
'size': 'str',
@@ -46,13 +47,14 @@ class ReplaceSystemVolumeRequest(object):
4647
'client_token': 'ClientToken',
4748
'image_id': 'ImageId',
4849
'instance_id': 'InstanceId',
50+
'keep_image_credential': 'KeepImageCredential',
4951
'key_pair_name': 'KeyPairName',
5052
'password': 'Password',
5153
'size': 'Size',
5254
'user_data': 'UserData'
5355
}
5456

55-
def __init__(self, client_token=None, image_id=None, instance_id=None, key_pair_name=None, password=None, size=None, user_data=None, _configuration=None): # noqa: E501
57+
def __init__(self, client_token=None, image_id=None, instance_id=None, keep_image_credential=None, key_pair_name=None, password=None, size=None, user_data=None, _configuration=None): # noqa: E501
5658
"""ReplaceSystemVolumeRequest - a model defined in Swagger""" # noqa: E501
5759
if _configuration is None:
5860
_configuration = Configuration()
@@ -61,6 +63,7 @@ def __init__(self, client_token=None, image_id=None, instance_id=None, key_pair_
6163
self._client_token = None
6264
self._image_id = None
6365
self._instance_id = None
66+
self._keep_image_credential = None
6467
self._key_pair_name = None
6568
self._password = None
6669
self._size = None
@@ -73,6 +76,8 @@ def __init__(self, client_token=None, image_id=None, instance_id=None, key_pair_
7376
self.image_id = image_id
7477
if instance_id is not None:
7578
self.instance_id = instance_id
79+
if keep_image_credential is not None:
80+
self.keep_image_credential = keep_image_credential
7681
if key_pair_name is not None:
7782
self.key_pair_name = key_pair_name
7883
if password is not None:
@@ -145,6 +150,27 @@ def instance_id(self, instance_id):
145150

146151
self._instance_id = instance_id
147152

153+
@property
154+
def keep_image_credential(self):
155+
"""Gets the keep_image_credential of this ReplaceSystemVolumeRequest. # noqa: E501
156+
157+
158+
:return: The keep_image_credential of this ReplaceSystemVolumeRequest. # noqa: E501
159+
:rtype: bool
160+
"""
161+
return self._keep_image_credential
162+
163+
@keep_image_credential.setter
164+
def keep_image_credential(self, keep_image_credential):
165+
"""Sets the keep_image_credential of this ReplaceSystemVolumeRequest.
166+
167+
168+
:param keep_image_credential: The keep_image_credential of this ReplaceSystemVolumeRequest. # noqa: E501
169+
:type: bool
170+
"""
171+
172+
self._keep_image_credential = keep_image_credential
173+
148174
@property
149175
def key_pair_name(self):
150176
"""Gets the key_pair_name of this ReplaceSystemVolumeRequest. # noqa: E501

volcenginesdkecs/models/run_instances_request.py

Lines changed: 79 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,14 @@ class RunInstancesRequest(object):
4141
'description': 'str',
4242
'dry_run': 'bool',
4343
'host_name': 'str',
44+
'hostname': 'str',
4445
'hpc_cluster_id': 'str',
4546
'image_id': 'str',
4647
'instance_charge_type': 'str',
4748
'instance_name': 'str',
4849
'instance_type': 'str',
4950
'instance_type_id': 'str',
51+
'keep_image_credential': 'bool',
5052
'key_pair_name': 'str',
5153
'min_count': 'int',
5254
'network_interfaces': 'list[NetworkInterfaceForRunInstancesInput]',
@@ -55,6 +57,7 @@ class RunInstancesRequest(object):
5557
'period_unit': 'str',
5658
'project_name': 'str',
5759
'security_enhancement_strategy': 'str',
60+
'spot_strategy': 'str',
5861
'suffix_index': 'int',
5962
'tags': 'list[TagForRunInstancesInput]',
6063
'unique_suffix': 'bool',
@@ -72,12 +75,14 @@ class RunInstancesRequest(object):
7275
'description': 'Description',
7376
'dry_run': 'DryRun',
7477
'host_name': 'HostName',
78+
'hostname': 'Hostname',
7579
'hpc_cluster_id': 'HpcClusterId',
7680
'image_id': 'ImageId',
7781
'instance_charge_type': 'InstanceChargeType',
7882
'instance_name': 'InstanceName',
7983
'instance_type': 'InstanceType',
8084
'instance_type_id': 'InstanceTypeId',
85+
'keep_image_credential': 'KeepImageCredential',
8186
'key_pair_name': 'KeyPairName',
8287
'min_count': 'MinCount',
8388
'network_interfaces': 'NetworkInterfaces',
@@ -86,6 +91,7 @@ class RunInstancesRequest(object):
8691
'period_unit': 'PeriodUnit',
8792
'project_name': 'ProjectName',
8893
'security_enhancement_strategy': 'SecurityEnhancementStrategy',
94+
'spot_strategy': 'SpotStrategy',
8995
'suffix_index': 'SuffixIndex',
9096
'tags': 'Tags',
9197
'unique_suffix': 'UniqueSuffix',
@@ -94,7 +100,7 @@ class RunInstancesRequest(object):
94100
'zone_id': 'ZoneId'
95101
}
96102

97-
def __init__(self, auto_renew=None, auto_renew_period=None, client_token=None, count=None, credit_specification=None, description=None, dry_run=None, host_name=None, hpc_cluster_id=None, image_id=None, instance_charge_type=None, instance_name=None, instance_type=None, instance_type_id=None, key_pair_name=None, min_count=None, network_interfaces=None, password=None, period=None, period_unit=None, project_name=None, security_enhancement_strategy=None, suffix_index=None, tags=None, unique_suffix=None, user_data=None, volumes=None, zone_id=None, _configuration=None): # noqa: E501
103+
def __init__(self, auto_renew=None, auto_renew_period=None, client_token=None, count=None, credit_specification=None, description=None, dry_run=None, host_name=None, hostname=None, hpc_cluster_id=None, image_id=None, instance_charge_type=None, instance_name=None, instance_type=None, instance_type_id=None, keep_image_credential=None, key_pair_name=None, min_count=None, network_interfaces=None, password=None, period=None, period_unit=None, project_name=None, security_enhancement_strategy=None, spot_strategy=None, suffix_index=None, tags=None, unique_suffix=None, user_data=None, volumes=None, zone_id=None, _configuration=None): # noqa: E501
98104
"""RunInstancesRequest - a model defined in Swagger""" # noqa: E501
99105
if _configuration is None:
100106
_configuration = Configuration()
@@ -108,12 +114,14 @@ def __init__(self, auto_renew=None, auto_renew_period=None, client_token=None, c
108114
self._description = None
109115
self._dry_run = None
110116
self._host_name = None
117+
self._hostname = None
111118
self._hpc_cluster_id = None
112119
self._image_id = None
113120
self._instance_charge_type = None
114121
self._instance_name = None
115122
self._instance_type = None
116123
self._instance_type_id = None
124+
self._keep_image_credential = None
117125
self._key_pair_name = None
118126
self._min_count = None
119127
self._network_interfaces = None
@@ -122,6 +130,7 @@ def __init__(self, auto_renew=None, auto_renew_period=None, client_token=None, c
122130
self._period_unit = None
123131
self._project_name = None
124132
self._security_enhancement_strategy = None
133+
self._spot_strategy = None
125134
self._suffix_index = None
126135
self._tags = None
127136
self._unique_suffix = None
@@ -146,6 +155,8 @@ def __init__(self, auto_renew=None, auto_renew_period=None, client_token=None, c
146155
self.dry_run = dry_run
147156
if host_name is not None:
148157
self.host_name = host_name
158+
if hostname is not None:
159+
self.hostname = hostname
149160
if hpc_cluster_id is not None:
150161
self.hpc_cluster_id = hpc_cluster_id
151162
if image_id is not None:
@@ -158,6 +169,8 @@ def __init__(self, auto_renew=None, auto_renew_period=None, client_token=None, c
158169
self.instance_type = instance_type
159170
if instance_type_id is not None:
160171
self.instance_type_id = instance_type_id
172+
if keep_image_credential is not None:
173+
self.keep_image_credential = keep_image_credential
161174
if key_pair_name is not None:
162175
self.key_pair_name = key_pair_name
163176
if min_count is not None:
@@ -174,6 +187,8 @@ def __init__(self, auto_renew=None, auto_renew_period=None, client_token=None, c
174187
self.project_name = project_name
175188
if security_enhancement_strategy is not None:
176189
self.security_enhancement_strategy = security_enhancement_strategy
190+
if spot_strategy is not None:
191+
self.spot_strategy = spot_strategy
177192
if suffix_index is not None:
178193
self.suffix_index = suffix_index
179194
if tags is not None:
@@ -355,6 +370,27 @@ def host_name(self, host_name):
355370

356371
self._host_name = host_name
357372

373+
@property
374+
def hostname(self):
375+
"""Gets the hostname of this RunInstancesRequest. # noqa: E501
376+
377+
378+
:return: The hostname of this RunInstancesRequest. # noqa: E501
379+
:rtype: str
380+
"""
381+
return self._hostname
382+
383+
@hostname.setter
384+
def hostname(self, hostname):
385+
"""Sets the hostname of this RunInstancesRequest.
386+
387+
388+
:param hostname: The hostname of this RunInstancesRequest. # noqa: E501
389+
:type: str
390+
"""
391+
392+
self._hostname = hostname
393+
358394
@property
359395
def hpc_cluster_id(self):
360396
"""Gets the hpc_cluster_id of this RunInstancesRequest. # noqa: E501
@@ -481,6 +517,27 @@ def instance_type_id(self, instance_type_id):
481517

482518
self._instance_type_id = instance_type_id
483519

520+
@property
521+
def keep_image_credential(self):
522+
"""Gets the keep_image_credential of this RunInstancesRequest. # noqa: E501
523+
524+
525+
:return: The keep_image_credential of this RunInstancesRequest. # noqa: E501
526+
:rtype: bool
527+
"""
528+
return self._keep_image_credential
529+
530+
@keep_image_credential.setter
531+
def keep_image_credential(self, keep_image_credential):
532+
"""Sets the keep_image_credential of this RunInstancesRequest.
533+
534+
535+
:param keep_image_credential: The keep_image_credential of this RunInstancesRequest. # noqa: E501
536+
:type: bool
537+
"""
538+
539+
self._keep_image_credential = keep_image_credential
540+
484541
@property
485542
def key_pair_name(self):
486543
"""Gets the key_pair_name of this RunInstancesRequest. # noqa: E501
@@ -649,6 +706,27 @@ def security_enhancement_strategy(self, security_enhancement_strategy):
649706

650707
self._security_enhancement_strategy = security_enhancement_strategy
651708

709+
@property
710+
def spot_strategy(self):
711+
"""Gets the spot_strategy of this RunInstancesRequest. # noqa: E501
712+
713+
714+
:return: The spot_strategy of this RunInstancesRequest. # noqa: E501
715+
:rtype: str
716+
"""
717+
return self._spot_strategy
718+
719+
@spot_strategy.setter
720+
def spot_strategy(self, spot_strategy):
721+
"""Sets the spot_strategy of this RunInstancesRequest.
722+
723+
724+
:param spot_strategy: The spot_strategy of this RunInstancesRequest. # noqa: E501
725+
:type: str
726+
"""
727+
728+
self._spot_strategy = spot_strategy
729+
652730
@property
653731
def suffix_index(self):
654732
"""Gets the suffix_index of this RunInstancesRequest. # noqa: E501

0 commit comments

Comments
 (0)