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:

  1. Collect all the records associated with Param_recordIdList from  ADM_DnsResourceRecordTable.

  2. For all the records collected, do the following: 

    1. Create a DnsResourceRecord object called tempRecord. 

    2. Set tempRecord.RecordId as record.RecordId

    3. Map the record.DnsResourceRecordDetails to the corresponding fields in tempRecord

    4. If DnsForwardLookupZoneId is non-NULL, then: 

      1. Set tempRecord.ZoneId to record.DnsForwardLookupZoneId

      2. Set tempRecord.ZoneType to DnsForwardLookupZoneId

    5. Call GetDnsZoneFromTable from ADM_DNSForwardLookupTable with parameter as record.DnsForwardLookupZoneId.

      1. Store the returned object as zoneObject

      2. Set tempRecord.ZoneName to zoneObject.ShortName

    6. If DnsReverseLookupZoneId is non-NULL, then: 

      1. Set tempRecord.ZoneId to record.DnsReverseLookupZoneId

      2. Set tempRecord.ZoneType to DnsReverseLookupZoneId

    7. Call GetDnsZoneFromTable from ADM_DNSReverseLookupTable with parameter as record.DnsReverseLookupZoneId.

      1. Store the returned object t as zoneObject

      2. Set tempRecord.ZoneName to zoneObject.ShortName.

    8. Call GetAccessScopeForObjectIdAndType of ADM_AccessScopeAssociationTable passing the following parameters: 

      1. Param_objectId is set to record.RecordId

      2. Param_objectType is set to IpamObjectType.DnsResourceRecord

      3. Param_accessScopeId

      4. Param_objectInheritanceStatus

      5. Param_inheritanceId

    9. Assign Param_accessScopeId to tempRecord.AccessScopeId

    10. Assign Param_objectInheritanceStatus to tempRecord.IsInheritedAccessScope

    11. Add tempRecord to Result_resourceRecords 

  3. Return Result_resourceRecords.