ionoscloud-vm-autoscaling
The VM Auto Scaling Service enables IONOS clients to horizontally scale the number of VM replicas based on configured rules. You can use VM Auto Scaling to ensure that you have a sufficient number of replicas to handle your application loads at all times.
For this purpose, create a VM Auto Scaling Group that contains the server replicas. The VM Auto Scaling Service ensures that the number of replicas in the group is always within the defined limits.
When scaling policies are set, VM Auto Scaling creates or deletes replicas according to the requirements of your applications. For each policy, specified 'scale-in' and 'scale-out' actions are performed when the corresponding thresholds are reached.
This Python package is automatically generated by the OpenAPI Generator project:
- API version: 1.0.0
- Package version: 2.0.0
- Generator version: 7.13.0-SNAPSHOT
- Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit https://docs.ionos.com/faq/contact
Requirements.
Python 3.9+
Installation & Usage
pip install
If the python package is hosted on a repository, you can install directly using:
pip install git+https://github.com/ionos-cloud/sdk-python.git
(you may need to run pip with root permission: sudo pip install git+https://github.com/ionos-cloud/sdk-python.git)
Then import the package:
import ionoscloud_vm_autoscaling
Setuptools
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install to install the package for all users)
Then import the package:
import ionoscloud_vm_autoscaling
Tests
Execute pytest to run the tests.
Getting Started
Please follow the installation procedure and then run the following:
import ionoscloud_vm_autoscaling
from ionoscloud_vm_autoscaling.rest import ApiException
from pprint import pprint
import os
# Defining the host is optional and defaults to https://api.ionos.com/autoscaling
# See configuration.py for a list of all supported configuration parameters.
configuration = ionoscloud_vm_autoscaling.Configuration(
host = "https://api.ionos.com/autoscaling"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: tokenAuth
configuration.api_key['tokenAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['tokenAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with ionoscloud_vm_autoscaling.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ionoscloud_vm_autoscaling.AutoScalingGroupsApi(api_client)
action_id = 'action_id_example' # str |
group_id = 'group_id_example' # str |
depth = 0 # float | With this parameter, you control the level of detail of the response objects: - ``0``: Only direct properties are included; children (such as executions or transitions) are not considered. - ``1``: Direct properties and children references are included. - ``2``: Direct properties and children properties are included. - ``3``: Direct properties and children properties and children's children are included. - etc. (optional) (default to 0)
try:
# Get Scaling Action Details by ID
api_response = api_instance.groups_actions_find_by_id(action_id, group_id, depth=depth)
print("The response of AutoScalingGroupsApi->groups_actions_find_by_id:\n")
pprint(api_response)
except ApiException as e:
print("Exception when calling AutoScalingGroupsApi->groups_actions_find_by_id: %s\n" % e)
Documentation for API Endpoints
All URIs are relative to https://api.ionos.com/autoscaling
| Class | Method | HTTP request | Description |
|---|---|---|---|
| AutoScalingGroupsApi | groups_actions_find_by_id | GET /groups/{groupId}/actions/{actionId} | Get Scaling Action Details by ID |
| AutoScalingGroupsApi | groups_actions_get | GET /groups/{groupId}/actions | Get Scaling Actions |
| AutoScalingGroupsApi | groups_delete | DELETE /groups/{groupId} | Delete a VM Auto Scaling Group by ID |
| AutoScalingGroupsApi | groups_find_by_id | GET /groups/{groupId} | Get an Auto Scaling by ID |
| AutoScalingGroupsApi | groups_get | GET /groups | Get VM Auto Scaling Groups |
| AutoScalingGroupsApi | groups_post | POST /groups | Create a VM Auto Scaling Group |
| AutoScalingGroupsApi | groups_put | PUT /groups/{groupId} | Update a VM Auto Scaling Group by ID |
| AutoScalingGroupsApi | groups_servers_find_by_id | GET /groups/{groupId}/servers/{serverId} | Get VM Auto Scaling Group Server by ID |
| AutoScalingGroupsApi | groups_servers_get | GET /groups/{groupId}/servers | Get VM Auto Scaling Group Servers |
Documentation For Models
- Action
- ActionAmount
- ActionCollection
- ActionProperties
- ActionResource
- ActionStatus
- ActionType
- ActionsLinkResource
- AvailabilityZone
- BusType
- CpuFamily
- DatacenterServer
- Error401
- Error401Message
- Error404
- Error404Message
- ErrorAuthorize
- ErrorAuthorizeMessage
- ErrorGroupValidate
- ErrorGroupValidateMessage
- ErrorMessage
- ErrorMessageParse
- Group
- GroupCollection
- GroupEntities
- GroupPolicy
- GroupPolicyScaleInAction
- GroupPolicyScaleOutAction
- GroupPost
- GroupPostEntities
- GroupPostResponse
- GroupProperties
- GroupPropertiesDatacenter
- GroupPut
- GroupPutProperties
- GroupPutPropertiesDatacenter
- GroupResource
- Metadata
- MetadataBasic
- MetadataState
- Metric
- NicFirewallRule
- NicFlowLog
- ParseError
- QueryUnit
- ReplicaNic
- ReplicaPropertiesPost
- ReplicaVolumePost
- Server
- ServerCollection
- ServerProperties
- ServersLinkResource
- TargetGroup
- TerminationPolicyType
- VolumeHwType
Documentation For Authorization
Authentication schemes defined for the API:
tokenAuth
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header
Author
Metadata
Release files for ionoscloud-vm-autoscaling 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ionoscloud_vm_autoscaling-2.0.0.tar.gz | 45.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ionoscloud_vm_autoscaling-2.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 173.6 kB
Release files / ionoscloud_vm_autoscaling-2.0.0.tar.gz
| Download URL | ionoscloud_vm_autoscaling-2.0.0.tar.gz |
|---|---|
| Size | 45.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6a304122c7efb7609c340c56c0e15a9453f62cf700413b39e9563df6ac45d421
|
|
BLAKE2b-256 checksum How to use checksums |
35adc190e28aa63c3bed11c8ef73a98f0deb429f5c4f29590cecbcded31e240a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Release files / ionoscloud_vm_autoscaling-2.0.0-py3-none-any.whl
| Download URL | ionoscloud_vm_autoscaling-2.0.0-py3-none-any.whl |
|---|---|
| Size | 127.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cc9aee650ca3262123d7d7a50d8c802d38176cf96d7b6ea5dcc7d89eaca6d3da
|
|
BLAKE2b-256 checksum How to use checksums |
f70e4f998cd8f05d1a932c0c36f21bca663abfc21d9cd9d520916536a78f8b75
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|