Amazon DynamoDB
入门指南 (API Version 2012-08-10)
AWS 服务或AWS文档中描述的功能,可能因地区/位置而异。点 击 Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

步骤 5:(可选) 删除表

删除 Movies 表:

  1. 将以下程序复制到名为 MoviesDeleteTable.rb 的文件中。

    require "aws-sdk-core" Aws.config.update({ region: "us-west-2", endpoint: "http://localhost:8000" }) dynamodb = params = { table_name: "Movies" } begin result = dynamodb.delete_table(params) puts "Deleted table." rescue Aws::DynamoDB::Errors::ServiceError => error puts "Unable to delete table:" puts "#{error.message}" end
  2. 键入以下命令以运行程序:

    ruby MoviesDeleteTable.rb