# AutoScalingGroupsApi

## AutoScalingGroupsApi

All URIs are relative to *<https://api.ionos.com/autoscaling>*

| Method                                                          | HTTP request                                 | Description                            |
| --------------------------------------------------------------- | -------------------------------------------- | -------------------------------------- |
| [**groups\_actions\_find\_by\_id**](#groups_actions_find_by_id) | **GET** /groups/{groupId}/actions/{actionId} | Get Scaling Action Details by ID       |
| [**groups\_actions\_get**](#groups_actions_get)                 | **GET** /groups/{groupId}/actions            | Get Scaling Actions                    |
| [**groups\_delete**](#groups_delete)                            | **DELETE** /groups/{groupId}                 | Delete a VM Auto Scaling Group by ID   |
| [**groups\_find\_by\_id**](#groups_find_by_id)                  | **GET** /groups/{groupId}                    | Get an Auto Scaling by ID              |
| [**groups\_get**](#groups_get)                                  | **GET** /groups                              | Get VM Auto Scaling Groups             |
| [**groups\_post**](#groups_post)                                | **POST** /groups                             | Create a VM Auto Scaling Group         |
| [**groups\_put**](#groups_put)                                  | **PUT** /groups/{groupId}                    | Update a VM Auto Scaling Group by ID   |
| [**groups\_servers\_find\_by\_id**](#groups_servers_find_by_id) | **GET** /groups/{groupId}/servers/{serverId} | Get VM Auto Scaling Group Server by ID |
| [**groups\_servers\_get**](#groups_servers_get)                 | **GET** /groups/{groupId}/servers            | Get VM Auto Scaling Group Servers      |

## **groups\_actions\_find\_by\_id**

> Action groups\_actions\_find\_by\_id(action\_id, group\_id, depth=depth)

Get Scaling Action Details by ID

Retrieves the details of a scaling action specified by its ID. This operation returns metadata, properties, and the current status, for the specified scaling action

#### Example

#### Parameters

| Name           | Type      | Description                                                                                                                                                                                                                                                                                                                                                                                                                                    | Notes       |
| -------------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
| **action\_id** | **str**   |                                                                                                                                                                                                                                                                                                                                                                                                                                                |             |
| **group\_id**  | **str**   |                                                                                                                                                                                                                                                                                                                                                                                                                                                |             |
| **depth**      | **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] |

#### Return type

[**Action**](https://docs.ionos.com/sections-test/python-sdk/vm-autoscaling-python-sdk/models/action)

#### Authorization

tokenAuth

#### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

## **groups\_actions\_get**

> ActionCollection groups\_actions\_get(group\_id, depth=depth, order\_by=order\_by)

Get Scaling Actions

Retrieves the list of the last Auto Scaling actions or jobs performed by the VM Auto Scaling.The actions are specified by its ID. Only the last 10 actions are available

#### Example

#### Parameters

| Name          | Type      | Description                                                                                                                                                                                                                                                                                                                                                                                                                                    | Notes                                   |
| ------------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- |
| **group\_id** | **str**   |                                                                                                                                                                                                                                                                                                                                                                                                                                                |                                         |
| **depth**     | **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]                             |
| **order\_by** | **str**   | Use this parameter to specify by which the returned list should be sorted. Valid values are: \`\`createdDate\`\` and \`\`lastModifiedDate\`\`.                                                                                                                                                                                                                                                                                                 | \[optional] \[default to 'createdDate'] |

#### Return type

[**ActionCollection**](https://docs.ionos.com/sections-test/python-sdk/vm-autoscaling-python-sdk/models/actioncollection)

#### Authorization

tokenAuth

#### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

## **groups\_delete**

> groups\_delete(group\_id)

Delete a VM Auto Scaling Group by ID

Deletes the VM Auto Scaling Group specified by its ID. >Deleting the associated servers and disks is currently not implemented.

#### Example

#### Parameters

| Name          | Type    | Description | Notes |
| ------------- | ------- | ----------- | ----- |
| **group\_id** | **str** |             |       |

#### Return type

void (empty response body)

#### Authorization

tokenAuth

#### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

## **groups\_find\_by\_id**

> Group groups\_find\_by\_id(group\_id, depth=depth)

Get an Auto Scaling by ID

Retrieves the VM Auto Scaling Group specified by its ID including the details.

#### Example

#### Parameters

| Name          | Type      | Description                                                                                                                                                                                                                                                                                                                                                                                                                                    | Notes       |
| ------------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
| **group\_id** | **str**   |                                                                                                                                                                                                                                                                                                                                                                                                                                                |             |
| **depth**     | **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] |

#### Return type

[**Group**](https://docs.ionos.com/sections-test/python-sdk/vm-autoscaling-python-sdk/models/group)

#### Authorization

tokenAuth

#### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

## **groups\_get**

> GroupCollection groups\_get(depth=depth, order\_by=order\_by)

Get VM Auto Scaling Groups

Lists all VM Auto Scaling Groups of your account.

#### Example

#### Parameters

| Name          | Type      | Description                                                                                                                                                                                                                                                                                                                                                                                                                                    | Notes                                   |
| ------------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- |
| **depth**     | **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]                             |
| **order\_by** | **str**   | Use this parameter to specify by which the returned list should be sorted. Valid values are: \`\`createdDate\`\` and \`\`lastModifiedDate\`\`.                                                                                                                                                                                                                                                                                                 | \[optional] \[default to 'createdDate'] |

#### Return type

[**GroupCollection**](https://docs.ionos.com/sections-test/python-sdk/vm-autoscaling-python-sdk/models/groupcollection)

#### Authorization

tokenAuth

#### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

## **groups\_post**

> GroupPostResponse groups\_post(group\_post)

Create a VM Auto Scaling Group

Creates a VM Auto Scaling Group. > Note that creating a group triggers the creation of two monitoring alarms for 'Scale-In' and 'Scale-Out' operations according to the 'Policy' settings.

#### Example

#### Parameters

| Name            | Type                                                                                                        | Description | Notes |
| --------------- | ----------------------------------------------------------------------------------------------------------- | ----------- | ----- |
| **group\_post** | [**GroupPost**](https://docs.ionos.com/sections-test/python-sdk/vm-autoscaling-python-sdk/models/grouppost) |             |       |

#### Return type

[**GroupPostResponse**](https://docs.ionos.com/sections-test/python-sdk/vm-autoscaling-python-sdk/models/grouppostresponse)

#### Authorization

tokenAuth

#### HTTP request headers

* **Content-Type**: application/json
* **Accept**: application/json

## **groups\_put**

> Group groups\_put(group\_id, group\_put)

Update a VM Auto Scaling Group by ID

Updates the VM Auto Scaling Group specified by its ID. The IDs assigned by the system when the resource is created, such as 'properties.datacenter.id' and 'backupunitId', are immutable and cannot be updated.

#### Example

#### Parameters

| Name           | Type                                                                                                      | Description | Notes |
| -------------- | --------------------------------------------------------------------------------------------------------- | ----------- | ----- |
| **group\_id**  | **str**                                                                                                   |             |       |
| **group\_put** | [**GroupPut**](https://docs.ionos.com/sections-test/python-sdk/vm-autoscaling-python-sdk/models/groupput) |             |       |

#### Return type

[**Group**](https://docs.ionos.com/sections-test/python-sdk/vm-autoscaling-python-sdk/models/group)

#### Authorization

tokenAuth

#### HTTP request headers

* **Content-Type**: application/json
* **Accept**: application/json

## **groups\_servers\_find\_by\_id**

> Server groups\_servers\_find\_by\_id(group\_id, server\_id, depth=depth)

Get VM Auto Scaling Group Server by ID

Retrieves the properties of the server specified by its ID. >Note that the server IDs of the VM Auto Scaling Groups are different from and do not match the VM server IDs in the data center.

#### Example

#### Parameters

| Name           | Type      | Description                                                                                                                                                                                                                                                                                                                                                                                                                                    | Notes       |
| -------------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
| **group\_id**  | **str**   |                                                                                                                                                                                                                                                                                                                                                                                                                                                |             |
| **server\_id** | **str**   |                                                                                                                                                                                                                                                                                                                                                                                                                                                |             |
| **depth**      | **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] |

#### Return type

[**Server**](https://docs.ionos.com/sections-test/python-sdk/vm-autoscaling-python-sdk/models/server)

#### Authorization

tokenAuth

#### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

## **groups\_servers\_get**

> ServerCollection groups\_servers\_get(group\_id, depth=depth, order\_by=order\_by)

Get VM Auto Scaling Group Servers

Retrieves all servers associated with the VM Auto Scaling Group specified by its ID. >Note that the server IDs of the VM Auto Scaling Groups are different from and do not match the VM server IDs in the data center.

#### Example

#### Parameters

| Name          | Type      | Description                                                                                                                                                                                                                                                                                                                                                                                                                                    | Notes                                   |
| ------------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- |
| **group\_id** | **str**   |                                                                                                                                                                                                                                                                                                                                                                                                                                                |                                         |
| **depth**     | **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]                             |
| **order\_by** | **str**   | Use this parameter to specify by which the returned list should be sorted. Valid values are: \`\`createdDate\`\` and \`\`lastModifiedDate\`\`.                                                                                                                                                                                                                                                                                                 | \[optional] \[default to 'createdDate'] |

#### Return type

[**ServerCollection**](https://docs.ionos.com/sections-test/python-sdk/vm-autoscaling-python-sdk/models/servercollection)

#### Authorization

tokenAuth

#### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json
