Skip to content

Commit

Permalink
Merge branch 'v2' into SPOTAUT-19631-Preferred-Instance-Type
Browse files Browse the repository at this point in the history
  • Loading branch information
ramrutha497 committed Oct 24, 2024
2 parents 8a98786 + 0be2d44 commit 97f5005
Show file tree
Hide file tree
Showing 7 changed files with 368 additions and 18 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [3.16.1] - 2024-10-22
### Added
- "Delete Volume in a Stateful Instance" API support added in the AWS Elastigroup Client.
- Added `DynamicIops` model for AWS Elastigroup.

## [3.16.0] - 2024-10-21
### Added
- Import EC2 instance API support added in the AWS Elastigroup Client.
- Added `VolumeAttachments` and `ResourceRequirements` models for AWS Elastigroup.

## [3.15.1] - 2024-09-19
### Fixed
- Create/Update rightsizing rule APIs fixed for optional parameters.
Expand Down
53 changes: 48 additions & 5 deletions docs/clients/elastigroup/elastigroup_aws_client.md
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,25 @@ __Returns__

`(Object)`: Elastigroup API response

<h2 id="spotinst_sdk2.clients.elastigroup.ElastigroupAwsClient.delete_volume_in_stateful_instance">delete_volume_in_stateful_instance</h2>

```python
ElastigroupAwsClient.delete_volume_in_stateful_instance(
group_id, stateful_instance_id, volume_id)
```

Delete stateful instance

__Arguments__

- __group_id (String)__: Elastigroup ID
- __stateful_instance_id (String)__: Stateful Instance ID
- __volume_id (String)__: Volume ID

__Returns__

`(Object)`: Elastigroup API response

<h2 id="spotinst_sdk2.clients.elastigroup.ElastigroupAwsClient.beanstalk_maintenance_status">beanstalk_maintenance_status</h2>

```python
Expand Down Expand Up @@ -580,7 +599,8 @@ ElastigroupAwsClient.beanstalk_import(region,
env_name=None)
```

Import beanstalk attributes into JSON. Either env_id or env_name is required, both cannot be null
Import beanstalk attributes into JSON. Either env_id or env_name is
required, both cannot be null

__Arguments__

Expand Down Expand Up @@ -608,13 +628,35 @@ __Returns__

`(Object)`: Elastigroup API response

<h2 id="spotinst_sdk2.clients.elastigroup.ElastigroupAwsClient.import_instance">import_instance</h2>

```python
ElastigroupAwsClient.import_instance(region, instance_id,
instance: ImportInstanceConfig)
```

Import an EC2 instance into a new Elastigroup

__Arguments__

- __region (String)__: Instance Region
- __instance_id (String)__: Instance ID
- __instance (ImportInstanceConfig)__: Import Configuration

__Returns__

`(Object)`: Elastigroup API response

<h2 id="spotinst_sdk2.clients.elastigroup.ElastigroupAwsClient.import_asg">import_asg</h2>

```python
ElastigroupAwsClient.import_asg(region, asg_name, asg, dry_run=None)
ElastigroupAwsClient.import_asg(region,
asg_name,
asg: ASG,
dry_run=None)
```

import asg attributes as JSON
Create a new Elastigroup using the configuration of an existing Autoscaling group

__Arguments__

Expand Down Expand Up @@ -886,8 +928,9 @@ __Arguments__
- __group_id(String)__: Elastigroup ID
- __to_date (String)__: to date
- __from_date (String)__: to date
- __severity(String) (Optional)__: Log level severity
- __resource_id(String) (Optional)__: Filter log extracted entires related to a specific resource id
- __severity (String) (Optional)__: Log level severity
- __resource_id (String) (Optional)__: Filter log extracted entires related to a
specific resource id
- __limit(String) (Optional)__: Maximum number of lines to extract in a response

