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

oci.DevOps.getRepositoryObject

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 Object resource in Oracle Cloud Infrastructure Devops service.

    Retrieves blob of specific branch name/commit ID and file path.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testRepositoryObject = oci.DevOps.getRepositoryObject({
        repositoryId: testRepository.id,
        filePath: repositoryObjectFilePath,
        refName: repositoryObjectRefName,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_repository_object = oci.DevOps.get_repository_object(repository_id=test_repository["id"],
        file_path=repository_object_file_path,
        ref_name=repository_object_ref_name)
    
    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.GetRepositoryObject(ctx, &devops.GetRepositoryObjectArgs{
    			RepositoryId: testRepository.Id,
    			FilePath:     pulumi.StringRef(repositoryObjectFilePath),
    			RefName:      pulumi.StringRef(repositoryObjectRefName),
    		}, 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 testRepositoryObject = Oci.DevOps.GetRepositoryObject.Invoke(new()
        {
            RepositoryId = testRepository.Id,
            FilePath = repositoryObjectFilePath,
            RefName = repositoryObjectRefName,
        });
    
    });
    
    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.GetRepositoryObjectArgs;
    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 testRepositoryObject = DevOpsFunctions.getRepositoryObject(GetRepositoryObjectArgs.builder()
                .repositoryId(testRepository.id())
                .filePath(repositoryObjectFilePath)
                .refName(repositoryObjectRefName)
                .build());
    
        }
    }
    
    variables:
      testRepositoryObject:
        fn::invoke:
          Function: oci:DevOps:getRepositoryObject
          Arguments:
            repositoryId: ${testRepository.id}
            filePath: ${repositoryObjectFilePath}
            refName: ${repositoryObjectRefName}
    

    Using getRepositoryObject

    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 getRepositoryObject(args: GetRepositoryObjectArgs, opts?: InvokeOptions): Promise<GetRepositoryObjectResult>
    function getRepositoryObjectOutput(args: GetRepositoryObjectOutputArgs, opts?: InvokeOptions): Output<GetRepositoryObjectResult>
    def get_repository_object(file_path: Optional[str] = None,
                              ref_name: Optional[str] = None,
                              repository_id: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetRepositoryObjectResult
    def get_repository_object_output(file_path: Optional[pulumi.Input[str]] = None,
                              ref_name: Optional[pulumi.Input[str]] = None,
                              repository_id: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetRepositoryObjectResult]
    func GetRepositoryObject(ctx *Context, args *GetRepositoryObjectArgs, opts ...InvokeOption) (*GetRepositoryObjectResult, error)
    func GetRepositoryObjectOutput(ctx *Context, args *GetRepositoryObjectOutputArgs, opts ...InvokeOption) GetRepositoryObjectResultOutput

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

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

    The following arguments are supported:

    RepositoryId string
    Unique repository identifier.
    FilePath string
    A filter to return only commits that affect any of the specified paths.
    RefName string
    A filter to return only resources that match the given reference name.
    RepositoryId string
    Unique repository identifier.
    FilePath string
    A filter to return only commits that affect any of the specified paths.
    RefName string
    A filter to return only resources that match the given reference name.
    repositoryId String
    Unique repository identifier.
    filePath String
    A filter to return only commits that affect any of the specified paths.
    refName String
    A filter to return only resources that match the given reference name.
    repositoryId string
    Unique repository identifier.
    filePath string
    A filter to return only commits that affect any of the specified paths.
    refName string
    A filter to return only resources that match the given reference name.
    repository_id str
    Unique repository identifier.
    file_path str
    A filter to return only commits that affect any of the specified paths.
    ref_name str
    A filter to return only resources that match the given reference name.
    repositoryId String
    Unique repository identifier.
    filePath String
    A filter to return only commits that affect any of the specified paths.
    refName String
    A filter to return only resources that match the given reference name.

    getRepositoryObject Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    IsBinary bool
    Flag to determine if the object contains binary file content or not.
    RepositoryId string
    Sha string
    SHA-1 hash of git object.
    SizeInBytes string
    Size in bytes.
    Type string
    The type of git object.
    FilePath string
    RefName string
    Id string
    The provider-assigned unique ID for this managed resource.
    IsBinary bool
    Flag to determine if the object contains binary file content or not.
    RepositoryId string
    Sha string
    SHA-1 hash of git object.
    SizeInBytes string
    Size in bytes.
    Type string
    The type of git object.
    FilePath string
    RefName string
    id String
    The provider-assigned unique ID for this managed resource.
    isBinary Boolean
    Flag to determine if the object contains binary file content or not.
    repositoryId String
    sha String
    SHA-1 hash of git object.
    sizeInBytes String
    Size in bytes.
    type String
    The type of git object.
    filePath String
    refName String
    id string
    The provider-assigned unique ID for this managed resource.
    isBinary boolean
    Flag to determine if the object contains binary file content or not.
    repositoryId string
    sha string
    SHA-1 hash of git object.
    sizeInBytes string
    Size in bytes.
    type string
    The type of git object.
    filePath string
    refName string
    id str
    The provider-assigned unique ID for this managed resource.
    is_binary bool
    Flag to determine if the object contains binary file content or not.
    repository_id str
    sha str
    SHA-1 hash of git object.
    size_in_bytes str
    Size in bytes.
    type str
    The type of git object.
    file_path str
    ref_name str
    id String
    The provider-assigned unique ID for this managed resource.
    isBinary Boolean
    Flag to determine if the object contains binary file content or not.
    repositoryId String
    sha String
    SHA-1 hash of git object.
    sizeInBytes String
    Size in bytes.
    type String
    The type of git object.
    filePath String
    refName String

    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