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

spectrocloud.getAppliances

Explore with Pulumi AI

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

    Provides details about a set of appliances used for Edge Native cluster provisioning. Various attributes could be used to search for appliances like tags, status, health, and architecture.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as spectrocloud from "@pulumi/spectrocloud";
    
    const filteredAppliances = spectrocloud.getAppliances({
        context: "project",
        status: "ready",
        health: "healthy",
        architecture: "amd_64",
        tags: {
            environment: "production",
        },
    });
    export const applianceIds = .map(a => (a.name));
    
    import pulumi
    import pulumi_spectrocloud as spectrocloud
    
    filtered_appliances = spectrocloud.get_appliances(context="project",
        status="ready",
        health="healthy",
        architecture="amd_64",
        tags={
            "environment": "production",
        })
    pulumi.export("applianceIds", [a["name"] for a in data["spectrocloud_appliance"]["filtered_appliances"]])
    
    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 {
    		_, err := spectrocloud.GetAppliances(ctx, &spectrocloud.GetAppliancesArgs{
    			Context:      pulumi.StringRef("project"),
    			Status:       pulumi.StringRef("ready"),
    			Health:       pulumi.StringRef("healthy"),
    			Architecture: pulumi.StringRef("amd_64"),
    			Tags: map[string]interface{}{
    				"environment": "production",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("applianceIds", pulumi.Array("TODO: For expression"))
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Spectrocloud = Pulumi.Spectrocloud;
    
    return await Deployment.RunAsync(() => 
    {
        var filteredAppliances = Spectrocloud.GetAppliances.Invoke(new()
        {
            Context = "project",
            Status = "ready",
            Health = "healthy",
            Architecture = "amd_64",
            Tags = 
            {
                { "environment", "production" },
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["applianceIds"] = .Select(a => 
            {
                return a.Name;
            }).ToList(),
        };
    });
    
    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.GetAppliancesArgs;
    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 filteredAppliances = SpectrocloudFunctions.getAppliances(GetAppliancesArgs.builder()
                .context("project")
                .status("ready")
                .health("healthy")
                .architecture("amd_64")
                .tags(Map.of("environment", "production"))
                .build());
    
            ctx.export("applianceIds", "TODO: ForExpression");
        }
    }
    
    Coming soon!
    

    Using getAppliances

    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 getAppliances(args: GetAppliancesArgs, opts?: InvokeOptions): Promise<GetAppliancesResult>
    function getAppliancesOutput(args: GetAppliancesOutputArgs, opts?: InvokeOptions): Output<GetAppliancesResult>
    def get_appliances(architecture: Optional[str] = None,
                       context: Optional[str] = None,
                       health: Optional[str] = None,
                       id: Optional[str] = None,
                       status: Optional[str] = None,
                       tags: Optional[Mapping[str, str]] = None,
                       opts: Optional[InvokeOptions] = None) -> GetAppliancesResult
    def get_appliances_output(architecture: Optional[pulumi.Input[str]] = None,
                       context: Optional[pulumi.Input[str]] = None,
                       health: Optional[pulumi.Input[str]] = None,
                       id: Optional[pulumi.Input[str]] = None,
                       status: Optional[pulumi.Input[str]] = None,
                       tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetAppliancesResult]
    func GetAppliances(ctx *Context, args *GetAppliancesArgs, opts ...InvokeOption) (*GetAppliancesResult, error)
    func GetAppliancesOutput(ctx *Context, args *GetAppliancesOutputArgs, opts ...InvokeOption) GetAppliancesResultOutput

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

    public static class GetAppliances 
    {
        public static Task<GetAppliancesResult> InvokeAsync(GetAppliancesArgs args, InvokeOptions? opts = null)
        public static Output<GetAppliancesResult> Invoke(GetAppliancesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetAppliancesResult> getAppliances(GetAppliancesArgs args, InvokeOptions options)
    public static Output<GetAppliancesResult> getAppliances(GetAppliancesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: spectrocloud:index/getAppliances:getAppliances
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Architecture string
    The architecture of the appliance. Supported values are: 'amd64', and 'arm64'. If not specified, all appliances are returned.
    Context string
    The context of the appliances. 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.
    Health string
    The health of the appliance. Supported values are: 'healthy', and 'unhealthy'. If not specified, all appliances are returned.
    Id string
    The ID of this resource.
    Status string
    The status of the appliance. Supported values are: 'ready', 'in-use', and 'unpaired'. If not specified, all appliances are returned.
    Tags Dictionary<string, string>
    A list of tags to filter the appliances.
    Architecture string
    The architecture of the appliance. Supported values are: 'amd64', and 'arm64'. If not specified, all appliances are returned.
    Context string
    The context of the appliances. 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.
    Health string
    The health of the appliance. Supported values are: 'healthy', and 'unhealthy'. If not specified, all appliances are returned.
    Id string
    The ID of this resource.
    Status string
    The status of the appliance. Supported values are: 'ready', 'in-use', and 'unpaired'. If not specified, all appliances are returned.
    Tags map[string]string
    A list of tags to filter the appliances.
    architecture String
    The architecture of the appliance. Supported values are: 'amd64', and 'arm64'. If not specified, all appliances are returned.
    context String
    The context of the appliances. 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.
    health String
    The health of the appliance. Supported values are: 'healthy', and 'unhealthy'. If not specified, all appliances are returned.
    id String
    The ID of this resource.
    status String
    The status of the appliance. Supported values are: 'ready', 'in-use', and 'unpaired'. If not specified, all appliances are returned.
    tags Map<String,String>
    A list of tags to filter the appliances.
    architecture string
    The architecture of the appliance. Supported values are: 'amd64', and 'arm64'. If not specified, all appliances are returned.
    context string
    The context of the appliances. 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.
    health string
    The health of the appliance. Supported values are: 'healthy', and 'unhealthy'. If not specified, all appliances are returned.
    id string
    The ID of this resource.
    status string
    The status of the appliance. Supported values are: 'ready', 'in-use', and 'unpaired'. If not specified, all appliances are returned.
    tags {[key: string]: string}
    A list of tags to filter the appliances.
    architecture str
    The architecture of the appliance. Supported values are: 'amd64', and 'arm64'. If not specified, all appliances are returned.
    context str
    The context of the appliances. 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.
    health str
    The health of the appliance. Supported values are: 'healthy', and 'unhealthy'. If not specified, all appliances are returned.
    id str
    The ID of this resource.
    status str
    The status of the appliance. Supported values are: 'ready', 'in-use', and 'unpaired'. If not specified, all appliances are returned.
    tags Mapping[str, str]
    A list of tags to filter the appliances.
    architecture String
    The architecture of the appliance. Supported values are: 'amd64', and 'arm64'. If not specified, all appliances are returned.
    context String
    The context of the appliances. 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.
    health String
    The health of the appliance. Supported values are: 'healthy', and 'unhealthy'. If not specified, all appliances are returned.
    id String
    The ID of this resource.
    status String
    The status of the appliance. Supported values are: 'ready', 'in-use', and 'unpaired'. If not specified, all appliances are returned.
    tags Map<String>
    A list of tags to filter the appliances.

    getAppliances Result

    The following output properties are available:

    Id string
    The ID of this resource.
    Ids List<string>
    The unique ids of the appliances. This is a computed field and is not required to be set.
    Architecture string
    The architecture of the appliance. Supported values are: 'amd64', and 'arm64'. If not specified, all appliances are returned.
    Context string
    The context of the appliances. 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.
    Health string
    The health of the appliance. Supported values are: 'healthy', and 'unhealthy'. If not specified, all appliances are returned.
    Status string
    The status of the appliance. Supported values are: 'ready', 'in-use', and 'unpaired'. If not specified, all appliances are returned.
    Tags Dictionary<string, string>
    A list of tags to filter the appliances.
    Id string
    The ID of this resource.
    Ids []string
    The unique ids of the appliances. This is a computed field and is not required to be set.
    Architecture string
    The architecture of the appliance. Supported values are: 'amd64', and 'arm64'. If not specified, all appliances are returned.
    Context string
    The context of the appliances. 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.
    Health string
    The health of the appliance. Supported values are: 'healthy', and 'unhealthy'. If not specified, all appliances are returned.
    Status string
    The status of the appliance. Supported values are: 'ready', 'in-use', and 'unpaired'. If not specified, all appliances are returned.
    Tags map[string]string
    A list of tags to filter the appliances.
    id String
    The ID of this resource.
    ids List<String>
    The unique ids of the appliances. This is a computed field and is not required to be set.
    architecture String
    The architecture of the appliance. Supported values are: 'amd64', and 'arm64'. If not specified, all appliances are returned.
    context String
    The context of the appliances. 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.
    health String
    The health of the appliance. Supported values are: 'healthy', and 'unhealthy'. If not specified, all appliances are returned.
    status String
    The status of the appliance. Supported values are: 'ready', 'in-use', and 'unpaired'. If not specified, all appliances are returned.
    tags Map<String,String>
    A list of tags to filter the appliances.
    id string
    The ID of this resource.
    ids string[]
    The unique ids of the appliances. This is a computed field and is not required to be set.
    architecture string
    The architecture of the appliance. Supported values are: 'amd64', and 'arm64'. If not specified, all appliances are returned.
    context string
    The context of the appliances. 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.
    health string
    The health of the appliance. Supported values are: 'healthy', and 'unhealthy'. If not specified, all appliances are returned.
    status string
    The status of the appliance. Supported values are: 'ready', 'in-use', and 'unpaired'. If not specified, all appliances are returned.
    tags {[key: string]: string}
    A list of tags to filter the appliances.
    id str
    The ID of this resource.
    ids Sequence[str]
    The unique ids of the appliances. This is a computed field and is not required to be set.
    architecture str
    The architecture of the appliance. Supported values are: 'amd64', and 'arm64'. If not specified, all appliances are returned.
    context str
    The context of the appliances. 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.
    health str
    The health of the appliance. Supported values are: 'healthy', and 'unhealthy'. If not specified, all appliances are returned.
    status str
    The status of the appliance. Supported values are: 'ready', 'in-use', and 'unpaired'. If not specified, all appliances are returned.
    tags Mapping[str, str]
    A list of tags to filter the appliances.
    id String
    The ID of this resource.
    ids List<String>
    The unique ids of the appliances. This is a computed field and is not required to be set.
    architecture String
    The architecture of the appliance. Supported values are: 'amd64', and 'arm64'. If not specified, all appliances are returned.
    context String
    The context of the appliances. 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.
    health String
    The health of the appliance. Supported values are: 'healthy', and 'unhealthy'. If not specified, all appliances are returned.
    status String
    The status of the appliance. Supported values are: 'ready', 'in-use', and 'unpaired'. If not specified, all appliances are returned.
    tags Map<String>
    A list of tags to filter the appliances.

    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