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

spectrocloud.getClusterProfile

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 example = spectrocloud.getClusterProfile({
        name: "example-cluster-profile",
        version: "1.0.0",
        context: "project",
    });
    const byId = spectrocloud.getClusterProfile({
        id: "123e4567e89ba426614174000",
    });
    export const clusterProfileId = example.then(example => example.id);
    export const clusterProfileVersion = example.then(example => example.version);
    export const clusterProfilePacks = example.then(example => example.packs);
    
    import pulumi
    import pulumi_spectrocloud as spectrocloud
    
    example = spectrocloud.get_cluster_profile(name="example-cluster-profile",
        version="1.0.0",
        context="project")
    by_id = spectrocloud.get_cluster_profile(id="123e4567e89ba426614174000")
    pulumi.export("clusterProfileId", example.id)
    pulumi.export("clusterProfileVersion", example.version)
    pulumi.export("clusterProfilePacks", example.packs)
    
    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 {
    		example, err := spectrocloud.LookupClusterProfile(ctx, &spectrocloud.LookupClusterProfileArgs{
    			Name:    pulumi.StringRef("example-cluster-profile"),
    			Version: pulumi.StringRef("1.0.0"),
    			Context: pulumi.StringRef("project"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = spectrocloud.LookupClusterProfile(ctx, &spectrocloud.LookupClusterProfileArgs{
    			Id: pulumi.StringRef("123e4567e89ba426614174000"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("clusterProfileId", example.Id)
    		ctx.Export("clusterProfileVersion", example.Version)
    		ctx.Export("clusterProfilePacks", example.Packs)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Spectrocloud = Pulumi.Spectrocloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Spectrocloud.GetClusterProfile.Invoke(new()
        {
            Name = "example-cluster-profile",
            Version = "1.0.0",
            Context = "project",
        });
    
        var byId = Spectrocloud.GetClusterProfile.Invoke(new()
        {
            Id = "123e4567e89ba426614174000",
        });
    
        return new Dictionary<string, object?>
        {
            ["clusterProfileId"] = example.Apply(getClusterProfileResult => getClusterProfileResult.Id),
            ["clusterProfileVersion"] = example.Apply(getClusterProfileResult => getClusterProfileResult.Version),
            ["clusterProfilePacks"] = example.Apply(getClusterProfileResult => getClusterProfileResult.Packs),
        };
    });
    
    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.GetClusterProfileArgs;
    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 = SpectrocloudFunctions.getClusterProfile(GetClusterProfileArgs.builder()
                .name("example-cluster-profile")
                .version("1.0.0")
                .context("project")
                .build());
    
            final var byId = SpectrocloudFunctions.getClusterProfile(GetClusterProfileArgs.builder()
                .id("123e4567e89ba426614174000")
                .build());
    
            ctx.export("clusterProfileId", example.applyValue(getClusterProfileResult -> getClusterProfileResult.id()));
            ctx.export("clusterProfileVersion", example.applyValue(getClusterProfileResult -> getClusterProfileResult.version()));
            ctx.export("clusterProfilePacks", example.applyValue(getClusterProfileResult -> getClusterProfileResult.packs()));
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: spectrocloud:getClusterProfile
          arguments:
            name: example-cluster-profile
            version: 1.0.0
            context: project
      byId:
        fn::invoke:
          function: spectrocloud:getClusterProfile
          arguments:
            id: 123e4567e89ba426614174000
    outputs:
      # Output cluster profile details
      clusterProfileId: ${example.id}
      clusterProfileVersion: ${example.version}
      # Retrieve packs associated with a cluster profile
      clusterProfilePacks: ${example.packs}
    

    Using getClusterProfile

    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 getClusterProfile(args: GetClusterProfileArgs, opts?: InvokeOptions): Promise<GetClusterProfileResult>
    function getClusterProfileOutput(args: GetClusterProfileOutputArgs, opts?: InvokeOptions): Output<GetClusterProfileResult>
    def get_cluster_profile(context: Optional[str] = None,
                            id: Optional[str] = None,
                            name: Optional[str] = None,
                            version: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetClusterProfileResult
    def get_cluster_profile_output(context: Optional[pulumi.Input[str]] = None,
                            id: Optional[pulumi.Input[str]] = None,
                            name: Optional[pulumi.Input[str]] = None,
                            version: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetClusterProfileResult]
    func LookupClusterProfile(ctx *Context, args *LookupClusterProfileArgs, opts ...InvokeOption) (*LookupClusterProfileResult, error)
    func LookupClusterProfileOutput(ctx *Context, args *LookupClusterProfileOutputArgs, opts ...InvokeOption) LookupClusterProfileResultOutput

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

    public static class GetClusterProfile 
    {
        public static Task<GetClusterProfileResult> InvokeAsync(GetClusterProfileArgs args, InvokeOptions? opts = null)
        public static Output<GetClusterProfileResult> Invoke(GetClusterProfileInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetClusterProfileResult> getClusterProfile(GetClusterProfileArgs args, InvokeOptions options)
    public static Output<GetClusterProfileResult> getClusterProfile(GetClusterProfileArgs args, InvokeOptions options)
    
    fn::invoke:
      function: spectrocloud:index/getClusterProfile:getClusterProfile
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Context string
    Cluster profile context. Allowed values are project or tenant. Defaults to project.If the project context is specified, the project name will sourced from the provider configuration parameter project_name.
    Id string
    The unique ID of the cluster profile. Either id or name must be provided, but not both.
    Name string
    The name of the cluster profile. Either id or name must be provided, but not both.
    Version string
    The version of the cluster profile.
    Context string
    Cluster profile context. Allowed values are project or tenant. Defaults to project.If the project context is specified, the project name will sourced from the provider configuration parameter project_name.
    Id string
    The unique ID of the cluster profile. Either id or name must be provided, but not both.
    Name string
    The name of the cluster profile. Either id or name must be provided, but not both.
    Version string
    The version of the cluster profile.
    context String
    Cluster profile context. Allowed values are project or tenant. Defaults to project.If the project context is specified, the project name will sourced from the provider configuration parameter project_name.
    id String
    The unique ID of the cluster profile. Either id or name must be provided, but not both.
    name String
    The name of the cluster profile. Either id or name must be provided, but not both.
    version String
    The version of the cluster profile.
    context string
    Cluster profile context. Allowed values are project or tenant. Defaults to project.If the project context is specified, the project name will sourced from the provider configuration parameter project_name.
    id string
    The unique ID of the cluster profile. Either id or name must be provided, but not both.
    name string
    The name of the cluster profile. Either id or name must be provided, but not both.
    version string
    The version of the cluster profile.
    context str
    Cluster profile context. Allowed values are project or tenant. Defaults to project.If the project context is specified, the project name will sourced from the provider configuration parameter project_name.
    id str
    The unique ID of the cluster profile. Either id or name must be provided, but not both.
    name str
    The name of the cluster profile. Either id or name must be provided, but not both.
    version str
    The version of the cluster profile.
    context String
    Cluster profile context. Allowed values are project or tenant. Defaults to project.If the project context is specified, the project name will sourced from the provider configuration parameter project_name.
    id String
    The unique ID of the cluster profile. Either id or name must be provided, but not both.
    name String
    The name of the cluster profile. Either id or name must be provided, but not both.
    version String
    The version of the cluster profile.

    getClusterProfile Result

    The following output properties are available:

    Id string
    The unique ID of the cluster profile. Either id or name must be provided, but not both.
    Name string
    The name of the cluster profile. Either id or name must be provided, but not both.
    Packs List<GetClusterProfilePack>
    Version string
    The version of the cluster profile.
    Context string
    Cluster profile context. Allowed values are project or tenant. Defaults to project.If the project context is specified, the project name will sourced from the provider configuration parameter project_name.
    Id string
    The unique ID of the cluster profile. Either id or name must be provided, but not both.
    Name string
    The name of the cluster profile. Either id or name must be provided, but not both.
    Packs []GetClusterProfilePack
    Version string
    The version of the cluster profile.
    Context string
    Cluster profile context. Allowed values are project or tenant. Defaults to project.If the project context is specified, the project name will sourced from the provider configuration parameter project_name.
    id String
    The unique ID of the cluster profile. Either id or name must be provided, but not both.
    name String
    The name of the cluster profile. Either id or name must be provided, but not both.
    packs List<GetClusterProfilePack>
    version String
    The version of the cluster profile.
    context String
    Cluster profile context. Allowed values are project or tenant. Defaults to project.If the project context is specified, the project name will sourced from the provider configuration parameter project_name.
    id string
    The unique ID of the cluster profile. Either id or name must be provided, but not both.
    name string
    The name of the cluster profile. Either id or name must be provided, but not both.
    packs GetClusterProfilePack[]
    version string
    The version of the cluster profile.
    context string
    Cluster profile context. Allowed values are project or tenant. Defaults to project.If the project context is specified, the project name will sourced from the provider configuration parameter project_name.
    id str
    The unique ID of the cluster profile. Either id or name must be provided, but not both.
    name str
    The name of the cluster profile. Either id or name must be provided, but not both.
    packs Sequence[GetClusterProfilePack]
    version str
    The version of the cluster profile.
    context str
    Cluster profile context. Allowed values are project or tenant. Defaults to project.If the project context is specified, the project name will sourced from the provider configuration parameter project_name.
    id String
    The unique ID of the cluster profile. Either id or name must be provided, but not both.
    name String
    The name of the cluster profile. Either id or name must be provided, but not both.
    packs List<Property Map>
    version String
    The version of the cluster profile.
    context String
    Cluster profile context. Allowed values are project or tenant. Defaults to project.If the project context is specified, the project name will sourced from the provider configuration parameter project_name.

    Supporting Types

    GetClusterProfilePack

    manifests List<Property Map>
    name String
    registryUid String
    tag String
    type String
    uid String
    values String

    GetClusterProfilePackManifest

    Content string
    Name string
    Uid string
    Content string
    Name string
    Uid string
    content String
    name String
    uid String
    content string
    name string
    uid string
    content str
    name str
    uid str
    content String
    name String
    uid String

    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