- HTTP request
- Path parameters
- Query parameters
- Request body
- Response body
- Authorization scopes
- Examples
- Try it!
Fetches the representation of an existing ResourceRecordSet.
HTTP request
GET https://dns.googleapis.com/dns/v1/projects/{project}/managedZones/{managedZone}/rrsets/{name}/{type}
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
project |
Identifies the project addressed by this request. |
managed |
Identifies the managed zone addressed by this request. Can be the managed zone name or ID. |
name |
Fully qualified domain name. |
type |
RRSet type. |
Query parameters
Parameters | |
---|---|
client |
For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection. |
Request body
The request body must be empty.
Response body
If successful, the response body contains an instance of ResourceRecordSet
.
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/cloud-platform
https://www.googleapis.com/auth/cloud-platform.read-only
https://www.googleapis.com/auth/ndev.clouddns.readonly
https://www.googleapis.com/auth/ndev.clouddns.readwrite
For more information, see the Authentication Overview.
Uses the Google API Client Library for Python.Examples
"""
BEFORE RUNNING:
---------------
1. If not already done, enable the Google Cloud DNS API
and check the quota for your project at
https://console.developers.google.com/apis/api/dns
2. This sample uses Application Default Credentials for authentication.
If not already done, install the gcloud CLI from
https://cloud.google.com/sdk and run
`gcloud beta auth application-default login`.
For more information, see
https://developers.google.com/identity/protocols/application-default-credentials
3. Install the Python client library for Google APIs by running
`pip install --upgrade google-api-python-client`
"""
import pprint
from googleapiclient import discovery
from oauth2client.client import GoogleCredentials
credentials = GoogleCredentials.get_application_default()
service = discovery.build('dns', 'v1', credentials=credentials)
# Project ID for this request.
project = 'my-project' # TODO(developer): Update placeholder value.
# The name of the zone for this request.
managed_zone = 'my-managed-zone' # TODO(developer): Update placeholder value.
request = service.resourceRecordSets().get(
project=project,
managedZone=managed_zone,
# TODO(developer): Update name placeholder value.
name='my-record.my-zone.my-domain.',
# TODO(developer): Update type placeholder value.
type='A'
)
response = request.execute()
pprint.pprint(response)