1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. DevOps
  5. getRepositoryRef
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

oci.DevOps.getRepositoryRef

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

    This data source provides details about a specific Repository Ref resource in Oracle Cloud Infrastructure Devops service.

    This API will be deprecated on Wed, 12 June 2024 01:00:00 GMT as it does not get recognized when refName has ‘/’. This will be replaced by “/repositories/{repositoryId}/refs”. Retrieves a repository’s reference by its name with preference for branches over tags if the name is ambiguous. This can be disambiguated by using full names like “heads/” or “tags/”.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testRepositoryRef = oci.DevOps.getRepositoryRef({
        refName: repositoryRefRefName,
        repositoryId: testRepository.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_repository_ref = oci.DevOps.get_repository_ref(ref_name=repository_ref_ref_name,
        repository_id=test_repository["id"])
    
    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.GetRepositoryRef(ctx, &devops.GetRepositoryRefArgs{
    			RefName:      repositoryRefRefName,
    			RepositoryId: testRepository.Id,
    		}, 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 testRepositoryRef = Oci.DevOps.GetRepositoryRef.Invoke(new()
        {
            RefName = repositoryRefRefName,
            RepositoryId = testRepository.Id,
        });
    
    });
    
    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.GetRepositoryRefArgs;
    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 testRepositoryRef = DevOpsFunctions.getRepositoryRef(GetRepositoryRefArgs.builder()
                .refName(repositoryRefRefName)
                .repositoryId(testRepository.id())
                .build());
    
        }
    }
    
    variables:
      testRepositoryRef:
        fn::invoke:
          Function: oci:DevOps:getRepositoryRef
          Arguments:
            refName: ${repositoryRefRefName}
            repositoryId: ${testRepository.id}
    

    Using getRepositoryRef

    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 getRepositoryRef(args: GetRepositoryRefArgs, opts?: InvokeOptions): Promise<GetRepositoryRefResult>
    function getRepositoryRefOutput(args: GetRepositoryRefOutputArgs, opts?: InvokeOptions): Output<GetRepositoryRefResult>
    def get_repository_ref(ref_name: Optional[str] = None,
                           repository_id: Optional[str] = None,
                           opts: Optional[InvokeOptions] = None) -> GetRepositoryRefResult
    def get_repository_ref_output(ref_name: Optional[pulumi.Input[str]] = None,
                           repository_id: Optional[pulumi.Input[str]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetRepositoryRefResult]
    func GetRepositoryRef(ctx *Context, args *GetRepositoryRefArgs, opts ...InvokeOption) (*GetRepositoryRefResult, error)
    func GetRepositoryRefOutput(ctx *Context, args *GetRepositoryRefOutputArgs, opts ...InvokeOption) GetRepositoryRefResultOutput

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

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

    The following arguments are supported:

    RefName string
    A filter to return only resources that match the given reference name.
    RepositoryId string
    Unique repository identifier.
    RefName string
    A filter to return only resources that match the given reference name.
    RepositoryId string
    Unique repository identifier.
    refName String
    A filter to return only resources that match the given reference name.
    repositoryId String
    Unique repository identifier.
    refName string
    A filter to return only resources that match the given reference name.
    repositoryId string
    Unique repository identifier.
    ref_name str
    A filter to return only resources that match the given reference name.
    repository_id str
    Unique repository identifier.
    refName String
    A filter to return only resources that match the given reference name.
    repositoryId String
    Unique repository identifier.

    getRepositoryRef Result

    The following output properties are available:

    CommitId string
    Commit ID pointed to by the new branch.
    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
    Unique reference name inside a repository.
    RefType string
    The type of reference (BRANCH or TAG).
    RepositoryId string
    The OCID of the repository containing the reference.
    CommitId string
    Commit ID pointed to by the new branch.
    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
    Unique reference name inside a repository.
    RefType string
    The type of reference (BRANCH or TAG).
    RepositoryId string
    The OCID of the repository containing the reference.
    commitId String
    Commit ID pointed to by the new branch.
    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
    Unique reference name inside a repository.
    refType String
    The type of reference (BRANCH or TAG).
    repositoryId String
    The OCID of the repository containing the reference.
    commitId string
    Commit ID pointed to by the new branch.
    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
    Unique reference name inside a repository.
    refType string
    The type of reference (BRANCH or TAG).
    repositoryId string
    The OCID of the repository containing the reference.
    commit_id str
    Commit ID pointed to by the new branch.
    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
    Unique reference name inside a repository.
    ref_type str
    The type of reference (BRANCH or TAG).
    repository_id str
    The OCID of the repository containing the reference.
    commitId String
    Commit ID pointed to by the new branch.
    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
    Unique reference name inside a repository.
    refType String
    The type of reference (BRANCH or TAG).
    repositoryId String
    The OCID of the repository containing the reference.

    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.17.0 published on Friday, Nov 15, 2024 by Pulumi