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

spectrocloud.getRegistry

Explore with Pulumi AI

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 myRegistry = spectrocloud.getRegistry({
    name: "my-registry",
});
export const registryId = myRegistry.then(myRegistry => myRegistry.id);
Copy
import pulumi
import pulumi_spectrocloud as spectrocloud

my_registry = spectrocloud.get_registry(name="my-registry")
pulumi.export("registryId", my_registry.id)
Copy
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 {
		myRegistry, err := spectrocloud.GetRegistry(ctx, &spectrocloud.GetRegistryArgs{
			Name: "my-registry",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("registryId", myRegistry.Id)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Spectrocloud = Pulumi.Spectrocloud;

return await Deployment.RunAsync(() => 
{
    var myRegistry = Spectrocloud.GetRegistry.Invoke(new()
    {
        Name = "my-registry",
    });

    return new Dictionary<string, object?>
    {
        ["registryId"] = myRegistry.Apply(getRegistryResult => getRegistryResult.Id),
    };
});
Copy
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.GetRegistryArgs;
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 myRegistry = SpectrocloudFunctions.getRegistry(GetRegistryArgs.builder()
            .name("my-registry")
            .build());

        ctx.export("registryId", myRegistry.applyValue(getRegistryResult -> getRegistryResult.id()));
    }
}
Copy
variables:
  myRegistry:
    fn::invoke:
      function: spectrocloud:getRegistry
      arguments:
        name: my-registry
outputs:
  # Output the ID of the retrieved registry
  registryId: ${myRegistry.id}
Copy

Using getRegistry

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 getRegistry(args: GetRegistryArgs, opts?: InvokeOptions): Promise<GetRegistryResult>
function getRegistryOutput(args: GetRegistryOutputArgs, opts?: InvokeOptions): Output<GetRegistryResult>
Copy
def get_registry(id: Optional[str] = None,
                 name: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetRegistryResult
def get_registry_output(id: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetRegistryResult]
Copy
func GetRegistry(ctx *Context, args *GetRegistryArgs, opts ...InvokeOption) (*GetRegistryResult, error)
func GetRegistryOutput(ctx *Context, args *GetRegistryOutputArgs, opts ...InvokeOption) GetRegistryResultOutput
Copy

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

public static class GetRegistry 
{
    public static Task<GetRegistryResult> InvokeAsync(GetRegistryArgs args, InvokeOptions? opts = null)
    public static Output<GetRegistryResult> Invoke(GetRegistryInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetRegistryResult> getRegistry(GetRegistryArgs args, InvokeOptions options)
public static Output<GetRegistryResult> getRegistry(GetRegistryArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: spectrocloud:index/getRegistry:getRegistry
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Name This property is required. string
Id string
The ID of this resource.
Name This property is required. string
Id string
The ID of this resource.
name This property is required. String
id String
The ID of this resource.
name This property is required. string
id string
The ID of this resource.
name This property is required. str
id str
The ID of this resource.
name This property is required. String
id String
The ID of this resource.

getRegistry Result

The following output properties are available:

Id string
The ID of this resource.
Name string
Id string
The ID of this resource.
Name string
id String
The ID of this resource.
name String
id string
The ID of this resource.
name string
id str
The ID of this resource.
name str
id String
The ID of this resource.
name String

Package Details

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