AutoScalingGroupsApi
All URIs are relative to https://api.ionos.com/autoscaling
GroupsActionsFindById
var result Action = GroupsActionsFindById(ctx, actionId, groupId)
.Depth(depth)
.Execute()Get Scaling Action Details by ID
Example
package main
import (
"context"
"fmt"
"os"
vmautoscaling "github.com/ionos-cloud/sdk-go-bundle/products/vmautoscaling"
"github.com/ionos-cloud/sdk-go-bundle/shared"
)
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) (default to 0)
configuration := shared.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL")
apiClient := vmautoscaling.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
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
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.
[default to 0]
Return type
HTTP request headers
Content-Type: Not defined
Accept: application/json
GroupsActionsGet
var result ActionCollection = GroupsActionsGet(ctx, groupId)
.Depth(depth)
.OrderBy(orderBy)
.Execute()Get Scaling Actions
Example
package main
import (
"context"
"fmt"
"os"
vmautoscaling "github.com/ionos-cloud/sdk-go-bundle/products/vmautoscaling"
"github.com/ionos-cloud/sdk-go-bundle/shared"
)
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) (default to 0)
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 := shared.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL")
apiClient := vmautoscaling.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
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
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.
[default to 0]
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
HTTP request headers
Content-Type: Not defined
Accept: application/json
GroupsDelete
var result = GroupsDelete(ctx, groupId)
.Execute()Delete a VM Auto Scaling Group by ID
Example
package main
import (
"context"
"fmt"
"os"
vmautoscaling "github.com/ionos-cloud/sdk-go-bundle/products/vmautoscaling"
"github.com/ionos-cloud/sdk-go-bundle/shared"
)
func main() {
groupId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
configuration := shared.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL")
apiClient := vmautoscaling.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
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
Name
Type
Description
Notes
Return type
(empty response body)
HTTP request headers
Content-Type: Not defined
Accept: application/json
GroupsFindById
var result Group = GroupsFindById(ctx, groupId)
.Depth(depth)
.Execute()Get an Auto Scaling by ID
Example
package main
import (
"context"
"fmt"
"os"
vmautoscaling "github.com/ionos-cloud/sdk-go-bundle/products/vmautoscaling"
"github.com/ionos-cloud/sdk-go-bundle/shared"
)
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) (default to 0)
configuration := shared.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL")
apiClient := vmautoscaling.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
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
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.
[default to 0]
Return type
HTTP request headers
Content-Type: Not defined
Accept: application/json
GroupsGet
var result GroupCollection = GroupsGet(ctx)
.Depth(depth)
.OrderBy(orderBy)
.Execute()Get VM Auto Scaling Groups
Example
package main
import (
"context"
"fmt"
"os"
vmautoscaling "github.com/ionos-cloud/sdk-go-bundle/products/vmautoscaling"
"github.com/ionos-cloud/sdk-go-bundle/shared"
)
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) (default to 0)
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 := shared.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL")
apiClient := vmautoscaling.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
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.
[default to 0]
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
HTTP request headers
Content-Type: Not defined
Accept: application/json
GroupsPost
var result GroupPostResponse = GroupsPost(ctx)
.GroupPost(groupPost)
.Execute()Create a VM Auto Scaling Group
Example
package main
import (
"context"
"fmt"
"os"
vmautoscaling "github.com/ionos-cloud/sdk-go-bundle/products/vmautoscaling"
"github.com/ionos-cloud/sdk-go-bundle/shared"
)
func main() {
groupPost := *openapiclient.NewGroupPost("1d67ca27-d4c0-419d-9a64-9ea42dfdd036", *openapiclient.NewGroupProperties(*openapiclient.NewGroupPropertiesDatacenter("09043280-aafc-49f7-a048-d61673f52024"), "de/txl")) // GroupPost |
configuration := shared.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL")
apiClient := vmautoscaling.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
Return type
HTTP request headers
Content-Type: application/json
Accept: application/json
GroupsPut
var result Group = GroupsPut(ctx, groupId)
.GroupPut(groupPut)
.Execute()Update a VM Auto Scaling Group by ID
Example
package main
import (
"context"
"fmt"
"os"
vmautoscaling "github.com/ionos-cloud/sdk-go-bundle/products/vmautoscaling"
"github.com/ionos-cloud/sdk-go-bundle/shared"
)
func main() {
groupId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
groupPut := *openapiclient.NewGroupPut(*openapiclient.NewGroupPutProperties(*openapiclient.NewGroupPutPropertiesDatacenter("09043280-aafc-49f7-a048-d61673f52024"), "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 := shared.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL")
apiClient := vmautoscaling.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
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
Return type
HTTP request headers
Content-Type: application/json
Accept: application/json
GroupsServersFindById
var result Server = GroupsServersFindById(ctx, groupId, serverId)
.Depth(depth)
.Execute()Get VM Auto Scaling Group Server by ID
Example
package main
import (
"context"
"fmt"
"os"
vmautoscaling "github.com/ionos-cloud/sdk-go-bundle/products/vmautoscaling"
"github.com/ionos-cloud/sdk-go-bundle/shared"
)
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) (default to 0)
configuration := shared.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL")
apiClient := vmautoscaling.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
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
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.
[default to 0]
Return type
HTTP request headers
Content-Type: Not defined
Accept: application/json
GroupsServersGet
var result ServerCollection = GroupsServersGet(ctx, groupId)
.Depth(depth)
.OrderBy(orderBy)
.Execute()Get VM Auto Scaling Group Servers
Example
package main
import (
"context"
"fmt"
"os"
vmautoscaling "github.com/ionos-cloud/sdk-go-bundle/products/vmautoscaling"
"github.com/ionos-cloud/sdk-go-bundle/shared"
)
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) (default to 0)
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 := shared.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL")
apiClient := vmautoscaling.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
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
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.
[default to 0]
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
HTTP request headers
Content-Type: Not defined
Accept: application/json
Last updated
