Skip to content

Commit 97f5005

Browse files
committed
Merge branch 'v2' into SPOTAUT-19631-Preferred-Instance-Type
2 parents 8a98786 + 0be2d44 commit 97f5005

File tree

7 files changed

+368
-18
lines changed

7 files changed

+368
-18
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

5+
## [3.16.1] - 2024-10-22
6+
### Added
7+
- "Delete Volume in a Stateful Instance" API support added in the AWS Elastigroup Client.
8+
- Added `DynamicIops` model for AWS Elastigroup.
9+
10+
## [3.16.0] - 2024-10-21
11+
### Added
12+
- Import EC2 instance API support added in the AWS Elastigroup Client.
13+
- Added `VolumeAttachments` and `ResourceRequirements` models for AWS Elastigroup.
14+
515
## [3.15.1] - 2024-09-19
616
### Fixed
717
- Create/Update rightsizing rule APIs fixed for optional parameters.

docs/clients/elastigroup/elastigroup_aws_client.md

Lines changed: 48 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,25 @@ __Returns__
524524

525525
`(Object)`: Elastigroup API response
526526

527+
<h2 id="spotinst_sdk2.clients.elastigroup.ElastigroupAwsClient.delete_volume_in_stateful_instance">delete_volume_in_stateful_instance</h2>
528+
529+
```python
530+
ElastigroupAwsClient.delete_volume_in_stateful_instance(
531+
group_id, stateful_instance_id, volume_id)
532+
```
533+
534+
Delete stateful instance
535+
536+
__Arguments__
537+
538+
- __group_id (String)__: Elastigroup ID
539+
- __stateful_instance_id (String)__: Stateful Instance ID
540+
- __volume_id (String)__: Volume ID
541+
542+
__Returns__
543+
544+
`(Object)`: Elastigroup API response
545+
527546
<h2 id="spotinst_sdk2.clients.elastigroup.ElastigroupAwsClient.beanstalk_maintenance_status">beanstalk_maintenance_status</h2>
528547

529548
```python
@@ -580,7 +599,8 @@ ElastigroupAwsClient.beanstalk_import(region,
580599
env_name=None)
581600
```
582601

583-
Import beanstalk attributes into JSON. Either env_id or env_name is required, both cannot be null
602+
Import beanstalk attributes into JSON. Either env_id or env_name is
603+
required, both cannot be null
584604

585605
__Arguments__
586606

@@ -608,13 +628,35 @@ __Returns__
608628

609629
`(Object)`: Elastigroup API response
610630

631+
<h2 id="spotinst_sdk2.clients.elastigroup.ElastigroupAwsClient.import_instance">import_instance</h2>
632+
633+
```python
634+
ElastigroupAwsClient.import_instance(region, instance_id,
635+
instance: ImportInstanceConfig)
636+
```
637+
638+
Import an EC2 instance into a new Elastigroup
639+
640+
__Arguments__
641+
642+
- __region (String)__: Instance Region
643+
- __instance_id (String)__: Instance ID
644+
- __instance (ImportInstanceConfig)__: Import Configuration
645+
646+
__Returns__
647+
648+
`(Object)`: Elastigroup API response
649+
611650
<h2 id="spotinst_sdk2.clients.elastigroup.ElastigroupAwsClient.import_asg">import_asg</h2>
612651

613652
```python
614-
ElastigroupAwsClient.import_asg(region, asg_name, asg, dry_run=None)
653+
ElastigroupAwsClient.import_asg(region,
654+
asg_name,
655+
asg: ASG,
656+
dry_run=None)
615657
```
616658

617-
import asg attributes as JSON
659+
Create a new Elastigroup using the configuration of an existing Autoscaling group
618660

619661
__Arguments__
620662

@@ -886,8 +928,9 @@ __Arguments__
886928
- __group_id(String)__: Elastigroup ID
887929
- __to_date (String)__: to date
888930
- __from_date (String)__: to date
889-
- __severity(String) (Optional)__: Log level severity
890-
- __resource_id(String) (Optional)__: Filter log extracted entires related to a specific resource id
931+
- __severity (String) (Optional)__: Log level severity
932+
- __resource_id (String) (Optional)__: Filter log extracted entires related to a
933+
specific resource id
891934
- __limit(String) (Optional)__: Maximum number of lines to extract in a response
892935

893936
__Returns__

docs/models/elastigroup/aws.md

