1. Packages
  2. Opennebula Provider
  3. API Docs
  4. getCluster
opennebula 1.4.1 published on Monday, Apr 14, 2025 by opennebula

opennebula.getCluster

Explore with Pulumi AI

opennebula logo
opennebula 1.4.1 published on Monday, Apr 14, 2025 by opennebula

    Use this data source to retrieve the cluster information from it’s name or tags.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as opennebula from "@pulumi/opennebula";
    
    const example = opennebula.getCluster({
        name: "My_Cluster",
    });
    
    import pulumi
    import pulumi_opennebula as opennebula
    
    example = opennebula.get_cluster(name="My_Cluster")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opennebula/opennebula"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := opennebula.LookupCluster(ctx, &opennebula.LookupClusterArgs{
    			Name: pulumi.StringRef("My_Cluster"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Opennebula = Pulumi.Opennebula;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Opennebula.GetCluster.Invoke(new()
        {
            Name = "My_Cluster",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.opennebula.OpennebulaFunctions;
    import com.pulumi.opennebula.inputs.GetClusterArgs;
    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 example = OpennebulaFunctions.getCluster(GetClusterArgs.builder()
                .name("My_Cluster")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: opennebula:getCluster
          arguments:
            name: My_Cluster
    

    Using getCluster

    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 getCluster(args: GetClusterArgs, opts?: InvokeOptions): Promise<GetClusterResult>
    function getClusterOutput(args: GetClusterOutputArgs, opts?: InvokeOptions): Output<GetClusterResult>
    def get_cluster(id: Optional[float] = None,
                    name: Optional[str] = None,
                    tags: Optional[Mapping[str, str]] = None,
                    opts: Optional[InvokeOptions] = None) -> GetClusterResult
    def get_cluster_output(id: Optional[pulumi.Input[float]] = None,
                    name: Optional[pulumi.Input[str]] = None,
                    tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetClusterResult]
    func LookupCluster(ctx *Context, args *LookupClusterArgs, opts ...InvokeOption) (*LookupClusterResult, error)
    func LookupClusterOutput(ctx *Context, args *LookupClusterOutputArgs, opts ...InvokeOption) LookupClusterResultOutput

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

    public static class GetCluster 
    {
        public static Task<GetClusterResult> InvokeAsync(GetClusterArgs args, InvokeOptions? opts = null)
        public static Output<GetClusterResult> Invoke(GetClusterInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetClusterResult> getCluster(GetClusterArgs args, InvokeOptions options)
    public static Output<GetClusterResult> getCluster(GetClusterArgs args, InvokeOptions options)
    
    fn::invoke:
      function: opennebula:index/getCluster:getCluster
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id double
    ID of the cluster.
    Name string
    The OpenNebula cluster to retrieve information for.
    Tags Dictionary<string, string>
    Tags associated to the cluster.
    Id float64
    ID of the cluster.
    Name string
    The OpenNebula cluster to retrieve information for.
    Tags map[string]string
    Tags associated to the cluster.
    id Double
    ID of the cluster.
    name String
    The OpenNebula cluster to retrieve information for.
    tags Map<String,String>
    Tags associated to the cluster.
    id number
    ID of the cluster.
    name string
    The OpenNebula cluster to retrieve information for.
    tags {[key: string]: string}
    Tags associated to the cluster.
    id float
    ID of the cluster.
    name str
    The OpenNebula cluster to retrieve information for.
    tags Mapping[str, str]
    Tags associated to the cluster.
    id Number
    ID of the cluster.
    name String
    The OpenNebula cluster to retrieve information for.
    tags Map<String>
    Tags associated to the cluster.

    getCluster Result

    The following output properties are available:

    Id double
    ID of the cluster.
    Name string
    The OpenNebula cluster name.
    Tags Dictionary<string, string>
    Tags of the cluster (Key = Value).
    Id float64
    ID of the cluster.
    Name string
    The OpenNebula cluster name.
    Tags map[string]string
    Tags of the cluster (Key = Value).
    id Double
    ID of the cluster.
    name String
    The OpenNebula cluster name.
    tags Map<String,String>
    Tags of the cluster (Key = Value).
    id number
    ID of the cluster.
    name string
    The OpenNebula cluster name.
    tags {[key: string]: string}
    Tags of the cluster (Key = Value).
    id float
    ID of the cluster.
    name str
    The OpenNebula cluster name.
    tags Mapping[str, str]
    Tags of the cluster (Key = Value).
    id Number
    ID of the cluster.
    name String
    The OpenNebula cluster name.
    tags Map<String>
    Tags of the cluster (Key = Value).

    Package Details

    Repository
    opennebula opennebula/terraform-provider-opennebula
    License
    Notes
    This Pulumi package is based on the opennebula Terraform Provider.
    opennebula logo
    opennebula 1.4.1 published on Monday, Apr 14, 2025 by opennebula