1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. GenericArtifactsContent
  5. getArtifactByPath
Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi

oci.GenericArtifactsContent.getArtifactByPath

Explore with Pulumi AI

Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi

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,
});
Copy
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)
Copy
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
	})
}
Copy
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,
    });

});
Copy
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());

    }
}
Copy
variables:
  testArtifactByPath:
    fn::invoke:
      function: oci:GenericArtifactsContent:getArtifactByPath
      arguments:
        artifactPath: ${artifactByPathArtifactPath}
        repositoryId: ${testRepository.id}
        version: ${artifactByPathVersion}
Copy

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>
Copy
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]
Copy
func GetArtifactByPath(ctx *Context, args *GetArtifactByPathArgs, opts ...InvokeOption) (*GetArtifactByPathResult, error)
func GetArtifactByPathOutput(ctx *Context, args *GetArtifactByPathOutputArgs, opts ...InvokeOption) GetArtifactByPathResultOutput
Copy

> Note: This function is named GetArtifactByPath 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)
}
Copy
public static CompletableFuture<GetArtifactByPathResult> getArtifactByPath(GetArtifactByPathArgs args, InvokeOptions options)
public static Output<GetArtifactByPathResult> getArtifactByPath(GetArtifactByPathArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:GenericArtifactsContent/getArtifactByPath:getArtifactByPath
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

ArtifactPath This property is required. string
The generic artifact path. Example: foo/bar/baz
RepositoryId This property is required. string
The OCID of the repository. Example: ocid1.repository.oc1..exampleuniqueID
Version This property is required. string
The generic artifact version. Example: 1.1.2
ArtifactPath This property is required. string
The generic artifact path. Example: foo/bar/baz
RepositoryId This property is required. string
The OCID of the repository. Example: ocid1.repository.oc1..exampleuniqueID
Version This property is required. string
The generic artifact version. Example: 1.1.2
artifactPath This property is required. String
The generic artifact path. Example: foo/bar/baz
repositoryId This property is required. String
The OCID of the repository. Example: ocid1.repository.oc1..exampleuniqueID
version This property is required. String
The generic artifact version. Example: 1.1.2
artifactPath This property is required. string
The generic artifact path. Example: foo/bar/baz
repositoryId This property is required. string
The OCID of the repository. Example: ocid1.repository.oc1..exampleuniqueID
version This property is required. string
The generic artifact version. Example: 1.1.2
artifact_path This property is required. str
The generic artifact path. Example: foo/bar/baz
repository_id This property is required. str
The OCID of the repository. Example: ocid1.repository.oc1..exampleuniqueID
version This property is required. str
The generic artifact version. Example: 1.1.2
artifactPath This property is required. String
The generic artifact path. Example: foo/bar/baz
repositoryId This property is required. String
The OCID of the repository. Example: ocid1.repository.oc1..exampleuniqueID
version This property is required. 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
DefinedTags Dictionary<string, string>
DisplayName string
FreeformTags Dictionary<string, string>
Id string
RepositoryId string
Sha256 string
SizeInBytes string
Source string
State string
TimeCreated string
Version string
ArtifactId string
ArtifactPath string
CompartmentId string
Content string
DefinedTags map[string]string
DisplayName string
FreeformTags map[string]string
Id string
RepositoryId string
Sha256 string
SizeInBytes string
Source string
State string
TimeCreated string
Version string
artifactId String
artifactPath String
compartmentId String
content String
definedTags Map<String,String>
displayName String
freeformTags Map<String,String>
id String
repositoryId String
sha256 String
sizeInBytes String
source String
state String
timeCreated String
version String
artifactId string
artifactPath string
compartmentId string
content string
definedTags {[key: string]: string}
displayName string
freeformTags {[key: string]: string}
id string
repositoryId string
sha256 string
sizeInBytes string
source string
state string
timeCreated string
version string
artifactId String
artifactPath String
compartmentId String
content String
definedTags Map<String>
displayName String
freeformTags Map<String>
id String
repositoryId String
sha256 String
sizeInBytes String
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 oci Terraform Provider.
Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi