planetscale 0.6.0 published on Sunday, Apr 27, 2025 by planetscale
planetscale.getBranches
planetscale 0.6.0 published on Sunday, Apr 27, 2025 by planetscale
A list of PlanetScale branches.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as planetscale from "@pulumi/planetscale";
const example = planetscale.getBranches({
    organization: "example.com",
    database: "example_db",
});
export const branches = example;
import pulumi
import pulumi_planetscale as planetscale
example = planetscale.get_branches(organization="example.com",
    database="example_db")
pulumi.export("branches", example)
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 {
		example, err := planetscale.GetBranches(ctx, &planetscale.GetBranchesArgs{
			Organization: "example.com",
			Database:     "example_db",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("branches", example)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Planetscale = Pulumi.Planetscale;
return await Deployment.RunAsync(() => 
{
    var example = Planetscale.GetBranches.Invoke(new()
    {
        Organization = "example.com",
        Database = "example_db",
    });
    return new Dictionary<string, object?>
    {
        ["branches"] = example,
    };
});
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.GetBranchesArgs;
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 = PlanetscaleFunctions.getBranches(GetBranchesArgs.builder()
            .organization("example.com")
            .database("example_db")
            .build());
        ctx.export("branches", example.applyValue(getBranchesResult -> getBranchesResult));
    }
}
variables:
  example:
    fn::invoke:
      function: planetscale:getBranches
      arguments:
        organization: example.com
        database: example_db
outputs:
  branches: ${example}
Using getBranches
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 getBranches(args: GetBranchesArgs, opts?: InvokeOptions): Promise<GetBranchesResult>
function getBranchesOutput(args: GetBranchesOutputArgs, opts?: InvokeOptions): Output<GetBranchesResult>def get_branches(database: Optional[str] = None,
                 organization: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetBranchesResult
def get_branches_output(database: Optional[pulumi.Input[str]] = None,
                 organization: Optional[pulumi.Input[str]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetBranchesResult]func GetBranches(ctx *Context, args *GetBranchesArgs, opts ...InvokeOption) (*GetBranchesResult, error)
func GetBranchesOutput(ctx *Context, args *GetBranchesOutputArgs, opts ...InvokeOption) GetBranchesResultOutput> Note: This function is named GetBranches in the Go SDK.
public static class GetBranches 
{
    public static Task<GetBranchesResult> InvokeAsync(GetBranchesArgs args, InvokeOptions? opts = null)
    public static Output<GetBranchesResult> Invoke(GetBranchesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetBranchesResult> getBranches(GetBranchesArgs args, InvokeOptions options)
public static Output<GetBranchesResult> getBranches(GetBranchesArgs args, InvokeOptions options)
fn::invoke:
  function: planetscale:index/getBranches:getBranches
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Database string
- Organization string
- Database string
- Organization string
- database String
- organization String
- database string
- organization string
- database str
- organization str
- database String
- organization String
getBranches Result
The following output properties are available:
- Branches
List<GetBranches Branch> 
- Database string
- Id string
- The provider-assigned unique ID for this managed resource.
- Organization string
- Branches
[]GetBranches Branch 
- Database string
- Id string
- The provider-assigned unique ID for this managed resource.
- Organization string
- branches
List<GetBranches Branch> 
- database String
- id String
- The provider-assigned unique ID for this managed resource.
- organization String
- branches
GetBranches Branch[] 
- database string
- id string
- The provider-assigned unique ID for this managed resource.
- organization string
- branches
Sequence[GetBranches Branch] 
- database str
- id str
- The provider-assigned unique ID for this managed resource.
- organization str
- branches List<Property Map>
- database String
- id String
- The provider-assigned unique ID for this managed resource.
- organization String
Supporting Types
GetBranchesBranch  
- AccessHost stringUrl 
- The access host URL for the branch. This is a legacy field, use mysql_edge_address.
- Actor
GetBranches Branch Actor 
- The actor who created this branch.
- ClusterRate stringName 
- The SKU representing the branch's cluster size.
- CreatedAt string
- When the branch was created.
- Database string
- The database this branch belongs to.
- HtmlUrl string
- Planetscale app URL for the branch.
- Id string
- The ID of the branch.
- InitialRestore stringId 
- The ID of the backup from which the branch was restored.
- MysqlAddress string
- The MySQL address for the branch.
- MysqlEdge stringAddress 
- The address of the MySQL provider for the branch.
- Name string
- The name of the branch.
- Organization string
- The organization this branch belongs to.
- ParentBranch string
- The name of the parent branch from which the branch was created.
- Production bool
- Whether or not the branch is a production branch.
- Ready bool
- Whether or not the branch is ready to serve queries.
- Region
GetBranches Branch Region 
- The region in which this branch lives.
- RestoreChecklist stringCompleted At 
- When a user last marked a backup restore checklist as completed.
- RestoredFrom GetBranch Branches Branch Restored From Branch 
- SafeMigrations bool
- Whether safe migrations are enabled for this branch.
- SchemaLast stringUpdated At 
- When the schema for the branch was last updated.
- double
- The number of shards in the branch.
- bool
- Whether or not the branch is sharded.
- UpdatedAt string
- When the branch was last updated.
- AccessHost stringUrl 
- The access host URL for the branch. This is a legacy field, use mysql_edge_address.
- Actor
GetBranches Branch Actor 
- The actor who created this branch.
- ClusterRate stringName 
- The SKU representing the branch's cluster size.
- CreatedAt string
- When the branch was created.
- Database string
- The database this branch belongs to.
- HtmlUrl string
- Planetscale app URL for the branch.
- Id string
- The ID of the branch.
- InitialRestore stringId 
- The ID of the backup from which the branch was restored.
- MysqlAddress string
- The MySQL address for the branch.
- MysqlEdge stringAddress 
- The address of the MySQL provider for the branch.
- Name string
- The name of the branch.
- Organization string
- The organization this branch belongs to.
- ParentBranch string
- The name of the parent branch from which the branch was created.
- Production bool
- Whether or not the branch is a production branch.
- Ready bool
- Whether or not the branch is ready to serve queries.
- Region
GetBranches Branch Region 
- The region in which this branch lives.
- RestoreChecklist stringCompleted At 
- When a user last marked a backup restore checklist as completed.
- RestoredFrom GetBranch Branches Branch Restored From Branch 
- SafeMigrations bool
- Whether safe migrations are enabled for this branch.
- SchemaLast stringUpdated At 
- When the schema for the branch was last updated.
- float64
- The number of shards in the branch.
- bool
- Whether or not the branch is sharded.
- UpdatedAt string
- When the branch was last updated.
- accessHost StringUrl 
- The access host URL for the branch. This is a legacy field, use mysql_edge_address.
- actor
GetBranches Branch Actor 
- The actor who created this branch.
- clusterRate StringName 
- The SKU representing the branch's cluster size.
- createdAt String
- When the branch was created.
- database String
- The database this branch belongs to.
- htmlUrl String
- Planetscale app URL for the branch.
- id String
- The ID of the branch.
- initialRestore StringId 
- The ID of the backup from which the branch was restored.
- mysqlAddress String
- The MySQL address for the branch.
- mysqlEdge StringAddress 
- The address of the MySQL provider for the branch.
- name String
- The name of the branch.
- organization String
- The organization this branch belongs to.
- parentBranch String
- The name of the parent branch from which the branch was created.
- production Boolean
- Whether or not the branch is a production branch.
- ready Boolean
- Whether or not the branch is ready to serve queries.
- region
GetBranches Branch Region 
- The region in which this branch lives.
- restoreChecklist StringCompleted At 
- When a user last marked a backup restore checklist as completed.
- restoredFrom GetBranch Branches Branch Restored From Branch 
- safeMigrations Boolean
- Whether safe migrations are enabled for this branch.
- schemaLast StringUpdated At 
- When the schema for the branch was last updated.
- Double
- The number of shards in the branch.
- Boolean
- Whether or not the branch is sharded.
- updatedAt String
- When the branch was last updated.
- accessHost stringUrl 
- The access host URL for the branch. This is a legacy field, use mysql_edge_address.
- actor
GetBranches Branch Actor 
- The actor who created this branch.
- clusterRate stringName 
- The SKU representing the branch's cluster size.
- createdAt string
- When the branch was created.
- database string
- The database this branch belongs to.
- htmlUrl string
- Planetscale app URL for the branch.
- id string
- The ID of the branch.
- initialRestore stringId 
- The ID of the backup from which the branch was restored.
- mysqlAddress string
- The MySQL address for the branch.
- mysqlEdge stringAddress 
- The address of the MySQL provider for the branch.
- name string
- The name of the branch.
- organization string
- The organization this branch belongs to.
- parentBranch string
- The name of the parent branch from which the branch was created.
- production boolean
- Whether or not the branch is a production branch.
- ready boolean
- Whether or not the branch is ready to serve queries.
- region
GetBranches Branch Region 
- The region in which this branch lives.
- restoreChecklist stringCompleted At 
- When a user last marked a backup restore checklist as completed.
- restoredFrom GetBranch Branches Branch Restored From Branch 
- safeMigrations boolean
- Whether safe migrations are enabled for this branch.
- schemaLast stringUpdated At 
- When the schema for the branch was last updated.
- number
- The number of shards in the branch.
- boolean
- Whether or not the branch is sharded.
- updatedAt string
- When the branch was last updated.
- access_host_ strurl 
- The access host URL for the branch. This is a legacy field, use mysql_edge_address.
- actor
GetBranches Branch Actor 
- The actor who created this branch.
- cluster_rate_ strname 
- The SKU representing the branch's cluster size.
- created_at str
- When the branch was created.
- database str
- The database this branch belongs to.
- html_url str
- Planetscale app URL for the branch.
- id str
- The ID of the branch.
- initial_restore_ strid 
- The ID of the backup from which the branch was restored.
- mysql_address str
- The MySQL address for the branch.
- mysql_edge_ straddress 
- The address of the MySQL provider for the branch.
- name str
- The name of the branch.
- organization str
- The organization this branch belongs to.
- parent_branch str
- The name of the parent branch from which the branch was created.
- production bool
- Whether or not the branch is a production branch.
- ready bool
- Whether or not the branch is ready to serve queries.
- region
GetBranches Branch Region 
- The region in which this branch lives.
- restore_checklist_ strcompleted_ at 
- When a user last marked a backup restore checklist as completed.
- restored_from_ Getbranch Branches Branch Restored From Branch 
- safe_migrations bool
- Whether safe migrations are enabled for this branch.
- schema_last_ strupdated_ at 
- When the schema for the branch was last updated.
- float
- The number of shards in the branch.
- bool
- Whether or not the branch is sharded.
- updated_at str
- When the branch was last updated.
- accessHost StringUrl 
- The access host URL for the branch. This is a legacy field, use mysql_edge_address.
- actor Property Map
- The actor who created this branch.
- clusterRate StringName 
- The SKU representing the branch's cluster size.
- createdAt String
- When the branch was created.
- database String
- The database this branch belongs to.
- htmlUrl String
- Planetscale app URL for the branch.
- id String
- The ID of the branch.
- initialRestore StringId 
- The ID of the backup from which the branch was restored.
- mysqlAddress String
- The MySQL address for the branch.
- mysqlEdge StringAddress 
- The address of the MySQL provider for the branch.
- name String
- The name of the branch.
- organization String
- The organization this branch belongs to.
- parentBranch String
- The name of the parent branch from which the branch was created.
- production Boolean
- Whether or not the branch is a production branch.
- ready Boolean
- Whether or not the branch is ready to serve queries.
- region Property Map
- The region in which this branch lives.
- restoreChecklist StringCompleted At 
- When a user last marked a backup restore checklist as completed.
- restoredFrom Property MapBranch 
- safeMigrations Boolean
- Whether safe migrations are enabled for this branch.
- schemaLast StringUpdated At 
- When the schema for the branch was last updated.
- Number
- The number of shards in the branch.
- Boolean
- Whether or not the branch is sharded.
- updatedAt String
- When the branch was last updated.
GetBranchesBranchActor   
- AvatarUrl string
- The URL of the actor's avatar
- DisplayName string
- The name of the actor
- Id string
- The ID of the actor
- AvatarUrl string
- The URL of the actor's avatar
- DisplayName string
- The name of the actor
- Id string
- The ID of the actor
- avatarUrl String
- The URL of the actor's avatar
- displayName String
- The name of the actor
- id String
- The ID of the actor
- avatarUrl string
- The URL of the actor's avatar
- displayName 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
- avatarUrl String
- The URL of the actor's avatar
- displayName String
- The name of the actor
- id String
- The ID of the actor
GetBranchesBranchRegion   
- DisplayName string
- Name of the region.
- Enabled bool
- Whether or not the region is currently active.
- Id string
- The ID of the region.
- Location string
- Location of the region.
- Provider string
- Provider for the region (ex. AWS).
- PublicIp List<string>Addresses 
- Public IP addresses for the region.
- Slug string
- The slug of the region.
- DisplayName string
- Name of the region.
- Enabled bool
- Whether or not the region is currently active.
- Id string
- The ID of the region.
- Location string
- Location of the region.
- Provider string
- Provider for the region (ex. AWS).
- PublicIp []stringAddresses 
- Public IP addresses for the region.
- Slug string
- The slug of the region.
- displayName String
- Name of the region.
- enabled Boolean
- Whether or not the region is currently active.
- id String
- The ID of the region.
- location String
- Location of the region.
- provider String
- Provider for the region (ex. AWS).
- publicIp List<String>Addresses 
- Public IP addresses for the region.
- slug String
- The slug of the region.
- displayName string
- Name of the region.
- enabled boolean
- Whether or not the region is currently active.
- id string
- The ID of the region.
- location string
- Location of the region.
- provider string
- Provider for the region (ex. AWS).
- publicIp string[]Addresses 
- Public IP addresses for the region.
- slug string
- The slug of the region.
- display_name str
- Name of the region.
- enabled bool
- Whether or not the region is currently active.
- id str
- The ID of the region.
- location str
- Location of the region.
- provider str
- Provider for the region (ex. AWS).
- public_ip_ Sequence[str]addresses 
- Public IP addresses for the region.
- slug str
- The slug of the region.
- displayName String
- Name of the region.
- enabled Boolean
- Whether or not the region is currently active.
- id String
- The ID of the region.
- location String
- Location of the region.
- provider String
- Provider for the region (ex. AWS).
- publicIp List<String>Addresses 
- Public IP addresses for the region.
- slug String
- The slug of the region.
GetBranchesBranchRestoredFromBranch     
- 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.
Package Details
- Repository
- planetscale planetscale/terraform-provider-planetscale
- License
- Notes
- This Pulumi package is based on the planetscaleTerraform Provider.
planetscale 0.6.0 published on Sunday, Apr 27, 2025 by planetscale
