Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 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[_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
Sequence[artifacts.
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_ Sequence[artifacts.collections Get 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[artifacts.
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, 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"}
- Display
Name 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.
- 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]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"}
- Display
Name 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.
- 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,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"}
- display
Name 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.
- 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]: 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"}
- display
Name 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.
- 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, 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
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>
- 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>
- 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.