ResourceRecord class - Platform - BlueCat Gateway - 24.3.3

Gateway Administration Guide

ft:locale
en-US
Product name
BlueCat Gateway
Version
24.3.3

class bluecat.resource_record.ResourceRecord(api, api_entity)

Bases: bluecat.entity.Entity

Base class for resource records

Parameters Description
api

API instance used by the entity to communicate with BAM.

api_entity

the entity returned by the BAM API.

get_configuration()

Get the owning configuration.

Return type: Entity

get_zone()

Get the parent zone.

Return type: Entity

get_view()

Get the owning view.

Return type: Entity

get_full_name()

Get the fully qualified domain name of the resource record.

Return type: str

get_absolute_name()

Get absolute name

Return type: str

get_zone_name()

Get record’s zone name ONLY

Return type: str

get_specific_ttl()

If there is a specific TTL set for the resource record, return it, otherwise return -1.

Return type: int

get_ttl(server=None)

Find the applicable TTL for the resource record.

This involves walking the entity tree in many cases.

Return type: int

move(resource_record_id, destination_zone)

Move resource record to a new zone.

Parameters Description
resource_record_id (int)

The ID of the resource record to move.

destination_zone (str)

The FQDN of the destination zone.

delete_with_options(no_server_update=False, delete_orphaned_ip_address=False)

Delete DNS resource records with options.

Parameters Description
no_server_update (bool, optional)

A Boolean value. If set to True, updates the record only in the Address Manager web interface. The change will not be deployed to the DNS server. The default value is False.

delete_orphaned_ip_address (bool, optional)

A Boolean value. This applies to the delete operation on Host Records. If set to True, frees IP addresses associated with a host record if no other host records are associated with the IP address. The default value is False.

Returns: None

Example:

api = g.user.get_api()                              # get api object
host_record_id = 12345                              # host record id
host_record = api.get_entity_by_id(host_record_id)

host_record.delete_with_options(no_server_update=True, delete_orphaned_ip_address=True)