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
PostgresBranchRoles DataSource
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as planetscale from "@pulumi/planetscale";
const myPostgresbranchroles = planetscale.getPostgresBranchRoles({
branch: "...my_branch...",
database: "...my_database...",
organization: "...my_organization...",
});
import pulumi
import pulumi_planetscale as planetscale
my_postgresbranchroles = planetscale.get_postgres_branch_roles(branch="...my_branch...",
database="...my_database...",
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.GetPostgresBranchRoles(ctx, &planetscale.GetPostgresBranchRolesArgs{
Branch: "...my_branch...",
Database: "...my_database...",
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 myPostgresbranchroles = Planetscale.GetPostgresBranchRoles.Invoke(new()
{
Branch = "...my_branch...",
Database = "...my_database...",
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.GetPostgresBranchRolesArgs;
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 myPostgresbranchroles = PlanetscaleFunctions.getPostgresBranchRoles(GetPostgresBranchRolesArgs.builder()
.branch("...my_branch...")
.database("...my_database...")
.organization("...my_organization...")
.build());
}
}
variables:
myPostgresbranchroles:
fn::invoke:
function: planetscale:getPostgresBranchRoles
arguments:
branch: '...my_branch...'
database: '...my_database...'
organization: '...my_organization...'
Using getPostgresBranchRoles
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 getPostgresBranchRoles(args: GetPostgresBranchRolesArgs, opts?: InvokeOptions): Promise<GetPostgresBranchRolesResult>
function getPostgresBranchRolesOutput(args: GetPostgresBranchRolesOutputArgs, opts?: InvokeOptions): Output<GetPostgresBranchRolesResult>def get_postgres_branch_roles(branch: Optional[str] = None,
database: Optional[str] = None,
organization: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetPostgresBranchRolesResult
def get_postgres_branch_roles_output(branch: Optional[pulumi.Input[str]] = None,
database: Optional[pulumi.Input[str]] = None,
organization: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetPostgresBranchRolesResult]func GetPostgresBranchRoles(ctx *Context, args *GetPostgresBranchRolesArgs, opts ...InvokeOption) (*GetPostgresBranchRolesResult, error)
func GetPostgresBranchRolesOutput(ctx *Context, args *GetPostgresBranchRolesOutputArgs, opts ...InvokeOption) GetPostgresBranchRolesResultOutput> Note: This function is named GetPostgresBranchRoles in the Go SDK.
public static class GetPostgresBranchRoles
{
public static Task<GetPostgresBranchRolesResult> InvokeAsync(GetPostgresBranchRolesArgs args, InvokeOptions? opts = null)
public static Output<GetPostgresBranchRolesResult> Invoke(GetPostgresBranchRolesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetPostgresBranchRolesResult> getPostgresBranchRoles(GetPostgresBranchRolesArgs args, InvokeOptions options)
public static Output<GetPostgresBranchRolesResult> getPostgresBranchRoles(GetPostgresBranchRolesArgs args, InvokeOptions options)
fn::invoke:
function: planetscale:index/getPostgresBranchRoles:getPostgresBranchRoles
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. - 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. - 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. - 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. - 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. - 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. - organization String
- Organization name slug from
list_organizations. Example:acme.
getPostgresBranchRoles Result
The following output properties are available:
- Branch string
- Branch name from
list_branches. Example:main. - Database string
- Database name slug from
list_databases. Example:app-db. - Datas
List<Get
Postgres Branch Roles Data> - Id string
- The provider-assigned unique ID for this managed resource.
- 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. - Datas
[]Get
Postgres Branch Roles Data - Id string
- The provider-assigned unique ID for this managed resource.
- 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. - datas
List<Get
Postgres Branch Roles Data> - id String
- The provider-assigned unique ID for this managed resource.
- 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. - datas
Get
Postgres Branch Roles Data[] - id string
- The provider-assigned unique ID for this managed resource.
- 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. - datas
Sequence[Get
Postgres Branch Roles Data] - id str
- The provider-assigned unique ID for this managed resource.
- 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. - datas List<Property Map>
- id String
- The provider-assigned unique ID for this managed resource.
- organization String
- Organization name slug from
list_organizations. Example:acme.
Supporting Types
GetPostgresBranchRolesData
- Access
Host stringUrl - The database connection string
- Actor
Get
Postgres Branch Roles Data Actor - Branch
Get
Postgres Branch Roles Data Branch - Created
At string - When the role was created
- 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
- Password string
- The plain text password, available only after create
- 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 Roles Data 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
Get
Postgres Branch Roles Data Actor - Branch
Get
Postgres Branch Roles Data Branch - Created
At string - When the role was created
- 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
- Password string
- The plain text password, available only after create
- 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 Roles Data 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
Get
Postgres Branch Roles Data Actor - branch
Get
Postgres Branch Roles Data Branch - created
At String - When the role was created
- 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
- password String
- The plain text password, available only after create
- 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 Roles Data 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
Get
Postgres Branch Roles Data Actor - branch
Get
Postgres Branch Roles Data Branch - created
At string - When the role was created
- 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
- password string
- The plain text password, available only after create
- 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 Roles Data 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
Get
Postgres Branch Roles Data Actor - branch
Get
Postgres Branch Roles Data Branch - created_
at str - When the role was created
- 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
- password str
- The plain text password, available only after create
- 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 Roles Data 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 Property Map
- branch Property Map
- created
At String - When the role was created
- 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
- password String
- The plain text password, available only after create
- 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
GetPostgresBranchRolesDataActor
- 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
GetPostgresBranchRolesDataBranch
- created_
at str - When the resource was created
- deleted_
at str - When the resource was deleted, if deleted
- id str
- The ID for the resource
- name str
- The name for the resource
- updated_
at str - When the resource was last updated
GetPostgresBranchRolesDataQuerySafetySettings
- 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
