adding getRequestBodyV6 method to the Route53 class

adding getRequestBodyV6 method to add AAAA rtype to Route53 class.
This commit is contained in:
Matthew Fine 2017-09-06 11:44:32 -05:00 committed by GitHub
parent 44c64da137
commit 49b8fbdd67

View File

@ -99,6 +99,23 @@ class Route53
return $xmlreq;
}
public function getRequestBodyV6($fqdn, $ip, $ttl){
$xmlreq = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
$xmlreq .= "<ChangeResourceRecordSetsRequest xmlns=\"https://route53.amazonaws.com/doc/2013-04-01/\">";
$xmlreq .= "<ChangeBatch><Changes><Change>";
$xmlreq .= "<Action>UPSERT</Action>";
$xmlreq .= "<ResourceRecordSet>";
$xmlreq .= sprintf("<Name>%s</Name>", $fqdn);
$xmlreq .= "<Type>AAAA</Type>";
$xmlreq .= sprintf("<TTL>%d</TTL>", $ttl);
$xmlreq .= sprintf("<ResourceRecords><ResourceRecord><Value>%s</Value></ResourceRecord></ResourceRecords>", $ip);
$xmlreq .= "</ResourceRecordSet>";
$xmlreq .= "</Change></Changes></ChangeBatch>";
$xmlreq .= "</ChangeResourceRecordSetsRequest>";
return $xmlreq;
}
/**
* Return API URL
*