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

spectrocloud.getRegistrationToken

Explore with Pulumi AI

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

    A data source for retrieving information about an registration token registered in Palette.

    Example Usage

    An example of how to use this data source to retrieve a specific registration token in Palette.

    import * as pulumi from "@pulumi/pulumi";
    import * as spectrocloud from "@pulumi/spectrocloud";
    
    const tf = spectrocloud.getRegistrationToken({
        name: "ran-dev-test",
    });
    export const token = tf.then(tf => tf.token);
    
    import pulumi
    import pulumi_spectrocloud as spectrocloud
    
    tf = spectrocloud.get_registration_token(name="ran-dev-test")
    pulumi.export("token", tf.token)
    
    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 {
    		tf, err := spectrocloud.LookupRegistrationToken(ctx, &spectrocloud.LookupRegistrationTokenArgs{
    			Name: pulumi.StringRef("ran-dev-test"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("token", tf.Token)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Spectrocloud = Pulumi.Spectrocloud;
    
    return await Deployment.RunAsync(() => 
    {
        var tf = Spectrocloud.GetRegistrationToken.Invoke(new()
        {
            Name = "ran-dev-test",
        });
    
        return new Dictionary<string, object?>
        {
            ["token"] = tf.Apply(getRegistrationTokenResult => getRegistrationTokenResult.Token),
        };
    });
    
    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.GetRegistrationTokenArgs;
    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 tf = SpectrocloudFunctions.getRegistrationToken(GetRegistrationTokenArgs.builder()
                .name("ran-dev-test")
                .build());
    
            ctx.export("token", tf.applyValue(getRegistrationTokenResult -> getRegistrationTokenResult.token()));
        }
    }
    
    variables:
      tf:
        fn::invoke:
          function: spectrocloud:getRegistrationToken
          arguments:
            name: ran-dev-test
    outputs:
      token: ${tf.token}
    

    Using getRegistrationToken

    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 getRegistrationToken(args: GetRegistrationTokenArgs, opts?: InvokeOptions): Promise<GetRegistrationTokenResult>
    function getRegistrationTokenOutput(args: GetRegistrationTokenOutputArgs, opts?: InvokeOptions): Output<GetRegistrationTokenResult>
    def get_registration_token(id: Optional[str] = None,
                               name: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetRegistrationTokenResult
    def get_registration_token_output(id: Optional[pulumi.Input[str]] = None,
                               name: Optional[pulumi.Input[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetRegistrationTokenResult]
    func LookupRegistrationToken(ctx *Context, args *LookupRegistrationTokenArgs, opts ...InvokeOption) (*LookupRegistrationTokenResult, error)
    func LookupRegistrationTokenOutput(ctx *Context, args *LookupRegistrationTokenOutputArgs, opts ...InvokeOption) LookupRegistrationTokenResultOutput

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

    public static class GetRegistrationToken 
    {
        public static Task<GetRegistrationTokenResult> InvokeAsync(GetRegistrationTokenArgs args, InvokeOptions? opts = null)
        public static Output<GetRegistrationTokenResult> Invoke(GetRegistrationTokenInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetRegistrationTokenResult> getRegistrationToken(GetRegistrationTokenArgs args, InvokeOptions options)
    public static Output<GetRegistrationTokenResult> getRegistrationToken(GetRegistrationTokenArgs args, InvokeOptions options)
    
    fn::invoke:
      function: spectrocloud:index/getRegistrationToken:getRegistrationToken
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    The UID of the registration token.
    Name string
    The name of the registration token.
    Id string
    The UID of the registration token.
    Name string
    The name of the registration token.
    id String
    The UID of the registration token.
    name String
    The name of the registration token.
    id string
    The UID of the registration token.
    name string
    The name of the registration token.
    id str
    The UID of the registration token.
    name str
    The name of the registration token.
    id String
    The UID of the registration token.
    name String
    The name of the registration token.

    getRegistrationToken Result

    The following output properties are available:

    ExpiryDate string
    The expiration date of the registration token in YYYY-MM-DD format.
    Id string
    The UID of the registration token.
    ProjectUid string
    The unique identifier of the project associated with the registration token.
    Status string
    The status of the registration token. Allowed values are active or inactive. Default is active.
    Token string
    The registration token
    Name string
    The name of the registration token.
    ExpiryDate string
    The expiration date of the registration token in YYYY-MM-DD format.
    Id string
    The UID of the registration token.
    ProjectUid string
    The unique identifier of the project associated with the registration token.
    Status string
    The status of the registration token. Allowed values are active or inactive. Default is active.
    Token string
    The registration token
    Name string
    The name of the registration token.
    expiryDate String
    The expiration date of the registration token in YYYY-MM-DD format.
    id String
    The UID of the registration token.
    projectUid String
    The unique identifier of the project associated with the registration token.
    status String
    The status of the registration token. Allowed values are active or inactive. Default is active.
    token String
    The registration token
    name String
    The name of the registration token.
    expiryDate string
    The expiration date of the registration token in YYYY-MM-DD format.
    id string
    The UID of the registration token.
    projectUid string
    The unique identifier of the project associated with the registration token.
    status string
    The status of the registration token. Allowed values are active or inactive. Default is active.
    token string
    The registration token
    name string
    The name of the registration token.
    expiry_date str
    The expiration date of the registration token in YYYY-MM-DD format.
    id str
    The UID of the registration token.
    project_uid str
    The unique identifier of the project associated with the registration token.
    status str
    The status of the registration token. Allowed values are active or inactive. Default is active.
    token str
    The registration token
    name str
    The name of the registration token.
    expiryDate String
    The expiration date of the registration token in YYYY-MM-DD format.
    id String
    The UID of the registration token.
    projectUid String
    The unique identifier of the project associated with the registration token.
    status String
    The status of the registration token. Allowed values are active or inactive. Default is active.
    token String
    The registration token
    name String
    The name of the registration token.

    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