Sha256: 032d100284ef3c2ca8a79d8671092f901394f3dbadccc1b650c147db43812dac

Contents?: true

Size: 1.66 KB

Versions: 6

Compression:

Stored size: 1.66 KB

Contents

module Fog
  module Compute
    class Aliyun
      class Real
        # {Aliyun API Reference}[https://docs.aliyun.com/?spm=5176.100054.3.1.DGkmH7#/pub/ecs/open-api/network&describeeipaddress]
        def list_eip_addresses(options = {})
          _action = 'DescribeEipAddresses'
          _sigNonce = randonStr
          _time = Time.new.utc

          _parameters = defalutParameters(_action, _sigNonce, _time)
          _pathURL = defaultAliyunUri(_action, _sigNonce, _time)

          _Status = options[:state]
          if _Status
            _parameters['Status'] = _Status
            _pathURL += '&Status=' + _Status
          end

          _EipAddress = options[:ip_address]
          if _EipAddress
            _parameters['EipAddress'] = _EipAddress
            _pathURL += '&EipAddress=' + _EipAddress
          end

          _AllocationId = options[:allocation_id]
          if _AllocationId
            _parameters['AllocationId'] = _AllocationId
            _pathURL += '&AllocationId=' + _AllocationId
          end

          _PageNumber = options[:page_number]
          if _PageNumber
            _parameters['PageNumber'] = _PageNumber
            _pathURL += '&PageNumber=' + _PageNumber
          end

          _PageSize = options[:page_size]
          _PageSize = '50' unless _PageSize
          _parameters['PageSize'] = _PageSize
          _pathURL += '&PageSize=' + _PageSize

          _signature = sign(@aliyun_accesskey_secret, _parameters)
          _pathURL += '&Signature=' + _signature

          request(
            expects: [200, 204],
            method: 'GET',
            path: _pathURL
          )
        end
      end
    end # aliyun
  end # compute
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
fog-aliyun-0.3.0 lib/fog/aliyun/requests/compute/list_eip_addresses.rb
fog-aliyun-0.2.2 lib/fog/aliyun/requests/compute/list_eip_addresses.rb
fog-xiaozhu-0.2.2 lib/fog/aliyun/requests/compute/list_eip_addresses.rb
fog-xiaozhu-0.2.1 lib/fog/aliyun/requests/compute/list_eip_addresses.rb
fog-aliyun-0.2.1 lib/fog/aliyun/requests/compute/list_eip_addresses.rb
fog-aliyun-0.2.0 lib/fog/aliyun/requests/compute/list_eip_addresses.rb