scaleway.webhosting.v1alpha1 package

Submodules

scaleway.webhosting.v1alpha1.api module

class scaleway.webhosting.v1alpha1.api.WebhostingV1Alpha1API(client: Client, *, bypass_validation: bool = False)

Bases: API

This API allows you to manage your Web Hosting services.

check_user_owns_domain(*, domain: str, region: Optional[str] = None, project_id: Optional[str] = None) CheckUserOwnsDomainResponse

“Check whether you own this domain or not.”. :param domain: Domain for which ownership is to be verified. :param region: Region to target. If none is passed will use default region from the config. :param project_id: ID of the project currently in use. :return: CheckUserOwnsDomainResponse

Usage:

result = api.check_user_owns_domain(
    domain="example",
)
create_hosting(*, offer_id: str, domain: str, region: Optional[str] = None, project_id: Optional[str] = None, email: Optional[str] = None, tags: Optional[List[str]] = None, option_ids: Optional[List[str]] = None, language: Optional[LanguageCode] = None, domain_configuration: Optional[CreateHostingRequestDomainConfiguration] = None) Hosting

Order a Web Hosting plan. Order a Web Hosting plan, specifying the offer type required via the offer_id parameter. :param offer_id: ID of the selected offer for the Web Hosting plan. :param domain: Domain name to link to the Web Hosting plan. You must already own this domain name, and have completed the DNS validation process beforehand. :param region: Region to target. If none is passed will use default region from the config. :param project_id: ID of the Scaleway Project in which to create the Web Hosting plan. :param email: Contact email for the Web Hosting client. :param tags: List of tags for the Web Hosting plan. :param option_ids: IDs of any selected additional options for the Web Hosting plan. :param language: Default language for the control panel interface. :param domain_configuration: Indicates whether to update hosting domain name servers and DNS records for domains managed by Scaleway Elements. :return: Hosting

Usage:

result = api.create_hosting(
    offer_id="example",
    domain="example",
)
create_session(*, hosting_id: str, region: Optional[str] = None) Session

Create a user session. :param hosting_id: Hosting ID. :param region: Region to target. If none is passed will use default region from the config. :return: Session

Usage:

result = api.create_session(
    hosting_id="example",
)
delete_hosting(*, hosting_id: str, region: Optional[str] = None) Hosting

Delete a Web Hosting plan. Delete a Web Hosting plan, specified by its hosting_id. Note that deletion is not immediate: it will take place at the end of the calendar month, after which time your Web Hosting plan and all its data (files and emails) will be irreversibly lost. :param hosting_id: Hosting ID. :param region: Region to target. If none is passed will use default region from the config. :return: Hosting

Usage:

result = api.delete_hosting(
    hosting_id="example",
)
get_domain_dns_records(*, domain: str, region: Optional[str] = None) DnsRecords

Get DNS records. Get the set of DNS records of a specified domain associated with a Web Hosting plan. :param domain: Domain associated with the DNS records. :param region: Region to target. If none is passed will use default region from the config. :return: DnsRecords

Usage:

result = api.get_domain_dns_records(
    domain="example",
)
get_hosting(*, hosting_id: str, region: Optional[str] = None) Hosting

Get a Web Hosting plan. Get the details of one of your existing Web Hosting plans, specified by its hosting_id. :param hosting_id: Hosting ID. :param region: Region to target. If none is passed will use default region from the config. :return: Hosting

Usage:

result = api.get_hosting(
    hosting_id="example",
)
list_control_panels(*, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None) ListControlPanelsResponse

“List the control panels type: cpanel or plesk.”. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number to return, from the paginated results (must be a positive integer). :param page_size: Number of control panels to return (must be a positive integer lower or equal to 100). :return: ListControlPanelsResponse

Usage:

result = api.list_control_panels()
list_control_panels_all(*, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None) List[ControlPanel]

“List the control panels type: cpanel or plesk.”. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number to return, from the paginated results (must be a positive integer). :param page_size: Number of control panels to return (must be a positive integer lower or equal to 100). :return: List[ControlPanel]

Usage:

result = api.list_control_panels_all()
list_hostings(*, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListHostingsRequestOrderBy] = None, tags: Optional[List[str]] = None, statuses: Optional[List[HostingStatus]] = None, domain: Optional[str] = None, project_id: Optional[str] = None, organization_id: Optional[str] = None, control_panels: Optional[List[str]] = None) ListHostingsResponse

List all Web Hosting plans. List all of your existing Web Hosting plans. Various filters are available to limit the results, including filtering by domain, status, tag and Project ID. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number to return, from the paginated results (must be a positive integer). :param page_size: Number of Web Hosting plans to return (must be a positive integer lower or equal to 100). :param order_by: Sort order for Web Hosting plans in the response. :param tags: Tags to filter for, only Web Hosting plans with matching tags will be returned. :param statuses: Statuses to filter for, only Web Hosting plans with matching statuses will be returned. :param domain: Domain to filter for, only Web Hosting plans associated with this domain will be returned. :param project_id: Project ID to filter for, only Web Hosting plans from this Project will be returned. :param organization_id: Organization ID to filter for, only Web Hosting plans from this Organization will be returned. :param control_panels: Name of the control panel to filter for, only Web Hosting plans from this control panel will be returned. :return: ListHostingsResponse

Usage:

result = api.list_hostings()
list_hostings_all(*, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListHostingsRequestOrderBy] = None, tags: Optional[List[str]] = None, statuses: Optional[List[HostingStatus]] = None, domain: Optional[str] = None, project_id: Optional[str] = None, organization_id: Optional[str] = None, control_panels: Optional[List[str]] = None) List[Hosting]

List all Web Hosting plans. List all of your existing Web Hosting plans. Various filters are available to limit the results, including filtering by domain, status, tag and Project ID. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number to return, from the paginated results (must be a positive integer). :param page_size: Number of Web Hosting plans to return (must be a positive integer lower or equal to 100). :param order_by: Sort order for Web Hosting plans in the response. :param tags: Tags to filter for, only Web Hosting plans with matching tags will be returned. :param statuses: Statuses to filter for, only Web Hosting plans with matching statuses will be returned. :param domain: Domain to filter for, only Web Hosting plans associated with this domain will be returned. :param project_id: Project ID to filter for, only Web Hosting plans from this Project will be returned. :param organization_id: Organization ID to filter for, only Web Hosting plans from this Organization will be returned. :param control_panels: Name of the control panel to filter for, only Web Hosting plans from this control panel will be returned. :return: List[Hosting]

Usage:

result = api.list_hostings_all()
list_offers(*, without_options: bool, only_options: bool, region: Optional[str] = None, order_by: Optional[ListOffersRequestOrderBy] = None, hosting_id: Optional[str] = None, control_panels: Optional[List[str]] = None) ListOffersResponse

List all offers. List the different Web Hosting offers, and their options, available to order from Scaleway. :param without_options: Defines whether the response should consist of offers only, without options. :param only_options: Defines whether the response should consist of options only, without offers. :param region: Region to target. If none is passed will use default region from the config. :param order_by: Sort order of offers in the response. :param hosting_id: ID of a Web Hosting plan, to check compatibility with returned offers (in case of wanting to update the plan). :param control_panels: Name of the control panel to filter for. :return: ListOffersResponse

Usage:

result = api.list_offers(
    without_options=False,
    only_options=False,
)
reset_hosting_password(*, hosting_id: str, region: Optional[str] = None) ResetHostingPasswordResponse
Parameters:
  • hosting_id – UUID of the hosting.

  • region – Region to target. If none is passed will use default region from the config.

Returns:

ResetHostingPasswordResponse

Usage:

result = api.reset_hosting_password(
    hosting_id="example",
)
restore_hosting(*, hosting_id: str, region: Optional[str] = None) Hosting

