mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
adding getRequestBodyV6 method to the Route53 class
adding getRequestBodyV6 method to add AAAA rtype to Route53 class.
This commit is contained in:
parent
44c64da137
commit
49b8fbdd67
@ -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
|
||||
*
|
||||
|
||||
Loading…
Reference in New Issue
Block a user