Oracle Cloud Infrastructure

v0.5.0 published on Monday, Sep 12, 2022 by Pulumi

getGenericArtifacts

This data source provides the list of Generic Artifacts in Oracle Cloud Infrastructure Artifacts service.

Lists artifacts in the specified repository.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testGenericArtifacts = Oci.Artifacts.GetGenericArtifacts.Invoke(new()
    {
        CompartmentId = @var.Compartment_id,
        RepositoryId = oci_artifacts_repository.Test_repository.Id,
        ArtifactPath = @var.Generic_artifact_artifact_path,
        DisplayName = @var.Generic_artifact_display_name,
        Id = @var.Generic_artifact_id,
        Sha256 = @var.Generic_artifact_sha256,
        State = @var.Generic_artifact_state,
        Version = @var.Generic_artifact_version,
    });

});
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/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: _var.Compartment_id,
			RepositoryId:  oci_artifacts_repository.Test_repository.Id,
			ArtifactPath:  pulumi.StringRef(_var.Generic_artifact_artifact_path),
			DisplayName:   pulumi.StringRef(_var.Generic_artifact_display_name),
			Id:            pulumi.StringRef(_var.Generic_artifact_id),
			Sha256:        pulumi.StringRef(_var.Generic_artifact_sha256),
			State:         pulumi.StringRef(_var.Generic_artifact_state),
			Version:       pulumi.StringRef(_var.Generic_artifact_version),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
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(var_.compartment_id())
            .repositoryId(oci_artifacts_repository.test_repository().id())
            .artifactPath(var_.generic_artifact_artifact_path())
            .displayName(var_.generic_artifact_display_name())
            .id(var_.generic_artifact_id())
            .sha256(var_.generic_artifact_sha256())
            .state(var_.generic_artifact_state())
            .version(var_.generic_artifact_version())
            .build());

    }
}
import pulumi
import pulumi_oci as oci

test_generic_artifacts = oci.Artifacts.get_generic_artifacts(compartment_id=var["compartment_id"],
    repository_id=oci_artifacts_repository["test_repository"]["id"],
    artifact_path=var["generic_artifact_artifact_path"],
    display_name=var["generic_artifact_display_name"],
    id=var["generic_artifact_id"],
    sha256=var["generic_artifact_sha256"],
    state=var["generic_artifact_state"],
    version=var["generic_artifact_version"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testGenericArtifacts = oci.Artifacts.getGenericArtifacts({
    compartmentId: _var.compartment_id,
    repositoryId: oci_artifacts_repository.test_repository.id,
    artifactPath: _var.generic_artifact_artifact_path,
    displayName: _var.generic_artifact_display_name,
    id: _var.generic_artifact_id,
    sha256: _var.generic_artifact_sha256,
    state: _var.generic_artifact_state,
    version: _var.generic_artifact_version,
});
variables:
  testGenericArtifacts:
    Fn::Invoke:
      Function: oci:Artifacts:getGenericArtifacts
      Arguments:
        compartmentId: ${var.compartment_id}
        repositoryId: ${oci_artifacts_repository.test_repository.id}
        artifactPath: ${var.generic_artifact_artifact_path}
        displayName: ${var.generic_artifact_display_name}
        id: ${var.generic_artifact_id}
        sha256: ${var.generic_artifact_sha256}
        state: ${var.generic_artifact_state}
        version: ${var.generic_artifact_version}

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[_artifacts.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[_artifacts.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)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: oci:Artifacts/getGenericArtifacts:getGenericArtifacts
  arguments:
    # arguments dictionary

The 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 artifactPath and 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<GetGenericArtifactsFilter>
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 version and 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 artifactPath and 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 []GetGenericArtifactsFilter
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 version and 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 artifactPath and 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<GetGenericFilter>
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 version and 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 artifactPath and 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 GetGenericArtifactsFilter[]
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 version and 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 artifactPath and 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 GetGenericArtifactsFilter]
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 version and 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 artifactPath and 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 version and 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.

GenericArtifactCollections List<GetGenericArtifactsGenericArtifactCollection>

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<GetGenericArtifactsFilter>
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.0 or 1.2-beta-2

CompartmentId string

The OCID of the repository's compartment.

GenericArtifactCollections []GetGenericArtifactsGenericArtifactCollection

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 []GetGenericArtifactsFilter
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.0 or 1.2-beta-2

compartmentId String

The OCID of the repository's compartment.

genericArtifactCollections List<GetGenericGenericArtifactCollection>

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<GetGenericFilter>
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.0 or 1.2-beta-2

compartmentId string

The OCID of the repository's compartment.

genericArtifactCollections GetGenericArtifactsGenericArtifactCollection[]

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 GetGenericArtifactsFilter[]
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.0 or 1.2-beta-2

compartment_id str

The OCID of the repository's compartment.

generic_artifact_collections GetGenericArtifactsGenericArtifactCollection]

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 GetGenericArtifactsFilter]
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.0 or 1.2-beta-2

compartmentId String

The OCID of the repository's compartment.

genericArtifactCollections List<Property Map>

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.0 or 1.2-beta-2

Supporting Types

GetGenericArtifactsFilter

Name string
Values List<string>
Regex bool
Name string
Values []string
Regex bool
name String
values List<String>
regex Boolean
name string
values string[]
regex boolean
name str
values Sequence[str]
regex bool
name String
values List<String>
regex Boolean

GetGenericArtifactsGenericArtifactCollection

GetGenericArtifactsGenericArtifactCollectionItem

ArtifactId string
ArtifactPath string

Filter results by a prefix for the artifactPath and and return artifacts that begin with the specified prefix in their path.

CompartmentId string

The OCID of the compartment.

DefinedTags Dictionary<string, object>

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.

FreeformTags Dictionary<string, object>

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.

SizeInBytes string

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 version and return artifacts that that begin with the specified prefix in their version.

ArtifactId string
ArtifactPath string

Filter results by a prefix for the artifactPath and and return artifacts that begin with the specified prefix in their path.

CompartmentId string

The OCID of the compartment.

DefinedTags map[string]interface{}

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.

FreeformTags map[string]interface{}

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.

SizeInBytes string

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 version and return artifacts that that begin with the specified prefix in their version.

artifactId String
artifactPath String

Filter results by a prefix for the artifactPath and and return artifacts that begin with the specified prefix in their path.

compartmentId String

The OCID of the compartment.

definedTags Map<String,Object>

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.

freeformTags Map<String,Object>

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.

sizeInBytes String

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 version and return artifacts that that begin with the specified prefix in their version.

artifactId string
artifactPath string

Filter results by a prefix for the artifactPath and and return artifacts that begin with the specified prefix in their path.

compartmentId string

The OCID of the compartment.

definedTags {[key: string]: any}

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.

freeformTags {[key: string]: any}

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.

sizeInBytes string

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 version and 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 artifactPath and and return artifacts that begin with the specified prefix in their path.

compartment_id str

The OCID of the compartment.

defined_tags Mapping[str, Any]

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.

freeform_tags Mapping[str, Any]

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_bytes str

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 version and return artifacts that that begin with the specified prefix in their version.

artifactId String
artifactPath String

Filter results by a prefix for the artifactPath and and return artifacts that begin with the specified prefix in their path.

compartmentId String

The OCID of the compartment.

definedTags Map<Any>

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.

freeformTags Map<Any>

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.

sizeInBytes String

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 version and return artifacts that that begin with the specified prefix in their version.

Package Details

Repository
https://github.com/pulumi/pulumi-oci
License
Apache-2.0
Notes

This Pulumi package is based on the oci Terraform Provider.