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

NameDatatypeDescription
namestringFor example, www.example.com.
kindstring
routingPolicyobjectA RRSetRoutingPolicy represents ResourceRecordSet data that is returned dynamically with the response varying based on configured properties such as geolocation or by weighted random selection.
rrdatasarrayAs defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1) -- see examples.
signatureRrdatasarrayAs defined in RFC 4034 (section 3.2).
ttlintegerNumber 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

NameAccessible byRequired ParamsDescription
getSELECTmanagedZone, name, project, typeFetches the representation of an existing ResourceRecordSet.
listSELECTmanagedZone, projectEnumerates ResourceRecordSets that you have created but not yet deleted.
createINSERTmanagedZone, projectCreates a new ResourceRecordSet.
deleteDELETEmanagedZone, name, project, typeDeletes a previously created ResourceRecordSet.
patchUPDATEmanagedZone, name, project, typeApplies a partial update to an existing ResourceRecordSet.

SELECT examples

Enumerates ResourceRecordSets that you have created but not yet deleted.

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

INSERT example

Use the following StackQL query and manifest file to create a new resource_record_sets resource.

/*+ create */
INSERT INTO google.dns.resource_record_sets (
managedZone,
project,
name,
type,
ttl,
rrdatas,
signatureRrdatas,
routingPolicy
)
SELECT
'{{ managedZone }}',
'{{ project }}',
'{{ name }}',
'{{ type }}',
'{{ ttl }}',
'{{ rrdatas }}',
'{{ signatureRrdatas }}',
'{{ routingPolicy }}'
;

UPDATE example

Updates a resource_record_sets resource.

/*+ update */
UPDATE google.dns.resource_record_sets
SET
name = '{{ name }}',
type = '{{ type }}',
ttl = '{{ ttl }}',
rrdatas = '{{ rrdatas }}',
signatureRrdatas = '{{ signatureRrdatas }}',
routingPolicy = '{{ routingPolicy }}'
WHERE
managedZone = '{{ managedZone }}'
AND name = '{{ name }}'
AND project = '{{ project }}'
AND type = '{{ type }}';

DELETE example

Deletes the specified resource_record_sets resource.

/*+ delete */
DELETE FROM google.dns.resource_record_sets
WHERE managedZone = '{{ managedZone }}'
AND name = '{{ name }}'
AND project = '{{ project }}'
AND type = '{{ type }}';