1. Packages
  2. Databricks Provider
  3. API Docs
  4. getPostgresBranches
Databricks v1.83.0 published on Friday, Jan 23, 2026 by Pulumi
databricks logo
Databricks v1.83.0 published on Friday, Jan 23, 2026 by Pulumi

    Public Beta

    This data source lists all Postgres branches in a project.

    Example Usage

    List All Branches in a Project

    import * as pulumi from "@pulumi/pulumi";
    import * as databricks from "@pulumi/databricks";
    
    const all = databricks.getPostgresBranches({
        parent: "projects/my-project",
    });
    export const branchNames = all.then(all => .map(branch => (branch.name)));
    
    import pulumi
    import pulumi_databricks as databricks
    
    all = databricks.get_postgres_branches(parent="projects/my-project")
    pulumi.export("branchNames", [branch.name for branch in all.branches])
    
    Example coming soon!
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Databricks = Pulumi.Databricks;
    
    return await Deployment.RunAsync(() => 
    {
        var all = Databricks.GetPostgresBranches.Invoke(new()
        {
            Parent = "projects/my-project",
        });
    
        return new Dictionary<string, object?>
        {
            ["branchNames"] = .Select(branch => 
            {
                return branch.Name;
            }).ToList(),
        };
    });
    
    Example coming soon!
    
    Example coming soon!
    

    Using getPostgresBranches

    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 getPostgresBranches(args: GetPostgresBranchesArgs, opts?: InvokeOptions): Promise<GetPostgresBranchesResult>
    function getPostgresBranchesOutput(args: GetPostgresBranchesOutputArgs, opts?: InvokeOptions): Output<GetPostgresBranchesResult>
    def get_postgres_branches(page_size: Optional[int] = None,
                              parent: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetPostgresBranchesResult
    def get_postgres_branches_output(page_size: Optional[pulumi.Input[int]] = None,
                              parent: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetPostgresBranchesResult]
    func GetPostgresBranches(ctx *Context, args *GetPostgresBranchesArgs, opts ...InvokeOption) (*GetPostgresBranchesResult, error)
    func GetPostgresBranchesOutput(ctx *Context, args *GetPostgresBranchesOutputArgs, opts ...InvokeOption) GetPostgresBranchesResultOutput

    > Note: This function is named GetPostgresBranches in the Go SDK.

    public static class GetPostgresBranches 
    {
        public static Task<GetPostgresBranchesResult> InvokeAsync(GetPostgresBranchesArgs args, InvokeOptions? opts = null)
        public static Output<GetPostgresBranchesResult> Invoke(GetPostgresBranchesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetPostgresBranchesResult> getPostgresBranches(GetPostgresBranchesArgs args, InvokeOptions options)
    public static Output<GetPostgresBranchesResult> getPostgresBranches(GetPostgresBranchesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: databricks:index/getPostgresBranches:getPostgresBranches
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Parent string
    The Project that owns this collection of branches. Format: projects/{project_id}
    PageSize int
    Upper bound for items returned. Cannot be negative
    Parent string
    The Project that owns this collection of branches. Format: projects/{project_id}
    PageSize int
    Upper bound for items returned. Cannot be negative
    parent String
    The Project that owns this collection of branches. Format: projects/{project_id}
    pageSize Integer
    Upper bound for items returned. Cannot be negative
    parent string
    The Project that owns this collection of branches. Format: projects/{project_id}
    pageSize number
    Upper bound for items returned. Cannot be negative
    parent str
    The Project that owns this collection of branches. Format: projects/{project_id}
    page_size int
    Upper bound for items returned. Cannot be negative
    parent String
    The Project that owns this collection of branches. Format: projects/{project_id}
    pageSize Number
    Upper bound for items returned. Cannot be negative

    getPostgresBranches Result

    The following output properties are available:

    Branches List<GetPostgresBranchesBranch>
    Id string
    The provider-assigned unique ID for this managed resource.
    Parent string
    (string) - The project containing this branch (API resource hierarchy). Format: projects/{project_id}
    PageSize int
    Branches []GetPostgresBranchesBranch
    Id string
    The provider-assigned unique ID for this managed resource.
    Parent string
    (string) - The project containing this branch (API resource hierarchy). Format: projects/{project_id}
    PageSize int
    branches List<GetPostgresBranchesBranch>
    id String
    The provider-assigned unique ID for this managed resource.
    parent String
    (string) - The project containing this branch (API resource hierarchy). Format: projects/{project_id}
    pageSize Integer
    branches GetPostgresBranchesBranch[]
    id string
    The provider-assigned unique ID for this managed resource.
    parent string
    (string) - The project containing this branch (API resource hierarchy). Format: projects/{project_id}
    pageSize number
    branches Sequence[GetPostgresBranchesBranch]
    id str
    The provider-assigned unique ID for this managed resource.
    parent str
    (string) - The project containing this branch (API resource hierarchy). Format: projects/{project_id}
    page_size int
    branches List<Property Map>
    id String
    The provider-assigned unique ID for this managed resource.
    parent String
    (string) - The project containing this branch (API resource hierarchy). Format: projects/{project_id}
    pageSize Number

    Supporting Types

    GetPostgresBranchesBranch

    CreateTime string
    (string) - A timestamp indicating when the branch was created
    Name string
    (string) - The resource name of the branch. This field is output-only and constructed by the system. Format: projects/{project_id}/branches/{branch_id}
    Parent string
    The Project that owns this collection of branches. Format: projects/{project_id}
    Spec GetPostgresBranchesBranchSpec
    (BranchSpec) - The spec contains the branch configuration
    Status GetPostgresBranchesBranchStatus
    (BranchStatus) - The current status of a Branch
    Uid string
    (string) - System-generated unique ID for the branch
    UpdateTime string
    (string) - A timestamp indicating when the branch was last updated
    CreateTime string
    (string) - A timestamp indicating when the branch was created
    Name string
    (string) - The resource name of the branch. This field is output-only and constructed by the system. Format: projects/{project_id}/branches/{branch_id}
    Parent string
    The Project that owns this collection of branches. Format: projects/{project_id}
    Spec GetPostgresBranchesBranchSpec
    (BranchSpec) - The spec contains the branch configuration
    Status GetPostgresBranchesBranchStatus
    (BranchStatus) - The current status of a Branch
    Uid string
    (string) - System-generated unique ID for the branch
    UpdateTime string
    (string) - A timestamp indicating when the branch was last updated
    createTime String
    (string) - A timestamp indicating when the branch was created
    name String
    (string) - The resource name of the branch. This field is output-only and constructed by the system. Format: projects/{project_id}/branches/{branch_id}
    parent String
    The Project that owns this collection of branches. Format: projects/{project_id}
    spec GetPostgresBranchesBranchSpec
    (BranchSpec) - The spec contains the branch configuration
    status GetPostgresBranchesBranchStatus
    (BranchStatus) - The current status of a Branch
    uid String
    (string) - System-generated unique ID for the branch
    updateTime String
    (string) - A timestamp indicating when the branch was last updated
    createTime string
    (string) - A timestamp indicating when the branch was created
    name string
    (string) - The resource name of the branch. This field is output-only and constructed by the system. Format: projects/{project_id}/branches/{branch_id}
    parent string
    The Project that owns this collection of branches. Format: projects/{project_id}
    spec GetPostgresBranchesBranchSpec
    (BranchSpec) - The spec contains the branch configuration
    status GetPostgresBranchesBranchStatus
    (BranchStatus) - The current status of a Branch
    uid string
    (string) - System-generated unique ID for the branch
    updateTime string
    (string) - A timestamp indicating when the branch was last updated
    create_time str
    (string) - A timestamp indicating when the branch was created
    name str
    (string) - The resource name of the branch. This field is output-only and constructed by the system. Format: projects/{project_id}/branches/{branch_id}
    parent str
    The Project that owns this collection of branches. Format: projects/{project_id}
    spec GetPostgresBranchesBranchSpec
    (BranchSpec) - The spec contains the branch configuration
    status GetPostgresBranchesBranchStatus
    (BranchStatus) - The current status of a Branch
    uid str
    (string) - System-generated unique ID for the branch
    update_time str
    (string) - A timestamp indicating when the branch was last updated
    createTime String
    (string) - A timestamp indicating when the branch was created
    name String
    (string) - The resource name of the branch. This field is output-only and constructed by the system. Format: projects/{project_id}/branches/{branch_id}
    parent String
    The Project that owns this collection of branches. Format: projects/{project_id}
    spec Property Map
    (BranchSpec) - The spec contains the branch configuration
    status Property Map
    (BranchStatus) - The current status of a Branch
    uid String
    (string) - System-generated unique ID for the branch
    updateTime String
    (string) - A timestamp indicating when the branch was last updated

    GetPostgresBranchesBranchSpec

    ExpireTime string
    (string) - Absolute expiration time for the branch. Empty if expiration is disabled
    IsProtected bool
    (boolean) - Whether the branch is protected
    NoExpiry bool
    (boolean) - Explicitly disable expiration. When set to true, the branch will not expire. If set to false, the request is invalid; provide either ttl or expire_time instead
    SourceBranch string
    (string) - The name of the source branch from which this branch was created. Format: projects/{project_id}/branches/{branch_id}
    SourceBranchLsn string
    (string) - The Log Sequence Number (LSN) on the source branch from which this branch was created
    SourceBranchTime string
    (string) - The point in time on the source branch from which this branch was created
    Ttl string
    (string) - Relative time-to-live duration. When set, the branch will expire at creation_time + ttl
    ExpireTime string
    (string) - Absolute expiration time for the branch. Empty if expiration is disabled
    IsProtected bool
    (boolean) - Whether the branch is protected
    NoExpiry bool
    (boolean) - Explicitly disable expiration. When set to true, the branch will not expire. If set to false, the request is invalid; provide either ttl or expire_time instead
    SourceBranch string
    (string) - The name of the source branch from which this branch was created. Format: projects/{project_id}/branches/{branch_id}
    SourceBranchLsn string
    (string) - The Log Sequence Number (LSN) on the source branch from which this branch was created
    SourceBranchTime string
    (string) - The point in time on the source branch from which this branch was created
    Ttl string
    (string) - Relative time-to-live duration. When set, the branch will expire at creation_time + ttl
    expireTime String
    (string) - Absolute expiration time for the branch. Empty if expiration is disabled
    isProtected Boolean
    (boolean) - Whether the branch is protected
    noExpiry Boolean
    (boolean) - Explicitly disable expiration. When set to true, the branch will not expire. If set to false, the request is invalid; provide either ttl or expire_time instead
    sourceBranch String
    (string) - The name of the source branch from which this branch was created. Format: projects/{project_id}/branches/{branch_id}
    sourceBranchLsn String
    (string) - The Log Sequence Number (LSN) on the source branch from which this branch was created
    sourceBranchTime String
    (string) - The point in time on the source branch from which this branch was created
    ttl String
    (string) - Relative time-to-live duration. When set, the branch will expire at creation_time + ttl
    expireTime string
    (string) - Absolute expiration time for the branch. Empty if expiration is disabled
    isProtected boolean
    (boolean) - Whether the branch is protected
    noExpiry boolean
    (boolean) - Explicitly disable expiration. When set to true, the branch will not expire. If set to false, the request is invalid; provide either ttl or expire_time instead
    sourceBranch string
    (string) - The name of the source branch from which this branch was created. Format: projects/{project_id}/branches/{branch_id}
    sourceBranchLsn string
    (string) - The Log Sequence Number (LSN) on the source branch from which this branch was created
    sourceBranchTime string
    (string) - The point in time on the source branch from which this branch was created
    ttl string
    (string) - Relative time-to-live duration. When set, the branch will expire at creation_time + ttl
    expire_time str
    (string) - Absolute expiration time for the branch. Empty if expiration is disabled
    is_protected bool
    (boolean) - Whether the branch is protected
    no_expiry bool
    (boolean) - Explicitly disable expiration. When set to true, the branch will not expire. If set to false, the request is invalid; provide either ttl or expire_time instead
    source_branch str
    (string) - The name of the source branch from which this branch was created. Format: projects/{project_id}/branches/{branch_id}
    source_branch_lsn str
    (string) - The Log Sequence Number (LSN) on the source branch from which this branch was created
    source_branch_time str
    (string) - The point in time on the source branch from which this branch was created
    ttl str
    (string) - Relative time-to-live duration. When set, the branch will expire at creation_time + ttl
    expireTime String
    (string) - Absolute expiration time for the branch. Empty if expiration is disabled
    isProtected Boolean
    (boolean) - Whether the branch is protected
    noExpiry Boolean
    (boolean) - Explicitly disable expiration. When set to true, the branch will not expire. If set to false, the request is invalid; provide either ttl or expire_time instead
    sourceBranch String
    (string) - The name of the source branch from which this branch was created. Format: projects/{project_id}/branches/{branch_id}
    sourceBranchLsn String
    (string) - The Log Sequence Number (LSN) on the source branch from which this branch was created
    sourceBranchTime String
    (string) - The point in time on the source branch from which this branch was created
    ttl String
    (string) - Relative time-to-live duration. When set, the branch will expire at creation_time + ttl

    GetPostgresBranchesBranchStatus

    CurrentState string
    (string) - The branch's state, indicating if it is initializing, ready for use, or archived. Possible values are: ARCHIVED, IMPORTING, INIT, READY, RESETTING
    Default bool
    (boolean) - Whether the branch is the project's default branch
    ExpireTime string
    (string) - Absolute expiration time for the branch. Empty if expiration is disabled
    IsProtected bool
    (boolean) - Whether the branch is protected
    LogicalSizeBytes int
    (integer) - The logical size of the branch
    PendingState string
    (string) - The pending state of the branch, if a state transition is in progress. Possible values are: ARCHIVED, IMPORTING, INIT, READY, RESETTING
    SourceBranch string
    (string) - The name of the source branch from which this branch was created. Format: projects/{project_id}/branches/{branch_id}
    SourceBranchLsn string
    (string) - The Log Sequence Number (LSN) on the source branch from which this branch was created
    SourceBranchTime string
    (string) - The point in time on the source branch from which this branch was created
    StateChangeTime string
    (string) - A timestamp indicating when the current_state began
    CurrentState string
    (string) - The branch's state, indicating if it is initializing, ready for use, or archived. Possible values are: ARCHIVED, IMPORTING, INIT, READY, RESETTING
    Default bool
    (boolean) - Whether the branch is the project's default branch
    ExpireTime string
    (string) - Absolute expiration time for the branch. Empty if expiration is disabled
    IsProtected bool
    (boolean) - Whether the branch is protected
    LogicalSizeBytes int
    (integer) - The logical size of the branch
    PendingState string
    (string) - The pending state of the branch, if a state transition is in progress. Possible values are: ARCHIVED, IMPORTING, INIT, READY, RESETTING
    SourceBranch string
    (string) - The name of the source branch from which this branch was created. Format: projects/{project_id}/branches/{branch_id}
    SourceBranchLsn string
    (string) - The Log Sequence Number (LSN) on the source branch from which this branch was created
    SourceBranchTime string
    (string) - The point in time on the source branch from which this branch was created
    StateChangeTime string
    (string) - A timestamp indicating when the current_state began
    currentState String
    (string) - The branch's state, indicating if it is initializing, ready for use, or archived. Possible values are: ARCHIVED, IMPORTING, INIT, READY, RESETTING
    default_ Boolean
    (boolean) - Whether the branch is the project's default branch
    expireTime String
    (string) - Absolute expiration time for the branch. Empty if expiration is disabled
    isProtected Boolean
    (boolean) - Whether the branch is protected
    logicalSizeBytes Integer
    (integer) - The logical size of the branch
    pendingState String
    (string) - The pending state of the branch, if a state transition is in progress. Possible values are: ARCHIVED, IMPORTING, INIT, READY, RESETTING
    sourceBranch String
    (string) - The name of the source branch from which this branch was created. Format: projects/{project_id}/branches/{branch_id}
    sourceBranchLsn String
    (string) - The Log Sequence Number (LSN) on the source branch from which this branch was created
    sourceBranchTime String
    (string) - The point in time on the source branch from which this branch was created
    stateChangeTime String
    (string) - A timestamp indicating when the current_state began
    currentState string
    (string) - The branch's state, indicating if it is initializing, ready for use, or archived. Possible values are: ARCHIVED, IMPORTING, INIT, READY, RESETTING
    default boolean
    (boolean) - Whether the branch is the project's default branch
    expireTime string
    (string) - Absolute expiration time for the branch. Empty if expiration is disabled
    isProtected boolean
    (boolean) - Whether the branch is protected
    logicalSizeBytes number
    (integer) - The logical size of the branch
    pendingState string
    (string) - The pending state of the branch, if a state transition is in progress. Possible values are: ARCHIVED, IMPORTING, INIT, READY, RESETTING
    sourceBranch string
    (string) - The name of the source branch from which this branch was created. Format: projects/{project_id}/branches/{branch_id}
    sourceBranchLsn string
    (string) - The Log Sequence Number (LSN) on the source branch from which this branch was created
    sourceBranchTime string
    (string) - The point in time on the source branch from which this branch was created
    stateChangeTime string
    (string) - A timestamp indicating when the current_state began
    current_state str
    (string) - The branch's state, indicating if it is initializing, ready for use, or archived. Possible values are: ARCHIVED, IMPORTING, INIT, READY, RESETTING
    default bool
    (boolean) - Whether the branch is the project's default branch
    expire_time str
    (string) - Absolute expiration time for the branch. Empty if expiration is disabled
    is_protected bool
    (boolean) - Whether the branch is protected
    logical_size_bytes int
    (integer) - The logical size of the branch
    pending_state str
    (string) - The pending state of the branch, if a state transition is in progress. Possible values are: ARCHIVED, IMPORTING, INIT, READY, RESETTING
    source_branch str
    (string) - The name of the source branch from which this branch was created. Format: projects/{project_id}/branches/{branch_id}
    source_branch_lsn str
    (string) - The Log Sequence Number (LSN) on the source branch from which this branch was created
    source_branch_time str
    (string) - The point in time on the source branch from which this branch was created
    state_change_time str
    (string) - A timestamp indicating when the current_state began
    currentState String
    (string) - The branch's state, indicating if it is initializing, ready for use, or archived. Possible values are: ARCHIVED, IMPORTING, INIT, READY, RESETTING
    default Boolean
    (boolean) - Whether the branch is the project's default branch
    expireTime String
    (string) - Absolute expiration time for the branch. Empty if expiration is disabled
    isProtected Boolean
    (boolean) - Whether the branch is protected
    logicalSizeBytes Number
    (integer) - The logical size of the branch
    pendingState String
    (string) - The pending state of the branch, if a state transition is in progress. Possible values are: ARCHIVED, IMPORTING, INIT, READY, RESETTING
    sourceBranch String
    (string) - The name of the source branch from which this branch was created. Format: projects/{project_id}/branches/{branch_id}
    sourceBranchLsn String
    (string) - The Log Sequence Number (LSN) on the source branch from which this branch was created
    sourceBranchTime String
    (string) - The point in time on the source branch from which this branch was created
    stateChangeTime String
    (string) - A timestamp indicating when the current_state began

    Package Details

    Repository
    databricks pulumi/pulumi-databricks
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the databricks Terraform Provider.
    databricks logo
    Databricks v1.83.0 published on Friday, Jan 23, 2026 by Pulumi
      Meet Neo: Your AI Platform Teammate