artifactory.Artifact
Explore with Pulumi AI
Provides a resource for deploying artifact to Artifactory repository. Support deploying a single artifact only. Changes to repository
or path
attributes will trigger a recreation of the resource (i.e. delete then create). See JFrog documentation for more details.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as artifactory from "@pulumi/artifactory";
const my_artifact = new artifactory.Artifact("my-artifact", {
repository: "my-generic-local",
path: "/my-path/my-file.zip",
filePath: "/path/to/my-file.zip",
});
import pulumi
import pulumi_artifactory as artifactory
my_artifact = artifactory.Artifact("my-artifact",
repository="my-generic-local",
path="/my-path/my-file.zip",
file_path="/path/to/my-file.zip")
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.NewArtifact(ctx, "my-artifact", &artifactory.ArtifactArgs{
Repository: pulumi.String("my-generic-local"),
Path: pulumi.String("/my-path/my-file.zip"),
FilePath: pulumi.String("/path/to/my-file.zip"),
})
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_artifact = new Artifactory.Artifact("my-artifact", new()
{
Repository = "my-generic-local",
Path = "/my-path/my-file.zip",
FilePath = "/path/to/my-file.zip",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.artifactory.Artifact;
import com.pulumi.artifactory.ArtifactArgs;
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) {
var my_artifact = new Artifact("my-artifact", ArtifactArgs.builder()
.repository("my-generic-local")
.path("/my-path/my-file.zip")
.filePath("/path/to/my-file.zip")
.build());
}
}
resources:
my-artifact:
type: artifactory:Artifact
properties:
repository: my-generic-local
path: /my-path/my-file.zip
filePath: /path/to/my-file.zip
Create Artifact Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Artifact(name: string, args: ArtifactArgs, opts?: CustomResourceOptions);
@overload
def Artifact(resource_name: str,
args: ArtifactArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Artifact(resource_name: str,
opts: Optional[ResourceOptions] = None,
file_path: Optional[str] = None,
path: Optional[str] = None,
repository: Optional[str] = None)
func NewArtifact(ctx *Context, name string, args ArtifactArgs, opts ...ResourceOption) (*Artifact, error)
public Artifact(string name, ArtifactArgs args, CustomResourceOptions? opts = null)
public Artifact(String name, ArtifactArgs args)
public Artifact(String name, ArtifactArgs args, CustomResourceOptions options)
type: artifactory:Artifact
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ArtifactArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ArtifactArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ArtifactArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ArtifactArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ArtifactArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var artifactResource = new Artifactory.Artifact("artifactResource", new()
{
FilePath = "string",
Path = "string",
Repository = "string",
});
example, err := artifactory.NewArtifact(ctx, "artifactResource", &artifactory.ArtifactArgs{
FilePath: pulumi.String("string"),
Path: pulumi.String("string"),
Repository: pulumi.String("string"),
})
var artifactResource = new Artifact("artifactResource", ArtifactArgs.builder()
.filePath("string")
.path("string")
.repository("string")
.build());
artifact_resource = artifactory.Artifact("artifactResource",
file_path="string",
path="string",
repository="string")
const artifactResource = new artifactory.Artifact("artifactResource", {
filePath: "string",
path: "string",
repository: "string",
});
type: artifactory:Artifact
properties:
filePath: string
path: string
repository: string
Artifact Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Artifact resource accepts the following input properties:
- File
Path string - Path to the source file.
- Path string
- The relative path in the target repository. Must begin with a '/'. You can add key-value matrix parameters to deploy the artifacts with properties. For more details, please refer to Introducing Matrix Parameters.
- Repository string
- Name of the respository.
- File
Path string - Path to the source file.
- Path string
- The relative path in the target repository. Must begin with a '/'. You can add key-value matrix parameters to deploy the artifacts with properties. For more details, please refer to Introducing Matrix Parameters.
- Repository string
- Name of the respository.
- file
Path String - Path to the source file.
- path String
- The relative path in the target repository. Must begin with a '/'. You can add key-value matrix parameters to deploy the artifacts with properties. For more details, please refer to Introducing Matrix Parameters.
- repository String
- Name of the respository.
- file
Path string - Path to the source file.
- path string
- The relative path in the target repository. Must begin with a '/'. You can add key-value matrix parameters to deploy the artifacts with properties. For more details, please refer to Introducing Matrix Parameters.
- repository string
- Name of the respository.
- file_
path str - Path to the source file.
- path str
- The relative path in the target repository. Must begin with a '/'. You can add key-value matrix parameters to deploy the artifacts with properties. For more details, please refer to Introducing Matrix Parameters.
- repository str
- Name of the respository.
- file
Path String - Path to the source file.
- path String
- The relative path in the target repository. Must begin with a '/'. You can add key-value matrix parameters to deploy the artifacts with properties. For more details, please refer to Introducing Matrix Parameters.
- repository String
- Name of the respository.
Outputs
All input properties are implicitly available as output properties. Additionally, the Artifact resource produces the following output properties:
- Checksum
Md5 string - MD5 checksum of the artifact.
- Checksum
Sha1 string - SHA1 checksum of the artifact.
- Checksum
Sha256 string - SHA256 checksum of the artifact.
- Created string
- Timestamp when artifact is created.
- Created
By string - User who deploys the artifact.
- Download
Uri string - Download URI of the artifact.
- Id string
- The provider-assigned unique ID for this managed resource.
- Mime
Type string - MIME type of the artifact.
- Size int
- Size of the artifact, in bytes.
- Uri string
- URI of the artifact.
- Checksum
Md5 string - MD5 checksum of the artifact.
- Checksum
Sha1 string - SHA1 checksum of the artifact.
- Checksum
Sha256 string - SHA256 checksum of the artifact.
- Created string
- Timestamp when artifact is created.
- Created
By string - User who deploys the artifact.
- Download
Uri string - Download URI of the artifact.
- Id string
- The provider-assigned unique ID for this managed resource.
- Mime
Type string - MIME type of the artifact.
- Size int
- Size of the artifact, in bytes.
- Uri string
- URI of the artifact.
- checksum
Md5 String - MD5 checksum of the artifact.
- checksum
Sha1 String - SHA1 checksum of the artifact.
- checksum
Sha256 String - SHA256 checksum of the artifact.
- created String
- Timestamp when artifact is created.
- created
By String - User who deploys the artifact.
- download
Uri String - Download URI of the artifact.
- id String
- The provider-assigned unique ID for this managed resource.
- mime
Type String - MIME type of the artifact.
- size Integer
- Size of the artifact, in bytes.
- uri String
- URI of the artifact.
- checksum
Md5 string - MD5 checksum of the artifact.
- checksum
Sha1 string - SHA1 checksum of the artifact.
- checksum
Sha256 string - SHA256 checksum of the artifact.
- created string
- Timestamp when artifact is created.
- created
By string - User who deploys the artifact.
- download
Uri string - Download URI of the artifact.
- id string
- The provider-assigned unique ID for this managed resource.
- mime
Type string - MIME type of the artifact.
- size number
- Size of the artifact, in bytes.
- uri string
- URI of the artifact.
- checksum_
md5 str - MD5 checksum of the artifact.
- checksum_
sha1 str - SHA1 checksum of the artifact.
- checksum_
sha256 str - SHA256 checksum of the artifact.
- created str
- Timestamp when artifact is created.
- created_
by str - User who deploys the artifact.
- download_
uri str - Download URI of the artifact.
- id str
- The provider-assigned unique ID for this managed resource.
- mime_
type str - MIME type of the artifact.
- size int
- Size of the artifact, in bytes.
- uri str
- URI of the artifact.
- checksum
Md5 String - MD5 checksum of the artifact.
- checksum
Sha1 String - SHA1 checksum of the artifact.
- checksum
Sha256 String - SHA256 checksum of the artifact.
- created String
- Timestamp when artifact is created.
- created
By String - User who deploys the artifact.
- download
Uri String - Download URI of the artifact.
- id String
- The provider-assigned unique ID for this managed resource.
- mime
Type String - MIME type of the artifact.
- size Number
- Size of the artifact, in bytes.
- uri String
- URI of the artifact.
Look up Existing Artifact Resource
Get an existing Artifact resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ArtifactState, opts?: CustomResourceOptions): Artifact
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
checksum_md5: Optional[str] = None,
checksum_sha1: Optional[str] = None,
checksum_sha256: Optional[str] = None,
created: Optional[str] = None,
created_by: Optional[str] = None,
download_uri: Optional[str] = None,
file_path: Optional[str] = None,
mime_type: Optional[str] = None,
path: Optional[str] = None,
repository: Optional[str] = None,
size: Optional[int] = None,
uri: Optional[str] = None) -> Artifact
func GetArtifact(ctx *Context, name string, id IDInput, state *ArtifactState, opts ...ResourceOption) (*Artifact, error)
public static Artifact Get(string name, Input<string> id, ArtifactState? state, CustomResourceOptions? opts = null)
public static Artifact get(String name, Output<String> id, ArtifactState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Checksum
Md5 string - MD5 checksum of the artifact.
- Checksum
Sha1 string - SHA1 checksum of the artifact.
- Checksum
Sha256 string - SHA256 checksum of the artifact.
- Created string
- Timestamp when artifact is created.
- Created
By string - User who deploys the artifact.
- Download
Uri string - Download URI of the artifact.
- File
Path string - Path to the source file.
- Mime
Type string - MIME type of the artifact.
- Path string
- The relative path in the target repository. Must begin with a '/'. You can add key-value matrix parameters to deploy the artifacts with properties. For more details, please refer to Introducing Matrix Parameters.
- Repository string
- Name of the respository.
- Size int
- Size of the artifact, in bytes.
- Uri string
- URI of the artifact.
- Checksum
Md5 string - MD5 checksum of the artifact.
- Checksum
Sha1 string - SHA1 checksum of the artifact.
- Checksum
Sha256 string - SHA256 checksum of the artifact.
- Created string
- Timestamp when artifact is created.
- Created
By string - User who deploys the artifact.
- Download
Uri string - Download URI of the artifact.
- File
Path string - Path to the source file.
- Mime
Type string - MIME type of the artifact.
- Path string
- The relative path in the target repository. Must begin with a '/'. You can add key-value matrix parameters to deploy the artifacts with properties. For more details, please refer to Introducing Matrix Parameters.
- Repository string
- Name of the respository.
- Size int
- Size of the artifact, in bytes.
- Uri string
- URI of the artifact.
- checksum
Md5 String - MD5 checksum of the artifact.
- checksum
Sha1 String - SHA1 checksum of the artifact.
- checksum
Sha256 String - SHA256 checksum of the artifact.
- created String
- Timestamp when artifact is created.
- created
By String - User who deploys the artifact.
- download
Uri String - Download URI of the artifact.
- file
Path String - Path to the source file.
- mime
Type String - MIME type of the artifact.
- path String
- The relative path in the target repository. Must begin with a '/'. You can add key-value matrix parameters to deploy the artifacts with properties. For more details, please refer to Introducing Matrix Parameters.
- repository String
- Name of the respository.
- size Integer
- Size of the artifact, in bytes.
- uri String
- URI of the artifact.
- checksum
Md5 string - MD5 checksum of the artifact.
- checksum
Sha1 string - SHA1 checksum of the artifact.
- checksum
Sha256 string - SHA256 checksum of the artifact.
- created string
- Timestamp when artifact is created.
- created
By string - User who deploys the artifact.
- download
Uri string - Download URI of the artifact.
- file
Path string - Path to the source file.
- mime
Type string - MIME type of the artifact.
- path string
- The relative path in the target repository. Must begin with a '/'. You can add key-value matrix parameters to deploy the artifacts with properties. For more details, please refer to Introducing Matrix Parameters.
- repository string
- Name of the respository.
- size number
- Size of the artifact, in bytes.
- uri string
- URI of the artifact.
- checksum_
md5 str - MD5 checksum of the artifact.
- checksum_
sha1 str - SHA1 checksum of the artifact.
- checksum_
sha256 str - SHA256 checksum of the artifact.
- created str
- Timestamp when artifact is created.
- created_
by str - User who deploys the artifact.
- download_
uri str - Download URI of the artifact.
- file_
path str - Path to the source file.
- mime_
type str - MIME type of the artifact.
- path str
- The relative path in the target repository. Must begin with a '/'. You can add key-value matrix parameters to deploy the artifacts with properties. For more details, please refer to Introducing Matrix Parameters.
- repository str
- Name of the respository.
- size int
- Size of the artifact, in bytes.
- uri str
- URI of the artifact.
- checksum
Md5 String - MD5 checksum of the artifact.
- checksum
Sha1 String - SHA1 checksum of the artifact.
- checksum
Sha256 String - SHA256 checksum of the artifact.
- created String
- Timestamp when artifact is created.
- created
By String - User who deploys the artifact.
- download
Uri String - Download URI of the artifact.
- file
Path String - Path to the source file.
- mime
Type String - MIME type of the artifact.
- path String
- The relative path in the target repository. Must begin with a '/'. You can add key-value matrix parameters to deploy the artifacts with properties. For more details, please refer to Introducing Matrix Parameters.
- repository String
- Name of the respository.
- size Number
- Size of the artifact, in bytes.
- uri String
- URI of the artifact.
Package Details
- Repository
- artifactory pulumi/pulumi-artifactory
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
artifactory
Terraform Provider.