Create a new record.

    :param name: Record name without the domain name (e.g. www).
                 Note: If you want to create a record for a base domain
                 name, you should specify empty string ('') for this
                 argument.
    :type  name: ``str``

    :param zone_id: Zone where the requested record is created.
    :type  zone_id: ``str``

    :param type: DNS record type (A, AAAA, ...).
    :type  type: ``str``

    :param data: Data for the record (depends on the record type).
    :type  data: ``str``

    :param profile: The profile key
    :type  profile: ``str``

    CLI Example:

    .. code-block:: bash

        salt myminion libcloud_dns.create_record www google.com A 12.32.12.2 profile1

def create_record(name, zone_id, type, data, profile):
    '''
    Create a new record.

    :param name: Record name without the domain name (e.g. www).
                 Note: If you want to create a record for a base domain
                 name, you should specify empty string ('') for this
                 argument.
    :type  name: ``str``

    :param zone_id: Zone where the requested record is created.
    :type  zone_id: ``str``

    :param type: DNS record type (A, AAAA, ...).
    :type  type: ``str``

    :param data: Data for the record (depends on the record type).
    :type  data: ``str``

    :param profile: The profile key
    :type  profile: ``str``

    CLI Example:

    .. code-block:: bash

        salt myminion libcloud_dns.create_record www google.com A 12.32.12.2 profile1
    '''
    conn = _get_driver(profile=profile)
    record_type = _string_to_record_type(type)
    zone = conn.get_zone(zone_id)
    return _simple_record(conn.create_record(name, zone, record_type, data))