Page Name: dns-usage
Release: 0.16.0
As noted at https://groups.google.com/d/msg/cloud-dns-discuss/m5CHw1ncS14/lTKvD7O_BgAJ
this example of the DNS API doesn't actually work:
> >> import time
> >> from gcloud import dns
> >> client = dns .Client (project = 'PROJECT_ID' )
> >> zone = client .zone ('acme-co' , 'example.com' )
> >> TWO_HOURS = 2 * 60 * 60 # seconds
> >> record_set = zone .resource_record_set (
... 'www.example.com' , 'CNAME' , TWO_HOURS , 'www1.example.com' )
> >> changes = zone .changes ()
> >> changes .add_record_set (record_set )
> >> changes .create () # API request
> >> while changes .status != 'done' :
... print ('Waiting for changes to complete' )
... time .sleep (60 ) # or whatever interval is appropriate
... changes .reload () # API request
Needs to be in this form:
CNAME:
record_set = zone .resource_record_set ('www.example.com.' , 'CNAME' ,
3600 , ['www1.example.com.' ,])
Or for A records:
record_set = zone .resource_record_set ('www.example.com.' , 'A' ,
3600 , ['11.111.11.111' ,])
Resource records need to be in a List form, DNS records seem to need the trailing dot.
Reactions are currently unavailable
Page Name: dns-usage
Release: 0.16.0
As noted at https://groups.google.com/d/msg/cloud-dns-discuss/m5CHw1ncS14/lTKvD7O_BgAJ
this example of the DNS API doesn't actually work:
Needs to be in this form:
CNAME:
Or for A records:
Resource records need to be in a List form, DNS records seem to need the trailing dot.