artifactory v8.8.0 published on Friday, Mar 7, 2025 by Pulumi
artifactory.getVirtualNpmRepository
Explore with Pulumi AI
Retrieves a virtual NPM repository.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as artifactory from "@pulumi/artifactory";
const virtual_npm = artifactory.getVirtualNpmRepository({
    key: "virtual-npm",
});
import pulumi
import pulumi_artifactory as artifactory
virtual_npm = artifactory.get_virtual_npm_repository(key="virtual-npm")
package main
import (
	"github.com/pulumi/pulumi-artifactory/sdk/v8/go/artifactory"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := artifactory.LookupVirtualNpmRepository(ctx, &artifactory.LookupVirtualNpmRepositoryArgs{
			Key: "virtual-npm",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Artifactory = Pulumi.Artifactory;
return await Deployment.RunAsync(() => 
{
    var virtual_npm = Artifactory.GetVirtualNpmRepository.Invoke(new()
    {
        Key = "virtual-npm",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.artifactory.ArtifactoryFunctions;
import com.pulumi.artifactory.inputs.GetVirtualNpmRepositoryArgs;
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 virtual-npm = ArtifactoryFunctions.getVirtualNpmRepository(GetVirtualNpmRepositoryArgs.builder()
            .key("virtual-npm")
            .build());
    }
}
variables:
  virtual-npm:
    fn::invoke:
      function: artifactory:getVirtualNpmRepository
      arguments:
        key: virtual-npm
Using getVirtualNpmRepository
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 getVirtualNpmRepository(args: GetVirtualNpmRepositoryArgs, opts?: InvokeOptions): Promise<GetVirtualNpmRepositoryResult>
function getVirtualNpmRepositoryOutput(args: GetVirtualNpmRepositoryOutputArgs, opts?: InvokeOptions): Output<GetVirtualNpmRepositoryResult>def get_virtual_npm_repository(artifactory_requests_can_retrieve_remote_artifacts: Optional[bool] = None,
                               default_deployment_repo: Optional[str] = None,
                               description: Optional[str] = None,
                               excludes_pattern: Optional[str] = None,
                               external_dependencies_enabled: Optional[bool] = None,
                               external_dependencies_patterns: Optional[Sequence[str]] = None,
                               external_dependencies_remote_repo: Optional[str] = None,
                               includes_pattern: Optional[str] = None,
                               key: Optional[str] = None,
                               notes: Optional[str] = None,
                               project_environments: Optional[Sequence[str]] = None,
                               project_key: Optional[str] = None,
                               repo_layout_ref: Optional[str] = None,
                               repositories: Optional[Sequence[str]] = None,
                               retrieval_cache_period_seconds: Optional[int] = None,
                               opts: Optional[InvokeOptions] = None) -> GetVirtualNpmRepositoryResult
def get_virtual_npm_repository_output(artifactory_requests_can_retrieve_remote_artifacts: Optional[pulumi.Input[bool]] = None,
                               default_deployment_repo: Optional[pulumi.Input[str]] = None,
                               description: Optional[pulumi.Input[str]] = None,
                               excludes_pattern: Optional[pulumi.Input[str]] = None,
                               external_dependencies_enabled: Optional[pulumi.Input[bool]] = None,
                               external_dependencies_patterns: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                               external_dependencies_remote_repo: Optional[pulumi.Input[str]] = None,
                               includes_pattern: Optional[pulumi.Input[str]] = None,
                               key: Optional[pulumi.Input[str]] = None,
                               notes: Optional[pulumi.Input[str]] = None,
                               project_environments: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                               project_key: Optional[pulumi.Input[str]] = None,
                               repo_layout_ref: Optional[pulumi.Input[str]] = None,
                               repositories: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                               retrieval_cache_period_seconds: Optional[pulumi.Input[int]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetVirtualNpmRepositoryResult]func LookupVirtualNpmRepository(ctx *Context, args *LookupVirtualNpmRepositoryArgs, opts ...InvokeOption) (*LookupVirtualNpmRepositoryResult, error)
func LookupVirtualNpmRepositoryOutput(ctx *Context, args *LookupVirtualNpmRepositoryOutputArgs, opts ...InvokeOption) LookupVirtualNpmRepositoryResultOutput> Note: This function is named LookupVirtualNpmRepository in the Go SDK.
public static class GetVirtualNpmRepository 
{
    public static Task<GetVirtualNpmRepositoryResult> InvokeAsync(GetVirtualNpmRepositoryArgs args, InvokeOptions? opts = null)
    public static Output<GetVirtualNpmRepositoryResult> Invoke(GetVirtualNpmRepositoryInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetVirtualNpmRepositoryResult> getVirtualNpmRepository(GetVirtualNpmRepositoryArgs args, InvokeOptions options)
public static Output<GetVirtualNpmRepositoryResult> getVirtualNpmRepository(GetVirtualNpmRepositoryArgs args, InvokeOptions options)
fn::invoke:
  function: artifactory:index/getVirtualNpmRepository:getVirtualNpmRepository
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Key string
- the identity key of the repo.
- ArtifactoryRequests boolCan Retrieve Remote Artifacts 
- DefaultDeployment stringRepo 
- Description string
- ExcludesPattern string
- ExternalDependencies boolEnabled 
- ExternalDependencies List<string>Patterns 
- ExternalDependencies stringRemote Repo 
- IncludesPattern string
- Notes string
- ProjectEnvironments List<string>
- ProjectKey string
- RepoLayout stringRef 
- Repositories List<string>
- RetrievalCache intPeriod Seconds 
- (Optional, Default: 7200) This value refers to the number of seconds to cache metadata files before checking for newer versions on aggregated repositories. A value of 0 indicates no caching.
- Key string
- the identity key of the repo.
- ArtifactoryRequests boolCan Retrieve Remote Artifacts 
- DefaultDeployment stringRepo 
- Description string
- ExcludesPattern string
- ExternalDependencies boolEnabled 
- ExternalDependencies []stringPatterns 
- ExternalDependencies stringRemote Repo 
- IncludesPattern string
- Notes string
- ProjectEnvironments []string
- ProjectKey string
- RepoLayout stringRef 
- Repositories []string
- RetrievalCache intPeriod Seconds 
- (Optional, Default: 7200) This value refers to the number of seconds to cache metadata files before checking for newer versions on aggregated repositories. A value of 0 indicates no caching.
- key String
- the identity key of the repo.
- artifactoryRequests BooleanCan Retrieve Remote Artifacts 
- defaultDeployment StringRepo 
- description String
- excludesPattern String
- externalDependencies BooleanEnabled 
- externalDependencies List<String>Patterns 
- externalDependencies StringRemote Repo 
- includesPattern String
- notes String
- projectEnvironments List<String>
- projectKey String
- repoLayout StringRef 
- repositories List<String>
- retrievalCache IntegerPeriod Seconds 
- (Optional, Default: 7200) This value refers to the number of seconds to cache metadata files before checking for newer versions on aggregated repositories. A value of 0 indicates no caching.
- key string
- the identity key of the repo.
- artifactoryRequests booleanCan Retrieve Remote Artifacts 
- defaultDeployment stringRepo 
- description string
- excludesPattern string
- externalDependencies booleanEnabled 
- externalDependencies string[]Patterns 
- externalDependencies stringRemote Repo 
- includesPattern string
- notes string
- projectEnvironments string[]
- projectKey string
- repoLayout stringRef 
- repositories string[]
- retrievalCache numberPeriod Seconds 
- (Optional, Default: 7200) This value refers to the number of seconds to cache metadata files before checking for newer versions on aggregated repositories. A value of 0 indicates no caching.
- key str
- the identity key of the repo.
- artifactory_requests_ boolcan_ retrieve_ remote_ artifacts 
- default_deployment_ strrepo 
- description str
- excludes_pattern str
- external_dependencies_ boolenabled 
- external_dependencies_ Sequence[str]patterns 
- external_dependencies_ strremote_ repo 
- includes_pattern str
- notes str
- project_environments Sequence[str]
- project_key str
- repo_layout_ strref 
- repositories Sequence[str]
- retrieval_cache_ intperiod_ seconds 
- (Optional, Default: 7200) This value refers to the number of seconds to cache metadata files before checking for newer versions on aggregated repositories. A value of 0 indicates no caching.
- key String
- the identity key of the repo.
- artifactoryRequests BooleanCan Retrieve Remote Artifacts 
- defaultDeployment StringRepo 
- description String
- excludesPattern String
- externalDependencies BooleanEnabled 
- externalDependencies List<String>Patterns 
- externalDependencies StringRemote Repo 
- includesPattern String
- notes String
- projectEnvironments List<String>
- projectKey String
- repoLayout StringRef 
- repositories List<String>
- retrievalCache NumberPeriod Seconds 
- (Optional, Default: 7200) This value refers to the number of seconds to cache metadata files before checking for newer versions on aggregated repositories. A value of 0 indicates no caching.
getVirtualNpmRepository Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Key string
- PackageType string
- ProjectEnvironments List<string>
- ArtifactoryRequests boolCan Retrieve Remote Artifacts 
- DefaultDeployment stringRepo 
- Description string
- ExcludesPattern string
- ExternalDependencies boolEnabled 
- ExternalDependencies List<string>Patterns 
- ExternalDependencies stringRemote Repo 
- IncludesPattern string
- Notes string
- ProjectKey string
- RepoLayout stringRef 
- Repositories List<string>
- RetrievalCache intPeriod Seconds 
- (Optional, Default: 7200) This value refers to the number of seconds to cache metadata files before checking for newer versions on aggregated repositories. A value of 0 indicates no caching.
- Id string
- The provider-assigned unique ID for this managed resource.
- Key string
- PackageType string
- ProjectEnvironments []string
- ArtifactoryRequests boolCan Retrieve Remote Artifacts 
- DefaultDeployment stringRepo 
- Description string
- ExcludesPattern string
- ExternalDependencies boolEnabled 
- ExternalDependencies []stringPatterns 
- ExternalDependencies stringRemote Repo 
- IncludesPattern string
- Notes string
- ProjectKey string
- RepoLayout stringRef 
- Repositories []string
- RetrievalCache intPeriod Seconds 
- (Optional, Default: 7200) This value refers to the number of seconds to cache metadata files before checking for newer versions on aggregated repositories. A value of 0 indicates no caching.
- id String
- The provider-assigned unique ID for this managed resource.
- key String
- packageType String
- projectEnvironments List<String>
- artifactoryRequests BooleanCan Retrieve Remote Artifacts 
- defaultDeployment StringRepo 
- description String
- excludesPattern String
- externalDependencies BooleanEnabled 
- externalDependencies List<String>Patterns 
- externalDependencies StringRemote Repo 
- includesPattern String
- notes String
- projectKey String
- repoLayout StringRef 
- repositories List<String>
- retrievalCache IntegerPeriod Seconds 
- (Optional, Default: 7200) This value refers to the number of seconds to cache metadata files before checking for newer versions on aggregated repositories. A value of 0 indicates no caching.
- id string
- The provider-assigned unique ID for this managed resource.
- key string
- packageType string
- projectEnvironments string[]
- artifactoryRequests booleanCan Retrieve Remote Artifacts 
- defaultDeployment stringRepo 
- description string
- excludesPattern string
- externalDependencies booleanEnabled 
- externalDependencies string[]Patterns 
- externalDependencies stringRemote Repo 
- includesPattern string
- notes string
- projectKey string
- repoLayout stringRef 
- repositories string[]
- retrievalCache numberPeriod Seconds 
- (Optional, Default: 7200) This value refers to the number of seconds to cache metadata files before checking for newer versions on aggregated repositories. A value of 0 indicates no caching.
- id str
- The provider-assigned unique ID for this managed resource.
- key str
- package_type str
- project_environments Sequence[str]
- artifactory_requests_ boolcan_ retrieve_ remote_ artifacts 
- default_deployment_ strrepo 
- description str
- excludes_pattern str
- external_dependencies_ boolenabled 
- external_dependencies_ Sequence[str]patterns 
- external_dependencies_ strremote_ repo 
- includes_pattern str
- notes str
- project_key str
- repo_layout_ strref 
- repositories Sequence[str]
- retrieval_cache_ intperiod_ seconds 
- (Optional, Default: 7200) This value refers to the number of seconds to cache metadata files before checking for newer versions on aggregated repositories. A value of 0 indicates no caching.
- id String
- The provider-assigned unique ID for this managed resource.
- key String
- packageType String
- projectEnvironments List<String>
- artifactoryRequests BooleanCan Retrieve Remote Artifacts 
- defaultDeployment StringRepo 
- description String
- excludesPattern String
- externalDependencies BooleanEnabled 
- externalDependencies List<String>Patterns 
- externalDependencies StringRemote Repo 
- includesPattern String
- notes String
- projectKey String
- repoLayout StringRef 
- repositories List<String>
- retrievalCache NumberPeriod Seconds 
- (Optional, Default: 7200) This value refers to the number of seconds to cache metadata files before checking for newer versions on aggregated repositories. A value of 0 indicates no caching.
Package Details
- Repository
- artifactory pulumi/pulumi-artifactory
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the artifactoryTerraform Provider.