Infoblox::DNS::AllRecords - A synthetic object used to return all record object types belonging to a zone.
By searching on this object, all the record objects associated with a specific zone can be retrieved
This section describes all the methods in Infoblox::Session module that you can apply to a DNS AllRecords object.
Use this method to search for record objects in the Infoblox appliance. See Infoblox::Session->search() for parameters and return values.
Apply the following attributes to search for a DNS AllRecords object:
zone - Required. A zone name in FQDN format. creator - Optional. The creator of the record. The valid values are 'SYSTEM', 'DYNAMIC' and 'STATIC'. ddns_principal - Optional. The GSS-TSIG principal that owns the record. view - Optional. The DNS view in which the records are located. By default, the default DNS views is searched. name - Optional. The name of the matched record. (regular expression). reclaimable - Optional. The flag that indicates whether the record is reclaimable or not. type - Optional. The type of record to search for. By default, all record types are searched. Following is the list of valid values for this search field:
'All A Records', 'All AAAA Records', 'All Alias Records', 'All Bulk Host', 'All CNAME Records', 'All DNAME Records', 'All DNSKEY Records', 'All DS Records', 'All DTCLBDN Records', 'All Host Address', 'All Host Alias', 'All Host Records', 'All IPV6 Host Address', 'All LBDN Records', 'All MX Records', 'All NAPTR Records', 'All NS Records', 'All NSEC Records', 'All NSEC3 Parameter Records', 'All NSEC3 Records', 'All PTR Records', 'All RSIG Records', 'All Records', 'All SEC Records', 'All SOA Records', 'All SRV Records', 'All TLSA Records', 'All Shared A Records', 'All Shared AAAA Records', 'All Shared MX Records', 'All Shared SRV Records', 'All Shared TXT Records', 'All TXT Records',
# search for all records in the "domain.com" zone in the default DNS view my @retrieved_objs = $session->search( object => "Infoblox::DNS::AllRecords", zone => 'domain.com', );
# search for all TXT records that match the 'rec' name in the "domain.com" zone in the default DNS view my @retrieved_objs = $session->search( object => "Infoblox::DNS::AllRecords", zone => 'domain.com', type => 'All TXT Records', name => 'rec', );
This section describes all the methods that you can use to retrieve the attribute values of an AllRecords object. All methods are read-only and cannot be set.
Use this method to retrieve the descriptive comment of the record associated with the AllRecords object.
The method returns the attribute value.
#Get comment my $comment = $allrecord->comment();
Use this method to retrieve the resource record creator.
The method returns the attribute value.
#Get creator my $creator = $allrecord->creator();
Use this method to retrieve the GSS-TSIG principal that owns the record.
The method returns the attribute value.
#Get ddns_principal my $ddns_principal = $allrecord->ddns_principal();
Use this method to retrieve the flag that indicates whether this record is protected from DDNS updates or not.
The method returns the attribute value.
#Get ddns_protected my $ddns_protected = $allrecord->ddns_protected();
Use this method to retrieve the disable flag of of the record associated with the AllRecords object (if present).
The method returns the attribute value.
#Get disable my $disable = $allrecord->disable();
Use this method to retrieve the LBDN object that obscures this record. This is a read-only attribute.
None
The method returns attribute value.
#Get dtc_obscured my $dtc_obscured = $allrecord->dtc_obscured();
Use this method to retrieve the time the associated record was last queried on.
The method returns the attribute value, the number of seconds that have elapsed since January 1st, 1970 UTC.
#Get last_queried my $last_queried = $allrecord->last_queried();
Use this method to retrieve the name of of the record associated with the AllRecords object. Note that this value could differ from the value of the associated record's name field.
The method returns the attribute value.
#Get name my $name = $allrecord->name();
Use this method to retrieve the flag that indicates whether the record is reclaimable or not.
None
The method returns the attribute value.
#Get reclaimable my $reclaimable = $object->reclaimable();
Use this method to retrieve the record object associated with the AllRecords object.
This object is considered a 'partial' object. See Infoblox::Session->fill_partial_object() for more information on how it can be converted to a 'full' API object.
If the AllRecords object refers to a record not currently supported in the Perl API, the member value will be undefined.
The method returns the attribute value.
#Get record my $record = $allrecord->record();
Use this method to retrieve the TTL value of of the record associated with the AllRecords object (if present).
The method returns the attribute value.
#Get ttl my $ttl = $allrecord->ttl();
Use this method to retrieve the type of the record associated with the AllRecords object. This is a descriptive string that identifies the record to which this AllRecords object refers. (For example, 'A record', 'MX record', ...)
The method returns the attribute value.
#Get type my $type = $allrecord->type();
Use this method to retrieve the DNS view name of the record associated with the AllRecords object.
The method returns the attribute value.
#Get view my $view = $allrecord->view();
Use this method to retrieve the zone name of the record associated with the AllRecords object.
The method returns the attribute value.
#Get zone my $zone = $allrecord->zone();
In cases where a large number of matching records exist on the appliance, only a limited number will be returned at a time. If all of the matching records are required, please consider using the paging support via Infoblox::Cursor.
#Code sample fragment Starts:
$cursor=$session->new_cursor( fetch_size => 100, object => "Infoblox::DNS::AllRecords", zone => 'domain.com', view => 'default', );
while ($current_record = $cursor->fetch()) { # $current_record will contain a matching AllRecords object }
# All matching AllRecords will be returned # when the cycle ends.
If you want full record objects for some of the above, you can add the following code
#Code sample fragment Starts:
if( ... some criteria ...) { push @temp, $current_record->record(); }
####Code Fragment Ends####
inside the while() cycle and afterwards call
#Code sample fragment Starts:
@full_record_objects=$session->fill_partial_object(\@temp);
####Code Fragment Ends####
to fill the wanted objects.
Infoblox Inc. http://www.infoblox.com/
Infoblox::Session, Infoblox::Session->search()/>
Copyright (c) 2017 Infoblox Inc.