Skip to main content

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
  • 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

Documentation For Authorization

Authentication schemes defined for the API:

tokenAuth

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

Author

support@cloud.ionos.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ionoscloud_vm_autoscaling-2.0.0.tar.gz (45.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ionoscloud_vm_autoscaling-2.0.0-py3-none-any.whl (127.8 kB view details)

Uploaded Python 3

File details

Details for the file ionoscloud_vm_autoscaling-2.0.0.tar.gz.

File metadata

File hashes

Hashes for ionoscloud_vm_autoscaling-2.0.0.tar.gz
Algorithm Hash digest
SHA256 6a304122c7efb7609c340c56c0e15a9453f62cf700413b39e9563df6ac45d421
MD5 ba19ed7eeb7b1777805dd5024056a2f9
BLAKE2b-256 35adc190e28aa63c3bed11c8ef73a98f0deb429f5c4f29590cecbcded31e240a

See more details on using hashes here.

File details

Details for the file ionoscloud_vm_autoscaling-2.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ionoscloud_vm_autoscaling-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cc9aee650ca3262123d7d7a50d8c802d38176cf96d7b6ea5dcc7d89eaca6d3da
MD5 fb3988c91eaffb68bc6a3a29ef18cc35
BLAKE2b-256 f70e4f998cd8f05d1a932c0c36f21bca663abfc21d9cd9d520916536a78f8b75

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page