Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi
oci.DevOps.getRepositoryObjectContent
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 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:
- Repository
Id string - Unique repository identifier.
- Sha string
- The SHA of a blob or tree.
- File
Path string - A filter to return only commits that affect any of the specified paths.
- Repository
Id string - Unique repository identifier.
- Sha string
- The SHA of a blob or tree.
- File
Path string - A filter to return only commits that affect any of the specified paths.
- repository
Id String - Unique repository identifier.
- sha String
- The SHA of a blob or tree.
- file
Path String - A filter to return only commits that affect any of the specified paths.
- repository
Id string - Unique repository identifier.
- sha string
- The SHA of a blob or tree.
- file
Path 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.
- repository
Id String - Unique repository identifier.
- sha String
- The SHA of a blob or tree.
- file
Path 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.
- Repository
Id string - Sha string
- File
Path string
- Id string
- The provider-assigned unique ID for this managed resource.
- Repository
Id string - Sha string
- File
Path string
- id String
- The provider-assigned unique ID for this managed resource.
- repository
Id String - sha String
- file
Path String
- id string
- The provider-assigned unique ID for this managed resource.
- repository
Id string - sha string
- file
Path 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.
- repository
Id String - sha String
- file
Path 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 v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi