Oracle Cloud Infrastructure v2.33.0 published on Thursday, May 1, 2025 by Pulumi
oci.Artifacts.getGenericArtifacts
Explore with Pulumi AI
This data source provides the list of Generic Artifacts in Oracle Cloud Infrastructure Artifacts service.
Lists artifacts in the specified repository.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testGenericArtifacts = oci.Artifacts.getGenericArtifacts({
    compartmentId: compartmentId,
    repositoryId: testRepository.id,
    artifactPath: genericArtifactArtifactPath,
    displayName: genericArtifactDisplayName,
    id: genericArtifactId,
    sha256: genericArtifactSha256,
    state: genericArtifactState,
    version: genericArtifactVersion,
});
import pulumi
import pulumi_oci as oci
test_generic_artifacts = oci.Artifacts.get_generic_artifacts(compartment_id=compartment_id,
    repository_id=test_repository["id"],
    artifact_path=generic_artifact_artifact_path,
    display_name=generic_artifact_display_name,
    id=generic_artifact_id,
    sha256=generic_artifact_sha256,
    state=generic_artifact_state,
    version=generic_artifact_version)
package main
import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/artifacts"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := artifacts.GetGenericArtifacts(ctx, &artifacts.GetGenericArtifactsArgs{
			CompartmentId: compartmentId,
			RepositoryId:  testRepository.Id,
			ArtifactPath:  pulumi.StringRef(genericArtifactArtifactPath),
			DisplayName:   pulumi.StringRef(genericArtifactDisplayName),
			Id:            pulumi.StringRef(genericArtifactId),
			Sha256:        pulumi.StringRef(genericArtifactSha256),
			State:         pulumi.StringRef(genericArtifactState),
			Version:       pulumi.StringRef(genericArtifactVersion),
		}, 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 testGenericArtifacts = Oci.Artifacts.GetGenericArtifacts.Invoke(new()
    {
        CompartmentId = compartmentId,
        RepositoryId = testRepository.Id,
        ArtifactPath = genericArtifactArtifactPath,
        DisplayName = genericArtifactDisplayName,
        Id = genericArtifactId,
        Sha256 = genericArtifactSha256,
        State = genericArtifactState,
        Version = genericArtifactVersion,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Artifacts.ArtifactsFunctions;
import com.pulumi.oci.Artifacts.inputs.GetGenericArtifactsArgs;
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 testGenericArtifacts = ArtifactsFunctions.getGenericArtifacts(GetGenericArtifactsArgs.builder()
            .compartmentId(compartmentId)
            .repositoryId(testRepository.id())
            .artifactPath(genericArtifactArtifactPath)
            .displayName(genericArtifactDisplayName)
            .id(genericArtifactId)
            .sha256(genericArtifactSha256)
            .state(genericArtifactState)
            .version(genericArtifactVersion)
            .build());
    }
}
variables:
  testGenericArtifacts:
    fn::invoke:
      function: oci:Artifacts:getGenericArtifacts
      arguments:
        compartmentId: ${compartmentId}
        repositoryId: ${testRepository.id}
        artifactPath: ${genericArtifactArtifactPath}
        displayName: ${genericArtifactDisplayName}
        id: ${genericArtifactId}
        sha256: ${genericArtifactSha256}
        state: ${genericArtifactState}
        version: ${genericArtifactVersion}
Using getGenericArtifacts
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 getGenericArtifacts(args: GetGenericArtifactsArgs, opts?: InvokeOptions): Promise<GetGenericArtifactsResult>
function getGenericArtifactsOutput(args: GetGenericArtifactsOutputArgs, opts?: InvokeOptions): Output<GetGenericArtifactsResult>def get_generic_artifacts(artifact_path: Optional[str] = None,
                          compartment_id: Optional[str] = None,
                          display_name: Optional[str] = None,
                          filters: Optional[Sequence[GetGenericArtifactsFilter]] = None,
                          id: Optional[str] = None,
                          repository_id: Optional[str] = None,
                          sha256: Optional[str] = None,
                          state: Optional[str] = None,
                          version: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetGenericArtifactsResult
def get_generic_artifacts_output(artifact_path: Optional[pulumi.Input[str]] = None,
                          compartment_id: Optional[pulumi.Input[str]] = None,
                          display_name: Optional[pulumi.Input[str]] = None,
                          filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetGenericArtifactsFilterArgs]]]] = None,
                          id: Optional[pulumi.Input[str]] = None,
                          repository_id: Optional[pulumi.Input[str]] = None,
                          sha256: Optional[pulumi.Input[str]] = None,
                          state: Optional[pulumi.Input[str]] = None,
                          version: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetGenericArtifactsResult]func GetGenericArtifacts(ctx *Context, args *GetGenericArtifactsArgs, opts ...InvokeOption) (*GetGenericArtifactsResult, error)
