Method: Fog::Compute::AWS::Real#allocate_address

Defined in:
lib/fog/aws/requests/compute/allocate_address.rb

#allocate_address(domain = 'standard') ⇒ Object

Acquire an elastic IP address.

Parameters

  • domain<~String> - Type of EIP, either standard or vpc

Returns

  • response<~Excon::Response>:

    • body<~Hash>:

      • ‘publicIp’<~String> - The acquired address

      • ‘requestId’<~String> - Id of the request

Amazon API Reference


19
20
21
22
23
24
25
26
# File 'lib/fog/aws/requests/compute/allocate_address.rb', line 19

def allocate_address(domain='standard')
  domain = domain == 'vpc' ? 'vpc' : 'standard'
  request(
    'Action'  => 'AllocateAddress',
    'Domain'  => domain,
    :parser   => Fog::Parsers::Compute::AWS::AllocateAddress.new
  )
end