Restore a Web Hosting plan. When you [delete a Web Hosting plan](#path-hostings-delete-a-hosting), definitive deletion does not take place until the end of the calendar month. In the time between initiating the deletion, and definitive deletion at the end of the month, you can choose to restore the Web Hosting plan, using this endpoint and specifying its hosting_id. :param hosting_id: Hosting ID. :param region: Region to target. If none is passed will use default region from the config. :return: Hosting

Usage:

result = api.restore_hosting(
    hosting_id="example",
)
update_hosting(*, hosting_id: str, region: Optional[str] = None, email: Optional[str] = None, tags: Optional[List[str]] = None, option_ids: Optional[List[str]] = None, offer_id: Optional[str] = None, protected: Optional[bool] = None) Hosting

Update a Web Hosting plan. Update the details of one of your existing Web Hosting plans, specified by its hosting_id. You can update parameters including the contact email address, tags, options and offer. :param hosting_id: Hosting ID. :param region: Region to target. If none is passed will use default region from the config. :param email: New contact email for the Web Hosting plan. :param tags: New tags for the Web Hosting plan. :param option_ids: IDs of the new options for the Web Hosting plan. :param offer_id: ID of the new offer for the Web Hosting plan. :param protected: Whether the hosting is protected or not. :return: Hosting

Usage:

result = api.update_hosting(
    hosting_id="example",
)
wait_for_hosting(*, hosting_id: str, region: Optional[str] = None, options: Optional[WaitForOptions[Hosting, bool]] = None) Hosting

Get a Web Hosting plan. Get the details of one of your existing Web Hosting plans, specified by its hosting_id. :param hosting_id: Hosting ID. :param region: Region to target. If none is passed will use default region from the config. :return: Hosting

Usage:

result = api.get_hosting(
    hosting_id="example",
)
class scaleway.webhosting.v1alpha1.api.WebhostingV1Alpha1ClassicMailAPI(client: Client, *, bypass_validation: bool = False)

Bases: API

This API allows you to manage your mailboxes for your Web Hosting services.

create_mailbox(*, online_id: int, password: str, region: Optional[str] = None, email: Optional[EmailAddress] = None) Mailbox

Create a new mailbox within your hosting plan. :param online_id: The Online hosting ID. :param password: Password for the new mailbox. :param region: Region to target. If none is passed will use default region from the config. :param email: The email address of the mailbox. :return: Mailbox

Usage:

result = api.create_mailbox(
    online_id=1,
    password="example",
)
delete_mailbox(*, online_id: int, mailbox_id: int, region: Optional[str] = None) Mailbox
Parameters:
  • online_id – The Online hosting ID.

  • mailbox_id – The ID of the mailbox to delete.

  • region – Region to target. If none is passed will use default region from the config.

Returns:

Mailbox

Usage:

result = api.delete_mailbox(
    online_id=1,
    mailbox_id=1,
)
get_mailbox(*, online_id: int, mailbox_id: int, region: Optional[str] = None) Mailbox

Get a mailbox by id within your hosting plan. :param online_id: The Online hosting ID. :param mailbox_id: The ID of the mailbox to get. :param region: Region to target. If none is passed will use default region from the config. :return: Mailbox

Usage:

result = api.get_mailbox(
    online_id=1,
    mailbox_id=1,
)
list_mailboxes(*, online_id: int, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, domain: Optional[str] = None) ListMailboxesResponse

List all mailboxes within your hosting plan. :param online_id: The Online hosting ID. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number (must be a positive integer). :param page_size: Number of mailboxes to return (must be a positive integer lower or equal to 100). :param domain: Domain to filter the mailboxes. :return: ListMailboxesResponse

Usage:

result = api.list_mailboxes(
    online_id=1,
)
list_mailboxes_all(*, online_id: int, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, domain: Optional[str] = None) List[Mailbox]

List all mailboxes within your hosting plan. :param online_id: The Online hosting ID. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number (must be a positive integer). :param page_size: Number of mailboxes to return (must be a positive integer lower or equal to 100). :param domain: Domain to filter the mailboxes. :return: List[Mailbox]

Usage:

result = api.list_mailboxes_all(
    online_id=1,
)
update_mailbox(*, online_id: int, mailbox_id: int, region: Optional[str] = None, password: Optional[str] = None) Mailbox

Update the mailbox within your hosting plan. :param online_id: The Online hosting ID. :param mailbox_id: The ID of the mailbox to update. :param region: Region to target. If none is passed will use default region from the config. :param password: New password for the mailbox. :return: Mailbox

Usage:

result = api.update_mailbox(
    online_id=1,
    mailbox_id=1,
)

scaleway.webhosting.v1alpha1.content module

scaleway.webhosting.v1alpha1.content.HOSTING_TRANSIENT_STATUSES: List[HostingStatus] = [<HostingStatus.DELIVERING: 'delivering'>, <HostingStatus.DELETING: 'deleting'>, <HostingStatus.MIGRATING: 'migrating'>]

Lists transient statutes of the enum HostingStatus.

scaleway.webhosting.v1alpha1.marshalling module

scaleway.webhosting.v1alpha1.marshalling.marshal_CheckUserOwnsDomainRequest(request: CheckUserOwnsDomainRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.webhosting.v1alpha1.marshalling.marshal_ClassicMailApiCreateMailboxRequest(request: ClassicMailApiCreateMailboxRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.webhosting.v1alpha1.marshalling.marshal_ClassicMailApiUpdateMailboxRequest(request: ClassicMailApiUpdateMailboxRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.webhosting.v1alpha1.marshalling.marshal_CreateHostingRequest(request: CreateHostingRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.webhosting.v1alpha1.marshalling.marshal_CreateHostingRequestDomainConfiguration(request: CreateHostingRequestDomainConfiguration, defaults: ProfileDefaults) Dict[str, Any]
scaleway.webhosting.v1alpha1.marshalling.marshal_EmailAddress(request: EmailAddress, defaults: ProfileDefaults) Dict[str, Any]
scaleway.webhosting.v1alpha1.marshalling.marshal_UpdateHostingRequest(request: UpdateHostingRequest, defaults: ProfileDefaults) Dict[str, Any]
scaleway.webhosting.v1alpha1.marshalling.unmarshal_CheckUserOwnsDomainResponse(data: Any) CheckUserOwnsDomainResponse
scaleway.webhosting.v1alpha1.marshalling.unmarshal_ControlPanel(data: Any) ControlPanel
scaleway.webhosting.v1alpha1.marshalling.unmarshal_DnsRecord(data: Any) DnsRecord
scaleway.webhosting.v1alpha1.marshalling.unmarshal_DnsRecords(data: Any) DnsRecords
scaleway.webhosting.v1alpha1.marshalling.unmarshal_EmailAddress(data: Any) EmailAddress
scaleway.webhosting.v1alpha1.marshalling.unmarshal_Hosting(data: Any) Hosting
scaleway.webhosting.v1alpha1.marshalling.unmarshal_HostingCpanelUrls(data: Any) HostingCpanelUrls
scaleway.webhosting.v1alpha1.marshalling.unmarshal_HostingOption(data: Any) HostingOption
scaleway.webhosting.v1alpha1.marshalling.unmarshal_ListControlPanelsResponse(data: Any) ListControlPanelsResponse
scaleway.webhosting.v1alpha1.marshalling.unmarshal_ListHostingsResponse(data: Any) ListHostingsResponse
scaleway.webhosting.v1alpha1.marshalling.unmarshal_ListMailboxesResponse(data: Any) ListMailboxesResponse
scaleway.webhosting.v1alpha1.marshalling.unmarshal_ListOffersResponse(data: Any) ListOffersResponse
scaleway.webhosting.v1alpha1.marshalling.unmarshal_Mailbox(data: Any) Mailbox
scaleway.webhosting.v1alpha1.marshalling.unmarshal_Nameserver(data: Any) Nameserver
scaleway.webhosting.v1alpha1.marshalling.unmarshal_Offer(data: Any) Offer
scaleway.webhosting.v1alpha1.marshalling.unmarshal_OfferProduct(data: Any) OfferProduct
scaleway.webhosting.v1alpha1.marshalling.unmarshal_ResetHostingPasswordResponse(data: Any) ResetHostingPasswordResponse
scaleway.webhosting.v1alpha1.marshalling.unmarshal_Session(data: Any) Session

scaleway.webhosting.v1alpha1.types module

class scaleway.webhosting.v1alpha1.types.CheckUserOwnsDomainRequest(domain: 'str', region: 'Optional[ScwRegion]', project_id: 'Optional[str]')

Bases: object

domain: str

Domain for which ownership is to be verified.

project_id: Optional[str]

ID of the project currently in use.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.webhosting.v1alpha1.types.CheckUserOwnsDomainResponse(owns_domain: 'bool')

Bases: object

owns_domain: bool

Indicates whether the specified project owns the domain.

class scaleway.webhosting.v1alpha1.types.ClassicMailApiCreateMailboxRequest(online_id: 'int', password: 'str', region: 'Optional[ScwRegion]', email: 'Optional[EmailAddress]')

Bases: object

email: Optional[EmailAddress]

The email address of the mailbox.

online_id: int

The Online hosting ID.

password: str

Password for the new mailbox.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.webhosting.v1alpha1.types.ClassicMailApiDeleteMailboxRequest(online_id: 'int', mailbox_id: 'int', region: 'Optional[ScwRegion]')

Bases: object

mailbox_id: int

The ID of the mailbox to delete.

online_id: int

The Online hosting ID.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.webhosting.v1alpha1.types.ClassicMailApiGetMailboxRequest(online_id: 'int', mailbox_id: 'int', region: 'Optional[ScwRegion]')

Bases: object

mailbox_id: int

The ID of the mailbox to get.

online_id: int

The Online hosting ID.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.webhosting.v1alpha1.types.ClassicMailApiListMailboxesRequest(online_id: 'int', region: 'Optional[ScwRegion]', page: 'Optional[int]', page_size: 'Optional[int]', domain: 'Optional[str]')

Bases: object

domain: Optional[str]

Domain to filter the mailboxes.

online_id: int

The Online hosting ID.

page: Optional[int]

Page number (must be a positive integer).

page_size: Optional[int]

Number of mailboxes to return (must be a positive integer lower or equal to 100).

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.webhosting.v1alpha1.types.ClassicMailApiUpdateMailboxRequest(online_id: 'int', mailbox_id: 'int', region: 'Optional[ScwRegion]', password: 'Optional[str]')

Bases: object

mailbox_id: int

The ID of the mailbox to update.

online_id: int

The Online hosting ID.

password: Optional[str]

New password for the mailbox.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.webhosting.v1alpha1.types.ControlPanel(name: 'str', available: 'bool', logo_url: 'str', available_languages: 'List[StdLanguageCode]')

Bases: object

available: bool

Define if the control panel type is available to order.

available_languages: List[LanguageCode]

List of available languages for the control panel.

logo_url: str

URL of this control panel’s logo.

name: str

Control panel name.

class scaleway.webhosting.v1alpha1.types.CreateHostingRequest(offer_id: 'str', domain: 'str', region: 'Optional[ScwRegion]', project_id: 'Optional[str]', email: 'Optional[str]', tags: 'Optional[List[str]]', option_ids: 'Optional[List[str]]', language: 'Optional[StdLanguageCode]', domain_configuration: 'Optional[CreateHostingRequestDomainConfiguration]')

Bases: object

domain: str

Domain name to link to the Web Hosting plan. You must already own this domain name, and have completed the DNS validation process beforehand.

domain_configuration: Optional[CreateHostingRequestDomainConfiguration]

Indicates whether to update hosting domain name servers and DNS records for domains managed by Scaleway Elements.

email: Optional[str]

Contact email for the Web Hosting client.

language: Optional[LanguageCode]

Default language for the control panel interface.

offer_id: str

ID of the selected offer for the Web Hosting plan.

option_ids: Optional[List[str]]

IDs of any selected additional options for the Web Hosting plan.

project_id: Optional[str]

ID of the Scaleway Project in which to create the Web Hosting plan.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

tags: Optional[List[str]]

List of tags for the Web Hosting plan.

class scaleway.webhosting.v1alpha1.types.CreateHostingRequestDomainConfiguration(update_nameservers: 'bool', update_web_record: 'bool', update_mail_record: 'bool', update_all_records: 'bool')

Bases: object

update_all_records: bool
update_mail_record: bool
update_nameservers: bool
update_web_record: bool
class scaleway.webhosting.v1alpha1.types.CreateSessionRequest(hosting_id: 'str', region: 'Optional[ScwRegion]')

Bases: object

hosting_id: str

Hosting ID.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.webhosting.v1alpha1.types.DeleteHostingRequest(hosting_id: 'str', region: 'Optional[ScwRegion]')

Bases: object

hosting_id: str

Hosting ID.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.webhosting.v1alpha1.types.DnsRecord(name: 'str', type_: 'DnsRecordType', ttl: 'int', value: 'str', status: 'DnsRecordStatus', priority: 'Optional[int]')

Bases: object

name: str

Record name.

priority: Optional[int]

Record priority level.

status: DnsRecordStatus

Record status.

ttl: int

Record time-to-live.

type_: DnsRecordType

Record type.

value: str

Record value.

class scaleway.webhosting.v1alpha1.types.DnsRecordStatus(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

INVALID = 'invalid'
UNKNOWN_STATUS = 'unknown_status'
VALID = 'valid'
class scaleway.webhosting.v1alpha1.types.DnsRecordType(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

A = 'a'
AAAA = 'aaaa'
CNAME = 'cname'
MX = 'mx'
NS = 'ns'
TXT = 'txt'
UNKNOWN_TYPE = 'unknown_type'
class scaleway.webhosting.v1alpha1.types.DnsRecords(records: 'List[DnsRecord]', name_servers: 'List[Nameserver]', status: 'DnsRecordsStatus')

Bases: object

name_servers: List[Nameserver]

List of nameservers.

records: List[DnsRecord]

List of DNS records.

status: DnsRecordsStatus

Status of the records.

class scaleway.webhosting.v1alpha1.types.DnsRecordsStatus(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

INVALID = 'invalid'
UNKNOWN = 'unknown'
VALID = 'valid'
class scaleway.webhosting.v1alpha1.types.EmailAddress(domain: 'str', login: 'str')

Bases: object

domain: str

Domain part of the mailbox address.

login: str

Username part address of the mailbox address.

class scaleway.webhosting.v1alpha1.types.GetDomainDnsRecordsRequest(domain: 'str', region: 'Optional[ScwRegion]')

Bases: object

domain: str

Domain associated with the DNS records.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.webhosting.v1alpha1.types.GetHostingRequest(hosting_id: 'str', region: 'Optional[ScwRegion]')

Bases: object

hosting_id: str

Hosting ID.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.webhosting.v1alpha1.types.Hosting(id: 'str', organization_id: 'str', project_id: 'str', status: 'HostingStatus', platform_hostname: 'str', offer_id: 'str', offer_name: 'str', domain: 'str', tags: 'List[str]', updated_at: 'Optional[datetime]', created_at: 'Optional[datetime]', platform_number: 'Optional[int]', options: 'List[HostingOption]', dns_status: 'HostingDnsStatus', username: 'str', offer_end_of_life: 'bool', control_panel_name: 'str', platform_group: 'str', ipv4: 'str', ipv6: 'str', protected: 'bool', one_time_password: 'str', region: 'ScwRegion', cpanel_urls: 'Optional[HostingCpanelUrls]')

Bases: object

control_panel_name: str

Name of the control panel.

cpanel_urls: Optional[HostingCpanelUrls]

URL to connect to cPanel dashboard and to Webmail interface.

created_at: Optional[datetime]

Date on which the Web Hosting plan was created.

dns_status: HostingDnsStatus

DNS status of the Web Hosting plan.

domain: str

Main domain associated with the Web Hosting plan.

id: str

ID of the Web Hosting plan.

ipv4: str

IPv4 address of the hosting’s host server.

ipv6: str

IPv6 address of the hosting’s host server.

offer_end_of_life: bool

Indicates if the hosting offer has reached its end of life.

offer_id: str

ID of the active offer for the Web Hosting plan.

offer_name: str

Name of the active offer for the Web Hosting plan.

one_time_password: str

One-time-password used for the first login or reset password, empty after first use.

options: List[HostingOption]

Array of any options activated for the Web Hosting plan.

organization_id: str

ID of the Scaleway Organization the Web Hosting plan belongs to.

platform_group: str

Group of the hosting’s host server/platform.

platform_hostname: str

Hostname of the host platform.

platform_number: Optional[int]

Number of the host platform.

project_id: str

ID of the Scaleway Project the Web Hosting plan belongs to.

protected: bool

Whether the hosting is protected or not.

region: str

Region where the Web Hosting plan is hosted.

status: HostingStatus

Status of the Web Hosting plan.

tags: List[str]

List of tags associated with the Web Hosting plan.

updated_at: Optional[datetime]

Date on which the Web Hosting plan was last updated.

username: str

Main Web Hosting cPanel username.

class scaleway.webhosting.v1alpha1.types.HostingCpanelUrls(dashboard: 'str', webmail: 'str')

Bases: object

dashboard: str
webmail: str
class scaleway.webhosting.v1alpha1.types.HostingDnsStatus(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

INVALID = 'invalid'
UNKNOWN_DNS_STATUS = 'unknown_dns_status'
VALID = 'valid'
class scaleway.webhosting.v1alpha1.types.HostingOption(id: 'str', name: 'str')

Bases: object

id: str

Option ID.

name: str

Option name.

class scaleway.webhosting.v1alpha1.types.HostingStatus(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

DELETING = 'deleting'
DELIVERING = 'delivering'
ERROR = 'error'
LOCKED = 'locked'
MIGRATING = 'migrating'
READY = 'ready'
UNKNOWN_STATUS = 'unknown_status'
class scaleway.webhosting.v1alpha1.types.ListControlPanelsRequest(region: 'Optional[ScwRegion]', page: 'Optional[int]', page_size: 'Optional[int]')

Bases: object

page: Optional[int]

Page number to return, from the paginated results (must be a positive integer).

page_size: Optional[int]

Number of control panels to return (must be a positive integer lower or equal to 100).

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.webhosting.v1alpha1.types.ListControlPanelsResponse(total_count: 'int', control_panels: 'List[ControlPanel]')

Bases: object

control_panels: List[ControlPanel]

List of control panels.

total_count: int

Number of control panels returned.

class scaleway.webhosting.v1alpha1.types.ListHostingsRequest(region: 'Optional[ScwRegion]', page: 'Optional[int]', page_size: 'Optional[int]', order_by: 'Optional[ListHostingsRequestOrderBy]', tags: 'Optional[List[str]]', statuses: 'Optional[List[HostingStatus]]', domain: 'Optional[str]', project_id: 'Optional[str]', organization_id: 'Optional[str]', control_panels: 'Optional[List[str]]')

Bases: object

control_panels: Optional[List[str]]

Name of the control panel to filter for, only Web Hosting plans from this control panel will be returned.

domain: Optional[str]

Domain to filter for, only Web Hosting plans associated with this domain will be returned.

order_by: Optional[ListHostingsRequestOrderBy]

Sort order for Web Hosting plans in the response.

organization_id: Optional[str]

Organization ID to filter for, only Web Hosting plans from this Organization will be returned.

page: Optional[int]

Page number to return, from the paginated results (must be a positive integer).

page_size: Optional[int]

Number of Web Hosting plans to return (must be a positive integer lower or equal to 100).

project_id: Optional[str]

Project ID to filter for, only Web Hosting plans from this Project will be returned.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

statuses: Optional[List[HostingStatus]]

Statuses to filter for, only Web Hosting plans with matching statuses will be returned.

tags: Optional[List[str]]

Tags to filter for, only Web Hosting plans with matching tags will be returned.

class scaleway.webhosting.v1alpha1.types.ListHostingsRequestOrderBy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

CREATED_AT_ASC = 'created_at_asc'
CREATED_AT_DESC = 'created_at_desc'
class scaleway.webhosting.v1alpha1.types.ListHostingsResponse(total_count: 'int', hostings: 'List[Hosting]')

Bases: object

hostings: List[Hosting]

List of Web Hosting plans.

total_count: int

Number of Web Hosting plans returned.

class scaleway.webhosting.v1alpha1.types.ListMailboxesResponse(total_count: 'int', mailboxes: 'List[Mailbox]')

Bases: object

mailboxes: List[Mailbox]

List of mailboxes.

total_count: int

Total number of mailboxes.

class scaleway.webhosting.v1alpha1.types.ListOffersRequest(without_options: 'bool', only_options: 'bool', region: 'Optional[ScwRegion]', order_by: 'Optional[ListOffersRequestOrderBy]', hosting_id: 'Optional[str]', control_panels: 'Optional[List[str]]')

Bases: object

control_panels: Optional[List[str]]

Name of the control panel to filter for.

hosting_id: Optional[str]

ID of a Web Hosting plan, to check compatibility with returned offers (in case of wanting to update the plan).

only_options: bool

Defines whether the response should consist of options only, without offers.

order_by: Optional[ListOffersRequestOrderBy]

Sort order of offers in the response.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

without_options: bool

Defines whether the response should consist of offers only, without options.

class scaleway.webhosting.v1alpha1.types.ListOffersRequestOrderBy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

PRICE_ASC = 'price_asc'
class scaleway.webhosting.v1alpha1.types.ListOffersResponse(offers: 'List[Offer]')

Bases: object

offers: List[Offer]

List of offers.

class scaleway.webhosting.v1alpha1.types.Mailbox(mailbox_id: 'int', email: 'Optional[EmailAddress]')

Bases: object

email: Optional[EmailAddress]

The email address of the mailbox.

mailbox_id: int

The ID of the mailbox.

class scaleway.webhosting.v1alpha1.types.Nameserver(hostname: 'str', status: 'NameserverStatus', is_default: 'bool')

Bases: object

hostname: str

Hostname of the nameserver.

is_default: bool

Defines whether the nameserver is the default one.

status: NameserverStatus

Status of the nameserver.

class scaleway.webhosting.v1alpha1.types.NameserverStatus(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

INVALID = 'invalid'
UNKNOWN_STATUS = 'unknown_status'
VALID = 'valid'
class scaleway.webhosting.v1alpha1.types.Offer(id: 'str', billing_operation_path: 'str', available: 'bool', quota_warnings: 'List[OfferQuotaWarning]', end_of_life: 'bool', control_panel_name: 'str', product: 'Optional[OfferProduct]', price: 'Optional[Money]')

Bases: object

available: bool

If a hosting_id was specified in the call, defines whether this offer is available for that Web Hosting plan to migrate (update) to.

billing_operation_path: str

Unique identifier used for billing.

control_panel_name: str

Name of the control panel.

end_of_life: bool

Indicates if the offer has reached its end of life.

id: str

Offer ID.

price: Optional[Money]

Price of this offer.

product: Optional[OfferProduct]

Product constituting this offer.

quota_warnings: List[OfferQuotaWarning]

Quota warnings, if the offer is not available for the specified hosting_id.

class scaleway.webhosting.v1alpha1.types.OfferProduct(name: 'str', option: 'bool', email_accounts_quota: 'int', email_storage_quota: 'int', databases_quota: 'int', hosting_storage_quota: 'int', support_included: 'bool', v_cpu: 'int', ram: 'int', max_addon_domains: 'int')

Bases: object

databases_quota: int

Limit number of databases.

email_accounts_quota: int

Limit number of email accounts.

email_storage_quota: int

Limit quantity of email storage in gigabytes.

hosting_storage_quota: int

Limit quantity of hosting storage in gigabytes.

max_addon_domains: int

Limit number of add-on domains.

name: str

Product name.

option: bool

Product option.

ram: int

Limit quantity of memory in gigabytes.

support_included: bool

Whether or not support is included.

v_cpu: int

Limit number of virtual CPU.

class scaleway.webhosting.v1alpha1.types.OfferQuotaWarning(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

ADDON_DOMAIN_COUNT_EXCEEDED = 'addon_domain_count_exceeded'
DATABASE_COUNT_EXCEEDED = 'database_count_exceeded'
DISK_USAGE_EXCEEDED = 'disk_usage_exceeded'
EMAIL_COUNT_EXCEEDED = 'email_count_exceeded'
UNKNOWN_QUOTA_WARNING = 'unknown_quota_warning'
class scaleway.webhosting.v1alpha1.types.ResetHostingPasswordRequest(hosting_id: 'str', region: 'Optional[ScwRegion]')

Bases: object

hosting_id: str

UUID of the hosting.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.webhosting.v1alpha1.types.ResetHostingPasswordResponse(password: 'str')

Bases: object

password: str

New password.

class scaleway.webhosting.v1alpha1.types.RestoreHostingRequest(hosting_id: 'str', region: 'Optional[ScwRegion]')

Bases: object

hosting_id: str

Hosting ID.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.webhosting.v1alpha1.types.Session(url: 'str')

Bases: object

url: str

Logged user’s session URL.

class scaleway.webhosting.v1alpha1.types.UpdateHostingRequest(hosting_id: 'str', region: 'Optional[ScwRegion]', email: 'Optional[str]', tags: 'Optional[List[str]]', option_ids: 'Optional[List[str]]', offer_id: 'Optional[str]', protected: 'Optional[bool]')

Bases: object

email: Optional[str]

New contact email for the Web Hosting plan.

hosting_id: str

Hosting ID.

offer_id: Optional[str]

ID of the new offer for the Web Hosting plan.

option_ids: Optional[List[str]]

IDs of the new options for the Web Hosting plan.

protected: Optional[bool]

Whether the hosting is protected or not.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

tags: Optional[List[str]]

New tags for the Web Hosting plan.

Module contents

class scaleway.webhosting.v1alpha1.CheckUserOwnsDomainRequest(domain: 'str', region: 'Optional[ScwRegion]', project_id: 'Optional[str]')

Bases: object

domain: str

Domain for which ownership is to be verified.

project_id: Optional[str]

ID of the project currently in use.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.webhosting.v1alpha1.CheckUserOwnsDomainResponse(owns_domain: 'bool')

Bases: object

owns_domain: bool

Indicates whether the specified project owns the domain.

class scaleway.webhosting.v1alpha1.ClassicMailApiCreateMailboxRequest(online_id: 'int', password: 'str', region: 'Optional[ScwRegion]', email: 'Optional[EmailAddress]')

Bases: object

email: Optional[EmailAddress]

The email address of the mailbox.

online_id: int

The Online hosting ID.

password: str

Password for the new mailbox.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.webhosting.v1alpha1.ClassicMailApiDeleteMailboxRequest(online_id: 'int', mailbox_id: 'int', region: 'Optional[ScwRegion]')

Bases: object

mailbox_id: int

The ID of the mailbox to delete.

online_id: int

The Online hosting ID.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.webhosting.v1alpha1.ClassicMailApiGetMailboxRequest(online_id: 'int', mailbox_id: 'int', region: 'Optional[ScwRegion]')

Bases: object

mailbox_id: int

The ID of the mailbox to get.

online_id: int

The Online hosting ID.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.webhosting.v1alpha1.ClassicMailApiListMailboxesRequest(online_id: 'int', region: 'Optional[ScwRegion]', page: 'Optional[int]', page_size: 'Optional[int]', domain: 'Optional[str]')

Bases: object

domain: Optional[str]

Domain to filter the mailboxes.

online_id: int

The Online hosting ID.

page: Optional[int]

Page number (must be a positive integer).

page_size: Optional[int]

Number of mailboxes to return (must be a positive integer lower or equal to 100).

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.webhosting.v1alpha1.ClassicMailApiUpdateMailboxRequest(online_id: 'int', mailbox_id: 'int', region: 'Optional[ScwRegion]', password: 'Optional[str]')

Bases: object

mailbox_id: int

The ID of the mailbox to update.

online_id: int

The Online hosting ID.

password: Optional[str]

New password for the mailbox.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.webhosting.v1alpha1.ControlPanel(name: 'str', available: 'bool', logo_url: 'str', available_languages: 'List[StdLanguageCode]')

Bases: object

available: bool

Define if the control panel type is available to order.

available_languages: List[LanguageCode]

List of available languages for the control panel.

logo_url: str

URL of this control panel’s logo.

name: str

Control panel name.

class scaleway.webhosting.v1alpha1.CreateHostingRequest(offer_id: 'str', domain: 'str', region: 'Optional[ScwRegion]', project_id: 'Optional[str]', email: 'Optional[str]', tags: 'Optional[List[str]]', option_ids: 'Optional[List[str]]', language: 'Optional[StdLanguageCode]', domain_configuration: 'Optional[CreateHostingRequestDomainConfiguration]')

Bases: object

domain: str

Domain name to link to the Web Hosting plan. You must already own this domain name, and have completed the DNS validation process beforehand.

domain_configuration: Optional[CreateHostingRequestDomainConfiguration]

Indicates whether to update hosting domain name servers and DNS records for domains managed by Scaleway Elements.

email: Optional[str]

Contact email for the Web Hosting client.

language: Optional[LanguageCode]

Default language for the control panel interface.

offer_id: str

ID of the selected offer for the Web Hosting plan.

option_ids: Optional[List[str]]

IDs of any selected additional options for the Web Hosting plan.

project_id: Optional[str]

ID of the Scaleway Project in which to create the Web Hosting plan.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

tags: Optional[List[str]]

List of tags for the Web Hosting plan.

class scaleway.webhosting.v1alpha1.CreateHostingRequestDomainConfiguration(update_nameservers: 'bool', update_web_record: 'bool', update_mail_record: 'bool', update_all_records: 'bool')

Bases: object

update_all_records: bool
update_mail_record: bool
update_nameservers: bool
update_web_record: bool
class scaleway.webhosting.v1alpha1.CreateSessionRequest(hosting_id: 'str', region: 'Optional[ScwRegion]')

Bases: object

hosting_id: str

Hosting ID.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.webhosting.v1alpha1.DeleteHostingRequest(hosting_id: 'str', region: 'Optional[ScwRegion]')

Bases: object

hosting_id: str

Hosting ID.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.webhosting.v1alpha1.DnsRecord(name: 'str', type_: 'DnsRecordType', ttl: 'int', value: 'str', status: 'DnsRecordStatus', priority: 'Optional[int]')

Bases: object

name: str

Record name.

priority: Optional[int]

Record priority level.

status: DnsRecordStatus

Record status.

ttl: int

Record time-to-live.

type_: DnsRecordType

Record type.

value: str

Record value.

class scaleway.webhosting.v1alpha1.DnsRecordStatus(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

INVALID = 'invalid'
UNKNOWN_STATUS = 'unknown_status'
VALID = 'valid'
class scaleway.webhosting.v1alpha1.DnsRecordType(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

A = 'a'
AAAA = 'aaaa'
CNAME = 'cname'
MX = 'mx'
NS = 'ns'
TXT = 'txt'
UNKNOWN_TYPE = 'unknown_type'
class scaleway.webhosting.v1alpha1.DnsRecords(records: 'List[DnsRecord]', name_servers: 'List[Nameserver]', status: 'DnsRecordsStatus')

Bases: object

name_servers: List[Nameserver]

List of nameservers.

records: List[DnsRecord]

List of DNS records.

status: DnsRecordsStatus

Status of the records.

class scaleway.webhosting.v1alpha1.DnsRecordsStatus(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

INVALID = 'invalid'
UNKNOWN = 'unknown'
VALID = 'valid'
class scaleway.webhosting.v1alpha1.EmailAddress(domain: 'str', login: 'str')

Bases: object

domain: str

Domain part of the mailbox address.

login: str

Username part address of the mailbox address.

class scaleway.webhosting.v1alpha1.GetDomainDnsRecordsRequest(domain: 'str', region: 'Optional[ScwRegion]')

Bases: object

domain: str

Domain associated with the DNS records.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.webhosting.v1alpha1.GetHostingRequest(hosting_id: 'str', region: 'Optional[ScwRegion]')

Bases: object

hosting_id: str

Hosting ID.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.webhosting.v1alpha1.Hosting(id: 'str', organization_id: 'str', project_id: 'str', status: 'HostingStatus', platform_hostname: 'str', offer_id: 'str', offer_name: 'str', domain: 'str', tags: 'List[str]', updated_at: 'Optional[datetime]', created_at: 'Optional[datetime]', platform_number: 'Optional[int]', options: 'List[HostingOption]', dns_status: 'HostingDnsStatus', username: 'str', offer_end_of_life: 'bool', control_panel_name: 'str', platform_group: 'str', ipv4: 'str', ipv6: 'str', protected: 'bool', one_time_password: 'str', region: 'ScwRegion', cpanel_urls: 'Optional[HostingCpanelUrls]')

Bases: object

control_panel_name: str

Name of the control panel.

cpanel_urls: Optional[HostingCpanelUrls]

URL to connect to cPanel dashboard and to Webmail interface.

created_at: Optional[datetime]

Date on which the Web Hosting plan was created.

dns_status: HostingDnsStatus

DNS status of the Web Hosting plan.

domain: str

Main domain associated with the Web Hosting plan.

id: str

ID of the Web Hosting plan.

ipv4: str

IPv4 address of the hosting’s host server.

ipv6: str

IPv6 address of the hosting’s host server.

offer_end_of_life: bool

Indicates if the hosting offer has reached its end of life.

offer_id: str

ID of the active offer for the Web Hosting plan.

offer_name: str

Name of the active offer for the Web Hosting plan.

one_time_password: str

One-time-password used for the first login or reset password, empty after first use.

options: List[HostingOption]

Array of any options activated for the Web Hosting plan.

organization_id: str

ID of the Scaleway Organization the Web Hosting plan belongs to.

platform_group: str

Group of the hosting’s host server/platform.

platform_hostname: str

Hostname of the host platform.

platform_number: Optional[int]

Number of the host platform.

project_id: str

ID of the Scaleway Project the Web Hosting plan belongs to.

protected: bool

Whether the hosting is protected or not.

region: str

Region where the Web Hosting plan is hosted.

status: HostingStatus

Status of the Web Hosting plan.

tags: List[str]

List of tags associated with the Web Hosting plan.

updated_at: Optional[datetime]

Date on which the Web Hosting plan was last updated.

username: str

Main Web Hosting cPanel username.

class scaleway.webhosting.v1alpha1.HostingCpanelUrls(dashboard: 'str', webmail: 'str')

Bases: object

dashboard: str
webmail: str
class scaleway.webhosting.v1alpha1.HostingDnsStatus(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

INVALID = 'invalid'
UNKNOWN_DNS_STATUS = 'unknown_dns_status'
VALID = 'valid'
class scaleway.webhosting.v1alpha1.HostingOption(id: 'str', name: 'str')

Bases: object

id: str

Option ID.

name: str

Option name.

class scaleway.webhosting.v1alpha1.HostingStatus(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

DELETING = 'deleting'
DELIVERING = 'delivering'
ERROR = 'error'
LOCKED = 'locked'
MIGRATING = 'migrating'
READY = 'ready'
UNKNOWN_STATUS = 'unknown_status'
class scaleway.webhosting.v1alpha1.ListControlPanelsRequest(region: 'Optional[ScwRegion]', page: 'Optional[int]', page_size: 'Optional[int]')

Bases: object

page: Optional[int]

Page number to return, from the paginated results (must be a positive integer).

page_size: Optional[int]

Number of control panels to return (must be a positive integer lower or equal to 100).

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.webhosting.v1alpha1.ListControlPanelsResponse(total_count: 'int', control_panels: 'List[ControlPanel]')

Bases: object

control_panels: List[ControlPanel]

List of control panels.

total_count: int

Number of control panels returned.

class scaleway.webhosting.v1alpha1.ListHostingsRequest(region: 'Optional[ScwRegion]', page: 'Optional[int]', page_size: 'Optional[int]', order_by: 'Optional[ListHostingsRequestOrderBy]', tags: 'Optional[List[str]]', statuses: 'Optional[List[HostingStatus]]', domain: 'Optional[str]', project_id: 'Optional[str]', organization_id: 'Optional[str]', control_panels: 'Optional[List[str]]')

Bases: object

control_panels: Optional[List[str]]

Name of the control panel to filter for, only Web Hosting plans from this control panel will be returned.

domain: Optional[str]

Domain to filter for, only Web Hosting plans associated with this domain will be returned.

order_by: Optional[ListHostingsRequestOrderBy]

Sort order for Web Hosting plans in the response.

organization_id: Optional[str]

Organization ID to filter for, only Web Hosting plans from this Organization will be returned.

page: Optional[int]

Page number to return, from the paginated results (must be a positive integer).

page_size: Optional[int]

Number of Web Hosting plans to return (must be a positive integer lower or equal to 100).

project_id: Optional[str]

Project ID to filter for, only Web Hosting plans from this Project will be returned.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

statuses: Optional[List[HostingStatus]]

Statuses to filter for, only Web Hosting plans with matching statuses will be returned.

tags: Optional[List[str]]

Tags to filter for, only Web Hosting plans with matching tags will be returned.

class scaleway.webhosting.v1alpha1.ListHostingsRequestOrderBy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

CREATED_AT_ASC = 'created_at_asc'
CREATED_AT_DESC = 'created_at_desc'
class scaleway.webhosting.v1alpha1.ListHostingsResponse(total_count: 'int', hostings: 'List[Hosting]')

Bases: object

hostings: List[Hosting]

List of Web Hosting plans.

total_count: int

Number of Web Hosting plans returned.

class scaleway.webhosting.v1alpha1.ListMailboxesResponse(total_count: 'int', mailboxes: 'List[Mailbox]')

Bases: object

mailboxes: List[Mailbox]

List of mailboxes.

total_count: int

Total number of mailboxes.

class scaleway.webhosting.v1alpha1.ListOffersRequest(without_options: 'bool', only_options: 'bool', region: 'Optional[ScwRegion]', order_by: 'Optional[ListOffersRequestOrderBy]', hosting_id: 'Optional[str]', control_panels: 'Optional[List[str]]')

Bases: object

control_panels: Optional[List[str]]

Name of the control panel to filter for.

hosting_id: Optional[str]

ID of a Web Hosting plan, to check compatibility with returned offers (in case of wanting to update the plan).

only_options: bool

Defines whether the response should consist of options only, without offers.

order_by: Optional[ListOffersRequestOrderBy]

Sort order of offers in the response.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

without_options: bool

Defines whether the response should consist of offers only, without options.

class scaleway.webhosting.v1alpha1.ListOffersRequestOrderBy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

PRICE_ASC = 'price_asc'
class scaleway.webhosting.v1alpha1.ListOffersResponse(offers: 'List[Offer]')

Bases: object

offers: List[Offer]

List of offers.

class scaleway.webhosting.v1alpha1.Mailbox(mailbox_id: 'int', email: 'Optional[EmailAddress]')

Bases: object

email: Optional[EmailAddress]

The email address of the mailbox.

mailbox_id: int

The ID of the mailbox.

class scaleway.webhosting.v1alpha1.Nameserver(hostname: 'str', status: 'NameserverStatus', is_default: 'bool')

Bases: object

hostname: str

Hostname of the nameserver.

is_default: bool

Defines whether the nameserver is the default one.

status: NameserverStatus

Status of the nameserver.

class scaleway.webhosting.v1alpha1.NameserverStatus(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

INVALID = 'invalid'
UNKNOWN_STATUS = 'unknown_status'
VALID = 'valid'
class scaleway.webhosting.v1alpha1.Offer(id: 'str', billing_operation_path: 'str', available: 'bool', quota_warnings: 'List[OfferQuotaWarning]', end_of_life: 'bool', control_panel_name: 'str', product: 'Optional[OfferProduct]', price: 'Optional[Money]')

Bases: object

available: bool

If a hosting_id was specified in the call, defines whether this offer is available for that Web Hosting plan to migrate (update) to.

billing_operation_path: str

Unique identifier used for billing.

control_panel_name: str

Name of the control panel.

end_of_life: bool

Indicates if the offer has reached its end of life.

id: str

Offer ID.

price: Optional[Money]

Price of this offer.

product: Optional[OfferProduct]

Product constituting this offer.

quota_warnings: List[OfferQuotaWarning]

Quota warnings, if the offer is not available for the specified hosting_id.

class scaleway.webhosting.v1alpha1.OfferProduct(name: 'str', option: 'bool', email_accounts_quota: 'int', email_storage_quota: 'int', databases_quota: 'int', hosting_storage_quota: 'int', support_included: 'bool', v_cpu: 'int', ram: 'int', max_addon_domains: 'int')

Bases: object

databases_quota: int

Limit number of databases.

email_accounts_quota: int

Limit number of email accounts.

email_storage_quota: int

Limit quantity of email storage in gigabytes.

hosting_storage_quota: int

Limit quantity of hosting storage in gigabytes.

max_addon_domains: int

Limit number of add-on domains.

name: str

Product name.

option: bool

Product option.

ram: int

Limit quantity of memory in gigabytes.

support_included: bool

Whether or not support is included.

v_cpu: int

Limit number of virtual CPU.

class scaleway.webhosting.v1alpha1.OfferQuotaWarning(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)

Bases: str, Enum

An enumeration.

ADDON_DOMAIN_COUNT_EXCEEDED = 'addon_domain_count_exceeded'
DATABASE_COUNT_EXCEEDED = 'database_count_exceeded'
DISK_USAGE_EXCEEDED = 'disk_usage_exceeded'
EMAIL_COUNT_EXCEEDED = 'email_count_exceeded'
UNKNOWN_QUOTA_WARNING = 'unknown_quota_warning'
class scaleway.webhosting.v1alpha1.ResetHostingPasswordRequest(hosting_id: 'str', region: 'Optional[ScwRegion]')

Bases: object

hosting_id: str

UUID of the hosting.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.webhosting.v1alpha1.ResetHostingPasswordResponse(password: 'str')

Bases: object

password: str

New password.

class scaleway.webhosting.v1alpha1.RestoreHostingRequest(hosting_id: 'str', region: 'Optional[ScwRegion]')

Bases: object

hosting_id: str

Hosting ID.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

class scaleway.webhosting.v1alpha1.Session(url: 'str')

Bases: object

url: str

Logged user’s session URL.

class scaleway.webhosting.v1alpha1.UpdateHostingRequest(hosting_id: 'str', region: 'Optional[ScwRegion]', email: 'Optional[str]', tags: 'Optional[List[str]]', option_ids: 'Optional[List[str]]', offer_id: 'Optional[str]', protected: 'Optional[bool]')

Bases: object

email: Optional[str]

New contact email for the Web Hosting plan.

hosting_id: str

Hosting ID.

offer_id: Optional[str]

ID of the new offer for the Web Hosting plan.

option_ids: Optional[List[str]]

IDs of the new options for the Web Hosting plan.

protected: Optional[bool]

Whether the hosting is protected or not.

region: Optional[str]

Region to target. If none is passed will use default region from the config.

tags: Optional[List[str]]

New tags for the Web Hosting plan.

class scaleway.webhosting.v1alpha1.WebhostingV1Alpha1API(client: Client, *, bypass_validation: bool = False)

Bases: API

This API allows you to manage your Web Hosting services.

check_user_owns_domain(*, domain: str, region: Optional[str] = None, project_id: Optional[str] = None) CheckUserOwnsDomainResponse

“Check whether you own this domain or not.”. :param domain: Domain for which ownership is to be verified. :param region: Region to target. If none is passed will use default region from the config. :param project_id: ID of the project currently in use. :return: CheckUserOwnsDomainResponse

Usage:

result = api.check_user_owns_domain(
    domain="example",
)
create_hosting(*, offer_id: str, domain: str, region: Optional[str] = None, project_id: Optional[str] = None, email: Optional[str] = None, tags: Optional[List[str]] = None, option_ids: Optional[List[str]] = None, language: Optional[LanguageCode] = None, domain_configuration: Optional[CreateHostingRequestDomainConfiguration] = None) Hosting

Order a Web Hosting plan. Order a Web Hosting plan, specifying the offer type required via the offer_id parameter. :param offer_id: ID of the selected offer for the Web Hosting plan. :param domain: Domain name to link to the Web Hosting plan. You must already own this domain name, and have completed the DNS validation process beforehand. :param region: Region to target. If none is passed will use default region from the config. :param project_id: ID of the Scaleway Project in which to create the Web Hosting plan. :param email: Contact email for the Web Hosting client. :param tags: List of tags for the Web Hosting plan. :param option_ids: IDs of any selected additional options for the Web Hosting plan. :param language: Default language for the control panel interface. :param domain_configuration: Indicates whether to update hosting domain name servers and DNS records for domains managed by Scaleway Elements. :return: Hosting

Usage:

result = api.create_hosting(
    offer_id="example",
    domain="example",
)
create_session(*, hosting_id: str, region: Optional[str] = None) Session

Create a user session. :param hosting_id: Hosting ID. :param region: Region to target. If none is passed will use default region from the config. :return: Session

Usage:

result = api.create_session(
    hosting_id="example",
)
delete_hosting(*, hosting_id: str, region: Optional[str] = None) Hosting

Delete a Web Hosting plan. Delete a Web Hosting plan, specified by its hosting_id. Note that deletion is not immediate: it will take place at the end of the calendar month, after which time your Web Hosting plan and all its data (files and emails) will be irreversibly lost. :param hosting_id: Hosting ID. :param region: Region to target. If none is passed will use default region from the config. :return: Hosting

Usage:

result = api.delete_hosting(
    hosting_id="example",
)
get_domain_dns_records(*, domain: str, region: Optional[str] = None) DnsRecords

Get DNS records. Get the set of DNS records of a specified domain associated with a Web Hosting plan. :param domain: Domain associated with the DNS records. :param region: Region to target. If none is passed will use default region from the config. :return: DnsRecords

Usage:

result = api.get_domain_dns_records(
    domain="example",
)
get_hosting(*, hosting_id: str, region: Optional[str] = None) Hosting

Get a Web Hosting plan. Get the details of one of your existing Web Hosting plans, specified by its hosting_id. :param hosting_id: Hosting ID. :param region: Region to target. If none is passed will use default region from the config. :return: Hosting

Usage:

result = api.get_hosting(
    hosting_id="example",
)
list_control_panels(*, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None) ListControlPanelsResponse

“List the control panels type: cpanel or plesk.”. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number to return, from the paginated results (must be a positive integer). :param page_size: Number of control panels to return (must be a positive integer lower or equal to 100). :return: ListControlPanelsResponse

Usage:

result = api.list_control_panels()
list_control_panels_all(*, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None) List[ControlPanel]

“List the control panels type: cpanel or plesk.”. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number to return, from the paginated results (must be a positive integer). :param page_size: Number of control panels to return (must be a positive integer lower or equal to 100). :return: List[ControlPanel]

Usage:

result = api.list_control_panels_all()
list_hostings(*, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListHostingsRequestOrderBy] = None, tags: Optional[List[str]] = None, statuses: Optional[List[HostingStatus]] = None, domain: Optional[str] = None, project_id: Optional[str] = None, organization_id: Optional[str] = None, control_panels: Optional[List[str]] = None) ListHostingsResponse

List all Web Hosting plans. List all of your existing Web Hosting plans. Various filters are available to limit the results, including filtering by domain, status, tag and Project ID. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number to return, from the paginated results (must be a positive integer). :param page_size: Number of Web Hosting plans to return (must be a positive integer lower or equal to 100). :param order_by: Sort order for Web Hosting plans in the response. :param tags: Tags to filter for, only Web Hosting plans with matching tags will be returned. :param statuses: Statuses to filter for, only Web Hosting plans with matching statuses will be returned. :param domain: Domain to filter for, only Web Hosting plans associated with this domain will be returned. :param project_id: Project ID to filter for, only Web Hosting plans from this Project will be returned. :param organization_id: Organization ID to filter for, only Web Hosting plans from this Organization will be returned. :param control_panels: Name of the control panel to filter for, only Web Hosting plans from this control panel will be returned. :return: ListHostingsResponse

Usage:

result = api.list_hostings()
list_hostings_all(*, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, order_by: Optional[ListHostingsRequestOrderBy] = None, tags: Optional[List[str]] = None, statuses: Optional[List[HostingStatus]] = None, domain: Optional[str] = None, project_id: Optional[str] = None, organization_id: Optional[str] = None, control_panels: Optional[List[str]] = None) List[Hosting]

List all Web Hosting plans. List all of your existing Web Hosting plans. Various filters are available to limit the results, including filtering by domain, status, tag and Project ID. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number to return, from the paginated results (must be a positive integer). :param page_size: Number of Web Hosting plans to return (must be a positive integer lower or equal to 100). :param order_by: Sort order for Web Hosting plans in the response. :param tags: Tags to filter for, only Web Hosting plans with matching tags will be returned. :param statuses: Statuses to filter for, only Web Hosting plans with matching statuses will be returned. :param domain: Domain to filter for, only Web Hosting plans associated with this domain will be returned. :param project_id: Project ID to filter for, only Web Hosting plans from this Project will be returned. :param organization_id: Organization ID to filter for, only Web Hosting plans from this Organization will be returned. :param control_panels: Name of the control panel to filter for, only Web Hosting plans from this control panel will be returned. :return: List[Hosting]

Usage:

result = api.list_hostings_all()
list_offers(*, without_options: bool, only_options: bool, region: Optional[str] = None, order_by: Optional[ListOffersRequestOrderBy] = None, hosting_id: Optional[str] = None, control_panels: Optional[List[str]] = None) ListOffersResponse

List all offers. List the different Web Hosting offers, and their options, available to order from Scaleway. :param without_options: Defines whether the response should consist of offers only, without options. :param only_options: Defines whether the response should consist of options only, without offers. :param region: Region to target. If none is passed will use default region from the config. :param order_by: Sort order of offers in the response. :param hosting_id: ID of a Web Hosting plan, to check compatibility with returned offers (in case of wanting to update the plan). :param control_panels: Name of the control panel to filter for. :return: ListOffersResponse

Usage:

result = api.list_offers(
    without_options=False,
    only_options=False,
)
reset_hosting_password(*, hosting_id: str, region: Optional[str] = None) ResetHostingPasswordResponse
Parameters:
  • hosting_id – UUID of the hosting.

  • region – Region to target. If none is passed will use default region from the config.

Returns:

ResetHostingPasswordResponse

Usage:

result = api.reset_hosting_password(
    hosting_id="example",
)
restore_hosting(*, hosting_id: str, region: Optional[str] = None) Hosting

Restore a Web Hosting plan. When you [delete a Web Hosting plan](#path-hostings-delete-a-hosting), definitive deletion does not take place until the end of the calendar month. In the time between initiating the deletion, and definitive deletion at the end of the month, you can choose to restore the Web Hosting plan, using this endpoint and specifying its hosting_id. :param hosting_id: Hosting ID. :param region: Region to target. If none is passed will use default region from the config. :return: Hosting

Usage:

result = api.restore_hosting(
    hosting_id="example",
)
update_hosting(*, hosting_id: str, region: Optional[str] = None, email: Optional[str] = None, tags: Optional[List[str]] = None, option_ids: Optional[List[str]] = None, offer_id: Optional[str] = None, protected: Optional[bool] = None) Hosting

Update a Web Hosting plan. Update the details of one of your existing Web Hosting plans, specified by its hosting_id. You can update parameters including the contact email address, tags, options and offer. :param hosting_id: Hosting ID. :param region: Region to target. If none is passed will use default region from the config. :param email: New contact email for the Web Hosting plan. :param tags: New tags for the Web Hosting plan. :param option_ids: IDs of the new options for the Web Hosting plan. :param offer_id: ID of the new offer for the Web Hosting plan. :param protected: Whether the hosting is protected or not. :return: Hosting

Usage:

result = api.update_hosting(
    hosting_id="example",
)
wait_for_hosting(*, hosting_id: str, region: Optional[str] = None, options: Optional[WaitForOptions[Hosting, bool]] = None) Hosting

Get a Web Hosting plan. Get the details of one of your existing Web Hosting plans, specified by its hosting_id. :param hosting_id: Hosting ID. :param region: Region to target. If none is passed will use default region from the config. :return: Hosting

Usage:

result = api.get_hosting(
    hosting_id="example",
)
class scaleway.webhosting.v1alpha1.WebhostingV1Alpha1ClassicMailAPI(client: Client, *, bypass_validation: bool = False)

Bases: API

This API allows you to manage your mailboxes for your Web Hosting services.

create_mailbox(*, online_id: int, password: str, region: Optional[str] = None, email: Optional[EmailAddress] = None) Mailbox

Create a new mailbox within your hosting plan. :param online_id: The Online hosting ID. :param password: Password for the new mailbox. :param region: Region to target. If none is passed will use default region from the config. :param email: The email address of the mailbox. :return: Mailbox

Usage:

result = api.create_mailbox(
    online_id=1,
    password="example",
)
delete_mailbox(*, online_id: int, mailbox_id: int, region: Optional[str] = None) Mailbox
Parameters:
  • online_id – The Online hosting ID.

  • mailbox_id – The ID of the mailbox to delete.

  • region – Region to target. If none is passed will use default region from the config.

Returns:

Mailbox

Usage:

result = api.delete_mailbox(
    online_id=1,
    mailbox_id=1,
)
get_mailbox(*, online_id: int, mailbox_id: int, region: Optional[str] = None) Mailbox

Get a mailbox by id within your hosting plan. :param online_id: The Online hosting ID. :param mailbox_id: The ID of the mailbox to get. :param region: Region to target. If none is passed will use default region from the config. :return: Mailbox

Usage:

result = api.get_mailbox(
    online_id=1,
    mailbox_id=1,
)
list_mailboxes(*, online_id: int, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, domain: Optional[str] = None) ListMailboxesResponse

List all mailboxes within your hosting plan. :param online_id: The Online hosting ID. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number (must be a positive integer). :param page_size: Number of mailboxes to return (must be a positive integer lower or equal to 100). :param domain: Domain to filter the mailboxes. :return: ListMailboxesResponse

Usage:

result = api.list_mailboxes(
    online_id=1,
)
list_mailboxes_all(*, online_id: int, region: Optional[str] = None, page: Optional[int] = None, page_size: Optional[int] = None, domain: Optional[str] = None) List[Mailbox]

List all mailboxes within your hosting plan. :param online_id: The Online hosting ID. :param region: Region to target. If none is passed will use default region from the config. :param page: Page number (must be a positive integer). :param page_size: Number of mailboxes to return (must be a positive integer lower or equal to 100). :param domain: Domain to filter the mailboxes. :return: List[Mailbox]

Usage:

result = api.list_mailboxes_all(
    online_id=1,
)
update_mailbox(*, online_id: int, mailbox_id: int, region: Optional[str] = None, password: Optional[str] = None) Mailbox

Update the mailbox within your hosting plan. :param online_id: The Online hosting ID. :param mailbox_id: The ID of the mailbox to update. :param region: Region to target. If none is passed will use default region from the config. :param password: New password for the mailbox. :return: Mailbox

Usage:

result = api.update_mailbox(
    online_id=1,
    mailbox_id=1,
)