Sha256: 9a297d0f500b4e88a5111611026f5eb8407ac8793c692d961cc1dd7b8137bb76

Contents?: true

Size: 701 Bytes

Versions: 2

Compression:

Stored size: 701 Bytes

Contents

module Fog
  module DNS
    class AzureRM
      class RecordSet < Fog::Model
        identity :name
        attribute :resource_group
        attribute :zone_name
        attribute :records
        attribute :type
        attribute :ttl

        def save
          requires :name
          requires :resource_group
          requires :zone_name
          requires :records
          requires :type
          requires :ttl
          service.create_record_set(resource_group, zone_name, name, records, type, ttl)
        end

        def destroy
          service.delete_record_set(name, resource_group, zone_name, type.split("/").last)
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fog-azure-rm-0.0.1 lib/fog/azurerm/models/dns/record_set.rb
fog-azure-rm-0.0.0 lib/fog/azurerm/models/dns/record_set.rb