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

nexus.getRepositoryNpmHosted

Explore with Pulumi AI

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

    Use this data source to get an existing hosted npm repository.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as nexus from "@pulumi/nexus";
    
    const npm = nexus.getRepositoryNpmHosted({
        name: "npm",
    });
    
    import pulumi
    import pulumi_nexus as nexus
    
    npm = nexus.get_repository_npm_hosted(name="npm")
    
    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 {
    		_, err := nexus.LookupRepositoryNpmHosted(ctx, &nexus.LookupRepositoryNpmHostedArgs{
    			Name: "npm",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Nexus = Pulumi.Nexus;
    
    return await Deployment.RunAsync(() => 
    {
        var npm = Nexus.GetRepositoryNpmHosted.Invoke(new()
        {
            Name = "npm",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.nexus.NexusFunctions;
    import com.pulumi.nexus.inputs.GetRepositoryNpmHostedArgs;
    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 npm = NexusFunctions.getRepositoryNpmHosted(GetRepositoryNpmHostedArgs.builder()
                .name("npm")
                .build());
    
        }
    }
    
    variables:
      npm:
        fn::invoke:
          function: nexus:getRepositoryNpmHosted
          arguments:
            name: npm
    

    Using getRepositoryNpmHosted

    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 getRepositoryNpmHosted(args: GetRepositoryNpmHostedArgs, opts?: InvokeOptions): Promise<GetRepositoryNpmHostedResult>
    function getRepositoryNpmHostedOutput(args: GetRepositoryNpmHostedOutputArgs, opts?: InvokeOptions): Output<GetRepositoryNpmHostedResult>
    def get_repository_npm_hosted(name: Optional[str] = None,
                                  opts: Optional[InvokeOptions] = None) -> GetRepositoryNpmHostedResult
    def get_repository_npm_hosted_output(name: Optional[pulumi.Input[str]] = None,
                                  opts: Optional[InvokeOptions] = None) -> Output[GetRepositoryNpmHostedResult]
    func LookupRepositoryNpmHosted(ctx *Context, args *LookupRepositoryNpmHostedArgs, opts ...InvokeOption) (*LookupRepositoryNpmHostedResult, error)
    func LookupRepositoryNpmHostedOutput(ctx *Context, args *LookupRepositoryNpmHostedOutputArgs, opts ...InvokeOption) LookupRepositoryNpmHostedResultOutput

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

    public static class GetRepositoryNpmHosted 
    {
        public static Task<GetRepositoryNpmHostedResult> InvokeAsync(GetRepositoryNpmHostedArgs args, InvokeOptions? opts = null)
        public static Output<GetRepositoryNpmHostedResult> Invoke(GetRepositoryNpmHostedInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetRepositoryNpmHostedResult> getRepositoryNpmHosted(GetRepositoryNpmHostedArgs args, InvokeOptions options)
    public static Output<GetRepositoryNpmHostedResult> getRepositoryNpmHosted(GetRepositoryNpmHostedArgs args, InvokeOptions options)
    
    fn::invoke:
      function: nexus:index/getRepositoryNpmHosted:getRepositoryNpmHosted
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    A unique identifier for this repository
    Name string
    A unique identifier for this repository
    name String
    A unique identifier for this repository
    name string
    A unique identifier for this repository
    name str
    A unique identifier for this repository
    name String
    A unique identifier for this repository

    getRepositoryNpmHosted Result

    The following output properties are available:

    Cleanups List<GetRepositoryNpmHostedCleanup>
    Cleanup policies
    Components List<GetRepositoryNpmHostedComponent>
    Component configuration for the hosted repository
    Id string
    Used to identify data source at nexus
    Name string
    A unique identifier for this repository
    Online bool
    Whether this repository accepts incoming requests
    Storages List<GetRepositoryNpmHostedStorage>
    The storage configuration of the repository
    Cleanups []GetRepositoryNpmHostedCleanup
    Cleanup policies
    Components []GetRepositoryNpmHostedComponent
    Component configuration for the hosted repository
    Id string
    Used to identify data source at nexus
    Name string
    A unique identifier for this repository
    Online bool
    Whether this repository accepts incoming requests
    Storages []GetRepositoryNpmHostedStorage
    The storage configuration of the repository
    cleanups List<GetRepositoryNpmHostedCleanup>
    Cleanup policies
    components List<GetRepositoryNpmHostedComponent>
    Component configuration for the hosted repository
    id String
    Used to identify data source at nexus
    name String
    A unique identifier for this repository
    online Boolean
    Whether this repository accepts incoming requests
    storages List<GetRepositoryNpmHostedStorage>
    The storage configuration of the repository
    cleanups GetRepositoryNpmHostedCleanup[]
    Cleanup policies
    components GetRepositoryNpmHostedComponent[]
    Component configuration for the hosted repository
    id string
    Used to identify data source at nexus
    name string
    A unique identifier for this repository
    online boolean
    Whether this repository accepts incoming requests
    storages GetRepositoryNpmHostedStorage[]
    The storage configuration of the repository
    cleanups Sequence[GetRepositoryNpmHostedCleanup]
    Cleanup policies
    components Sequence[GetRepositoryNpmHostedComponent]
    Component configuration for the hosted repository
    id str
    Used to identify data source at nexus
    name str
    A unique identifier for this repository
    online bool
    Whether this repository accepts incoming requests
    storages Sequence[GetRepositoryNpmHostedStorage]
    The storage configuration of the repository
    cleanups List<Property Map>
    Cleanup policies
    components List<Property Map>
    Component configuration for the hosted repository
    id String
    Used to identify data source at nexus
    name String
    A unique identifier for this repository
    online Boolean
    Whether this repository accepts incoming requests
    storages List<Property Map>
    The storage configuration of the repository

    Supporting Types

    GetRepositoryNpmHostedCleanup

    PolicyNames List<string>
    PolicyNames []string
    policyNames List<String>
    policyNames string[]
    policy_names Sequence[str]
    policyNames List<String>

    GetRepositoryNpmHostedComponent

    GetRepositoryNpmHostedStorage

    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