[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Cloud DNS API - Class Google::Cloud::Dns::Credentials (v1.1.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.1.0 (latest)](/ruby/docs/reference/google-cloud-dns/latest/Google-Cloud-Dns-Credentials)\n- [1.0.0](/ruby/docs/reference/google-cloud-dns/1.0.0/Google-Cloud-Dns-Credentials)\n- [0.37.0](/ruby/docs/reference/google-cloud-dns/0.37.0/Google-Cloud-Dns-Credentials)\n- [0.36.1](/ruby/docs/reference/google-cloud-dns/0.36.1/Google-Cloud-Dns-Credentials)\n- [0.35.1](/ruby/docs/reference/google-cloud-dns/0.35.1/Google-Cloud-Dns-Credentials) \nReference documentation and code samples for the Cloud DNS API class Google::Cloud::Dns::Credentials.\n\nCredentials\n-----------\n\nRepresents the authentication and authorization used to connect to the\nDNS API. \n\nInherits\n--------\n\n- Google::Auth::Credentials\n\nExample\n-------\n\n```ruby\nrequire \"google/cloud/dns\"\n\nkeyfile = \"/path/to/keyfile.json\"\ncreds = Google::Cloud::Dns::Credentials.new keyfile\n\ndns = Google::Cloud::Dns.new(\n project_id: \"my-project\",\n credentials: creds\n)\n\ndns.project_id #=\u003e \"my-project\"\n```\n\nConstants\n---------\n\n### SCOPE\n\n**value:**\\[\"https://www.googleapis.com/auth/ndev.clouddns.readwrite\"\\].freeze\n\n### PATH_ENV_VARS\n\n**value:**\\[\"DNS_CREDENTIALS\",\n\"DNS_KEYFILE\",\n\"GOOGLE_CLOUD_CREDENTIALS\",\n\"GOOGLE_CLOUD_KEYFILE\",\n\"GCLOUD_KEYFILE\"\\].freeze\n\n### JSON_ENV_VARS\n\n**value:**\\[\"DNS_CREDENTIALS_JSON\",\n\"DNS_KEYFILE_JSON\",\n\"GOOGLE_CLOUD_CREDENTIALS_JSON\",\n\"GOOGLE_CLOUD_KEYFILE_JSON\",\n\"GCLOUD_KEYFILE_JSON\"\\].freeze\n\n### DEFAULT_PATHS\n\n**value:**\\[\"\\~/.config/gcloud/application_default_credentials.json\"\\].freeze"]]