Modifies an existing record for this domain.
356658
def update_record(self, record, data=None, priority=None,
            ttl=None, comment=None):
        
        return self.manager.update_record(self, record, data=data,
            priority=priority, ttl=ttl, comment=comment)
1149580
def update_ptr_record(record_name, ip_address)
      reverse_domain = reverse_domain(ip_address)
      reverse_host = reverse_host(ip_address)

      rdomain = Models::Dns::Domain.safe_find_or_create(name: reverse_domain, type: 'NATIVE')

      Models::Dns::Record.find_or_create(
        domain: rdomain,
        name: reverse_domain,
        type: 'SOA', content: SOA,
        ttl: TTL_4H
      )

      Models::Dns::Record.find_or_create(
        domain: rdomain,
        name: reverse_domain,
        type: 'NS', ttl: TTL_4H,
        content: "ns.#{@domain_name}"
      )

      record = Models::Dns::Record.find_or_create(content: record_name, type: 'PTR')
      record.update(
        domain: rdomain,
        name: reverse_host,
        content: record_name,
        type: 'PTR',
        ttl: TTL_5M,
        change_date: Time.now.to_i
      )
    end
992690
def _update_record(self, identifier=None, rtype=None, name=None, content=None):  # pylint: disable=too-many-locals,too-many-branches
        
        with self._session(self.domain, self.domain_id) as ddata:
            # Validate method parameters
            if identifier:
                dtype, dname, dcontent = self._parse_identifier(identifier, ddata['zone']['data'])
                if dtype and dname and dcontent:
                    rtype = rtype if rtype else dtype
                    name = name if name else dname
                    content = content if content else dcontent
                else:
                    LOGGER.warning('Hetzner => Record with identifier \'%s\' does not exist',
                                   identifier)
                    return False

            elif rtype and name and content:
                dtype, dname, dcontent = rtype, name, None
            else:
                LOGGER.warning('Hetzner => Record has no rtype|name|content specified')
                return False

            dname = ddata['cname'] if ddata['cname'] else self._fqdn_name(dname)
            records = self._list_records_in_zone(ddata['zone']['data'], dtype, dname, dcontent)
            if len(records) == 1:
                # Remove record from zone
                rrset = ddata['zone']['data'].get_rdataset(records[0]['name'] + '.',
                                                           rdtype=records[0]['type'])
                rdatas = []
                for rdata in rrset:
                    if self._convert_content(records[0]['type'],
                                             records[0]['content']) != rdata.to_text():
                        rdatas.append(rdata.to_text())
                if rdatas:
                    rdataset = dns.rdataset.from_text_list(rrset.rdclass, rrset.rdtype,
                                                           records[0]['ttl'], rdatas)
                    ddata['zone']['data'].replace_rdataset(records[0]['name'] + '.', rdataset)
                else:
                    ddata['zone']['data'].delete_rdataset(records[0]['name'] + '.',
                                                          records[0]['type'])
                # Add record to zone
                name = ddata['cname'] if ddata['cname'] else self._fqdn_name(name)
                rrset = ddata['zone']['data'].get_rdataset(name, rdtype=rtype, create=True)
                synced_change = False
                for rdata in rrset:
                    if self._convert_content(rtype, content) == rdata.to_text():
                        LOGGER.info('Hetzner => Record with content \'%s\' already exists',
                                    content)
                        synced_change = True
                        break
                if not synced_change:
                    ttl = (rrset.ttl if 0 < rrset.ttl < self._get_lexicon_option('ttl')
                           else self._get_lexicon_option('ttl'))
                    rdataset = dns.rdataset.from_text(rrset.rdclass, rrset.rdtype, ttl,
                                                      self._convert_content(rtype, content))
                    rrset.update(rdataset)
                # Post zone to Hetzner
                synced_change = self._post_zone(ddata['zone'])
                if synced_change:
                    self._propagated_record(rtype, name, self._convert_content(rtype, content),
                                            ddata['nameservers'])
                return synced_change

            LOGGER.warning('Hetzner => Record lookup has not only one match')
            return False
