oci.DevOps.getRepositoryFileLine
Explore with Pulumi AI
This data source provides details about a specific Repository File Line resource in Oracle Cloud Infrastructure Devops service.
Retrieve lines of a specified file. Supports starting line number and limit. This API will be deprecated on Wed, 29 Mar 2023 01:00:00 GMT as it does not get recognized when filePath has ‘/’. This will be replaced by “/repositories/{repositoryId}/file/lines”
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testRepositoryFileLine = oci.DevOps.getRepositoryFileLine({
repositoryId: testRepository.id,
revision: repositoryFileLineRevision,
filePath: repositoryFileLineFilePath,
startLineNumber: repositoryFileLineStartLineNumber,
});
import pulumi
import pulumi_oci as oci
test_repository_file_line = oci.DevOps.get_repository_file_line(repository_id=test_repository["id"],
revision=repository_file_line_revision,
file_path=repository_file_line_file_path,
start_line_number=repository_file_line_start_line_number)
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.GetRepositoryFileLine(ctx, &devops.GetRepositoryFileLineArgs{
RepositoryId: testRepository.Id,
Revision: repositoryFileLineRevision,
FilePath: repositoryFileLineFilePath,
StartLineNumber: pulumi.IntRef(repositoryFileLineStartLineNumber),
}, 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 testRepositoryFileLine = Oci.DevOps.GetRepositoryFileLine.Invoke(new()
{
RepositoryId = testRepository.Id,
Revision = repositoryFileLineRevision,
FilePath = repositoryFileLineFilePath,
StartLineNumber = repositoryFileLineStartLineNumber,
});
});
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.GetRepositoryFileLineArgs;
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 testRepositoryFileLine = DevOpsFunctions.getRepositoryFileLine(GetRepositoryFileLineArgs.builder()
.repositoryId(testRepository.id())
.revision(repositoryFileLineRevision)
.filePath(repositoryFileLineFilePath)
.startLineNumber(repositoryFileLineStartLineNumber)
.build());
}
}
variables:
testRepositoryFileLine:
fn::invoke:
Function: oci:DevOps:getRepositoryFileLine
Arguments:
repositoryId: ${testRepository.id}
revision: ${repositoryFileLineRevision}
filePath: ${repositoryFileLineFilePath}
startLineNumber: ${repositoryFileLineStartLineNumber}
Using getRepositoryFileLine
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 getRepositoryFileLine(args: GetRepositoryFileLineArgs, opts?: InvokeOptions): Promise<GetRepositoryFileLineResult>
function getRepositoryFileLineOutput(args: GetRepositoryFileLineOutputArgs, opts?: InvokeOptions): Output<GetRepositoryFileLineResult>
def get_repository_file_line(file_path: Optional[str] = None,
repository_id: Optional[str] = None,
revision: Optional[str] = None,
start_line_number: Optional[int] = None,
opts: Optional[InvokeOptions] = None) -> GetRepositoryFileLineResult
def get_repository_file_line_output(file_path: Optional[pulumi.Input[str]] = None,
repository_id: Optional[pulumi.Input[str]] = None,
revision: Optional[pulumi.Input[str]] = None,
start_line_number: Optional[pulumi.Input[int]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetRepositoryFileLineResult]
func GetRepositoryFileLine(ctx *Context, args *GetRepositoryFileLineArgs, opts ...InvokeOption) (*GetRepositoryFileLineResult, error)
func GetRepositoryFileLineOutput(ctx *Context, args *GetRepositoryFileLineOutputArgs, opts ...InvokeOption) GetRepositoryFileLineResultOutput
> Note: This function is named GetRepositoryFileLine
in the Go SDK.
public static class GetRepositoryFileLine
{
public static Task<GetRepositoryFileLineResult> InvokeAsync(GetRepositoryFileLineArgs args, InvokeOptions? opts = null)
public static Output<GetRepositoryFileLineResult> Invoke(GetRepositoryFileLineInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetRepositoryFileLineResult> getRepositoryFileLine(GetRepositoryFileLineArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:DevOps/getRepositoryFileLine:getRepositoryFileLine
arguments:
# arguments dictionary
The following arguments are supported:
- File
Path string - A filter to return file contents of the specified paths.
- Repository
Id string - Unique repository identifier.
- Revision string
- Retrieve file lines from specific revision.
- Start
Line intNumber - Line number from where to start returning file lines.
- File
Path string - A filter to return file contents of the specified paths.
- Repository
Id string - Unique repository identifier.
- Revision string
- Retrieve file lines from specific revision.
- Start
Line intNumber - Line number from where to start returning file lines.
- file
Path String - A filter to return file contents of the specified paths.
- repository
Id String - Unique repository identifier.
- revision String
- Retrieve file lines from specific revision.
- start
Line IntegerNumber - Line number from where to start returning file lines.
- file
Path string - A filter to return file contents of the specified paths.
- repository
Id string - Unique repository identifier.
- revision string
- Retrieve file lines from specific revision.
- start
Line numberNumber - Line number from where to start returning file lines.
- file_
path str - A filter to return file contents of the specified paths.
- repository_
id str - Unique repository identifier.
- revision str
- Retrieve file lines from specific revision.
- start_
line_ intnumber - Line number from where to start returning file lines.
- file
Path String - A filter to return file contents of the specified paths.
- repository
Id String - Unique repository identifier.
- revision String
- Retrieve file lines from specific revision.
- start
Line NumberNumber - Line number from where to start returning file lines.
getRepositoryFileLine Result
The following output properties are available:
- File
Path string - Id string
- The provider-assigned unique ID for this managed resource.
- Lines
List<Get
Repository File Line Line> - The list of lines in the file.
- Repository
Id string - Revision string
- Start
Line intNumber
- File
Path string - Id string
- The provider-assigned unique ID for this managed resource.
- Lines
[]Get
Repository File Line Line - The list of lines in the file.
- Repository
Id string - Revision string
- Start
Line intNumber
- file
Path String - id String
- The provider-assigned unique ID for this managed resource.
- lines
List<Get
Repository File Line Line> - The list of lines in the file.
- repository
Id String - revision String
- start
Line IntegerNumber
- file
Path string - id string
- The provider-assigned unique ID for this managed resource.
- lines
Get
Repository File Line Line[] - The list of lines in the file.
- repository
Id string - revision string
- start
Line numberNumber
- file_
path str - id str
- The provider-assigned unique ID for this managed resource.
- lines
Sequence[devops.
Get Repository File Line Line] - The list of lines in the file.
- repository_
id str - revision str
- start_
line_ intnumber
- file
Path String - id String
- The provider-assigned unique ID for this managed resource.
- lines List<Property Map>
- The list of lines in the file.
- repository
Id String - revision String
- start
Line NumberNumber
Supporting Types
GetRepositoryFileLineLine
- Line
Content string - The content of the line.
- Line
Number int - The line number.
- Line
Content string - The content of the line.
- Line
Number int - The line number.
- line
Content String - The content of the line.
- line
Number Integer - The line number.
- line
Content string - The content of the line.
- line
Number number - The line number.
- line_
content str - The content of the line.
- line_
number int - The line number.
- line
Content String - The content of the line.
- line
Number Number - The line number.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.