# Resource Record Sets

0.37.0 (latest) 0.36.1 0.35.1 0.34.2 0.33.1 0.32.3 0.31.0 0.30.2 Define API ResourceRecordSets.

### *class* google.cloud.dns.resource_record_set.ResourceRecordSet(name, record_type, ttl, rrdatas, zone)

Bases: [`object`](https://docs.python.org/3/library/functions.html#object)

ResourceRecordSets are DNS resource records.

RRS are owned by a [`google.cloud.dns.zone.ManagedZone`](https://docs.cloud.google.com/python/docs/reference/dns/latest/zone#google.cloud.dns.zone.ManagedZone) instance.

See
<https://cloud.google.com/dns/api/v1/resourceRecordSets>

- **Parameters**

  - **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) -- the name of the record set.

  - **record_type** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) -- the RR type of the zone.

  - **ttl** ([*int*](https://docs.python.org/3/library/functions.html#int)) -- TTL (in seconds) for caching the record sets.

  - **rrdatas** (*list of string*) -- one or more lines containing the resource data.

  - **zone** ([`google.cloud.dns.zone.ManagedZone`](https://docs.cloud.google.com/python/docs/reference/dns/latest/zone#google.cloud.dns.zone.ManagedZone)) -- A zone which holds one or more record sets.

#### *classmethod* from_api_repr(resource, zone)

Factory: construct a record set given its API representation

- **Parameters**

  - **resource** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict)) -- record sets representation returned from the API

  - **zone** ([`google.cloud.dns.zone.ManagedZone`](https://docs.cloud.google.com/python/docs/reference/dns/latest/zone#google.cloud.dns.zone.ManagedZone)) -- A zone which holds one or more record sets.

- **Return type**

  `google.cloud.dns.zone.ResourceRecordSet`
- **Returns**

  RRS parsed from `resource`.