1. Packages
  2. Artifactory
  3. API Docs
  4. getFileinfo
artifactory v6.8.4 published on Thursday, Jun 6, 2024 by Pulumi

artifactory.getFileinfo

Explore with Pulumi AI

artifactory logo
artifactory v6.8.4 published on Thursday, Jun 6, 2024 by Pulumi

    # Artifactory File Info Data Source

    Provides an Artifactory fileinfo datasource. This can be used to read metadata of files stored in Artifactory repositories.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as artifactory from "@pulumi/artifactory";
    
    // 
    const my-file = artifactory.getFileinfo({
        repository: "repo-key",
        path: "/path/to/the/artifact.zip",
    });
    
    import pulumi
    import pulumi_artifactory as artifactory
    
    # 
    my_file = artifactory.get_fileinfo(repository="repo-key",
        path="/path/to/the/artifact.zip")
    
    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.GetFileinfo(ctx, &artifactory.GetFileinfoArgs{
    			Repository: "repo-key",
    			Path:       "/path/to/the/artifact.zip",
    		}, 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_file = Artifactory.GetFileinfo.Invoke(new()
        {
            Repository = "repo-key",
            Path = "/path/to/the/artifact.zip",
        });
    
    });
    
    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.GetFileinfoArgs;
    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-file = ArtifactoryFunctions.getFileinfo(GetFileinfoArgs.builder()
                .repository("repo-key")
                .path("/path/to/the/artifact.zip")
                .build());
    
        }
    }
    
    variables:
      #
      my-file:
        fn::invoke:
          Function: artifactory:getFileinfo
          Arguments:
            repository: repo-key
            path: /path/to/the/artifact.zip
    

    Using getFileinfo

    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 getFileinfo(args: GetFileinfoArgs, opts?: InvokeOptions): Promise<GetFileinfoResult>
    function getFileinfoOutput(args: GetFileinfoOutputArgs, opts?: InvokeOptions): Output<GetFileinfoResult>
    def get_fileinfo(path: Optional[str] = None,
                     repository: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetFileinfoResult
    def get_fileinfo_output(path: Optional[pulumi.Input[str]] = None,
                     repository: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetFileinfoResult]
    func GetFileinfo(ctx *Context, args *GetFileinfoArgs, opts ...InvokeOption) (*GetFileinfoResult, error)
    func GetFileinfoOutput(ctx *Context, args *GetFileinfoOutputArgs, opts ...InvokeOption) GetFileinfoResultOutput

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

    public static class GetFileinfo 
    {
        public static Task<GetFileinfoResult> InvokeAsync(GetFileinfoArgs args, InvokeOptions? opts = null)
        public static Output<GetFileinfoResult> Invoke(GetFileinfoInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetFileinfoResult> getFileinfo(GetFileinfoArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: artifactory:index/getFileinfo:getFileinfo
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Path string
    The path to the file within the repository.
    Repository string
    Name of the repository where the file is stored.
    Path string
    The path to the file within the repository.
    Repository string
    Name of the repository where the file is stored.
    path String
    The path to the file within the repository.
    repository String
    Name of the repository where the file is stored.
    path string
    The path to the file within the repository.
    repository string
    Name of the repository where the file is stored.
    path str
    The path to the file within the repository.
    repository str
    Name of the repository where the file is stored.
    path String
    The path to the file within the repository.
    repository String
    Name of the repository where the file is stored.

    getFileinfo Result

    The following output properties are available:

    Created string
    The time & date when the file was created.
    CreatedBy string
    The user who created the file.
    DownloadUri string
    The URI that can be used to download the file.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastModified string
    The time & date when the file was last modified.
    LastUpdated string
    The time & date when the file was last updated.
    Md5 string
    MD5 checksum of the file.
    Mimetype string
    The mimetype of the file.
    ModifiedBy string
    The user who last modified the file.
    Path string
    Repository string
    Sha1 string
    SHA1 checksum of the file.
    Sha256 string
    SHA256 checksum of the file.
    Size int
    The size of the file.
    Created string
    The time & date when the file was created.
    CreatedBy string
    The user who created the file.
    DownloadUri string
    The URI that can be used to download the file.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastModified string
    The time & date when the file was last modified.
    LastUpdated string
    The time & date when the file was last updated.
    Md5 string
    MD5 checksum of the file.
    Mimetype string
    The mimetype of the file.
    ModifiedBy string
    The user who last modified the file.
    Path string
    Repository string
    Sha1 string
    SHA1 checksum of the file.
    Sha256 string
    SHA256 checksum of the file.
    Size int
    The size of the file.
    created String
    The time & date when the file was created.
    createdBy String
    The user who created the file.
    downloadUri String
    The URI that can be used to download the file.
    id String
    The provider-assigned unique ID for this managed resource.
    lastModified String
    The time & date when the file was last modified.
    lastUpdated String
    The time & date when the file was last updated.
    md5 String
    MD5 checksum of the file.
    mimetype String
    The mimetype of the file.
    modifiedBy String
    The user who last modified the file.
    path String
    repository String
    sha1 String
    SHA1 checksum of the file.
    sha256 String
    SHA256 checksum of the file.
    size Integer
    The size of the file.
    created string
    The time & date when the file was created.
    createdBy string
    The user who created the file.
    downloadUri string
    The URI that can be used to download the file.
    id string
    The provider-assigned unique ID for this managed resource.
    lastModified string
    The time & date when the file was last modified.
    lastUpdated string
    The time & date when the file was last updated.
    md5 string
    MD5 checksum of the file.
    mimetype string
    The mimetype of the file.
    modifiedBy string
    The user who last modified the file.
    path string
    repository string
    sha1 string
    SHA1 checksum of the file.
    sha256 string
    SHA256 checksum of the file.
    size number
    The size of the file.
    created str
    The time & date when the file was created.
    created_by str
    The user who created the file.
    download_uri str
    The URI that can be used to download the file.
    id str
    The provider-assigned unique ID for this managed resource.
    last_modified str
    The time & date when the file was last modified.
    last_updated str
    The time & date when the file was last updated.
    md5 str
    MD5 checksum of the file.
    mimetype str
    The mimetype of the file.
    modified_by str
    The user who last modified the file.
    path str
    repository str
    sha1 str
    SHA1 checksum of the file.
    sha256 str
    SHA256 checksum of the file.
    size int
    The size of the file.
    created String
    The time & date when the file was created.
    createdBy String
    The user who created the file.
    downloadUri String
    The URI that can be used to download the file.
    id String
    The provider-assigned unique ID for this managed resource.
    lastModified String
    The time & date when the file was last modified.
    lastUpdated String
    The time & date when the file was last updated.
    md5 String
    MD5 checksum of the file.
    mimetype String
    The mimetype of the file.
    modifiedBy String
    The user who last modified the file.
    path String
    repository String
    sha1 String
    SHA1 checksum of the file.
    sha256 String
    SHA256 checksum of the file.
    size Number
    The size of the file.

    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.8.4 published on Thursday, Jun 6, 2024 by Pulumi