Viewing docs for GitHub v6.12.1
published on Thursday, Feb 12, 2026 by Pulumi
published on Thursday, Feb 12, 2026 by Pulumi
Viewing docs for GitHub v6.12.1
published on Thursday, Feb 12, 2026 by Pulumi
published on Thursday, Feb 12, 2026 by Pulumi
Note: This data source is deprecated, please use the
github.getRepositoryEnvironmentDeploymentPoliciesdata source instead.
Use this data source to retrieve deployment branch policies for a repository / environment.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as github from "@pulumi/github";
const example = github.getRepositoryDeploymentBranchPolicies({
repository: "example-repository",
environmentName: "env_name",
});
import pulumi
import pulumi_github as github
example = github.get_repository_deployment_branch_policies(repository="example-repository",
environment_name="env_name")
package main
import (
"github.com/pulumi/pulumi-github/sdk/v6/go/github"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := github.GetRepositoryDeploymentBranchPolicies(ctx, &github.GetRepositoryDeploymentBranchPoliciesArgs{
Repository: "example-repository",
EnvironmentName: "env_name",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Github = Pulumi.Github;
return await Deployment.RunAsync(() =>
{
var example = Github.GetRepositoryDeploymentBranchPolicies.Invoke(new()
{
Repository = "example-repository",
EnvironmentName = "env_name",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.github.GithubFunctions;
import com.pulumi.github.inputs.GetRepositoryDeploymentBranchPoliciesArgs;
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 example = GithubFunctions.getRepositoryDeploymentBranchPolicies(GetRepositoryDeploymentBranchPoliciesArgs.builder()
.repository("example-repository")
.environmentName("env_name")
.build());
}
}
variables:
example:
fn::invoke:
function: github:getRepositoryDeploymentBranchPolicies
arguments:
repository: example-repository
environmentName: env_name
Using getRepositoryDeploymentBranchPolicies
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 getRepositoryDeploymentBranchPolicies(args: GetRepositoryDeploymentBranchPoliciesArgs, opts?: InvokeOptions): Promise<GetRepositoryDeploymentBranchPoliciesResult>
function getRepositoryDeploymentBranchPoliciesOutput(args: GetRepositoryDeploymentBranchPoliciesOutputArgs, opts?: InvokeOptions): Output<GetRepositoryDeploymentBranchPoliciesResult>def get_repository_deployment_branch_policies(environment_name: Optional[str] = None,
repository: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetRepositoryDeploymentBranchPoliciesResult
def get_repository_deployment_branch_policies_output(environment_name: Optional[pulumi.Input[str]] = None,
repository: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetRepositoryDeploymentBranchPoliciesResult]func GetRepositoryDeploymentBranchPolicies(ctx *Context, args *GetRepositoryDeploymentBranchPoliciesArgs, opts ...InvokeOption) (*GetRepositoryDeploymentBranchPoliciesResult, error)
func GetRepositoryDeploymentBranchPoliciesOutput(ctx *Context, args *GetRepositoryDeploymentBranchPoliciesOutputArgs, opts ...InvokeOption) GetRepositoryDeploymentBranchPoliciesResultOutput> Note: This function is named GetRepositoryDeploymentBranchPolicies in the Go SDK.
public static class GetRepositoryDeploymentBranchPolicies
{
public static Task<GetRepositoryDeploymentBranchPoliciesResult> InvokeAsync(GetRepositoryDeploymentBranchPoliciesArgs args, InvokeOptions? opts = null)
public static Output<GetRepositoryDeploymentBranchPoliciesResult> Invoke(GetRepositoryDeploymentBranchPoliciesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetRepositoryDeploymentBranchPoliciesResult> getRepositoryDeploymentBranchPolicies(GetRepositoryDeploymentBranchPoliciesArgs args, InvokeOptions options)
public static Output<GetRepositoryDeploymentBranchPoliciesResult> getRepositoryDeploymentBranchPolicies(GetRepositoryDeploymentBranchPoliciesArgs args, InvokeOptions options)
fn::invoke:
function: github:index/getRepositoryDeploymentBranchPolicies:getRepositoryDeploymentBranchPolicies
arguments:
# arguments dictionaryThe following arguments are supported:
- Environment
Name string - Name of the environment to retrieve the deployment branch policies from.
- Repository string
- Name of the repository to retrieve the deployment branch policies from.
- Environment
Name string - Name of the environment to retrieve the deployment branch policies from.
- Repository string
- Name of the repository to retrieve the deployment branch policies from.
- environment
Name String - Name of the environment to retrieve the deployment branch policies from.
- repository String
- Name of the repository to retrieve the deployment branch policies from.
- environment
Name string - Name of the environment to retrieve the deployment branch policies from.
- repository string
- Name of the repository to retrieve the deployment branch policies from.
- environment_
name str - Name of the environment to retrieve the deployment branch policies from.
- repository str
- Name of the repository to retrieve the deployment branch policies from.
- environment
Name String - Name of the environment to retrieve the deployment branch policies from.
- repository String
- Name of the repository to retrieve the deployment branch policies from.
getRepositoryDeploymentBranchPolicies Result
The following output properties are available:
- Deployment
Branch List<GetPolicies Repository Deployment Branch Policies Deployment Branch Policy> - The list of this repository / environment deployment policies. Each element of
deployment_branch_policieshas the following attributes: - Environment
Name string - Id string
- The provider-assigned unique ID for this managed resource.
- Repository string
- Deployment
Branch []GetPolicies Repository Deployment Branch Policies Deployment Branch Policy - The list of this repository / environment deployment policies. Each element of
deployment_branch_policieshas the following attributes: - Environment
Name string - Id string
- The provider-assigned unique ID for this managed resource.
- Repository string
- deployment
Branch List<GetPolicies Repository Deployment Branch Policies Deployment Branch Policy> - The list of this repository / environment deployment policies. Each element of
deployment_branch_policieshas the following attributes: - environment
Name String - id String
- The provider-assigned unique ID for this managed resource.
- repository String
- deployment
Branch GetPolicies Repository Deployment Branch Policies Deployment Branch Policy[] - The list of this repository / environment deployment policies. Each element of
deployment_branch_policieshas the following attributes: - environment
Name string - id string
- The provider-assigned unique ID for this managed resource.
- repository string
- deployment_
branch_ Sequence[Getpolicies Repository Deployment Branch Policies Deployment Branch Policy] - The list of this repository / environment deployment policies. Each element of
deployment_branch_policieshas the following attributes: - environment_
name str - id str
- The provider-assigned unique ID for this managed resource.
- repository str
- deployment
Branch List<Property Map>Policies - The list of this repository / environment deployment policies. Each element of
deployment_branch_policieshas the following attributes: - environment
Name String - id String
- The provider-assigned unique ID for this managed resource.
- repository String
Supporting Types
GetRepositoryDeploymentBranchPoliciesDeploymentBranchPolicy
Package Details
- Repository
- GitHub pulumi/pulumi-github
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
githubTerraform Provider.
Viewing docs for GitHub v6.12.1
published on Thursday, Feb 12, 2026 by Pulumi
published on Thursday, Feb 12, 2026 by Pulumi
