packagemainimport("context""fmt""os"vmautoscaling"github.com/ionos-cloud/sdk-go-bundle/products/vmautoscaling""github.com/ionos-cloud/sdk-go-bundle/shared")funcmain(){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()iferr!=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`: Actionfmt.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.
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.
[default to 0]
orderBy
string
Use this parameter to specify by which the returned list should be sorted. Valid values are: ``createdDate`` and ``lastModifiedDate``.
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
Get an Auto Scaling by ID
Example
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.
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.
[default to 0]
orderBy
string
Use this parameter to specify by which the returned list should be sorted. Valid values are: ``createdDate`` and ``lastModifiedDate``.
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.
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.
[default to 0]
orderBy
string
Use this parameter to specify by which the returned list should be sorted. Valid values are: ``createdDate`` and ``lastModifiedDate``.
var result ActionCollection = GroupsActionsGet(ctx, groupId)
.Depth(depth)
.OrderBy(orderBy)
.Execute()
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)
}
var result = GroupsDelete(ctx, groupId)
.Execute()
var result Group = GroupsFindById(ctx, groupId)
.Depth(depth)
.Execute()
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)
}
var result GroupCollection = GroupsGet(ctx)
.Depth(depth)
.OrderBy(orderBy)
.Execute()
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)
}
var result GroupPostResponse = GroupsPost(ctx)
.GroupPost(groupPost)
.Execute()
var result Server = GroupsServersFindById(ctx, groupId, serverId)
.Depth(depth)
.Execute()
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)
}
var result ServerCollection = GroupsServersGet(ctx, groupId)
.Depth(depth)
.OrderBy(orderBy)
.Execute()
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)
}