1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. GenericArtifactsContent
  5. getArtifactByPath
Oracle Cloud Infrastructure v1.32.0 published on Thursday, Apr 18, 2024 by Pulumi

oci.GenericArtifactsContent.getArtifactByPath

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.32.0 published on Thursday, Apr 18, 2024 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: _var.artifact_by_path_artifact_path,
        repositoryId: oci_artifacts_repository.test_repository.id,
        version: _var.artifact_by_path_version,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_artifact_by_path = oci.GenericArtifactsContent.get_artifact_by_path(artifact_path=var["artifact_by_path_artifact_path"],
        repository_id=oci_artifacts_repository["test_repository"]["id"],
        version=var["artifact_by_path_version"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/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: _var.Artifact_by_path_artifact_path,
    			RepositoryId: oci_artifacts_repository.Test_repository.Id,
    			Version:      _var.Artifact_by_path_version,
    		}, 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 = @var.Artifact_by_path_artifact_path,
            RepositoryId = oci_artifacts_repository.Test_repository.Id,
            Version = @var.Artifact_by_path_version,
        });
    
    });
    
    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(var_.artifact_by_path_artifact_path())
                .repositoryId(oci_artifacts_repository.test_repository().id())
                .version(var_.artifact_by_path_version())
                .build());
    
        }
    }
    
    variables:
      testArtifactByPath:
        fn::invoke:
          Function: oci:GenericArtifactsContent:getArtifactByPath
          Arguments:
            artifactPath: ${var.artifact_by_path_artifact_path}
            repositoryId: ${oci_artifacts_repository.test_repository.id}
            version: ${var.artifact_by_path_version}
    

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

    > 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)
    }
    public static CompletableFuture<GetArtifactByPathResult> getArtifactByPath(GetArtifactByPathArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:GenericArtifactsContent/getArtifactByPath:getArtifactByPath
      arguments:
        # arguments dictionary

    The 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
    DefinedTags Dictionary<string, object>
    DisplayName string
    FreeformTags Dictionary<string, object>
    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]interface{}
    DisplayName string
    FreeformTags map[string]interface{}
    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,Object>
    displayName String
    freeformTags Map<String,Object>
    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]: any}
    displayName string
    freeformTags {[key: string]: any}
    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<Any>
    displayName String
    freeformTags Map<Any>
    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.
    oci logo
    Oracle Cloud Infrastructure v1.32.0 published on Thursday, Apr 18, 2024 by Pulumi