GitHub v6.2.2 published on Tuesday, Jun 18, 2024 by Pulumi
github.getRepositoryDeploymentBranchPolicies
Explore with Pulumi AI
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)
// Output-based functions aren't available in Java yet
fn::invoke:
function: github:index/getRepositoryDeploymentBranchPolicies:getRepositoryDeploymentBranchPolicies
arguments:
# arguments dictionary
The 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_policies
has 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_policies
has 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_policies
has 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_policies
has 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_policies
has 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_policies
has 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
github
Terraform Provider.