Viewing docs for planetscale 1.0.0
published on Monday, Mar 2, 2026 by planetscale
published on Monday, Mar 2, 2026 by planetscale
Viewing docs for planetscale 1.0.0
published on Monday, Mar 2, 2026 by planetscale
published on Monday, Mar 2, 2026 by planetscale
PostgresBranchRole DataSource
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as planetscale from "@pulumi/planetscale";
const myPostgresbranchrole = planetscale.getPostgresBranchRole({
branch: "...my_branch...",
database: "...my_database...",
id: "...my_id...",
organization: "...my_organization...",
});
import pulumi
import pulumi_planetscale as planetscale
my_postgresbranchrole = planetscale.get_postgres_branch_role(branch="...my_branch...",
database="...my_database...",
id="...my_id...",
organization="...my_organization...")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/planetscale/planetscale"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := planetscale.LookupPostgresBranchRole(ctx, &planetscale.LookupPostgresBranchRoleArgs{
Branch: "...my_branch...",
Database: "...my_database...",
Id: "...my_id...",
Organization: "...my_organization...",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Planetscale = Pulumi.Planetscale;
return await Deployment.RunAsync(() =>
{
var myPostgresbranchrole = Planetscale.GetPostgresBranchRole.Invoke(new()
{
Branch = "...my_branch...",
Database = "...my_database...",
Id = "...my_id...",
Organization = "...my_organization...",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.planetscale.PlanetscaleFunctions;
import com.pulumi.planetscale.inputs.GetPostgresBranchRoleArgs;
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 myPostgresbranchrole = PlanetscaleFunctions.getPostgresBranchRole(GetPostgresBranchRoleArgs.builder()
.branch("...my_branch...")
.database("...my_database...")
.id("...my_id...")
.organization("...my_organization...")
.build());
}
}
variables:
myPostgresbranchrole:
fn::invoke:
function: planetscale:getPostgresBranchRole
arguments:
branch: '...my_branch...'
database: '...my_database...'
id: '...my_id...'
organization: '...my_organization...'
Using getPostgresBranchRole
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 getPostgresBranchRole(args: GetPostgresBranchRoleArgs, opts?: InvokeOptions): Promise<GetPostgresBranchRoleResult>
function getPostgresBranchRoleOutput(args: GetPostgresBranchRoleOutputArgs, opts?: InvokeOptions): Output<GetPostgresBranchRoleResult>def get_postgres_branch_role(branch: Optional[str] = None,
database: Optional[str] = None,
id: Optional[str] = None,
organization: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetPostgresBranchRoleResult
def get_postgres_branch_role_output(branch: Optional[pulumi.Input[str]] = None,
database: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
organization: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetPostgresBranchRoleResult]func LookupPostgresBranchRole(ctx *Context, args *LookupPostgresBranchRoleArgs, opts ...InvokeOption) (*LookupPostgresBranchRoleResult, error)
func LookupPostgresBranchRoleOutput(ctx *Context, args *LookupPostgresBranchRoleOutputArgs, opts ...InvokeOption) LookupPostgresBranchRoleResultOutput> Note: This function is named LookupPostgresBranchRole in the Go SDK.
public static class GetPostgresBranchRole
{
public static Task<GetPostgresBranchRoleResult> InvokeAsync(GetPostgresBranchRoleArgs args, InvokeOptions? opts = null)
public static Output<GetPostgresBranchRoleResult> Invoke(GetPostgresBranchRoleInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetPostgresBranchRoleResult> getPostgresBranchRole(GetPostgresBranchRoleArgs args, InvokeOptions options)
public static Output<GetPostgresBranchRoleResult> getPostgresBranchRole(GetPostgresBranchRoleArgs args, InvokeOptions options)
fn::invoke:
function: planetscale:index/getPostgresBranchRole:getPostgresBranchRole
arguments:
# arguments dictionaryThe following arguments are supported:
- Branch string
- Branch name from
list_branches. Example:main. - Database string
- Database name slug from
list_databases. Example:app-db. - Id string
- The ID of the role
- Organization string
- Organization name slug from
list_organizations. Example:acme.
- Branch string
- Branch name from
list_branches. Example:main. - Database string
- Database name slug from
list_databases. Example:app-db. - Id string
- The ID of the role
- Organization string
- Organization name slug from
list_organizations. Example:acme.
- branch String
- Branch name from
list_branches. Example:main. - database String
- Database name slug from
list_databases. Example:app-db. - id String
- The ID of the role
- organization String
- Organization name slug from
list_organizations. Example:acme.
- branch string
- Branch name from
list_branches. Example:main. - database string
- Database name slug from
list_databases. Example:app-db. - id string
- The ID of the role
- organization string
- Organization name slug from
list_organizations. Example:acme.
- branch str
- Branch name from
list_branches. Example:main. - database str
- Database name slug from
list_databases. Example:app-db. - id str
- The ID of the role
- organization str
- Organization name slug from
list_organizations. Example:acme.
- branch String
- Branch name from
list_branches. Example:main. - database String
- Database name slug from
list_databases. Example:app-db. - id String
- The ID of the role
- organization String
- Organization name slug from
list_organizations. Example:acme.
getPostgresBranchRole Result
The following output properties are available:
- Access
Host stringUrl - The database connection string
- Actor
Data GetPostgres Branch Role Actor Data - Branch string
- Branch name from
list_branches. Example:main. - Branch
Data GetPostgres Branch Role Branch Data - Created
At string - When the role was created
- Database string
- Database name slug from
list_databases. Example:app-db. - Database
Name string - The database name
- Default bool
- Whether the role is the default postgres user
- Deleted
At string - When the role was deleted
- Disabled
At string - When the role was disabled
- Drop
Failed string - Error message available when dropping the role fails
- Dropped
At string - When the role was dropped
- Expired bool
- True if the credentials are expired
- Expires
At string - When the role expires
- Id string
- The ID of the role
- Inherited
Roles List<string> - Database roles these credentials inherit
- Name string
- The name of the role
- Organization string
- Organization name slug from
list_organizations. Example:acme. - Private
Access stringHost Url - The database connection string for private connections
- Private
Connection stringService Name - The service name to set up private connectivity
- Query
Safety GetSettings Postgres Branch Role Query Safety Settings - Ttl double
- Number of seconds before the credentials expire
- Updated
At string - When the role was updated
- Username string
- The database user name
- Access
Host stringUrl - The database connection string
- Actor
Data GetPostgres Branch Role Actor Data - Branch string
- Branch name from
list_branches. Example:main. - Branch
Data GetPostgres Branch Role Branch Data - Created
At string - When the role was created
- Database string
- Database name slug from
list_databases. Example:app-db. - Database
Name string - The database name
- Default bool
- Whether the role is the default postgres user
- Deleted
At string - When the role was deleted
- Disabled
At string - When the role was disabled
- Drop
Failed string - Error message available when dropping the role fails
- Dropped
At string - When the role was dropped
- Expired bool
- True if the credentials are expired
- Expires
At string - When the role expires
- Id string
- The ID of the role
- Inherited
Roles []string - Database roles these credentials inherit
- Name string
- The name of the role
- Organization string
- Organization name slug from
list_organizations. Example:acme. - Private
Access stringHost Url - The database connection string for private connections
- Private
Connection stringService Name - The service name to set up private connectivity
- Query
Safety GetSettings Postgres Branch Role Query Safety Settings - Ttl float64
- Number of seconds before the credentials expire
- Updated
At string - When the role was updated
- Username string
- The database user name
- access
Host StringUrl - The database connection string
- actor
Data GetPostgres Branch Role Actor Data - branch String
- Branch name from
list_branches. Example:main. - branch
Data GetPostgres Branch Role Branch Data - created
At String - When the role was created
- database String
- Database name slug from
list_databases. Example:app-db. - database
Name String - The database name
- default_ Boolean
- Whether the role is the default postgres user
- deleted
At String - When the role was deleted
- disabled
At String - When the role was disabled
- drop
Failed String - Error message available when dropping the role fails
- dropped
At String - When the role was dropped
- expired Boolean
- True if the credentials are expired
- expires
At String - When the role expires
- id String
- The ID of the role
- inherited
Roles List<String> - Database roles these credentials inherit
- name String
- The name of the role
- organization String
- Organization name slug from
list_organizations. Example:acme. - private
Access StringHost Url - The database connection string for private connections
- private
Connection StringService Name - The service name to set up private connectivity
- query
Safety GetSettings Postgres Branch Role Query Safety Settings - ttl Double
- Number of seconds before the credentials expire
- updated
At String - When the role was updated
- username String
- The database user name
- access
Host stringUrl - The database connection string
- actor
Data GetPostgres Branch Role Actor Data - branch string
- Branch name from
list_branches. Example:main. - branch
Data GetPostgres Branch Role Branch Data - created
At string - When the role was created
- database string
- Database name slug from
list_databases. Example:app-db. - database
Name string - The database name
- default boolean
- Whether the role is the default postgres user
- deleted
At string - When the role was deleted
- disabled
At string - When the role was disabled
- drop
Failed string - Error message available when dropping the role fails
- dropped
At string - When the role was dropped
- expired boolean
- True if the credentials are expired
- expires
At string - When the role expires
- id string
- The ID of the role
- inherited
Roles string[] - Database roles these credentials inherit
- name string
- The name of the role
- organization string
- Organization name slug from
list_organizations. Example:acme. - private
Access stringHost Url - The database connection string for private connections
- private
Connection stringService Name - The service name to set up private connectivity
- query
Safety GetSettings Postgres Branch Role Query Safety Settings - ttl number
- Number of seconds before the credentials expire
- updated
At string - When the role was updated
- username string
- The database user name
- access_
host_ strurl - The database connection string
- actor_
data GetPostgres Branch Role Actor Data - branch str
- Branch name from
list_branches. Example:main. - branch_
data GetPostgres Branch Role Branch Data - created_
at str - When the role was created
- database str
- Database name slug from
list_databases. Example:app-db. - database_
name str - The database name
- default bool
- Whether the role is the default postgres user
- deleted_
at str - When the role was deleted
- disabled_
at str - When the role was disabled
- drop_
failed str - Error message available when dropping the role fails
- dropped_
at str - When the role was dropped
- expired bool
- True if the credentials are expired
- expires_
at str - When the role expires
- id str
- The ID of the role
- inherited_
roles Sequence[str] - Database roles these credentials inherit
- name str
- The name of the role
- organization str
- Organization name slug from
list_organizations. Example:acme. - private_
access_ strhost_ url - The database connection string for private connections
- private_
connection_ strservice_ name - The service name to set up private connectivity
- query_
safety_ Getsettings Postgres Branch Role Query Safety Settings - ttl float
- Number of seconds before the credentials expire
- updated_
at str - When the role was updated
- username str
- The database user name
- access
Host StringUrl - The database connection string
- actor
Data Property Map - branch String
- Branch name from
list_branches. Example:main. - branch
Data Property Map - created
At String - When the role was created
- database String
- Database name slug from
list_databases. Example:app-db. - database
Name String - The database name
- default Boolean
- Whether the role is the default postgres user
- deleted
At String - When the role was deleted
- disabled
At String - When the role was disabled
- drop
Failed String - Error message available when dropping the role fails
- dropped
At String - When the role was dropped
- expired Boolean
- True if the credentials are expired
- expires
At String - When the role expires
- id String
- The ID of the role
- inherited
Roles List<String> - Database roles these credentials inherit
- name String
- The name of the role
- organization String
- Organization name slug from
list_organizations. Example:acme. - private
Access StringHost Url - The database connection string for private connections
- private
Connection StringService Name - The service name to set up private connectivity
- query
Safety Property MapSettings - ttl Number
- Number of seconds before the credentials expire
- updated
At String - When the role was updated
- username String
- The database user name
Supporting Types
GetPostgresBranchRoleActorData
- Avatar
Url string - The URL of the actor's avatar
- Display
Name string - The name of the actor
- Id string
- The ID of the actor
- Avatar
Url string - The URL of the actor's avatar
- Display
Name string - The name of the actor
- Id string
- The ID of the actor
- avatar
Url String - The URL of the actor's avatar
- display
Name String - The name of the actor
- id String
- The ID of the actor
- avatar
Url string - The URL of the actor's avatar
- display
Name string - The name of the actor
- id string
- The ID of the actor
- avatar_
url str - The URL of the actor's avatar
- display_
name str - The name of the actor
- id str
- The ID of the actor
- avatar
Url String - The URL of the actor's avatar
- display
Name String - The name of the actor
- id String
- The ID of the actor
GetPostgresBranchRoleBranchData
- deleted_
at str - When the resource was deleted, if deleted
- id str
- The ID for the resource
- name str
- The name for the resource
GetPostgresBranchRoleQuerySafetySettings
- Require
Where stringOn Delete - Require WHERE clause on DELETE statements
- Require
Where stringOn Update - Require WHERE clause on UPDATE statements
- Require
Where stringOn Delete - Require WHERE clause on DELETE statements
- Require
Where stringOn Update - Require WHERE clause on UPDATE statements
- require
Where StringOn Delete - Require WHERE clause on DELETE statements
- require
Where StringOn Update - Require WHERE clause on UPDATE statements
- require
Where stringOn Delete - Require WHERE clause on DELETE statements
- require
Where stringOn Update - Require WHERE clause on UPDATE statements
- require_
where_ stron_ delete - Require WHERE clause on DELETE statements
- require_
where_ stron_ update - Require WHERE clause on UPDATE statements
- require
Where StringOn Delete - Require WHERE clause on DELETE statements
- require
Where StringOn Update - Require WHERE clause on UPDATE statements
Package Details
- Repository
- planetscale planetscale/terraform-provider-planetscale
- License
- Notes
- This Pulumi package is based on the
planetscaleTerraform Provider.
Viewing docs for planetscale 1.0.0
published on Monday, Mar 2, 2026 by planetscale
published on Monday, Mar 2, 2026 by planetscale
