1. Packages
  2. Ionoscloud
  3. API Docs
  4. autoscaling
  5. getServers
IonosCloud v0.2.3 published on Tuesday, May 13, 2025 by ionos-cloud

ionoscloud.autoscaling.getServers

Explore with Pulumi AI

ionoscloud logo
IonosCloud v0.2.3 published on Tuesday, May 13, 2025 by ionos-cloud

    The autoscaling group servers data source can be used to search for and return existing servers that are part of a specific autoscaling group.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ionoscloud from "@pulumi/ionoscloud";
    
    const autoscalingGroupServers = ionoscloud.autoscaling.getServers({
        groupId: "autoscaling_group_uuid",
    });
    
    import pulumi
    import pulumi_ionoscloud as ionoscloud
    
    autoscaling_group_servers = ionoscloud.autoscaling.get_servers(group_id="autoscaling_group_uuid")
    
    package main
    
    import (
    	"github.com/ionos-cloud/pulumi-ionoscloud/sdk/go/ionoscloud/autoscaling"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := autoscaling.GetServers(ctx, &autoscaling.GetServersArgs{
    			GroupId: "autoscaling_group_uuid",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ionoscloud = Pulumi.Ionoscloud;
    
    return await Deployment.RunAsync(() => 
    {
        var autoscalingGroupServers = Ionoscloud.Autoscaling.GetServers.Invoke(new()
        {
            GroupId = "autoscaling_group_uuid",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ionoscloud.autoscaling.AutoscalingFunctions;
    import com.pulumi.ionoscloud.autoscaling.inputs.GetServersArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var autoscalingGroupServers = AutoscalingFunctions.getServers(GetServersArgs.builder()
                .groupId("autoscaling_group_uuid")
                .build());
    
        }
    }
    
    variables:
      autoscalingGroupServers:
        fn::invoke:
          function: ionoscloud:autoscaling:getServers
          arguments:
            groupId: autoscaling_group_uuid
    

    Using getServers

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getServers(args: GetServersArgs, opts?: InvokeOptions): Promise<GetServersResult>
    function getServersOutput(args: GetServersOutputArgs, opts?: InvokeOptions): Output<GetServersResult>
    def get_servers(group_id: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetServersResult
    def get_servers_output(group_id: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetServersResult]
    func GetServers(ctx *Context, args *GetServersArgs, opts ...InvokeOption) (*GetServersResult, error)
    func GetServersOutput(ctx *Context, args *GetServersOutputArgs, opts ...InvokeOption) GetServersResultOutput

    > Note: This function is named GetServers in the Go SDK.

    public static class GetServers 
    {
        public static Task<GetServersResult> InvokeAsync(GetServersArgs args, InvokeOptions? opts = null)
        public static Output<GetServersResult> Invoke(GetServersInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetServersResult> getServers(GetServersArgs args, InvokeOptions options)
    public static Output<GetServersResult> getServers(GetServersArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ionoscloud:autoscaling/getServers:getServers
      arguments:
        # arguments dictionary

    The following arguments are supported:

    GroupId string

    The unique ID of the autoscaling group.

    group_id must be provided. If it is not provided, the datasource will return an error.

    GroupId string

    The unique ID of the autoscaling group.

    group_id must be provided. If it is not provided, the datasource will return an error.

    groupId String

    The unique ID of the autoscaling group.

    group_id must be provided. If it is not provided, the datasource will return an error.

    groupId string

    The unique ID of the autoscaling group.

    group_id must be provided. If it is not provided, the datasource will return an error.

    group_id str

    The unique ID of the autoscaling group.

    group_id must be provided. If it is not provided, the datasource will return an error.

    groupId String

    The unique ID of the autoscaling group.

    group_id must be provided. If it is not provided, the datasource will return an error.

    getServers Result

    The following output properties are available:

    GroupId string
    Id of the autoscaling group.
    Id string
    The provider-assigned unique ID for this managed resource.
    Servers List<Ionoscloud.GetServersServer>
    List of servers.
    GroupId string
    Id of the autoscaling group.
    Id string
    The provider-assigned unique ID for this managed resource.
    Servers []GetServersServer
    List of servers.
    groupId String
    Id of the autoscaling group.
    id String
    The provider-assigned unique ID for this managed resource.
    servers List<GetServersServer>
    List of servers.
    groupId string
    Id of the autoscaling group.
    id string
    The provider-assigned unique ID for this managed resource.
    servers GetServersServer[]
    List of servers.
    group_id str
    Id of the autoscaling group.
    id str
    The provider-assigned unique ID for this managed resource.
    servers Sequence[GetServersServer]
    List of servers.
    groupId String
    Id of the autoscaling group.
    id String
    The provider-assigned unique ID for this managed resource.
    servers List<Property Map>
    List of servers.

    Supporting Types

    GetServersServer

    Id string
    The unique ID of the server.
    Id string
    The unique ID of the server.
    id String
    The unique ID of the server.
    id string
    The unique ID of the server.
    id str
    The unique ID of the server.
    id String
    The unique ID of the server.

    Package Details

    Repository
    ionoscloud ionos-cloud/pulumi-ionoscloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ionoscloud Terraform Provider.
    ionoscloud logo
    IonosCloud v0.2.3 published on Tuesday, May 13, 2025 by ionos-cloud