Products

class vshieldpy.products.Servers

Group of Server’s.

Contains servers and provides ease of use methods to get a certain server. Such as getting server from hostname.

servers

Servers ordered by their identifier.

Type:

tuple[vshieldpy.products.server.Server, …]

__iter__()

Yields each server that is stored.

__len__() int

Number of currently stored servers.

__getitem__(index: int) Server

Gets the N’th server.

get_server_from_hostname(hostname: str) list[Server]

Get servers via their hostname.

Returns:

The return is a list of Server’s this because it is possible to have different servers with the same hostname’s. The list can be empty if no servers have the provided hostname.

Return type:

list[Server]

get_server_from_id(server_id: int) Server | None

Get server via their identifier.

Returns:

If a server with the provided ID exists it is returned.

Return type:

Server | None

async refresh(keep_old_pass: bool = False) None

Refreshes all stored servers.

Parameters:

keep_old_pass – If set to True, transfers passwords to new Servers. This is done by matching the server’s ID.

class vshieldpy.products.Server

Server object for ease of use whilst controlling a server.

identifier

Identifier of the server.

Type:

int

ip

IP address of the server.

Type:

str

hostname

Hostname of the server.

Type:

str

os

Operating system that is currently installed.

Type:

vshieldpy.api_defs.operating_systems.OperatingSystems

plan

Plan of the server.

Type:

vshieldpy.api_defs.plans.Plans

autorenew

Current auto-renew status.

Type:

vshieldpy.api_defs.auto_renew.AutoRenew

status

If the server is running value is True and False if stopped.

Type:

vshieldpy.api_defs.status_codes.Status

node

The node that the server is located in.

Type:

str

expiration

Date of expiration.

Type:

datetime.datetime

creation_date

Date of when the server was deployed.

Type:

datetime.datetime

password

Password of the server. Only contains a password if the specifically requested with the server ID.

Type:

str | None

async refresh() None

Refreshes all information of the server.

This will also fetch the current password for the server.

Raises:

InvalidServerId – Can be raised if server was deleted or expired.

class vshieldpy.products.PendingServer

A server that is pending deployment.

Provides information currently available.

identifier

Identifier of the not yet deployed server.

Type:

int

hostname

Hostname of the server.

Type:

str

plan

Plan of the ordered server.

Type:

vshieldpy.api_defs.plans.Plans

location

Location of the server.

Type:

vshieldpy.api_defs.locations.Locations

date_paid

Date when the invoice for the server was paid.

Type:

datetime.datetime

class vshieldpy.products.DedicatedServer

Dedicated server object with ease of use methods.

identifier

Identifier of the dedicated server.

Type:

int

ip

IP address of the dedicated server.

Type:

str

status

If server is running value is True if not False.

Type:

bool

expiration

Date of expiration of the server.

Type:

datetime.datetime

class vshieldpy.products.Hosting

Hosting object containing related information.

identifier

Identifier of the hosting.

Type:

int

domain

Domain assigned to the hosting.

Type:

str

status

If running value is True if not value is False.

Type:

bool

expiration

Date of when the hosting expires.

Type:

datetime.datetime

class vshieldpy.products.Services

Group of services with ease of use methods.

property dedicated_servers

All owned dedicated servers.

property hostings

All owned hostings.

class vshieldpy.products.Firewall

Firewall object containing firewall stats.

Contains subdomain’s along with old and new attack statuses.

is_under_attack

True if currently under attack and False if it isnt.

Type:

bool

allowed_req_per_sec

Requests that passed the firewall. This is the total number of accepted requests containing good (and possibly bad) requests.

Type:

int

blocked_req_per_sec

Blocked requests per second.

Type:

int

subdomains

Subdomains container for all subdomains.

Type:

vshieldpy.products.firewall.Subdomains

history

Old attacks that were performed on the domain.

Type:

tuple[vshieldpy.products.firewall.Attack, …]

class vshieldpy.products.Subdomains

Subdomains object prividing practical methods for lookups.

__iter__()

Yields contained Subdomain’s.

__getitem__(subdomain_uri: str) Subdomain

Get Subdomain via the subdomain.

subdomains_as_str() list[str]

List of subdomains as strings.

class vshieldpy.products.Subdomain

Subdomain and its current status.

identifier

Identifier of the Subdomain.

Type:

int

subdomain

Subdomain URI value.

Type:

str

uam

Selected UAM mode.

Type:

bool

rate_limit

Allowed maximum requests coming from a single user.

Type:

int

backend

IP address of the backend.

Type:

str

date

Date of when the subdomain was created/added.

Type:

datetime.datetime

class vshieldpy.products.Attack

Old attack containing information about the attack.

identifier

Identifier of the attack.

Type:

int

average_per_second

Average requests received per second.

Type:

int

peak

Peak requests per second.

Type:

int

percent_blocked

Percentage of the blocked requests.

Type:

int

status

# TODO

Type:

vshieldpy.api_defs.uam_status.UAMStatus

date

Start date of the attack.

Type:

datetime.datetime

end_date

End date of the attack.

Type:

datetime.datetime