Oracle Cloud Infrastructure v2.33.0 published on Thursday, May 1, 2025 by Pulumi
oci.GenericArtifactsContent.getArtifactByPath
Explore with Pulumi AI
This data source provides details about a specific Artifact By Path resource in Oracle Cloud Infrastructure Generic Artifacts Content service.
Get generic artifact content.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testArtifactByPath = oci.GenericArtifactsContent.getArtifactByPath({
    artifactPath: artifactByPathArtifactPath,
    repositoryId: testRepository.id,
    version: artifactByPathVersion,
});
import pulumi
import pulumi_oci as oci
test_artifact_by_path = oci.GenericArtifactsContent.get_artifact_by_path(artifact_path=artifact_by_path_artifact_path,
    repository_id=test_repository["id"],
    version=artifact_by_path_version)
package main
import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/genericartifactscontent"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := genericartifactscontent.GetArtifactByPath(ctx, &genericartifactscontent.GetArtifactByPathArgs{
			ArtifactPath: artifactByPathArtifactPath,
			RepositoryId: testRepository.Id,
			Version:      artifactByPathVersion,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() => 
{
    var testArtifactByPath = Oci.GenericArtifactsContent.GetArtifactByPath.Invoke(new()
    {
        ArtifactPath = artifactByPathArtifactPath,
        RepositoryId = testRepository.Id,
        Version = artifactByPathVersion,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.GenericArtifactsContent.GenericArtifactsContentFunctions;
import com.pulumi.oci.GenericArtifactsContent.inputs.GetArtifactByPathArgs;
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 testArtifactByPath = GenericArtifactsContentFunctions.getArtifactByPath(GetArtifactByPathArgs.builder()
            .artifactPath(artifactByPathArtifactPath)
            .repositoryId(testRepository.id())
            .version(artifactByPathVersion)
            .build());
    }
}
variables:
  testArtifactByPath:
    fn::invoke:
      function: oci:GenericArtifactsContent:getArtifactByPath
      arguments:
        artifactPath: ${artifactByPathArtifactPath}
        repositoryId: ${testRepository.id}
        version: ${artifactByPathVersion}
Using getArtifactByPath
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 getArtifactByPath(args: GetArtifactByPathArgs, opts?: InvokeOptions): Promise<GetArtifactByPathResult>
function getArtifactByPathOutput(args: GetArtifactByPathOutputArgs, opts?: InvokeOptions): Output<GetArtifactByPathResult>def get_artifact_by_path(artifact_path: Optional[str] = None,
                         repository_id: Optional[str] = None,
                         version: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetArtifactByPathResult
def get_artifact_by_path_output(artifact_path: Optional[pulumi.Input[str]] = None,
                         repository_id: Optional[pulumi.Input[str]] = None,
                         version: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetArtifactByPathResult]func LookupArtifactByPath(ctx *Context, args *LookupArtifactByPathArgs, opts ...InvokeOption) (*LookupArtifactByPathResult, error)
func LookupArtifactByPathOutput(ctx *Context, args *LookupArtifactByPathOutputArgs, opts ...InvokeOption) LookupArtifactByPathResultOutput> Note: This function is named LookupArtifactByPath in the Go SDK.
public static class GetArtifactByPath 
{
    public static Task<GetArtifactByPathResult> InvokeAsync(GetArtifactByPathArgs args, InvokeOptions? opts = null)
    public static Output<GetArtifactByPathResult> Invoke(GetArtifactByPathInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetArtifactByPathResult> getArtifactByPath(GetArtifactByPathArgs args, InvokeOptions options)
public static Output<GetArtifactByPathResult> getArtifactByPath(GetArtifactByPathArgs args, InvokeOptions options)
fn::invoke:
  function: oci:GenericArtifactsContent/getArtifactByPath:getArtifactByPath
  arguments:
    # arguments dictionaryThe following arguments are supported:
- ArtifactPath string
- The generic artifact path. Example: foo/bar/baz
- RepositoryId string
- The OCID of the repository. Example: ocid1.repository.oc1..exampleuniqueID
- Version string
- The generic artifact version. Example: 1.1.2
- ArtifactPath string
- The generic artifact path. Example: foo/bar/baz
- RepositoryId string
- The OCID of the repository. Example: ocid1.repository.oc1..exampleuniqueID
- Version string
- The generic artifact version. Example: 1.1.2
- artifactPath String
- The generic artifact path. Example: foo/bar/baz
- repositoryId String
- The OCID of the repository. Example: ocid1.repository.oc1..exampleuniqueID
- version String
- The generic artifact version. Example: 1.1.2
- artifactPath string
- The generic artifact path. Example: foo/bar/baz
- repositoryId string
- The OCID of the repository. Example: ocid1.repository.oc1..exampleuniqueID
- version string
- The generic artifact version. Example: 1.1.2
- artifact_path str
- The generic artifact path. Example: foo/bar/baz
- repository_id str
- The OCID of the repository. Example: ocid1.repository.oc1..exampleuniqueID
- version str
- The generic artifact version. Example: 1.1.2
- artifactPath String
- The generic artifact path. Example: foo/bar/baz
- repositoryId String
- The OCID of the repository. Example: ocid1.repository.oc1..exampleuniqueID
- version String
- The generic artifact version. Example: 1.1.2
getArtifactByPath Result
The following output properties are available:
- ArtifactId string
- ArtifactPath string
- CompartmentId string
- Content string
- Dictionary<string, string>
- DisplayName string
- Dictionary<string, string>
- Id string
- RepositoryId string
- Sha256 string
- SizeIn stringBytes 
- Source string
- State string
- TimeCreated string
- Version string
- ArtifactId string
- ArtifactPath string
- CompartmentId string
- Content string
- map[string]string
- DisplayName string
- map[string]string
- Id string
- RepositoryId string
- Sha256 string
- SizeIn stringBytes 
- Source string
- State string
- TimeCreated string
- Version string
- artifactId String
- artifactPath String
- compartmentId String
- content String
- Map<String,String>
- displayName String
- Map<String,String>
- id String
- repositoryId String
- sha256 String
- sizeIn StringBytes 
- source String
- state String
- timeCreated String
- version String
- artifactId string
- artifactPath string
- compartmentId string
- content string
- {[key: string]: string}
- displayName string
- {[key: string]: string}
- id string
- repositoryId string
- sha256 string
- sizeIn stringBytes 
- source string
- state string
- timeCreated string
- version string
- artifact_id str
- artifact_path str
- compartment_id str
- content str
- Mapping[str, str]
- display_name str
- Mapping[str, str]
- id str
- repository_id str
- sha256 str
- size_in_ strbytes 
- source str
- state str
- time_created str
- version str
- artifactId String
- artifactPath String
- compartmentId String
- content String
- Map<String>
- displayName String
- Map<String>
- id String
- repositoryId String
- sha256 String
- sizeIn StringBytes 
- source String
- state String
- timeCreated String
- version String
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.