4949 Hosting ,
5050 HostingApiAddCustomDomainRequest ,
5151 HostingApiCreateHostingRequest ,
52+ HostingApiRemoveCustomDomainRequest ,
5253 HostingApiUpdateHostingRequest ,
5354 HostingSummary ,
5455 ListBackupItemsResponse ,
124125 marshal_FtpAccountApiCreateFtpAccountRequest ,
125126 marshal_HostingApiAddCustomDomainRequest ,
126127 marshal_HostingApiCreateHostingRequest ,
128+ marshal_HostingApiRemoveCustomDomainRequest ,
127129 marshal_HostingApiUpdateHostingRequest ,
128130 marshal_MailAccountApiChangeMailAccountPasswordRequest ,
129131 marshal_MailAccountApiCreateMailAccountRequest ,
@@ -1913,11 +1915,13 @@ async def remove_custom_domain(
19131915 self ,
19141916 * ,
19151917 hosting_id : str ,
1918+ domain_name : str ,
19161919 region : Optional [ScwRegion ] = None ,
19171920 ) -> HostingSummary :
19181921 """
19191922 Detach a custom domain from a webhosting.
19201923 :param hosting_id: Hosting ID to which the custom domain is detached from.
1924+ :param domain_name: The custom domain name to detach from the hosting.
19211925 :param region: Region to target. If none is passed will use default region from the config.
19221926 :return: :class:`HostingSummary <HostingSummary>`
19231927
@@ -1926,6 +1930,7 @@ async def remove_custom_domain(
19261930
19271931 result = await api.remove_custom_domain(
19281932 hosting_id="example",
1933+ domain_name="example",
19291934 )
19301935 """
19311936
@@ -1937,7 +1942,14 @@ async def remove_custom_domain(
19371942 res = self ._request (
19381943 "POST" ,
19391944 f"/webhosting/v1/regions/{ param_region } /hostings/{ param_hosting_id } /remove-custom-domain" ,
1940- body = {},
1945+ body = marshal_HostingApiRemoveCustomDomainRequest (
1946+ HostingApiRemoveCustomDomainRequest (
1947+ hosting_id = hosting_id ,
1948+ domain_name = domain_name ,
1949+ region = region ,
1950+ ),
1951+ self .client ,
1952+ ),
19411953 )
19421954
19431955 self ._throw_on_error (res )
0 commit comments