1. Packages
  2. Spectrocloud Provider
  3. API Docs
  4. getClusterGroup
spectrocloud 0.23.5 published on Sunday, Apr 20, 2025 by spectrocloud

spectrocloud.getClusterGroup

Explore with Pulumi AI

spectrocloud logo
spectrocloud 0.23.5 published on Sunday, Apr 20, 2025 by spectrocloud

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as spectrocloud from "@pulumi/spectrocloud";
    
    const exampleGroup = spectrocloud.getClusterGroup({
        name: "my-cluster-group",
        context: "tenant",
    });
    export const clusterGroupName = exampleGroup.then(exampleGroup => exampleGroup.name);
    
    import pulumi
    import pulumi_spectrocloud as spectrocloud
    
    example_group = spectrocloud.get_cluster_group(name="my-cluster-group",
        context="tenant")
    pulumi.export("clusterGroupName", example_group.name)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/spectrocloud/spectrocloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		exampleGroup, err := spectrocloud.LookupClusterGroup(ctx, &spectrocloud.LookupClusterGroupArgs{
    			Name:    "my-cluster-group",
    			Context: pulumi.StringRef("tenant"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("clusterGroupName", exampleGroup.Name)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Spectrocloud = Pulumi.Spectrocloud;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleGroup = Spectrocloud.GetClusterGroup.Invoke(new()
        {
            Name = "my-cluster-group",
            Context = "tenant",
        });
    
        return new Dictionary<string, object?>
        {
            ["clusterGroupName"] = exampleGroup.Apply(getClusterGroupResult => getClusterGroupResult.Name),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.spectrocloud.SpectrocloudFunctions;
    import com.pulumi.spectrocloud.inputs.GetClusterGroupArgs;
    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 exampleGroup = SpectrocloudFunctions.getClusterGroup(GetClusterGroupArgs.builder()
                .name("my-cluster-group")
                .context("tenant")
                .build());
    
            ctx.export("clusterGroupName", exampleGroup.applyValue(getClusterGroupResult -> getClusterGroupResult.name()));
        }
    }
    
    variables:
      exampleGroup:
        fn::invoke:
          function: spectrocloud:getClusterGroup
          arguments:
            name: my-cluster-group
            context: tenant
    outputs:
      # Output the retrieved cluster group details
      clusterGroupName: ${exampleGroup.name}
    

    Using getClusterGroup

    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 getClusterGroup(args: GetClusterGroupArgs, opts?: InvokeOptions): Promise<GetClusterGroupResult>
    function getClusterGroupOutput(args: GetClusterGroupOutputArgs, opts?: InvokeOptions): Output<GetClusterGroupResult>
    def get_cluster_group(context: Optional[str] = None,
                          id: Optional[str] = None,
                          name: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetClusterGroupResult
    def get_cluster_group_output(context: Optional[pulumi.Input[str]] = None,
                          id: Optional[pulumi.Input[str]] = None,
                          name: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetClusterGroupResult]
    func LookupClusterGroup(ctx *Context, args *LookupClusterGroupArgs, opts ...InvokeOption) (*LookupClusterGroupResult, error)
    func LookupClusterGroupOutput(ctx *Context, args *LookupClusterGroupOutputArgs, opts ...InvokeOption) LookupClusterGroupResultOutput

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

    public static class GetClusterGroup 
    {
        public static Task<GetClusterGroupResult> InvokeAsync(GetClusterGroupArgs args, InvokeOptions? opts = null)
        public static Output<GetClusterGroupResult> Invoke(GetClusterGroupInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetClusterGroupResult> getClusterGroup(GetClusterGroupArgs args, InvokeOptions options)
    public static Output<GetClusterGroupResult> getClusterGroup(GetClusterGroupArgs args, InvokeOptions options)
    
    fn::invoke:
      function: spectrocloud:index/getClusterGroup:getClusterGroup
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of the cluster group.
    Context string
    The context of where the cluster group is located. Allowed values are system or tenant. Defaults to tenant.If the project context is specified, the project name will sourced from the provider configuration parameter project_name.
    Id string
    The ID of this resource.
    Name string
    The name of the cluster group.
    Context string
    The context of where the cluster group is located. Allowed values are system or tenant. Defaults to tenant.If the project context is specified, the project name will sourced from the provider configuration parameter project_name.
    Id string
    The ID of this resource.
    name String
    The name of the cluster group.
    context String
    The context of where the cluster group is located. Allowed values are system or tenant. Defaults to tenant.If the project context is specified, the project name will sourced from the provider configuration parameter project_name.
    id String
    The ID of this resource.
    name string
    The name of the cluster group.
    context string
    The context of where the cluster group is located. Allowed values are system or tenant. Defaults to tenant.If the project context is specified, the project name will sourced from the provider configuration parameter project_name.
    id string
    The ID of this resource.
    name str
    The name of the cluster group.
    context str
    The context of where the cluster group is located. Allowed values are system or tenant. Defaults to tenant.If the project context is specified, the project name will sourced from the provider configuration parameter project_name.
    id str
    The ID of this resource.
    name String
    The name of the cluster group.
    context String
    The context of where the cluster group is located. Allowed values are system or tenant. Defaults to tenant.If the project context is specified, the project name will sourced from the provider configuration parameter project_name.
    id String
    The ID of this resource.

    getClusterGroup Result

    The following output properties are available:

    Id string
    The ID of this resource.
    Name string
    The name of the cluster group.
    Context string
    The context of where the cluster group is located. Allowed values are system or tenant. Defaults to tenant.If the project context is specified, the project name will sourced from the provider configuration parameter project_name.
    Id string
    The ID of this resource.
    Name string
    The name of the cluster group.
    Context string
    The context of where the cluster group is located. Allowed values are system or tenant. Defaults to tenant.If the project context is specified, the project name will sourced from the provider configuration parameter project_name.
    id String
    The ID of this resource.
    name String
    The name of the cluster group.
    context String
    The context of where the cluster group is located. Allowed values are system or tenant. Defaults to tenant.If the project context is specified, the project name will sourced from the provider configuration parameter project_name.
    id string
    The ID of this resource.
    name string
    The name of the cluster group.
    context string
    The context of where the cluster group is located. Allowed values are system or tenant. Defaults to tenant.If the project context is specified, the project name will sourced from the provider configuration parameter project_name.
    id str
    The ID of this resource.
    name str
    The name of the cluster group.
    context str
    The context of where the cluster group is located. Allowed values are system or tenant. Defaults to tenant.If the project context is specified, the project name will sourced from the provider configuration parameter project_name.
    id String
    The ID of this resource.
    name String
    The name of the cluster group.
    context String
    The context of where the cluster group is located. Allowed values are system or tenant. Defaults to tenant.If the project context is specified, the project name will sourced from the provider configuration parameter project_name.

    Package Details

    Repository
    spectrocloud spectrocloud/terraform-provider-spectrocloud
    License
    Notes
    This Pulumi package is based on the spectrocloud Terraform Provider.
    spectrocloud logo
    spectrocloud 0.23.5 published on Sunday, Apr 20, 2025 by spectrocloud