Skip to content

Commit 2b892a1

Browse files
committed
feat: update generated APIs
1 parent a2946f9 commit 2b892a1

File tree

8 files changed

+1370
-532
lines changed

8 files changed

+1370
-532
lines changed

scaleway-async/scaleway_async/webhosting/v1/__init__.py

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# This file was automatically generated. DO NOT EDIT.
22
# If you have any remark or suggestion do not hesitate to open an issue.
3-
from .types import HostingDnsStatus
3+
from .types import DnsRecordStatus
4+
from .types import DnsRecordType
5+
from .types import DnsRecordsStatus
46
from .types import HostingStatus
57
from .content import HOSTING_TRANSIENT_STATUSES
68
from .types import HostingSummaryStatus
@@ -12,21 +14,28 @@
1214
from .types import ListMailAccountsRequestOrderBy
1315
from .types import ListOffersRequestOrderBy
1416
from .types import ListWebsitesRequestOrderBy
17+
from .types import NameserverStatus
1518
from .types import OfferOptionName
1619
from .types import OfferOptionWarning
20+
from .types import PlatformPlatformGroup
21+
from .types import PlatformControlPanelUrls
1722
from .types import OfferOption
23+
from .types import PlatformControlPanel
1824
from .types import CreateHostingRequestDomainConfiguration
1925
from .types import OfferOptionRequest
20-
from .types import HostingCpanelUrls
21-
from .types import HostingOption
26+
from .types import DnsRecord
27+
from .types import Nameserver
28+
from .types import HostingUser
29+
from .types import Offer
30+
from .types import Platform
2231
from .types import ControlPanel
2332
from .types import DatabaseUser
2433
from .types import Database
2534
from .types import FtpAccount
2635
from .types import HostingSummary
2736
from .types import MailAccount
28-
from .types import Offer
2937
from .types import Website
38+
from .types import CheckUserOwnsDomainResponse
3039
from .types import ControlPanelApiListControlPanelsRequest
3140
from .types import DatabaseApiAssignDatabaseUserRequest
3241
from .types import DatabaseApiChangeDatabaseUserPasswordRequest
@@ -39,6 +48,9 @@
3948
from .types import DatabaseApiListDatabaseUsersRequest
4049
from .types import DatabaseApiListDatabasesRequest
4150
from .types import DatabaseApiUnassignDatabaseUserRequest
51+
from .types import DnsApiCheckUserOwnsDomainRequest
52+
from .types import DnsApiGetDomainDnsRecordsRequest
53+
from .types import DnsRecords
4254
from .types import FtpAccountApiChangeFtpAccountPasswordRequest
4355
from .types import FtpAccountApiCreateFtpAccountRequest
4456
from .types import FtpAccountApiListFtpAccountsRequest
@@ -71,14 +83,17 @@
7183
from .types import WebsiteApiListWebsitesRequest
7284
from .api import WebhostingV1ControlPanelAPI
7385
from .api import WebhostingV1DatabaseAPI
86+
from .api import WebhostingV1DnsAPI
7487
from .api import WebhostingV1OfferAPI
7588
from .api import WebhostingV1HostingAPI
7689
from .api import WebhostingV1FtpAccountAPI
7790
from .api import WebhostingV1MailAccountAPI
7891
from .api import WebhostingV1WebsiteAPI
7992

