Databricks v1.83.0 published on Friday, Jan 23, 2026 by Pulumi
Databricks v1.83.0 published on Friday, Jan 23, 2026 by Pulumi
This data source retrieves a single Postgres branch.
Example Usage
Retrieve Branch by Name
import * as pulumi from "@pulumi/pulumi";
import * as databricks from "@pulumi/databricks";
const _this = databricks.getPostgresBranch({
name: "projects/my-project/branches/dev-branch",
});
export const branchIsProtected = _this.then(_this => _this.status?.isProtected);
import pulumi
import pulumi_databricks as databricks
this = databricks.get_postgres_branch(name="projects/my-project/branches/dev-branch")
pulumi.export("branchIsProtected", this.status.is_protected)
package main
import (
"github.com/pulumi/pulumi-databricks/sdk/go/databricks"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
this, err := databricks.LookupPostgresBranch(ctx, &databricks.LookupPostgresBranchArgs{
Name: "projects/my-project/branches/dev-branch",
}, nil)
if err != nil {
return err
}
ctx.Export("branchIsProtected", this.Status.IsProtected)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Databricks = Pulumi.Databricks;
return await Deployment.RunAsync(() =>
{
var @this = Databricks.GetPostgresBranch.Invoke(new()
{
Name = "projects/my-project/branches/dev-branch",
});
return new Dictionary<string, object?>
{
["branchIsProtected"] = @this.Apply(@this => @this.Apply(getPostgresBranchResult => getPostgresBranchResult.Status?.IsProtected)),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.databricks.DatabricksFunctions;
import com.pulumi.databricks.inputs.GetPostgresBranchArgs;
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 this = DatabricksFunctions.getPostgresBranch(GetPostgresBranchArgs.builder()
.name("projects/my-project/branches/dev-branch")
.build());
ctx.export("branchIsProtected", this_.status().isProtected());
}
}
variables:
this:
fn::invoke:
function: databricks:getPostgresBranch
arguments:
name: projects/my-project/branches/dev-branch
outputs:
branchIsProtected: ${this.status.isProtected}
Using getPostgresBranch
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 getPostgresBranch(args: GetPostgresBranchArgs, opts?: InvokeOptions): Promise<GetPostgresBranchResult>
function getPostgresBranchOutput(args: GetPostgresBranchOutputArgs, opts?: InvokeOptions): Output<GetPostgresBranchResult>def get_postgres_branch(name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetPostgresBranchResult
def get_postgres_branch_output(name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetPostgresBranchResult]func LookupPostgresBranch(ctx *Context, args *LookupPostgresBranchArgs, opts ...InvokeOption) (*LookupPostgresBranchResult, error)
func LookupPostgresBranchOutput(ctx *Context, args *LookupPostgresBranchOutputArgs, opts ...InvokeOption) LookupPostgresBranchResultOutput> Note: This function is named LookupPostgresBranch in the Go SDK.
public static class GetPostgresBranch
{
public static Task<GetPostgresBranchResult> InvokeAsync(GetPostgresBranchArgs args, InvokeOptions? opts = null)
public static Output<GetPostgresBranchResult> Invoke(GetPostgresBranchInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetPostgresBranchResult> getPostgresBranch(GetPostgresBranchArgs args, InvokeOptions options)
public static Output<GetPostgresBranchResult> getPostgresBranch(GetPostgresBranchArgs args, InvokeOptions options)
fn::invoke:
function: databricks:index/getPostgresBranch:getPostgresBranch
arguments:
# arguments dictionaryThe following arguments are supported:
- Name string
- The resource name of the branch. This field is output-only and constructed by the system.
Format:
projects/{project_id}/branches/{branch_id}
- Name string
- The resource name of the branch. This field is output-only and constructed by the system.
Format:
projects/{project_id}/branches/{branch_id}
- name String
- The resource name of the branch. This field is output-only and constructed by the system.
Format:
projects/{project_id}/branches/{branch_id}
- name string
- The resource name of the branch. This field is output-only and constructed by the system.
Format:
projects/{project_id}/branches/{branch_id}
- name str
- The resource name of the branch. This field is output-only and constructed by the system.
Format:
projects/{project_id}/branches/{branch_id}
- name String
- The resource name of the branch. This field is output-only and constructed by the system.
Format:
projects/{project_id}/branches/{branch_id}
getPostgresBranch Result
The following output properties are available:
- Create
Time string - (string) - A timestamp indicating when the branch was created
- Id string
- The provider-assigned unique ID for this managed resource.
- 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
- (string) - The project containing this branch (API resource hierarchy). Format: projects/{project_id}
- Spec
Get
Postgres Branch Spec - (BranchSpec) - The spec contains the branch configuration
- Status
Get
Postgres Branch Status - (BranchStatus) - The current status of a Branch
- Uid string
- (string) - System-generated unique ID for the branch
- Update
Time string - (string) - A timestamp indicating when the branch was last updated
- Create
Time string - (string) - A timestamp indicating when the branch was created
- Id string
- The provider-assigned unique ID for this managed resource.
- 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
- (string) - The project containing this branch (API resource hierarchy). Format: projects/{project_id}
- Spec
Get
Postgres Branch Spec - (BranchSpec) - The spec contains the branch configuration
- Status
Get
Postgres Branch Status - (BranchStatus) - The current status of a Branch
- Uid string
- (string) - System-generated unique ID for the branch
- Update
Time string - (string) - A timestamp indicating when the branch was last updated
- create
Time String - (string) - A timestamp indicating when the branch was created
- id String
- The provider-assigned unique ID for this managed resource.
- 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
- (string) - The project containing this branch (API resource hierarchy). Format: projects/{project_id}
- spec
Get
Postgres Branch Spec - (BranchSpec) - The spec contains the branch configuration
- status
Get
Postgres Branch Status - (BranchStatus) - The current status of a Branch
- uid String
- (string) - System-generated unique ID for the branch
- update
Time String - (string) - A timestamp indicating when the branch was last updated
- create
Time string - (string) - A timestamp indicating when the branch was created
- id string
- The provider-assigned unique ID for this managed resource.
- 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
- (string) - The project containing this branch (API resource hierarchy). Format: projects/{project_id}
- spec
Get
Postgres Branch Spec - (BranchSpec) - The spec contains the branch configuration
- status
Get
Postgres Branch Status - (BranchStatus) - The current status of a Branch
- uid string
- (string) - System-generated unique ID for the branch
- update
Time string - (string) - A timestamp indicating when the branch was last updated
- create_
time str - (string) - A timestamp indicating when the branch was created
- id str
- The provider-assigned unique ID for this managed resource.
- 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
- (string) - The project containing this branch (API resource hierarchy). Format: projects/{project_id}
- spec
Get
Postgres Branch Spec - (BranchSpec) - The spec contains the branch configuration
- status
Get
Postgres Branch Status - (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
- create
Time String - (string) - A timestamp indicating when the branch was created
- id String
- The provider-assigned unique ID for this managed resource.
- 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
- (string) - The project containing this branch (API resource hierarchy). 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
- update
Time String - (string) - A timestamp indicating when the branch was last updated
Supporting Types
GetPostgresBranchSpec
- Expire
Time string - (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 string - (string) - The name of the source branch from which this branch was created. Format: projects/{project_id}/branches/{branch_id}
- Source
Branch stringLsn - (string) - The Log Sequence Number (LSN) on the source branch from which this branch was created
- Source
Branch stringTime - (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 string - (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 string - (string) - The name of the source branch from which this branch was created. Format: projects/{project_id}/branches/{branch_id}
- Source
Branch stringLsn - (string) - The Log Sequence Number (LSN) on the source branch from which this branch was created
- Source
Branch stringTime - (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 String - (string) - Absolute expiration time for the branch. Empty if expiration is disabled
- is
Protected Boolean - (boolean) - Whether the branch is protected
- no
Expiry 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
- source
Branch String - (string) - The name of the source branch from which this branch was created. Format: projects/{project_id}/branches/{branch_id}
- source
Branch StringLsn - (string) - The Log Sequence Number (LSN) on the source branch from which this branch was created
- source
Branch StringTime - (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 string - (string) - Absolute expiration time for the branch. Empty if expiration is disabled
- is
Protected boolean - (boolean) - Whether the branch is protected
- no
Expiry 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
- source
Branch string - (string) - The name of the source branch from which this branch was created. Format: projects/{project_id}/branches/{branch_id}
- source
Branch stringLsn - (string) - The Log Sequence Number (LSN) on the source branch from which this branch was created
- source
Branch stringTime - (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_ strlsn - (string) - The Log Sequence Number (LSN) on the source branch from which this branch was created
- source_
branch_ strtime - (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
- expire
Time String - (string) - Absolute expiration time for the branch. Empty if expiration is disabled
- is
Protected Boolean - (boolean) - Whether the branch is protected
- no
Expiry 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
- source
Branch String - (string) - The name of the source branch from which this branch was created. Format: projects/{project_id}/branches/{branch_id}
- source
Branch StringLsn - (string) - The Log Sequence Number (LSN) on the source branch from which this branch was created
- source
Branch StringTime - (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
GetPostgresBranchStatus
- Current
State 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
- Expire
Time string - (string) - Absolute expiration time for the branch. Empty if expiration is disabled
- Is
Protected bool - (boolean) - Whether the branch is protected
- Logical
Size intBytes - (integer) - The logical size of the branch
- Pending
State string - (string) - The pending state of the branch, if a state transition is in progress. Possible values are:
ARCHIVED,IMPORTING,INIT,READY,RESETTING - Source
Branch string - (string) - The name of the source branch from which this branch was created. Format: projects/{project_id}/branches/{branch_id}
- Source
Branch stringLsn - (string) - The Log Sequence Number (LSN) on the source branch from which this branch was created
- Source
Branch stringTime - (string) - The point in time on the source branch from which this branch was created
- State
Change stringTime - (string) - A timestamp indicating when the
current_statebegan
- Current
State 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
- Expire
Time string - (string) - Absolute expiration time for the branch. Empty if expiration is disabled
- Is
Protected bool - (boolean) - Whether the branch is protected
- Logical
Size intBytes - (integer) - The logical size of the branch
- Pending
State string - (string) - The pending state of the branch, if a state transition is in progress. Possible values are:
ARCHIVED,IMPORTING,INIT,READY,RESETTING - Source
Branch string - (string) - The name of the source branch from which this branch was created. Format: projects/{project_id}/branches/{branch_id}
- Source
Branch stringLsn - (string) - The Log Sequence Number (LSN) on the source branch from which this branch was created
- Source
Branch stringTime - (string) - The point in time on the source branch from which this branch was created
- State
Change stringTime - (string) - A timestamp indicating when the
current_statebegan
- current
State 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
- expire
Time String - (string) - Absolute expiration time for the branch. Empty if expiration is disabled
- is
Protected Boolean - (boolean) - Whether the branch is protected
- logical
Size IntegerBytes - (integer) - The logical size of the branch
- pending
State String - (string) - The pending state of the branch, if a state transition is in progress. Possible values are:
ARCHIVED,IMPORTING,INIT,READY,RESETTING - source
Branch String - (string) - The name of the source branch from which this branch was created. Format: projects/{project_id}/branches/{branch_id}
- source
Branch StringLsn - (string) - The Log Sequence Number (LSN) on the source branch from which this branch was created
- source
Branch StringTime - (string) - The point in time on the source branch from which this branch was created
- state
Change StringTime - (string) - A timestamp indicating when the
current_statebegan
- current
State 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
- expire
Time string - (string) - Absolute expiration time for the branch. Empty if expiration is disabled
- is
Protected boolean - (boolean) - Whether the branch is protected
- logical
Size numberBytes - (integer) - The logical size of the branch
- pending
State string - (string) - The pending state of the branch, if a state transition is in progress. Possible values are:
ARCHIVED,IMPORTING,INIT,READY,RESETTING - source
Branch string - (string) - The name of the source branch from which this branch was created. Format: projects/{project_id}/branches/{branch_id}
- source
Branch stringLsn - (string) - The Log Sequence Number (LSN) on the source branch from which this branch was created
- source
Branch stringTime - (string) - The point in time on the source branch from which this branch was created
- state
Change stringTime - (string) - A timestamp indicating when the
current_statebegan
- 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_ intbytes - (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_ strlsn - (string) - The Log Sequence Number (LSN) on the source branch from which this branch was created
- source_
branch_ strtime - (string) - The point in time on the source branch from which this branch was created
- state_
change_ strtime - (string) - A timestamp indicating when the
current_statebegan
- current
State 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
- expire
Time String - (string) - Absolute expiration time for the branch. Empty if expiration is disabled
- is
Protected Boolean - (boolean) - Whether the branch is protected
- logical
Size NumberBytes - (integer) - The logical size of the branch
- pending
State String - (string) - The pending state of the branch, if a state transition is in progress. Possible values are:
ARCHIVED,IMPORTING,INIT,READY,RESETTING - source
Branch String - (string) - The name of the source branch from which this branch was created. Format: projects/{project_id}/branches/{branch_id}
- source
Branch StringLsn - (string) - The Log Sequence Number (LSN) on the source branch from which this branch was created
- source
Branch StringTime - (string) - The point in time on the source branch from which this branch was created
- state
Change StringTime - (string) - A timestamp indicating when the
current_statebegan
Package Details
- Repository
- databricks pulumi/pulumi-databricks
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
databricksTerraform Provider.
Databricks v1.83.0 published on Friday, Jan 23, 2026 by Pulumi
