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
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 = @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:
- Compartment
Id string The OCID of the compartment.
- Repository
Id string A filter to return the artifacts only for the specified repository OCID.
- Artifact
Path string Filter results by a prefix for the
artifactPath
and and return artifacts that begin with the specified prefix in their path.- Display
Name string A filter to return only resources that match the given display name exactly.
- Filters
List<Get
Generic 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
version
and return artifacts that that begin with the specified prefix in their version.
- Compartment
Id string The OCID of the compartment.
- Repository
Id string A filter to return the artifacts only for the specified repository OCID.
- Artifact
Path string Filter results by a prefix for the
artifactPath
and and return artifacts that begin with the specified prefix in their path.- Display
Name string A filter to return only resources that match the given display name exactly.
- Filters
[]Get
Generic 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
version
and return artifacts that that begin with the specified prefix in their version.
- compartment
Id String The OCID of the compartment.
- repository
Id String A filter to return the artifacts only for the specified repository OCID.
- artifact
Path String Filter results by a prefix for the
artifactPath
and and return artifacts that begin with the specified prefix in their path.- display
Name String A filter to return only resources that match the given display name exactly.
- filters
List<Get
Generic 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
version
and return artifacts that that begin with the specified prefix in their version.
- compartment
Id string The OCID of the compartment.
- repository
Id string A filter to return the artifacts only for the specified repository OCID.
- artifact
Path string Filter results by a prefix for the
artifactPath
and and return artifacts that begin with the specified prefix in their path.- display
Name string A filter to return only resources that match the given display name exactly.
- filters
Get
Generic 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
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
Get
Generic 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
version
and return artifacts that that begin with the specified prefix in their version.
- compartment
Id String The OCID of the compartment.
- repository
Id String A filter to return the artifacts only for the specified repository OCID.
- artifact
Path String Filter results by a prefix for the
artifactPath
and and return artifacts that begin with the specified prefix in their path.- display
Name 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:
- Compartment
Id string The OCID of the repository's compartment.
- Generic
Artifact List<GetCollections Generic Artifacts Generic Artifact Collection> The list of generic_artifact_collection.
- Repository
Id string The OCID of the repository.
- Artifact
Path 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
- Display
Name 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<Get
Generic 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.0
or1.2-beta-2
- Compartment
Id string The OCID of the repository's compartment.
- Generic
Artifact []GetCollections Generic Artifacts Generic Artifact Collection The list of generic_artifact_collection.
- Repository
Id string The OCID of the repository.
- Artifact
Path 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
- Display
Name 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
[]Get
Generic 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.0
or1.2-beta-2
- compartment
Id String The OCID of the repository's compartment.
- generic
Artifact List<GetCollections Generic Generic Artifact Collection> The list of generic_artifact_collection.
- repository
Id String The OCID of the repository.
- artifact
Path 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
- display
Name 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<Get
Generic 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.0
or1.2-beta-2
- compartment
Id string The OCID of the repository's compartment.
- generic
Artifact GetCollections Generic Artifacts Generic Artifact Collection[] The list of generic_artifact_collection.
- repository
Id string The OCID of the repository.
- artifact
Path 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
- display
Name 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
Get
Generic 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.0
or1.2-beta-2
- compartment_
id str The OCID of the repository's compartment.
- generic_
artifact_ 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
Get
Generic 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.0
or1.2-beta-2
- compartment
Id String The OCID of the repository's compartment.
- generic
Artifact List<Property Map>Collections The list of generic_artifact_collection.
- repository
Id String The OCID of the repository.
- artifact
Path 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
- display
Name 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
or1.2-beta-2
Supporting Types
GetGenericArtifactsFilter
GetGenericArtifactsGenericArtifactCollection
GetGenericArtifactsGenericArtifactCollectionItem
- Artifact
Id string - Artifact
Path string Filter results by a prefix for the
artifactPath
and and return artifacts that begin with the specified prefix in their path.- Compartment
Id string The OCID of the compartment.
- 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"}
- Display
Name string A filter to return only resources that match the given display name exactly.
- 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.
- Repository
Id 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.
- Size
In stringBytes The size of the artifact in bytes.
- State string
A filter to return only resources that match the given lifecycle state name exactly.
- Time
Created 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 string - Artifact
Path string Filter results by a prefix for the
artifactPath
and and return artifacts that begin with the specified prefix in their path.- Compartment
Id string The OCID of the compartment.
- 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"}
- Display
Name string A filter to return only resources that match the given display name exactly.
- 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.
- Repository
Id 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.
- Size
In stringBytes The size of the artifact in bytes.
- State string
A filter to return only resources that match the given lifecycle state name exactly.
- Time
Created 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 String - artifact
Path String Filter results by a prefix for the
artifactPath
and and return artifacts that begin with the specified prefix in their path.- compartment
Id String The OCID of the compartment.
- 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"}
- display
Name String A filter to return only resources that match the given display name exactly.
- 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.
- repository
Id 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.
- size
In StringBytes The size of the artifact in bytes.
- state String
A filter to return only resources that match the given lifecycle state name exactly.
- time
Created 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 string - artifact
Path string Filter results by a prefix for the
artifactPath
and and return artifacts that begin with the specified prefix in their path.- compartment
Id string The OCID of the compartment.
- {[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"}
- display
Name string A filter to return only resources that match the given display name exactly.
- {[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.
- repository
Id 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.
- size
In stringBytes The size of the artifact in bytes.
- state string
A filter to return only resources that match the given lifecycle state name exactly.
- time
Created 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.
- 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.
- 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_ 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
version
and return artifacts that that begin with the specified prefix in their version.
- artifact
Id String - artifact
Path String Filter results by a prefix for the
artifactPath
and and return artifacts that begin with the specified prefix in their path.- compartment
Id String The OCID of the compartment.
- 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"}
- display
Name String A filter to return only resources that match the given display name exactly.
- 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.
- repository
Id 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.
- size
In StringBytes The size of the artifact in bytes.
- state String
A filter to return only resources that match the given lifecycle state name exactly.
- time
Created 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
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
oci
Terraform Provider.