oci.DevOps.getRepositoryRef
Explore with Pulumi AI
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/
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 LookupRepositoryRef(ctx *Context, args *LookupRepositoryRefArgs, opts ...InvokeOption) (*LookupRepositoryRefResult, error)
func LookupRepositoryRefOutput(ctx *Context, args *LookupRepositoryRefOutputArgs, opts ...InvokeOption) LookupRepositoryRefResultOutput> Note: This function is named LookupRepositoryRef 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)
public static Output<GetRepositoryRefResult> getRepositoryRef(GetRepositoryRefArgs args, InvokeOptions options)
fn::invoke:
  function: oci:DevOps/getRepositoryRef:getRepositoryRef
  arguments:
    # arguments dictionaryThe 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.
- 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"}
- 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"}
- FullRef stringName 
- 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.
- 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"}
- 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"}
- FullRef stringName 
- 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.
- 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"}
- 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"}
- fullRef StringName 
- 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.
- {[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"}
- {[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"}
- fullRef stringName 
- 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.
- 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"}
- 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_ strname 
- 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.
- 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"}
- 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"}
- fullRef StringName 
- 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 ociTerraform Provider.