8093
__all__ = [
81-
"HostingDnsStatus",
94+
"DnsRecordStatus",
95+
"DnsRecordType",
96+
"DnsRecordsStatus",
8297
"HostingStatus",
8398
"HOSTING_TRANSIENT_STATUSES",
8499
"HostingSummaryStatus",
@@ -90,21 +105,28 @@
90105
"ListMailAccountsRequestOrderBy",
91106
"ListOffersRequestOrderBy",
92107
"ListWebsitesRequestOrderBy",
108+
"NameserverStatus",
93109
"OfferOptionName",
94110
"OfferOptionWarning",
111+
"PlatformPlatformGroup",
112+
"PlatformControlPanelUrls",
95113
"OfferOption",
114+
"PlatformControlPanel",
96115
"CreateHostingRequestDomainConfiguration",
97116
"OfferOptionRequest",
98-
"HostingCpanelUrls",
99-
"HostingOption",
117+
"DnsRecord",
118+
"Nameserver",
119+
"HostingUser",
120+
"Offer",
121+
"Platform",
100122
"ControlPanel",
101123
"DatabaseUser",
102124
"Database",
103125
"FtpAccount",
104126
"HostingSummary",
105127
"MailAccount",
106-
"Offer",
107128
"Website",
129+
"CheckUserOwnsDomainResponse",
108130
"ControlPanelApiListControlPanelsRequest",
109131
"DatabaseApiAssignDatabaseUserRequest",
110132
"DatabaseApiChangeDatabaseUserPasswordRequest",
@@ -117,6 +139,9 @@
117139
"DatabaseApiListDatabaseUsersRequest",
118140
"DatabaseApiListDatabasesRequest",
119141
"DatabaseApiUnassignDatabaseUserRequest",
142+
"DnsApiCheckUserOwnsDomainRequest",
143+
"DnsApiGetDomainDnsRecordsRequest",
144+
"DnsRecords",
120145
"FtpAccountApiChangeFtpAccountPasswordRequest",
121146
"FtpAccountApiCreateFtpAccountRequest",
122147
"FtpAccountApiListFtpAccountsRequest",
@@ -149,6 +174,7 @@
149174
"WebsiteApiListWebsitesRequest",
150175
"WebhostingV1ControlPanelAPI",
151176
"WebhostingV1DatabaseAPI",
177+
"WebhostingV1DnsAPI",
152178
"WebhostingV1OfferAPI",
153179
"WebhostingV1HostingAPI",
154180
"WebhostingV1FtpAccountAPI",

scaleway-async/scaleway_async/webhosting/v1/api.py

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
ListMailAccountsRequestOrderBy,
2323
ListOffersRequestOrderBy,
2424
ListWebsitesRequestOrderBy,
25+
CheckUserOwnsDomainResponse,
2526
ControlPanel,
2627
CreateHostingRequestDomainConfiguration,
2728
Database,
@@ -31,6 +32,8 @@
3132
DatabaseApiCreateDatabaseUserRequest,
3233
DatabaseApiUnassignDatabaseUserRequest,
3334
DatabaseUser,
35+
DnsApiCheckUserOwnsDomainRequest,
36+
DnsRecords,
3437
FtpAccount,
3538
FtpAccountApiChangeFtpAccountPasswordRequest,
3639
FtpAccountApiCreateFtpAccountRequest,
@@ -65,6 +68,8 @@
6568
unmarshal_Database,
6669
unmarshal_FtpAccount,
6770
unmarshal_MailAccount,
71+
unmarshal_CheckUserOwnsDomainResponse,
72+
unmarshal_DnsRecords,
6873
unmarshal_Hosting,
6974
unmarshal_ListControlPanelsResponse,
7075
unmarshal_ListDatabaseUsersResponse,
@@ -82,6 +87,7 @@
8287
marshal_DatabaseApiCreateDatabaseRequest,
8388
marshal_DatabaseApiCreateDatabaseUserRequest,
8489
marshal_DatabaseApiUnassignDatabaseUserRequest,
90+
marshal_DnsApiCheckUserOwnsDomainRequest,
8591
marshal_FtpAccountApiChangeFtpAccountPasswordRequest,
8692
marshal_FtpAccountApiCreateFtpAccountRequest,
8793
marshal_HostingApiCreateHostingRequest,
@@ -727,6 +733,89 @@ async def unassign_database_user(
727733
return unmarshal_DatabaseUser(res.json())
728734

729735

736+
class WebhostingV1DnsAPI(API):
737+
"""
738+
This API allows you to manage your Web Hosting services.
739+
"""
740+
741+
async def get_domain_dns_records(
742+
self,
743+
*,
744+
domain: str,
745+
region: Optional[Region] = None,
746+
) -> DnsRecords:
747+
"""
748+
Get DNS records.
749+
Get the set of DNS records of a specified domain associated with a Web Hosting plan's domain.
750+
:param domain: Domain associated with the DNS records.
751+
:param region: Region to target. If none is passed will use default region from the config.
752+
:return: :class:`DnsRecords <DnsRecords>`
753+
754+
Usage:
755+
::
756+
757+
result = await api.get_domain_dns_records(
758+
domain="example",
759+
)
760+
"""
761+
762+
param_region = validate_path_param(
763+
"region", region or self.client.default_region
764+
)
765+
param_domain = validate_path_param("domain", domain)
766+
767+
res = self._request(
768+
"GET",
769+
f"/webhosting/v1/regions/{param_region}/domains/{param_domain}/dns-records",
770+
)
771+
772+
self._throw_on_error(res)
773+
return unmarshal_DnsRecords(res.json())
774+
775+
async def check_user_owns_domain(
776+
self,
777+
*,
778+
domain: str,
779+
region: Optional[Region] = None,
780+
project_id: Optional[str] = None,
781+
) -> CheckUserOwnsDomainResponse:
782+
"""
783+
"Check whether you own this domain or not.".
784+
:param domain: Domain for which ownership is to be verified.
785+
:param region: Region to target. If none is passed will use default region from the config.
786+
:param project_id: ID of the project currently in use.
787+
:return: :class:`CheckUserOwnsDomainResponse <CheckUserOwnsDomainResponse>`
788+
789+
Usage:
790+
::
791+
792+
result = await api.check_user_owns_domain(
793+
domain="example",
794+
)
795+
"""
796+
797+
param_region = validate_path_param(
798+
"region", region or self.client.default_region
799+
)
800+
param_domain = validate_path_param("domain", domain)
801+
802+
res = self._request(
803+
"POST",
804+
f"/webhosting/v1/regions/{param_region}/domains/{param_domain}/check-ownership",
805+
body=marshal_DnsApiCheckUserOwnsDomainRequest(
806+
DnsApiCheckUserOwnsDomainRequest(
807+
domain=domain,
808+
region=region,
809+
project_id=project_id,
810+
),
811+
self.client,
812+
),
813+
)
814+
815+
self._throw_on_error(res)
816+
return unmarshal_CheckUserOwnsDomainResponse(res.json())
817+
818+
730819
class WebhostingV1OfferAPI(API):
731820
"""
732821
This API allows you to manage your offer for your Web Hosting services.

0 commit comments

Comments
 (0)