1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. DevOps
  5. getRepositoryObjectContent
Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi

oci.DevOps.getRepositoryObjectContent

Explore with Pulumi AI

Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 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,
});
Copy
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)
Copy
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.GetRepositoryObjectContent(ctx, &devops.GetRepositoryObjectContentArgs{
			RepositoryId: testRepository.Id,
			Sha:          repositoryObjectContentSha,
			FilePath:     pulumi.StringRef(repositoryObjectContentFilePath),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
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,
    });

});
Copy
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());

    }
}
Copy
variables:
  testRepositoryObjectContent:
    fn::invoke:
      function: oci:DevOps:getRepositoryObjectContent
      arguments:
        repositoryId: ${testRepository.id}
        sha: ${repositoryObjectContentSha}
        filePath: ${repositoryObjectContentFilePath}
Copy

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>
Copy
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]
Copy
func GetRepositoryObjectContent(ctx *Context, args *GetRepositoryObjectContentArgs, opts ...InvokeOption) (*GetRepositoryObjectContentResult, error)
func GetRepositoryObjectContentOutput(ctx *Context, args *GetRepositoryObjectContentOutputArgs, opts ...InvokeOption) GetRepositoryObjectContentResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetRepositoryObjectContentResult> getRepositoryObjectContent(GetRepositoryObjectContentArgs args, InvokeOptions options)
public static Output<GetRepositoryObjectContentResult> getRepositoryObjectContent(GetRepositoryObjectContentArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:DevOps/getRepositoryObjectContent:getRepositoryObjectContent
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

RepositoryId This property is required. string
Unique repository identifier.
Sha This property is required. string
The SHA of a blob or tree.
FilePath string
A filter to return only commits that affect any of the specified paths.
RepositoryId This property is required. string
Unique repository identifier.
Sha This property is required. string
The SHA of a blob or tree.
FilePath string
A filter to return only commits that affect any of the specified paths.
repositoryId This property is required. String
Unique repository identifier.
sha This property is required. String
The SHA of a blob or tree.
filePath String
A filter to return only commits that affect any of the specified paths.
repositoryId This property is required. string
Unique repository identifier.
sha This property is required. 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 This property is required. str
Unique repository identifier.
sha This property is required. 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 This property is required. String
Unique repository identifier.
sha This property is required. 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.
Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi