1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. DevOps
  5. getRepositoryRefs
Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi

oci.DevOps.getRepositoryRefs

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi

    This data source provides the list of Repository Refs in Oracle Cloud Infrastructure Devops service.

    Returns a list of references.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testRepositoryRefs = oci.DevOps.getRepositoryRefs({
        repositoryId: testRepository.id,
        commitId: testCommit.id,
        refName: repositoryRefRefName,
        refType: repositoryRefRefType,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_repository_refs = oci.DevOps.get_repository_refs(repository_id=test_repository["id"],
        commit_id=test_commit["id"],
        ref_name=repository_ref_ref_name,
        ref_type=repository_ref_ref_type)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/DevOps"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := DevOps.GetRepositoryRefs(ctx, &devops.GetRepositoryRefsArgs{
    			RepositoryId: testRepository.Id,
    			CommitId:     pulumi.StringRef(testCommit.Id),
    			RefName:      pulumi.StringRef(repositoryRefRefName),
    			RefType:      pulumi.StringRef(repositoryRefRefType),
    		}, 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 testRepositoryRefs = Oci.DevOps.GetRepositoryRefs.Invoke(new()
        {
            RepositoryId = testRepository.Id,
            CommitId = testCommit.Id,
            RefName = repositoryRefRefName,
            RefType = repositoryRefRefType,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.DevOps.DevOpsFunctions;
    import com.pulumi.oci.DevOps.inputs.GetRepositoryRefsArgs;
    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 testRepositoryRefs = DevOpsFunctions.getRepositoryRefs(GetRepositoryRefsArgs.builder()
                .repositoryId(testRepository.id())
                .commitId(testCommit.id())
                .refName(repositoryRefRefName)
                .refType(repositoryRefRefType)
                .build());
    
        }
    }
    
    variables:
      testRepositoryRefs:
        fn::invoke:
          Function: oci:DevOps:getRepositoryRefs
          Arguments:
            repositoryId: ${testRepository.id}
            commitId: ${testCommit.id}
            refName: ${repositoryRefRefName}
            refType: ${repositoryRefRefType}
    

    Using getRepositoryRefs

    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 getRepositoryRefs(args: GetRepositoryRefsArgs, opts?: InvokeOptions): Promise<GetRepositoryRefsResult>
    function getRepositoryRefsOutput(args: GetRepositoryRefsOutputArgs, opts?: InvokeOptions): Output<GetRepositoryRefsResult>
    def get_repository_refs(commit_id: Optional[str] = None,
                            filters: Optional[Sequence[_devops.GetRepositoryRefsFilter]] = None,
                            ref_name: Optional[str] = None,
                            ref_type: Optional[str] = None,
                            repository_id: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetRepositoryRefsResult
    def get_repository_refs_output(commit_id: Optional[pulumi.Input[str]] = None,
                            filters: Optional[pulumi.Input[Sequence[pulumi.Input[_devops.GetRepositoryRefsFilterArgs]]]] = None,
                            ref_name: Optional[pulumi.Input[str]] = None,
                            ref_type: Optional[pulumi.Input[str]] = None,
                            repository_id: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetRepositoryRefsResult]
    func GetRepositoryRefs(ctx *Context, args *GetRepositoryRefsArgs, opts ...InvokeOption) (*GetRepositoryRefsResult, error)
    func GetRepositoryRefsOutput(ctx *Context, args *GetRepositoryRefsOutputArgs, opts ...InvokeOption) GetRepositoryRefsResultOutput

    > Note: This function is named GetRepositoryRefs in the Go SDK.

    public static class GetRepositoryRefs 
    {
        public static Task<GetRepositoryRefsResult> InvokeAsync(GetRepositoryRefsArgs args, InvokeOptions? opts = null)
        public static Output<GetRepositoryRefsResult> Invoke(GetRepositoryRefsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetRepositoryRefsResult> getRepositoryRefs(GetRepositoryRefsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:DevOps/getRepositoryRefs:getRepositoryRefs
      arguments:
        # arguments dictionary

    The following arguments are supported:

    RepositoryId string
    Unique repository identifier.
    CommitId string
    Commit ID in a repository.
    Filters List<GetRepositoryRefsFilter>
    RefName string
    A filter to return only resources that match the given reference name.
    RefType string
    Reference type to distinguish between branch and tag. If it is not specified, all references are returned.
    RepositoryId string
    Unique repository identifier.
    CommitId string
    Commit ID in a repository.
    Filters []GetRepositoryRefsFilter
    RefName string
    A filter to return only resources that match the given reference name.
    RefType string
    Reference type to distinguish between branch and tag. If it is not specified, all references are returned.
    repositoryId String
    Unique repository identifier.
    commitId String
    Commit ID in a repository.
    filters List<GetRepositoryRefsFilter>
    refName String
    A filter to return only resources that match the given reference name.
    refType String
    Reference type to distinguish between branch and tag. If it is not specified, all references are returned.
    repositoryId string
    Unique repository identifier.
    commitId string
    Commit ID in a repository.
    filters GetRepositoryRefsFilter[]
    refName string
    A filter to return only resources that match the given reference name.
    refType string
    Reference type to distinguish between branch and tag. If it is not specified, all references are returned.
    repository_id str
    Unique repository identifier.
    commit_id str
    Commit ID in a repository.
    filters Sequence[devops.GetRepositoryRefsFilter]
    ref_name str
    A filter to return only resources that match the given reference name.
    ref_type str
    Reference type to distinguish between branch and tag. If it is not specified, all references are returned.
    repositoryId String
    Unique repository identifier.
    commitId String
    Commit ID in a repository.
    filters List<Property Map>
    refName String
    A filter to return only resources that match the given reference name.
    refType String
    Reference type to distinguish between branch and tag. If it is not specified, all references are returned.

    getRepositoryRefs Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    RepositoryId string
    The OCID of the repository containing the reference.
    RepositoryRefCollections List<GetRepositoryRefsRepositoryRefCollection>
    The list of repository_ref_collection.
    CommitId string
    Commit ID pointed to by the new branch.
    Filters List<GetRepositoryRefsFilter>
    RefName string
    Unique reference name inside a repository.
    RefType string
    The type of reference (BRANCH or TAG).
    Id string
    The provider-assigned unique ID for this managed resource.
    RepositoryId string
    The OCID of the repository containing the reference.
    RepositoryRefCollections []GetRepositoryRefsRepositoryRefCollection
    The list of repository_ref_collection.
    CommitId string
    Commit ID pointed to by the new branch.
    Filters []GetRepositoryRefsFilter
    RefName string
    Unique reference name inside a repository.
    RefType string
    The type of reference (BRANCH or TAG).
    id String
    The provider-assigned unique ID for this managed resource.
    repositoryId String
    The OCID of the repository containing the reference.
    repositoryRefCollections List<GetRepositoryRefsRepositoryRefCollection>
    The list of repository_ref_collection.
    commitId String
    Commit ID pointed to by the new branch.
    filters List<GetRepositoryRefsFilter>
    refName String
    Unique reference name inside a repository.
    refType String
    The type of reference (BRANCH or TAG).
    id string
    The provider-assigned unique ID for this managed resource.
    repositoryId string
    The OCID of the repository containing the reference.
    repositoryRefCollections GetRepositoryRefsRepositoryRefCollection[]
    The list of repository_ref_collection.
    commitId string
    Commit ID pointed to by the new branch.
    filters GetRepositoryRefsFilter[]
    refName string
    Unique reference name inside a repository.
    refType string
    The type of reference (BRANCH or TAG).
    id str
    The provider-assigned unique ID for this managed resource.
    repository_id str
    The OCID of the repository containing the reference.
    repository_ref_collections Sequence[devops.GetRepositoryRefsRepositoryRefCollection]
    The list of repository_ref_collection.
    commit_id str
    Commit ID pointed to by the new branch.
    filters Sequence[devops.GetRepositoryRefsFilter]
    ref_name str
    Unique reference name inside a repository.
    ref_type str
    The type of reference (BRANCH or TAG).
    id String
    The provider-assigned unique ID for this managed resource.
    repositoryId String
    The OCID of the repository containing the reference.
    repositoryRefCollections List<Property Map>
    The list of repository_ref_collection.
    commitId String
    Commit ID pointed to by the new branch.
    filters List<Property Map>
    refName String
    Unique reference name inside a repository.
    refType String
    The type of reference (BRANCH or TAG).

    Supporting Types

    GetRepositoryRefsFilter

    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

    GetRepositoryRefsRepositoryRefCollection

    GetRepositoryRefsRepositoryRefCollectionItem

    CommitId string
    Commit ID in a repository.
    DefinedTags Dictionary<string, string>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example: {"foo-namespace.bar-key": "value"}
    FreeformTags Dictionary<string, string>
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags. Example: {"bar-key": "value"}
    FullRefName string
    Unique full reference name inside a repository.
    Id string
    ObjectId string
    SHA-1 hash value of the object pointed to by the tag.
    RefName string
    A filter to return only resources that match the given reference name.
    RefType string
    Reference type to distinguish between branch and tag. If it is not specified, all references are returned.
    RepositoryId string
    Unique repository identifier.
    CommitId string
    Commit ID in a repository.
    DefinedTags map[string]string
    Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example: {"foo-namespace.bar-key": "value"}
    FreeformTags map[string]string
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags. Example: {"bar-key": "value"}
    FullRefName string
    Unique full reference name inside a repository.
    Id string
    ObjectId string
    SHA-1 hash value of the object pointed to by the tag.
    RefName string
    A filter to return only resources that match the given reference name.
    RefType string
    Reference type to distinguish between branch and tag. If it is not specified, all references are returned.
    RepositoryId string
    Unique repository identifier.
    commitId String
    Commit ID in a repository.
    definedTags Map<String,String>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example: {"foo-namespace.bar-key": "value"}
    freeformTags Map<String,String>
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags. Example: {"bar-key": "value"}
    fullRefName String
    Unique full reference name inside a repository.
    id String
    objectId String
    SHA-1 hash value of the object pointed to by the tag.
    refName String
    A filter to return only resources that match the given reference name.
    refType String
    Reference type to distinguish between branch and tag. If it is not specified, all references are returned.
    repositoryId String
    Unique repository identifier.
    commitId string
    Commit ID in a repository.
    definedTags {[key: string]: string}
    Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example: {"foo-namespace.bar-key": "value"}
    freeformTags {[key: string]: string}
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags. Example: {"bar-key": "value"}
    fullRefName string
    Unique full reference name inside a repository.
    id string
    objectId string
    SHA-1 hash value of the object pointed to by the tag.
    refName string
    A filter to return only resources that match the given reference name.
    refType string
    Reference type to distinguish between branch and tag. If it is not specified, all references are returned.
    repositoryId string
    Unique repository identifier.
    commit_id str
    Commit ID in a repository.
    defined_tags Mapping[str, str]
    Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example: {"foo-namespace.bar-key": "value"}
    freeform_tags Mapping[str, str]
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags. Example: {"bar-key": "value"}
    full_ref_name str
    Unique full reference name inside a repository.
    id str
    object_id str
    SHA-1 hash value of the object pointed to by the tag.
    ref_name str
    A filter to return only resources that match the given reference name.
    ref_type str
    Reference type to distinguish between branch and tag. If it is not specified, all references are returned.
    repository_id str
    Unique repository identifier.
    commitId String
    Commit ID in a repository.
    definedTags Map<String>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example: {"foo-namespace.bar-key": "value"}
    freeformTags Map<String>
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags. Example: {"bar-key": "value"}
    fullRefName String
    Unique full reference name inside a repository.
    id String
    objectId String
    SHA-1 hash value of the object pointed to by the tag.
    refName String
    A filter to return only resources that match the given reference name.
    refType String
    Reference type to distinguish between branch and tag. If it is not specified, all references are returned.
    repositoryId String
    Unique repository identifier.

    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 v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi