lib/ultradns/api/zone.rb
def create(account_name, options = {})
    zone_properties = {name: @zone_name, accountName: account_name, type: 'PRIMARY'}

    primary_zone_info = {}
    if options[:properties][:type] == 'PRIMARY' || options[:properties][:type] == nil
      primary_zone_info = {forceImport: true, createType: 'NEW'}
    end

    zone_data = {properties: zone_properties,
                 primaryCreateInfo: primary_zone_info}.merge(options)

    with_auth_retry {|c| c.post '/zones', request_options({body: zone_data.to_json}) }
  end
# Create a zone
#
# === Required Parameters
#
# * +account_name+ - The account that the zone will be created under.  The user must have write access for zones in that account.
#
# === Optional Parameters
#
# * +type+ - The type of zone to be created, one of three possible values: PRIMARY,  SECONDARY, or ALIAS.
#
# See documentation section: Primary Zone DTO or Secondary Zone DTO for further options.
# === Examples
#
#     c.create('my_account')
Create a zone
Required Parameters

+account_name+ - The account that the zone will be created under.  The user must have write access for zones in that account.

Optional Parameters

+type+ - The type of zone to be created, one of three possible values: PRIMARY,  SECONDARY, or ALIAS.

See documentation section: Primary Zone DTO or Secondary Zone DTO for further options.
Examples


Create a zone Required Parameters + account_name + - The account that the zone will be created under . The user must have write access for zones in that account . Optional Parameters + type + - The type of zone to be created one of three possible values : PRIMARY SECONDARY or ALIAS . See documentation section : Primary Zone DTO or Secondary Zone DTO for further options . Examples
def create(account_name, options = {})
    zone_properties = {name: @zone_name, accountName: account_name, type: 'PRIMARY'}
    primary_zone_info = {}
    if options[:properties][:type] == 'PRIMARY' || options[:properties][:type] == nil
      primary_zone_info = {forceImport: true, createType: 'NEW'}
    end
    zone_data = {properties: zone_properties,
                 primaryCreateInfo: primary_zone_info}.merge(options)
    with_auth_retry {|c| c.post '/zones', request_options({body: zone_data.to_json}) }
  end
def create ( account_name , options = { } ) zone_properties = { name : @zone_name , accountName : account_name , type : 'PRIMARY' } primary_zone_info = { } if options [ :properties ] [ :type ] == 'PRIMARY' || options [ :properties ] [ :type ] == nil primary_zone_info = { forceImport : true , createType : 'NEW' } end zone_data = { properties : zone_properties , primaryCreateInfo : primary_zone_info } . merge ( options ) with_auth_retry { | c | c . post '/zones' , request_options ( { body : zone_data . to_json } ) } end
Create a zone
 Required Parameters
Create a zone Required Parameters
account_name
options