ruby-on-rails - AWS:Ruby describe_instance_type_offerings() 给出异常:“未定义的方法”
问题描述
我使用了这个参考:AWS SDK for Ruby:describe_instance_type_offerings()
当我尝试实现这一点时,它给出了一个例外:
Undefined method
请指导我。
client = Aws::EC2::Client.new
resp = client.describe_instance_type_offerings(
{
dry_run: false,
location_type: "region",
filters: [
{
name: "location",
values: ["us-east-1"],
},
],
max_results: 1,
next_token: "NextToken",
}
)
解决方案
请确保您使用的是最新版本的适用于 Ruby 的 AWS 开发工具包,因为此命令是最近才添加的。
虽然 API 是向后兼容的,但需要更新库以访问更新的函数和功能。
推荐阅读
- javascript - 覆盖导入的样式组件 CSS 属性
- java - 将 IBM StartupBean EJB1.1 迁移到 @Startup EJB3.1
- wordpress - 在自定义帖子类型下列出帖子中的所有标签
- android - 为什么 APK 包含 v4 支持资源?
- arrays - 红宝石字符串 end_with?大批
- r - 如何将列表值存储到矩阵中
- sql - 如何在 SQL 数据库中组织 10.000 个不同大小的表
- android - 反应原生构建开始失败,因为 Gradle 找不到找不到 play-services-basement
- javascript - jsPlumb - 禁用端点拖动
- facebook-graph-api - Facebook Graph API:page_fans_online,将日期本地化到企业所在的位置