artifactory v8.4.0 published on Tuesday, Nov 19, 2024 by Pulumi
artifactory.getFileList
Explore with Pulumi AI
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/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
})
}
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:
- Folder
Path string - Path of the folder
- Repository
Key string - Repository key
- Deep
Listing bool - Get deep listing
- Depth int
- Depth of the deep listing
- Include
Root boolPath - Include root path
- List
Folders bool - Include folders
- Metadata
Timestamps bool - Include metadata timestamps
- Folder
Path string - Path of the folder
- Repository
Key string - Repository key
- Deep
Listing bool - Get deep listing
- Depth int
- Depth of the deep listing
- Include
Root boolPath - Include root path
- List
Folders bool - Include folders
- Metadata
Timestamps bool - Include metadata timestamps
- folder
Path String - Path of the folder
- repository
Key String - Repository key
- deep
Listing Boolean - Get deep listing
- depth Integer
- Depth of the deep listing
- include
Root BooleanPath - Include root path
- list
Folders Boolean - Include folders
- metadata
Timestamps Boolean - Include metadata timestamps
- folder
Path string - Path of the folder
- repository
Key string - Repository key
- deep
Listing boolean - Get deep listing
- depth number
- Depth of the deep listing
- include
Root booleanPath - Include root path
- list
Folders boolean - Include folders
- metadata
Timestamps 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_ boolpath - Include root path
- list_
folders bool - Include folders
- metadata_
timestamps bool - Include metadata timestamps
- folder
Path String - Path of the folder
- repository
Key String - Repository key
- deep
Listing Boolean - Get deep listing
- depth Number
- Depth of the deep listing
- include
Root BooleanPath - Include root path
- list
Folders Boolean - Include folders
- metadata
Timestamps Boolean - Include metadata timestamps
getFileList Result
The following output properties are available:
- Created string
- Creation time
- Files
List<Get
File List File> - A list of files.
- Folder
Path string - Path of the folder
- Id string
- The provider-assigned unique ID for this managed resource.
- Repository
Key string - Repository key
- Uri string
- URL to file/path
- Deep
Listing bool - Get deep listing
- Depth int
- Depth of the deep listing
- Include
Root boolPath - Include root path
- List
Folders bool - Include folders
- Metadata
Timestamps bool - Include metadata timestamps
- Created string
- Creation time
- Files
[]Get
File List File - A list of files.
- Folder
Path string - Path of the folder
- Id string
- The provider-assigned unique ID for this managed resource.
- Repository
Key string - Repository key
- Uri string
- URL to file/path
- Deep
Listing bool - Get deep listing
- Depth int
- Depth of the deep listing
- Include
Root boolPath - Include root path
- List
Folders bool - Include folders
- Metadata
Timestamps bool - Include metadata timestamps
- created String
- Creation time
- files
List<Get
File List File> - A list of files.
- folder
Path String - Path of the folder
- id String
- The provider-assigned unique ID for this managed resource.
- repository
Key String - Repository key
- uri String
- URL to file/path
- deep
Listing Boolean - Get deep listing
- depth Integer
- Depth of the deep listing
- include
Root BooleanPath - Include root path
- list
Folders Boolean - Include folders
- metadata
Timestamps Boolean - Include metadata timestamps
- created string
- Creation time
- files
Get
File List File[] - A list of files.
- folder
Path string - Path of the folder
- id string
- The provider-assigned unique ID for this managed resource.
- repository
Key string - Repository key
- uri string
- URL to file/path
- deep
Listing boolean - Get deep listing
- depth number
- Depth of the deep listing
- include
Root booleanPath - Include root path
- list
Folders boolean - Include folders
- metadata
Timestamps boolean - Include metadata timestamps
- created str
- Creation time
- files
Sequence[Get
File List File] - 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_ boolpath - 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.
- folder
Path String - Path of the folder
- id String
- The provider-assigned unique ID for this managed resource.
- repository
Key String - Repository key
- uri String
- URL to file/path
- deep
Listing Boolean - Get deep listing
- depth Number
- Depth of the deep listing
- include
Root BooleanPath - Include root path
- list
Folders Boolean - Include folders
- metadata
Timestamps Boolean - Include metadata timestamps
Supporting Types
GetFileListFile
- Folder bool
- Is this a folder
- Last
Modified string - Last modified time
- Metadata
Timestamps GetFile List File Metadata Timestamps - 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
- Last
Modified string - Last modified time
- Metadata
Timestamps GetFile List File Metadata Timestamps - 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
- last
Modified String - Last modified time
- metadata
Timestamps GetFile List File Metadata Timestamps - 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
- last
Modified string - Last modified time
- metadata
Timestamps GetFile List File Metadata Timestamps - 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 GetFile List File Metadata Timestamps - 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
- last
Modified String - Last modified time
- metadata
Timestamps 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.