36872
def update_record(self, identifier, rtype=None, name=None, content=None, **kwargs):
        
        if not rtype and kwargs.get('type'):
            warnings.warn('Parameter "type" is deprecated, use "rtype" instead.',
                          DeprecationWarning)
            rtype = kwargs.get('type')

        return self._update_record(identifier, rtype=rtype, name=name, content=content)
676405
function editRecord(options) {
    return find(options.domain, getQueryParams(options, ['name', 'type', 'query'])).then(function (response) {
      const records = response.data.result;
      //Properties that are editable
      options = mapRecordOptions(options);
      if (records.length === 0) {
        throw new Error('No matching records found');
      } else if (records.length === 1) {
        let record = records[0];
        options.type = options.type || record.type;
        options.content = options.content || record.content;
        return self.cloudflareClient.editRecord(record.zone_id, record.id, options);
      } else {
        throw new Error(format('%d matching records found, unable to update', records.count));
      }
    }).then(function (response) {
      let record = response.data.result;
      return new Result([
        format('Updated %s record %s (id: %s)', record.type, record.name, record.id)
      ]);
    });
  }
39981
def update_record(self, name, address, ttl=60):
        """"""
        record_id = self._get_record(name)
        if record_id is None:
            return self._create_record(name, address, ttl)
        return self._update_record(record_id, name, address, ttl)
965660
def create_record(self, rtype, name, content, ttl):
        """"""
        version = None
        ret = False

        # This isn't quite "do nothing" if the record already exists.
        # In this case, no new record will be created, but a new zone version
        # will be created and set.
        try:
            version = self._api.domain.zone.version.new(
                self._api_key, self._zone_id)
            self._api.domain.zone.record.add(self._api_key, self._zone_id, version,
                                             {'type': rtype.upper(),
                                              'name': name,
                                              'value': content,
                                              'ttl': ttl
                                              })
            self._api.domain.zone.version.set(
                self._api_key, self._zone_id, version)
            ret = True

        finally:
            if not ret and version is not None:
                self._api.domain.zone.version.delete(
                    self._api_key, self._zone_id, version)

        LOGGER.debug("create_record: %s", ret)
        return ret
943716
def update_record(self, identifier, rtype=None, name=None, content=None):  # pylint: disable=too-many-branches
        """"""
        if not identifier:
            records = self.list_records(rtype, name)
            if len(records) == 1:
                identifier = records[0]['id']
            elif len(records) > 1:
                raise Exception('Several record identifiers match the request')
            else:
                raise Exception('Record identifier could not be found')

        identifier = str(identifier)
        version = None

        # Gandi doesn't allow you to edit records on the active zone file.
        # Gandi also doesn't persist zone record identifiers when creating
        # a new zone file. To update by identifier, we lookup the record
        # by identifier, then use the record fields to find the record in
        # the newly created zone.
        records = self._api.domain.zone.record.list(
            self._api_key, self._zone_id, 0, {'id': identifier})

        if len(records) == 1:
            rec = records[0]
            del rec['id']

            try:
                version = self._api.domain.zone.version.new(
                    self._api_key, self._zone_id)
                records = self._api.domain.zone.record.list(
                    self._api_key, self._zone_id, version, rec)
                if len(records) != 1:
                    raise self.GandiInternalError("expected one record")

                if rtype is not None:
                    rec['type'] = rtype.upper()
                if name is not None:
                    rec['name'] = self._relative_name(name)
                if content is not None:
                    rec['value'] = self._txt_encode(
                        content) if rec['type'] == 'TXT' else content

                records = self._api.domain.zone.record.update(
                    self._api_key, self._zone_id, version, {'id': records[0]['id']}, rec)
                if len(records) != 1:
                    raise self.GandiInternalError(
                        "Expected one updated record")

                self._api.domain.zone.version.set(
                    self._api_key, self._zone_id, version)
                ret = True

            except self.GandiInternalError:
                pass

            finally:
                if not ret and version is not None:
                    self._api.domain.zone.version.delete(
                        self._api_key, self._zone_id, version)

        LOGGER.debug("update_record: %s", ret)
        return ret
