@@ -243,6 +243,18 @@ def change_algorithm(self, algorithm):
243243 """
244244 return self ._client .change_algorithm (self , algorithm )
245245
246+ def change_dns_ptr (self , ip , dns_ptr ):
247+ # type: (str, str) -> BoundAction
248+ """Changes the hostname that will appear when getting the hostname belonging to the public IPs (IPv4 and IPv6) of this Load Balancer.
249+
250+ :param ip: str
251+ The IP address for which to set the reverse DNS entry
252+ :param dns_ptr: str
253+ Hostname to set as a reverse DNS PTR entry, will reset to original default value if `None`
254+ :return: :class:`BoundAction <hcloud.actions.client.BoundAction>`
255+ """
256+ return self ._client .change_dns_ptr (self , ip , dns_ptr )
257+
246258 def change_protection (self , delete ):
247259 # type: (LoadBalancerService) -> List[BoundAction]
248260 """Changes the protection configuration of a Load Balancer.
@@ -759,6 +771,26 @@ def change_algorithm(self, load_balancer, algorithm):
759771 )
760772 return BoundAction (self ._client .actions , response ["action" ])
761773
774+ def change_dns_ptr (self , load_balancer , ip , dns_ptr ):
775+ # type: (Union[LoadBalancer, BoundLoadBalancer], str, str) -> BoundAction
776+ """Changes the hostname that will appear when getting the hostname belonging to the public IPs (IPv4 and IPv6) of this Load Balancer.
777+
778+ :param ip: str
779+ The IP address for which to set the reverse DNS entry
780+ :param dns_ptr: str
781+ Hostname to set as a reverse DNS PTR entry, will reset to original default value if `None`
782+ :return: :class:`BoundAction <hcloud.actions.client.BoundAction>`
783+ """
784+
785+ response = self ._client .request (
786+ url = "/load_balancers/{load_balancer_id}/actions/change_dns_ptr" .format (
787+ load_balancer_id = load_balancer .id
788+ ),
789+ method = "POST" ,
790+ json = {"ip" : ip , "dns_ptr" : dns_ptr },
791+ )
792+ return BoundAction (self ._client .actions , response ["action" ])
793+
762794 def change_protection (self , load_balancer , delete = None ):
763795 # type: (Union[LoadBalancer, BoundLoadBalancer], Optional[bool]) -> BoundAction
764796 """Changes the protection configuration of a Load Balancer.
0 commit comments