From 0be2d4434090d2eaaf617454218486d882ffccfd Mon Sep 17 00:00:00 2001 From: Anurag Sharma Date: Tue, 22 Oct 2024 18:17:51 +0530 Subject: [PATCH] "DynamicIops Model support added (#186) --- CHANGELOG.md | 5 ++++ .../elastigroup/elastigroup_aws_client.md | 19 +++++++++++++++ docs/models/elastigroup/aws.md | 17 ++++++++++++++ spotinst_sdk2/clients/elastigroup/__init__.py | 23 +++++++++++++++++++ .../models/elastigroup/aws/__init__.py | 22 ++++++++++++++++++ spotinst_sdk2/version.py | 2 +- 6 files changed, 87 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c3c2a56..1c4b675 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ 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. diff --git a/docs/clients/elastigroup/elastigroup_aws_client.md b/docs/clients/elastigroup/elastigroup_aws_client.md index 33f3131..f5c5644 100644 --- a/docs/clients/elastigroup/elastigroup_aws_client.md +++ b/docs/clients/elastigroup/elastigroup_aws_client.md @@ -524,6 +524,25 @@ __Returns__ `(Object)`: Elastigroup API response +

delete_volume_in_stateful_instance

+ +```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 +

beanstalk_maintenance_status

```python diff --git a/docs/models/elastigroup/aws.md b/docs/models/elastigroup/aws.md index 8b71e06..7784a6e 100644 --- a/docs/models/elastigroup/aws.md +++ b/docs/models/elastigroup/aws.md @@ -1221,6 +1221,7 @@ EBS(self, volume_type='d3043820717d74d9a17694c176d39733', kms_key_id='d3043820717d74d9a17694c176d39733', dynamic_volume_size='d3043820717d74d9a17694c176d39733', + dynamic_iops='d3043820717d74d9a17694c176d39733', throughput='d3043820717d74d9a17694c176d39733') ``` @@ -1234,6 +1235,7 @@ __Arguments__ - __volume_type__: str - __kms_key_id__: str - __dynamic_volume_size__: DynamicVolumeSize +- __dynamic_iops__: DynamicIops - __throughput__: int

DynamicVolumeSize

@@ -1252,6 +1254,21 @@ __Arguments__ - __resource__: str - __size_per_resource_unit__: int +

DynamicIops

+ +```python +DynamicIops(self, + base_size='d3043820717d74d9a17694c176d39733', + resource='d3043820717d74d9a17694c176d39733', + size_per_resource_unit='d3043820717d74d9a17694c176d39733') +``` + +__Arguments__ + +- __base_size__: int +- __resource__: str +- __size_per_resource_unit__: int +

Tag

```python diff --git a/spotinst_sdk2/clients/elastigroup/__init__.py b/spotinst_sdk2/clients/elastigroup/__init__.py index 3439077..c5d7907 100644 --- a/spotinst_sdk2/clients/elastigroup/__init__.py +++ b/spotinst_sdk2/clients/elastigroup/__init__.py @@ -803,6 +803,28 @@ def pause_stateful_instance(self, group_id, stateful_instance_id): return formatted_response["response"] + def delete_volume_in_stateful_instance(self, 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 + """ + return self.send_delete( + url=self.__base_elastigroup_url + + "/" + + str(group_id) + + "/statefulInstance/" + + str(stateful_instance_id) + + "/volume/" + + str(volume_id), + entity_name='delete volume in stateful instance') + def beanstalk_maintenance_status(self, group_id): """ Beanstalk maintenance status @@ -1478,6 +1500,7 @@ def delete_stateful_import(self, stateful_migration_id): formatted_response = self.convert_json( content, self.camel_to_underscore) return formatted_response + # endregion diff --git a/spotinst_sdk2/models/elastigroup/aws/__init__.py b/spotinst_sdk2/models/elastigroup/aws/__init__.py index b4b0ff9..3fa4544 100755 --- a/spotinst_sdk2/models/elastigroup/aws/__init__.py +++ b/spotinst_sdk2/models/elastigroup/aws/__init__.py @@ -1447,6 +1447,7 @@ class EBS: volume_type: str kms_key_id: str dynamic_volume_size: DynamicVolumeSize + dynamic_iops: DynamicIops throughput: int """ @@ -1460,6 +1461,7 @@ def __init__( volume_type=none, kms_key_id=none, dynamic_volume_size=none, + dynamic_iops=none, throughput=none): self.delete_on_termination = delete_on_termination @@ -1470,6 +1472,7 @@ def __init__( self.volume_type = volume_type self.kms_key_id = kms_key_id self.dynamic_volume_size = dynamic_volume_size + self.dynamic_iops = dynamic_iops self.throughput = throughput @@ -1492,6 +1495,25 @@ def __init__( self.size_per_resource_unit = size_per_resource_unit +class DynamicIops: + """ + # Arguments + base_size: int + resource: str + size_per_resource_unit: int + """ + + def __init__( + self, + base_size=none, + resource=none, + size_per_resource_unit=none): + + self.base_size = base_size + self.resource = resource + self.size_per_resource_unit = size_per_resource_unit + + class Tag: """ # Arguments diff --git a/spotinst_sdk2/version.py b/spotinst_sdk2/version.py index 0c9d57a..405c30d 100644 --- a/spotinst_sdk2/version.py +++ b/spotinst_sdk2/version.py @@ -1 +1 @@ -__version__ = '3.16.0' +__version__ = '3.16.1'