Oracle Cloud Infrastructure v2.33.0 published on Thursday, May 1, 2025 by Pulumi
oci.Artifacts.getRepositories
Explore with Pulumi AI
This data source provides the list of Repositories in Oracle Cloud Infrastructure Artifacts service.
Lists repositories in the specified compartment.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testRepositories = oci.Artifacts.getRepositories({
    compartmentId: compartmentId,
    displayName: repositoryDisplayName,
    id: repositoryId,
    isImmutable: repositoryIsImmutable,
    state: repositoryState,
});
import pulumi
import pulumi_oci as oci
test_repositories = oci.Artifacts.get_repositories(compartment_id=compartment_id,
    display_name=repository_display_name,
    id=repository_id,
    is_immutable=repository_is_immutable,
    state=repository_state)
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.GetRepositories(ctx, &artifacts.GetRepositoriesArgs{
			CompartmentId: compartmentId,
			DisplayName:   pulumi.StringRef(repositoryDisplayName),
			Id:            pulumi.StringRef(repositoryId),
			IsImmutable:   pulumi.BoolRef(repositoryIsImmutable),
			State:         pulumi.StringRef(repositoryState),
		}, 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 testRepositories = Oci.Artifacts.GetRepositories.Invoke(new()
    {
        CompartmentId = compartmentId,
        DisplayName = repositoryDisplayName,
        Id = repositoryId,
        IsImmutable = repositoryIsImmutable,
        State = repositoryState,
    });
});
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.GetRepositoriesArgs;
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 testRepositories = ArtifactsFunctions.getRepositories(GetRepositoriesArgs.builder()
            .compartmentId(compartmentId)
            .displayName(repositoryDisplayName)
            .id(repositoryId)
            .isImmutable(repositoryIsImmutable)
            .state(repositoryState)
            .build());
    }
}
variables:
  testRepositories:
    fn::invoke:
      function: oci:Artifacts:getRepositories
      arguments:
        compartmentId: ${compartmentId}
        displayName: ${repositoryDisplayName}
        id: ${repositoryId}
        isImmutable: ${repositoryIsImmutable}
        state: ${repositoryState}
Using getRepositories
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 getRepositories(args: GetRepositoriesArgs, opts?: InvokeOptions): Promise<GetRepositoriesResult>
function getRepositoriesOutput(args: GetRepositoriesOutputArgs, opts?: InvokeOptions): Output<GetRepositoriesResult>def get_repositories(compartment_id: Optional[str] = None,
                     display_name: Optional[str] = None,
                     filters: Optional[Sequence[GetRepositoriesFilter]] = None,
                     id: Optional[str] = None,
                     is_immutable: Optional[bool] = None,
                     state: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetRepositoriesResult
def get_repositories_output(compartment_id: Optional[pulumi.Input[str]] = None,
                     display_name: Optional[pulumi.Input[str]] = None,
                     filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetRepositoriesFilterArgs]]]] = None,
                     id: Optional[pulumi.Input[str]] = None,
                     is_immutable: Optional[pulumi.Input[bool]] = None,
                     state: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetRepositoriesResult]func GetRepositories(ctx *Context, args *GetRepositoriesArgs, opts ...InvokeOption) (*GetRepositoriesResult, error)
