describeTable

Spec

async deleteTable(): Promise<DeleteTableOutput>

Get table information corresponding TynamoTable .

Output

Name

Type

Information

TableDescription?

Represents the properties of the table.

Example

@DynamoEntity({
    TableName: "MyCatTable",
    BillingMode: "PAY_PER_REQUEST"
})
class Cat {
    @DynamoProperty({ keyType: KeyType.hash })
    id!: number;

    @DynamoProperty({ keyType: KeyType.attr })
    name!: string;

    @DynamoProperty({ keyType: KeyType.attr, dataType: DataType.NS })
    favoriteNumbers!: number[];

    constructor(id: number, name: string, favoriteNumbers: number[]) {
        this.id = id;
        this.name = name;
        this.favoriteNumbers = favoriteNumbers;
    }
}

const tynamo: Tynamo = new Tynamo({
    region: "ap-northeast-2",
    endpoint: "http://localhost:8000"
});

const tynamoTable: TynamoTable<Cat> = tynamo.getTableOf(Cat);
await tynamoTable.describeTable();

Last updated