Artifactory

Pulumi Official
Package maintained by Pulumi
v2.6.1 published on Tuesday, Aug 16, 2022 by Pulumi

getFileinfo

# 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

using System.Collections.Generic;
using Pulumi;
using Artifactory = Pulumi.Artifactory;

return await Deployment.RunAsync(() => 
{
    var my_file = Artifactory.GetFileinfo.Invoke(new()
    {
        Path = "/path/to/the/artifact.zip",
        Repository = "repo-key",
    });

});
package main

import (
	"github.com/pulumi/pulumi-artifactory/sdk/v2/go/artifactory"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := artifactory.GetFileinfo(ctx, &GetFileinfoArgs{
			Path:       "/path/to/the/artifact.zip",
			Repository: "repo-key",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
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()
            .path("/path/to/the/artifact.zip")
            .repository("repo-key")
            .build());

    }
}
import pulumi
import pulumi_artifactory as artifactory

my_file = artifactory.get_fileinfo(path="/path/to/the/artifact.zip",
    repository="repo-key")
import * as pulumi from "@pulumi/pulumi";
import * as artifactory from "@pulumi/artifactory";

// 
const my_file = pulumi.output(artifactory.getFileinfo({
    path: "/path/to/the/artifact.zip",
    repository: "repo-key",
}));
variables:
  my-file:
    Fn::Invoke:
      Function: artifactory:getFileinfo
      Arguments:
        path: /path/to/the/artifact.zip
        repository: repo-key

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
https://github.com/pulumi/pulumi-artifactory
License
Apache-2.0
Notes

This Pulumi package is based on the artifactory Terraform Provider.