> For the complete documentation index, see [llms.txt](https://docs.ionos.com/cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ionos.com/cloud/go/vm-autoscaling/api/autoscalinggroupsapi.md).

# AutoScalingGroupsApi

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

| Method                                              | HTTP request                                 | Description                            |
| --------------------------------------------------- | -------------------------------------------- | -------------------------------------- |
| [**GroupsActionsFindById**](#GroupsActionsFindById) | **Get** /groups/{groupId}/actions/{actionId} | Get Scaling Action Details by ID       |
| [**GroupsActionsGet**](#GroupsActionsGet)           | **Get** /groups/{groupId}/actions            | Get Scaling Actions                    |
| [**GroupsDelete**](#GroupsDelete)                   | **Delete** /groups/{groupId}                 | Delete a VM Auto Scaling Group by ID   |
| [**GroupsFindById**](#GroupsFindById)               | **Get** /groups/{groupId}                    | Get an Auto Scaling by ID              |
| [**GroupsGet**](#GroupsGet)                         | **Get** /groups                              | Get VM Auto Scaling Groups             |
| [**GroupsPost**](#GroupsPost)                       | **Post** /groups                             | Create a VM Auto Scaling Group         |
| [**GroupsPut**](#GroupsPut)                         | **Put** /groups/{groupId}                    | Update a VM Auto Scaling Group by ID   |
| [**GroupsServersFindById**](#GroupsServersFindById) | **Get** /groups/{groupId}/servers/{serverId} | Get VM Auto Scaling Group Server by ID |
| [**GroupsServersGet**](#GroupsServersGet)           | **Get** /groups/{groupId}/servers            | Get VM Auto Scaling Group Servers      |

## GroupsActionsFindById

```go
var result Action = GroupsActionsFindById(ctx, actionId, groupId)
                      .Depth(depth)
                      .Execute()
```

Get Scaling Action Details by ID

### Example

```go
package main

import (
    "context"
    "fmt"
    "os"

    ionoscloud "github.com/ionos-cloud/sdk-go-vm-autoscaling"
)

func main() {
    actionId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | 
    groupId := "groupId_example" // string | 
    depth := float32(8.14) // float32 | 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)

    configuration := ionoscloud.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL")
    apiClient := ionoscloud.NewAPIClient(configuration)
    resource, resp, err := apiClient.AutoScalingGroupsApi.GroupsActionsFindById(context.Background(), actionId, groupId).Depth(depth).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AutoScalingGroupsApi.GroupsActionsFindById``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp)
    }
    // response from `GroupsActionsFindById`: Action
    fmt.Fprintf(os.Stdout, "Response from `AutoScalingGroupsApi.GroupsActionsFindById`: %v\n", resource)
}
```

### Path Parameters

| Name         | Type                | Description                                                                 | Notes |
| ------------ | ------------------- | --------------------------------------------------------------------------- | ----- |
| **ctx**      | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. |       |
| **actionId** | **string**          |                                                                             |       |
| **groupId**  | **string**          |                                                                             |       |

### Other Parameters

Other parameters are passed through a pointer to an apiGroupsActionsFindByIdRequest struct via the builder pattern

| Name      | Type        | Description                                                                                                                                                                                                                                                                                                                                                                                                                                    | Notes |
| --------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- |
| **depth** | **float32** | 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. |       |

### Return type

[**Action**](/cloud/go/vm-autoscaling/models/action.md)

### HTTP request headers

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

### URLs Configuration per Operation

Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. An operation is uniquely identified by `"AutoScalingGroupsApiService.GroupsActionsFindById"` string. Similar rules for overriding default operation server index and variables apply by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps.

```golang
ctx := context.WithValue(context.Background(), {packageName}.ContextOperationServerIndices, map[string]int{
    "AutoScalingGroupsApiService.GroupsActionsFindById": 2,
})
ctx = context.WithValue(context.Background(), {packageName}.ContextOperationServerVariables, map[string]map[string]string{
    "AutoScalingGroupsApiService.GroupsActionsFindById": {
    "port": "8443",
},
})
```

## GroupsActionsGet

```go
var result ActionCollection = GroupsActionsGet(ctx, groupId)
                      .Depth(depth)
                      .OrderBy(orderBy)
                      .Execute()
```

Get Scaling Actions

### Example

```go
package main

import (
    "context"
    "fmt"
    "os"

    ionoscloud "github.com/ionos-cloud/sdk-go-vm-autoscaling"
)

func main() {
    groupId := "groupId_example" // string | 
    depth := float32(8.14) // float32 | 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)
    orderBy := "orderBy_example" // string | Use this parameter to specify by which the returned list should be sorted. Valid values are: ``createdDate`` and ``lastModifiedDate``. (optional) (default to "createdDate")

    configuration := ionoscloud.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL")
    apiClient := ionoscloud.NewAPIClient(configuration)
    resource, resp, err := apiClient.AutoScalingGroupsApi.GroupsActionsGet(context.Background(), groupId).Depth(depth).OrderBy(orderBy).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AutoScalingGroupsApi.GroupsActionsGet``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp)
    }
    // response from `GroupsActionsGet`: ActionCollection
    fmt.Fprintf(os.Stdout, "Response from `AutoScalingGroupsApi.GroupsActionsGet`: %v\n", resource)
}
```

### Path Parameters

| Name        | Type                | Description                                                                 | Notes |
| ----------- | ------------------- | --------------------------------------------------------------------------- | ----- |
| **ctx**     | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. |       |
| **groupId** | **string**          |                                                                             |       |

### Other Parameters

Other parameters are passed through a pointer to an apiGroupsActionsGetRequest struct via the builder pattern

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

### Return type

[**ActionCollection**](/cloud/go/vm-autoscaling/models/actioncollection.md)

### HTTP request headers

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

### URLs Configuration per Operation

Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. An operation is uniquely identified by `"AutoScalingGroupsApiService.GroupsActionsGet"` string. Similar rules for overriding default operation server index and variables apply by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps.

```golang
ctx := context.WithValue(context.Background(), {packageName}.ContextOperationServerIndices, map[string]int{
    "AutoScalingGroupsApiService.GroupsActionsGet": 2,
})
ctx = context.WithValue(context.Background(), {packageName}.ContextOperationServerVariables, map[string]map[string]string{
    "AutoScalingGroupsApiService.GroupsActionsGet": {
    "port": "8443",
},
})
```

## GroupsDelete

```go
var result  = GroupsDelete(ctx, groupId)
                      .Execute()
```

Delete a VM Auto Scaling Group by ID

### Example

```go
package main

import (
    "context"
    "fmt"
    "os"

    ionoscloud "github.com/ionos-cloud/sdk-go-vm-autoscaling"
)

func main() {
    groupId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | 

    configuration := ionoscloud.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL")
    apiClient := ionoscloud.NewAPIClient(configuration)
    resp, err := apiClient.AutoScalingGroupsApi.GroupsDelete(context.Background(), groupId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AutoScalingGroupsApi.GroupsDelete``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp)
    }
}
```

### Path Parameters

| Name        | Type                | Description                                                                 | Notes |
| ----------- | ------------------- | --------------------------------------------------------------------------- | ----- |
| **ctx**     | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. |       |
| **groupId** | **string**          |                                                                             |       |

### Other Parameters

Other parameters are passed through a pointer to an apiGroupsDeleteRequest struct via the builder pattern

### Return type

(empty response body)

### HTTP request headers

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

### URLs Configuration per Operation

Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. An operation is uniquely identified by `"AutoScalingGroupsApiService.GroupsDelete"` string. Similar rules for overriding default operation server index and variables apply by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps.

```golang
ctx := context.WithValue(context.Background(), {packageName}.ContextOperationServerIndices, map[string]int{
    "AutoScalingGroupsApiService.GroupsDelete": 2,
})
ctx = context.WithValue(context.Background(), {packageName}.ContextOperationServerVariables, map[string]map[string]string{
    "AutoScalingGroupsApiService.GroupsDelete": {
    "port": "8443",
},
})
```

## GroupsFindById

```go
var result Group = GroupsFindById(ctx, groupId)
                      .Depth(depth)
                      .Execute()
```

Get an Auto Scaling by ID

### Example

```go
package main

import (
    "context"
    "fmt"
    "os"

    ionoscloud "github.com/ionos-cloud/sdk-go-vm-autoscaling"
)

func main() {
    groupId := "groupId_example" // string | 
    depth := float32(8.14) // float32 | 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)

    configuration := ionoscloud.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL")
    apiClient := ionoscloud.NewAPIClient(configuration)
    resource, resp, err := apiClient.AutoScalingGroupsApi.GroupsFindById(context.Background(), groupId).Depth(depth).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AutoScalingGroupsApi.GroupsFindById``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp)
    }
    // response from `GroupsFindById`: Group
    fmt.Fprintf(os.Stdout, "Response from `AutoScalingGroupsApi.GroupsFindById`: %v\n", resource)
}
```

### Path Parameters

| Name        | Type                | Description                                                                 | Notes |
| ----------- | ------------------- | --------------------------------------------------------------------------- | ----- |
| **ctx**     | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. |       |
| **groupId** | **string**          |                                                                             |       |

### Other Parameters

Other parameters are passed through a pointer to an apiGroupsFindByIdRequest struct via the builder pattern

| Name      | Type        | Description                                                                                                                                                                                                                                                                                                                                                                                                                                    | Notes |
| --------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- |
| **depth** | **float32** | 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. |       |

### Return type

[**Group**](/cloud/go/vm-autoscaling/models/group.md)

### HTTP request headers

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

### URLs Configuration per Operation

Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. An operation is uniquely identified by `"AutoScalingGroupsApiService.GroupsFindById"` string. Similar rules for overriding default operation server index and variables apply by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps.

```golang
ctx := context.WithValue(context.Background(), {packageName}.ContextOperationServerIndices, map[string]int{
    "AutoScalingGroupsApiService.GroupsFindById": 2,
})
ctx = context.WithValue(context.Background(), {packageName}.ContextOperationServerVariables, map[string]map[string]string{
    "AutoScalingGroupsApiService.GroupsFindById": {
    "port": "8443",
},
})
```

## GroupsGet

```go
var result GroupCollection = GroupsGet(ctx)
                      .Depth(depth)
                      .OrderBy(orderBy)
                      .Execute()
```

Get VM Auto Scaling Groups

### Example

```go
package main

import (
    "context"
    "fmt"
    "os"

    ionoscloud "github.com/ionos-cloud/sdk-go-vm-autoscaling"
)

func main() {
    depth := float32(8.14) // float32 | 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)
    orderBy := "orderBy_example" // string | Use this parameter to specify by which the returned list should be sorted. Valid values are: ``createdDate`` and ``lastModifiedDate``. (optional) (default to "createdDate")

    configuration := ionoscloud.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL")
    apiClient := ionoscloud.NewAPIClient(configuration)
    resource, resp, err := apiClient.AutoScalingGroupsApi.GroupsGet(context.Background()).Depth(depth).OrderBy(orderBy).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AutoScalingGroupsApi.GroupsGet``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp)
    }
    // response from `GroupsGet`: GroupCollection
    fmt.Fprintf(os.Stdout, "Response from `AutoScalingGroupsApi.GroupsGet`: %v\n", resource)
}
```

### Path Parameters

### Other Parameters

Other parameters are passed through a pointer to an apiGroupsGetRequest struct via the builder pattern

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

### Return type

[**GroupCollection**](/cloud/go/vm-autoscaling/models/groupcollection.md)

### HTTP request headers

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

### URLs Configuration per Operation

Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. An operation is uniquely identified by `"AutoScalingGroupsApiService.GroupsGet"` string. Similar rules for overriding default operation server index and variables apply by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps.

```golang
ctx := context.WithValue(context.Background(), {packageName}.ContextOperationServerIndices, map[string]int{
    "AutoScalingGroupsApiService.GroupsGet": 2,
})
ctx = context.WithValue(context.Background(), {packageName}.ContextOperationServerVariables, map[string]map[string]string{
    "AutoScalingGroupsApiService.GroupsGet": {
    "port": "8443",
},
})
```

## GroupsPost

```go
var result GroupPostResponse = GroupsPost(ctx)
                      .GroupPost(groupPost)
                      .Execute()
```

Create a VM Auto Scaling Group

### Example

```go
package main

import (
    "context"
    "fmt"
    "os"

    ionoscloud "github.com/ionos-cloud/sdk-go-vm-autoscaling"
)

func main() {
    groupPost := *openapiclient.NewGroupPost("1d67ca27-d4c0-419d-9a64-9ea42dfdd036", *openapiclient.NewGroupProperties("de/txl")) // GroupPost | 

    configuration := ionoscloud.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL")
    apiClient := ionoscloud.NewAPIClient(configuration)
    resource, resp, err := apiClient.AutoScalingGroupsApi.GroupsPost(context.Background()).GroupPost(groupPost).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AutoScalingGroupsApi.GroupsPost``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp)
    }
    // response from `GroupsPost`: GroupPostResponse
    fmt.Fprintf(os.Stdout, "Response from `AutoScalingGroupsApi.GroupsPost`: %v\n", resource)
}
```

### Path Parameters

### Other Parameters

Other parameters are passed through a pointer to an apiGroupsPostRequest struct via the builder pattern

| Name          | Type                                                          | Description | Notes |
| ------------- | ------------------------------------------------------------- | ----------- | ----- |
| **groupPost** | [**GroupPost**](/cloud/go/vm-autoscaling/models/grouppost.md) |             |       |

### Return type

[**GroupPostResponse**](/cloud/go/vm-autoscaling/models/grouppostresponse.md)

### HTTP request headers

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

### URLs Configuration per Operation

Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. An operation is uniquely identified by `"AutoScalingGroupsApiService.GroupsPost"` string. Similar rules for overriding default operation server index and variables apply by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps.

```golang
ctx := context.WithValue(context.Background(), {packageName}.ContextOperationServerIndices, map[string]int{
    "AutoScalingGroupsApiService.GroupsPost": 2,
})
ctx = context.WithValue(context.Background(), {packageName}.ContextOperationServerVariables, map[string]map[string]string{
    "AutoScalingGroupsApiService.GroupsPost": {
    "port": "8443",
},
})
```

## GroupsPut

```go
var result Group = GroupsPut(ctx, groupId)
                      .GroupPut(groupPut)
                      .Execute()
```

Update a VM Auto Scaling Group by ID

### Example

```go
package main

import (
    "context"
    "fmt"
    "os"

    ionoscloud "github.com/ionos-cloud/sdk-go-vm-autoscaling"
)

func main() {
    groupId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | 
    groupPut := *openapiclient.NewGroupPut(*openapiclient.NewGroupPutProperties("de/txl", int64(10), int64(1), "VM Auto Scaling Group 1", *openapiclient.NewGroupPolicy(openapiclient.Metric("INSTANCE_CPU_UTILIZATION_AVERAGE"), *openapiclient.NewGroupPolicyScaleInAction(float32(1), openapiclient.ActionAmount("ABSOLUTE"), true), float32(33), *openapiclient.NewGroupPolicyScaleOutAction(float32(1), openapiclient.ActionAmount("ABSOLUTE")), float32(77), openapiclient.QueryUnit("PER_HOUR")), *openapiclient.NewReplicaPropertiesPost(int32(2), int32(2048)))) // GroupPut | 

    configuration := ionoscloud.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL")
    apiClient := ionoscloud.NewAPIClient(configuration)
    resource, resp, err := apiClient.AutoScalingGroupsApi.GroupsPut(context.Background(), groupId).GroupPut(groupPut).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AutoScalingGroupsApi.GroupsPut``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp)
    }
    // response from `GroupsPut`: Group
    fmt.Fprintf(os.Stdout, "Response from `AutoScalingGroupsApi.GroupsPut`: %v\n", resource)
}
```

### Path Parameters

| Name        | Type                | Description                                                                 | Notes |
| ----------- | ------------------- | --------------------------------------------------------------------------- | ----- |
| **ctx**     | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. |       |
| **groupId** | **string**          |                                                                             |       |

### Other Parameters

Other parameters are passed through a pointer to an apiGroupsPutRequest struct via the builder pattern

| Name         | Type                                                        | Description | Notes |
| ------------ | ----------------------------------------------------------- | ----------- | ----- |
| **groupPut** | [**GroupPut**](/cloud/go/vm-autoscaling/models/groupput.md) |             |       |

### Return type

[**Group**](/cloud/go/vm-autoscaling/models/group.md)

### HTTP request headers

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

### URLs Configuration per Operation

Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. An operation is uniquely identified by `"AutoScalingGroupsApiService.GroupsPut"` string. Similar rules for overriding default operation server index and variables apply by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps.

```golang
ctx := context.WithValue(context.Background(), {packageName}.ContextOperationServerIndices, map[string]int{
    "AutoScalingGroupsApiService.GroupsPut": 2,
})
ctx = context.WithValue(context.Background(), {packageName}.ContextOperationServerVariables, map[string]map[string]string{
    "AutoScalingGroupsApiService.GroupsPut": {
    "port": "8443",
},
})
```

## GroupsServersFindById

```go
var result Server = GroupsServersFindById(ctx, groupId, serverId)
                      .Depth(depth)
                      .Execute()
```

Get VM Auto Scaling Group Server by ID

### Example

```go
package main

import (
    "context"
    "fmt"
    "os"

    ionoscloud "github.com/ionos-cloud/sdk-go-vm-autoscaling"
)

func main() {
    groupId := "groupId_example" // string | 
    serverId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | 
    depth := float32(8.14) // float32 | 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)

    configuration := ionoscloud.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL")
    apiClient := ionoscloud.NewAPIClient(configuration)
    resource, resp, err := apiClient.AutoScalingGroupsApi.GroupsServersFindById(context.Background(), groupId, serverId).Depth(depth).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AutoScalingGroupsApi.GroupsServersFindById``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp)
    }
    // response from `GroupsServersFindById`: Server
    fmt.Fprintf(os.Stdout, "Response from `AutoScalingGroupsApi.GroupsServersFindById`: %v\n", resource)
}
```

### Path Parameters

| Name         | Type                | Description                                                                 | Notes |
| ------------ | ------------------- | --------------------------------------------------------------------------- | ----- |
| **ctx**      | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. |       |
| **groupId**  | **string**          |                                                                             |       |
| **serverId** | **string**          |                                                                             |       |

### Other Parameters

Other parameters are passed through a pointer to an apiGroupsServersFindByIdRequest struct via the builder pattern

| Name      | Type        | Description                                                                                                                                                                                                                                                                                                                                                                                                                                    | Notes |
| --------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- |
| **depth** | **float32** | 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. |       |

### Return type

[**Server**](/cloud/go/vm-autoscaling/models/server.md)

### HTTP request headers

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

### URLs Configuration per Operation

Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. An operation is uniquely identified by `"AutoScalingGroupsApiService.GroupsServersFindById"` string. Similar rules for overriding default operation server index and variables apply by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps.

```golang
ctx := context.WithValue(context.Background(), {packageName}.ContextOperationServerIndices, map[string]int{
    "AutoScalingGroupsApiService.GroupsServersFindById": 2,
})
ctx = context.WithValue(context.Background(), {packageName}.ContextOperationServerVariables, map[string]map[string]string{
    "AutoScalingGroupsApiService.GroupsServersFindById": {
    "port": "8443",
},
})
```

## GroupsServersGet

```go
var result ServerCollection = GroupsServersGet(ctx, groupId)
                      .Depth(depth)
                      .OrderBy(orderBy)
                      .Execute()
```

Get VM Auto Scaling Group Servers

### Example

```go
package main

import (
    "context"
    "fmt"
    "os"

    ionoscloud "github.com/ionos-cloud/sdk-go-vm-autoscaling"
)

func main() {
    groupId := "groupId_example" // string | 
    depth := float32(8.14) // float32 | 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)
    orderBy := "orderBy_example" // string | Use this parameter to specify by which the returned list should be sorted. Valid values are: ``createdDate`` and ``lastModifiedDate``. (optional) (default to "createdDate")

    configuration := ionoscloud.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL")
    apiClient := ionoscloud.NewAPIClient(configuration)
    resource, resp, err := apiClient.AutoScalingGroupsApi.GroupsServersGet(context.Background(), groupId).Depth(depth).OrderBy(orderBy).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AutoScalingGroupsApi.GroupsServersGet``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp)
    }
    // response from `GroupsServersGet`: ServerCollection
    fmt.Fprintf(os.Stdout, "Response from `AutoScalingGroupsApi.GroupsServersGet`: %v\n", resource)
}
```

### Path Parameters

| Name        | Type                | Description                                                                 | Notes |
| ----------- | ------------------- | --------------------------------------------------------------------------- | ----- |
| **ctx**     | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. |       |
| **groupId** | **string**          |                                                                             |       |

### Other Parameters

Other parameters are passed through a pointer to an apiGroupsServersGetRequest struct via the builder pattern

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

### Return type

[**ServerCollection**](/cloud/go/vm-autoscaling/models/servercollection.md)

### HTTP request headers

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

### URLs Configuration per Operation

Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. An operation is uniquely identified by `"AutoScalingGroupsApiService.GroupsServersGet"` string. Similar rules for overriding default operation server index and variables apply by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps.

```golang
ctx := context.WithValue(context.Background(), {packageName}.ContextOperationServerIndices, map[string]int{
    "AutoScalingGroupsApiService.GroupsServersGet": 2,
})
ctx = context.WithValue(context.Background(), {packageName}.ContextOperationServerVariables, map[string]map[string]string{
    "AutoScalingGroupsApiService.GroupsServersGet": {
    "port": "8443",
},
})
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.ionos.com/cloud/go/vm-autoscaling/api/autoscalinggroupsapi.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