Lines changed: 103 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,12 @@ __Arguments__
3535
Strategy(
3636
self,
3737
availability_vs_cost='d3043820717d74d9a17694c176d39733',
38+
consider_o_d_pricing='d3043820717d74d9a17694c176d39733',
3839
risk='d3043820717d74d9a17694c176d39733',
3940
utilize_commitments='d3043820717d74d9a17694c176d39733',
4041
utilize_reserved_instances='d3043820717d74d9a17694c176d39733',
4142
fallback_to_od='d3043820717d74d9a17694c176d39733',
43+
max_replacements_percentage='d3043820717d74d9a17694c176d39733',
4244
on_demand_count='d3043820717d74d9a17694c176d39733',
4345
draining_timeout='d3043820717d74d9a17694c176d39733',
4446
spin_up_time='d3043820717d74d9a17694c176d39733',
@@ -54,10 +56,12 @@ Strategy(
5456
__Arguments__
5557

5658
- __availability_vs_cost__: str
59+
- __consider_o_d_pricing__: bool
5760
- __risk__: int
5861
- __utilize_commitments__: bool
5962
- __utilize_reserved_instances__: bool
6063
- __fallback_to_od__: bool
64+
- __max_replacements_percentage__: int
6165
- __on_demand_count__: int
6266
- __draining_timeout__: int
6367
- __spin_up_time__: int
@@ -67,6 +71,7 @@ __Arguments__
6771
- __persistence__: Persistence
6872
- __revert_to_spot__: RevertToSpot
6973
- __restrict_single_az__: bool
74+
- __immediate_o_d_recover_threshold__: int
7075

7176
<h2 id="spotinst_sdk2.models.elastigroup.aws.Signal">Signal</h2>
7277

@@ -941,7 +946,8 @@ Compute(self,
941946
elastic_ips='d3043820717d74d9a17694c176d39733',
942947
private_ips='d3043820717d74d9a17694c176d39733',
943948
subnet_ids='d3043820717d74d9a17694c176d39733',
944-
preferred_availability_zones='d3043820717d74d9a17694c176d39733')
949+
preferred_availability_zones='d3043820717d74d9a17694c176d39733',
950+
volume_attachments='d3043820717d74d9a17694c176d39733')
945951
```
946952

947953
__Arguments__
@@ -954,6 +960,7 @@ __Arguments__
954960
- __private_ips__: list[str]
955961
- __subnet_ids__: list[str]
956962
- __preferred_availability_zones__: list[str]
963+
- __volume_attachments__: VolumeAttachments
957964

958965
<h2 id="spotinst_sdk2.models.elastigroup.aws.AvailabilityZone">AvailabilityZone</h2>
959966

@@ -981,7 +988,8 @@ InstanceTypes(self,
981988
on_demand_types='d3043820717d74d9a17694c176d39733',
982989
spot='d3043820717d74d9a17694c176d39733',
983990
weights='d3043820717d74d9a17694c176d39733',
984-
preferred_spot='d3043820717d74d9a17694c176d39733')
991+
preferred_spot='d3043820717d74d9a17694c176d39733',
992+
resource_requirements='d3043820717d74d9a17694c176d39733')
985993
```
986994

987995
__Arguments__
@@ -991,6 +999,29 @@ __Arguments__
991999
- __spot__: list[str]
9921000
- __weights__: list[Weight]
9931001
- __preferred_spot__: list[str]
1002+
- __resource_requirements__: ResourceRequirements
1003+
1004+
<h2 id="spotinst_sdk2.models.elastigroup.aws.ResourceRequirements">ResourceRequirements</h2>
1005+
1006+
```python
1007+
ResourceRequirements(
1008+
self,
1009+
excluded_instance_families='d3043820717d74d9a17694c176d39733',
1010+
excluded_instance_generations='d3043820717d74d9a17694c176d39733',
1011+
excluded_instance_types='d3043820717d74d9a17694c176d39733',
1012+
required_v_cpu='d3043820717d74d9a17694c176d39733',
1013+
required_memory='d3043820717d74d9a17694c176d39733',
1014+
required_gpu='d3043820717d74d9a17694c176d39733')
1015+
```
1016+
1017+
__Arguments__
1018+
1019+
- __excluded_instance_families__: list[str]
1020+
- __excluded_instance_generations__: list[str]
1021+
- __excluded_instance_types__: list[str]
1022+
- __required_v_cpu__: RequiredMemoryVcpuGpu
1023+
- __required_memory__: RequiredMemoryVcpuGpu
1024+
- __required_gpu__: RequiredMemoryVcpuGpu
9941025

9951026
<h2 id="spotinst_sdk2.models.elastigroup.aws.Weight">Weight</h2>
9961027

@@ -1005,6 +1036,19 @@ __Arguments__
10051036
- __instance_type__: str
10061037
- __weighted_capacity__: int
10071038

1039+
<h2 id="spotinst_sdk2.models.elastigroup.aws.RequiredMemoryVcpuGpu">RequiredMemoryVcpuGpu</h2>
1040+
1041+
```python
1042+
RequiredMemoryVcpuGpu(self,
1043+
minimum='d3043820717d74d9a17694c176d39733',
1044+
maximum='d3043820717d74d9a17694c176d39733')
1045+
```
1046+
1047+
__Arguments__
1048+
1049+
- __minimum__: int
1050+
- __maximum__: int
1051+
10081052
<h2 id="spotinst_sdk2.models.elastigroup.aws.TagSpecification">TagSpecification</h2>
10091053

10101054
```python
@@ -1177,6 +1221,7 @@ EBS(self,
11771221
volume_type='d3043820717d74d9a17694c176d39733',
11781222
kms_key_id='d3043820717d74d9a17694c176d39733',
11791223
dynamic_volume_size='d3043820717d74d9a17694c176d39733',
1224+
dynamic_iops='d3043820717d74d9a17694c176d39733',
11801225
throughput='d3043820717d74d9a17694c176d39733')
11811226
```
11821227

@@ -1190,6 +1235,7 @@ __Arguments__
11901235
- __volume_type__: str
11911236
- __kms_key_id__: str
11921237
- __dynamic_volume_size__: DynamicVolumeSize
1238+
- __dynamic_iops__: DynamicIops
11931239
- __throughput__: int
11941240

11951241
<h2 id="spotinst_sdk2.models.elastigroup.aws.DynamicVolumeSize">DynamicVolumeSize</h2>
@@ -1208,6 +1254,21 @@ __Arguments__
12081254
- __resource__: str
12091255
- __size_per_resource_unit__: int
12101256

1257+
<h2 id="spotinst_sdk2.models.elastigroup.aws.DynamicIops">DynamicIops</h2>
1258+
1259+
```python
1260+
DynamicIops(self,
1261+
base_size='d3043820717d74d9a17694c176d39733',
1262+
resource='d3043820717d74d9a17694c176d39733',
1263+
size_per_resource_unit='d3043820717d74d9a17694c176d39733')
1264+
```
1265+
1266+
__Arguments__
1267+
1268+
- __base_size__: int
1269+
- __resource__: str
1270+
- __size_per_resource_unit__: int
1271+
12111272
<h2 id="spotinst_sdk2.models.elastigroup.aws.Tag">Tag</h2>
12121273

12131274
```python
@@ -1292,6 +1353,29 @@ __Arguments__
12921353
- __http_tokens__: str
12931354
- __instance_metadata_tags__: str
12941355

1356+
<h2 id="spotinst_sdk2.models.elastigroup.aws.VolumeAttachments">VolumeAttachments</h2>
1357+
1358+
```python
1359+
VolumeAttachments(self, volumes='d3043820717d74d9a17694c176d39733')
1360+
```
1361+
1362+
__Arguments__
1363+
1364+
- __volumes__: list[Volume]
1365+
1366+
<h2 id="spotinst_sdk2.models.elastigroup.aws.Volume">Volume</h2>
1367+
1368+
```python
1369+
Volume(self,
1370+
device_name='d3043820717d74d9a17694c176d39733',
1371+
volume_id='d3043820717d74d9a17694c176d39733')
1372+
```
1373+
1374+
__Arguments__
1375+
1376+
- __device_name__: str
1377+
- __volume_id__: str
1378+
12951379
<h2 id="spotinst_sdk2.models.elastigroup.aws.Roll">Roll</h2>
12961380

12971381
```python
@@ -1392,12 +1476,28 @@ __Arguments__
13921476
ASG(self,
13931477
product='d3043820717d74d9a17694c176d39733',
13941478
spot_instance_types='d3043820717d74d9a17694c176d39733',
1395-
name='d3043820717d74d9a17694c176d39733')
1479+
name='d3043820717d74d9a17694c176d39733',
1480+
availability_vs_cost='d3043820717d74d9a17694c176d39733')
13961481
```
13971482

13981483
__Arguments__
13991484

14001485
- __product__: str
1486+
- __spot_instance_types__: List[str]
1487+
- __name__: str
1488+
- __availability_vs_cost__: str
1489+
1490+
<h2 id="spotinst_sdk2.models.elastigroup.aws.asg.ImportInstanceConfig">ImportInstanceConfig</h2>
1491+
1492+
```python
1493+
ImportInstanceConfig(
1494+
self,
1495+
spot_instance_types='d3043820717d74d9a17694c176d39733',
1496+
name='d3043820717d74d9a17694c176d39733')
1497+
```
1498+
1499+
__Arguments__
1500+
14011501
- __spot_instance_types__: List[str]
14021502
- __name__: str
14031503

0 commit comments

Comments
 (0)