Skip to main content

resource_record_sets

Creates, updates, deletes, gets or lists a resource_record_sets resource.

Overview

Nameresource_record_sets
TypeResource
Idgoogle.dns.resource_record_sets

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringFor example, www.example.com.
kindstring (default: dns#resourceRecordSet)
routingPolicyobjectConfigures dynamic query responses based on either the geo location of the querying user or a weighted round robin based routing policy. A valid ResourceRecordSet contains only rrdata (for static resolution) or a routing_policy (for dynamic resolution). (id: RRSetRoutingPolicy)
rrdatasarrayAs defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1) -- see examples.
signatureRrdatasarrayAs defined in RFC 4034 (section 3.2).
ttlinteger (int32)Number of seconds that this ResourceRecordSet can be cached by resolvers.
typestringThe identifier of a supported record type. See the list of Supported DNS record types.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectproject, managedZone, name, typeclientOperationIdFetches the representation of an existing ResourceRecordSet.
listselectproject, managedZonemaxResults, pageToken, name, typeEnumerates ResourceRecordSets that you have created but not yet deleted.
createinsertproject, managedZoneclientOperationIdCreates a new ResourceRecordSet.
patchupdateproject, managedZone, name, typeclientOperationIdApplies a partial update to an existing ResourceRecordSet.
deletedeleteproject, managedZone, name, typeclientOperationIdDeletes a previously created ResourceRecordSet.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
managedZonestring
namestring
projectstring
typestring
clientOperationIdstring
maxResultsinteger (int32)
namestring
pageTokenstring
typestring

SELECT examples

Fetches the representation of an existing ResourceRecordSet.

SELECT
name,
kind,
routingPolicy,
rrdatas,
signatureRrdatas,
ttl,
type
FROM google.dns.resource_record_sets
WHERE project = '{{ project }}' -- required
AND managedZone = '{{ managedZone }}' -- required
AND name = '{{ name }}' -- required
AND type = '{{ type }}' -- required
AND clientOperationId = '{{ clientOperationId }}';

INSERT examples

Creates a new ResourceRecordSet.

INSERT INTO google.dns.resource_record_sets (
data__name,
data__type,
data__ttl,
data__rrdatas,
data__signatureRrdatas,
data__routingPolicy,
data__kind,
project,
managedZone,
clientOperationId
)
SELECT
'{{ name }}',
'{{ type }}',
{{ ttl }},
'{{ rrdatas }}',
'{{ signatureRrdatas }}',
'{{ routingPolicy }}',
'{{ kind }}',
'{{ project }}',
'{{ managedZone }}',
'{{ clientOperationId }}'
RETURNING
name,
kind,
routingPolicy,
rrdatas,
signatureRrdatas,
ttl,
type
;

UPDATE examples

Applies a partial update to an existing ResourceRecordSet.

UPDATE google.dns.resource_record_sets
SET
data__name = '{{ name }}',
data__type = '{{ type }}',
data__ttl = {{ ttl }},
data__rrdatas = '{{ rrdatas }}',
data__signatureRrdatas = '{{ signatureRrdatas }}',
data__routingPolicy = '{{ routingPolicy }}',
data__kind = '{{ kind }}'
WHERE
project = '{{ project }}' --required
AND managedZone = '{{ managedZone }}' --required
AND name = '{{ name }}' --required
AND type = '{{ type }}' --required
AND clientOperationId = '{{ clientOperationId}}'
RETURNING
name,
kind,
routingPolicy,
rrdatas,
signatureRrdatas,
ttl,
type;

DELETE examples

Deletes a previously created ResourceRecordSet.

DELETE FROM google.dns.resource_record_sets
WHERE project = '{{ project }}' --required
AND managedZone = '{{ managedZone }}' --required
AND name = '{{ name }}' --required
AND type = '{{ type }}' --required
AND clientOperationId = '{{ clientOperationId }}';