Class: Dyn::Traffic::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/dyn/traffic/base.rb

Direct Known Subclasses

GSLB, Session, Zone

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#zoneObject

Returns the value of attribute zone.



24
25
26
# File 'lib/dyn/traffic/base.rb', line 24

def zone
  @zone
end

Instance Method Details

#freezeHash

Parameters:

  • The (String)

    zone to freeze - if one is provided when instantiated, we use that.

Returns:

  • (Hash)

    The dynect API response



42
43
44
# File 'lib/dyn/traffic/base.rb', line 42

def freeze
  @dyn.put("Zone/#{@zone}", { "freeze" => true })
end

#publishHash

Publish any pending changes to the zone - required to make any alterations permanent.

See: manage.dynect.net/help/docs/api2/rest/resources/Zone.html

Parameters:

  • The (String)

    zone to publish - if one is provided when instantiated, we use that.

Returns:

  • (Hash)

    The dynect API response



32
33
34
# File 'lib/dyn/traffic/base.rb', line 32

def publish
  @dyn.put("Zone/#{@zone}", { "publish" => true })
end

#thawHash

Parameters:

  • The (String)

    zone to thaw - if one is provided when instantiated, we use that.

Returns:

  • (Hash)

    The dynect API response



52
53
54
# File 'lib/dyn/traffic/base.rb', line 52

def thaw
  @dyn.put("Zone/#{@zone}", { "thaw" => true })
end