Sha256: c6c917d6bb2d824017987e8fab0101c281d2d7744a4b3a7677dabd0562b05ba2

Contents?: true

Size: 851 Bytes

Versions: 5

Compression:

Stored size: 851 Bytes

Contents

module Azure
  module Armrest
    module Network
      # Class for managing public IP addresss.
      class IpAddressService < ResourceGroupBasedService

        # Creates and returns a new IpAddressService instance.
        #
        def initialize(_armrest_configuration, options = {})
          super
          @provider = options[:provider] || 'Microsoft.Network'
          @service_name = 'publicIPAddresses'
          set_service_api_version(options, @service_name)
        end

        # Shortcut method that returns just the IP address for the given public
        # IP address name.
        #
        def get_ip(ip_name, resource_group = armrest_configuration.resource_group)
          get(ip_name, resource_group).properties.ip_address
        end

        alias get_ip_address get_ip
      end
    end # Network
  end # Armrest
end # Azure

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
azure-armrest-0.0.9 lib/azure/armrest/network/ip_address_service.rb
azure-armrest-0.0.8 lib/azure/armrest/network/ip_address_service.rb
azure-armrest-0.0.7 lib/azure/armrest/network/ip_address_service.rb
azure-armrest-0.0.6 lib/azure/armrest/network/ip_address_service.rb
azure-armrest-0.0.5 lib/azure/armrest/network/ip_address_service.rb