Can't delete dns record using changes().create()

27 views
Skip to first unread message

NKA

unread,
Aug 7, 2020, 8:17:15 AM8/7/20
to cloud-dns-discuss
Hi,
I have got the changes from changes().list() and stored the changes with a dnsname 'xxx'
in a list. I moved the record in that change from additions to deletions list. With the modified json I am calling the changes().create() and I am getting error Precondition not met for \'entity.change.deletions[0]\'

Json I got from changes().list():
{u'additions': [{u'kind': u'dns#resourceRecordSet',
                  u'name': u'abc.com.',
                  u'rrdatas': [u'ns-cloud-c1.googledomains.com. cloud-dns-hostmaster.google.com. 2118 21600 3600 259200 300'],
                  u'signatureRrdatas': [],
                  u'ttl': 21600,
                  u'type': u'SOA'},
                 {u'kind': u'dns#resourceRecordSet',
                  u'name': u'xxx.abc.com.',
                  u'rrdatas': [u'34.76.78.35'],
                  u'signatureRrdatas': [],
                  u'ttl': 30,
                  u'type': u'A'}],
  u'deletions': [{u'kind': u'dns#resourceRecordSet',
                  u'name': u'abc.com.',
                  u'rrdatas': [u'ns-cloud-c1.googledomains.com. cloud-dns-hostmaster.google.com. 2117 21600 3600 259200 300'],
                  u'signatureRrdatas': [],
                  u'ttl': 21600,
                  u'type': u'SOA'}],
  u'id': u'2184',
  u'kind': u'dns#change',
  u'startTime': u'2020-07-13T18:04:34.896Z',
  u'status': u'done'}

Json I am passing to delete the record:
{u'additions': [{u'kind': u'dns#resourceRecordSet',
                  u'name': u'abc.com.',
                  u'rrdatas': [u'ns-cloud-c1.googledomains.com. cloud-dns-hostmaster.google.com. 2118 21600 3600 259200 300'],
                  u'signatureRrdatas': [],
                  u'ttl': 21600,
                  u'type': u'SOA'}],
  u'deletions': [{u'kind': u'dns#resourceRecordSet',
                  u'name': u'abc.com.',
                  u'rrdatas': [u'ns-cloud-c1.googledomains.com. cloud-dns-hostmaster.google.com. 2117 21600 3600 259200 300'],
                  u'signatureRrdatas': [],
                  u'ttl': 21600,
                  u'type': u'SOA'},
                 {u'kind': u'dns#resourceRecordSet',
                  u'name': u'xxx.abc.com.',
                  u'rrdatas': [u'34.76.78.35'],
                  u'signatureRrdatas': [],
                  u'ttl': 30,
                  u'type': u'A'}],
  u'id': u'2184',
  u'kind': u'dns#change',
  u'startTime': u'2020-07-13T18:04:34.896Z',
  u'status': u'done'}

What am I missing here? Anyone please help me. 

Ahmad Elias Hamanudin

unread,
Aug 7, 2020, 6:29:29 PM8/7/20
to cloud-dns-discuss
Google Groups is reserved for general inquiries related to products. I would advise you to please post your question on Stack Overflow [1] or Server Fault [2] to receive technical assistance. Or if you have a support plan [3], please open a ticket with GCP support.

[1] https://stackoverflow.com/
[2] https://serverfault.com/
[3] https://cloud.google.com/support
Reply all
Reply to author
Forward
0 new messages