Title: [Documentation Issue] errors in DNS API example usage · Issue #1886 · googleapis/google-cloud-python · GitHub
Open Graph Title: [Documentation Issue] errors in DNS API example usage · Issue #1886 · googleapis/google-cloud-python
X Title: [Documentation Issue] errors in DNS API example usage · Issue #1886 · googleapis/google-cloud-python
Description: 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.Cl...
Open Graph Description: 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 >>> fr...
X Description: 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: >>> impor...
Opengraph URL: https://github.com/googleapis/google-cloud-python/issues/1886
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Documentation Issue] errors in DNS API example usage","articleBody":"Page Name: dns-usage\nRelease: 0.16.0\n\nAs noted at https://groups.google.com/d/msg/cloud-dns-discuss/m5CHw1ncS14/lTKvD7O_BgAJ\n\nthis example of the DNS API doesn't actually work:\n\n``` python\n\u003e\u003e\u003e import time\n\u003e\u003e\u003e from gcloud import dns\n\u003e\u003e\u003e client = dns.Client(project='PROJECT_ID')\n\u003e\u003e\u003e zone = client.zone('acme-co', 'example.com')\n\u003e\u003e\u003e TWO_HOURS = 2 * 60 * 60 # seconds\n\u003e\u003e\u003e record_set = zone.resource_record_set(\n... 'www.example.com', 'CNAME', TWO_HOURS, 'www1.example.com')\n\u003e\u003e\u003e changes = zone.changes()\n\u003e\u003e\u003e changes.add_record_set(record_set)\n\u003e\u003e\u003e changes.create() # API request\n\u003e\u003e\u003e while changes.status != 'done':\n... print('Waiting for changes to complete')\n... time.sleep(60) # or whatever interval is appropriate\n... changes.reload() # API request\n```\n\nNeeds to be in this form:\n\nCNAME:\n\n``` python\nrecord_set = zone.resource_record_set('www.example.com.', 'CNAME',\n 3600, ['www1.example.com.',])\n```\n\nOr for A records:\n\n``` python\nrecord_set = zone.resource_record_set('www.example.com.', 'A',\n 3600, ['11.111.11.111',])\n```\n\nResource records need to be in a List form, DNS records seem to need the trailing dot.\n","author":{"url":"https://github.com/dupuy","@type":"Person","name":"dupuy"},"datePublished":"2016-06-22T19:26:33.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/1886/google-cloud-python/issues/1886"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:7252720c-20ad-08cf-0b0d-c36ce21f9cee |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A348:3DF338:E09182:13108E5:6A4D5EB1 |
| html-safe-nonce | a0db5ad7bb7986a39f7019a37378b8ea5e676a5938543a20dd2f549ac43d0ec5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMzQ4OjNERjMzODpFMDkxODI6MTMxMDhFNTo2QTRENUVCMSIsInZpc2l0b3JfaWQiOiIyODc3ODM3NzUzMjI2OTc2OTQ1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | e8a007aeb2737bbbd18256eb907236e8f9ffaa482d8a3931216d285ebfde5f60 |
| hovercard-subject-tag | issue:161765417 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/google-cloud-python/1886/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e949cdfccae0463e2f615f41f7f5f4da7bfe2abc6b8d504dcf3454e566038eb4/googleapis/google-cloud-python/issues/1886 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e949cdfccae0463e2f615f41f7f5f4da7bfe2abc6b8d504dcf3454e566038eb4/googleapis/google-cloud-python/issues/1886 |
| og:image:alt | 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 >>> fr... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dupuy |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2a1443ff9733a3016431263ea73c93d8fe00c195eb4a7670ac30e7848f045441 |
| turbo-cache-control | no-preview |
| go-import | github.com/googleapis/google-cloud-python git https://github.com/googleapis/google-cloud-python.git |
| octolytics-dimension-user_id | 16785467 |
| octolytics-dimension-user_login | googleapis |
| octolytics-dimension-repository_id | 16316451 |
| octolytics-dimension-repository_nwo | googleapis/google-cloud-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 16316451 |
| octolytics-dimension-repository_network_root_nwo | googleapis/google-cloud-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f3bdd3157ea1f0fd738d408eceeead721acf1dc3 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width