Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi
oci.DevOps.getRepositoryProtectedBranches
Explore with Pulumi AI
This data source provides the list of Repository Protected Branches in Oracle Cloud Infrastructure Devops service.
Returns a list of Protected Branches.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testRepositoryProtectedBranches = oci.DevOps.getRepositoryProtectedBranches({
repositoryId: testRepository.id,
name: repositoryProtectedBranchName,
});
import pulumi
import pulumi_oci as oci
test_repository_protected_branches = oci.DevOps.get_repository_protected_branches(repository_id=test_repository["id"],
name=repository_protected_branch_name)
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.GetRepositoryProtectedBranches(ctx, &devops.GetRepositoryProtectedBranchesArgs{
RepositoryId: testRepository.Id,
Name: pulumi.StringRef(repositoryProtectedBranchName),
}, 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 testRepositoryProtectedBranches = Oci.DevOps.GetRepositoryProtectedBranches.Invoke(new()
{
RepositoryId = testRepository.Id,
Name = repositoryProtectedBranchName,
});
});
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.GetRepositoryProtectedBranchesArgs;
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 testRepositoryProtectedBranches = DevOpsFunctions.getRepositoryProtectedBranches(GetRepositoryProtectedBranchesArgs.builder()
.repositoryId(testRepository.id())
.name(repositoryProtectedBranchName)
.build());
}
}
variables:
testRepositoryProtectedBranches:
fn::invoke:
Function: oci:DevOps:getRepositoryProtectedBranches
Arguments:
repositoryId: ${testRepository.id}
name: ${repositoryProtectedBranchName}
Using getRepositoryProtectedBranches
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 getRepositoryProtectedBranches(args: GetRepositoryProtectedBranchesArgs, opts?: InvokeOptions): Promise<GetRepositoryProtectedBranchesResult>
function getRepositoryProtectedBranchesOutput(args: GetRepositoryProtectedBranchesOutputArgs, opts?: InvokeOptions): Output<GetRepositoryProtectedBranchesResult>
def get_repository_protected_branches(filters: Optional[Sequence[_devops.GetRepositoryProtectedBranchesFilter]] = None,
name: Optional[str] = None,
repository_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetRepositoryProtectedBranchesResult
def get_repository_protected_branches_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[_devops.GetRepositoryProtectedBranchesFilterArgs]]]] = None,
name: Optional[pulumi.Input[str]] = None,
repository_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetRepositoryProtectedBranchesResult]
func GetRepositoryProtectedBranches(ctx *Context, args *GetRepositoryProtectedBranchesArgs, opts ...InvokeOption) (*GetRepositoryProtectedBranchesResult, error)
func GetRepositoryProtectedBranchesOutput(ctx *Context, args *GetRepositoryProtectedBranchesOutputArgs, opts ...InvokeOption) GetRepositoryProtectedBranchesResultOutput
> Note: This function is named GetRepositoryProtectedBranches
in the Go SDK.
public static class GetRepositoryProtectedBranches
{
public static Task<GetRepositoryProtectedBranchesResult> InvokeAsync(GetRepositoryProtectedBranchesArgs args, InvokeOptions? opts = null)
public static Output<GetRepositoryProtectedBranchesResult> Invoke(GetRepositoryProtectedBranchesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetRepositoryProtectedBranchesResult> getRepositoryProtectedBranches(GetRepositoryProtectedBranchesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:DevOps/getRepositoryProtectedBranches:getRepositoryProtectedBranches
arguments:
# arguments dictionary
The following arguments are supported:
- Repository
Id string - Unique repository identifier.
- Filters
List<Get
Repository Protected Branches Filter> - Name string
- A filter to return only resources that match the given branch name.
- Repository
Id string - Unique repository identifier.
- Filters
[]Get
Repository Protected Branches Filter - Name string
- A filter to return only resources that match the given branch name.
- repository
Id String - Unique repository identifier.
- filters
List<Get
Repository Protected Branches Filter> - name String
- A filter to return only resources that match the given branch name.
- repository
Id string - Unique repository identifier.
- filters
Get
Repository Protected Branches Filter[] - name string
- A filter to return only resources that match the given branch name.
- repository_
id str - Unique repository identifier.
- filters
Sequence[devops.
Get Repository Protected Branches Filter] - name str
- A filter to return only resources that match the given branch name.
- repository
Id String - Unique repository identifier.
- filters List<Property Map>
- name String
- A filter to return only resources that match the given branch name.
getRepositoryProtectedBranches Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Protected
Branch List<GetCollections Repository Protected Branches Protected Branch Collection> - The list of protected_branch_collection.
- Repository
Id string - Filters
List<Get
Repository Protected Branches Filter> - Name string
- Id string
- The provider-assigned unique ID for this managed resource.
- Protected
Branch []GetCollections Repository Protected Branches Protected Branch Collection - The list of protected_branch_collection.
- Repository
Id string - Filters
[]Get
Repository Protected Branches Filter - Name string
- id String
- The provider-assigned unique ID for this managed resource.
- protected
Branch List<GetCollections Repository Protected Branches Protected Branch Collection> - The list of protected_branch_collection.
- repository
Id String - filters
List<Get
Repository Protected Branches Filter> - name String
- id string
- The provider-assigned unique ID for this managed resource.
- protected
Branch GetCollections Repository Protected Branches Protected Branch Collection[] - The list of protected_branch_collection.
- repository
Id string - filters
Get
Repository Protected Branches Filter[] - name string
- id str
- The provider-assigned unique ID for this managed resource.
- protected_
branch_ Sequence[devops.collections Get Repository Protected Branches Protected Branch Collection] - The list of protected_branch_collection.
- repository_
id str - filters
Sequence[devops.
Get Repository Protected Branches Filter] - name str
- id String
- The provider-assigned unique ID for this managed resource.
- protected
Branch List<Property Map>Collections - The list of protected_branch_collection.
- repository
Id String - filters List<Property Map>
- name String
Supporting Types
GetRepositoryProtectedBranchesFilter
GetRepositoryProtectedBranchesProtectedBranchCollection
- Items
List<Get
Repository Protected Branches Protected Branch Collection Item> - List of objects describing protected branches
- Items
[]Get
Repository Protected Branches Protected Branch Collection Item - List of objects describing protected branches
- items
List<Get
Repository Protected Branches Protected Branch Collection Item> - List of objects describing protected branches
- items
Get
Repository Protected Branches Protected Branch Collection Item[] - List of objects describing protected branches
- items
Sequence[devops.
Get Repository Protected Branches Protected Branch Collection Item] - List of objects describing protected branches
- items List<Property Map>
- List of objects describing protected branches
GetRepositoryProtectedBranchesProtectedBranchCollectionItem
- Branch
Name string - Branch name inside a 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"}
- 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"}
- Protection
Levels List<string> - Protection level to be added on the branch.
- 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"}
- Branch
Name string - Branch name inside a 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"}
- 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"}
- Protection
Levels []string - Protection level to be added on the branch.
- 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"}
- branch
Name String - Branch name inside a 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"}
- 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"}
- protection
Levels List<String> - Protection level to be added on the branch.
- 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"}
- branch
Name string - Branch name inside a 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"}
- {[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"}
- protection
Levels string[] - Protection level to be added on the branch.
- {[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"}
- branch_
name str - Branch name inside a 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"}
- 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"}
- protection_
levels Sequence[str] - Protection level to be added on the branch.
- 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"}
- branch
Name String - Branch name inside a 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"}
- 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"}
- protection
Levels List<String> - Protection level to be added on the branch.
- Map<String>
- Usage of system tag keys. These predefined keys are scoped to namespaces. See Resource Tags. Example:
{"orcl-cloud.free-tier-retained": "true"}
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.