1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. DevOps
  5. getRepositoryCommit
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

oci.DevOps.getRepositoryCommit

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

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

    Retrieves a repository’s commit by commit ID.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testRepositoryCommit = oci.DevOps.getRepositoryCommit({
        commitId: testCommit.id,
        repositoryId: testRepository.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_repository_commit = oci.DevOps.get_repository_commit(commit_id=test_commit["id"],
        repository_id=test_repository["id"])
    
    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.GetRepositoryCommit(ctx, &devops.GetRepositoryCommitArgs{
    			CommitId:     testCommit.Id,
    			RepositoryId: testRepository.Id,
    		}, 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 testRepositoryCommit = Oci.DevOps.GetRepositoryCommit.Invoke(new()
        {
            CommitId = testCommit.Id,
            RepositoryId = testRepository.Id,
        });
    
    });
    
    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.GetRepositoryCommitArgs;
    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 testRepositoryCommit = DevOpsFunctions.getRepositoryCommit(GetRepositoryCommitArgs.builder()
                .commitId(testCommit.id())
                .repositoryId(testRepository.id())
                .build());
    
        }
    }
    
    variables:
      testRepositoryCommit:
        fn::invoke:
          Function: oci:DevOps:getRepositoryCommit
          Arguments:
            commitId: ${testCommit.id}
            repositoryId: ${testRepository.id}
    

    Using getRepositoryCommit

    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 getRepositoryCommit(args: GetRepositoryCommitArgs, opts?: InvokeOptions): Promise<GetRepositoryCommitResult>
    function getRepositoryCommitOutput(args: GetRepositoryCommitOutputArgs, opts?: InvokeOptions): Output<GetRepositoryCommitResult>
    def get_repository_commit(commit_id: Optional[str] = None,
                              repository_id: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetRepositoryCommitResult
    def get_repository_commit_output(commit_id: Optional[pulumi.Input[str]] = None,
                              repository_id: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetRepositoryCommitResult]
    func GetRepositoryCommit(ctx *Context, args *GetRepositoryCommitArgs, opts ...InvokeOption) (*GetRepositoryCommitResult, error)
    func GetRepositoryCommitOutput(ctx *Context, args *GetRepositoryCommitOutputArgs, opts ...InvokeOption) GetRepositoryCommitResultOutput

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

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

    The following arguments are supported:

    CommitId string
    A filter to return only resources that match the given commit ID.
    RepositoryId string
    Unique repository identifier.
    CommitId string
    A filter to return only resources that match the given commit ID.
    RepositoryId string
    Unique repository identifier.
    commitId String
    A filter to return only resources that match the given commit ID.
    repositoryId String
    Unique repository identifier.
    commitId string
    A filter to return only resources that match the given commit ID.
    repositoryId string
    Unique repository identifier.
    commit_id str
    A filter to return only resources that match the given commit ID.
    repository_id str
    Unique repository identifier.
    commitId String
    A filter to return only resources that match the given commit ID.
    repositoryId String
    Unique repository identifier.

    getRepositoryCommit Result

    The following output properties are available:

    AuthorEmail string
    Email of the author of the repository.
    AuthorName string
    Name of the author of the repository.
    CommitId string
    Commit hash pointed to by reference name.
    CommitMessage string
    The commit message.
    CommitterEmail string
    Email of who creates the commit.
    CommitterName string
    Name of who creates the commit.
    Id string
    The provider-assigned unique ID for this managed resource.
    ParentCommitIds List<string>
    An array of parent commit IDs of created commit.
    RepositoryId string
    TimeCreated string
    The time at which commit was created.
    TreeId string
    Tree information for the specified commit.
    AuthorEmail string
    Email of the author of the repository.
    AuthorName string
    Name of the author of the repository.
    CommitId string
    Commit hash pointed to by reference name.
    CommitMessage string
    The commit message.
    CommitterEmail string
    Email of who creates the commit.
    CommitterName string
    Name of who creates the commit.
    Id string
    The provider-assigned unique ID for this managed resource.
    ParentCommitIds []string
    An array of parent commit IDs of created commit.
    RepositoryId string
    TimeCreated string
    The time at which commit was created.
    TreeId string
    Tree information for the specified commit.
    authorEmail String
    Email of the author of the repository.
    authorName String
    Name of the author of the repository.
    commitId String
    Commit hash pointed to by reference name.
    commitMessage String
    The commit message.
    committerEmail String
    Email of who creates the commit.
    committerName String
    Name of who creates the commit.
    id String
    The provider-assigned unique ID for this managed resource.
    parentCommitIds List<String>
    An array of parent commit IDs of created commit.
    repositoryId String
    timeCreated String
    The time at which commit was created.
    treeId String
    Tree information for the specified commit.
    authorEmail string
    Email of the author of the repository.
    authorName string
    Name of the author of the repository.
    commitId string
    Commit hash pointed to by reference name.
    commitMessage string
    The commit message.
    committerEmail string
    Email of who creates the commit.
    committerName string
    Name of who creates the commit.
    id string
    The provider-assigned unique ID for this managed resource.
    parentCommitIds string[]
    An array of parent commit IDs of created commit.
    repositoryId string
    timeCreated string
    The time at which commit was created.
    treeId string
    Tree information for the specified commit.
    author_email str
    Email of the author of the repository.
    author_name str
    Name of the author of the repository.
    commit_id str
    Commit hash pointed to by reference name.
    commit_message str
    The commit message.
    committer_email str
    Email of who creates the commit.
    committer_name str
    Name of who creates the commit.
    id str
    The provider-assigned unique ID for this managed resource.
    parent_commit_ids Sequence[str]
    An array of parent commit IDs of created commit.
    repository_id str
    time_created str
    The time at which commit was created.
    tree_id str
    Tree information for the specified commit.
    authorEmail String
    Email of the author of the repository.
    authorName String
    Name of the author of the repository.
    commitId String
    Commit hash pointed to by reference name.
    commitMessage String
    The commit message.
    committerEmail String
    Email of who creates the commit.
    committerName String
    Name of who creates the commit.
    id String
    The provider-assigned unique ID for this managed resource.
    parentCommitIds List<String>
    An array of parent commit IDs of created commit.
    repositoryId String
    timeCreated String
    The time at which commit was created.
    treeId String
    Tree information for the specified commit.

    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 v2.17.0 published on Friday, Nov 15, 2024 by Pulumi