English | 简体中文
Alibaba Cloud Core SDK for Ruby allows you to access Alibaba Cloud services such as Elastic Compute Service (ECS), Server Load Balancer (SLB), and CloudMonitor. You can access Alibaba Cloud services without the need to handle API related tasks, such as signing and constructing your requests.
This document introduces how to install and use Alibaba Cloud Core SDK for Ruby.
$ gem install aliyunsdkcore
The RPC demo:
require 'aliyunsdkcore'
client = RPCClient.new(
endpoint: 'https://ecs.aliyuncs.com',
api_version: '2014-05-26',
access_key_id: ENV['ACCESS_KEY_ID'],
access_key_secret: ENV['ACCESS_KEY_SECRET'],
)
params = { key: (1..11).to_a.map(&:to_s) }
request_option = { method: 'POST', timeout: 15000 }
response = client.request(
action: 'DescribeRegions',
params: params,
opts: request_option
)
print response
The ROA demo:
require 'aliyunsdkcore'
client = ROAClient.new(
endpoint: 'http://ros.aliyuncs.com',
api_version: '2015-09-01',
access_key_id: ENV['ACCESS_KEY_ID'],
access_key_secret: ENV['ACCESS_KEY_SECRET'],
)
response = client.request(
method: 'GET',
uri: '/regions',
options: {
timeout: 15000
}
)
print response.body
Opening an Issue, Issues not conforming to the guidelines may be closed immediately.
Detailed changes for each release are documented in the release notes.
Please make sure to read the Contributing Guide before making a pull request.
Copyright 1999-2019 Alibaba Group Holding Ltd.