1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. DevOps
  5. getRepositoryPath
Oracle Cloud Infrastructure v1.32.0 published on Thursday, Apr 18, 2024 by Pulumi

oci.DevOps.getRepositoryPath

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.32.0 published on Thursday, Apr 18, 2024 by Pulumi

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

    Retrieves a list of files and directories in a repository.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testRepositoryPath = oci.DevOps.getRepositoryPath({
        repositoryId: oci_devops_repository.test_repository.id,
        displayName: _var.repository_path_display_name,
        folderPath: _var.repository_path_folder_path,
        pathsInSubtree: _var.repository_path_paths_in_subtree,
        ref: _var.repository_path_ref,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_repository_path = oci.DevOps.get_repository_path(repository_id=oci_devops_repository["test_repository"]["id"],
        display_name=var["repository_path_display_name"],
        folder_path=var["repository_path_folder_path"],
        paths_in_subtree=var["repository_path_paths_in_subtree"],
        ref=var["repository_path_ref"])
    
    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.GetRepositoryPath(ctx, &devops.GetRepositoryPathArgs{
    			RepositoryId:   oci_devops_repository.Test_repository.Id,
    			DisplayName:    pulumi.StringRef(_var.Repository_path_display_name),
    			FolderPath:     pulumi.StringRef(_var.Repository_path_folder_path),
    			PathsInSubtree: pulumi.BoolRef(_var.Repository_path_paths_in_subtree),
    			Ref:            pulumi.StringRef(_var.Repository_path_ref),
    		}, 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 testRepositoryPath = Oci.DevOps.GetRepositoryPath.Invoke(new()
        {
            RepositoryId = oci_devops_repository.Test_repository.Id,
            DisplayName = @var.Repository_path_display_name,
            FolderPath = @var.Repository_path_folder_path,
            PathsInSubtree = @var.Repository_path_paths_in_subtree,
            Ref = @var.Repository_path_ref,
        });
    
    });
    
    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.GetRepositoryPathArgs;
    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 testRepositoryPath = DevOpsFunctions.getRepositoryPath(GetRepositoryPathArgs.builder()
                .repositoryId(oci_devops_repository.test_repository().id())
                .displayName(var_.repository_path_display_name())
                .folderPath(var_.repository_path_folder_path())
                .pathsInSubtree(var_.repository_path_paths_in_subtree())
                .ref(var_.repository_path_ref())
                .build());
    
        }
    }
    
    variables:
      testRepositoryPath:
        fn::invoke:
          Function: oci:DevOps:getRepositoryPath
          Arguments:
            repositoryId: ${oci_devops_repository.test_repository.id}
            displayName: ${var.repository_path_display_name}
            folderPath: ${var.repository_path_folder_path}
            pathsInSubtree: ${var.repository_path_paths_in_subtree}
            ref: ${var.repository_path_ref}
    

    Using getRepositoryPath

    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 getRepositoryPath(args: GetRepositoryPathArgs, opts?: InvokeOptions): Promise<GetRepositoryPathResult>
    function getRepositoryPathOutput(args: GetRepositoryPathOutputArgs, opts?: InvokeOptions): Output<GetRepositoryPathResult>
    def get_repository_path(display_name: Optional[str] = None,
                            folder_path: Optional[str] = None,
                            paths_in_subtree: Optional[bool] = None,
                            ref: Optional[str] = None,
                            repository_id: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetRepositoryPathResult
    def get_repository_path_output(display_name: Optional[pulumi.Input[str]] = None,
                            folder_path: Optional[pulumi.Input[str]] = None,
                            paths_in_subtree: Optional[pulumi.Input[bool]] = None,
                            ref: Optional[pulumi.Input[str]] = None,
                            repository_id: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetRepositoryPathResult]
    func GetRepositoryPath(ctx *Context, args *GetRepositoryPathArgs, opts ...InvokeOption) (*GetRepositoryPathResult, error)
    func GetRepositoryPathOutput(ctx *Context, args *GetRepositoryPathOutputArgs, opts ...InvokeOption) GetRepositoryPathResultOutput

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

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

    The following arguments are supported:

    RepositoryId string
    Unique repository identifier.
    DisplayName string
    A filter to return only resources that match the entire display name given.
    FolderPath string
    The fully qualified path to the folder whose contents are returned, including the folder name. For example, /examples is a fully-qualified path to a folder named examples that was created off of the root directory (/) of a repository.
    PathsInSubtree bool
    Flag to determine if files must be retrived recursively. Flag is False by default.
    Ref string
    The name of branch/tag or commit hash it points to. If names conflict, order of preference is commit > branch > tag. You can disambiguate with "heads/foobar" and "tags/foobar". If left blank repository's default branch will be used.
    RepositoryId string
    Unique repository identifier.
    DisplayName string
    A filter to return only resources that match the entire display name given.
    FolderPath string
    The fully qualified path to the folder whose contents are returned, including the folder name. For example, /examples is a fully-qualified path to a folder named examples that was created off of the root directory (/) of a repository.
    PathsInSubtree bool
    Flag to determine if files must be retrived recursively. Flag is False by default.
    Ref string
    The name of branch/tag or commit hash it points to. If names conflict, order of preference is commit > branch > tag. You can disambiguate with "heads/foobar" and "tags/foobar". If left blank repository's default branch will be used.
    repositoryId String
    Unique repository identifier.
    displayName String
    A filter to return only resources that match the entire display name given.
    folderPath String
    The fully qualified path to the folder whose contents are returned, including the folder name. For example, /examples is a fully-qualified path to a folder named examples that was created off of the root directory (/) of a repository.
    pathsInSubtree Boolean
    Flag to determine if files must be retrived recursively. Flag is False by default.
    ref String
    The name of branch/tag or commit hash it points to. If names conflict, order of preference is commit > branch > tag. You can disambiguate with "heads/foobar" and "tags/foobar". If left blank repository's default branch will be used.
    repositoryId string
    Unique repository identifier.
    displayName string
    A filter to return only resources that match the entire display name given.
    folderPath string
    The fully qualified path to the folder whose contents are returned, including the folder name. For example, /examples is a fully-qualified path to a folder named examples that was created off of the root directory (/) of a repository.
    pathsInSubtree boolean
    Flag to determine if files must be retrived recursively. Flag is False by default.
    ref string
    The name of branch/tag or commit hash it points to. If names conflict, order of preference is commit > branch > tag. You can disambiguate with "heads/foobar" and "tags/foobar". If left blank repository's default branch will be used.
    repository_id str
    Unique repository identifier.
    display_name str
    A filter to return only resources that match the entire display name given.
    folder_path str
    The fully qualified path to the folder whose contents are returned, including the folder name. For example, /examples is a fully-qualified path to a folder named examples that was created off of the root directory (/) of a repository.
    paths_in_subtree bool
    Flag to determine if files must be retrived recursively. Flag is False by default.
    ref str
    The name of branch/tag or commit hash it points to. If names conflict, order of preference is commit > branch > tag. You can disambiguate with "heads/foobar" and "tags/foobar". If left blank repository's default branch will be used.
    repositoryId String
    Unique repository identifier.
    displayName String
    A filter to return only resources that match the entire display name given.
    folderPath String
    The fully qualified path to the folder whose contents are returned, including the folder name. For example, /examples is a fully-qualified path to a folder named examples that was created off of the root directory (/) of a repository.
    pathsInSubtree Boolean
    Flag to determine if files must be retrived recursively. Flag is False by default.
    ref String
    The name of branch/tag or commit hash it points to. If names conflict, order of preference is commit > branch > tag. You can disambiguate with "heads/foobar" and "tags/foobar". If left blank repository's default branch will be used.

    getRepositoryPath Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Items List<GetRepositoryPathItem>
    List of objects describing files or directories in a repository.
    RepositoryId string
    DisplayName string
    FolderPath string
    PathsInSubtree bool
    Ref string
    Id string
    The provider-assigned unique ID for this managed resource.
    Items []GetRepositoryPathItem
    List of objects describing files or directories in a repository.
    RepositoryId string
    DisplayName string
    FolderPath string
    PathsInSubtree bool
    Ref string
    id String
    The provider-assigned unique ID for this managed resource.
    items List<GetRepositoryPathItem>
    List of objects describing files or directories in a repository.
    repositoryId String
    displayName String
    folderPath String
    pathsInSubtree Boolean
    ref String
    id string
    The provider-assigned unique ID for this managed resource.
    items GetRepositoryPathItem[]
    List of objects describing files or directories in a repository.
    repositoryId string
    displayName string
    folderPath string
    pathsInSubtree boolean
    ref string
    id str
    The provider-assigned unique ID for this managed resource.
    items Sequence[devops.GetRepositoryPathItem]
    List of objects describing files or directories in a repository.
    repository_id str
    display_name str
    folder_path str
    paths_in_subtree bool
    ref str
    id String
    The provider-assigned unique ID for this managed resource.
    items List<Property Map>
    List of objects describing files or directories in a repository.
    repositoryId String
    displayName String
    folderPath String
    pathsInSubtree Boolean
    ref String

    Supporting Types

    GetRepositoryPathItem

    DefinedTags Dictionary<string, object>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example: {"foo-namespace.bar-key": "value"}
    FreeformTags Dictionary<string, object>
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags. Example: {"bar-key": "value"}
    Name string
    Name of file or directory.
    Path string
    Path to file or directory in a repository.
    Sha string
    SHA-1 checksum of blob or tree.
    SizeInBytes string
    Size of file or directory.
    SubmoduleGitUrl string
    The git URL of the submodule.
    Type string
    File or directory.
    DefinedTags map[string]interface{}
    Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example: {"foo-namespace.bar-key": "value"}
    FreeformTags map[string]interface{}
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags. Example: {"bar-key": "value"}
    Name string
    Name of file or directory.
    Path string
    Path to file or directory in a repository.
    Sha string
    SHA-1 checksum of blob or tree.
    SizeInBytes string
    Size of file or directory.
    SubmoduleGitUrl string
    The git URL of the submodule.
    Type string
    File or directory.
    definedTags Map<String,Object>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example: {"foo-namespace.bar-key": "value"}
    freeformTags Map<String,Object>
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags. Example: {"bar-key": "value"}
    name String
    Name of file or directory.
    path String
    Path to file or directory in a repository.
    sha String
    SHA-1 checksum of blob or tree.
    sizeInBytes String
    Size of file or directory.
    submoduleGitUrl String
    The git URL of the submodule.
    type String
    File or directory.
    definedTags {[key: string]: any}
    Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example: {"foo-namespace.bar-key": "value"}
    freeformTags {[key: string]: any}
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags. Example: {"bar-key": "value"}
    name string
    Name of file or directory.
    path string
    Path to file or directory in a repository.
    sha string
    SHA-1 checksum of blob or tree.
    sizeInBytes string
    Size of file or directory.
    submoduleGitUrl string
    The git URL of the submodule.
    type string
    File or directory.
    defined_tags Mapping[str, Any]
    Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example: {"foo-namespace.bar-key": "value"}
    freeform_tags Mapping[str, Any]
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags. Example: {"bar-key": "value"}
    name str
    Name of file or directory.
    path str
    Path to file or directory in a repository.
    sha str
    SHA-1 checksum of blob or tree.
    size_in_bytes str
    Size of file or directory.
    submodule_git_url str
    The git URL of the submodule.
    type str
    File or directory.
    definedTags Map<Any>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example: {"foo-namespace.bar-key": "value"}
    freeformTags Map<Any>
    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. See Resource Tags. Example: {"bar-key": "value"}
    name String
    Name of file or directory.
    path String
    Path to file or directory in a repository.
    sha String
    SHA-1 checksum of blob or tree.
    sizeInBytes String
    Size of file or directory.
    submoduleGitUrl String
    The git URL of the submodule.
    type String
    File or directory.

    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.32.0 published on Thursday, Apr 18, 2024 by Pulumi