Volcengine v0.0.38 published on Friday, Oct 31, 2025 by Volcengine
Volcengine v0.0.38 published on Friday, Oct 31, 2025 by Volcengine
Use this data source to query detailed information of rds postgresql schemas
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@pulumi/volcengine";
import * as volcengine from "@volcengine/pulumi";
const fooZones = volcengine.ecs.getZones({});
const fooVpc = new volcengine.vpc.Vpc("fooVpc", {
vpcName: "acc-test-project1",
cidrBlock: "172.16.0.0/16",
});
const fooSubnet = new volcengine.vpc.Subnet("fooSubnet", {
subnetName: "acc-subnet-test-2",
cidrBlock: "172.16.0.0/24",
zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id),
vpcId: fooVpc.id,
});
const fooInstance = new volcengine.rds_postgresql.Instance("fooInstance", {
dbEngineVersion: "PostgreSQL_12",
nodeSpec: "rds.postgres.1c2g",
primaryZoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id),
secondaryZoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id),
storageSpace: 40,
subnetId: fooSubnet.id,
instanceName: "acc-test-1",
chargeInfo: {
chargeType: "PostPaid",
},
projectName: "default",
tags: [{
key: "tfk1",
value: "tfv1",
}],
parameters: [
{
name: "auto_explain.log_analyze",
value: "off",
},
{
name: "auto_explain.log_format",
value: "text",
},
],
});
const fooDatabase = new volcengine.rds_postgresql.Database("fooDatabase", {
dbName: "acc-test",
instanceId: fooInstance.id,
cType: "C",
collate: "zh_CN.utf8",
});
const fooAccount = new volcengine.rds_postgresql.Account("fooAccount", {
accountName: "acc-test-account",
accountPassword: "9wc@********12",
accountType: "Normal",
instanceId: fooInstance.id,
accountPrivileges: "Inherit,Login,CreateRole,CreateDB",
});
const foo1 = new volcengine.rds_postgresql.Account("foo1", {
accountName: "acc-test-account1",
accountPassword: "9wc@*******12",
accountType: "Normal",
instanceId: fooInstance.id,
accountPrivileges: "Inherit,Login,CreateRole,CreateDB",
});
const fooSchema = new volcengine.rds_postgresql.Schema("fooSchema", {
dbName: fooDatabase.dbName,
instanceId: fooInstance.id,
owner: fooAccount.accountName,
schemaName: "acc-test-schema",
});
const fooSchemas = volcengine.rds_postgresql.getSchemasOutput({
dbName: fooSchema.dbName,
instanceId: fooInstance.id,
});
import pulumi
import pulumi_volcengine as volcengine
foo_zones = volcengine.ecs.get_zones()
foo_vpc = volcengine.vpc.Vpc("fooVpc",
vpc_name="acc-test-project1",
cidr_block="172.16.0.0/16")
foo_subnet = volcengine.vpc.Subnet("fooSubnet",
subnet_name="acc-subnet-test-2",
cidr_block="172.16.0.0/24",
zone_id=foo_zones.zones[0].id,
vpc_id=foo_vpc.id)
foo_instance = volcengine.rds_postgresql.Instance("fooInstance",
db_engine_version="PostgreSQL_12",
node_spec="rds.postgres.1c2g",
primary_zone_id=foo_zones.zones[0].id,
secondary_zone_id=foo_zones.zones[0].id,
storage_space=40,
subnet_id=foo_subnet.id,
instance_name="acc-test-1",
charge_info=volcengine.rds_postgresql.InstanceChargeInfoArgs(
charge_type="PostPaid",
),
project_name="default",
tags=[volcengine.rds_postgresql.InstanceTagArgs(
key="tfk1",
value="tfv1",
)],
parameters=[
volcengine.rds_postgresql.InstanceParameterArgs(
name="auto_explain.log_analyze",
value="off",
),
volcengine.rds_postgresql.InstanceParameterArgs(
name="auto_explain.log_format",
value="text",
),
])
foo_database = volcengine.rds_postgresql.Database("fooDatabase",
db_name="acc-test",
instance_id=foo_instance.id,
c_type="C",
collate="zh_CN.utf8")
foo_account = volcengine.rds_postgresql.Account("fooAccount",
account_name="acc-test-account",
account_password="9wc@********12",
account_type="Normal",
instance_id=foo_instance.id,
account_privileges="Inherit,Login,CreateRole,CreateDB")
foo1 = volcengine.rds_postgresql.Account("foo1",
account_name="acc-test-account1",
account_password="9wc@*******12",
account_type="Normal",
instance_id=foo_instance.id,
account_privileges="Inherit,Login,CreateRole,CreateDB")
foo_schema = volcengine.rds_postgresql.Schema("fooSchema",
db_name=foo_database.db_name,
instance_id=foo_instance.id,
owner=foo_account.account_name,
schema_name="acc-test-schema")
foo_schemas = volcengine.rds_postgresql.get_schemas_output(db_name=foo_schema.db_name,
instance_id=foo_instance.id)
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/ecs"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/rds_postgresql"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/vpc"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
fooZones, err := ecs.GetZones(ctx, nil, nil)
if err != nil {
return err
}
fooVpc, err := vpc.NewVpc(ctx, "fooVpc", &vpc.VpcArgs{
VpcName: pulumi.String("acc-test-project1"),
CidrBlock: pulumi.String("172.16.0.0/16"),
})
if err != nil {
return err
}
fooSubnet, err := vpc.NewSubnet(ctx, "fooSubnet", &vpc.SubnetArgs{
SubnetName: pulumi.String("acc-subnet-test-2"),
CidrBlock: pulumi.String("172.16.0.0/24"),
ZoneId: pulumi.String(fooZones.Zones[0].Id),
VpcId: fooVpc.ID(),
})
if err != nil {
return err
}
fooInstance, err := rds_postgresql.NewInstance(ctx, "fooInstance", &rds_postgresql.InstanceArgs{
DbEngineVersion: pulumi.String("PostgreSQL_12"),
NodeSpec: pulumi.String("rds.postgres.1c2g"),
PrimaryZoneId: pulumi.String(fooZones.Zones[0].Id),
SecondaryZoneId: pulumi.String(fooZones.Zones[0].Id),
StorageSpace: pulumi.Int(40),
SubnetId: fooSubnet.ID(),
InstanceName: pulumi.String("acc-test-1"),
ChargeInfo: &rds_postgresql.InstanceChargeInfoArgs{
ChargeType: pulumi.String("PostPaid"),
},
ProjectName: pulumi.String("default"),
Tags: rds_postgresql.InstanceTagArray{
&rds_postgresql.InstanceTagArgs{
Key: pulumi.String("tfk1"),
Value: pulumi.String("tfv1"),
},
},
Parameters: rds_postgresql.InstanceParameterArray{
&rds_postgresql.InstanceParameterArgs{
Name: pulumi.String("auto_explain.log_analyze"),
Value: pulumi.String("off"),
},
&rds_postgresql.InstanceParameterArgs{
Name: pulumi.String("auto_explain.log_format"),
Value: pulumi.String("text"),
},
},
})
if err != nil {
return err
}
fooDatabase, err := rds_postgresql.NewDatabase(ctx, "fooDatabase", &rds_postgresql.DatabaseArgs{
DbName: pulumi.String("acc-test"),
InstanceId: fooInstance.ID(),
CType: pulumi.String("C"),
Collate: pulumi.String("zh_CN.utf8"),
})
if err != nil {
return err
}
fooAccount, err := rds_postgresql.NewAccount(ctx, "fooAccount", &rds_postgresql.AccountArgs{
AccountName: pulumi.String("acc-test-account"),
AccountPassword: pulumi.String("9wc@********12"),
AccountType: pulumi.String("Normal"),
InstanceId: fooInstance.ID(),
AccountPrivileges: pulumi.String("Inherit,Login,CreateRole,CreateDB"),
})
if err != nil {
return err
}
_, err = rds_postgresql.NewAccount(ctx, "foo1", &rds_postgresql.AccountArgs{
AccountName: pulumi.String("acc-test-account1"),
AccountPassword: pulumi.String("9wc@*******12"),
AccountType: pulumi.String("Normal"),
InstanceId: fooInstance.ID(),
AccountPrivileges: pulumi.String("Inherit,Login,CreateRole,CreateDB"),
})
if err != nil {
return err
}
fooSchema, err := rds_postgresql.NewSchema(ctx, "fooSchema", &rds_postgresql.SchemaArgs{
DbName: fooDatabase.DbName,
InstanceId: fooInstance.ID(),
Owner: fooAccount.AccountName,
SchemaName: pulumi.String("acc-test-schema"),
})
if err != nil {
return err
}
_ = rds_postgresql.GetSchemasOutput(ctx, rds_postgresql.GetSchemasOutputArgs{
DbName: fooSchema.DbName,
InstanceId: fooInstance.ID(),
}, nil)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var fooZones = Volcengine.Ecs.GetZones.Invoke();
var fooVpc = new Volcengine.Vpc.Vpc("fooVpc", new()
{
VpcName = "acc-test-project1",
CidrBlock = "172.16.0.0/16",
});
var fooSubnet = new Volcengine.Vpc.Subnet("fooSubnet", new()
{
SubnetName = "acc-subnet-test-2",
CidrBlock = "172.16.0.0/24",
ZoneId = fooZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
VpcId = fooVpc.Id,
});
var fooInstance = new Volcengine.Rds_postgresql.Instance("fooInstance", new()
{
DbEngineVersion = "PostgreSQL_12",
NodeSpec = "rds.postgres.1c2g",
PrimaryZoneId = fooZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
SecondaryZoneId = fooZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
StorageSpace = 40,
SubnetId = fooSubnet.Id,
InstanceName = "acc-test-1",
ChargeInfo = new Volcengine.Rds_postgresql.Inputs.InstanceChargeInfoArgs
{
ChargeType = "PostPaid",
},
ProjectName = "default",
Tags = new[]
{
new Volcengine.Rds_postgresql.Inputs.InstanceTagArgs
{
Key = "tfk1",
Value = "tfv1",
},
},
Parameters = new[]
{
new Volcengine.Rds_postgresql.Inputs.InstanceParameterArgs
{
Name = "auto_explain.log_analyze",
Value = "off",
},
new Volcengine.Rds_postgresql.Inputs.InstanceParameterArgs
{
Name = "auto_explain.log_format",
Value = "text",
},
},
});
var fooDatabase = new Volcengine.Rds_postgresql.Database("fooDatabase", new()
{
DbName = "acc-test",
InstanceId = fooInstance.Id,
CType = "C",
Collate = "zh_CN.utf8",
});
var fooAccount = new Volcengine.Rds_postgresql.Account("fooAccount", new()
{
AccountName = "acc-test-account",
AccountPassword = "9wc@********12",
AccountType = "Normal",
InstanceId = fooInstance.Id,
AccountPrivileges = "Inherit,Login,CreateRole,CreateDB",
});
var foo1 = new Volcengine.Rds_postgresql.Account("foo1", new()
{
AccountName = "acc-test-account1",
AccountPassword = "9wc@*******12",
AccountType = "Normal",
InstanceId = fooInstance.Id,
AccountPrivileges = "Inherit,Login,CreateRole,CreateDB",
});
var fooSchema = new Volcengine.Rds_postgresql.Schema("fooSchema", new()
{
DbName = fooDatabase.DbName,
InstanceId = fooInstance.Id,
Owner = fooAccount.AccountName,
SchemaName = "acc-test-schema",
});
var fooSchemas = Volcengine.Rds_postgresql.GetSchemas.Invoke(new()
{
DbName = fooSchema.DbName,
InstanceId = fooInstance.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.ecs.EcsFunctions;
import com.pulumi.volcengine.ecs.inputs.GetZonesArgs;
import com.pulumi.volcengine.vpc.Vpc;
import com.pulumi.volcengine.vpc.VpcArgs;
import com.pulumi.volcengine.vpc.Subnet;
import com.pulumi.volcengine.vpc.SubnetArgs;
import com.pulumi.volcengine.rds_postgresql.Instance;
import com.pulumi.volcengine.rds_postgresql.InstanceArgs;
import com.pulumi.volcengine.rds_postgresql.inputs.InstanceChargeInfoArgs;
import com.pulumi.volcengine.rds_postgresql.inputs.InstanceTagArgs;
import com.pulumi.volcengine.rds_postgresql.inputs.InstanceParameterArgs;
import com.pulumi.volcengine.rds_postgresql.Database;
import com.pulumi.volcengine.rds_postgresql.DatabaseArgs;
import com.pulumi.volcengine.rds_postgresql.Account;
import com.pulumi.volcengine.rds_postgresql.AccountArgs;
import com.pulumi.volcengine.rds_postgresql.Schema;
import com.pulumi.volcengine.rds_postgresql.SchemaArgs;
import com.pulumi.volcengine.rds_postgresql.Rds_postgresqlFunctions;
import com.pulumi.volcengine.rds_postgresql.inputs.GetSchemasArgs;
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 fooZones = EcsFunctions.getZones();
var fooVpc = new Vpc("fooVpc", VpcArgs.builder()
.vpcName("acc-test-project1")
.cidrBlock("172.16.0.0/16")
.build());
var fooSubnet = new Subnet("fooSubnet", SubnetArgs.builder()
.subnetName("acc-subnet-test-2")
.cidrBlock("172.16.0.0/24")
.zoneId(fooZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
.vpcId(fooVpc.id())
.build());
var fooInstance = new Instance("fooInstance", InstanceArgs.builder()
.dbEngineVersion("PostgreSQL_12")
.nodeSpec("rds.postgres.1c2g")
.primaryZoneId(fooZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
.secondaryZoneId(fooZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
.storageSpace(40)
.subnetId(fooSubnet.id())
.instanceName("acc-test-1")
.chargeInfo(InstanceChargeInfoArgs.builder()
.chargeType("PostPaid")
.build())
.projectName("default")
.tags(InstanceTagArgs.builder()
.key("tfk1")
.value("tfv1")
.build())
.parameters(
InstanceParameterArgs.builder()
.name("auto_explain.log_analyze")
.value("off")
.build(),
InstanceParameterArgs.builder()
.name("auto_explain.log_format")
.value("text")
.build())
.build());
var fooDatabase = new Database("fooDatabase", DatabaseArgs.builder()
.dbName("acc-test")
.instanceId(fooInstance.id())
.cType("C")
.collate("zh_CN.utf8")
.build());
var fooAccount = new Account("fooAccount", AccountArgs.builder()
.accountName("acc-test-account")
.accountPassword("9wc@********12")
.accountType("Normal")
.instanceId(fooInstance.id())
.accountPrivileges("Inherit,Login,CreateRole,CreateDB")
.build());
var foo1 = new Account("foo1", AccountArgs.builder()
.accountName("acc-test-account1")
.accountPassword("9wc@*******12")
.accountType("Normal")
.instanceId(fooInstance.id())
.accountPrivileges("Inherit,Login,CreateRole,CreateDB")
.build());
var fooSchema = new Schema("fooSchema", SchemaArgs.builder()
.dbName(fooDatabase.dbName())
.instanceId(fooInstance.id())
.owner(fooAccount.accountName())
.schemaName("acc-test-schema")
.build());
final var fooSchemas = Rds_postgresqlFunctions.getSchemas(GetSchemasArgs.builder()
.dbName(fooSchema.dbName())
.instanceId(fooInstance.id())
.build());
}
}
resources:
fooVpc:
type: volcengine:vpc:Vpc
properties:
vpcName: acc-test-project1
cidrBlock: 172.16.0.0/16
fooSubnet:
type: volcengine:vpc:Subnet
properties:
subnetName: acc-subnet-test-2
cidrBlock: 172.16.0.0/24
zoneId: ${fooZones.zones[0].id}
vpcId: ${fooVpc.id}
fooInstance:
type: volcengine:rds_postgresql:Instance
properties:
dbEngineVersion: PostgreSQL_12
nodeSpec: rds.postgres.1c2g
primaryZoneId: ${fooZones.zones[0].id}
secondaryZoneId: ${fooZones.zones[0].id}
storageSpace: 40
subnetId: ${fooSubnet.id}
instanceName: acc-test-1
chargeInfo:
chargeType: PostPaid
projectName: default
tags:
- key: tfk1
value: tfv1
parameters:
- name: auto_explain.log_analyze
value: off
- name: auto_explain.log_format
value: text
fooDatabase:
type: volcengine:rds_postgresql:Database
properties:
dbName: acc-test
instanceId: ${fooInstance.id}
cType: C
collate: zh_CN.utf8
fooAccount:
type: volcengine:rds_postgresql:Account
properties:
accountName: acc-test-account
accountPassword: 9wc@********12
accountType: Normal
instanceId: ${fooInstance.id}
accountPrivileges: Inherit,Login,CreateRole,CreateDB
foo1:
type: volcengine:rds_postgresql:Account
properties:
accountName: acc-test-account1
accountPassword: 9wc@*******12
accountType: Normal
instanceId: ${fooInstance.id}
accountPrivileges: Inherit,Login,CreateRole,CreateDB
fooSchema:
type: volcengine:rds_postgresql:Schema
properties:
dbName: ${fooDatabase.dbName}
instanceId: ${fooInstance.id}
owner: ${fooAccount.accountName}
schemaName: acc-test-schema
variables:
fooZones:
fn::invoke:
Function: volcengine:ecs:getZones
Arguments: {}
fooSchemas:
fn::invoke:
Function: volcengine:rds_postgresql:getSchemas
Arguments:
dbName: ${fooSchema.dbName}
instanceId: ${fooInstance.id}
Using getSchemas
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 getSchemas(args: GetSchemasArgs, opts?: InvokeOptions): Promise<GetSchemasResult>
function getSchemasOutput(args: GetSchemasOutputArgs, opts?: InvokeOptions): Output<GetSchemasResult>def get_schemas(db_name: Optional[str] = None,
instance_id: Optional[str] = None,
output_file: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetSchemasResult
def get_schemas_output(db_name: Optional[pulumi.Input[str]] = None,
instance_id: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetSchemasResult]func GetSchemas(ctx *Context, args *GetSchemasArgs, opts ...InvokeOption) (*GetSchemasResult, error)
func GetSchemasOutput(ctx *Context, args *GetSchemasOutputArgs, opts ...InvokeOption) GetSchemasResultOutput> Note: This function is named GetSchemas in the Go SDK.
public static class GetSchemas
{
public static Task<GetSchemasResult> InvokeAsync(GetSchemasArgs args, InvokeOptions? opts = null)
public static Output<GetSchemasResult> Invoke(GetSchemasInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetSchemasResult> getSchemas(GetSchemasArgs args, InvokeOptions options)
public static Output<GetSchemasResult> getSchemas(GetSchemasArgs args, InvokeOptions options)
fn::invoke:
function: volcengine:rds_postgresql/getSchemas:getSchemas
arguments:
# arguments dictionaryThe following arguments are supported:
- Instance
Id string - The id of the instance.
- Db
Name string - The name of the database.
- Output
File string - File name where to save data source results.
- Instance
Id string - The id of the instance.
- Db
Name string - The name of the database.
- Output
File string - File name where to save data source results.
- instance
Id String - The id of the instance.
- db
Name String - The name of the database.
- output
File String - File name where to save data source results.
- instance
Id string - The id of the instance.
- db
Name string - The name of the database.
- output
File string - File name where to save data source results.
- instance_
id str - The id of the instance.
- db_
name str - The name of the database.
- output_
file str - File name where to save data source results.
- instance
Id String - The id of the instance.
- db
Name String - The name of the database.
- output
File String - File name where to save data source results.
getSchemas Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Instance
Id string - Schemas
List<Get
Schemas Schema> - The collection of query.
- Total
Count int - The total count of query.
- Db
Name string - The name of the database.
- Output
File string
- Id string
- The provider-assigned unique ID for this managed resource.
- Instance
Id string - Schemas
[]Get
Schemas Schema - The collection of query.
- Total
Count int - The total count of query.
- Db
Name string - The name of the database.
- Output
File string
- id String
- The provider-assigned unique ID for this managed resource.
- instance
Id String - schemas
List<Get
Schemas Schema> - The collection of query.
- total
Count Integer - The total count of query.
- db
Name String - The name of the database.
- output
File String
- id string
- The provider-assigned unique ID for this managed resource.
- instance
Id string - schemas
Get
Schemas Schema[] - The collection of query.
- total
Count number - The total count of query.
- db
Name string - The name of the database.
- output
File string
- id str
- The provider-assigned unique ID for this managed resource.
- instance_
id str - schemas
Sequence[Get
Schemas Schema] - The collection of query.
- total_
count int - The total count of query.
- db_
name str - The name of the database.
- output_
file str
- id String
- The provider-assigned unique ID for this managed resource.
- instance
Id String - schemas List<Property Map>
- The collection of query.
- total
Count Number - The total count of query.
- db
Name String - The name of the database.
- output
File String
Supporting Types
GetSchemasSchema
- Db
Name string - The name of the database.
- Owner string
- The owner of the schema.
- Schema
Name string - The name of the schema.
- Db
Name string - The name of the database.
- Owner string
- The owner of the schema.
- Schema
Name string - The name of the schema.
- db
Name String - The name of the database.
- owner String
- The owner of the schema.
- schema
Name String - The name of the schema.
- db
Name string - The name of the database.
- owner string
- The owner of the schema.
- schema
Name string - The name of the schema.
- db_
name str - The name of the database.
- owner str
- The owner of the schema.
- schema_
name str - The name of the schema.
- db
Name String - The name of the database.
- owner String
- The owner of the schema.
- schema
Name String - The name of the schema.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengineTerraform Provider.
Volcengine v0.0.38 published on Friday, Oct 31, 2025 by Volcengine