func GetRepositoriesOutput(ctx *Context, args *GetRepositoriesOutputArgs, opts ...InvokeOption) GetRepositoriesResultOutput> Note: This function is named GetRepositories in the Go SDK.
public static class GetRepositories 
{
    public static Task<GetRepositoriesResult> InvokeAsync(GetRepositoriesArgs args, InvokeOptions? opts = null)
    public static Output<GetRepositoriesResult> Invoke(GetRepositoriesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetRepositoriesResult> getRepositories(GetRepositoriesArgs args, InvokeOptions options)
public static Output<GetRepositoriesResult> getRepositories(GetRepositoriesArgs args, InvokeOptions options)
fn::invoke:
  function: oci:Artifacts/getRepositories:getRepositories
  arguments:
    # arguments dictionaryThe following arguments are supported:
- CompartmentId string
- The OCID of the compartment.
- DisplayName string
- A filter to return only resources that match the given display name exactly.
- Filters
List<GetRepositories Filter> 
- Id string
- A filter to return the resources for the specified OCID.
- IsImmutable bool
- A filter to return resources that match the isImmutable value.
- State string
- A filter to return only resources that match the given lifecycle state name exactly.
- CompartmentId string
- The OCID of the compartment.
- DisplayName string
- A filter to return only resources that match the given display name exactly.
- Filters
[]GetRepositories Filter 
- Id string
- A filter to return the resources for the specified OCID.
- IsImmutable bool
- A filter to return resources that match the isImmutable value.
- State string
- A filter to return only resources that match the given lifecycle state name exactly.
- compartmentId String
- The OCID of the compartment.
- displayName String
- A filter to return only resources that match the given display name exactly.
- filters
List<GetRepositories Filter> 
- id String
- A filter to return the resources for the specified OCID.
- isImmutable Boolean
- A filter to return resources that match the isImmutable value.
- state String
- A filter to return only resources that match the given lifecycle state name exactly.
- compartmentId string
- The OCID of the compartment.
- displayName string
- A filter to return only resources that match the given display name exactly.
- filters
GetRepositories Filter[] 
- id string
- A filter to return the resources for the specified OCID.
- isImmutable boolean
- A filter to return resources that match the isImmutable value.
- state string
- A filter to return only resources that match the given lifecycle state name exactly.
- compartment_id str
- The OCID of the compartment.
- display_name str
- A filter to return only resources that match the given display name exactly.
- filters
Sequence[GetRepositories Filter] 
- id str
- A filter to return the resources for the specified OCID.
- is_immutable bool
- A filter to return resources that match the isImmutable value.
- state str
- A filter to return only resources that match the given lifecycle state name exactly.
- compartmentId String
- The OCID of the compartment.
- 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.
- isImmutable Boolean
- A filter to return resources that match the isImmutable value.
- state String
- A filter to return only resources that match the given lifecycle state name exactly.
getRepositories Result
The following output properties are available:
- CompartmentId string
- The OCID of the repository's compartment.
- RepositoryCollections List<GetRepositories Repository Collection> 
- The list of repository_collection.
- DisplayName string
- The repository name.
- Filters
List<GetRepositories Filter> 
- Id string
- The OCID of the repository. Example: ocid1.artifactrepository.oc1..exampleuniqueID
- IsImmutable bool
- Whether the repository is immutable. The artifacts of an immutable repository cannot be overwritten.
- State string
- The current state of the repository.
- CompartmentId string
- The OCID of the repository's compartment.
- RepositoryCollections []GetRepositories Repository Collection 
- The list of repository_collection.
- DisplayName string
- The repository name.
- Filters
[]GetRepositories Filter 
- Id string
- The OCID of the repository. Example: ocid1.artifactrepository.oc1..exampleuniqueID
- IsImmutable bool
- Whether the repository is immutable. The artifacts of an immutable repository cannot be overwritten.
- State string
- The current state of the repository.
- compartmentId String
- The OCID of the repository's compartment.
- repositoryCollections List<GetRepositories Repository Collection> 
- The list of repository_collection.
- displayName String
- The repository name.
- filters
List<GetRepositories Filter> 
- id String
- The OCID of the repository. Example: ocid1.artifactrepository.oc1..exampleuniqueID
- isImmutable Boolean
- Whether the repository is immutable. The artifacts of an immutable repository cannot be overwritten.
- state String
- The current state of the repository.
- compartmentId string
- The OCID of the repository's compartment.
- repositoryCollections GetRepositories Repository Collection[] 
- The list of repository_collection.
- displayName string
- The repository name.
- filters
GetRepositories Filter[] 
- id string
- The OCID of the repository. Example: ocid1.artifactrepository.oc1..exampleuniqueID
- isImmutable boolean
- Whether the repository is immutable. The artifacts of an immutable repository cannot be overwritten.
- state string
- The current state of the repository.
- compartment_id str
- The OCID of the repository's compartment.
- repository_collections Sequence[GetRepositories Repository Collection] 
- The list of repository_collection.
- display_name str
- The repository name.
- filters
Sequence[GetRepositories Filter] 
- id str
- The OCID of the repository. Example: ocid1.artifactrepository.oc1..exampleuniqueID
- is_immutable bool
- Whether the repository is immutable. The artifacts of an immutable repository cannot be overwritten.
- state str
- The current state of the repository.
- compartmentId String
- The OCID of the repository's compartment.
- repositoryCollections List<Property Map>
- The list of repository_collection.
- displayName String
- The repository name.
- filters List<Property Map>
- id String
- The OCID of the repository. Example: ocid1.artifactrepository.oc1..exampleuniqueID
- isImmutable Boolean
- Whether the repository is immutable. The artifacts of an immutable repository cannot be overwritten.
- state String
- The current state of the repository.
Supporting Types
GetRepositoriesFilter  
GetRepositoriesRepositoryCollection   
GetRepositoriesRepositoryCollectionItem    
- 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"}
- Description string
- The repository description.
- 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.
- IsImmutable bool
- A filter to return resources that match the isImmutable value.
- RepositoryType string
- The repository's supported artifact type.
- 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.
- 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"}
- Description string
- The repository description.
- 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.
- IsImmutable bool
- A filter to return resources that match the isImmutable value.
- RepositoryType string
- The repository's supported artifact type.
- 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.
- 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"}
- description String
- The repository description.
- 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.
- isImmutable Boolean
- A filter to return resources that match the isImmutable value.
- repositoryType String
- The repository's supported artifact type.
- 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.
- 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"}
- description string
- The repository description.
- 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.
- isImmutable boolean
- A filter to return resources that match the isImmutable value.
- repositoryType string
- The repository's supported artifact type.
- 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.
- 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"}
- description str
- The repository description.
- 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.
- is_immutable bool
- A filter to return resources that match the isImmutable value.
- repository_type str
- The repository's supported artifact type.
- 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.
- 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"}
- description String
- The repository description.
- 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.
- isImmutable Boolean
- A filter to return resources that match the isImmutable value.
- repositoryType String
- The repository's supported artifact type.
- 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.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.