This commit is contained in:
+2
-1
@@ -44,7 +44,8 @@ def _get_current_record(hosted_zone_id: str, record: str, record_type: str) -> s
|
|||||||
response = client.list_resource_record_sets(HostedZoneId=hosted_zone_id)
|
response = client.list_resource_record_sets(HostedZoneId=hosted_zone_id)
|
||||||
record_normalized = record.rstrip(".")
|
record_normalized = record.rstrip(".")
|
||||||
for rrset in response["ResourceRecordSets"]:
|
for rrset in response["ResourceRecordSets"]:
|
||||||
if rrset["Name"].rstrip(".") == record_normalized and rrset["Type"] == record_type:
|
rr_name = rrset["Name"].rstrip(".").replace("\\052", "*")
|
||||||
|
if rr_name == record_normalized and rrset["Type"] == record_type:
|
||||||
records = rrset.get("ResourceRecords", [])
|
records = rrset.get("ResourceRecords", [])
|
||||||
if records:
|
if records:
|
||||||
value = records[0]["Value"].rstrip(".")
|
value = records[0]["Value"].rstrip(".")
|
||||||
|
|||||||
Reference in New Issue
Block a user