1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Artifacts
  5. getRepositories
Oracle Cloud Infrastructure v1.16.1 published on Wednesday, Nov 22, 2023 by Pulumi

oci.Artifacts.getRepositories

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.16.1 published on Wednesday, Nov 22, 2023 by Pulumi

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

    Lists repositories in the specified compartment.

    Example Usage

    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 = @var.Compartment_id,
            DisplayName = @var.Repository_display_name,
            Id = @var.Repository_id,
            IsImmutable = @var.Repository_is_immutable,
            State = @var.Repository_state,
        });
    
    });
    
    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.GetRepositories(ctx, &artifacts.GetRepositoriesArgs{
    			CompartmentId: _var.Compartment_id,
    			DisplayName:   pulumi.StringRef(_var.Repository_display_name),
    			Id:            pulumi.StringRef(_var.Repository_id),
    			IsImmutable:   pulumi.BoolRef(_var.Repository_is_immutable),
    			State:         pulumi.StringRef(_var.Repository_state),
    		}, 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.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(var_.compartment_id())
                .displayName(var_.repository_display_name())
                .id(var_.repository_id())
                .isImmutable(var_.repository_is_immutable())
                .state(var_.repository_state())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_oci as oci
    
    test_repositories = oci.Artifacts.get_repositories(compartment_id=var["compartment_id"],
        display_name=var["repository_display_name"],
        id=var["repository_id"],
        is_immutable=var["repository_is_immutable"],
        state=var["repository_state"])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testRepositories = oci.Artifacts.getRepositories({
        compartmentId: _var.compartment_id,
        displayName: _var.repository_display_name,
        id: _var.repository_id,
        isImmutable: _var.repository_is_immutable,
        state: _var.repository_state,
    });
    
    variables:
      testRepositories:
        fn::invoke:
          Function: oci:Artifacts:getRepositories
          Arguments:
            compartmentId: ${var.compartment_id}
            displayName: ${var.repository_display_name}
            id: ${var.repository_id}
            isImmutable: ${var.repository_is_immutable}
            state: ${var.repository_state}
    

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

    The 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<GetRepositoriesFilter>
    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 []GetRepositoriesFilter
    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<GetRepositoriesFilter>
    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 GetRepositoriesFilter[]
    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 GetRepositoriesFilter]
    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<GetRepositoriesRepositoryCollection>

    The list of repository_collection.

    DisplayName string

    The repository name.

    Filters List<GetRepositoriesFilter>
    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 []GetRepositoriesRepositoryCollection

    The list of repository_collection.

    DisplayName string

    The repository name.

    Filters []GetRepositoriesFilter
    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<GetRepositoriesRepositoryCollection>

    The list of repository_collection.

    displayName String

    The repository name.

    filters List<GetRepositoriesFilter>
    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 GetRepositoriesRepositoryCollection[]

    The list of repository_collection.

    displayName string

    The repository name.

    filters GetRepositoriesFilter[]
    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 GetRepositoriesRepositoryCollection]

    The list of repository_collection.

    display_name str

    The repository name.

    filters GetRepositoriesFilter]
    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

    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

    GetRepositoriesRepositoryCollection

    GetRepositoriesRepositoryCollectionItem

    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"}

    Description string

    The repository description.

    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.

    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.

    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"}

    Description string

    The repository description.

    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.

    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.

    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"}

    description String

    The repository description.

    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.

    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.

    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"}

    description string

    The repository description.

    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.

    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.

    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"}

    description str

    The repository description.

    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.

    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.

    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"}

    description String

    The repository description.

    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.

    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 oci Terraform Provider.

    oci logo
    Oracle Cloud Infrastructure v1.16.1 published on Wednesday, Nov 22, 2023 by Pulumi