Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi
oci.DevOps.getRepositoryRef
Explore with Pulumi AI
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi
This data source provides details about a specific Repository Ref resource in Oracle Cloud Infrastructure Devops service.
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/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:
- Ref
Name string - A filter to return only resources that match the given reference name.
- Repository
Id string - Unique repository identifier.
- Ref
Name string - A filter to return only resources that match the given reference name.
- Repository
Id string - Unique repository identifier.
- ref
Name String - A filter to return only resources that match the given reference name.
- repository
Id String - Unique repository identifier.
- ref
Name string - A filter to return only resources that match the given reference name.
- repository
Id 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.
- ref
Name String - A filter to return only resources that match the given reference name.
- repository
Id String - Unique repository identifier.
getRepositoryRef Result
The following output properties are available:
- Commit
Id string - Commit ID pointed to by the new branch.
- Dictionary<string, object>
- 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, object>
- 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 stringName - Unique full reference name inside a repository.
- Id string
- Object
Id string - SHA-1 hash value of the object pointed to by the tag.
- Ref
Name string - Unique reference name inside a repository.
- Ref
Type string - The type of reference (BRANCH or TAG).
- Repository
Id string - The OCID of the repository containing the reference.
- Commit
Id string - Commit ID pointed to by the new branch.
- map[string]interface{}
- 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]interface{}
- 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 stringName - Unique full reference name inside a repository.
- Id string
- Object
Id string - SHA-1 hash value of the object pointed to by the tag.
- Ref
Name string - Unique reference name inside a repository.
- Ref
Type string - The type of reference (BRANCH or TAG).
- Repository
Id string - The OCID of the repository containing the reference.
- commit
Id String - Commit ID pointed to by the new branch.
- Map<String,Object>
- 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,Object>
- 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 StringName - Unique full reference name inside a repository.
- id String
- object
Id String - SHA-1 hash value of the object pointed to by the tag.
- ref
Name String - Unique reference name inside a repository.
- ref
Type String - The type of reference (BRANCH or TAG).
- repository
Id String - The OCID of the repository containing the reference.
- commit
Id string - Commit ID pointed to by the new branch.
- {[key: string]: any}
- 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]: any}
- 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 stringName - Unique full reference name inside a repository.
- id string
- object
Id string - SHA-1 hash value of the object pointed to by the tag.
- ref
Name string - Unique reference name inside a repository.
- ref
Type string - The type of reference (BRANCH or TAG).
- repository
Id string - The OCID of the repository containing the reference.
- commit_
id str - Commit ID pointed to by the new branch.
- Mapping[str, Any]
- 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, Any]
- 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.
- commit
Id String - Commit ID pointed to by the new branch.
- Map<Any>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example:
{"foo-namespace.bar-key": "value"}
- Map<Any>
- 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 StringName - Unique full reference name inside a repository.
- id String
- object
Id String - SHA-1 hash value of the object pointed to by the tag.
- ref
Name String - Unique reference name inside a repository.
- ref
Type String - The type of reference (BRANCH or TAG).
- repository
Id 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.
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi