published on Monday, Aug 24, 2026 by Pulumi
published on Monday, Aug 24, 2026 by Pulumi
Provides a PolarDB DynamoDB-compatible table resource to manage tables through the DynamoDB-compatible endpoint of a PolarDB for PostgreSQL cluster.
NOTE: Available since v1.287.0.
NOTE: This resource requires a PolarDB for PostgreSQL cluster with
enableDynamodbset totrue, a PolarDB account of typeDynamoDB, and a cluster endpoint of typeDynamoDBwith a reachable (e.g. public) endpoint address.
NOTE: All operations are performed against the DynamoDB-compatible endpoint (
http://<connection_string>:5432) using the DynamoDB API, not the PolarDB OpenAPI.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const _default = alicloud.polardb.getNodeClasses({
dbType: "PostgreSQL",
dbVersion: "16",
payType: "PostPaid",
dbNodeClass: "polar.pg.x4.medium",
});
const defaultNetwork = new alicloud.vpc.Network("default", {
vpcName: name,
cidrBlock: "172.16.0.0/16",
});
const defaultSwitch = new alicloud.vpc.Switch("default", {
vpcId: defaultNetwork.id,
cidrBlock: "172.16.0.0/24",
zoneId: _default.then(_default => _default.classes?.[0]?.zoneId),
vswitchName: name,
});
const defaultGlobalSecurityIpGroup = new alicloud.polardb.GlobalSecurityIpGroup("default", {
globalIpGroupName: "tf_dynamo_whitelist",
globalIpList: "0.0.0.0/0",
});
const defaultCluster = new alicloud.polardb.Cluster("default", {
dbType: "PostgreSQL",
dbVersion: "16",
dbNodeClass: "polar.pg.x4.medium",
payType: "PostPaid",
vswitchId: defaultSwitch.id,
description: name,
enableDynamodb: true,
globalSecurityGroupLists: [defaultGlobalSecurityIpGroup.id],
});
const dynamo = new alicloud.polardb.Account("dynamo", {
dbClusterId: defaultCluster.id,
accountName: "tf_dynamo_acc",
accountPassword: "Example1234!",
accountType: "DynamoDB",
});
const dynamoEndpoint = new alicloud.polardb.Endpoint("dynamo", {
dbClusterId: dynamo.dbClusterId,
endpointType: "DynamoDB",
readWriteMode: "ReadWrite",
});
const dynamoPublic = new alicloud.polardb.EndpointAddress("dynamo_public", {
dbClusterId: defaultCluster.id,
dbEndpointId: dynamoEndpoint.dbEndpointId,
netType: "Public",
});
const defaultDynamoTable = new alicloud.polardb.DynamoTable("default", {
endpoint: pulumi.interpolate`http://${dynamoPublic.connectionString}:5432`,
dbClusterId: defaultCluster.id,
accountName: dynamo.accountName,
accountAuth: dynamo.dynamodbAuthPassword,
tableName: name,
hashKey: "pk",
rangeKey: "sk",
billingMode: "PAY_PER_REQUEST",
attributes: [
{
name: "pk",
type: "S",
},
{
name: "sk",
type: "S",
},
],
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
default = alicloud.polardb.get_node_classes(db_type="PostgreSQL",
db_version="16",
pay_type="PostPaid",
db_node_class="polar.pg.x4.medium")
default_network = alicloud.vpc.Network("default",
vpc_name=name,
cidr_block="172.16.0.0/16")
default_switch = alicloud.vpc.Switch("default",
vpc_id=default_network.id,
cidr_block="172.16.0.0/24",
zone_id=default.classes[0].zone_id,
vswitch_name=name)
default_global_security_ip_group = alicloud.polardb.GlobalSecurityIpGroup("default",
global_ip_group_name="tf_dynamo_whitelist",
global_ip_list="0.0.0.0/0")
default_cluster = alicloud.polardb.Cluster("default",
db_type="PostgreSQL",
db_version="16",
db_node_class="polar.pg.x4.medium",
pay_type="PostPaid",
vswitch_id=default_switch.id,
description=name,
enable_dynamodb=True,
global_security_group_lists=[default_global_security_ip_group.id])
dynamo = alicloud.polardb.Account("dynamo",
db_cluster_id=default_cluster.id,
account_name="tf_dynamo_acc",
account_password="Example1234!",
account_type="DynamoDB")
dynamo_endpoint = alicloud.polardb.Endpoint("dynamo",
db_cluster_id=dynamo.db_cluster_id,
endpoint_type="DynamoDB",
read_write_mode="ReadWrite")
dynamo_public = alicloud.polardb.EndpointAddress("dynamo_public",
db_cluster_id=default_cluster.id,
db_endpoint_id=dynamo_endpoint.db_endpoint_id,
net_type="Public")
default_dynamo_table = alicloud.polardb.DynamoTable("default",
endpoint=dynamo_public.connection_string.apply(lambda connection_string: f"http://{connection_string}:5432"),
db_cluster_id=default_cluster.id,
account_name=dynamo.account_name,
account_auth=dynamo.dynamodb_auth_password,
table_name=name,
hash_key="pk",
range_key="sk",
billing_mode="PAY_PER_REQUEST",
attributes=[
{
"name": "pk",
"type": "S",
},
{
"name": "sk",
"type": "S",
},
])
package main
import (
"fmt"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/polardb"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "terraform-example"
if param := cfg.Get("name"); param != "" {
name = param
}
_default, err := polardb.GetNodeClasses(ctx, &polardb.GetNodeClassesArgs{
DbType: pulumi.StringRef("PostgreSQL"),
DbVersion: pulumi.StringRef("16"),
PayType: "PostPaid",
DbNodeClass: pulumi.StringRef("polar.pg.x4.medium"),
}, nil)
if err != nil {
return err
}
defaultNetwork, err := vpc.NewNetwork(ctx, "default", &vpc.NetworkArgs{
VpcName: pulumi.String(name),
CidrBlock: pulumi.String("172.16.0.0/16"),
})
if err != nil {
return err
}
defaultSwitch, err := vpc.NewSwitch(ctx, "default", &vpc.SwitchArgs{
VpcId: defaultNetwork.ID().ToIDOutput().ToStringOutput(),
CidrBlock: pulumi.String("172.16.0.0/24"),
ZoneId: pulumi.String(_default.Classes[0].ZoneId),
VswitchName: pulumi.String(name),
})
if err != nil {
return err
}
defaultGlobalSecurityIpGroup, err := polardb.NewGlobalSecurityIpGroup(ctx, "default", &polardb.GlobalSecurityIpGroupArgs{
GlobalIpGroupName: pulumi.String("tf_dynamo_whitelist"),
GlobalIpList: pulumi.String("0.0.0.0/0"),
})
if err != nil {
return err
}
defaultCluster, err := polardb.NewCluster(ctx, "default", &polardb.ClusterArgs{
DbType: pulumi.String("PostgreSQL"),
DbVersion: pulumi.String("16"),
DbNodeClass: pulumi.String("polar.pg.x4.medium"),
PayType: pulumi.String("PostPaid"),
VswitchId: defaultSwitch.ID().ToIDOutput().ToStringOutput(),
Description: pulumi.String(name),
EnableDynamodb: pulumi.Bool(true),
GlobalSecurityGroupLists: pulumi.StringArray{
defaultGlobalSecurityIpGroup.ID().ToIDOutput().ToStringOutput(),
},
})
if err != nil {
return err
}
dynamo, err := polardb.NewAccount(ctx, "dynamo", &polardb.AccountArgs{
DbClusterId: defaultCluster.ID().ToIDOutput().ToStringOutput(),
AccountName: pulumi.String("tf_dynamo_acc"),
AccountPassword: pulumi.String("Example1234!"),
AccountType: pulumi.String("DynamoDB"),
})
if err != nil {
return err
}
dynamoEndpoint, err := polardb.NewEndpoint(ctx, "dynamo", &polardb.EndpointArgs{
DbClusterId: dynamo.DbClusterId,
EndpointType: pulumi.String("DynamoDB"),
ReadWriteMode: pulumi.String("ReadWrite"),
})
if err != nil {
return err
}
dynamoPublic, err := polardb.NewEndpointAddress(ctx, "dynamo_public", &polardb.EndpointAddressArgs{
DbClusterId: defaultCluster.ID().ToIDOutput().ToStringOutput(),
DbEndpointId: dynamoEndpoint.DbEndpointId,
NetType: pulumi.String("Public"),
})
if err != nil {
return err
}
_, err = polardb.NewDynamoTable(ctx, "default", &polardb.DynamoTableArgs{
Endpoint: dynamoPublic.ConnectionString.ApplyT(func(connectionString string) (string, error) {
return fmt.Sprintf("http://%v:5432", connectionString), nil
}).(pulumi.StringOutput),
DbClusterId: defaultCluster.ID().ToIDOutput().ToStringOutput(),
AccountName: dynamo.AccountName,
AccountAuth: dynamo.DynamodbAuthPassword,
TableName: pulumi.String(name),
HashKey: pulumi.String("pk"),
RangeKey: pulumi.String("sk"),
BillingMode: pulumi.String("PAY_PER_REQUEST"),
Attributes: polardb.DynamoTableAttributeArray{
&polardb.DynamoTableAttributeArgs{
Name: pulumi.String("pk"),
Type: pulumi.String("S"),
},
&polardb.DynamoTableAttributeArgs{
Name: pulumi.String("sk"),
Type: pulumi.String("S"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "terraform-example";
var @default = AliCloud.PolarDB.GetNodeClasses.Invoke(new()
{
DbType = "PostgreSQL",
DbVersion = "16",
PayType = "PostPaid",
DbNodeClass = "polar.pg.x4.medium",
});
var defaultNetwork = new AliCloud.Vpc.Network("default", new()
{
VpcName = name,
CidrBlock = "172.16.0.0/16",
});
var defaultSwitch = new AliCloud.Vpc.Switch("default", new()
{
VpcId = defaultNetwork.Id,
CidrBlock = "172.16.0.0/24",
ZoneId = @default.Apply(@default => @default.Apply(getNodeClassesResult => getNodeClassesResult.Classes[0]?.ZoneId)),
VswitchName = name,
});
var defaultGlobalSecurityIpGroup = new AliCloud.PolarDB.GlobalSecurityIpGroup("default", new()
{
GlobalIpGroupName = "tf_dynamo_whitelist",
GlobalIpList = "0.0.0.0/0",
});
var defaultCluster = new AliCloud.PolarDB.Cluster("default", new()
{
DbType = "PostgreSQL",
DbVersion = "16",
DbNodeClass = "polar.pg.x4.medium",
PayType = "PostPaid",
VswitchId = defaultSwitch.Id,
Description = name,
EnableDynamodb = true,
GlobalSecurityGroupLists = new[]
{
defaultGlobalSecurityIpGroup.Id,
},
});
var dynamo = new AliCloud.PolarDB.Account("dynamo", new()
{
DbClusterId = defaultCluster.Id,
AccountName = "tf_dynamo_acc",
AccountPassword = "Example1234!",
AccountType = "DynamoDB",
});
var dynamoEndpoint = new AliCloud.PolarDB.Endpoint("dynamo", new()
{
DbClusterId = dynamo.DbClusterId,
EndpointType = "DynamoDB",
ReadWriteMode = "ReadWrite",
});
var dynamoPublic = new AliCloud.PolarDB.EndpointAddress("dynamo_public", new()
{
DbClusterId = defaultCluster.Id,
DbEndpointId = dynamoEndpoint.DbEndpointId,
NetType = "Public",
});
var defaultDynamoTable = new AliCloud.PolarDB.DynamoTable("default", new()
{
Endpoint = dynamoPublic.ConnectionString.Apply(connectionString => $"http://{connectionString}:5432"),
DbClusterId = defaultCluster.Id,
AccountName = dynamo.AccountName,
AccountAuth = dynamo.DynamodbAuthPassword,
TableName = name,
HashKey = "pk",
RangeKey = "sk",
BillingMode = "PAY_PER_REQUEST",
Attributes = new[]
{
new AliCloud.PolarDB.Inputs.DynamoTableAttributeArgs
{
Name = "pk",
Type = "S",
},
new AliCloud.PolarDB.Inputs.DynamoTableAttributeArgs
{
Name = "sk",
Type = "S",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.polardb.PolardbFunctions;
import com.pulumi.alicloud.polardb.inputs.GetNodeClassesArgs;
import com.pulumi.alicloud.vpc.Network;
import com.pulumi.alicloud.vpc.NetworkArgs;
import com.pulumi.alicloud.vpc.Switch;
import com.pulumi.alicloud.vpc.SwitchArgs;
import com.pulumi.alicloud.polardb.GlobalSecurityIpGroup;
import com.pulumi.alicloud.polardb.GlobalSecurityIpGroupArgs;
import com.pulumi.alicloud.polardb.Cluster;
import com.pulumi.alicloud.polardb.ClusterArgs;
import com.pulumi.alicloud.polardb.Account;
import com.pulumi.alicloud.polardb.AccountArgs;
import com.pulumi.alicloud.polardb.Endpoint;
import com.pulumi.alicloud.polardb.EndpointArgs;
import com.pulumi.alicloud.polardb.EndpointAddress;
import com.pulumi.alicloud.polardb.EndpointAddressArgs;
import com.pulumi.alicloud.polardb.DynamoTable;
import com.pulumi.alicloud.polardb.DynamoTableArgs;
import com.pulumi.alicloud.polardb.inputs.DynamoTableAttributeArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 config = ctx.config();
final var name = config.get("name").orElse("terraform-example");
final var default = PolardbFunctions.getNodeClasses(GetNodeClassesArgs.builder()
.dbType("PostgreSQL")
.dbVersion("16")
.payType("PostPaid")
.dbNodeClass("polar.pg.x4.medium")
.build());
var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
.vpcName(name)
.cidrBlock("172.16.0.0/16")
.build());
var defaultSwitch = new Switch("defaultSwitch", SwitchArgs.builder()
.vpcId(defaultNetwork.id())
.cidrBlock("172.16.0.0/24")
.zoneId(default_.classes()[0].zoneId())
.vswitchName(name)
.build());
var defaultGlobalSecurityIpGroup = new GlobalSecurityIpGroup("defaultGlobalSecurityIpGroup", GlobalSecurityIpGroupArgs.builder()
.globalIpGroupName("tf_dynamo_whitelist")
.globalIpList("0.0.0.0/0")
.build());
var defaultCluster = new Cluster("defaultCluster", ClusterArgs.builder()
.dbType("PostgreSQL")
.dbVersion("16")
.dbNodeClass("polar.pg.x4.medium")
.payType("PostPaid")
.vswitchId(defaultSwitch.id())
.description(name)
.enableDynamodb(true)
.globalSecurityGroupLists(defaultGlobalSecurityIpGroup.id())
.build());
var dynamo = new Account("dynamo", AccountArgs.builder()
.dbClusterId(defaultCluster.id())
.accountName("tf_dynamo_acc")
.accountPassword("Example1234!")
.accountType("DynamoDB")
.build());
var dynamoEndpoint = new Endpoint("dynamoEndpoint", EndpointArgs.builder()
.dbClusterId(dynamo.dbClusterId())
.endpointType("DynamoDB")
.readWriteMode("ReadWrite")
.build());
var dynamoPublic = new EndpointAddress("dynamoPublic", EndpointAddressArgs.builder()
.dbClusterId(defaultCluster.id())
.dbEndpointId(dynamoEndpoint.dbEndpointId())
.netType("Public")
.build());
var defaultDynamoTable = new DynamoTable("defaultDynamoTable", DynamoTableArgs.builder()
.endpoint(dynamoPublic.connectionString().applyValue(_connectionString -> String.format("http://%s:5432", _connectionString)))
.dbClusterId(defaultCluster.id())
.accountName(dynamo.accountName())
.accountAuth(dynamo.dynamodbAuthPassword())
.tableName(name)
.hashKey("pk")
.rangeKey("sk")
.billingMode("PAY_PER_REQUEST")
.attributes(
DynamoTableAttributeArgs.builder()
.name("pk")
.type("S")
.build(),
DynamoTableAttributeArgs.builder()
.name("sk")
.type("S")
.build())
.build());
}
}
configuration:
name:
type: string
default: terraform-example
resources:
defaultNetwork:
type: alicloud:vpc:Network
name: default
properties:
vpcName: ${name}
cidrBlock: 172.16.0.0/16
defaultSwitch:
type: alicloud:vpc:Switch
name: default
properties:
vpcId: ${defaultNetwork.id}
cidrBlock: 172.16.0.0/24
zoneId: ${default.classes[0].zoneId}
vswitchName: ${name}
defaultGlobalSecurityIpGroup:
type: alicloud:polardb:GlobalSecurityIpGroup
name: default
properties:
globalIpGroupName: tf_dynamo_whitelist
globalIpList: 0.0.0.0/0
defaultCluster:
type: alicloud:polardb:Cluster
name: default
properties:
dbType: PostgreSQL
dbVersion: '16'
dbNodeClass: polar.pg.x4.medium
payType: PostPaid
vswitchId: ${defaultSwitch.id}
description: ${name}
enableDynamodb: true
globalSecurityGroupLists:
- ${defaultGlobalSecurityIpGroup.id}
dynamo:
type: alicloud:polardb:Account
properties:
dbClusterId: ${defaultCluster.id}
accountName: tf_dynamo_acc
accountPassword: Example1234!
accountType: DynamoDB
dynamoEndpoint:
type: alicloud:polardb:Endpoint
name: dynamo
properties:
dbClusterId: ${dynamo.dbClusterId}
endpointType: DynamoDB
readWriteMode: ReadWrite
dynamoPublic:
type: alicloud:polardb:EndpointAddress
name: dynamo_public
properties:
dbClusterId: ${defaultCluster.id}
dbEndpointId: ${dynamoEndpoint.dbEndpointId}
netType: Public
defaultDynamoTable:
type: alicloud:polardb:DynamoTable
name: default
properties:
endpoint: http://${dynamoPublic.connectionString}:5432
dbClusterId: ${defaultCluster.id}
accountName: ${dynamo.accountName}
accountAuth: ${dynamo.dynamodbAuthPassword}
tableName: ${name}
hashKey: pk
rangeKey: sk
billingMode: PAY_PER_REQUEST
attributes:
- name: pk
type: S
- name: sk
type: S
variables:
default:
fn::invoke:
function: alicloud:polardb:getNodeClasses
arguments:
dbType: PostgreSQL
dbVersion: '16'
payType: PostPaid
dbNodeClass: polar.pg.x4.medium
pulumi {
required_providers {
alicloud = {
source = "pulumi/alicloud"
}
}
}
data "alicloud_polardb_getnodeclasses" "default" {
db_type = "PostgreSQL"
db_version = "16"
pay_type = "PostPaid"
db_node_class = "polar.pg.x4.medium"
}
resource "alicloud_vpc_network" "default" {
vpc_name = var.name
cidr_block = "172.16.0.0/16"
}
resource "alicloud_vpc_switch" "default" {
vpc_id = alicloud_vpc_network.default.id
cidr_block = "172.16.0.0/24"
zone_id = data.alicloud_polardb_getnodeclasses.default.classes[0].zone_id
vswitch_name = var.name
}
resource "alicloud_polardb_globalsecurityipgroup" "default" {
global_ip_group_name = "tf_dynamo_whitelist"
global_ip_list = "0.0.0.0/0"
}
resource "alicloud_polardb_cluster" "default" {
db_type = "PostgreSQL"
db_version = "16"
db_node_class = "polar.pg.x4.medium"
pay_type = "PostPaid"
vswitch_id = alicloud_vpc_switch.default.id
description = var.name
enable_dynamodb = true
global_security_group_lists = [alicloud_polardb_globalsecurityipgroup.default.id]
}
resource "alicloud_polardb_account" "dynamo" {
db_cluster_id = alicloud_polardb_cluster.default.id
account_name = "tf_dynamo_acc"
account_password = "Example1234!"
account_type = "DynamoDB"
}
resource "alicloud_polardb_endpoint" "dynamo" {
db_cluster_id = alicloud_polardb_account.dynamo.db_cluster_id
endpoint_type = "DynamoDB"
read_write_mode = "ReadWrite"
}
resource "alicloud_polardb_endpointaddress" "dynamo_public" {
db_cluster_id = alicloud_polardb_cluster.default.id
db_endpoint_id = alicloud_polardb_endpoint.dynamo.db_endpoint_id
net_type = "Public"
}
resource "alicloud_polardb_dynamotable" "default" {
endpoint ="http://${alicloud_polardb_endpointaddress.dynamo_public.connection_string}:5432"
db_cluster_id = alicloud_polardb_cluster.default.id
account_name = alicloud_polardb_account.dynamo.account_name
account_auth = alicloud_polardb_account.dynamo.dynamodb_auth_password
table_name = var.name
hash_key = "pk"
range_key = "sk"
billing_mode = "PAY_PER_REQUEST"
attributes {
name = "pk"
type = "S"
}
attributes {
name = "sk"
type = "S"
}
}
variable "name" {
type = string
default = "terraform-example"
}
📚 Need more examples? VIEW MORE EXAMPLES
Create DynamoTable Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DynamoTable(name: string, args: DynamoTableArgs, opts?: CustomResourceOptions);@overload
def DynamoTable(resource_name: str,
args: DynamoTableArgs,
opts: Optional[ResourceOptions] = None)
@overload
def DynamoTable(resource_name: str,
opts: Optional[ResourceOptions] = None,
db_cluster_id: Optional[str] = None,
table_name: Optional[str] = None,
endpoint: Optional[str] = None,
global_secondary_indices: Optional[Sequence[DynamoTableGlobalSecondaryIndexArgs]] = None,
billing_mode: Optional[str] = None,
attributes: Optional[Sequence[DynamoTableAttributeArgs]] = None,
account_auth: Optional[str] = None,
hash_key: Optional[str] = None,
local_secondary_indices: Optional[Sequence[DynamoTableLocalSecondaryIndexArgs]] = None,
range_key: Optional[str] = None,
read_capacity: Optional[int] = None,
account_name: Optional[str] = None,
ttl: Optional[DynamoTableTtlArgs] = None,
write_capacity: Optional[int] = None)func NewDynamoTable(ctx *Context, name string, args DynamoTableArgs, opts ...ResourceOption) (*DynamoTable, error)public DynamoTable(string name, DynamoTableArgs args, CustomResourceOptions? opts = null)
public DynamoTable(String name, DynamoTableArgs args)
public DynamoTable(String name, DynamoTableArgs args, CustomResourceOptions options)
type: alicloud:polardb:DynamoTable
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "alicloud_polardb_dynamo_table" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args DynamoTableArgs
- 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 DynamoTableArgs
- 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 DynamoTableArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DynamoTableArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DynamoTableArgs
- 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 dynamoTableResource = new AliCloud.PolarDB.DynamoTable("dynamoTableResource", new()
{
DbClusterId = "string",
TableName = "string",
Endpoint = "string",
GlobalSecondaryIndices = new[]
{
new AliCloud.PolarDB.Inputs.DynamoTableGlobalSecondaryIndexArgs
{
Name = "string",
ProjectionType = "string",
HashKey = "string",
NonKeyAttributes = new[]
{
"string",
},
RangeKey = "string",
ReadCapacity = 0,
WriteCapacity = 0,
},
},
BillingMode = "string",
Attributes = new[]
{
new AliCloud.PolarDB.Inputs.DynamoTableAttributeArgs
{
Name = "string",
Type = "string",
},
},
AccountAuth = "string",
HashKey = "string",
LocalSecondaryIndices = new[]
{
new AliCloud.PolarDB.Inputs.DynamoTableLocalSecondaryIndexArgs
{
Name = "string",
ProjectionType = "string",
RangeKey = "string",
NonKeyAttributes = new[]
{
"string",
},
},
},
RangeKey = "string",
ReadCapacity = 0,
AccountName = "string",
Ttl = new AliCloud.PolarDB.Inputs.DynamoTableTtlArgs
{
AttributeName = "string",
Enabled = false,
},
WriteCapacity = 0,
});
example, err := polardb.NewDynamoTable(ctx, "dynamoTableResource", &polardb.DynamoTableArgs{
DbClusterId: pulumi.String("string"),
TableName: pulumi.String("string"),
Endpoint: pulumi.String("string"),
GlobalSecondaryIndices: polardb.DynamoTableGlobalSecondaryIndexArray{
&polardb.DynamoTableGlobalSecondaryIndexArgs{
Name: pulumi.String("string"),
ProjectionType: pulumi.String("string"),
HashKey: pulumi.String("string"),
NonKeyAttributes: pulumi.StringArray{
pulumi.String("string"),
},
RangeKey: pulumi.String("string"),
ReadCapacity: pulumi.Int(0),
WriteCapacity: pulumi.Int(0),
},
},
BillingMode: pulumi.String("string"),
Attributes: polardb.DynamoTableAttributeArray{
&polardb.DynamoTableAttributeArgs{
Name: pulumi.String("string"),
Type: pulumi.String("string"),
},
},
AccountAuth: pulumi.String("string"),
HashKey: pulumi.String("string"),
LocalSecondaryIndices: polardb.DynamoTableLocalSecondaryIndexArray{
&polardb.DynamoTableLocalSecondaryIndexArgs{
Name: pulumi.String("string"),
ProjectionType: pulumi.String("string"),
RangeKey: pulumi.String("string"),
NonKeyAttributes: pulumi.StringArray{
pulumi.String("string"),
},
},
},
RangeKey: pulumi.String("string"),
ReadCapacity: pulumi.Int(0),
AccountName: pulumi.String("string"),
Ttl: &polardb.DynamoTableTtlArgs{
AttributeName: pulumi.String("string"),
Enabled: pulumi.Bool(false),
},
WriteCapacity: pulumi.Int(0),
})
resource "alicloud_polardb_dynamo_table" "dynamoTableResource" {
lifecycle {
create_before_destroy = true
}
db_cluster_id = "string"
table_name = "string"
endpoint = "string"
global_secondary_indices {
name = "string"
projection_type = "string"
hash_key = "string"
non_key_attributes = ["string"]
range_key = "string"
read_capacity = 0
write_capacity = 0
}
billing_mode = "string"
attributes {
name = "string"
type = "string"
}
account_auth = "string"
hash_key = "string"
local_secondary_indices {
name = "string"
projection_type = "string"
range_key = "string"
non_key_attributes = ["string"]
}
range_key = "string"
read_capacity = 0
account_name = "string"
ttl = {
attribute_name = "string"
enabled = false
}
write_capacity = 0
}
var dynamoTableResource = new DynamoTable("dynamoTableResource", DynamoTableArgs.builder()
.dbClusterId("string")
.tableName("string")
.endpoint("string")
.globalSecondaryIndices(DynamoTableGlobalSecondaryIndexArgs.builder()
.name("string")
.projectionType("string")
.hashKey("string")
.nonKeyAttributes("string")
.rangeKey("string")
.readCapacity(0)
.writeCapacity(0)
.build())
.billingMode("string")
.attributes(DynamoTableAttributeArgs.builder()
.name("string")
.type("string")
.build())
.accountAuth("string")
.hashKey("string")
.localSecondaryIndices(DynamoTableLocalSecondaryIndexArgs.builder()
.name("string")
.projectionType("string")
.rangeKey("string")
.nonKeyAttributes("string")
.build())
.rangeKey("string")
.readCapacity(0)
.accountName("string")
.ttl(DynamoTableTtlArgs.builder()
.attributeName("string")
.enabled(false)
.build())
.writeCapacity(0)
.build());
dynamo_table_resource = alicloud.polardb.DynamoTable("dynamoTableResource",
db_cluster_id="string",
table_name="string",
endpoint="string",
global_secondary_indices=[{
"name": "string",
"projection_type": "string",
"hash_key": "string",
"non_key_attributes": ["string"],
"range_key": "string",
"read_capacity": 0,
"write_capacity": 0,
}],
billing_mode="string",
attributes=[{
"name": "string",
"type": "string",
}],
account_auth="string",
hash_key="string",
local_secondary_indices=[{
"name": "string",
"projection_type": "string",
"range_key": "string",
"non_key_attributes": ["string"],
}],
range_key="string",
read_capacity=0,
account_name="string",
ttl={
"attribute_name": "string",
"enabled": False,
},
write_capacity=0)
const dynamoTableResource = new alicloud.polardb.DynamoTable("dynamoTableResource", {
dbClusterId: "string",
tableName: "string",
endpoint: "string",
globalSecondaryIndices: [{
name: "string",
projectionType: "string",
hashKey: "string",
nonKeyAttributes: ["string"],
rangeKey: "string",
readCapacity: 0,
writeCapacity: 0,
}],
billingMode: "string",
attributes: [{
name: "string",
type: "string",
}],
accountAuth: "string",
hashKey: "string",
localSecondaryIndices: [{
name: "string",
projectionType: "string",
rangeKey: "string",
nonKeyAttributes: ["string"],
}],
rangeKey: "string",
readCapacity: 0,
accountName: "string",
ttl: {
attributeName: "string",
enabled: false,
},
writeCapacity: 0,
});
type: alicloud:polardb:DynamoTable
properties:
accountAuth: string
accountName: string
attributes:
- name: string
type: string
billingMode: string
dbClusterId: string
endpoint: string
globalSecondaryIndices:
- hashKey: string
name: string
nonKeyAttributes:
- string
projectionType: string
rangeKey: string
readCapacity: 0
writeCapacity: 0
hashKey: string
localSecondaryIndices:
- name: string
nonKeyAttributes:
- string
projectionType: string
rangeKey: string
rangeKey: string
readCapacity: 0
tableName: string
ttl:
attributeName: string
enabled: false
writeCapacity: 0
DynamoTable 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 DynamoTable resource accepts the following input properties:
- Db
Cluster stringId - The ID of the PolarDB cluster where DynamoDB is enabled.
- Endpoint string
- The PolarDB DynamoDB-compatible endpoint URL, in the format
http://<connection_string>:5432. - Table
Name string - The name of the DynamoDB-compatible table.
- Account
Auth string - The authentication password for PolarDB DynamoDB. Usually references the
dynamodbAuthPasswordattribute of analicloud.polardb.AccountwithaccountType = "DynamoDB". If not set, it is resolved from the cluster's DynamoDB-type account automatically. - Account
Name string - The account name for PolarDB DynamoDB authentication. If not set, it is resolved from the cluster's DynamoDB-type account automatically.
- Attributes
List<Pulumi.
Ali Cloud. Polar DB. Inputs. Dynamo Table Attribute> - List of attribute definitions for the table key schema and indexes. See
attributebelow. - Billing
Mode string - The billing mode of the table. Valid values:
PROVISIONED,PAY_PER_REQUEST. Default toPROVISIONED. - Global
Secondary List<Pulumi.Indices Ali Cloud. Polar DB. Inputs. Dynamo Table Global Secondary Index> - Describe a GSI for the table. See
globalSecondaryIndexbelow. Changing the key schema or projection of an existing index recreates that index. - Hash
Key string - The attribute name used as the partition key (hash key) of the table.
- Local
Secondary List<Pulumi.Indices Ali Cloud. Polar DB. Inputs. Dynamo Table Local Secondary Index> - Describe an LSI on the table. See
localSecondaryIndexbelow. - Range
Key string - The attribute name used as the sort key (range key) of the table.
- Read
Capacity int - The number of read capacity units. Required when
billingModeisPROVISIONED. - Ttl
Pulumi.
Ali Cloud. Polar DB. Inputs. Dynamo Table Ttl - Configuration block for TTL. See
ttlbelow. - Write
Capacity int - The number of write capacity units. Required when
billingModeisPROVISIONED.
- Db
Cluster stringId - The ID of the PolarDB cluster where DynamoDB is enabled.
- Endpoint string
- The PolarDB DynamoDB-compatible endpoint URL, in the format
http://<connection_string>:5432. - Table
Name string - The name of the DynamoDB-compatible table.
- Account
Auth string - The authentication password for PolarDB DynamoDB. Usually references the
dynamodbAuthPasswordattribute of analicloud.polardb.AccountwithaccountType = "DynamoDB". If not set, it is resolved from the cluster's DynamoDB-type account automatically. - Account
Name string - The account name for PolarDB DynamoDB authentication. If not set, it is resolved from the cluster's DynamoDB-type account automatically.
- Attributes
[]Dynamo
Table Attribute Args - List of attribute definitions for the table key schema and indexes. See
attributebelow. - Billing
Mode string - The billing mode of the table. Valid values:
PROVISIONED,PAY_PER_REQUEST. Default toPROVISIONED. - Global
Secondary []DynamoIndices Table Global Secondary Index Args - Describe a GSI for the table. See
globalSecondaryIndexbelow. Changing the key schema or projection of an existing index recreates that index. - Hash
Key string - The attribute name used as the partition key (hash key) of the table.
- Local
Secondary []DynamoIndices Table Local Secondary Index Args - Describe an LSI on the table. See
localSecondaryIndexbelow. - Range
Key string - The attribute name used as the sort key (range key) of the table.
- Read
Capacity int - The number of read capacity units. Required when
billingModeisPROVISIONED. - Ttl
Dynamo
Table Ttl Args - Configuration block for TTL. See
ttlbelow. - Write
Capacity int - The number of write capacity units. Required when
billingModeisPROVISIONED.
- db_
cluster_ stringid - The ID of the PolarDB cluster where DynamoDB is enabled.
- endpoint string
- The PolarDB DynamoDB-compatible endpoint URL, in the format
http://<connection_string>:5432. - table_
name string - The name of the DynamoDB-compatible table.
- account_
auth string - The authentication password for PolarDB DynamoDB. Usually references the
dynamodbAuthPasswordattribute of analicloud.polardb.AccountwithaccountType = "DynamoDB". If not set, it is resolved from the cluster's DynamoDB-type account automatically. - account_
name string - The account name for PolarDB DynamoDB authentication. If not set, it is resolved from the cluster's DynamoDB-type account automatically.
- attributes list(object)
- List of attribute definitions for the table key schema and indexes. See
attributebelow. - billing_
mode string - The billing mode of the table. Valid values:
PROVISIONED,PAY_PER_REQUEST. Default toPROVISIONED. - global_
secondary_ list(object)indices - Describe a GSI for the table. See
globalSecondaryIndexbelow. Changing the key schema or projection of an existing index recreates that index. - hash_
key string - The attribute name used as the partition key (hash key) of the table.
- local_
secondary_ list(object)indices - Describe an LSI on the table. See
localSecondaryIndexbelow. - range_
key string - The attribute name used as the sort key (range key) of the table.
- read_
capacity number - The number of read capacity units. Required when
billingModeisPROVISIONED. - ttl object
- Configuration block for TTL. See
ttlbelow. - write_
capacity number - The number of write capacity units. Required when
billingModeisPROVISIONED.
- db
Cluster StringId - The ID of the PolarDB cluster where DynamoDB is enabled.
- endpoint String
- The PolarDB DynamoDB-compatible endpoint URL, in the format
http://<connection_string>:5432. - table
Name String - The name of the DynamoDB-compatible table.
- account
Auth String - The authentication password for PolarDB DynamoDB. Usually references the
dynamodbAuthPasswordattribute of analicloud.polardb.AccountwithaccountType = "DynamoDB". If not set, it is resolved from the cluster's DynamoDB-type account automatically. - account
Name String - The account name for PolarDB DynamoDB authentication. If not set, it is resolved from the cluster's DynamoDB-type account automatically.
- attributes
List<Dynamo
Table Attribute> - List of attribute definitions for the table key schema and indexes. See
attributebelow. - billing
Mode String - The billing mode of the table. Valid values:
PROVISIONED,PAY_PER_REQUEST. Default toPROVISIONED. - global
Secondary List<DynamoIndices Table Global Secondary Index> - Describe a GSI for the table. See
globalSecondaryIndexbelow. Changing the key schema or projection of an existing index recreates that index. - hash
Key String - The attribute name used as the partition key (hash key) of the table.
- local
Secondary List<DynamoIndices Table Local Secondary Index> - Describe an LSI on the table. See
localSecondaryIndexbelow. - range
Key String - The attribute name used as the sort key (range key) of the table.
- read
Capacity Integer - The number of read capacity units. Required when
billingModeisPROVISIONED. - ttl
Dynamo
Table Ttl - Configuration block for TTL. See
ttlbelow. - write
Capacity Integer - The number of write capacity units. Required when
billingModeisPROVISIONED.
- db
Cluster stringId - The ID of the PolarDB cluster where DynamoDB is enabled.
- endpoint string
- The PolarDB DynamoDB-compatible endpoint URL, in the format
http://<connection_string>:5432. - table
Name string - The name of the DynamoDB-compatible table.
- account
Auth string - The authentication password for PolarDB DynamoDB. Usually references the
dynamodbAuthPasswordattribute of analicloud.polardb.AccountwithaccountType = "DynamoDB". If not set, it is resolved from the cluster's DynamoDB-type account automatically. - account
Name string - The account name for PolarDB DynamoDB authentication. If not set, it is resolved from the cluster's DynamoDB-type account automatically.
- attributes
Dynamo
Table Attribute[] - List of attribute definitions for the table key schema and indexes. See
attributebelow. - billing
Mode string - The billing mode of the table. Valid values:
PROVISIONED,PAY_PER_REQUEST. Default toPROVISIONED. - global
Secondary DynamoIndices Table Global Secondary Index[] - Describe a GSI for the table. See
globalSecondaryIndexbelow. Changing the key schema or projection of an existing index recreates that index. - hash
Key string - The attribute name used as the partition key (hash key) of the table.
- local
Secondary DynamoIndices Table Local Secondary Index[] - Describe an LSI on the table. See
localSecondaryIndexbelow. - range
Key string - The attribute name used as the sort key (range key) of the table.
- read
Capacity number - The number of read capacity units. Required when
billingModeisPROVISIONED. - ttl
Dynamo
Table Ttl - Configuration block for TTL. See
ttlbelow. - write
Capacity number - The number of write capacity units. Required when
billingModeisPROVISIONED.
- db_
cluster_ strid - The ID of the PolarDB cluster where DynamoDB is enabled.
- endpoint str
- The PolarDB DynamoDB-compatible endpoint URL, in the format
http://<connection_string>:5432. - table_
name str - The name of the DynamoDB-compatible table.
- account_
auth str - The authentication password for PolarDB DynamoDB. Usually references the
dynamodbAuthPasswordattribute of analicloud.polardb.AccountwithaccountType = "DynamoDB". If not set, it is resolved from the cluster's DynamoDB-type account automatically. - account_
name str - The account name for PolarDB DynamoDB authentication. If not set, it is resolved from the cluster's DynamoDB-type account automatically.
- attributes
Sequence[Dynamo
Table Attribute Args] - List of attribute definitions for the table key schema and indexes. See
attributebelow. - billing_
mode str - The billing mode of the table. Valid values:
PROVISIONED,PAY_PER_REQUEST. Default toPROVISIONED. - global_
secondary_ Sequence[Dynamoindices Table Global Secondary Index Args] - Describe a GSI for the table. See
globalSecondaryIndexbelow. Changing the key schema or projection of an existing index recreates that index. - hash_
key str - The attribute name used as the partition key (hash key) of the table.
- local_
secondary_ Sequence[Dynamoindices Table Local Secondary Index Args] - Describe an LSI on the table. See
localSecondaryIndexbelow. - range_
key str - The attribute name used as the sort key (range key) of the table.
- read_
capacity int - The number of read capacity units. Required when
billingModeisPROVISIONED. - ttl
Dynamo
Table Ttl Args - Configuration block for TTL. See
ttlbelow. - write_
capacity int - The number of write capacity units. Required when
billingModeisPROVISIONED.
- db
Cluster StringId - The ID of the PolarDB cluster where DynamoDB is enabled.
- endpoint String
- The PolarDB DynamoDB-compatible endpoint URL, in the format
http://<connection_string>:5432. - table
Name String - The name of the DynamoDB-compatible table.
- account
Auth String - The authentication password for PolarDB DynamoDB. Usually references the
dynamodbAuthPasswordattribute of analicloud.polardb.AccountwithaccountType = "DynamoDB". If not set, it is resolved from the cluster's DynamoDB-type account automatically. - account
Name String - The account name for PolarDB DynamoDB authentication. If not set, it is resolved from the cluster's DynamoDB-type account automatically.
- attributes List<Property Map>
- List of attribute definitions for the table key schema and indexes. See
attributebelow. - billing
Mode String - The billing mode of the table. Valid values:
PROVISIONED,PAY_PER_REQUEST. Default toPROVISIONED. - global
Secondary List<Property Map>Indices - Describe a GSI for the table. See
globalSecondaryIndexbelow. Changing the key schema or projection of an existing index recreates that index. - hash
Key String - The attribute name used as the partition key (hash key) of the table.
- local
Secondary List<Property Map>Indices - Describe an LSI on the table. See
localSecondaryIndexbelow. - range
Key String - The attribute name used as the sort key (range key) of the table.
- read
Capacity Number - The number of read capacity units. Required when
billingModeisPROVISIONED. - ttl Property Map
- Configuration block for TTL. See
ttlbelow. - write
Capacity Number - The number of write capacity units. Required when
billingModeisPROVISIONED.
Outputs
All input properties are implicitly available as output properties. Additionally, the DynamoTable resource produces the following output properties:
Look up Existing DynamoTable Resource
Get an existing DynamoTable 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?: DynamoTableState, opts?: CustomResourceOptions): DynamoTable@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_auth: Optional[str] = None,
account_name: Optional[str] = None,
arn: Optional[str] = None,
attributes: Optional[Sequence[DynamoTableAttributeArgs]] = None,
billing_mode: Optional[str] = None,
db_cluster_id: Optional[str] = None,
endpoint: Optional[str] = None,
global_secondary_indices: Optional[Sequence[DynamoTableGlobalSecondaryIndexArgs]] = None,
hash_key: Optional[str] = None,
local_secondary_indices: Optional[Sequence[DynamoTableLocalSecondaryIndexArgs]] = None,
range_key: Optional[str] = None,
read_capacity: Optional[int] = None,
table_name: Optional[str] = None,
ttl: Optional[DynamoTableTtlArgs] = None,
write_capacity: Optional[int] = None) -> DynamoTablefunc GetDynamoTable(ctx *Context, name string, id IDInput, state *DynamoTableState, opts ...ResourceOption) (*DynamoTable, error)public static DynamoTable Get(string name, Input<string> id, DynamoTableState? state, CustomResourceOptions? opts = null)public static DynamoTable get(String name, Output<String> id, DynamoTableState state, CustomResourceOptions options)resources: _: type: alicloud:polardb:DynamoTable get: id: ${id}import {
to = alicloud_polardb_dynamo_table.example
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.
- Account
Auth string - The authentication password for PolarDB DynamoDB. Usually references the
dynamodbAuthPasswordattribute of analicloud.polardb.AccountwithaccountType = "DynamoDB". If not set, it is resolved from the cluster's DynamoDB-type account automatically. - Account
Name string - The account name for PolarDB DynamoDB authentication. If not set, it is resolved from the cluster's DynamoDB-type account automatically.
- Arn string
- The ARN of the table, if returned by the endpoint.
- Attributes
List<Pulumi.
Ali Cloud. Polar DB. Inputs. Dynamo Table Attribute> - List of attribute definitions for the table key schema and indexes. See
attributebelow. - Billing
Mode string - The billing mode of the table. Valid values:
PROVISIONED,PAY_PER_REQUEST. Default toPROVISIONED. - Db
Cluster stringId - The ID of the PolarDB cluster where DynamoDB is enabled.
- Endpoint string
- The PolarDB DynamoDB-compatible endpoint URL, in the format
http://<connection_string>:5432. - Global
Secondary List<Pulumi.Indices Ali Cloud. Polar DB. Inputs. Dynamo Table Global Secondary Index> - Describe a GSI for the table. See
globalSecondaryIndexbelow. Changing the key schema or projection of an existing index recreates that index. - Hash
Key string - The attribute name used as the partition key (hash key) of the table.
- Local
Secondary List<Pulumi.Indices Ali Cloud. Polar DB. Inputs. Dynamo Table Local Secondary Index> - Describe an LSI on the table. See
localSecondaryIndexbelow. - Range
Key string - The attribute name used as the sort key (range key) of the table.
- Read
Capacity int - The number of read capacity units. Required when
billingModeisPROVISIONED. - Table
Name string - The name of the DynamoDB-compatible table.
- Ttl
Pulumi.
Ali Cloud. Polar DB. Inputs. Dynamo Table Ttl - Configuration block for TTL. See
ttlbelow. - Write
Capacity int - The number of write capacity units. Required when
billingModeisPROVISIONED.
- Account
Auth string - The authentication password for PolarDB DynamoDB. Usually references the
dynamodbAuthPasswordattribute of analicloud.polardb.AccountwithaccountType = "DynamoDB". If not set, it is resolved from the cluster's DynamoDB-type account automatically. - Account
Name string - The account name for PolarDB DynamoDB authentication. If not set, it is resolved from the cluster's DynamoDB-type account automatically.
- Arn string
- The ARN of the table, if returned by the endpoint.
- Attributes
[]Dynamo
Table Attribute Args - List of attribute definitions for the table key schema and indexes. See
attributebelow. - Billing
Mode string - The billing mode of the table. Valid values:
PROVISIONED,PAY_PER_REQUEST. Default toPROVISIONED. - Db
Cluster stringId - The ID of the PolarDB cluster where DynamoDB is enabled.
- Endpoint string
- The PolarDB DynamoDB-compatible endpoint URL, in the format
http://<connection_string>:5432. - Global
Secondary []DynamoIndices Table Global Secondary Index Args - Describe a GSI for the table. See
globalSecondaryIndexbelow. Changing the key schema or projection of an existing index recreates that index. - Hash
Key string - The attribute name used as the partition key (hash key) of the table.
- Local
Secondary []DynamoIndices Table Local Secondary Index Args - Describe an LSI on the table. See
localSecondaryIndexbelow. - Range
Key string - The attribute name used as the sort key (range key) of the table.
- Read
Capacity int - The number of read capacity units. Required when
billingModeisPROVISIONED. - Table
Name string - The name of the DynamoDB-compatible table.
- Ttl
Dynamo
Table Ttl Args - Configuration block for TTL. See
ttlbelow. - Write
Capacity int - The number of write capacity units. Required when
billingModeisPROVISIONED.
- account_
auth string - The authentication password for PolarDB DynamoDB. Usually references the
dynamodbAuthPasswordattribute of analicloud.polardb.AccountwithaccountType = "DynamoDB". If not set, it is resolved from the cluster's DynamoDB-type account automatically. - account_
name string - The account name for PolarDB DynamoDB authentication. If not set, it is resolved from the cluster's DynamoDB-type account automatically.
- arn string
- The ARN of the table, if returned by the endpoint.
- attributes list(object)
- List of attribute definitions for the table key schema and indexes. See
attributebelow. - billing_
mode string - The billing mode of the table. Valid values:
PROVISIONED,PAY_PER_REQUEST. Default toPROVISIONED. - db_
cluster_ stringid - The ID of the PolarDB cluster where DynamoDB is enabled.
- endpoint string
- The PolarDB DynamoDB-compatible endpoint URL, in the format
http://<connection_string>:5432. - global_
secondary_ list(object)indices - Describe a GSI for the table. See
globalSecondaryIndexbelow. Changing the key schema or projection of an existing index recreates that index. - hash_
key string - The attribute name used as the partition key (hash key) of the table.
- local_
secondary_ list(object)indices - Describe an LSI on the table. See
localSecondaryIndexbelow. - range_
key string - The attribute name used as the sort key (range key) of the table.
- read_
capacity number - The number of read capacity units. Required when
billingModeisPROVISIONED. - table_
name string - The name of the DynamoDB-compatible table.
- ttl object
- Configuration block for TTL. See
ttlbelow. - write_
capacity number - The number of write capacity units. Required when
billingModeisPROVISIONED.
- account
Auth String - The authentication password for PolarDB DynamoDB. Usually references the
dynamodbAuthPasswordattribute of analicloud.polardb.AccountwithaccountType = "DynamoDB". If not set, it is resolved from the cluster's DynamoDB-type account automatically. - account
Name String - The account name for PolarDB DynamoDB authentication. If not set, it is resolved from the cluster's DynamoDB-type account automatically.
- arn String
- The ARN of the table, if returned by the endpoint.
- attributes
List<Dynamo
Table Attribute> - List of attribute definitions for the table key schema and indexes. See
attributebelow. - billing
Mode String - The billing mode of the table. Valid values:
PROVISIONED,PAY_PER_REQUEST. Default toPROVISIONED. - db
Cluster StringId - The ID of the PolarDB cluster where DynamoDB is enabled.
- endpoint String
- The PolarDB DynamoDB-compatible endpoint URL, in the format
http://<connection_string>:5432. - global
Secondary List<DynamoIndices Table Global Secondary Index> - Describe a GSI for the table. See
globalSecondaryIndexbelow. Changing the key schema or projection of an existing index recreates that index. - hash
Key String - The attribute name used as the partition key (hash key) of the table.
- local
Secondary List<DynamoIndices Table Local Secondary Index> - Describe an LSI on the table. See
localSecondaryIndexbelow. - range
Key String - The attribute name used as the sort key (range key) of the table.
- read
Capacity Integer - The number of read capacity units. Required when
billingModeisPROVISIONED. - table
Name String - The name of the DynamoDB-compatible table.
- ttl
Dynamo
Table Ttl - Configuration block for TTL. See
ttlbelow. - write
Capacity Integer - The number of write capacity units. Required when
billingModeisPROVISIONED.
- account
Auth string - The authentication password for PolarDB DynamoDB. Usually references the
dynamodbAuthPasswordattribute of analicloud.polardb.AccountwithaccountType = "DynamoDB". If not set, it is resolved from the cluster's DynamoDB-type account automatically. - account
Name string - The account name for PolarDB DynamoDB authentication. If not set, it is resolved from the cluster's DynamoDB-type account automatically.
- arn string
- The ARN of the table, if returned by the endpoint.
- attributes
Dynamo
Table Attribute[] - List of attribute definitions for the table key schema and indexes. See
attributebelow. - billing
Mode string - The billing mode of the table. Valid values:
PROVISIONED,PAY_PER_REQUEST. Default toPROVISIONED. - db
Cluster stringId - The ID of the PolarDB cluster where DynamoDB is enabled.
- endpoint string
- The PolarDB DynamoDB-compatible endpoint URL, in the format
http://<connection_string>:5432. - global
Secondary DynamoIndices Table Global Secondary Index[] - Describe a GSI for the table. See
globalSecondaryIndexbelow. Changing the key schema or projection of an existing index recreates that index. - hash
Key string - The attribute name used as the partition key (hash key) of the table.
- local
Secondary DynamoIndices Table Local Secondary Index[] - Describe an LSI on the table. See
localSecondaryIndexbelow. - range
Key string - The attribute name used as the sort key (range key) of the table.
- read
Capacity number - The number of read capacity units. Required when
billingModeisPROVISIONED. - table
Name string - The name of the DynamoDB-compatible table.
- ttl
Dynamo
Table Ttl - Configuration block for TTL. See
ttlbelow. - write
Capacity number - The number of write capacity units. Required when
billingModeisPROVISIONED.
- account_
auth str - The authentication password for PolarDB DynamoDB. Usually references the
dynamodbAuthPasswordattribute of analicloud.polardb.AccountwithaccountType = "DynamoDB". If not set, it is resolved from the cluster's DynamoDB-type account automatically. - account_
name str - The account name for PolarDB DynamoDB authentication. If not set, it is resolved from the cluster's DynamoDB-type account automatically.
- arn str
- The ARN of the table, if returned by the endpoint.
- attributes
Sequence[Dynamo
Table Attribute Args] - List of attribute definitions for the table key schema and indexes. See
attributebelow. - billing_
mode str - The billing mode of the table. Valid values:
PROVISIONED,PAY_PER_REQUEST. Default toPROVISIONED. - db_
cluster_ strid - The ID of the PolarDB cluster where DynamoDB is enabled.
- endpoint str
- The PolarDB DynamoDB-compatible endpoint URL, in the format
http://<connection_string>:5432. - global_
secondary_ Sequence[Dynamoindices Table Global Secondary Index Args] - Describe a GSI for the table. See
globalSecondaryIndexbelow. Changing the key schema or projection of an existing index recreates that index. - hash_
key str - The attribute name used as the partition key (hash key) of the table.
- local_
secondary_ Sequence[Dynamoindices Table Local Secondary Index Args] - Describe an LSI on the table. See
localSecondaryIndexbelow. - range_
key str - The attribute name used as the sort key (range key) of the table.
- read_
capacity int - The number of read capacity units. Required when
billingModeisPROVISIONED. - table_
name str - The name of the DynamoDB-compatible table.
- ttl
Dynamo
Table Ttl Args - Configuration block for TTL. See
ttlbelow. - write_
capacity int - The number of write capacity units. Required when
billingModeisPROVISIONED.
- account
Auth String - The authentication password for PolarDB DynamoDB. Usually references the
dynamodbAuthPasswordattribute of analicloud.polardb.AccountwithaccountType = "DynamoDB". If not set, it is resolved from the cluster's DynamoDB-type account automatically. - account
Name String - The account name for PolarDB DynamoDB authentication. If not set, it is resolved from the cluster's DynamoDB-type account automatically.
- arn String
- The ARN of the table, if returned by the endpoint.
- attributes List<Property Map>
- List of attribute definitions for the table key schema and indexes. See
attributebelow. - billing
Mode String - The billing mode of the table. Valid values:
PROVISIONED,PAY_PER_REQUEST. Default toPROVISIONED. - db
Cluster StringId - The ID of the PolarDB cluster where DynamoDB is enabled.
- endpoint String
- The PolarDB DynamoDB-compatible endpoint URL, in the format
http://<connection_string>:5432. - global
Secondary List<Property Map>Indices - Describe a GSI for the table. See
globalSecondaryIndexbelow. Changing the key schema or projection of an existing index recreates that index. - hash
Key String - The attribute name used as the partition key (hash key) of the table.
- local
Secondary List<Property Map>Indices - Describe an LSI on the table. See
localSecondaryIndexbelow. - range
Key String - The attribute name used as the sort key (range key) of the table.
- read
Capacity Number - The number of read capacity units. Required when
billingModeisPROVISIONED. - table
Name String - The name of the DynamoDB-compatible table.
- ttl Property Map
- Configuration block for TTL. See
ttlbelow. - write
Capacity Number - The number of write capacity units. Required when
billingModeisPROVISIONED.
Supporting Types
DynamoTableAttribute, DynamoTableAttributeArgs
DynamoTableGlobalSecondaryIndex, DynamoTableGlobalSecondaryIndexArgs
- Name string
- The name of the index.
- Projection
Type string - The set of attributes projected into the index. Valid values:
ALL,KEYS_ONLY,INCLUDE. - Hash
Key string - The attribute name used as the partition key of the index.
- Non
Key List<string>Attributes - A set of non-key attribute names projected into the index. Only valid when
projectionTypeisINCLUDE. - Range
Key string - The attribute name used as the sort key of the index.
- Read
Capacity int - The number of read capacity units for the index. Only valid when
billingModeisPROVISIONED. - Write
Capacity int - The number of write capacity units for the index. Only valid when
billingModeisPROVISIONED.
- Name string
- The name of the index.
- Projection
Type string - The set of attributes projected into the index. Valid values:
ALL,KEYS_ONLY,INCLUDE. - Hash
Key string - The attribute name used as the partition key of the index.
- Non
Key []stringAttributes - A set of non-key attribute names projected into the index. Only valid when
projectionTypeisINCLUDE. - Range
Key string - The attribute name used as the sort key of the index.
- Read
Capacity int - The number of read capacity units for the index. Only valid when
billingModeisPROVISIONED. - Write
Capacity int - The number of write capacity units for the index. Only valid when
billingModeisPROVISIONED.
- name string
- The name of the index.
- projection_
type string - The set of attributes projected into the index. Valid values:
ALL,KEYS_ONLY,INCLUDE. - hash_
key string - The attribute name used as the partition key of the index.
- non_
key_ list(string)attributes - A set of non-key attribute names projected into the index. Only valid when
projectionTypeisINCLUDE. - range_
key string - The attribute name used as the sort key of the index.
- read_
capacity number - The number of read capacity units for the index. Only valid when
billingModeisPROVISIONED. - write_
capacity number - The number of write capacity units for the index. Only valid when
billingModeisPROVISIONED.
- name String
- The name of the index.
- projection
Type String - The set of attributes projected into the index. Valid values:
ALL,KEYS_ONLY,INCLUDE. - hash
Key String - The attribute name used as the partition key of the index.
- non
Key List<String>Attributes - A set of non-key attribute names projected into the index. Only valid when
projectionTypeisINCLUDE. - range
Key String - The attribute name used as the sort key of the index.
- read
Capacity Integer - The number of read capacity units for the index. Only valid when
billingModeisPROVISIONED. - write
Capacity Integer - The number of write capacity units for the index. Only valid when
billingModeisPROVISIONED.
- name string
- The name of the index.
- projection
Type string - The set of attributes projected into the index. Valid values:
ALL,KEYS_ONLY,INCLUDE. - hash
Key string - The attribute name used as the partition key of the index.
- non
Key string[]Attributes - A set of non-key attribute names projected into the index. Only valid when
projectionTypeisINCLUDE. - range
Key string - The attribute name used as the sort key of the index.
- read
Capacity number - The number of read capacity units for the index. Only valid when
billingModeisPROVISIONED. - write
Capacity number - The number of write capacity units for the index. Only valid when
billingModeisPROVISIONED.
- name str
- The name of the index.
- projection_
type str - The set of attributes projected into the index. Valid values:
ALL,KEYS_ONLY,INCLUDE. - hash_
key str - The attribute name used as the partition key of the index.
- non_
key_ Sequence[str]attributes - A set of non-key attribute names projected into the index. Only valid when
projectionTypeisINCLUDE. - range_
key str - The attribute name used as the sort key of the index.
- read_
capacity int - The number of read capacity units for the index. Only valid when
billingModeisPROVISIONED. - write_
capacity int - The number of write capacity units for the index. Only valid when
billingModeisPROVISIONED.
- name String
- The name of the index.
- projection
Type String - The set of attributes projected into the index. Valid values:
ALL,KEYS_ONLY,INCLUDE. - hash
Key String - The attribute name used as the partition key of the index.
- non
Key List<String>Attributes - A set of non-key attribute names projected into the index. Only valid when
projectionTypeisINCLUDE. - range
Key String - The attribute name used as the sort key of the index.
- read
Capacity Number - The number of read capacity units for the index. Only valid when
billingModeisPROVISIONED. - write
Capacity Number - The number of write capacity units for the index. Only valid when
billingModeisPROVISIONED.
DynamoTableLocalSecondaryIndex, DynamoTableLocalSecondaryIndexArgs
- Name string
- The name of the index.
- Projection
Type string - The set of attributes projected into the index. Valid values:
ALL,KEYS_ONLY,INCLUDE. - Range
Key string - The attribute name used as the sort key of the index.
- Non
Key List<string>Attributes - A list of non-key attribute names projected into the index. Only valid when
projectionTypeisINCLUDE.
- Name string
- The name of the index.
- Projection
Type string - The set of attributes projected into the index. Valid values:
ALL,KEYS_ONLY,INCLUDE. - Range
Key string - The attribute name used as the sort key of the index.
- Non
Key []stringAttributes - A list of non-key attribute names projected into the index. Only valid when
projectionTypeisINCLUDE.
- name string
- The name of the index.
- projection_
type string - The set of attributes projected into the index. Valid values:
ALL,KEYS_ONLY,INCLUDE. - range_
key string - The attribute name used as the sort key of the index.
- non_
key_ list(string)attributes - A list of non-key attribute names projected into the index. Only valid when
projectionTypeisINCLUDE.
- name String
- The name of the index.
- projection
Type String - The set of attributes projected into the index. Valid values:
ALL,KEYS_ONLY,INCLUDE. - range
Key String - The attribute name used as the sort key of the index.
- non
Key List<String>Attributes - A list of non-key attribute names projected into the index. Only valid when
projectionTypeisINCLUDE.
- name string
- The name of the index.
- projection
Type string - The set of attributes projected into the index. Valid values:
ALL,KEYS_ONLY,INCLUDE. - range
Key string - The attribute name used as the sort key of the index.
- non
Key string[]Attributes - A list of non-key attribute names projected into the index. Only valid when
projectionTypeisINCLUDE.
- name str
- The name of the index.
- projection_
type str - The set of attributes projected into the index. Valid values:
ALL,KEYS_ONLY,INCLUDE. - range_
key str - The attribute name used as the sort key of the index.
- non_
key_ Sequence[str]attributes - A list of non-key attribute names projected into the index. Only valid when
projectionTypeisINCLUDE.
- name String
- The name of the index.
- projection
Type String - The set of attributes projected into the index. Valid values:
ALL,KEYS_ONLY,INCLUDE. - range
Key String - The attribute name used as the sort key of the index.
- non
Key List<String>Attributes - A list of non-key attribute names projected into the index. Only valid when
projectionTypeisINCLUDE.
DynamoTableTtl, DynamoTableTtlArgs
- Attribute
Name string - The name of the attribute that stores the TTL timestamp.
- Enabled bool
- Whether TTL is enabled. Default to
false.
- Attribute
Name string - The name of the attribute that stores the TTL timestamp.
- Enabled bool
- Whether TTL is enabled. Default to
false.
- attribute_
name string - The name of the attribute that stores the TTL timestamp.
- enabled bool
- Whether TTL is enabled. Default to
false.
- attribute
Name String - The name of the attribute that stores the TTL timestamp.
- enabled Boolean
- Whether TTL is enabled. Default to
false.
- attribute
Name string - The name of the attribute that stores the TTL timestamp.
- enabled boolean
- Whether TTL is enabled. Default to
false.
- attribute_
name str - The name of the attribute that stores the TTL timestamp.
- enabled bool
- Whether TTL is enabled. Default to
false.
- attribute
Name String - The name of the attribute that stores the TTL timestamp.
- enabled Boolean
- Whether TTL is enabled. Default to
false.
Import
PolarDB DynamoDB-compatible table can be imported using the id, e.g.
$ pulumi import alicloud:polardb/dynamoTable:DynamoTable example pc-abc123456:table_name
NOTE: On import,
accountName,accountAuthand the endpoint address are resolved from the cluster automatically, butendpointis a required argument and must still be present in the resource block. In addition, the DynamoDB-compatible endpoint does not return billing and capacity information, sobillingMode,readCapacityandwriteCapacityare not populated on import and the first plan may show a diff for them.
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.
published on Monday, Aug 24, 2026 by Pulumi