3.1.1.1.12.2.1 GetDnsResourceRecordByRecordId
The GetDnsResourceRecordByRecordId procedure takes the following input parameter.
Param_recordIdList: This is a collection of record Ids for ADM_DnsResourceRecordTable.
The following is the output parameter of this procedure.
Result_resourceRecords: This is a collection of DnsResourceRecords.
The following processing steps are performed:
Collect all the records associated with Param_recordIdList from ADM_DnsResourceRecordTable.
For all the records collected, do the following:
Create a DnsResourceRecord object called tempRecord.
Set tempRecord.RecordId as record.RecordId.
Map the record.DnsResourceRecordDetails to the corresponding fields in tempRecord.
If DnsForwardLookupZoneId is non-NULL, then:
Set tempRecord.ZoneId to record.DnsForwardLookupZoneId.
Set tempRecord.ZoneType to DnsForwardLookupZoneId.
Call GetDnsZoneFromTable from ADM_DNSForwardLookupTable with parameter as record.DnsForwardLookupZoneId.
Store the returned object as zoneObject.
Set tempRecord.ZoneName to zoneObject.ShortName.
If DnsReverseLookupZoneId is non-NULL, then:
Set tempRecord.ZoneId to record.DnsReverseLookupZoneId.
Set tempRecord.ZoneType to DnsReverseLookupZoneId.
Call GetDnsZoneFromTable from ADM_DNSReverseLookupTable with parameter as record.DnsReverseLookupZoneId.
Store the returned object t as zoneObject.
Set tempRecord.ZoneName to zoneObject.ShortName.
Call GetAccessScopeForObjectIdAndType of ADM_AccessScopeAssociationTable passing the following parameters:
Param_objectId is set to record.RecordId.
Param_objectType is set to IpamObjectType.DnsResourceRecord.
Param_accessScopeId.
Param_objectInheritanceStatus.
Param_inheritanceId.
Assign Param_accessScopeId to tempRecord.AccessScopeId.
Assign Param_objectInheritanceStatus to tempRecord.IsInheritedAccessScope.
Add tempRecord to Result_resourceRecords
Return Result_resourceRecords.