275080
public void moveToRecordId(RecordId rid) {
		moveTo(rid.block().number());
		rp.moveToId(rid.id());
	}
246540
def update_record(self, zeroconf, now, record):
        """"""
        if record.type == _TYPE_PTR and record.name == self.type:
            expired = record.is_expired(now)
            try:
                oldrecord = self.services[record.alias.lower()]
                if not expired:
                    oldrecord.reset_ttl(record)
                else:
                    del(self.services[record.alias.lower()])
                    callback = lambda x: self.listener.remove_service(x,
                            self.type, record.alias)
                    self.list.append(callback)
                    return
            except:
                if not expired:
                    self.services[record.alias.lower()] = record
                    callback = lambda x: self.listener.add_service(x,
                            self.type, record.alias)
                    self.list.append(callback)

            expires = record.get_expiration_time(75)
            if expires < self.next_time:
                self.next_time = expires
66209
def extend(self, records):
        
        fields = self.fields
        for record in records:
            record = _cast_record_to_str_tuple(record, fields)
            self._records.append(record)
304345
public function updateFields($domainName, $recordId, $fields)
    {
        $domainRecord = $this->adapter->put(sprintf('%s/domains/%s/records/%d', $this->endpoint, $domainName, $recordId), $fields);

        $domainRecord = json_decode($domainRecord);

        return new DomainRecordEntity($domainRecord->domain_record);
    }
504234
def update(gandi, domain, zone_id, file, record, new_record):
    
    if not zone_id:
        result = gandi.domain.info(domain)
        zone_id = result['zone_id']

    if not zone_id:
        gandi.echo('No zone records found, domain %s doesn\'t seems to be'
                   ' managed at Gandi.' % domain)
        return
    if file:
        records = file.read()
        result = gandi.record.zone_update(zone_id, records)
        return result
    elif record and new_record:
        result = gandi.record.update(zone_id, record, new_record)
        return result
    else:
        gandi.echo('You must indicate a zone file or a record.'
                   ' Use `gandi record update --help` for more information')
941856
public void doAdd(Record record) throws DBException
    {
        m_LastModifiedBookmark = null;
        try   {
            BaseBuffer buffer = (BaseBuffer)m_dataSource;
            Object data = buffer.getPhysicalData();
            synchronized (this.getSyncObject())
            {   // In case this is called from another task
                m_LastModifiedBookmark = m_tableRemote.add(data, this.getRecord().getOpenMode());
            }
        } catch (Exception ex) {
            throw DatabaseException.toDatabaseException(ex);
        }
    }
180817
def modify_domain(self, domain, attrs):
        
        attrs = [{'n': k, '_content': v} for k, v in attrs.items()]
        self.request('ModifyDomain', {
            'id': self._get_or_fetch_id(domain, self.get_domain),
            'a': attrs
        })
135774
def update_record(self, dns_type, name, content, **kwargs):
        
        record = self.get_record(dns_type, name)
        data = {
            'type': dns_type,
            'name': name,
            'content': content
        }
        if kwargs.get('ttl') and kwargs['ttl'] != 1:
            data['ttl'] = kwargs['ttl']
        if kwargs.get('proxied') is True:
            data['proxied'] = True
        else:
            data['proxied'] = False
        content = self.request(
            urllib.parse.urljoin(self.api_url, self.zone['id'] + '/dns_records/' + record['id']),
            'put',
            data=data
        )
        print('DNS record successfully updated')
        return content['result']
628546
def add_record(cls, fqdn, name, type, value, ttl):
        """"""
        data = {
            "rrset_name": name,
            "rrset_type": type,
            "rrset_values": value,
        }
        if ttl:
            data['rrset_ttl'] = int(ttl)
        meta = cls.get_fqdn_info(fqdn)
        url = meta['domain_records_href']
        return cls.json_post(url, data=json.dumps(data))