func GetGenericArtifactsOutput(ctx *Context, args *GetGenericArtifactsOutputArgs, opts ...InvokeOption) GetGenericArtifactsResultOutput> Note: This function is named GetGenericArtifacts in the Go SDK.
public static class GetGenericArtifacts 
{
    public static Task<GetGenericArtifactsResult> InvokeAsync(GetGenericArtifactsArgs args, InvokeOptions? opts = null)
    public static Output<GetGenericArtifactsResult> Invoke(GetGenericArtifactsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetGenericArtifactsResult> getGenericArtifacts(GetGenericArtifactsArgs args, InvokeOptions options)
public static Output<GetGenericArtifactsResult> getGenericArtifacts(GetGenericArtifactsArgs args, InvokeOptions options)
fn::invoke:
  function: oci:Artifacts/getGenericArtifacts:getGenericArtifacts
  arguments:
    # arguments dictionaryThe following arguments are supported:
- CompartmentId string
- The OCID of the compartment.
- RepositoryId string
- A filter to return the artifacts only for the specified repository OCID.
- ArtifactPath string
- Filter results by a prefix for the artifactPathand and return artifacts that begin with the specified prefix in their path.
- DisplayName string
- A filter to return only resources that match the given display name exactly.
- Filters
List<GetGeneric Artifacts Filter> 
- Id string
- A filter to return the resources for the specified OCID.
- Sha256 string
- Filter results by a specified SHA256 digest for the artifact.
- State string
- A filter to return only resources that match the given lifecycle state name exactly.
- Version string
- Filter results by a prefix for versionand return artifacts that that begin with the specified prefix in their version.
- CompartmentId string
- The OCID of the compartment.
- RepositoryId string
- A filter to return the artifacts only for the specified repository OCID.
- ArtifactPath string
- Filter results by a prefix for the artifactPathand and return artifacts that begin with the specified prefix in their path.
- DisplayName string
- A filter to return only resources that match the given display name exactly.
- Filters
[]GetGeneric Artifacts Filter 
- Id string
- A filter to return the resources for the specified OCID.
- Sha256 string
- Filter results by a specified SHA256 digest for the artifact.
- State string
- A filter to return only resources that match the given lifecycle state name exactly.
- Version string
- Filter results by a prefix for versionand return artifacts that that begin with the specified prefix in their version.
- compartmentId String
- The OCID of the compartment.
- repositoryId String
- A filter to return the artifacts only for the specified repository OCID.
- artifactPath String
- Filter results by a prefix for the artifactPathand and return artifacts that begin with the specified prefix in their path.
- displayName String
- A filter to return only resources that match the given display name exactly.
- filters
List<GetGeneric Filter> 
- id String
- A filter to return the resources for the specified OCID.
- sha256 String
- Filter results by a specified SHA256 digest for the artifact.
- state String
- A filter to return only resources that match the given lifecycle state name exactly.
- version String
- Filter results by a prefix for versionand return artifacts that that begin with the specified prefix in their version.
- compartmentId string
- The OCID of the compartment.
- repositoryId string
- A filter to return the artifacts only for the specified repository OCID.
- artifactPath string
- Filter results by a prefix for the artifactPathand and return artifacts that begin with the specified prefix in their path.
- displayName string
- A filter to return only resources that match the given display name exactly.
- filters
GetGeneric Artifacts Filter[] 
- id string
- A filter to return the resources for the specified OCID.
- sha256 string
- Filter results by a specified SHA256 digest for the artifact.
- state string
- A filter to return only resources that match the given lifecycle state name exactly.
- version string
- Filter results by a prefix for versionand return artifacts that that begin with the specified prefix in their version.
- compartment_id str
- The OCID of the compartment.
- repository_id str
- A filter to return the artifacts only for the specified repository OCID.
- artifact_path str
- Filter results by a prefix for the artifactPathand and return artifacts that begin with the specified prefix in their path.
- display_name str
- A filter to return only resources that match the given display name exactly.
- filters
Sequence[GetGeneric Artifacts Filter] 
- id str
- A filter to return the resources for the specified OCID.
- sha256 str
- Filter results by a specified SHA256 digest for the artifact.
- state str
- A filter to return only resources that match the given lifecycle state name exactly.
- version str
- Filter results by a prefix for versionand return artifacts that that begin with the specified prefix in their version.
- compartmentId String
- The OCID of the compartment.
- repositoryId String
- A filter to return the artifacts only for the specified repository OCID.
- artifactPath String
- Filter results by a prefix for the artifactPathand and return artifacts that begin with the specified prefix in their path.
- displayName String
- A filter to return only resources that match the given display name exactly.
- filters List<Property Map>
- id String
- A filter to return the resources for the specified OCID.
- sha256 String
- Filter results by a specified SHA256 digest for the artifact.
- state String
- A filter to return only resources that match the given lifecycle state name exactly.
- version String
- Filter results by a prefix for versionand return artifacts that that begin with the specified prefix in their version.
getGenericArtifacts Result
The following output properties are available:
- CompartmentId string
- The OCID of the repository's compartment.
- GenericArtifact List<GetCollections Generic Artifacts Generic Artifact Collection> 
- The list of generic_artifact_collection.
- RepositoryId string
- The OCID of the repository.
- ArtifactPath string
- A user-defined path to describe the location of an artifact. Slashes do not create a directory structure, but you can use slashes to organize the repository. An artifact path does not include an artifact version. Example: project01/my-web-app/artifact-abc
- DisplayName string
- The artifact name with the format of <artifact-path>:<artifact-version>. The artifact name is truncated to a maximum length of 255. Example:project01/my-web-app/artifact-abc:1.0.0
- Filters
List<GetGeneric Artifacts Filter> 
- Id string
- The OCID of the artifact. Example: ocid1.genericartifact.oc1..exampleuniqueID
- Sha256 string
- The SHA256 digest for the artifact. When you upload an artifact to the repository, a SHA256 digest is calculated and added to the artifact properties.
- State string
- The current state of the artifact.
- Version string
- A user-defined string to describe the artifact version. Example: 1.1.0or1.2-beta-2
- CompartmentId string
- The OCID of the repository's compartment.
- GenericArtifact []GetCollections Generic Artifacts Generic Artifact Collection 
- The list of generic_artifact_collection.
- RepositoryId string
- The OCID of the repository.
- ArtifactPath string
- A user-defined path to describe the location of an artifact. Slashes do not create a directory structure, but you can use slashes to organize the repository. An artifact path does not include an artifact version. Example: project01/my-web-app/artifact-abc
- DisplayName string
- The artifact name with the format of <artifact-path>:<artifact-version>. The artifact name is truncated to a maximum length of 255. Example:project01/my-web-app/artifact-abc:1.0.0
- Filters
[]GetGeneric Artifacts Filter 
- Id string
- The OCID of the artifact. Example: ocid1.genericartifact.oc1..exampleuniqueID
- Sha256 string
- The SHA256 digest for the artifact. When you upload an artifact to the repository, a SHA256 digest is calculated and added to the artifact properties.
- State string
- The current state of the artifact.
- Version string
- A user-defined string to describe the artifact version. Example: 1.1.0or1.2-beta-2
- compartmentId String
- The OCID of the repository's compartment.
- genericArtifact List<GetCollections Generic Generic Artifact Collection> 
- The list of generic_artifact_collection.
- repositoryId String
- The OCID of the repository.
- artifactPath String
- A user-defined path to describe the location of an artifact. Slashes do not create a directory structure, but you can use slashes to organize the repository. An artifact path does not include an artifact version. Example: project01/my-web-app/artifact-abc
- displayName String
- The artifact name with the format of <artifact-path>:<artifact-version>. The artifact name is truncated to a maximum length of 255. Example:project01/my-web-app/artifact-abc:1.0.0
- filters
List<GetGeneric Filter> 
- id String
- The OCID of the artifact. Example: ocid1.genericartifact.oc1..exampleuniqueID
- sha256 String
- The SHA256 digest for the artifact. When you upload an artifact to the repository, a SHA256 digest is calculated and added to the artifact properties.
- state String
- The current state of the artifact.
- version String
- A user-defined string to describe the artifact version. Example: 1.1.0or1.2-beta-2
- compartmentId string
- The OCID of the repository's compartment.
- genericArtifact GetCollections Generic Artifacts Generic Artifact Collection[] 
- The list of generic_artifact_collection.
- repositoryId string
- The OCID of the repository.
- artifactPath string
- A user-defined path to describe the location of an artifact. Slashes do not create a directory structure, but you can use slashes to organize the repository. An artifact path does not include an artifact version. Example: project01/my-web-app/artifact-abc
- displayName string
- The artifact name with the format of <artifact-path>:<artifact-version>. The artifact name is truncated to a maximum length of 255. Example:project01/my-web-app/artifact-abc:1.0.0
- filters
GetGeneric Artifacts Filter[] 
- id string
- The OCID of the artifact. Example: ocid1.genericartifact.oc1..exampleuniqueID
- sha256 string
- The SHA256 digest for the artifact. When you upload an artifact to the repository, a SHA256 digest is calculated and added to the artifact properties.
- state string
- The current state of the artifact.
- version string
- A user-defined string to describe the artifact version. Example: 1.1.0or1.2-beta-2
- compartment_id str
- The OCID of the repository's compartment.
- generic_artifact_ Sequence[Getcollections Generic Artifacts Generic Artifact Collection] 
- The list of generic_artifact_collection.
- repository_id str
- The OCID of the repository.
- artifact_path str
- A user-defined path to describe the location of an artifact. Slashes do not create a directory structure, but you can use slashes to organize the repository. An artifact path does not include an artifact version. Example: project01/my-web-app/artifact-abc
- display_name str
- The artifact name with the format of <artifact-path>:<artifact-version>. The artifact name is truncated to a maximum length of 255. Example:project01/my-web-app/artifact-abc:1.0.0
- filters
Sequence[GetGeneric Artifacts Filter] 
- id str
- The OCID of the artifact. Example: ocid1.genericartifact.oc1..exampleuniqueID
- sha256 str
- The SHA256 digest for the artifact. When you upload an artifact to the repository, a SHA256 digest is calculated and added to the artifact properties.
- state str
- The current state of the artifact.
- version str
- A user-defined string to describe the artifact version. Example: 1.1.0or1.2-beta-2
- compartmentId String
- The OCID of the repository's compartment.
- genericArtifact List<Property Map>Collections 
- The list of generic_artifact_collection.
- repositoryId String
- The OCID of the repository.
- artifactPath String
- A user-defined path to describe the location of an artifact. Slashes do not create a directory structure, but you can use slashes to organize the repository. An artifact path does not include an artifact version. Example: project01/my-web-app/artifact-abc
- displayName String
- The artifact name with the format of <artifact-path>:<artifact-version>. The artifact name is truncated to a maximum length of 255. Example:project01/my-web-app/artifact-abc:1.0.0
- filters List<Property Map>
- id String
- The OCID of the artifact. Example: ocid1.genericartifact.oc1..exampleuniqueID
- sha256 String
- The SHA256 digest for the artifact. When you upload an artifact to the repository, a SHA256 digest is calculated and added to the artifact properties.
- state String
- The current state of the artifact.
- version String
- A user-defined string to describe the artifact version. Example: 1.1.0or1.2-beta-2
Supporting Types
GetGenericArtifactsFilter   
GetGenericArtifactsGenericArtifactCollection     
GetGenericArtifactsGenericArtifactCollectionItem      
- ArtifactId string
- ArtifactPath string
- Filter results by a prefix for the artifactPathand and return artifacts that begin with the specified prefix in their path.
- CompartmentId string
- The OCID of the compartment.
- Dictionary<string, string>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
- DisplayName string
- A filter to return only resources that match the given display name exactly.
- Dictionary<string, string>
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
- Id string
- A filter to return the resources for the specified OCID.
- RepositoryId string
- A filter to return the artifacts only for the specified repository OCID.
- Sha256 string
- Filter results by a specified SHA256 digest for the artifact.
- SizeIn stringBytes 
- The size of the artifact in bytes.
- State string
- A filter to return only resources that match the given lifecycle state name exactly.
- TimeCreated string
- An RFC 3339 timestamp indicating when the repository was created.
- Version string
- Filter results by a prefix for versionand return artifacts that that begin with the specified prefix in their version.
- ArtifactId string
- ArtifactPath string
- Filter results by a prefix for the artifactPathand and return artifacts that begin with the specified prefix in their path.
- CompartmentId string
- The OCID of the compartment.
- map[string]string
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
- DisplayName string
- A filter to return only resources that match the given display name exactly.
- map[string]string
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
- Id string
- A filter to return the resources for the specified OCID.
- RepositoryId string
- A filter to return the artifacts only for the specified repository OCID.
- Sha256 string
- Filter results by a specified SHA256 digest for the artifact.
- SizeIn stringBytes 
- The size of the artifact in bytes.
- State string
- A filter to return only resources that match the given lifecycle state name exactly.
- TimeCreated string
- An RFC 3339 timestamp indicating when the repository was created.
- Version string
- Filter results by a prefix for versionand return artifacts that that begin with the specified prefix in their version.
- artifactId String
- artifactPath String
- Filter results by a prefix for the artifactPathand and return artifacts that begin with the specified prefix in their path.
- compartmentId String
- The OCID of the compartment.
- Map<String,String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
- displayName String
- A filter to return only resources that match the given display name exactly.
- Map<String,String>
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
- id String
- A filter to return the resources for the specified OCID.
- repositoryId String
- A filter to return the artifacts only for the specified repository OCID.
- sha256 String
- Filter results by a specified SHA256 digest for the artifact.
- sizeIn StringBytes 
- The size of the artifact in bytes.
- state String
- A filter to return only resources that match the given lifecycle state name exactly.
- timeCreated String
- An RFC 3339 timestamp indicating when the repository was created.
- version String
- Filter results by a prefix for versionand return artifacts that that begin with the specified prefix in their version.
- artifactId string
- artifactPath string
- Filter results by a prefix for the artifactPathand and return artifacts that begin with the specified prefix in their path.
- compartmentId string
- The OCID of the compartment.
- {[key: string]: string}
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
- displayName string
- A filter to return only resources that match the given display name exactly.
- {[key: string]: string}
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
- id string
- A filter to return the resources for the specified OCID.
- repositoryId string
- A filter to return the artifacts only for the specified repository OCID.
- sha256 string
- Filter results by a specified SHA256 digest for the artifact.
- sizeIn stringBytes 
- The size of the artifact in bytes.
- state string
- A filter to return only resources that match the given lifecycle state name exactly.
- timeCreated string
- An RFC 3339 timestamp indicating when the repository was created.
- version string
- Filter results by a prefix for versionand return artifacts that that begin with the specified prefix in their version.
- artifact_id str
- artifact_path str
- Filter results by a prefix for the artifactPathand and return artifacts that begin with the specified prefix in their path.
- compartment_id str
- The OCID of the compartment.
- Mapping[str, str]
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
- display_name str
- A filter to return only resources that match the given display name exactly.
- Mapping[str, str]
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
- id str
- A filter to return the resources for the specified OCID.
- repository_id str
- A filter to return the artifacts only for the specified repository OCID.
- sha256 str
- Filter results by a specified SHA256 digest for the artifact.
- size_in_ strbytes 
- The size of the artifact in bytes.
- state str
- A filter to return only resources that match the given lifecycle state name exactly.
- time_created str
- An RFC 3339 timestamp indicating when the repository was created.
- version str
- Filter results by a prefix for versionand return artifacts that that begin with the specified prefix in their version.
- artifactId String
- artifactPath String
- Filter results by a prefix for the artifactPathand and return artifacts that begin with the specified prefix in their path.
- compartmentId String
- The OCID of the compartment.
- Map<String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
- displayName String
- A filter to return only resources that match the given display name exactly.
- Map<String>
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
- id String
- A filter to return the resources for the specified OCID.
- repositoryId String
- A filter to return the artifacts only for the specified repository OCID.
- sha256 String
- Filter results by a specified SHA256 digest for the artifact.
- sizeIn StringBytes 
- The size of the artifact in bytes.
- state String
- A filter to return only resources that match the given lifecycle state name exactly.
- timeCreated String
- An RFC 3339 timestamp indicating when the repository was created.
- version String
- Filter results by a prefix for versionand return artifacts that that begin with the specified prefix in their version.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.