1. Packages
  2. Artifactory Provider
  3. API Docs
  4. getFileList
artifactory v8.8.1 published on Wednesday, Apr 9, 2025 by Pulumi

artifactory.getFileList

Explore with Pulumi AI

artifactory v8.8.1 published on Wednesday, Apr 9, 2025 by Pulumi

Get a flat (the default) or deep listing of the files and folders (not included by default) within a folder. For deep listing you can specify an optional depth to limit the results. Optionally include a map of metadata timestamp values as part of the result.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as artifactory from "@pulumi/artifactory";

const my_repo_file_list = artifactory.getFileList({
    repositoryKey: "my-generic-local",
    folderPath: "path/to/artifact",
});
Copy
import pulumi
import pulumi_artifactory as artifactory

my_repo_file_list = artifactory.get_file_list(repository_key="my-generic-local",
    folder_path="path/to/artifact")
Copy
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.GetFileList(ctx, &artifactory.GetFileListArgs{
			RepositoryKey: "my-generic-local",
			FolderPath:    "path/to/artifact",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Artifactory = Pulumi.Artifactory;

return await Deployment.RunAsync(() => 
{
    var my_repo_file_list = Artifactory.GetFileList.Invoke(new()
    {
        RepositoryKey = "my-generic-local",
        FolderPath = "path/to/artifact",
    });

});
Copy
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.GetFileListArgs;
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 my-repo-file-list = ArtifactoryFunctions.getFileList(GetFileListArgs.builder()
            .repositoryKey("my-generic-local")
            .folderPath("path/to/artifact")
            .build());

    }
}
Copy
variables:
  my-repo-file-list:
    fn::invoke:
      function: artifactory:getFileList
      arguments:
        repositoryKey: my-generic-local
        folderPath: path/to/artifact
Copy