__Returns__
Expand Down
106 changes: 103 additions & 3 deletions docs/models/elastigroup/aws.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,12 @@ __Arguments__
Strategy(
self,
availability_vs_cost='d3043820717d74d9a17694c176d39733',
consider_o_d_pricing='d3043820717d74d9a17694c176d39733',
risk='d3043820717d74d9a17694c176d39733',
utilize_commitments='d3043820717d74d9a17694c176d39733',
utilize_reserved_instances='d3043820717d74d9a17694c176d39733',
fallback_to_od='d3043820717d74d9a17694c176d39733',
max_replacements_percentage='d3043820717d74d9a17694c176d39733',
on_demand_count='d3043820717d74d9a17694c176d39733',
draining_timeout='d3043820717d74d9a17694c176d39733',
spin_up_time='d3043820717d74d9a17694c176d39733',
Expand All @@ -54,10 +56,12 @@ Strategy(
__Arguments__

- __availability_vs_cost__: str
- __consider_o_d_pricing__: bool
- __risk__: int
- __utilize_commitments__: bool
- __utilize_reserved_instances__: bool
- __fallback_to_od__: bool
- __max_replacements_percentage__: int
- __on_demand_count__: int
- __draining_timeout__: int
- __spin_up_time__: int
Expand All @@ -67,6 +71,7 @@ __Arguments__
- __persistence__: Persistence
- __revert_to_spot__: RevertToSpot
- __restrict_single_az__: bool
- __immediate_o_d_recover_threshold__: int

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

Expand Down Expand Up @@ -941,7 +946,8 @@ Compute(self,
elastic_ips='d3043820717d74d9a17694c176d39733',
private_ips='d3043820717d74d9a17694c176d39733',
subnet_ids='d3043820717d74d9a17694c176d39733',
preferred_availability_zones='d3043820717d74d9a17694c176d39733')
preferred_availability_zones='d3043820717d74d9a17694c176d39733',
volume_attachments='d3043820717d74d9a17694c176d39733')
```

__Arguments__
Expand All @@ -954,6 +960,7 @@ __Arguments__
- __private_ips__: list[str]
- __subnet_ids__: list[str]
- __preferred_availability_zones__: list[str]
- __volume_attachments__: VolumeAttachments

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

Expand Down Expand Up @@ -981,7 +988,8 @@ InstanceTypes(self,
on_demand_types='d3043820717d74d9a17694c176d39733',
spot='d3043820717d74d9a17694c176d39733',
weights='d3043820717d74d9a17694c176d39733',
preferred_spot='d3043820717d74d9a17694c176d39733')
preferred_spot='d3043820717d74d9a17694c176d39733',
resource_requirements='d3043820717d74d9a17694c176d39733')
```

__Arguments__
Expand All @@ -991,6 +999,29 @@ __Arguments__
- __spot__: list[str]
- __weights__: list[Weight]
- __preferred_spot__: list[str]
- __resource_requirements__: ResourceRequirements

<h2 id="spotinst_sdk2.models.elastigroup.aws.ResourceRequirements">ResourceRequirements</h2>

```python
ResourceRequirements(
self,
excluded_instance_families='d3043820717d74d9a17694c176d39733',
excluded_instance_generations='d3043820717d74d9a17694c176d39733',
excluded_instance_types='d3043820717d74d9a17694c176d39733',
required_v_cpu='d3043820717d74d9a17694c176d39733',
required_memory='d3043820717d74d9a17694c176d39733',
required_gpu='d3043820717d74d9a17694c176d39733')
```

__Arguments__

- __excluded_instance_families__: list[str]
- __excluded_instance_generations__: list[str]
- __excluded_instance_types__: list[str]
- __required_v_cpu__: RequiredMemoryVcpuGpu
- __required_memory__: RequiredMemoryVcpuGpu
- __required_gpu__: RequiredMemoryVcpuGpu

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

Expand All @@ -1005,6 +1036,19 @@ __Arguments__
- __instance_type__: str
- __weighted_capacity__: int

<h2 id="spotinst_sdk2.models.elastigroup.aws.RequiredMemoryVcpuGpu">RequiredMemoryVcpuGpu</h2>

```python
RequiredMemoryVcpuGpu(self,
minimum='d3043820717d74d9a17694c176d39733',
maximum='d3043820717d74d9a17694c176d39733')
```

__Arguments__

- __minimum__: int
- __maximum__: int

<h2 id="spotinst_sdk2.models.elastigroup.aws.TagSpecification">TagSpecification</h2>

```python
Expand Down Expand Up @@ -1177,6 +1221,7 @@ EBS(self,
volume_type='d3043820717d74d9a17694c176d39733',
kms_key_id='d3043820717d74d9a17694c176d39733',
dynamic_volume_size='d3043820717d74d9a17694c176d39733',
dynamic_iops='d3043820717d74d9a17694c176d39733',
throughput='d3043820717d74d9a17694c176d39733')
```

Expand All @@ -1190,6 +1235,7 @@ __Arguments__
- __volume_type__: str
- __kms_key_id__: str
- __dynamic_volume_size__: DynamicVolumeSize
- __dynamic_iops__: DynamicIops
- __throughput__: int

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

<h2 id="spotinst_sdk2.models.elastigroup.aws.DynamicIops">DynamicIops</h2>

```python
DynamicIops(self,
base_size='d3043820717d74d9a17694c176d39733',
resource='d3043820717d74d9a17694c176d39733',
size_per_resource_unit='d3043820717d74d9a17694c176d39733')
```

__Arguments__

- __base_size__: int
- __resource__: str
- __size_per_resource_unit__: int

<h2 id="spotinst_sdk2.models.elastigroup.aws.Tag">Tag</h2>

```python
Expand Down Expand Up @@ -1292,6 +1353,29 @@ __Arguments__
- __http_tokens__: str
- __instance_metadata_tags__: str

<h2 id="spotinst_sdk2.models.elastigroup.aws.VolumeAttachments">VolumeAttachments</h2>

```python
VolumeAttachments(self, volumes='d3043820717d74d9a17694c176d39733')
```

__Arguments__

- __volumes__: list[Volume]

<h2 id="spotinst_sdk2.models.elastigroup.aws.Volume">Volume</h2>

```python
Volume(self,
device_name='d3043820717d74d9a17694c176d39733',
volume_id='d3043820717d74d9a17694c176d39733')
```

__Arguments__

- __device_name__: str
- __volume_id__: str

<h2 id="spotinst_sdk2.models.elastigroup.aws.Roll">Roll</h2>

```python
Expand Down Expand Up @@ -1392,12 +1476,28 @@ __Arguments__
ASG(self,
product='d3043820717d74d9a17694c176d39733',
spot_instance_types='d3043820717d74d9a17694c176d39733',
name='d3043820717d74d9a17694c176d39733')
name='d3043820717d74d9a17694c176d39733',
availability_vs_cost='d3043820717d74d9a17694c176d39733')
```

__Arguments__

- __product__: str
- __spot_instance_types__: List[str]
- __name__: str
- __availability_vs_cost__: str

<h2 id="spotinst_sdk2.models.elastigroup.aws.asg.ImportInstanceConfig">ImportInstanceConfig</h2>

```python
ImportInstanceConfig(
self,
spot_instance_types='d3043820717d74d9a17694c176d39733',
name='d3043820717d74d9a17694c176d39733')
```

__Arguments__

- __spot_instance_types__: List[str]
- __name__: str

Expand Down
Loading

0 comments on commit 97f5005

Please sign in to comment.