planetscale 0.4.1 published on Tuesday, Mar 11, 2025 by planetscale
planetscale.getBranchSchema
Explore with Pulumi AI
planetscale 0.4.1 published on Tuesday, Mar 11, 2025 by planetscale
The schema of a PlanetScale branch.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as planetscale from "@pulumi/planetscale";
const example = planetscale.getBranchSchema({
    organization: "example.com",
    database: "example_db",
    branch: "main",
});
export const branchSchema = example;
import pulumi
import pulumi_planetscale as planetscale
example = planetscale.get_branch_schema(organization="example.com",
    database="example_db",
    branch="main")
pulumi.export("branchSchema", 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.GetBranchSchema(ctx, &planetscale.GetBranchSchemaArgs{
			Organization: "example.com",
			Database:     "example_db",
			Branch:       "main",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("branchSchema", example)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Planetscale = Pulumi.Planetscale;
return await Deployment.RunAsync(() => 
{
    var example = Planetscale.GetBranchSchema.Invoke(new()
    {
        Organization = "example.com",
        Database = "example_db",
        Branch = "main",
    });
    return new Dictionary<string, object?>
    {
        ["branchSchema"] = 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.GetBranchSchemaArgs;
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.getBranchSchema(GetBranchSchemaArgs.builder()
            .organization("example.com")
            .database("example_db")
            .branch("main")
            .build());
        ctx.export("branchSchema", example.applyValue(getBranchSchemaResult -> getBranchSchemaResult));
    }
}
variables:
  example:
    fn::invoke:
      function: planetscale:getBranchSchema
      arguments:
        organization: example.com
        database: example_db
        branch: main
outputs:
  branchSchema: ${example}
Using getBranchSchema
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 getBranchSchema(args: GetBranchSchemaArgs, opts?: InvokeOptions): Promise<GetBranchSchemaResult>
function getBranchSchemaOutput(args: GetBranchSchemaOutputArgs, opts?: InvokeOptions): Output<GetBranchSchemaResult>def get_branch_schema(branch: Optional[str] = None,
                      database: Optional[str] = None,
                      keyspace: Optional[str] = None,
                      organization: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetBranchSchemaResult
def get_branch_schema_output(branch: Optional[pulumi.Input[str]] = None,
                      database: Optional[pulumi.Input[str]] = None,
                      keyspace: Optional[pulumi.Input[str]] = None,
                      organization: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetBranchSchemaResult]func GetBranchSchema(ctx *Context, args *GetBranchSchemaArgs, opts ...InvokeOption) (*GetBranchSchemaResult, error)
func GetBranchSchemaOutput(ctx *Context, args *GetBranchSchemaOutputArgs, opts ...InvokeOption) GetBranchSchemaResultOutput> Note: This function is named GetBranchSchema in the Go SDK.
public static class GetBranchSchema 
{
    public static Task<GetBranchSchemaResult> InvokeAsync(GetBranchSchemaArgs args, InvokeOptions? opts = null)
    public static Output<GetBranchSchemaResult> Invoke(GetBranchSchemaInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetBranchSchemaResult> getBranchSchema(GetBranchSchemaArgs args, InvokeOptions options)
public static Output<GetBranchSchemaResult> getBranchSchema(GetBranchSchemaArgs args, InvokeOptions options)
fn::invoke:
  function: planetscale:index/getBranchSchema:getBranchSchema
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Branch string
- Database string
- Organization string
- Keyspace string
- Branch string
- Database string
- Organization string
- Keyspace string
- branch String
- database String
- organization String
- keyspace String
- branch string
- database string
- organization string
- keyspace string
- branch str
- database str
- organization str
- keyspace str
- branch String
- database String
- organization String
- keyspace String
getBranchSchema Result
The following output properties are available:
- Branch string
- Database string
- Id string
- The provider-assigned unique ID for this managed resource.
- Organization string
- Tables
List<GetBranch Schema Table> 
- Keyspace string
- Branch string
- Database string
- Id string
- The provider-assigned unique ID for this managed resource.
- Organization string
- Tables
[]GetBranch Schema Table 
- Keyspace string
- branch String
- database String
- id String
- The provider-assigned unique ID for this managed resource.
- organization String
- tables
List<GetBranch Schema Table> 
- keyspace String
- branch string
- database string
- id string
- The provider-assigned unique ID for this managed resource.
- organization string
- tables
GetBranch Schema Table[] 
- keyspace string
- branch str
- database str
- id str
- The provider-assigned unique ID for this managed resource.
- organization str
- tables
Sequence[GetBranch Schema Table] 
- keyspace str
- branch String
- database String
- id String
- The provider-assigned unique ID for this managed resource.
- organization String
- tables List<Property Map>
- keyspace String
Supporting Types
GetBranchSchemaTable   
Package Details
- Repository
- planetscale planetscale/terraform-provider-planetscale
- License
- Notes
- This Pulumi package is based on the planetscaleTerraform Provider.
planetscale 0.4.1 published on Tuesday, Mar 11, 2025 by planetscale