1. Packages
  2. Nexus Provider
  3. API Docs
  4. getSecurityUserToken
nexus 2.5.0 published on Monday, Apr 14, 2025 by datadrivers

nexus.getSecurityUserToken

Explore with Pulumi AI

nexus logo
nexus 2.5.0 published on Monday, Apr 14, 2025 by datadrivers

    PRO Feature

    Use this data source to get the global user-token configuration.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as nexus from "@pulumi/nexus";
    
    const nexus = nexus.getSecurityUserToken({});
    export const nexusUserTokenEnabled = nexus.then(nexus => nexus.enabled);
    
    import pulumi
    import pulumi_nexus as nexus
    
    nexus = nexus.get_security_user_token()
    pulumi.export("nexusUserTokenEnabled", nexus.enabled)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/nexus/v2/nexus"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		nexus, err := nexus.LookupSecurityUserToken(ctx, map[string]interface{}{}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("nexusUserTokenEnabled", nexus.Enabled)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Nexus = Pulumi.Nexus;
    
    return await Deployment.RunAsync(() => 
    {
        var nexus = Nexus.GetSecurityUserToken.Invoke();
    
        return new Dictionary<string, object?>
        {
            ["nexusUserTokenEnabled"] = nexus.Apply(getSecurityUserTokenResult => getSecurityUserTokenResult.Enabled),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.nexus.NexusFunctions;
    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 nexus = NexusFunctions.getSecurityUserToken();
    
            ctx.export("nexusUserTokenEnabled", nexus.applyValue(getSecurityUserTokenResult -> getSecurityUserTokenResult.enabled()));
        }
    }
    
    variables:
      nexus:
        fn::invoke:
          function: nexus:getSecurityUserToken
          arguments: {}
    outputs:
      nexusUserTokenEnabled: ${nexus.enabled}
    

    Using getSecurityUserToken

    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 getSecurityUserToken(opts?: InvokeOptions): Promise<GetSecurityUserTokenResult>
    function getSecurityUserTokenOutput(opts?: InvokeOptions): Output<GetSecurityUserTokenResult>
    def get_security_user_token(opts: Optional[InvokeOptions] = None) -> GetSecurityUserTokenResult
    def get_security_user_token_output(opts: Optional[InvokeOptions] = None) -> Output[GetSecurityUserTokenResult]
    func LookupSecurityUserToken(ctx *Context, opts ...InvokeOption) (*LookupSecurityUserTokenResult, error)
    func LookupSecurityUserTokenOutput(ctx *Context, opts ...InvokeOption) LookupSecurityUserTokenResultOutput

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

    public static class GetSecurityUserToken 
    {
        public static Task<GetSecurityUserTokenResult> InvokeAsync(InvokeOptions? opts = null)
        public static Output<GetSecurityUserTokenResult> Invoke(InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetSecurityUserTokenResult> getSecurityUserToken(InvokeOptions options)
    public static Output<GetSecurityUserTokenResult> getSecurityUserToken(InvokeOptions options)
    
    fn::invoke:
      function: nexus:index/getSecurityUserToken:getSecurityUserToken
      arguments:
        # arguments dictionary

    getSecurityUserToken Result

    The following output properties are available:

    Enabled bool
    Activation of the user tokens feature.
    ExpirationDays double
    Number of days user tokens remain valid.
    ExpirationEnabled bool
    Activation of the user tokens expiration feature.
    Id string
    Used to identify data source at nexus
    ProtectContent bool
    Require user tokens for repository authentication. This does not effect UI access.
    Enabled bool
    Activation of the user tokens feature.
    ExpirationDays float64
    Number of days user tokens remain valid.
    ExpirationEnabled bool
    Activation of the user tokens expiration feature.
    Id string
    Used to identify data source at nexus
    ProtectContent bool
    Require user tokens for repository authentication. This does not effect UI access.
    enabled Boolean
    Activation of the user tokens feature.
    expirationDays Double
    Number of days user tokens remain valid.
    expirationEnabled Boolean
    Activation of the user tokens expiration feature.
    id String
    Used to identify data source at nexus
    protectContent Boolean
    Require user tokens for repository authentication. This does not effect UI access.
    enabled boolean
    Activation of the user tokens feature.
    expirationDays number
    Number of days user tokens remain valid.
    expirationEnabled boolean
    Activation of the user tokens expiration feature.
    id string
    Used to identify data source at nexus
    protectContent boolean
    Require user tokens for repository authentication. This does not effect UI access.
    enabled bool
    Activation of the user tokens feature.
    expiration_days float
    Number of days user tokens remain valid.
    expiration_enabled bool
    Activation of the user tokens expiration feature.
    id str
    Used to identify data source at nexus
    protect_content bool
    Require user tokens for repository authentication. This does not effect UI access.
    enabled Boolean
    Activation of the user tokens feature.
    expirationDays Number
    Number of days user tokens remain valid.
    expirationEnabled Boolean
    Activation of the user tokens expiration feature.
    id String
    Used to identify data source at nexus
    protectContent Boolean
    Require user tokens for repository authentication. This does not effect UI access.

    Package Details

    Repository
    nexus datadrivers/terraform-provider-nexus
    License
    Notes
    This Pulumi package is based on the nexus Terraform Provider.
    nexus logo
    nexus 2.5.0 published on Monday, Apr 14, 2025 by datadrivers