planetscale 0.5.0 published on Saturday, Apr 5, 2025 by planetscale
planetscale.getDatabases
Explore with Pulumi AI
planetscale 0.5.0 published on Saturday, Apr 5, 2025 by planetscale
A list of PlanetScale databases.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as planetscale from "@pulumi/planetscale";
const example = planetscale.getDatabases({
organization: "example",
});
export const dbs = example;
import pulumi
import pulumi_planetscale as planetscale
example = planetscale.get_databases(organization="example")
pulumi.export("dbs", 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.GetDatabases(ctx, &planetscale.GetDatabasesArgs{
Organization: "example",
}, nil)
if err != nil {
return err
}
ctx.Export("dbs", example)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Planetscale = Pulumi.Planetscale;
return await Deployment.RunAsync(() =>
{
var example = Planetscale.GetDatabases.Invoke(new()
{
Organization = "example",
});
return new Dictionary<string, object?>
{
["dbs"] = 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.GetDatabasesArgs;
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.getDatabases(GetDatabasesArgs.builder()
.organization("example")
.build());
ctx.export("dbs", example.applyValue(getDatabasesResult -> getDatabasesResult));
}
}
variables:
example:
fn::invoke:
function: planetscale:getDatabases
arguments:
organization: example
outputs:
dbs: ${example}
Using getDatabases
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 getDatabases(args: GetDatabasesArgs, opts?: InvokeOptions): Promise<GetDatabasesResult>
function getDatabasesOutput(args: GetDatabasesOutputArgs, opts?: InvokeOptions): Output<GetDatabasesResult>
def get_databases(organization: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetDatabasesResult
def get_databases_output(organization: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetDatabasesResult]
func GetDatabases(ctx *Context, args *GetDatabasesArgs, opts ...InvokeOption) (*GetDatabasesResult, error)
func GetDatabasesOutput(ctx *Context, args *GetDatabasesOutputArgs, opts ...InvokeOption) GetDatabasesResultOutput
> Note: This function is named GetDatabases
in the Go SDK.
public static class GetDatabases
{
public static Task<GetDatabasesResult> InvokeAsync(GetDatabasesArgs args, InvokeOptions? opts = null)
public static Output<GetDatabasesResult> Invoke(GetDatabasesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetDatabasesResult> getDatabases(GetDatabasesArgs args, InvokeOptions options)
public static Output<GetDatabasesResult> getDatabases(GetDatabasesArgs args, InvokeOptions options)
fn::invoke:
function: planetscale:index/getDatabases:getDatabases
arguments:
# arguments dictionary
The following arguments are supported:
- Organization
This property is required. string
- Organization
This property is required. string
- organization
This property is required. String
- organization
This property is required. string
- organization
This property is required. str
- organization
This property is required. String
getDatabases Result
The following output properties are available:
- Databases
List<Get
Databases Database> - Id string
- The provider-assigned unique ID for this managed resource.
- Organization string
- Databases
[]Get
Databases Database - Id string
- The provider-assigned unique ID for this managed resource.
- Organization string
- databases
List<Get
Databases Database> - id String
- The provider-assigned unique ID for this managed resource.
- organization String
- databases
Get
Databases Database[] - id string
- The provider-assigned unique ID for this managed resource.
- organization string
- databases
Sequence[Get
Databases Database] - id str
- The provider-assigned unique ID for this managed resource.
- organization str
- databases List<Property Map>
- id String
- The provider-assigned unique ID for this managed resource.
- organization String
Supporting Types
GetDatabasesDatabase
- Allow
Data Branching This property is required. bool - Whether seeding branches with data is enabled for all branches.
- At
Backup Restore Branches Limit This property is required. bool - If the database has reached its backup restored branch limit.
- At
Development Branch Limit This property is required. bool - If the database has reached its development branch limit.
- Automatic
Migrations This property is required. bool - Whether to automatically manage Rails migrations during deploy requests.
- Branches
Count This property is required. double - The total number of database branches.
- Branches
Url This property is required. string - The URL to retrieve this database's branches via the API.
- Created
At This property is required. string - When the database was created.
- Default
Branch This property is required. string - The default branch for the database.
- Default
Branch Read Only Regions Count This property is required. double - Number of read only regions in the default branch.
- Default
Branch Shard Count This property is required. double - Number of shards in the default branch.
- Default
Branch Table Count This property is required. double - Number of tables in the default branch schema.
- Development
Branches Count This property is required. double - The total number of database development branches.
- Html
Url This property is required. string - The total number of database development branches.
- Id
This property is required. string - The ID of the database.
- Insights
Raw Queries This property is required. bool - The URL to see this database's branches in the web UI.
- Issues
Count This property is required. double - The total number of ongoing issues within a database.
- Migration
Framework This property is required. string - Framework used for applying migrations.
- Migration
Table Name This property is required. string - Table name to use for copying schema migration data.
- Multiple
Admins Required For Deletion This property is required. bool - If the database requires multiple admins for deletion.
- Name
This property is required. string - The name of this database.
- Organization
This property is required. string - The organization this database belongs to.
- Plan
This property is required. string - The database plan.
- Production
Branch Web Console This property is required. bool - Whether web console is enabled for production branches.
- Production
Branches Count This property is required. double - The total number of database production branches.
- Ready
This property is required. bool - If the database is ready to be used.
- Region
This property is required. GetDatabases Database Region - The region the database lives in.
- Require
Approval For Deploy This property is required. bool - Whether an approval is required to deploy schema changes to this database.
- Restrict
Branch Region This property is required. bool - Whether to restrict branch creation to one region.
- Schema
Last Updated At This property is required. string - When the default branch schema was last changed.
This property is required. bool- If the database is sharded.
- State
This property is required. string - State of the database.
- Updated
At This property is required. string - When the database was last updated.
- Url
This property is required. string - The URL to the database API endpoint.
- Data
Import GetDatabases Database Data Import - If the database was created from an import, describes the import process.
- Allow
Data Branching This property is required. bool - Whether seeding branches with data is enabled for all branches.
- At
Backup Restore Branches Limit This property is required. bool - If the database has reached its backup restored branch limit.
- At
Development Branch Limit This property is required. bool - If the database has reached its development branch limit.
- Automatic
Migrations This property is required. bool - Whether to automatically manage Rails migrations during deploy requests.
- Branches
Count This property is required. float64 - The total number of database branches.
- Branches
Url This property is required. string - The URL to retrieve this database's branches via the API.
- Created
At This property is required. string - When the database was created.
- Default
Branch This property is required. string - The default branch for the database.
- Default
Branch Read Only Regions Count This property is required. float64 - Number of read only regions in the default branch.
- Default
Branch Shard Count This property is required. float64 - Number of shards in the default branch.
- Default
Branch Table Count This property is required. float64 - Number of tables in the default branch schema.
- Development
Branches Count This property is required. float64 - The total number of database development branches.
- Html
Url This property is required. string - The total number of database development branches.
- Id
This property is required. string - The ID of the database.
- Insights
Raw Queries This property is required. bool - The URL to see this database's branches in the web UI.
- Issues
Count This property is required. float64 - The total number of ongoing issues within a database.
- Migration
Framework This property is required. string - Framework used for applying migrations.
- Migration
Table Name This property is required. string - Table name to use for copying schema migration data.
- Multiple
Admins Required For Deletion This property is required. bool - If the database requires multiple admins for deletion.
- Name
This property is required. string - The name of this database.
- Organization
This property is required. string - The organization this database belongs to.
- Plan
This property is required. string - The database plan.
- Production
Branch Web Console This property is required. bool - Whether web console is enabled for production branches.
- Production
Branches Count This property is required. float64 - The total number of database production branches.
- Ready
This property is required. bool - If the database is ready to be used.
- Region
This property is required. GetDatabases Database Region - The region the database lives in.
- Require
Approval For Deploy This property is required. bool - Whether an approval is required to deploy schema changes to this database.
- Restrict
Branch Region This property is required. bool - Whether to restrict branch creation to one region.
- Schema
Last Updated At This property is required. string - When the default branch schema was last changed.
This property is required. bool- If the database is sharded.
- State
This property is required. string - State of the database.
- Updated
At This property is required. string - When the database was last updated.
- Url
This property is required. string - The URL to the database API endpoint.
- Data
Import GetDatabases Database Data Import - If the database was created from an import, describes the import process.
- allow
Data Branching This property is required. Boolean - Whether seeding branches with data is enabled for all branches.
- at
Backup Restore Branches Limit This property is required. Boolean - If the database has reached its backup restored branch limit.
- at
Development Branch Limit This property is required. Boolean - If the database has reached its development branch limit.
- automatic
Migrations This property is required. Boolean - Whether to automatically manage Rails migrations during deploy requests.
- branches
Count This property is required. Double - The total number of database branches.
- branches
Url This property is required. String - The URL to retrieve this database's branches via the API.
- created
At This property is required. String - When the database was created.
- default
Branch This property is required. String - The default branch for the database.
- default
Branch Read Only Regions Count This property is required. Double - Number of read only regions in the default branch.
- default
Branch Shard Count This property is required. Double - Number of shards in the default branch.
- default
Branch Table Count This property is required. Double - Number of tables in the default branch schema.
- development
Branches Count This property is required. Double - The total number of database development branches.
- html
Url This property is required. String - The total number of database development branches.
- id
This property is required. String - The ID of the database.
- insights
Raw Queries This property is required. Boolean - The URL to see this database's branches in the web UI.
- issues
Count This property is required. Double - The total number of ongoing issues within a database.
- migration
Framework This property is required. String - Framework used for applying migrations.
- migration
Table Name This property is required. String - Table name to use for copying schema migration data.
- multiple
Admins Required For Deletion This property is required. Boolean - If the database requires multiple admins for deletion.
- name
This property is required. String - The name of this database.
- organization
This property is required. String - The organization this database belongs to.
- plan
This property is required. String - The database plan.
- production
Branch Web Console This property is required. Boolean - Whether web console is enabled for production branches.
- production
Branches Count This property is required. Double - The total number of database production branches.
- ready
This property is required. Boolean - If the database is ready to be used.
- region
This property is required. GetDatabases Database Region - The region the database lives in.
- require
Approval For Deploy This property is required. Boolean - Whether an approval is required to deploy schema changes to this database.
- restrict
Branch Region This property is required. Boolean - Whether to restrict branch creation to one region.
- schema
Last Updated At This property is required. String - When the default branch schema was last changed.
This property is required. Boolean- If the database is sharded.
- state
This property is required. String - State of the database.
- updated
At This property is required. String - When the database was last updated.
- url
This property is required. String - The URL to the database API endpoint.
- data
Import GetDatabases Database Data Import - If the database was created from an import, describes the import process.
- allow
Data Branching This property is required. boolean - Whether seeding branches with data is enabled for all branches.
- at
Backup Restore Branches Limit This property is required. boolean - If the database has reached its backup restored branch limit.
- at
Development Branch Limit This property is required. boolean - If the database has reached its development branch limit.
- automatic
Migrations This property is required. boolean - Whether to automatically manage Rails migrations during deploy requests.
- branches
Count This property is required. number - The total number of database branches.
- branches
Url This property is required. string - The URL to retrieve this database's branches via the API.
- created
At This property is required. string - When the database was created.
- default
Branch This property is required. string - The default branch for the database.
- default
Branch Read Only Regions Count This property is required. number - Number of read only regions in the default branch.
- default
Branch Shard Count This property is required. number - Number of shards in the default branch.
- default
Branch Table Count This property is required. number - Number of tables in the default branch schema.
- development
Branches Count This property is required. number - The total number of database development branches.
- html
Url This property is required. string - The total number of database development branches.
- id
This property is required. string - The ID of the database.
- insights
Raw Queries This property is required. boolean - The URL to see this database's branches in the web UI.
- issues
Count This property is required. number - The total number of ongoing issues within a database.
- migration
Framework This property is required. string - Framework used for applying migrations.
- migration
Table Name This property is required. string - Table name to use for copying schema migration data.
- multiple
Admins Required For Deletion This property is required. boolean - If the database requires multiple admins for deletion.
- name
This property is required. string - The name of this database.
- organization
This property is required. string - The organization this database belongs to.
- plan
This property is required. string - The database plan.
- production
Branch Web Console This property is required. boolean - Whether web console is enabled for production branches.
- production
Branches Count This property is required. number - The total number of database production branches.
- ready
This property is required. boolean - If the database is ready to be used.
- region
This property is required. GetDatabases Database Region - The region the database lives in.
- require
Approval For Deploy This property is required. boolean - Whether an approval is required to deploy schema changes to this database.
- restrict
Branch Region This property is required. boolean - Whether to restrict branch creation to one region.
- schema
Last Updated At This property is required. string - When the default branch schema was last changed.
This property is required. boolean- If the database is sharded.
- state
This property is required. string - State of the database.
- updated
At This property is required. string - When the database was last updated.
- url
This property is required. string - The URL to the database API endpoint.
- data
Import GetDatabases Database Data Import - If the database was created from an import, describes the import process.
- allow_
data_ branching This property is required. bool - Whether seeding branches with data is enabled for all branches.
- at_
backup_ restore_ branches_ limit This property is required. bool - If the database has reached its backup restored branch limit.
- at_
development_ branch_ limit This property is required. bool - If the database has reached its development branch limit.
- automatic_
migrations This property is required. bool - Whether to automatically manage Rails migrations during deploy requests.
- branches_
count This property is required. float - The total number of database branches.
- branches_
url This property is required. str - The URL to retrieve this database's branches via the API.
- created_
at This property is required. str - When the database was created.
- default_
branch This property is required. str - The default branch for the database.
- default_
branch_ read_ only_ regions_ count This property is required. float - Number of read only regions in the default branch.
- default_
branch_ shard_ count This property is required. float - Number of shards in the default branch.
- default_
branch_ table_ count This property is required. float - Number of tables in the default branch schema.
- development_
branches_ count This property is required. float - The total number of database development branches.
- html_
url This property is required. str - The total number of database development branches.
- id
This property is required. str - The ID of the database.
- insights_
raw_ queries This property is required. bool - The URL to see this database's branches in the web UI.
- issues_
count This property is required. float - The total number of ongoing issues within a database.
- migration_
framework This property is required. str - Framework used for applying migrations.
- migration_
table_ name This property is required. str - Table name to use for copying schema migration data.
- multiple_
admins_ required_ for_ deletion This property is required. bool - If the database requires multiple admins for deletion.
- name
This property is required. str - The name of this database.
- organization
This property is required. str - The organization this database belongs to.
- plan
This property is required. str - The database plan.
- production_
branch_ web_ console This property is required. bool - Whether web console is enabled for production branches.
- production_
branches_ count This property is required. float - The total number of database production branches.
- ready
This property is required. bool - If the database is ready to be used.
- region
This property is required. GetDatabases Database Region - The region the database lives in.
- require_
approval_ for_ deploy This property is required. bool - Whether an approval is required to deploy schema changes to this database.
- restrict_
branch_ region This property is required. bool - Whether to restrict branch creation to one region.
- schema_
last_ updated_ at This property is required. str - When the default branch schema was last changed.
This property is required. bool- If the database is sharded.
- state
This property is required. str - State of the database.
- updated_
at This property is required. str - When the database was last updated.
- url
This property is required. str - The URL to the database API endpoint.
- data_
import GetDatabases Database Data Import - If the database was created from an import, describes the import process.
- allow
Data Branching This property is required. Boolean - Whether seeding branches with data is enabled for all branches.
- at
Backup Restore Branches Limit This property is required. Boolean - If the database has reached its backup restored branch limit.
- at
Development Branch Limit This property is required. Boolean - If the database has reached its development branch limit.
- automatic
Migrations This property is required. Boolean - Whether to automatically manage Rails migrations during deploy requests.
- branches
Count This property is required. Number - The total number of database branches.
- branches
Url This property is required. String - The URL to retrieve this database's branches via the API.
- created
At This property is required. String - When the database was created.
- default
Branch This property is required. String - The default branch for the database.
- default
Branch Read Only Regions Count This property is required. Number - Number of read only regions in the default branch.
- default
Branch Shard Count This property is required. Number - Number of shards in the default branch.
- default
Branch Table Count This property is required. Number - Number of tables in the default branch schema.
- development
Branches Count This property is required. Number - The total number of database development branches.
- html
Url This property is required. String - The total number of database development branches.
- id
This property is required. String - The ID of the database.
- insights
Raw Queries This property is required. Boolean - The URL to see this database's branches in the web UI.
- issues
Count This property is required. Number - The total number of ongoing issues within a database.
- migration
Framework This property is required. String - Framework used for applying migrations.
- migration
Table Name This property is required. String - Table name to use for copying schema migration data.
- multiple
Admins Required For Deletion This property is required. Boolean - If the database requires multiple admins for deletion.
- name
This property is required. String - The name of this database.
- organization
This property is required. String - The organization this database belongs to.
- plan
This property is required. String - The database plan.
- production
Branch Web Console This property is required. Boolean - Whether web console is enabled for production branches.
- production
Branches Count This property is required. Number - The total number of database production branches.
- ready
This property is required. Boolean - If the database is ready to be used.
- region
This property is required. Property Map - The region the database lives in.
- require
Approval For Deploy This property is required. Boolean - Whether an approval is required to deploy schema changes to this database.
- restrict
Branch Region This property is required. Boolean - Whether to restrict branch creation to one region.
- schema
Last Updated At This property is required. String - When the default branch schema was last changed.
This property is required. Boolean- If the database is sharded.
- state
This property is required. String - State of the database.
- updated
At This property is required. String - When the database was last updated.
- url
This property is required. String - The URL to the database API endpoint.
- data
Import Property Map - If the database was created from an import, describes the import process.
GetDatabasesDatabaseDataImport
- Data
Source This property is required. GetDatabases Database Data Import Data Source - Connection information for the source of the data for the import.
- Finished
At This property is required. string - When the import finished.
- Import
Check Errors This property is required. string - Errors encountered while preparing the import.
- Started
At This property is required. string - When the import started.
- State
This property is required. string - The state of the import, one of: pending, queued, in_progress, complete, cancelled, error.
- Data
Source This property is required. GetDatabases Database Data Import Data Source - Connection information for the source of the data for the import.
- Finished
At This property is required. string - When the import finished.
- Import
Check Errors This property is required. string - Errors encountered while preparing the import.
- Started
At This property is required. string - When the import started.
- State
This property is required. string - The state of the import, one of: pending, queued, in_progress, complete, cancelled, error.
- data
Source This property is required. GetDatabases Database Data Import Data Source - Connection information for the source of the data for the import.
- finished
At This property is required. String - When the import finished.
- import
Check Errors This property is required. String - Errors encountered while preparing the import.
- started
At This property is required. String - When the import started.
- state
This property is required. String - The state of the import, one of: pending, queued, in_progress, complete, cancelled, error.
- data
Source This property is required. GetDatabases Database Data Import Data Source - Connection information for the source of the data for the import.
- finished
At This property is required. string - When the import finished.
- import
Check Errors This property is required. string - Errors encountered while preparing the import.
- started
At This property is required. string - When the import started.
- state
This property is required. string - The state of the import, one of: pending, queued, in_progress, complete, cancelled, error.
- data_
source This property is required. GetDatabases Database Data Import Data Source - Connection information for the source of the data for the import.
- finished_
at This property is required. str - When the import finished.
- import_
check_ errors This property is required. str - Errors encountered while preparing the import.
- started_
at This property is required. str - When the import started.
- state
This property is required. str - The state of the import, one of: pending, queued, in_progress, complete, cancelled, error.
- data
Source This property is required. Property Map - Connection information for the source of the data for the import.
- finished
At This property is required. String - When the import finished.
- import
Check Errors This property is required. String - Errors encountered while preparing the import.
- started
At This property is required. String - When the import started.
- state
This property is required. String - The state of the import, one of: pending, queued, in_progress, complete, cancelled, error.
GetDatabasesDatabaseDataImportDataSource
GetDatabasesDatabaseRegion
- Display
Name This property is required. string - Name of the region.
- Enabled
This property is required. bool - Whether or not the region is currently active.
- Id
This property is required. string - The ID of the region.
- Location
This property is required. string - Location of the region.
- Provider
This property is required. string - Provider for the region (ex. AWS).
- Public
Ip Addresses This property is required. List<string> - Public IP addresses for the region.
- Slug
This property is required. string - The slug of the region.
- Display
Name This property is required. string - Name of the region.
- Enabled
This property is required. bool - Whether or not the region is currently active.
- Id
This property is required. string - The ID of the region.
- Location
This property is required. string - Location of the region.
- Provider
This property is required. string - Provider for the region (ex. AWS).
- Public
Ip Addresses This property is required. []string - Public IP addresses for the region.
- Slug
This property is required. string - The slug of the region.
- display
Name This property is required. String - Name of the region.
- enabled
This property is required. Boolean - Whether or not the region is currently active.
- id
This property is required. String - The ID of the region.
- location
This property is required. String - Location of the region.
- provider
This property is required. String - Provider for the region (ex. AWS).
- public
Ip Addresses This property is required. List<String> - Public IP addresses for the region.
- slug
This property is required. String - The slug of the region.
- display
Name This property is required. string - Name of the region.
- enabled
This property is required. boolean - Whether or not the region is currently active.
- id
This property is required. string - The ID of the region.
- location
This property is required. string - Location of the region.
- provider
This property is required. string - Provider for the region (ex. AWS).
- public
Ip Addresses This property is required. string[] - Public IP addresses for the region.
- slug
This property is required. string - The slug of the region.
- display_
name This property is required. str - Name of the region.
- enabled
This property is required. bool - Whether or not the region is currently active.
- id
This property is required. str - The ID of the region.
- location
This property is required. str - Location of the region.
- provider
This property is required. str - Provider for the region (ex. AWS).
- public_
ip_ addresses This property is required. Sequence[str] - Public IP addresses for the region.
- slug
This property is required. str - The slug of the region.
- display
Name This property is required. String - Name of the region.
- enabled
This property is required. Boolean - Whether or not the region is currently active.
- id
This property is required. String - The ID of the region.
- location
This property is required. String - Location of the region.
- provider
This property is required. String - Provider for the region (ex. AWS).
- public
Ip Addresses This property is required. List<String> - Public IP addresses for the region.
- slug
This property is required. String - The slug of the region.
Package Details
- Repository
- planetscale planetscale/terraform-provider-planetscale
- License
- Notes
- This Pulumi package is based on the
planetscale
Terraform Provider.
planetscale 0.5.0 published on Saturday, Apr 5, 2025 by planetscale