1. Packages
  2. Xen Orchestra
  3. API Docs
  4. getXoaPool
xenorchestra v1.5.2 published on Monday, Mar 10, 2025 by Vates

xenorchestra.getXoaPool

Explore with Pulumi AI

xenorchestra logo
xenorchestra v1.5.2 published on Monday, Mar 10, 2025 by Vates

    Provides information about a pool.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as xenorchestra from "@pulumi/xenorchestra";
    
    const pool = xenorchestra.getXoaPool({
        nameLabel: "Your pool",
    });
    const localStorage = pool.then(pool => xenorchestra.getXoaStorageRepository({
        nameLabel: "Your storage repository label",
        poolId: pool.id,
    }));
    
    import pulumi
    import pulumi_xenorchestra as xenorchestra
    
    pool = xenorchestra.get_xoa_pool(name_label="Your pool")
    local_storage = xenorchestra.get_xoa_storage_repository(name_label="Your storage repository label",
        pool_id=pool.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/vatesfr/pulumi-xenorchestra/sdk/go/xenorchestra"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		pool, err := xenorchestra.GetXoaPool(ctx, &xenorchestra.GetXoaPoolArgs{
    			NameLabel: "Your pool",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = xenorchestra.GetXoaStorageRepository(ctx, &xenorchestra.GetXoaStorageRepositoryArgs{
    			NameLabel: "Your storage repository label",
    			PoolId:    pulumi.StringRef(pool.Id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Xenorchestra = Pulumi.Xenorchestra;
    
    return await Deployment.RunAsync(() => 
    {
        var pool = Xenorchestra.GetXoaPool.Invoke(new()
        {
            NameLabel = "Your pool",
        });
    
        var localStorage = Xenorchestra.GetXoaStorageRepository.Invoke(new()
        {
            NameLabel = "Your storage repository label",
            PoolId = pool.Apply(getXoaPoolResult => getXoaPoolResult.Id),
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.xenorchestra.XenorchestraFunctions;
    import com.pulumi.xenorchestra.inputs.GetXoaPoolArgs;
    import com.pulumi.xenorchestra.inputs.GetXoaStorageRepositoryArgs;
    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 pool = XenorchestraFunctions.getXoaPool(GetXoaPoolArgs.builder()
                .nameLabel("Your pool")
                .build());
    
            final var localStorage = XenorchestraFunctions.getXoaStorageRepository(GetXoaStorageRepositoryArgs.builder()
                .nameLabel("Your storage repository label")
                .poolId(pool.applyValue(getXoaPoolResult -> getXoaPoolResult.id()))
                .build());
    
        }
    }
    
    variables:
      pool:
        fn::invoke:
          function: xenorchestra:getXoaPool
          arguments:
            nameLabel: Your pool
      localStorage:
        fn::invoke:
          function: xenorchestra:getXoaStorageRepository
          arguments:
            nameLabel: Your storage repository label
            poolId: ${pool.id}
    

    Using getXoaPool

    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 getXoaPool(args: GetXoaPoolArgs, opts?: InvokeOptions): Promise<GetXoaPoolResult>
    function getXoaPoolOutput(args: GetXoaPoolOutputArgs, opts?: InvokeOptions): Output<GetXoaPoolResult>
    def get_xoa_pool(name_label: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetXoaPoolResult
    def get_xoa_pool_output(name_label: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetXoaPoolResult]
    func GetXoaPool(ctx *Context, args *GetXoaPoolArgs, opts ...InvokeOption) (*GetXoaPoolResult, error)
    func GetXoaPoolOutput(ctx *Context, args *GetXoaPoolOutputArgs, opts ...InvokeOption) GetXoaPoolResultOutput

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

    public static class GetXoaPool 
    {
        public static Task<GetXoaPoolResult> InvokeAsync(GetXoaPoolArgs args, InvokeOptions? opts = null)
        public static Output<GetXoaPoolResult> Invoke(GetXoaPoolInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetXoaPoolResult> getXoaPool(GetXoaPoolArgs args, InvokeOptions options)
    public static Output<GetXoaPoolResult> getXoaPool(GetXoaPoolArgs args, InvokeOptions options)
    
    fn::invoke:
      function: xenorchestra:index/getXoaPool:getXoaPool
      arguments:
        # arguments dictionary

    The following arguments are supported:

    NameLabel string
    The name_label of the pool to look up.
    NameLabel string
    The name_label of the pool to look up.
    nameLabel String
    The name_label of the pool to look up.
    nameLabel string
    The name_label of the pool to look up.
    name_label str
    The name_label of the pool to look up.
    nameLabel String
    The name_label of the pool to look up.

    getXoaPool Result

    The following output properties are available:

    Cpus Dictionary<string, string>
    CPU information about the pool. The 'cores' key will contain the number of cpu cores and the 'sockets' key will contain the number of sockets.
    Description string
    The description of the pool.
    Id string
    The provider-assigned unique ID for this managed resource.
    Master string
    The id of the primary instance in the pool.
    NameLabel string
    The name_label of the pool to look up.
    Cpus map[string]string
    CPU information about the pool. The 'cores' key will contain the number of cpu cores and the 'sockets' key will contain the number of sockets.
    Description string
    The description of the pool.
    Id string
    The provider-assigned unique ID for this managed resource.
    Master string
    The id of the primary instance in the pool.
    NameLabel string
    The name_label of the pool to look up.
    cpus Map<String,String>
    CPU information about the pool. The 'cores' key will contain the number of cpu cores and the 'sockets' key will contain the number of sockets.
    description String
    The description of the pool.
    id String
    The provider-assigned unique ID for this managed resource.
    master String
    The id of the primary instance in the pool.
    nameLabel String
    The name_label of the pool to look up.
    cpus {[key: string]: string}
    CPU information about the pool. The 'cores' key will contain the number of cpu cores and the 'sockets' key will contain the number of sockets.
    description string
    The description of the pool.
    id string
    The provider-assigned unique ID for this managed resource.
    master string
    The id of the primary instance in the pool.
    nameLabel string
    The name_label of the pool to look up.
    cpus Mapping[str, str]
    CPU information about the pool. The 'cores' key will contain the number of cpu cores and the 'sockets' key will contain the number of sockets.
    description str
    The description of the pool.
    id str
    The provider-assigned unique ID for this managed resource.
    master str
    The id of the primary instance in the pool.
    name_label str
    The name_label of the pool to look up.
    cpus Map<String>
    CPU information about the pool. The 'cores' key will contain the number of cpu cores and the 'sockets' key will contain the number of sockets.
    description String
    The description of the pool.
    id String
    The provider-assigned unique ID for this managed resource.
    master String
    The id of the primary instance in the pool.
    nameLabel String
    The name_label of the pool to look up.

    Package Details

    Repository
    xenorchestra vatesfr/pulumi-xenorchestra
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the xenorchestra Terraform Provider.
    xenorchestra logo
    xenorchestra v1.5.2 published on Monday, Mar 10, 2025 by Vates