@@ -1232,22 +1232,22 @@ async def sync_domain_dns_records(
12321232 self ,
12331233 * ,
12341234 domain : str ,
1235+ update_web_records : bool ,
1236+ update_mail_records : bool ,
1237+ update_all_records : bool ,
1238+ update_nameservers : bool ,
12351239 region : Optional [ScwRegion ] = None ,
1236- update_web_records : Optional [bool ] = None ,
1237- update_mail_records : Optional [bool ] = None ,
1238- update_all_records : Optional [bool ] = None ,
1239- update_nameservers : Optional [bool ] = None ,
12401240 custom_records : Optional [list [SyncDomainDnsRecordsRequestRecord ]] = None ,
12411241 auto_config_domain_dns : Optional [AutoConfigDomainDns ] = None ,
12421242 ) -> DnsRecords :
12431243 """
12441244 Synchronize your DNS records on the Elements Console and on cPanel.
12451245 :param domain: Domain for which the DNS records will be synchronized.
1246- :param region: Region to target. If none is passed will use default region from the config.
12471246 :param update_web_records: Whether or not to synchronize the web records (deprecated, use auto_config_domain_dns).
12481247 :param update_mail_records: Whether or not to synchronize the mail records (deprecated, use auto_config_domain_dns).
12491248 :param update_all_records: Whether or not to synchronize all types of records. This one has priority (deprecated, use auto_config_domain_dns).
12501249 :param update_nameservers: Whether or not to synchronize domain nameservers (deprecated, use auto_config_domain_dns).
1250+ :param region: Region to target. If none is passed will use default region from the config.
12511251 :param custom_records: Custom records to synchronize.
12521252 :param auto_config_domain_dns: Whether or not to synchronize each types of records.
12531253 :return: :class:`DnsRecords <DnsRecords>`
@@ -1257,6 +1257,10 @@ async def sync_domain_dns_records(
12571257
12581258 result = await api.sync_domain_dns_records(
12591259 domain="example",
1260+ update_web_records=False,
1261+ update_mail_records=False,
1262+ update_all_records=False,
1263+ update_nameservers=False,
12601264 )
12611265 """
12621266
@@ -1271,11 +1275,11 @@ async def sync_domain_dns_records(
12711275 body = marshal_DnsApiSyncDomainDnsRecordsRequest (
12721276 DnsApiSyncDomainDnsRecordsRequest (
12731277 domain = domain ,
1274- region = region ,
12751278 update_web_records = update_web_records ,
12761279 update_mail_records = update_mail_records ,
12771280 update_all_records = update_all_records ,
12781281 update_nameservers = update_nameservers ,
1282+ region = region ,
12791283 custom_records = custom_records ,
12801284 auto_config_domain_dns = auto_config_domain_dns ,
12811285 ),
@@ -2972,3 +2976,43 @@ async def delete_website(
29722976 )
29732977
29742978 self ._throw_on_error (res )
2979+
2980+ async def reset_website (
2981+ self ,
2982+ * ,
2983+ hosting_id : str ,
2984+ domain_name : str ,
2985+ region : Optional [ScwRegion ] = None ,
2986+ ) -> Website :
2987+ """
2988+ Delete a website's content, all files and directories. This.
2989+ Permanently deletes data including files and configurations. The
2990+ website will display the default welcome page.
2991+ :param hosting_id: Hosting ID to which the website is attached to.
2992+ :param domain_name: The domain name with which the website is associated.
2993+ :param region: Region to target. If none is passed will use default region from the config.
2994+ :return: :class:`Website <Website>`
2995+
2996+ Usage:
2997+ ::
2998+
2999+ result = await api.reset_website(
3000+ hosting_id="example",
3001+ domain_name="example",
3002+ )
3003+ """
3004+
3005+ param_region = validate_path_param (
3006+ "region" , region or self .client .default_region
3007+ )
3008+ param_hosting_id = validate_path_param ("hosting_id" , hosting_id )
3009+ param_domain_name = validate_path_param ("domain_name" , domain_name )
3010+
3011+ res = self ._request (
3012+ "POST" ,
3013+ f"/webhosting/v1/regions/{ param_region } /hostings/{ param_hosting_id } /websites/{ param_domain_name } /reset" ,
3014+ body = {},
3015+ )
3016+
3017+ self ._throw_on_error (res )
3018+ return unmarshal_Website (res .json ())
0 commit comments