1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. DevOps
  5. getRepositoryObjectContent
Oracle Cloud Infrastructure v1.37.0 published on Friday, May 24, 2024 by Pulumi

oci.DevOps.getRepositoryObjectContent

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.37.0 published on Friday, May 24, 2024 by Pulumi

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

    Retrieve contents of a specified object.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testRepositoryObjectContent = oci.DevOps.getRepositoryObjectContent({
        repositoryId: testRepository.id,
        sha: repositoryObjectContentSha,
        filePath: repositoryObjectContentFilePath,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_repository_object_content = oci.DevOps.get_repository_object_content(repository_id=test_repository["id"],
        sha=repository_object_content_sha,
        file_path=repository_object_content_file_path)
    
    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.GetRepositoryObjectContent(ctx, &devops.GetRepositoryObjectContentArgs{
    			RepositoryId: testRepository.Id,
    			Sha:          repositoryObjectContentSha,
    			FilePath:     pulumi.StringRef(repositoryObjectContentFilePath),
    		}, 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 testRepositoryObjectContent = Oci.DevOps.GetRepositoryObjectContent.Invoke(new()
        {
            RepositoryId = testRepository.Id,
            Sha = repositoryObjectContentSha,
            FilePath = repositoryObjectContentFilePath,
        });
    
    });
    
    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.GetRepositoryObjectContentArgs;
    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 testRepositoryObjectContent = DevOpsFunctions.getRepositoryObjectContent(GetRepositoryObjectContentArgs.builder()
                .repositoryId(testRepository.id())
                .sha(repositoryObjectContentSha)
                .filePath(repositoryObjectContentFilePath)
                .build());
    
        }
    }
    
    variables:
      testRepositoryObjectContent:
        fn::invoke:
          Function: oci:DevOps:getRepositoryObjectContent
          Arguments:
            repositoryId: ${testRepository.id}
            sha: ${repositoryObjectContentSha}
            filePath: ${repositoryObjectContentFilePath}
    

    Using getRepositoryObjectContent

    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 getRepositoryObjectContent(args: GetRepositoryObjectContentArgs, opts?: InvokeOptions): Promise<GetRepositoryObjectContentResult>
    function getRepositoryObjectContentOutput(args: GetRepositoryObjectContentOutputArgs, opts?: InvokeOptions): Output<GetRepositoryObjectContentResult>
    def get_repository_object_content(file_path: Optional[str] = None,
                                      repository_id: Optional[str] = None,
                                      sha: Optional[str] = None,
                                      opts: Optional[InvokeOptions] = None) -> GetRepositoryObjectContentResult
    def get_repository_object_content_output(file_path: Optional[pulumi.Input[str]] = None,
                                      repository_id: Optional[pulumi.Input[str]] = None,
                                      sha: Optional[pulumi.Input[str]] = None,
                                      opts: Optional[InvokeOptions] = None) -> Output[GetRepositoryObjectContentResult]
    func GetRepositoryObjectContent(ctx *Context, args *GetRepositoryObjectContentArgs, opts ...InvokeOption) (*GetRepositoryObjectContentResult, error)
    func GetRepositoryObjectContentOutput(ctx *Context, args *GetRepositoryObjectContentOutputArgs, opts ...InvokeOption) GetRepositoryObjectContentResultOutput

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

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

    The following arguments are supported:

    RepositoryId string
    Unique repository identifier.
    Sha string
    The SHA of a blob or tree.
    FilePath string
    A filter to return only commits that affect any of the specified paths.
    RepositoryId string
    Unique repository identifier.
    Sha string
    The SHA of a blob or tree.
    FilePath string
    A filter to return only commits that affect any of the specified paths.
    repositoryId String
    Unique repository identifier.
    sha String
    The SHA of a blob or tree.
    filePath String
    A filter to return only commits that affect any of the specified paths.
    repositoryId string
    Unique repository identifier.
    sha string
    The SHA of a blob or tree.
    filePath string
    A filter to return only commits that affect any of the specified paths.
    repository_id str
    Unique repository identifier.
    sha str
    The SHA of a blob or tree.
    file_path str
    A filter to return only commits that affect any of the specified paths.
    repositoryId String
    Unique repository identifier.
    sha String
    The SHA of a blob or tree.
    filePath String
    A filter to return only commits that affect any of the specified paths.

    getRepositoryObjectContent Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    RepositoryId string
    Sha string
    FilePath string
    Id string
    The provider-assigned unique ID for this managed resource.
    RepositoryId string
    Sha string
    FilePath string
    id String
    The provider-assigned unique ID for this managed resource.
    repositoryId String
    sha String
    filePath String
    id string
    The provider-assigned unique ID for this managed resource.
    repositoryId string
    sha string
    filePath string
    id str
    The provider-assigned unique ID for this managed resource.
    repository_id str
    sha str
    file_path str
    id String
    The provider-assigned unique ID for this managed resource.
    repositoryId String
    sha String
    filePath 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 v1.37.0 published on Friday, May 24, 2024 by Pulumi