1. Packages
  2. GitHub
  3. API Docs
  4. getRepositoryDeploymentBranchPolicies
GitHub v6.2.2 published on Tuesday, Jun 18, 2024 by Pulumi

github.getRepositoryDeploymentBranchPolicies

Explore with Pulumi AI

github logo
GitHub v6.2.2 published on Tuesday, Jun 18, 2024 by Pulumi

    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:

    EnvironmentName 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.
    EnvironmentName 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.
    environmentName 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.
    environmentName 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.
    environmentName 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:

    DeploymentBranchPolicies List<GetRepositoryDeploymentBranchPoliciesDeploymentBranchPolicy>
    The list of this repository / environment deployment policies. Each element of deployment_branch_policies has the following attributes:
    EnvironmentName string
    Id string
    The provider-assigned unique ID for this managed resource.
    Repository string
    DeploymentBranchPolicies []GetRepositoryDeploymentBranchPoliciesDeploymentBranchPolicy
    The list of this repository / environment deployment policies. Each element of deployment_branch_policies has the following attributes:
    EnvironmentName string
    Id string
    The provider-assigned unique ID for this managed resource.
    Repository string
    deploymentBranchPolicies List<GetRepositoryDeploymentBranchPoliciesDeploymentBranchPolicy>
    The list of this repository / environment deployment policies. Each element of deployment_branch_policies has the following attributes:
    environmentName String
    id String
    The provider-assigned unique ID for this managed resource.
    repository String
    deploymentBranchPolicies GetRepositoryDeploymentBranchPoliciesDeploymentBranchPolicy[]
    The list of this repository / environment deployment policies. Each element of deployment_branch_policies has the following attributes:
    environmentName string
    id string
    The provider-assigned unique ID for this managed resource.
    repository string
    deployment_branch_policies Sequence[GetRepositoryDeploymentBranchPoliciesDeploymentBranchPolicy]
    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
    deploymentBranchPolicies List<Property Map>
    The list of this repository / environment deployment policies. Each element of deployment_branch_policies has the following attributes:
    environmentName String
    id String
    The provider-assigned unique ID for this managed resource.
    repository String

    Supporting Types

    GetRepositoryDeploymentBranchPoliciesDeploymentBranchPolicy

    Id string
    Id of the policy.
    Name string
    The name pattern that branches must match in order to deploy to the environment.
    Id string
    Id of the policy.
    Name string
    The name pattern that branches must match in order to deploy to the environment.
    id String
    Id of the policy.
    name String
    The name pattern that branches must match in order to deploy to the environment.
    id string
    Id of the policy.
    name string
    The name pattern that branches must match in order to deploy to the environment.
    id str
    Id of the policy.
    name str
    The name pattern that branches must match in order to deploy to the environment.
    id String
    Id of the policy.
    name String
    The name pattern that branches must match in order to deploy to the environment.

    Package Details

    Repository
    GitHub pulumi/pulumi-github
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the github Terraform Provider.
    github logo
    GitHub v6.2.2 published on Tuesday, Jun 18, 2024 by Pulumi