VM Auto Scaling API
Project description
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-beta.1
- 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ionoscloud_vm_autoscaling-2.0.0b1.tar.gz.
File metadata
- Download URL: ionoscloud_vm_autoscaling-2.0.0b1.tar.gz
- Upload date:
- Size: 45.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53ae59fc5d7554c3affe542a2072a5146f46740cc5aeb269a88cf2ca6b451331
|
|
| MD5 |
e069582aad82e85eb5882c06284722fb
|
|
| BLAKE2b-256 |
283ae0289b33b1371cde9065bbeb796961aaa24a4494b82e9159e2fde4eb4e4d
|
File details
Details for the file ionoscloud_vm_autoscaling-2.0.0b1-py3-none-any.whl.
File metadata
- Download URL: ionoscloud_vm_autoscaling-2.0.0b1-py3-none-any.whl
- Upload date:
- Size: 127.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42b1359eda70185cd9025fcf14db6c012e9d62f24ca225084ed16309b1dbe841
|
|
| MD5 |
74beb129f0ac154eec97829997aa161d
|
|
| BLAKE2b-256 |
991135504b5d14c649d8b2b91377efa8b2aae841501d2bb648af8af5a32161be
|