Oracle Cloud Infrastructure v2.33.0 published on Thursday, May 1, 2025 by Pulumi
oci.DevOps.getRepository
Explore with Pulumi AI
This data source provides details about a specific Repository resource in Oracle Cloud Infrastructure Devops service.
Retrieves a repository by identifier.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testRepository = oci.DevOps.getRepository({
    repositoryId: testRepositoryOciDevopsRepository.id,
    fields: repositoryFields,
});
import pulumi
import pulumi_oci as oci
test_repository = oci.DevOps.get_repository(repository_id=test_repository_oci_devops_repository["id"],
    fields=repository_fields)
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.GetRepository(ctx, &devops.GetRepositoryArgs{
			RepositoryId: testRepositoryOciDevopsRepository.Id,
			Fields:       repositoryFields,
		}, 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 testRepository = Oci.DevOps.GetRepository.Invoke(new()
    {
        RepositoryId = testRepositoryOciDevopsRepository.Id,
        Fields = repositoryFields,
    });
});
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.GetRepositoryArgs;
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 testRepository = DevOpsFunctions.getRepository(GetRepositoryArgs.builder()
            .repositoryId(testRepositoryOciDevopsRepository.id())
            .fields(repositoryFields)
            .build());
    }
}
variables:
  testRepository:
    fn::invoke:
      function: oci:DevOps:getRepository
      arguments:
        repositoryId: ${testRepositoryOciDevopsRepository.id}
        fields: ${repositoryFields}
Using getRepository
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 getRepository(args: GetRepositoryArgs, opts?: InvokeOptions): Promise<GetRepositoryResult>
function getRepositoryOutput(args: GetRepositoryOutputArgs, opts?: InvokeOptions): Output<GetRepositoryResult>def get_repository(fields: Optional[Sequence[str]] = None,
                   repository_id: Optional[str] = None,
                   opts: Optional[InvokeOptions] = None) -> GetRepositoryResult
def get_repository_output(fields: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                   repository_id: Optional[pulumi.Input[str]] = None,
                   opts: Optional[InvokeOptions] = None) -> Output[GetRepositoryResult]func LookupRepository(ctx *Context, args *LookupRepositoryArgs, opts ...InvokeOption) (*LookupRepositoryResult, error)
