published on Thursday, Mar 26, 2026 by Byteplus
published on Thursday, Mar 26, 2026 by Byteplus
RDS PostgreSQL Schema 资源类型
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as bytepluscc from "@byteplus/pulumi-bytepluscc";
const rDSPostgreSQLSchemaDemo = new bytepluscc.rdspostgresql.Schema("RDSPostgreSQLSchemaDemo", {
instanceId: "postgres-8d1fcxxxxx",
dbName: "ccapi-terraform-1001",
schemaName: "ccapi-terraform-1",
owner: "test",
});
import pulumi
import pulumi_bytepluscc as bytepluscc
r_ds_postgre_sql_schema_demo = bytepluscc.rdspostgresql.Schema("RDSPostgreSQLSchemaDemo",
instance_id="postgres-8d1fcxxxxx",
db_name="ccapi-terraform-1001",
schema_name="ccapi-terraform-1",
owner="test")
package main
import (
"github.com/byteplus-sdk/pulumi-bytepluscc/sdk/go/bytepluscc/rdspostgresql"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := rdspostgresql.NewSchema(ctx, "RDSPostgreSQLSchemaDemo", &rdspostgresql.SchemaArgs{
InstanceId: pulumi.String("postgres-8d1fcxxxxx"),
DbName: pulumi.String("ccapi-terraform-1001"),
SchemaName: pulumi.String("ccapi-terraform-1"),
Owner: pulumi.String("test"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Bytepluscc = Byteplus.Pulumi.Bytepluscc;
return await Deployment.RunAsync(() =>
{
var rDSPostgreSQLSchemaDemo = new Bytepluscc.Rdspostgresql.Schema("RDSPostgreSQLSchemaDemo", new()
{
InstanceId = "postgres-8d1fcxxxxx",
DbName = "ccapi-terraform-1001",
SchemaName = "ccapi-terraform-1",
Owner = "test",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.byteplus.bytepluscc.rdspostgresql.Schema;
import com.byteplus.bytepluscc.rdspostgresql.SchemaArgs;
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) {
var rDSPostgreSQLSchemaDemo = new Schema("rDSPostgreSQLSchemaDemo", SchemaArgs.builder()
.instanceId("postgres-8d1fcxxxxx")
.dbName("ccapi-terraform-1001")
.schemaName("ccapi-terraform-1")
.owner("test")
.build());
}
}
resources:
rDSPostgreSQLSchemaDemo:
type: bytepluscc:rdspostgresql:Schema
name: RDSPostgreSQLSchemaDemo
properties:
instanceId: postgres-8d1fcxxxxx
dbName: ccapi-terraform-1001
schemaName: ccapi-terraform-1
owner: test
Create Schema Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Schema(name: string, args: SchemaArgs, opts?: CustomResourceOptions);@overload
def Schema(resource_name: str,
args: SchemaArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Schema(resource_name: str,
opts: Optional[ResourceOptions] = None,
db_name: Optional[str] = None,
instance_id: Optional[str] = None,
owner: Optional[str] = None,
schema_name: Optional[str] = None)func NewSchema(ctx *Context, name string, args SchemaArgs, opts ...ResourceOption) (*Schema, error)public Schema(string name, SchemaArgs args, CustomResourceOptions? opts = null)
public Schema(String name, SchemaArgs args)
public Schema(String name, SchemaArgs args, CustomResourceOptions options)
type: bytepluscc:rdspostgresql:Schema
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args SchemaArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args SchemaArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args SchemaArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SchemaArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SchemaArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var schemaResource = new Bytepluscc.Rdspostgresql.Schema("schemaResource", new()
{
DbName = "string",
InstanceId = "string",
Owner = "string",
SchemaName = "string",
});
example, err := rdspostgresql.NewSchema(ctx, "schemaResource", &rdspostgresql.SchemaArgs{
DbName: pulumi.String("string"),
InstanceId: pulumi.String("string"),
Owner: pulumi.String("string"),
SchemaName: pulumi.String("string"),
})
var schemaResource = new Schema("schemaResource", SchemaArgs.builder()
.dbName("string")
.instanceId("string")
.owner("string")
.schemaName("string")
.build());
schema_resource = bytepluscc.rdspostgresql.Schema("schemaResource",
db_name="string",
instance_id="string",
owner="string",
schema_name="string")
const schemaResource = new bytepluscc.rdspostgresql.Schema("schemaResource", {
dbName: "string",
instanceId: "string",
owner: "string",
schemaName: "string",
});
type: bytepluscc:rdspostgresql:Schema
properties:
dbName: string
instanceId: string
owner: string
schemaName: string
Schema Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Schema resource accepts the following input properties:
- Db
Name string - 数据库名称
- Instance
Id string - 实例 ID
- Owner string
- Schema 的 owner。说明实例只读账号、被禁用了 DDL 权限的高权限账号或被禁用了 DDL 权限的普通账号不能作为 Schema 的 owner。
- Schema
Name string - Schema 名称。长度 2~63 个字符。由字母、数字、下划线()或中划线(-)组成。以字母开头,字母或数字结尾。不能使用保留关键字,所有被禁用的关键词请参见禁用关键词。不能以 pg 开头
- Db
Name string - 数据库名称
- Instance
Id string - 实例 ID
- Owner string
- Schema 的 owner。说明实例只读账号、被禁用了 DDL 权限的高权限账号或被禁用了 DDL 权限的普通账号不能作为 Schema 的 owner。
- Schema
Name string - Schema 名称。长度 2~63 个字符。由字母、数字、下划线()或中划线(-)组成。以字母开头,字母或数字结尾。不能使用保留关键字,所有被禁用的关键词请参见禁用关键词。不能以 pg 开头
- db
Name String - 数据库名称
- instance
Id String - 实例 ID
- owner String
- Schema 的 owner。说明实例只读账号、被禁用了 DDL 权限的高权限账号或被禁用了 DDL 权限的普通账号不能作为 Schema 的 owner。
- schema
Name String - Schema 名称。长度 2~63 个字符。由字母、数字、下划线()或中划线(-)组成。以字母开头,字母或数字结尾。不能使用保留关键字,所有被禁用的关键词请参见禁用关键词。不能以 pg 开头
- db
Name string - 数据库名称
- instance
Id string - 实例 ID
- owner string
- Schema 的 owner。说明实例只读账号、被禁用了 DDL 权限的高权限账号或被禁用了 DDL 权限的普通账号不能作为 Schema 的 owner。
- schema
Name string - Schema 名称。长度 2~63 个字符。由字母、数字、下划线()或中划线(-)组成。以字母开头,字母或数字结尾。不能使用保留关键字,所有被禁用的关键词请参见禁用关键词。不能以 pg 开头
- db_
name str - 数据库名称
- instance_
id str - 实例 ID
- owner str
- Schema 的 owner。说明实例只读账号、被禁用了 DDL 权限的高权限账号或被禁用了 DDL 权限的普通账号不能作为 Schema 的 owner。
- schema_
name str - Schema 名称。长度 2~63 个字符。由字母、数字、下划线()或中划线(-)组成。以字母开头,字母或数字结尾。不能使用保留关键字,所有被禁用的关键词请参见禁用关键词。不能以 pg 开头
- db
Name String - 数据库名称
- instance
Id String - 实例 ID
- owner String
- Schema 的 owner。说明实例只读账号、被禁用了 DDL 权限的高权限账号或被禁用了 DDL 权限的普通账号不能作为 Schema 的 owner。
- schema
Name String - Schema 名称。长度 2~63 个字符。由字母、数字、下划线()或中划线(-)组成。以字母开头,字母或数字结尾。不能使用保留关键字,所有被禁用的关键词请参见禁用关键词。不能以 pg 开头
Outputs
All input properties are implicitly available as output properties. Additionally, the Schema resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing Schema Resource
Get an existing Schema resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: SchemaState, opts?: CustomResourceOptions): Schema@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
db_name: Optional[str] = None,
instance_id: Optional[str] = None,
owner: Optional[str] = None,
schema_name: Optional[str] = None) -> Schemafunc GetSchema(ctx *Context, name string, id IDInput, state *SchemaState, opts ...ResourceOption) (*Schema, error)public static Schema Get(string name, Input<string> id, SchemaState? state, CustomResourceOptions? opts = null)public static Schema get(String name, Output<String> id, SchemaState state, CustomResourceOptions options)resources: _: type: bytepluscc:rdspostgresql:Schema get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Db
Name string - 数据库名称
- Instance
Id string - 实例 ID
- Owner string
- Schema 的 owner。说明实例只读账号、被禁用了 DDL 权限的高权限账号或被禁用了 DDL 权限的普通账号不能作为 Schema 的 owner。
- Schema
Name string - Schema 名称。长度 2~63 个字符。由字母、数字、下划线()或中划线(-)组成。以字母开头,字母或数字结尾。不能使用保留关键字,所有被禁用的关键词请参见禁用关键词。不能以 pg 开头
- Db
Name string - 数据库名称
- Instance
Id string - 实例 ID
- Owner string
- Schema 的 owner。说明实例只读账号、被禁用了 DDL 权限的高权限账号或被禁用了 DDL 权限的普通账号不能作为 Schema 的 owner。
- Schema
Name string - Schema 名称。长度 2~63 个字符。由字母、数字、下划线()或中划线(-)组成。以字母开头,字母或数字结尾。不能使用保留关键字,所有被禁用的关键词请参见禁用关键词。不能以 pg 开头
- db
Name String - 数据库名称
- instance
Id String - 实例 ID
- owner String
- Schema 的 owner。说明实例只读账号、被禁用了 DDL 权限的高权限账号或被禁用了 DDL 权限的普通账号不能作为 Schema 的 owner。
- schema
Name String - Schema 名称。长度 2~63 个字符。由字母、数字、下划线()或中划线(-)组成。以字母开头,字母或数字结尾。不能使用保留关键字,所有被禁用的关键词请参见禁用关键词。不能以 pg 开头
- db
Name string - 数据库名称
- instance
Id string - 实例 ID
- owner string
- Schema 的 owner。说明实例只读账号、被禁用了 DDL 权限的高权限账号或被禁用了 DDL 权限的普通账号不能作为 Schema 的 owner。
- schema
Name string - Schema 名称。长度 2~63 个字符。由字母、数字、下划线()或中划线(-)组成。以字母开头,字母或数字结尾。不能使用保留关键字,所有被禁用的关键词请参见禁用关键词。不能以 pg 开头
- db_
name str - 数据库名称
- instance_
id str - 实例 ID
- owner str
- Schema 的 owner。说明实例只读账号、被禁用了 DDL 权限的高权限账号或被禁用了 DDL 权限的普通账号不能作为 Schema 的 owner。
- schema_
name str - Schema 名称。长度 2~63 个字符。由字母、数字、下划线()或中划线(-)组成。以字母开头,字母或数字结尾。不能使用保留关键字,所有被禁用的关键词请参见禁用关键词。不能以 pg 开头
- db
Name String - 数据库名称
- instance
Id String - 实例 ID
- owner String
- Schema 的 owner。说明实例只读账号、被禁用了 DDL 权限的高权限账号或被禁用了 DDL 权限的普通账号不能作为 Schema 的 owner。
- schema
Name String - Schema 名称。长度 2~63 个字符。由字母、数字、下划线()或中划线(-)组成。以字母开头,字母或数字结尾。不能使用保留关键字,所有被禁用的关键词请参见禁用关键词。不能以 pg 开头
Import
$ pulumi import bytepluscc:rdspostgresql/schema:Schema example "instance_id|db_name|schema_name"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- bytepluscc byteplus-sdk/pulumi-bytepluscc
- License
- MPL-2.0
- Notes
- This Pulumi package is based on the
byteplusccTerraform Provider.
published on Thursday, Mar 26, 2026 by Byteplus
