1. Packages
  2. Exoscale
  3. API Docs
  4. getInstancePool
Exoscale v0.55.0 published on Monday, Jan 29, 2024 by Pulumiverse

exoscale.getInstancePool

Explore with Pulumi AI

exoscale logo
Exoscale v0.55.0 published on Monday, Jan 29, 2024 by Pulumiverse

    Fetch Exoscale Instance Pools data.

    Corresponding resource: exoscale_instance_pool.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Exoscale = Pulumi.Exoscale;
    
    return await Deployment.RunAsync(() => 
    {
        var myInstancePool = Exoscale.GetInstancePool.Invoke(new()
        {
            Zone = "ch-gva-2",
            Name = "my-instance-pool",
        });
    
        return new Dictionary<string, object?>
        {
            ["myInstancePoolId"] = myInstancePool.Apply(getInstancePoolResult => getInstancePoolResult.Id),
        };
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-exoscale/sdk/go/exoscale"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		myInstancePool, err := exoscale.LookupInstancePool(ctx, &exoscale.LookupInstancePoolArgs{
    			Zone: "ch-gva-2",
    			Name: pulumi.StringRef("my-instance-pool"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("myInstancePoolId", myInstancePool.Id)
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.exoscale.ExoscaleFunctions;
    import com.pulumi.exoscale.inputs.GetInstancePoolArgs;
    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 myInstancePool = ExoscaleFunctions.getInstancePool(GetInstancePoolArgs.builder()
                .zone("ch-gva-2")
                .name("my-instance-pool")
                .build());
    
            ctx.export("myInstancePoolId", myInstancePool.applyValue(getInstancePoolResult -> getInstancePoolResult.id()));
        }
    }
    
    import pulumi
    import pulumi_exoscale as exoscale
    
    my_instance_pool = exoscale.get_instance_pool(zone="ch-gva-2",
        name="my-instance-pool")
    pulumi.export("myInstancePoolId", my_instance_pool.id)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as exoscale from "@pulumi/exoscale";
    
    const myInstancePool = exoscale.getInstancePool({
        zone: "ch-gva-2",
        name: "my-instance-pool",
    });
    export const myInstancePoolId = myInstancePool.then(myInstancePool => myInstancePool.id);
    
    variables:
      myInstancePool:
        fn::invoke:
          Function: exoscale:getInstancePool
          Arguments:
            zone: ch-gva-2
            name: my-instance-pool
    outputs:
      myInstancePoolId: ${myInstancePool.id}
    

    Using getInstancePool

    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 getInstancePool(args: GetInstancePoolArgs, opts?: InvokeOptions): Promise<GetInstancePoolResult>
    function getInstancePoolOutput(args: GetInstancePoolOutputArgs, opts?: InvokeOptions): Output<GetInstancePoolResult>
    def get_instance_pool(id: Optional[str] = None,
                          labels: Optional[Mapping[str, str]] = None,
                          name: Optional[str] = None,
                          zone: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetInstancePoolResult
    def get_instance_pool_output(id: Optional[pulumi.Input[str]] = None,
                          labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                          name: Optional[pulumi.Input[str]] = None,
                          zone: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetInstancePoolResult]
    func LookupInstancePool(ctx *Context, args *LookupInstancePoolArgs, opts ...InvokeOption) (*LookupInstancePoolResult, error)
    func LookupInstancePoolOutput(ctx *Context, args *LookupInstancePoolOutputArgs, opts ...InvokeOption) LookupInstancePoolResultOutput

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

    public static class GetInstancePool 
    {
        public static Task<GetInstancePoolResult> InvokeAsync(GetInstancePoolArgs args, InvokeOptions? opts = null)
        public static Output<GetInstancePoolResult> Invoke(GetInstancePoolInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetInstancePoolResult> getInstancePool(GetInstancePoolArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: exoscale:index/getInstancePool:getInstancePool
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Zone string
    The Exoscale Zone name.
    Id string
    Labels Dictionary<string, string>
    A map of key/value labels.
    Name string
    Zone string
    The Exoscale Zone name.
    Id string
    Labels map[string]string
    A map of key/value labels.
    Name string
    zone String
    The Exoscale Zone name.
    id String
    labels Map<String,String>
    A map of key/value labels.
    name String
    zone string
    The Exoscale Zone name.
    id string
    labels {[key: string]: string}
    A map of key/value labels.
    name string
    zone str
    The Exoscale Zone name.
    id str
    labels Mapping[str, str]
    A map of key/value labels.
    name str
    zone String
    The Exoscale Zone name.
    id String
    labels Map<String>
    A map of key/value labels.
    name String

    getInstancePool Result

    The following output properties are available:

    AffinityGroupIds List<string>
    The list of attached exoscaleantiaffinity_group (IDs).
    DeployTargetId string
    The deploy target ID.
    Description string
    The instance pool description.
    DiskSize int
    The managed instances disk size.
    ElasticIpIds List<string>
    The list of attached exoscaleelasticip (IDs).
    InstancePrefix string
    The string used to prefix the managed instances name.
    InstanceType string
    The managed instances type.
    Instances List<Pulumiverse.Exoscale.Outputs.GetInstancePoolInstance>
    The list of managed instances. Structure is documented below.
    Ipv6 bool
    Whether IPv6 is enabled on managed instances.
    KeyPair string
    The exoscalesshkey (name) authorized on the managed instances.
    NetworkIds List<string>
    The list of attached exoscaleprivatenetwork (IDs).
    SecurityGroupIds List<string>
    The list of attached exoscalesecuritygroup (IDs).
    Size int
    The number managed instances.
    State string
    The pool state.
    TemplateId string
    The managed instances exoscale.getTemplate ID.
    UserData string
    cloud-init configuration.
    Zone string
    The Exoscale Zone name.
    Id string
    The instance pool ID to match (conflicts with name).
    Labels Dictionary<string, string>
    A map of key/value labels.
    Name string
    The pool name to match (conflicts with id).
    AffinityGroupIds []string
    The list of attached exoscaleantiaffinity_group (IDs).
    DeployTargetId string
    The deploy target ID.
    Description string
    The instance pool description.
    DiskSize int
    The managed instances disk size.
    ElasticIpIds []string
    The list of attached exoscaleelasticip (IDs).
    InstancePrefix string
    The string used to prefix the managed instances name.
    InstanceType string
    The managed instances type.
    Instances []GetInstancePoolInstance
    The list of managed instances. Structure is documented below.
    Ipv6 bool
    Whether IPv6 is enabled on managed instances.
    KeyPair string
    The exoscalesshkey (name) authorized on the managed instances.
    NetworkIds []string
    The list of attached exoscaleprivatenetwork (IDs).
    SecurityGroupIds []string
    The list of attached exoscalesecuritygroup (IDs).
    Size int
    The number managed instances.
    State string
    The pool state.
    TemplateId string
    The managed instances exoscale.getTemplate ID.
    UserData string
    cloud-init configuration.
    Zone string
    The Exoscale Zone name.
    Id string
    The instance pool ID to match (conflicts with name).
    Labels map[string]string
    A map of key/value labels.
    Name string
    The pool name to match (conflicts with id).
    affinityGroupIds List<String>
    The list of attached exoscaleantiaffinity_group (IDs).
    deployTargetId String
    The deploy target ID.
    description String
    The instance pool description.
    diskSize Integer
    The managed instances disk size.
    elasticIpIds List<String>
    The list of attached exoscaleelasticip (IDs).
    instancePrefix String
    The string used to prefix the managed instances name.
    instanceType String
    The managed instances type.
    instances List<GetInstancePoolInstance>
    The list of managed instances. Structure is documented below.
    ipv6 Boolean
    Whether IPv6 is enabled on managed instances.
    keyPair String
    The exoscalesshkey (name) authorized on the managed instances.
    networkIds List<String>
    The list of attached exoscaleprivatenetwork (IDs).
    securityGroupIds List<String>
    The list of attached exoscalesecuritygroup (IDs).
    size Integer
    The number managed instances.
    state String
    The pool state.
    templateId String
    The managed instances exoscale.getTemplate ID.
    userData String
    cloud-init configuration.
    zone String
    The Exoscale Zone name.
    id String
    The instance pool ID to match (conflicts with name).
    labels Map<String,String>
    A map of key/value labels.
    name String
    The pool name to match (conflicts with id).
    affinityGroupIds string[]
    The list of attached exoscaleantiaffinity_group (IDs).
    deployTargetId string
    The deploy target ID.
    description string
    The instance pool description.
    diskSize number
    The managed instances disk size.
    elasticIpIds string[]
    The list of attached exoscaleelasticip (IDs).
    instancePrefix string
    The string used to prefix the managed instances name.
    instanceType string
    The managed instances type.
    instances GetInstancePoolInstance[]
    The list of managed instances. Structure is documented below.
    ipv6 boolean
    Whether IPv6 is enabled on managed instances.
    keyPair string
    The exoscalesshkey (name) authorized on the managed instances.
    networkIds string[]
    The list of attached exoscaleprivatenetwork (IDs).
    securityGroupIds string[]
    The list of attached exoscalesecuritygroup (IDs).
    size number
    The number managed instances.
    state string
    The pool state.
    templateId string
    The managed instances exoscale.getTemplate ID.
    userData string
    cloud-init configuration.
    zone string
    The Exoscale Zone name.
    id string
    The instance pool ID to match (conflicts with name).
    labels {[key: string]: string}
    A map of key/value labels.
    name string
    The pool name to match (conflicts with id).
    affinity_group_ids Sequence[str]
    The list of attached exoscaleantiaffinity_group (IDs).
    deploy_target_id str
    The deploy target ID.
    description str
    The instance pool description.
    disk_size int
    The managed instances disk size.
    elastic_ip_ids Sequence[str]
    The list of attached exoscaleelasticip (IDs).
    instance_prefix str
    The string used to prefix the managed instances name.
    instance_type str
    The managed instances type.
    instances Sequence[GetInstancePoolInstance]
    The list of managed instances. Structure is documented below.
    ipv6 bool
    Whether IPv6 is enabled on managed instances.
    key_pair str
    The exoscalesshkey (name) authorized on the managed instances.
    network_ids Sequence[str]
    The list of attached exoscaleprivatenetwork (IDs).
    security_group_ids Sequence[str]
    The list of attached exoscalesecuritygroup (IDs).
    size int
    The number managed instances.
    state str
    The pool state.
    template_id str
    The managed instances exoscale.getTemplate ID.
    user_data str
    cloud-init configuration.
    zone str
    The Exoscale Zone name.
    id str
    The instance pool ID to match (conflicts with name).
    labels Mapping[str, str]
    A map of key/value labels.
    name str
    The pool name to match (conflicts with id).
    affinityGroupIds List<String>
    The list of attached exoscaleantiaffinity_group (IDs).
    deployTargetId String
    The deploy target ID.
    description String
    The instance pool description.
    diskSize Number
    The managed instances disk size.
    elasticIpIds List<String>
    The list of attached exoscaleelasticip (IDs).
    instancePrefix String
    The string used to prefix the managed instances name.
    instanceType String
    The managed instances type.
    instances List<Property Map>
    The list of managed instances. Structure is documented below.
    ipv6 Boolean
    Whether IPv6 is enabled on managed instances.
    keyPair String
    The exoscalesshkey (name) authorized on the managed instances.
    networkIds List<String>
    The list of attached exoscaleprivatenetwork (IDs).
    securityGroupIds List<String>
    The list of attached exoscalesecuritygroup (IDs).
    size Number
    The number managed instances.
    state String
    The pool state.
    templateId String
    The managed instances exoscale.getTemplate ID.
    userData String
    cloud-init configuration.
    zone String
    The Exoscale Zone name.
    id String
    The instance pool ID to match (conflicts with name).
    labels Map<String>
    A map of key/value labels.
    name String
    The pool name to match (conflicts with id).

    Supporting Types

    GetInstancePoolInstance

    Ipv6Address string
    PublicIpAddress string
    Id string
    Name string
    Ipv6Address string
    PublicIpAddress string
    Id string
    Name string
    ipv6Address String
    publicIpAddress String
    id String
    name String
    ipv6Address string
    publicIpAddress string
    id string
    name string
    ipv6Address String
    publicIpAddress String
    id String
    name String

    Package Details

    Repository
    exoscale pulumiverse/pulumi-exoscale
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the exoscale Terraform Provider.
    exoscale logo
    Exoscale v0.55.0 published on Monday, Jan 29, 2024 by Pulumiverse