func LookupRepositoryOutput(ctx *Context, args *LookupRepositoryOutputArgs, opts ...InvokeOption) LookupRepositoryResultOutput> Note: This function is named LookupRepository in the Go SDK.
public static class GetRepository 
{
    public static Task<GetRepositoryResult> InvokeAsync(GetRepositoryArgs args, InvokeOptions? opts = null)
    public static Output<GetRepositoryResult> Invoke(GetRepositoryInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetRepositoryResult> getRepository(GetRepositoryArgs args, InvokeOptions options)
public static Output<GetRepositoryResult> getRepository(GetRepositoryArgs args, InvokeOptions options)
fn::invoke:
  function: oci:DevOps/getRepository:getRepository
  arguments:
    # arguments dictionaryThe following arguments are supported:
- RepositoryId string
- Unique repository identifier.
- Fields List<string>
- Fields parameter can contain multiple flags useful in deciding the API functionality.
- RepositoryId string
- Unique repository identifier.
- Fields []string
- Fields parameter can contain multiple flags useful in deciding the API functionality.
- repositoryId String
- Unique repository identifier.
- fields List<String>
- Fields parameter can contain multiple flags useful in deciding the API functionality.
- repositoryId string
- Unique repository identifier.
- fields string[]
- Fields parameter can contain multiple flags useful in deciding the API functionality.
- repository_id str
- Unique repository identifier.
- fields Sequence[str]
- Fields parameter can contain multiple flags useful in deciding the API functionality.
- repositoryId String
- Unique repository identifier.
- fields List<String>
- Fields parameter can contain multiple flags useful in deciding the API functionality.
getRepository Result
The following output properties are available:
- BranchCount int
- The count of the branches present in the repository.
- CommitCount int
- The count of the commits present in the repository.
- CompartmentId string
- The OCID of the repository's compartment.
- DefaultBranch string
- The default branch of the repository.
- Dictionary<string, string>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example: {"foo-namespace.bar-key": "value"}
- Description string
- Details of the repository. Avoid entering confidential information.
- Dictionary<string, string>
- 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"}
- HttpUrl string
- HTTP URL that you use to git clone, pull and push.
- Id string
- The OCID of the repository. This value is unique and immutable.
- LifecyleDetails string
- A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
- MirrorRepository List<GetConfigs Repository Mirror Repository Config> 
- Configuration information for mirroring the repository.
- Name string
- Name of the repository. Should be unique within the project. This value is mutable.
- Namespace string
- Tenancy unique namespace.
- ParentRepository stringId 
- The OCID of the parent repository.
- ProjectId string
- The OCID of the DevOps project containing the repository.
- ProjectName string
- Unique project name in a namespace.
- RepositoryId string
- RepositoryType string
- Type of repository: MIRRORED - Repository created by mirroring an existing repository. HOSTED - Repository created and hosted using Oracle Cloud Infrastructure DevOps code repository. FORKED - Repository created by forking an existing repository.
- SizeIn stringBytes 
- The size of the repository in bytes.
- SshUrl string
- SSH URL that you use to git clone, pull and push.
- State string
- The current state of the repository.
- Dictionary<string, string>
- Usage of system tag keys. These predefined keys are scoped to namespaces. See Resource Tags. Example: {"orcl-cloud.free-tier-retained": "true"}
- TimeCreated string
- The time the repository was created. Format defined by RFC3339.
- TimeUpdated string
- The time the repository was updated. Format defined by RFC3339.
- TriggerBuild List<string>Events 
- Trigger build events supported for this repository: PUSH - Build is triggered when a push event occurs. PULL_REQUEST_CREATED - Build is triggered when a pull request is created in the repository. PULL_REQUEST_UPDATED - Build is triggered when a push is made to a branch with an open pull request. COMMIT_UPDATES - Build is triggered when new commits are mirrored into a repository.
- Fields List<string>
- BranchCount int
- The count of the branches present in the repository.
- CommitCount int
- The count of the commits present in the repository.
- CompartmentId string
- The OCID of the repository's compartment.
- DefaultBranch string
- The default branch of the repository.
- map[string]string
- Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example: {"foo-namespace.bar-key": "value"}
- Description string
- Details of the repository. Avoid entering confidential information.
- map[string]string
- 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"}
- HttpUrl string
- HTTP URL that you use to git clone, pull and push.
- Id string
- The OCID of the repository. This value is unique and immutable.
- LifecyleDetails string
- A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
- MirrorRepository []GetConfigs Repository Mirror Repository Config 
- Configuration information for mirroring the repository.
- Name string
- Name of the repository. Should be unique within the project. This value is mutable.
- Namespace string
- Tenancy unique namespace.
- ParentRepository stringId 
- The OCID of the parent repository.
- ProjectId string
- The OCID of the DevOps project containing the repository.
- ProjectName string
- Unique project name in a namespace.
- RepositoryId string
- RepositoryType string
- Type of repository: MIRRORED - Repository created by mirroring an existing repository. HOSTED - Repository created and hosted using Oracle Cloud Infrastructure DevOps code repository. FORKED - Repository created by forking an existing repository.
- SizeIn stringBytes 
- The size of the repository in bytes.
- SshUrl string
- SSH URL that you use to git clone, pull and push.
- State string
- The current state of the repository.
- map[string]string
- Usage of system tag keys. These predefined keys are scoped to namespaces. See Resource Tags. Example: {"orcl-cloud.free-tier-retained": "true"}
- TimeCreated string
- The time the repository was created. Format defined by RFC3339.
- TimeUpdated string
- The time the repository was updated. Format defined by RFC3339.
- TriggerBuild []stringEvents 
- Trigger build events supported for this repository: PUSH - Build is triggered when a push event occurs. PULL_REQUEST_CREATED - Build is triggered when a pull request is created in the repository. PULL_REQUEST_UPDATED - Build is triggered when a push is made to a branch with an open pull request. COMMIT_UPDATES - Build is triggered when new commits are mirrored into a repository.
- Fields []string
- branchCount Integer
- The count of the branches present in the repository.
- commitCount Integer
- The count of the commits present in the repository.
- compartmentId String
- The OCID of the repository's compartment.
- defaultBranch String
- The default branch of the repository.
- Map<String,String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example: {"foo-namespace.bar-key": "value"}
- description String
- Details of the repository. Avoid entering confidential information.
- Map<String,String>
- 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"}
- httpUrl String
- HTTP URL that you use to git clone, pull and push.
- id String
- The OCID of the repository. This value is unique and immutable.
- lifecyleDetails String
- A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
- mirrorRepository List<GetConfigs Repository Mirror Repository Config> 
- Configuration information for mirroring the repository.
- name String
- Name of the repository. Should be unique within the project. This value is mutable.
- namespace String
- Tenancy unique namespace.
- parentRepository StringId 
- The OCID of the parent repository.
- projectId String
- The OCID of the DevOps project containing the repository.
- projectName String
- Unique project name in a namespace.
- repositoryId String
- repositoryType String
- Type of repository: MIRRORED - Repository created by mirroring an existing repository. HOSTED - Repository created and hosted using Oracle Cloud Infrastructure DevOps code repository. FORKED - Repository created by forking an existing repository.
- sizeIn StringBytes 
- The size of the repository in bytes.
- sshUrl String
- SSH URL that you use to git clone, pull and push.
- state String
- The current state of the repository.
- Map<String,String>
- Usage of system tag keys. These predefined keys are scoped to namespaces. See Resource Tags. Example: {"orcl-cloud.free-tier-retained": "true"}
- timeCreated String
- The time the repository was created. Format defined by RFC3339.
- timeUpdated String
- The time the repository was updated. Format defined by RFC3339.
- triggerBuild List<String>Events 
- Trigger build events supported for this repository: PUSH - Build is triggered when a push event occurs. PULL_REQUEST_CREATED - Build is triggered when a pull request is created in the repository. PULL_REQUEST_UPDATED - Build is triggered when a push is made to a branch with an open pull request. COMMIT_UPDATES - Build is triggered when new commits are mirrored into a repository.
- fields List<String>
- branchCount number
- The count of the branches present in the repository.
- commitCount number
- The count of the commits present in the repository.
- compartmentId string
- The OCID of the repository's compartment.
- defaultBranch string
- The default branch of the repository.
- {[key: string]: string}
- Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example: {"foo-namespace.bar-key": "value"}
- description string
- Details of the repository. Avoid entering confidential information.
- {[key: string]: string}
- 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"}
- httpUrl string
- HTTP URL that you use to git clone, pull and push.
- id string
- The OCID of the repository. This value is unique and immutable.
- lifecyleDetails string
- A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
- mirrorRepository GetConfigs Repository Mirror Repository Config[] 
- Configuration information for mirroring the repository.
- name string
- Name of the repository. Should be unique within the project. This value is mutable.
- namespace string
- Tenancy unique namespace.
- parentRepository stringId 
- The OCID of the parent repository.
- projectId string
- The OCID of the DevOps project containing the repository.
- projectName string
- Unique project name in a namespace.
- repositoryId string
- repositoryType string
- Type of repository: MIRRORED - Repository created by mirroring an existing repository. HOSTED - Repository created and hosted using Oracle Cloud Infrastructure DevOps code repository. FORKED - Repository created by forking an existing repository.
- sizeIn stringBytes 
- The size of the repository in bytes.
- sshUrl string
- SSH URL that you use to git clone, pull and push.
- state string
- The current state of the repository.
- {[key: string]: string}
- Usage of system tag keys. These predefined keys are scoped to namespaces. See Resource Tags. Example: {"orcl-cloud.free-tier-retained": "true"}
- timeCreated string
- The time the repository was created. Format defined by RFC3339.
- timeUpdated string
- The time the repository was updated. Format defined by RFC3339.
- triggerBuild string[]Events 
- Trigger build events supported for this repository: PUSH - Build is triggered when a push event occurs. PULL_REQUEST_CREATED - Build is triggered when a pull request is created in the repository. PULL_REQUEST_UPDATED - Build is triggered when a push is made to a branch with an open pull request. COMMIT_UPDATES - Build is triggered when new commits are mirrored into a repository.
- fields string[]
- branch_count int
- The count of the branches present in the repository.
- commit_count int
- The count of the commits present in the repository.
- compartment_id str
- The OCID of the repository's compartment.
- default_branch str
- The default branch of the repository.
- Mapping[str, str]
- Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example: {"foo-namespace.bar-key": "value"}
- description str
- Details of the repository. Avoid entering confidential information.
- Mapping[str, str]
- 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"}
- http_url str
- HTTP URL that you use to git clone, pull and push.
- id str
- The OCID of the repository. This value is unique and immutable.
- lifecyle_details str
- A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
- mirror_repository_ Sequence[Getconfigs Repository Mirror Repository Config] 
- Configuration information for mirroring the repository.
- name str
- Name of the repository. Should be unique within the project. This value is mutable.
- namespace str
- Tenancy unique namespace.
- parent_repository_ strid 
- The OCID of the parent repository.
- project_id str
- The OCID of the DevOps project containing the repository.
- project_name str
- Unique project name in a namespace.
- repository_id str
- repository_type str
- Type of repository: MIRRORED - Repository created by mirroring an existing repository. HOSTED - Repository created and hosted using Oracle Cloud Infrastructure DevOps code repository. FORKED - Repository created by forking an existing repository.
- size_in_ strbytes 
- The size of the repository in bytes.
- ssh_url str
- SSH URL that you use to git clone, pull and push.
- state str
- The current state of the repository.
- Mapping[str, str]
- Usage of system tag keys. These predefined keys are scoped to namespaces. See Resource Tags. Example: {"orcl-cloud.free-tier-retained": "true"}
- time_created str
- The time the repository was created. Format defined by RFC3339.
- time_updated str
- The time the repository was updated. Format defined by RFC3339.
- trigger_build_ Sequence[str]events 
- Trigger build events supported for this repository: PUSH - Build is triggered when a push event occurs. PULL_REQUEST_CREATED - Build is triggered when a pull request is created in the repository. PULL_REQUEST_UPDATED - Build is triggered when a push is made to a branch with an open pull request. COMMIT_UPDATES - Build is triggered when new commits are mirrored into a repository.
- fields Sequence[str]
- branchCount Number
- The count of the branches present in the repository.
- commitCount Number
- The count of the commits present in the repository.
- compartmentId String
- The OCID of the repository's compartment.
- defaultBranch String
- The default branch of the repository.
- Map<String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. See Resource Tags. Example: {"foo-namespace.bar-key": "value"}
- description String
- Details of the repository. Avoid entering confidential information.
- Map<String>
- 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"}
- httpUrl String
- HTTP URL that you use to git clone, pull and push.
- id String
- The OCID of the repository. This value is unique and immutable.
- lifecyleDetails String
- A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
- mirrorRepository List<Property Map>Configs 
- Configuration information for mirroring the repository.
- name String
- Name of the repository. Should be unique within the project. This value is mutable.
- namespace String
- Tenancy unique namespace.
- parentRepository StringId 
- The OCID of the parent repository.
- projectId String
- The OCID of the DevOps project containing the repository.
- projectName String
- Unique project name in a namespace.
- repositoryId String
- repositoryType String
- Type of repository: MIRRORED - Repository created by mirroring an existing repository. HOSTED - Repository created and hosted using Oracle Cloud Infrastructure DevOps code repository. FORKED - Repository created by forking an existing repository.
- sizeIn StringBytes 
- The size of the repository in bytes.
- sshUrl String
- SSH URL that you use to git clone, pull and push.
- state String
- The current state of the repository.
- Map<String>
- Usage of system tag keys. These predefined keys are scoped to namespaces. See Resource Tags. Example: {"orcl-cloud.free-tier-retained": "true"}
- timeCreated String
- The time the repository was created. Format defined by RFC3339.
- timeUpdated String
- The time the repository was updated. Format defined by RFC3339.
- triggerBuild List<String>Events 
- Trigger build events supported for this repository: PUSH - Build is triggered when a push event occurs. PULL_REQUEST_CREATED - Build is triggered when a pull request is created in the repository. PULL_REQUEST_UPDATED - Build is triggered when a push is made to a branch with an open pull request. COMMIT_UPDATES - Build is triggered when new commits are mirrored into a repository.
- fields List<String>
Supporting Types
GetRepositoryMirrorRepositoryConfig    
- ConnectorId string
- Upstream git repository connection identifier.
- RepositoryUrl string
- URL of external repository you want to mirror.
- TriggerSchedules List<GetRepository Mirror Repository Config Trigger Schedule> 
- Specifies a trigger schedule. Timing information for when to initiate automated syncs.
- ConnectorId string
- Upstream git repository connection identifier.
- RepositoryUrl string
- URL of external repository you want to mirror.
- TriggerSchedules []GetRepository Mirror Repository Config Trigger Schedule 
- Specifies a trigger schedule. Timing information for when to initiate automated syncs.
- connectorId String
- Upstream git repository connection identifier.
- repositoryUrl String
- URL of external repository you want to mirror.
- triggerSchedules List<GetRepository Mirror Repository Config Trigger Schedule> 
- Specifies a trigger schedule. Timing information for when to initiate automated syncs.
- connectorId string
- Upstream git repository connection identifier.
- repositoryUrl string
- URL of external repository you want to mirror.
- triggerSchedules GetRepository Mirror Repository Config Trigger Schedule[] 
- Specifies a trigger schedule. Timing information for when to initiate automated syncs.
- connector_id str
- Upstream git repository connection identifier.
- repository_url str
- URL of external repository you want to mirror.
- trigger_schedules Sequence[GetRepository Mirror Repository Config Trigger Schedule] 
- Specifies a trigger schedule. Timing information for when to initiate automated syncs.
- connectorId String
- Upstream git repository connection identifier.
- repositoryUrl String
- URL of external repository you want to mirror.
- triggerSchedules List<Property Map>
- Specifies a trigger schedule. Timing information for when to initiate automated syncs.
GetRepositoryMirrorRepositoryConfigTriggerSchedule      
- CustomSchedule string
- Valid if type is CUSTOM. Following RFC 5545 recurrence rules, we can specify starting time, occurrence frequency, and interval size. Example for frequency could be DAILY/WEEKLY/HOURLY or any RFC 5545 supported frequency, which is followed by start time of this window. You can control the start time with BYHOUR, BYMINUTE and BYSECONDS. It is followed by the interval size.
- ScheduleType string
- Different types of trigger schedule: NONE - No automated synchronization schedule. DEFAULT - Trigger schedule is every 30 minutes. CUSTOM - Custom triggering schedule.
- CustomSchedule string
- Valid if type is CUSTOM. Following RFC 5545 recurrence rules, we can specify starting time, occurrence frequency, and interval size. Example for frequency could be DAILY/WEEKLY/HOURLY or any RFC 5545 supported frequency, which is followed by start time of this window. You can control the start time with BYHOUR, BYMINUTE and BYSECONDS. It is followed by the interval size.
- ScheduleType string
- Different types of trigger schedule: NONE - No automated synchronization schedule. DEFAULT - Trigger schedule is every 30 minutes. CUSTOM - Custom triggering schedule.
- customSchedule String
- Valid if type is CUSTOM. Following RFC 5545 recurrence rules, we can specify starting time, occurrence frequency, and interval size. Example for frequency could be DAILY/WEEKLY/HOURLY or any RFC 5545 supported frequency, which is followed by start time of this window. You can control the start time with BYHOUR, BYMINUTE and BYSECONDS. It is followed by the interval size.
- scheduleType String
- Different types of trigger schedule: NONE - No automated synchronization schedule. DEFAULT - Trigger schedule is every 30 minutes. CUSTOM - Custom triggering schedule.
- customSchedule string
- Valid if type is CUSTOM. Following RFC 5545 recurrence rules, we can specify starting time, occurrence frequency, and interval size. Example for frequency could be DAILY/WEEKLY/HOURLY or any RFC 5545 supported frequency, which is followed by start time of this window. You can control the start time with BYHOUR, BYMINUTE and BYSECONDS. It is followed by the interval size.
- scheduleType string
- Different types of trigger schedule: NONE - No automated synchronization schedule. DEFAULT - Trigger schedule is every 30 minutes. CUSTOM - Custom triggering schedule.
- custom_schedule str
- Valid if type is CUSTOM. Following RFC 5545 recurrence rules, we can specify starting time, occurrence frequency, and interval size. Example for frequency could be DAILY/WEEKLY/HOURLY or any RFC 5545 supported frequency, which is followed by start time of this window. You can control the start time with BYHOUR, BYMINUTE and BYSECONDS. It is followed by the interval size.
- schedule_type str
- Different types of trigger schedule: NONE - No automated synchronization schedule. DEFAULT - Trigger schedule is every 30 minutes. CUSTOM - Custom triggering schedule.
- customSchedule String
- Valid if type is CUSTOM. Following RFC 5545 recurrence rules, we can specify starting time, occurrence frequency, and interval size. Example for frequency could be DAILY/WEEKLY/HOURLY or any RFC 5545 supported frequency, which is followed by start time of this window. You can control the start time with BYHOUR, BYMINUTE and BYSECONDS. It is followed by the interval size.
- scheduleType String
- Different types of trigger schedule: NONE - No automated synchronization schedule. DEFAULT - Trigger schedule is every 30 minutes. CUSTOM - Custom triggering schedule.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.