Using getFileList

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 getFileList(args: GetFileListArgs, opts?: InvokeOptions): Promise<GetFileListResult>
function getFileListOutput(args: GetFileListOutputArgs, opts?: InvokeOptions): Output<GetFileListResult>
Copy
def get_file_list(deep_listing: Optional[bool] = None,
                  depth: Optional[int] = None,
                  folder_path: Optional[str] = None,
                  include_root_path: Optional[bool] = None,
                  list_folders: Optional[bool] = None,
                  metadata_timestamps: Optional[bool] = None,
                  repository_key: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetFileListResult
def get_file_list_output(deep_listing: Optional[pulumi.Input[bool]] = None,
                  depth: Optional[pulumi.Input[int]] = None,
                  folder_path: Optional[pulumi.Input[str]] = None,
                  include_root_path: Optional[pulumi.Input[bool]] = None,
                  list_folders: Optional[pulumi.Input[bool]] = None,
                  metadata_timestamps: Optional[pulumi.Input[bool]] = None,
                  repository_key: Optional[pulumi.Input[str]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[GetFileListResult]
Copy
func GetFileList(ctx *Context, args *GetFileListArgs, opts ...InvokeOption) (*GetFileListResult, error)
func GetFileListOutput(ctx *Context, args *GetFileListOutputArgs, opts ...InvokeOption) GetFileListResultOutput
Copy

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

public static class GetFileList 
{
    public static Task<GetFileListResult> InvokeAsync(GetFileListArgs args, InvokeOptions? opts = null)
    public static Output<GetFileListResult> Invoke(GetFileListInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetFileListResult> getFileList(GetFileListArgs args, InvokeOptions options)
public static Output<GetFileListResult> getFileList(GetFileListArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: artifactory:index/getFileList:getFileList
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

FolderPath This property is required. string
Path of the folder
RepositoryKey This property is required. string
Repository key
DeepListing bool
Get deep listing
Depth int
Depth of the deep listing
IncludeRootPath bool
Include root path
ListFolders bool
Include folders
MetadataTimestamps bool
Include metadata timestamps
FolderPath This property is required. string
Path of the folder
RepositoryKey This property is required. string
Repository key
DeepListing bool
Get deep listing
Depth int
Depth of the deep listing
IncludeRootPath bool
Include root path
ListFolders bool
Include folders
MetadataTimestamps bool
Include metadata timestamps
folderPath This property is required. String
Path of the folder
repositoryKey This property is required. String
Repository key
deepListing Boolean
Get deep listing
depth Integer
Depth of the deep listing
includeRootPath Boolean
Include root path
listFolders Boolean
Include folders
metadataTimestamps Boolean
Include metadata timestamps
folderPath This property is required. string
Path of the folder
repositoryKey This property is required. string
Repository key
deepListing boolean
Get deep listing
depth number
Depth of the deep listing
includeRootPath boolean
Include root path
listFolders boolean
Include folders
metadataTimestamps boolean
Include metadata timestamps
folder_path This property is required. str
Path of the folder
repository_key This property is required. str
Repository key
deep_listing bool
Get deep listing
depth int
Depth of the deep listing
include_root_path bool
Include root path
list_folders bool
Include folders
metadata_timestamps bool
Include metadata timestamps
folderPath This property is required. String
Path of the folder
repositoryKey This property is required. String
Repository key
deepListing Boolean
Get deep listing
depth Number
Depth of the deep listing
includeRootPath Boolean
Include root path
listFolders Boolean
Include folders
metadataTimestamps Boolean
Include metadata timestamps

getFileList Result

The following output properties are available:

Created string
Creation time
Files List<GetFileListFile>
A list of files.
FolderPath string
Path of the folder
Id string
The provider-assigned unique ID for this managed resource.
RepositoryKey string
Repository key
Uri string
URL to file/path
DeepListing bool
Get deep listing
Depth int
Depth of the deep listing
IncludeRootPath bool
Include root path
ListFolders bool
Include folders
MetadataTimestamps bool
Include metadata timestamps
Created string
Creation time
Files []GetFileListFile
A list of files.
FolderPath string
Path of the folder
Id string
The provider-assigned unique ID for this managed resource.
RepositoryKey string
Repository key
Uri string
URL to file/path
DeepListing bool
Get deep listing
Depth int
Depth of the deep listing
IncludeRootPath bool
Include root path
ListFolders bool
Include folders
MetadataTimestamps bool
Include metadata timestamps
created String
Creation time
files List<GetFileListFile>
A list of files.
folderPath String
Path of the folder
id String
The provider-assigned unique ID for this managed resource.
repositoryKey String
Repository key
uri String
URL to file/path
deepListing Boolean
Get deep listing
depth Integer
Depth of the deep listing
includeRootPath Boolean
Include root path
listFolders Boolean
Include folders
metadataTimestamps Boolean
Include metadata timestamps
created string
Creation time
files GetFileListFile[]
A list of files.
folderPath string
Path of the folder
id string
The provider-assigned unique ID for this managed resource.
repositoryKey string
Repository key
uri string
URL to file/path
deepListing boolean
Get deep listing
depth number
Depth of the deep listing
includeRootPath boolean
Include root path
listFolders boolean
Include folders
metadataTimestamps boolean
Include metadata timestamps
created str
Creation time
files Sequence[GetFileListFile]
A list of files.
folder_path str
Path of the folder
id str
The provider-assigned unique ID for this managed resource.
repository_key str
Repository key
uri str
URL to file/path
deep_listing bool
Get deep listing
depth int
Depth of the deep listing
include_root_path bool
Include root path
list_folders bool
Include folders
metadata_timestamps bool
Include metadata timestamps
created String
Creation time
files List<Property Map>
A list of files.
folderPath String
Path of the folder
id String
The provider-assigned unique ID for this managed resource.
repositoryKey String
Repository key
uri String
URL to file/path
deepListing Boolean
Get deep listing
depth Number
Depth of the deep listing
includeRootPath Boolean
Include root path
listFolders Boolean
Include folders
metadataTimestamps Boolean
Include metadata timestamps

Supporting Types

GetFileListFile

Folder This property is required. bool
Is this a folder
LastModified This property is required. string
Last modified time
MetadataTimestamps This property is required. GetFileListFileMetadataTimestamps
File metadata
Sha1 This property is required. string
SHA-1 checksum
Sha2 This property is required. string
SHA-256 checksum
Size This property is required. int
File size in bytes
Uri This property is required. string
URL to file
Folder This property is required. bool
Is this a folder
LastModified This property is required. string
Last modified time
MetadataTimestamps This property is required. GetFileListFileMetadataTimestamps
File metadata
Sha1 This property is required. string
SHA-1 checksum
Sha2 This property is required. string
SHA-256 checksum
Size This property is required. int
File size in bytes
Uri This property is required. string
URL to file
folder This property is required. Boolean
Is this a folder
lastModified This property is required. String
Last modified time
metadataTimestamps This property is required. GetFileListFileMetadataTimestamps
File metadata
sha1 This property is required. String
SHA-1 checksum
sha2 This property is required. String
SHA-256 checksum
size This property is required. Integer
File size in bytes
uri This property is required. String
URL to file
folder This property is required. boolean
Is this a folder
lastModified This property is required. string
Last modified time
metadataTimestamps This property is required. GetFileListFileMetadataTimestamps
File metadata
sha1 This property is required. string
SHA-1 checksum
sha2 This property is required. string
SHA-256 checksum
size This property is required. number
File size in bytes
uri This property is required. string
URL to file
folder This property is required. bool
Is this a folder
last_modified This property is required. str
Last modified time
metadata_timestamps This property is required. GetFileListFileMetadataTimestamps
File metadata
sha1 This property is required. str
SHA-1 checksum
sha2 This property is required. str
SHA-256 checksum
size This property is required. int
File size in bytes
uri This property is required. str
URL to file
folder This property is required. Boolean
Is this a folder
lastModified This property is required. String
Last modified time
metadataTimestamps This property is required. Property Map
File metadata
sha1 This property is required. String
SHA-1 checksum
sha2 This property is required. String
SHA-256 checksum
size This property is required. Number
File size in bytes
uri This property is required. String
URL to file

GetFileListFileMetadataTimestamps

Properties This property is required. string
Properties timestamp
Properties This property is required. string
Properties timestamp
properties This property is required. String
Properties timestamp
properties This property is required. string
Properties timestamp
properties This property is required. str
Properties timestamp
properties This property is required. String
Properties timestamp

Package Details

Repository
artifactory pulumi/pulumi-artifactory
License
Apache-2.0
Notes
This Pulumi package is based on the artifactory Terraform Provider.
artifactory v8.8.1 published on Wednesday, Apr 9, 2025 by Pulumi