1. Packages
  2. Artifactory
  3. API Docs
  4. getFileList
artifactory v6.7.1 published on Friday, Apr 26, 2024 by Pulumi

artifactory.getFileList

Explore with Pulumi AI

artifactory logo
artifactory v6.7.1 published on Friday, Apr 26, 2024 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",
    });
    
    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")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-artifactory/sdk/v6/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
    	})
    }
    
    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",
        });
    
    });
    
    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());
    
        }
    }
    
    variables:
      my-repo-file-list:
        fn::invoke:
          Function: artifactory:getFileList
          Arguments:
            repositoryKey: my-generic-local
            folderPath: path/to/artifact
    

    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>
    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]
    func GetFileList(ctx *Context, args *GetFileListArgs, opts ...InvokeOption) (*GetFileListResult, error)
    func GetFileListOutput(ctx *Context, args *GetFileListOutputArgs, opts ...InvokeOption) GetFileListResultOutput

    > 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)
    }
    public static CompletableFuture<GetFileListResult> getFileList(GetFileListArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: artifactory:index/getFileList:getFileList
      arguments:
        # arguments dictionary

    The following arguments are supported:

    FolderPath string
    Path of the folder
    RepositoryKey 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 string
    Path of the folder
    RepositoryKey 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 String
    Path of the folder
    repositoryKey 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 string
    Path of the folder
    repositoryKey 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 str
    Path of the folder
    repository_key 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 String
    Path of the folder
    repositoryKey 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 bool
    Is this a folder
    LastModified string
    Last modified time
    MetadataTimestamps GetFileListFileMetadataTimestamps
    File metadata
    Sha1 string
    SHA-1 checksum
    Sha2 string
    SHA-256 checksum
    Size int
    File size in bytes
    Uri string
    URL to file
    Folder bool
    Is this a folder
    LastModified string
    Last modified time
    MetadataTimestamps GetFileListFileMetadataTimestamps
    File metadata
    Sha1 string
    SHA-1 checksum
    Sha2 string
    SHA-256 checksum
    Size int
    File size in bytes
    Uri string
    URL to file
    folder Boolean
    Is this a folder
    lastModified String
    Last modified time
    metadataTimestamps GetFileListFileMetadataTimestamps
    File metadata
    sha1 String
    SHA-1 checksum
    sha2 String
    SHA-256 checksum
    size Integer
    File size in bytes
    uri String
    URL to file
    folder boolean
    Is this a folder
    lastModified string
    Last modified time
    metadataTimestamps GetFileListFileMetadataTimestamps
    File metadata
    sha1 string
    SHA-1 checksum
    sha2 string
    SHA-256 checksum
    size number
    File size in bytes
    uri string
    URL to file
    folder bool
    Is this a folder
    last_modified str
    Last modified time
    metadata_timestamps GetFileListFileMetadataTimestamps
    File metadata
    sha1 str
    SHA-1 checksum
    sha2 str
    SHA-256 checksum
    size int
    File size in bytes
    uri str
    URL to file
    folder Boolean
    Is this a folder
    lastModified String
    Last modified time
    metadataTimestamps Property Map
    File metadata
    sha1 String
    SHA-1 checksum
    sha2 String
    SHA-256 checksum
    size Number
    File size in bytes
    uri String
    URL to file

    GetFileListFileMetadataTimestamps

    Properties string
    Properties timestamp
    Properties string
    Properties timestamp
    properties String
    Properties timestamp
    properties string
    Properties timestamp
    properties str
    Properties timestamp
    properties 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 logo
    artifactory v6.7.1 published on Friday, Apr 26, 2024 by Pulumi