arianet

package module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2026 License: MIT Imports: 16 Imported by: 0

README

arianet-go

The official Go client for the Arianet public API: Cloud, classic and regional VPS, hosting, dedicated servers (bare metal), SMS, and your account (API tokens, SSH keys, firewalls, balance, invoices).

  • One method per API operation, generated from the published OpenAPI specs.
  • Personal API token auth, retries on 429 that honor Retry-After, safe retries of reads and idempotent writes after network errors and 502/503/504.
  • Typed errors carrying the API's stable error codes.
  • Standard library only. Go 1.22 or newer.

Documentation: https://docs.ariaservice.net/sdk/go

Install

go get github.com/ariaservice/arianet-go

Quickstart

Create a personal API token at https://cloud.ariaservice.net/users/api-tokens and export it:

export ARIANET_TOKEN="paste-your-token-here"
package main

import (
	"context"
	"fmt"
	"log"

	"github.com/ariaservice/arianet-go"
)

func main() {
	ctx := context.Background()
	client := arianet.NewClient("") // empty token: read ARIANET_TOKEN

	resp, err := client.Cloud.ListServers(ctx, &arianet.CloudListServersParams{
		PerPage:       arianet.Int(50),
		LabelSelector: arianet.String("env=prod"),
	})
	if err != nil {
		log.Fatal(err)
	}

	var servers []struct {
		ID     int64  `json:"id"`
		Name   string `json:"name"`
		Status string `json:"status"`
	}
	if err := resp.DecodeData(&servers); err != nil {
		log.Fatal(err)
	}
	for _, s := range servers {
		fmt.Println(s.ID, s.Name, s.Status)
	}
}

API groups

Field API Path prefix
client.Core Account, API tokens, classic VPS, SSH keys, firewalls, billing /api/v1
client.Cloud Cloud servers, volumes, networks, firewalls, IPs, load balancers /cloud/v1
client.RegionalVPS Regional VPS /vps/v1
client.Hosting Hosting accounts, DNS, mailboxes, databases /hosting/v1
client.Baremetal Dedicated servers /baremetal/v1
client.SMS SMS messages, templates, lines, webhooks /sms/v1

Method names follow the operationId of each operation in the API reference (https://docs.ariaservice.net/api-reference): listServers becomes ListServers. Path parameters are arguments, a JSON request body is body any (a struct, a map or json.RawMessage), and query parameters are an optional *<Group><Method>Params struct whose fields are pointers (use arianet.String, arianet.Int, arianet.Bool).

Every method returns *arianet.Response with StatusCode, Header and the raw Body. Use Decode(&v) for the whole body or DecodeData(&v) for its data member.

resp, err := client.Cloud.CreateServer(ctx, map[string]any{
	"name":       "web-1",
	"plan_id":    101,            // from client.Cloud.ListPlans
	"image":      "ubuntu-24.04", // an image slug from client.Cloud.ListImages
	"datacenter": "ovh",          // a datacenter code from client.Cloud.ListDatacenters
})

Configuration

client := arianet.NewClient(token,
	arianet.WithBaseURL("https://api.ariaservice.net"), // default, or $ARIANET_API_URL
	arianet.WithMaxRetries(3),                           // default 3
	arianet.WithMaxRetryWait(60*time.Second),            // longest wait before one retry
	arianet.WithHTTPClient(&http.Client{Timeout: 30 * time.Second}),
	arianet.WithUserAgent("my-app/1.2"),
)

The base URL must use https (plain http is accepted for localhost only). The client never follows redirects, so the token is only ever sent to the API host.

Retries and rate limits

  • 429 Too Many Requests is retried for every method, after the Retry-After header (or RateLimit-Reset). If the server asks for a longer wait than WithMaxRetryWait, the error is returned at once with APIError.RetryAfter set.
  • Network errors and 502/503/504 are retried only when repeating cannot do the work twice: GET/HEAD requests and requests with an Idempotency-Key.
  • Operations that accept an Idempotency-Key (creating a server, an order, a hosting account...) get a generated key automatically, so they are retried safely. Pass your own with arianet.WithIdempotencyKey(key) to make retries across process restarts safe too.

Errors

_, err := client.Core.CreateServer(ctx, order)
var apiErr *arianet.APIError
switch {
case arianet.HasCode(err, arianet.ErrorCodeInsufficientBalance):
	// top up the wallet
case errors.As(err, &apiErr):
	log.Printf("HTTP %d %s: %s (request %s)", apiErr.StatusCode, apiErr.Code, apiErr.Message, apiErr.RequestID)
case err != nil:
	log.Fatal(err) // *arianet.ConnectionError or a context error
}

APIError.Code is the API's stable machine code, always lower-cased (the core API's INSUFFICIENT_BALANCE becomes insufficient_balance), so it can be compared with the generated arianet.ErrorCode... constants. Branch on the code, not on Message. Reason narrows the code on some refusals (for example identity_hold). Helpers: arianet.IsNotFound, arianet.IsUnauthorized, arianet.IsForbidden, arianet.IsRateLimited, arianet.StatusCode.

Regions

Product APIs with regional installs take the Arianet-Region header:

iran := client.RegionalVPS.WithRegion("iran-1")
resp, err := iran.ListServers(ctx)
// or per request:
resp, err = client.RegionalVPS.ListServers(ctx, arianet.WithRegion("iran-1"))

Endpoints not in this version

client.Do(ctx, method, path, query, body, opts...) calls any path with the same auth, retries and error handling:

resp, err := client.Do(ctx, "GET", "/cloud/v1/new-endpoint", url.Values{"page": {"2"}}, nil)

How the code is generated

specs/ holds the published OpenAPI documents and codegen/services.json lists where they come from. *_gen.go is produced by codegen/generate.py (Python standard library plus gofmt):

python3 codegen/fetch_specs.py   # refresh specs/ (needs: pip install pyyaml)
python3 codegen/generate.py      # rewrite *_gen.go
python3 codegen/generate.py --check

The Regenerate from specs workflow does this every day and opens a pull request when the published specs change. The hand-written runtime (client.go, errors.go, response.go, service.go) is never touched by the generator.

License

MIT, see LICENSE. Report security problems privately, see SECURITY.md.

Documentation

Overview

Package arianet is the official Go client for the Arianet (Ariaservice) public API.

client := arianet.NewClient("") // reads ARIANET_TOKEN
resp, err := client.Cloud.ListServers(ctx, nil)

Every API group (Core, Cloud, RegionalVPS, Hosting, Baremetal, SMS) is a field of Client with one method per operation of its OpenAPI spec. Methods return the raw *Response; decode it into your own types with Response.Decode.

Index

Constants

View Source
const (
	// DefaultBaseURL is the public API gateway.
	DefaultBaseURL = "https://api.ariaservice.net"
	// EnvToken is read when NewClient gets an empty token.
	EnvToken = "ARIANET_TOKEN"
	// EnvBaseURL overrides DefaultBaseURL when set.
	EnvBaseURL = "ARIANET_API_URL"
	// RegionHeader names the regional install of a product API a request is for.
	RegionHeader = "Arianet-Region"
)
View Source
const (
	ErrorCodeAccountPending             = "account_pending"
	ErrorCodeAccountSuspended           = "account_suspended"
	ErrorCodeAccountTerminated          = "account_terminated"
	ErrorCodeActionFailed               = "action_failed"
	ErrorCodeActionInProgress           = "action_in_progress"
	ErrorCodeAlready                    = "already"
	ErrorCodeAlreadyAdopted             = "already_adopted"
	ErrorCodeAlreadyAssigned            = "already_assigned"
	ErrorCodeAlreadyAttached            = "already_attached"
	ErrorCodeAlreadyExists              = "already_exists"
	ErrorCodeAlreadyLinked              = "already_linked"
	ErrorCodeAlreadyRevealed            = "already_revealed"
	ErrorCodeAppliedBySelector          = "applied_by_selector"
	ErrorCodeAwaitingPriceDifference    = "awaiting_price_difference"
	ErrorCodeBackupAlreadyEnabled       = "backup_already_enabled"
	ErrorCodeBackupInProgress           = "backup_in_progress"
	ErrorCodeBackupNotEnabled           = "backup_not_enabled"
	ErrorCodeBackupTooSoon              = "backup_too_soon"
	ErrorCodeBadRequest                 = "bad_request"
	ErrorCodeByoipNotFound              = "byoip_not_found"
	ErrorCodeByoipWrongStage            = "byoip_wrong_stage"
	ErrorCodeCagefsNotReady             = "cagefs_not_ready"
	ErrorCodeCampusMismatch             = "campus_mismatch"
	ErrorCodeConfirmationMismatch       = "confirmation_mismatch"
	ErrorCodeConfirmationRequired       = "confirmation_required"
	ErrorCodeConflict                   = "conflict"
	ErrorCodeConsoleBusy                = "console_busy"
	ErrorCodeConsoleUnavailable         = "console_unavailable"
	ErrorCodeCoreUnavailable            = "core_unavailable"
	ErrorCodeCreateRejected             = "create_rejected"
	ErrorCodeCredentialsNotReady        = "credentials_not_ready"
	ErrorCodeDatacenterClosed           = "datacenter_closed"
	ErrorCodeDatacenterMismatch         = "datacenter_mismatch"
	ErrorCodeDatacenterNotFound         = "datacenter_not_found"
	ErrorCodeDatacenterUnavailable      = "datacenter_unavailable"
	ErrorCodeDeleteNoteRequired         = "delete_note_required"
	ErrorCodeDeleteNoteTooLong          = "delete_note_too_long"
	ErrorCodeDemoServer                 = "demo_server"
	ErrorCodeDiskCannotShrink           = "disk_cannot_shrink"
	ErrorCodeDNSPTRRejected             = "dns_ptr_rejected"
	ErrorCodeDomainExistsOnServer       = "domain_exists_on_server"
	ErrorCodeDomainTaken                = "domain_taken"
	ErrorCodeDowngradeNotAllowed        = "downgrade_not_allowed"
	ErrorCodeElasticIPBusy              = "elastic_ip_busy"
	ErrorCodeEnabled                    = "enabled"
	ErrorCodeFailed                     = "failed"
	ErrorCodeFeatureUnavailable         = "feature_unavailable"
	ErrorCodeFirewallNotFound           = "firewall_not_found"
	ErrorCodeFirewallProtected          = "firewall_protected"
	ErrorCodeFloatingIPBusy             = "floating_ip_busy"
	ErrorCodeForbidden                  = "forbidden"
	ErrorCodeGateRequired               = "gate_required"
	ErrorCodeGuardRefused               = "guard_refused"
	ErrorCodeHostPinMismatch            = "host_pin_mismatch"
	ErrorCodeHostUnauthorized           = "host_unauthorized"
	ErrorCodeHostUnreachable            = "host_unreachable"
	ErrorCodeHostnameTaken              = "hostname_taken"
	ErrorCodeHypervisorUnavailable      = "hypervisor_unavailable"
	ErrorCodeIDPrefixInUse              = "id_prefix_in_use"
	ErrorCodeIDPrefixTaken              = "id_prefix_taken"
	ErrorCodeIdempotencyKeyRequired     = "idempotency_key_required"
	ErrorCodeIdempotencyKeyReused       = "idempotency_key_reused"
	ErrorCodeIdentityHold               = "identity_hold"
	ErrorCodeIdentityNeeded             = "identity_needed"
	ErrorCodeImageNeedsMoreRAM          = "image_needs_more_ram"
	ErrorCodeImageNotFound              = "image_not_found"
	ErrorCodeImageNotReady              = "image_not_ready"
	ErrorCodeImageRequired              = "image_required"
	ErrorCodeImageTooLarge              = "image_too_large"
	ErrorCodeImageUnavailable           = "image_unavailable"
	ErrorCodeInsufficientBalance        = "insufficient_balance"
	ErrorCodeInsufficientScope          = "insufficient_scope"
	ErrorCodeInternalError              = "internal_error"
	ErrorCodeInvalidAlgorithm           = "invalid_algorithm"
	ErrorCodeInvalidCount               = "invalid_count"
	ErrorCodeInvalidCursor              = "invalid_cursor"
	ErrorCodeInvalidDeleteReason        = "invalid_delete_reason"
	ErrorCodeInvalidDescription         = "invalid_description"
	ErrorCodeInvalidDNSPTR              = "invalid_dns_ptr"
	ErrorCodeInvalidFilesystem          = "invalid_filesystem"
	ErrorCodeInvalidFilter              = "invalid_filter"
	ErrorCodeInvalidID                  = "invalid_id"
	ErrorCodeInvalidIdempotencyKey      = "invalid_idempotency_key"
	ErrorCodeInvalidInput               = "invalid_input"
	ErrorCodeInvalidIP                  = "invalid_ip"
	ErrorCodeInvalidIPRange             = "invalid_ip_range"
	ErrorCodeInvalidKind                = "invalid_kind"
	ErrorCodeInvalidLabel               = "invalid_label"
	ErrorCodeInvalidLabelSelector       = "invalid_label_selector"
	ErrorCodeInvalidLabels              = "invalid_labels"
	ErrorCodeInvalidMetrics             = "invalid_metrics"
	ErrorCodeInvalidName                = "invalid_name"
	ErrorCodeInvalidOperation           = "invalid_operation"
	ErrorCodeInvalidPage                = "invalid_page"
	ErrorCodeInvalidProject             = "invalid_project"
	ErrorCodeInvalidRequest             = "invalid_request"
	ErrorCodeInvalidRoute               = "invalid_route"
	ErrorCodeInvalidRule                = "invalid_rule"
	ErrorCodeInvalidSize                = "invalid_size"
	ErrorCodeInvalidSSHKey              = "invalid_ssh_key"
	ErrorCodeInvalidStage               = "invalid_stage"
	ErrorCodeInvalidState               = "invalid_state"
	ErrorCodeInvalidSubnet              = "invalid_subnet"
	ErrorCodeInvalidTarget              = "invalid_target"
	ErrorCodeInvalidTargetIP            = "invalid_target_ip"
	ErrorCodeInvalidTransition          = "invalid_transition"
	ErrorCodeInvalidType                = "invalid_type"
	ErrorCodeInvalidUserData            = "invalid_user_data"
	ErrorCodeInvalidWindow              = "invalid_window"
	ErrorCodeIP                         = "ip_"
	ErrorCodeIPChangeFeeNotConfirmed    = "ip_change_fee_not_confirmed"
	ErrorCodeIPChangeInProgress         = "ip_change_in_progress"
	ErrorCodeIPChangeLimitReached       = "ip_change_limit_reached"
	ErrorCodeIPChangeUnavailable        = "ip_change_unavailable"
	ErrorCodeIPInUse                    = "ip_in_use"
	ErrorCodeIPNotAllowed               = "ip_not_allowed"
	ErrorCodeIPNotFound                 = "ip_not_found"
	ErrorCodeIPNotRouted                = "ip_not_routed"
	ErrorCodeIPOutsideNetwork           = "ip_outside_network"
	ErrorCodeIPRenewAutomatic           = "ip_renew_automatic"
	ErrorCodeIPReserved                 = "ip_reserved"
	ErrorCodeIPsNotSold                 = "ips_not_sold"
	ErrorCodeIPV6Unavailable            = "ipv6_unavailable"
	ErrorCodeKey                        = "key"
	ErrorCodeLastSubnet                 = "last_subnet"
	ErrorCodeLBBusy                     = "lb_busy"
	ErrorCodeLBLocked                   = "lb_locked"
	ErrorCodeLBNotReady                 = "lb_not_ready"
	ErrorCodeLBTypeNotFound             = "lb_type_not_found"
	ErrorCodeLimitReached               = "limit_reached"
	ErrorCodeLocked                     = "locked"
	ErrorCodeMethodNotAllowed           = "method_not_allowed"
	ErrorCodeMetricsUnavailable         = "metrics_unavailable"
	ErrorCodeNameTaken                  = "name_taken"
	ErrorCodeNATGatewayBusy             = "nat_gateway_busy"
	ErrorCodeNATGatewayRequired         = "nat_gateway_required"
	ErrorCodeNetworkAttached            = "network_attached"
	ErrorCodeNetworkDetached            = "network_detached"
	ErrorCodeNetworkInUse               = "network_in_use"
	ErrorCodeNetworkListedTwice         = "network_listed_twice"
	ErrorCodeNetworkNotFound            = "network_not_found"
	ErrorCodeNetworkNotReady            = "network_not_ready"
	ErrorCodeNetworkRequired            = "network_required"
	ErrorCodeNoCartForIP                = "no_cart_for_ip"
	ErrorCodeNoDefaultWallet            = "no_default_wallet"
	ErrorCodeNoLiveData                 = "no_live_data"
	ErrorCodeNoPrice                    = "no_price"
	ErrorCodeNoPriceDifference          = "no_price_difference"
	ErrorCodeNoPublicIPV4               = "no_public_ipv4"
	ErrorCodeNoRate                     = "no_rate"
	ErrorCodeNoTax                      = "no_tax"
	ErrorCodeNotApplied                 = "not_applied"
	ErrorCodeNotAssigned                = "not_assigned"
	ErrorCodeNotAttached                = "not_attached"
	ErrorCodeNotByoip                   = "not_byoip"
	ErrorCodeNotCancellable             = "not_cancellable"
	ErrorCodeNotForSale                 = "not_for_sale"
	ErrorCodeNotFound                   = "not_found"
	ErrorCodeNotImplemented             = "not_implemented"
	ErrorCodeNotLinked                  = "not_linked"
	ErrorCodeNotOnPanel                 = "not_on_panel"
	ErrorCodeNotOrderedYet              = "not_ordered_yet"
	ErrorCodeNotParked                  = "not_parked"
	ErrorCodeNotPrivateRange            = "not_private_range"
	ErrorCodeNotReady                   = "not_ready"
	ErrorCodeNotRenewedAtSupplier       = "not_renewed_at_supplier"
	ErrorCodeNotRouted                  = "not_routed"
	ErrorCodeOrderCancelled             = "order_cancelled"
	ErrorCodeOrderUnavailable           = "order_unavailable"
	ErrorCodeOvhOrderIDRequired         = "ovh_order_id_required"
	ErrorCodeOvhOrderNotFound           = "ovh_order_not_found"
	ErrorCodeOvhOrderUsed               = "ovh_order_used"
	ErrorCodePanelAccountMissing        = "panel_account_missing"
	ErrorCodePanelUnavailable           = "panel_unavailable"
	ErrorCodePhpSelectorDisabled        = "php_selector_disabled"
	ErrorCodePhpSelectorNeedsCagefs     = "php_selector_needs_cagefs"
	ErrorCodePhpSelectorUnavailable     = "php_selector_unavailable"
	ErrorCodePlacementGroupBusy         = "placement_group_busy"
	ErrorCodePlacementGroupDatacenter   = "placement_group_datacenter"
	ErrorCodePlacementGroupFull         = "placement_group_full"
	ErrorCodePlacementGroupInUse        = "placement_group_in_use"
	ErrorCodePlacementGroupNotFound     = "placement_group_not_found"
	ErrorCodePlanMismatch               = "plan_mismatch"
	ErrorCodePlanNotFound               = "plan_not_found"
	ErrorCodePlanSoldOut                = "plan_sold_out"
	ErrorCodePlanUnavailable            = "plan_unavailable"
	ErrorCodePrepaidTerm                = "prepaid_term"
	ErrorCodePreviewExists              = "preview_exists"
	ErrorCodePreviewReadOnly            = "preview_read_only"
	ErrorCodePrimaryNetwork             = "primary_network"
	ErrorCodePrivateIPRequired          = "private_ip_required"
	ErrorCodeProjectNotFound            = "project_not_found"
	ErrorCodeProjectsUnavailable        = "projects_unavailable"
	ErrorCodeProtected                  = "protected"
	ErrorCodePurchaseMismatch           = "purchase_mismatch"
	ErrorCodeQuotaExceeded              = "quota_exceeded"
	ErrorCodeRateLimitExceeded          = "rate_limit_exceeded"
	ErrorCodeRateLimited                = "rate_limited"
	ErrorCodeRdnsTemporarilyUnavailable = "rdns_temporarily_unavailable"
	ErrorCodeRdnsUnavailable            = "rdns_unavailable"
	ErrorCodeRebuildProtected           = "rebuild_protected"
	ErrorCodeRedisNeedsCagefs           = "redis_needs_cagefs"
	ErrorCodeRedisNotRunning            = "redis_not_running"
	ErrorCodeRedisOff                   = "redis_off"
	ErrorCodeRedisTierUnavailable       = "redis_tier_unavailable"
	ErrorCodeRefundUnavailable          = "refund_unavailable"
	ErrorCodeReinstallInProgress        = "reinstall_in_progress"
	ErrorCodeRenewalClosed              = "renewal_closed"
	ErrorCodeRenewalNotDue              = "renewal_not_due"
	ErrorCodeRenewalNotPaid             = "renewal_not_paid"
	ErrorCodeRenewalPaid                = "renewal_paid"
	ErrorCodeRequestFailed              = "request_failed"
	ErrorCodeRescueDisabled             = "rescue_disabled"
	ErrorCodeRescueEnabled              = "rescue_enabled"
	ErrorCodeResellerAccountLimit       = "reseller_account_limit"
	ErrorCodeResellerResourceLimit      = "reseller_resource_limit"
	ErrorCodeResourceInUse              = "resource_in_use"
	ErrorCodeRoutedElsewhere            = "routed_elsewhere"
	ErrorCodeRulesNotAccepted           = "rules_not_accepted"
	ErrorCodeRulesOutdated              = "rules_outdated"
	ErrorCodeSameAlgorithm              = "same_algorithm"
	ErrorCodeSamePlan                   = "same_plan"
	ErrorCodeSameType                   = "same_type"
	ErrorCodeServerBusy                 = "server_busy"
	ErrorCodeServerFailed               = "server_failed"
	ErrorCodeServerHasPublicIP          = "server_has_public_ip"
	ErrorCodeServerInRescue             = "server_in_rescue"
	ErrorCodeServerInUse                = "server_in_use"
	ErrorCodeServerLocked               = "server_locked"
	ErrorCodeServerMissing              = "server_missing"
	ErrorCodeServerMustBeOff            = "server_must_be_off"
	ErrorCodeServerNotBilledYet         = "server_not_billed_yet"
	ErrorCodeServerNotCapped            = "server_not_capped"
	ErrorCodeServerNotFound             = "server_not_found"
	ErrorCodeServerNotInNetwork         = "server_not_in_network"
	ErrorCodeServerNotReady             = "server_not_ready"
	ErrorCodeServerNotRunning           = "server_not_running"
	ErrorCodeServerNotSuspended         = "server_not_suspended"
	ErrorCodeServerPending              = "server_pending"
	ErrorCodeServerPrivateOnly          = "server_private_only"
	ErrorCodeServerProtected            = "server_protected"
	ErrorCodeServerProvisioning         = "server_provisioning"
	ErrorCodeServerRequired             = "server_required"
	ErrorCodeServerSuspended            = "server_suspended"
	ErrorCodeServerTerminated           = "server_terminated"
	ErrorCodeServerUnreachable          = "server_unreachable"
	ErrorCodeServiceGone                = "service_gone"
	ErrorCodeServiceLinked              = "service_linked"
	ErrorCodeServiceNotFound            = "service_not_found"
	ErrorCodeServiceNotThisOrder        = "service_not_this_order"
	ErrorCodeServicePredatesOrder       = "service_predates_order"
	ErrorCodeShellDisabled              = "shell_disabled"
	ErrorCodeShellNotConfined           = "shell_not_confined"
	ErrorCodeSkuUnavailable             = "sku_unavailable"
	ErrorCodeSnapshotsInProgress        = "snapshots_in_progress"
	ErrorCodeSoldOut                    = "sold_out"
	ErrorCodeSSHKeyNotFound             = "ssh_key_not_found"
	ErrorCodeSSHKeysUnavailable         = "ssh_keys_unavailable"
	ErrorCodeStatus                     = "status"
	ErrorCodeSubnetExists               = "subnet_exists"
	ErrorCodeSubnetInUse                = "subnet_in_use"
	ErrorCodeSubnetNotFound             = "subnet_not_found"
	ErrorCodeSubnetNotReady             = "subnet_not_ready"
	ErrorCodeSubnetOutsideRange         = "subnet_outside_range"
	ErrorCodeSubnetOverlaps             = "subnet_overlaps"
	ErrorCodeSuperseded                 = "superseded"
	ErrorCodeSupplierUnavailable        = "supplier_unavailable"
	ErrorCodeSuspendedByProvider        = "suspended_by_provider"
	ErrorCodeTargetExists               = "target_exists"
	ErrorCodeTargetNotFound             = "target_not_found"
	ErrorCodeTaskTimeout                = "task_timeout"
	ErrorCodeTemplateUnavailable        = "template_unavailable"
	ErrorCodeTooManyLabels              = "too_many_labels"
	ErrorCodeTooManyNetworks            = "too_many_networks"
	ErrorCodeTooManyRoutes              = "too_many_routes"
	ErrorCodeTooManyRules               = "too_many_rules"
	ErrorCodeTooManySelectors           = "too_many_selectors"
	ErrorCodeTooManyServices            = "too_many_services"
	ErrorCodeTooManySSHKeys             = "too_many_ssh_keys"
	ErrorCodeTooManySubnets             = "too_many_subnets"
	ErrorCodeTooManyTargets             = "too_many_targets"
	ErrorCodeTooManyVolumes             = "too_many_volumes"
	ErrorCodeTrafficUnavailable         = "traffic_unavailable"
	ErrorCodeTypeTooSmall               = "type_too_small"
	ErrorCodeUnauthorized               = "unauthorized"
	ErrorCodeUnavailable                = "unavailable"
	ErrorCodeUnavailableCombo           = "unavailable_combo"
	ErrorCodeUnknownCountry             = "unknown_country"
	ErrorCodeUnknownIPOffer             = "unknown_ip_offer"
	ErrorCodeUnlimited                  = "unlimited"
	ErrorCodeUnpricedOrder              = "unpriced_order"
	ErrorCodeUpstreamError              = "upstream_error"
	ErrorCodeUpstreamUnavailable        = "upstream_unavailable"
	ErrorCodeUserDataTooLarge           = "user_data_too_large"
	ErrorCodeUsernameTaken              = "username_taken"
	ErrorCodeValidationError            = "validation_error"
	ErrorCodeValidationFailed           = "validation_failed"
	ErrorCodeVerifyOvhOrder             = "verify_ovh_order"
	ErrorCodeVmNotFound                 = "vm_not_found"
	ErrorCodeVolumeAttached             = "volume_attached"
	ErrorCodeVolumeBusy                 = "volume_busy"
	ErrorCodeVolumeCannotShrink         = "volume_cannot_shrink"
	ErrorCodeVolumeDetached             = "volume_detached"
	ErrorCodeVolumeNotFound             = "volume_not_found"
	ErrorCodeVolumeNotReady             = "volume_not_ready"
	ErrorCodeVolumeProtected            = "volume_protected"
	ErrorCodeVolumesNeedOneServer       = "volumes_need_one_server"
	ErrorCodeWritesUnavailable          = "writes_unavailable"
	ErrorCodeWrongBlock                 = "wrong_block"
	ErrorCodeWrongBlockSize             = "wrong_block_size"
)

Stable error codes the Arianet APIs answer with, lower-cased. APIError.Code is always lower-case, so compare it with these constants.

View Source
const Version = "0.1.0"

Version is the SDK version, sent in the User-Agent header.

Variables

This section is empty.

Functions

func Bool

func Bool(v bool) *bool

Bool returns a pointer to v, for optional parameters.

func Float

func Float(v float64) *float64

Float returns a pointer to v, for optional parameters.

func HasCode

func HasCode(err error, code string) bool

HasCode reports whether err is an *APIError with the given code.

func Int

func Int(v int64) *int64

Int returns a pointer to v, for optional parameters.

func IsForbidden

func IsForbidden(err error) bool

IsForbidden reports a 403 answer (missing scope, IP not allowed, identity check needed...).

func IsNotFound

func IsNotFound(err error) bool

IsNotFound reports a 404 answer.

func IsRateLimited

func IsRateLimited(err error) bool

IsRateLimited reports a 429 answer that was still refused after the retries.

func IsUnauthorized

func IsUnauthorized(err error) bool

IsUnauthorized reports a 401 answer (missing, expired or revoked token).

func StatusCode

func StatusCode(err error) int

StatusCode returns the HTTP status of an *APIError, or 0.

func String

func String(v string) *string

String returns a pointer to v, for optional parameters.

Types

type APIError

type APIError struct {
	// StatusCode is the HTTP status.
	StatusCode int
	// Code is the API's stable machine code, lower-cased (compare it with the
	// ErrorCode... constants). Branch on Code, not on Message.
	Code string
	// Message is human-readable and may change.
	Message string
	// Reason narrows Code on some refusals (e.g. "identity_hold").
	Reason string
	// RetryAfter is how long the server asked to wait (Retry-After), if it did.
	RetryAfter time.Duration
	// RequestID identifies the request in support tickets, when the server sent one.
	RequestID string
	// Body is the raw response body.
	Body []byte
}

APIError is an error answer from the API.

func (*APIError) Error

func (e *APIError) Error() string

type BaremetalGetPlanOptionsParams

type BaremetalGetPlanOptionsParams struct {
	Datacenter    *string
	Memory        *string
	Storage       *string
	SystemStorage *string
	Gpu           *string
}

BaremetalGetPlanOptionsParams holds the query parameters of BaremetalService.GetPlanOptions.

type BaremetalGetServerTrafficParams

type BaremetalGetServerTrafficParams struct {
	Period *string
	Link   *string
}

BaremetalGetServerTrafficParams holds the query parameters of BaremetalService.GetServerTraffic.

type BaremetalListPlansParams

type BaremetalListPlansParams struct {
	Range    *string
	Supplier *string
}

BaremetalListPlansParams holds the query parameters of BaremetalService.ListPlans.

type BaremetalListRangesParams

type BaremetalListRangesParams struct {
	Supplier *string
}

BaremetalListRangesParams holds the query parameters of BaremetalService.ListRanges.

type BaremetalService

type BaremetalService struct {
	// contains filtered or unexported fields
}

BaremetalService calls the Dedicated servers (bare metal) API (`/baremetal/v1`).

func (*BaremetalService) CancelOrder

func (s *BaremetalService) CancelOrder(ctx context.Context, id string, opts ...RequestOption) (*Response, error)

CancelOrder calls POST /orders/{id}/cancel.

Cancel before procurement started (or instead of paying a price difference); the full amount returns to the wallet

func (*BaremetalService) CreateOrder

func (s *BaremetalService) CreateOrder(ctx context.Context, body any, opts ...RequestOption) (*Response, error)

CreateOrder calls POST /orders.

Order a server: the first payment is debited from your wallet; delivery follows manual procurement

The request carries an Idempotency-Key (generated when none is given with WithIdempotencyKey), so it is retried safely after a network error or a 5xx.

func (*BaremetalService) GetOrder

func (s *BaremetalService) GetOrder(ctx context.Context, id string, opts ...RequestOption) (*Response, error)

GetOrder calls GET /orders/{id}.

One order with its stage timeline

func (*BaremetalService) GetPlanOptions

func (s *BaremetalService) GetPlanOptions(ctx context.Context, catalog string, plan string, params *BaremetalGetPlanOptionsParams, opts ...RequestOption) (*Response, error)

GetPlanOptions calls GET /plans/{catalog}/{plan}/options.

A model's datacenters and every option family (memory, disks, network, GPU, licences) with prices and delivery for the choices so far

func (*BaremetalService) GetReinstall

func (s *BaremetalService) GetReinstall(ctx context.Context, id string, opts ...RequestOption) (*Response, error)

GetReinstall calls GET /servers/{id}/reinstall.

The last installation's state

func (*BaremetalService) GetRules

func (s *BaremetalService) GetRules(ctx context.Context, opts ...RequestOption) (*Response, error)

GetRules calls GET /rules.

The dedicated server rules the order must accept

func (*BaremetalService) GetServer

func (s *BaremetalService) GetServer(ctx context.Context, id string, opts ...RequestOption) (*Response, error)

GetServer calls GET /servers/{id}.

One server

func (*BaremetalService) GetServerDetails

func (s *BaremetalService) GetServerDetails(ctx context.Context, id string, opts ...RequestOption) (*Response, error)

GetServerDetails calls GET /servers/{id}/details.

General information, hardware and network, read from the datacenter

func (*BaremetalService) GetServerHistory

func (s *BaremetalService) GetServerHistory(ctx context.Context, id string, opts ...RequestOption) (*Response, error)

GetServerHistory calls GET /servers/{id}/history.

The latest datacenter interventions and tasks (read only)

func (*BaremetalService) GetServerTraffic

func (s *BaremetalService) GetServerTraffic(ctx context.Context, id string, params *BaremetalGetServerTrafficParams, opts ...RequestOption) (*Response, error)

GetServerTraffic calls GET /servers/{id}/traffic.

Traffic of the public or private link over the last hour, day, week or month

func (*BaremetalService) ListByoipDestinations

func (s *BaremetalService) ListByoipDestinations(ctx context.Context, opts ...RequestOption) (*Response, error)

ListByoipDestinations calls GET /byoip/destinations.

Your servers a leased IPv4 block (ip-service) can be routed to, and why not

func (*BaremetalService) ListIPOffers

func (s *BaremetalService) ListIPOffers(ctx context.Context, id string, opts ...RequestOption) (*Response, error)

ListIPOffers calls GET /servers/{id}/ip-offers.

Additional IPv4 the server can order (single address or block), with prices

func (*BaremetalService) ListIPRenewals

func (s *BaremetalService) ListIPRenewals(ctx context.Context, id string, ip string, opts ...RequestOption) (*Response, error)

ListIPRenewals calls GET /servers/{id}/ips/{ip}/renewals.

One IP block's renewals

func (*BaremetalService) ListOSTemplates

func (s *BaremetalService) ListOSTemplates(ctx context.Context, id string, opts ...RequestOption) (*Response, error)

ListOSTemplates calls GET /servers/{id}/os-templates.

Operating systems the server can be installed with

func (*BaremetalService) ListOrders

func (s *BaremetalService) ListOrders(ctx context.Context, opts ...RequestOption) (*Response, error)

ListOrders calls GET /orders.

Your orders

func (*BaremetalService) ListPlans

func (s *BaremetalService) ListPlans(ctx context.Context, params *BaremetalListPlansParams, opts ...RequestOption) (*Response, error)

ListPlans calls GET /plans.

Every server model of both catalogs, available or not

func (*BaremetalService) ListRanges

func (s *BaremetalService) ListRanges(ctx context.Context, params *BaremetalListRangesParams, opts ...RequestOption) (*Response, error)

ListRanges calls GET /ranges.

Server families with their cheapest price

func (*BaremetalService) ListRenewals

func (s *BaremetalService) ListRenewals(ctx context.Context, id string, opts ...RequestOption) (*Response, error)

ListRenewals calls GET /servers/{id}/renewals.

The server's renewals

func (*BaremetalService) ListServerIPs

func (s *BaremetalService) ListServerIPs(ctx context.Context, id string, opts ...RequestOption) (*Response, error)

ListServerIPs calls GET /servers/{id}/ips.

The server's additional IP blocks, its IP orders on the way and the leased (BYOIP) blocks routed to it

func (*BaremetalService) ListServers

func (s *BaremetalService) ListServers(ctx context.Context, opts ...RequestOption) (*Response, error)

ListServers calls GET /servers.

Your servers

func (*BaremetalService) ListSuppliers

func (s *BaremetalService) ListSuppliers(ctx context.Context, opts ...RequestOption) (*Response, error)

ListSuppliers calls GET /suppliers.

Companies servers are bought from, with their model count, countries and cheapest price

func (*BaremetalService) OpenServerConsole

func (s *BaremetalService) OpenServerConsole(ctx context.Context, id string, opts ...RequestOption) (*Response, error)

OpenServerConsole calls POST /servers/{id}/console.

A single-use link (60 s) to the server's serial console, relayed by this service only

func (*BaremetalService) OrderIP

func (s *BaremetalService) OrderIP(ctx context.Context, id string, body any, opts ...RequestOption) (*Response, error)

OrderIP calls POST /servers/{id}/ip-orders.

Order an additional IP for the server: debited from your wallet at once; an operator buys it and routes it to the server

The request carries an Idempotency-Key (generated when none is given with WithIdempotencyKey), so it is retried safely after a network error or a 5xx.

func (*BaremetalService) PayOrderDifference

func (s *BaremetalService) PayOrderDifference(ctx context.Context, id string, opts ...RequestOption) (*Response, error)

PayOrderDifference calls POST /orders/{id}/pay-difference.

Pay an order's price difference from the wallet; the order returns to the purchase queue

The request carries an Idempotency-Key (generated when none is given with WithIdempotencyKey), so it is retried safely after a network error or a 5xx.

func (*BaremetalService) Quote

func (s *BaremetalService) Quote(ctx context.Context, body any, opts ...RequestOption) (*Response, error)

Quote calls POST /quote.

Price a configuration (nothing held)

func (*BaremetalService) QuoteIP

func (s *BaremetalService) QuoteIP(ctx context.Context, id string, body any, opts ...RequestOption) (*Response, error)

QuoteIP calls POST /servers/{id}/ip-quote.

Price an additional IP for the server (nothing held)

func (*BaremetalService) ReinstallServer

func (s *BaremetalService) ReinstallServer(ctx context.Context, id string, body any, opts ...RequestOption) (*Response, error)

ReinstallServer calls POST /servers/{id}/reinstall.

Install an operating system: the disks are wiped

func (*BaremetalService) RenewIP

func (s *BaremetalService) RenewIP(ctx context.Context, id string, ip string, opts ...RequestOption) (*Response, error)

RenewIP calls POST /servers/{id}/ips/{ip}/renew.

Pay an IP block's open renewal (its next month); charged at once

The request carries an Idempotency-Key (generated when none is given with WithIdempotencyKey), so it is retried safely after a network error or a 5xx.

func (*BaremetalService) RenewServer

func (s *BaremetalService) RenewServer(ctx context.Context, id string, opts ...RequestOption) (*Response, error)

RenewServer calls POST /servers/{id}/renew.

Pay the open renewal (the next month); charged at once

The request carries an Idempotency-Key (generated when none is given with WithIdempotencyKey), so it is retried safely after a network error or a 5xx.

func (*BaremetalService) RevealCredentials

func (s *BaremetalService) RevealCredentials(ctx context.Context, id string, opts ...RequestOption) (*Response, error)

RevealCredentials calls POST /servers/{id}/credentials/reveal.

The login details, shown once (never cached)

func (*BaremetalService) WithRegion

func (s *BaremetalService) WithRegion(region string) *BaremetalService

WithRegion returns a copy of the service whose requests go to region (sent as the Arianet-Region header). An empty region means the default.

type Client

type Client struct {
	Core        *CoreService
	Cloud       *CloudService
	RegionalVPS *RegionalVPSService
	Hosting     *HostingService
	Baremetal   *BaremetalService
	SMS         *SMSService
	// contains filtered or unexported fields
}

Client calls the Arianet API with a personal API token.

func NewClient

func NewClient(token string, opts ...Option) *Client

NewClient returns a client authenticated with token, or with $ARIANET_TOKEN when token is empty. Create tokens at https://cloud.ariaservice.net/users/api-tokens.

func (*Client) Do

func (c *Client) Do(ctx context.Context, method, path string, query url.Values, body any, opts ...RequestOption) (*Response, error)

Do sends a request to any API path (including the product prefix, e.g. "/cloud/v1/servers"). Generated methods call it; use it directly for endpoints this SDK version does not have yet. body is encoded as JSON.

type CloudDeleteServerParams

type CloudDeleteServerParams struct {
	// Why it is deleted (optional).
	Reason *string
	// A few words why; required with reason `other`.
	Note *string
	// Keep the finished backups as snapshots, billed per GB until deleted (402 when the balance does not cover them).
	KeepBackups *bool
	// Delete the server's snapshots too; protected ones stay. By default snapshots survive the server.
	DeleteSnapshots *bool
}

CloudDeleteServerParams holds the query parameters of CloudService.DeleteServer.

type CloudGetServerMetricsParams

type CloudGetServerMetricsParams struct {
	// Which graph.
	Type *string
	// Start (RFC 3339).
	Start *string
	// End (RFC 3339), after start.
	End *string
	// Seconds between points.
	Step *int64
}

CloudGetServerMetricsParams holds the query parameters of CloudService.GetServerMetrics.

type CloudListActionEventsParams

type CloudListActionEventsParams struct {
	// Only events after this event id.
	After *int64
	// At most this many (1-500).
	Limit *int64
}

CloudListActionEventsParams holds the query parameters of CloudService.ListActionEvents.

type CloudListActionsParams

type CloudListActionsParams struct {
	// Only actions on this kind of resource.
	ResourceType *string
	// Only actions on this resource.
	ResourceID *int64
	// Only actions in this status.
	Status *string
	// Only actions started at or after this time (RFC 3339).
	Since *string
	// At most this many (unpaged; capped at 500).
	Limit *int64
	// Page to return (1-based). Without `page` and `per_page` the whole list is returned.
	Page *int64
	// Items per page (1-100).
	PerPage *int64
}

CloudListActionsParams holds the query parameters of CloudService.ListActions.

type CloudListBackupsParams

type CloudListBackupsParams struct {
	// Comma-separated terms that must all hold: `key=value`, `key!=value`, `key` (has the label) or `!key` (has not). A malformed selector is 422 `invalid_label_selector`.
	LabelSelector *string
	// Page to return (1-based). Without `page` and `per_page` the whole list is returned.
	Page *int64
	// Items per page (1-100).
	PerPage *int64
	// Only resources in this project.
	ProjectID *int64
}

CloudListBackupsParams holds the query parameters of CloudService.ListBackups.

type CloudListCustomImagesParams

type CloudListCustomImagesParams struct {
	// Only this datacenter.
	Datacenter *string
}

CloudListCustomImagesParams holds the query parameters of CloudService.ListCustomImages.

type CloudListElasticIPsParams

type CloudListElasticIPsParams struct {
	// Comma-separated terms that must all hold: `key=value`, `key!=value`, `key` (has the label) or `!key` (has not). A malformed selector is 422 `invalid_label_selector`.
	LabelSelector *string
	// Page to return (1-based). Without `page` and `per_page` the whole list is returned.
	Page *int64
	// Items per page (1-100).
	PerPage *int64
	// Only resources in this project.
	ProjectID *int64
}

CloudListElasticIPsParams holds the query parameters of CloudService.ListElasticIPs.

type CloudListFirewallsParams

type CloudListFirewallsParams struct {
	// Comma-separated terms that must all hold: `key=value`, `key!=value`, `key` (has the label) or `!key` (has not). A malformed selector is 422 `invalid_label_selector`.
	LabelSelector *string
	// Page to return (1-based). Without `page` and `per_page` the whole list is returned.
	Page *int64
	// Items per page (1-100).
	PerPage *int64
	// Only resources in this project.
	ProjectID *int64
}

CloudListFirewallsParams holds the query parameters of CloudService.ListFirewalls.

type CloudListFloatingIPsParams

type CloudListFloatingIPsParams struct {
	// Comma-separated terms that must all hold: `key=value`, `key!=value`, `key` (has the label) or `!key` (has not). A malformed selector is 422 `invalid_label_selector`.
	LabelSelector *string
	// Page to return (1-based). Without `page` and `per_page` the whole list is returned.
	Page *int64
	// Items per page (1-100).
	PerPage *int64
	// Only resources in this project.
	ProjectID *int64
}

CloudListFloatingIPsParams holds the query parameters of CloudService.ListFloatingIPs.

type CloudListImagesParams

type CloudListImagesParams struct {
	// Only this type.
	Type *string
	// Only images in this datacenter.
	Datacenter *string
	// Comma-separated terms that must all hold: `key=value`, `key!=value`, `key` (has the label) or `!key` (has not). A malformed selector is 422 `invalid_label_selector`.
	LabelSelector *string
	// Page to return (1-based). Without `page` and `per_page` the whole list is returned.
	Page *int64
	// Items per page (1-100).
	PerPage *int64
	// Only resources in this project.
	ProjectID *int64
}

CloudListImagesParams holds the query parameters of CloudService.ListImages.

type CloudListLimitsParams

type CloudListLimitsParams struct {
	// Only this datacenter.
	Datacenter *string
}

CloudListLimitsParams holds the query parameters of CloudService.ListLimits.

type CloudListLoadBalancersParams

type CloudListLoadBalancersParams struct {
	// Comma-separated terms that must all hold: `key=value`, `key!=value`, `key` (has the label) or `!key` (has not). A malformed selector is 422 `invalid_label_selector`.
	LabelSelector *string
	// Page to return (1-based). Without `page` and `per_page` the whole list is returned.
	Page *int64
	// Items per page (1-100).
	PerPage *int64
	// Only resources in this project.
	ProjectID *int64
}

CloudListLoadBalancersParams holds the query parameters of CloudService.ListLoadBalancers.

type CloudListNATGatewaysParams

type CloudListNATGatewaysParams struct {
	// Comma-separated terms that must all hold: `key=value`, `key!=value`, `key` (has the label) or `!key` (has not). A malformed selector is 422 `invalid_label_selector`.
	LabelSelector *string
	// Page to return (1-based). Without `page` and `per_page` the whole list is returned.
	Page *int64
	// Items per page (1-100).
	PerPage *int64
	// Only resources in this project.
	ProjectID *int64
}

CloudListNATGatewaysParams holds the query parameters of CloudService.ListNATGateways.

type CloudListNetworksParams

type CloudListNetworksParams struct {
	// Comma-separated terms that must all hold: `key=value`, `key!=value`, `key` (has the label) or `!key` (has not). A malformed selector is 422 `invalid_label_selector`.
	LabelSelector *string
	// Page to return (1-based). Without `page` and `per_page` the whole list is returned.
	Page *int64
	// Items per page (1-100).
	PerPage *int64
	// Only resources in this project.
	ProjectID *int64
}

CloudListNetworksParams holds the query parameters of CloudService.ListNetworks.

type CloudListPlacementGroupsParams

type CloudListPlacementGroupsParams struct {
	// Comma-separated terms that must all hold: `key=value`, `key!=value`, `key` (has the label) or `!key` (has not). A malformed selector is 422 `invalid_label_selector`.
	LabelSelector *string
	// Page to return (1-based). Without `page` and `per_page` the whole list is returned.
	Page *int64
	// Items per page (1-100).
	PerPage *int64
	// Only resources in this project.
	ProjectID *int64
}

CloudListPlacementGroupsParams holds the query parameters of CloudService.ListPlacementGroups.

type CloudListPlansParams

type CloudListPlansParams struct {
	// Only this datacenter's plans.
	Datacenter *string
}

CloudListPlansParams holds the query parameters of CloudService.ListPlans.

type CloudListPricingParams

type CloudListPricingParams struct {
	// Only this datacenter's prices.
	Datacenter *string
}

CloudListPricingParams holds the query parameters of CloudService.ListPricing.

type CloudListPrimaryIPsParams

type CloudListPrimaryIPsParams struct {
	// Comma-separated terms that must all hold: `key=value`, `key!=value`, `key` (has the label) or `!key` (has not). A malformed selector is 422 `invalid_label_selector`.
	LabelSelector *string
	// Page to return (1-based). Without `page` and `per_page` the whole list is returned.
	Page *int64
	// Items per page (1-100).
	PerPage *int64
	// Only resources in this project.
	ProjectID *int64
}

CloudListPrimaryIPsParams holds the query parameters of CloudService.ListPrimaryIPs.

type CloudListServerEventsParams

type CloudListServerEventsParams struct {
	// Only events after this event id.
	After *int64
	// At most this many (1-500).
	Limit *int64
}

CloudListServerEventsParams holds the query parameters of CloudService.ListServerEvents.

type CloudListServersParams

type CloudListServersParams struct {
	// Comma-separated terms that must all hold: `key=value`, `key!=value`, `key` (has the label) or `!key` (has not). A malformed selector is 422 `invalid_label_selector`.
	LabelSelector *string
	// Page to return (1-based). Without `page` and `per_page` the whole list is returned.
	Page *int64
	// Items per page (1-100).
	PerPage *int64
	// Only resources in this project.
	ProjectID *int64
}

CloudListServersParams holds the query parameters of CloudService.ListServers.

type CloudListSnapshotsParams

type CloudListSnapshotsParams struct {
	// Comma-separated terms that must all hold: `key=value`, `key!=value`, `key` (has the label) or `!key` (has not). A malformed selector is 422 `invalid_label_selector`.
	LabelSelector *string
	// Page to return (1-based). Without `page` and `per_page` the whole list is returned.
	Page *int64
	// Items per page (1-100).
	PerPage *int64
	// Only resources in this project.
	ProjectID *int64
}

CloudListSnapshotsParams holds the query parameters of CloudService.ListSnapshots.

type CloudListVolumesParams

type CloudListVolumesParams struct {
	// Comma-separated terms that must all hold: `key=value`, `key!=value`, `key` (has the label) or `!key` (has not). A malformed selector is 422 `invalid_label_selector`.
	LabelSelector *string
	// Page to return (1-based). Without `page` and `per_page` the whole list is returned.
	Page *int64
	// Items per page (1-100).
	PerPage *int64
	// Only resources in this project.
	ProjectID *int64
}

CloudListVolumesParams holds the query parameters of CloudService.ListVolumes.

type CloudService

type CloudService struct {
	// contains filtered or unexported fields
}

CloudService calls the Cloud API: servers, volumes, networks, firewalls, floating IPs, load balancers (`/cloud/v1`).

func (*CloudService) AddSubnet

func (s *CloudService) AddSubnet(ctx context.Context, id int64, body any, opts ...RequestOption) (*Response, error)

AddSubnet calls POST /networks/{id}/subnets.

Add a subnet

func (*CloudService) AttachServerToNetwork

func (s *CloudService) AttachServerToNetwork(ctx context.Context, id int64, body any, opts ...RequestOption) (*Response, error)

AttachServerToNetwork calls POST /servers/{id}/actions/attach_to_network.

Attach a server to a private network

func (*CloudService) ChangePrimaryIPDNSPTR

func (s *CloudService) ChangePrimaryIPDNSPTR(ctx context.Context, id int64, body any, opts ...RequestOption) (*Response, error)

ChangePrimaryIPDNSPTR calls POST /primary-ips/{id}/actions/change_dns_ptr.

Change a primary IP's reverse DNS

func (*CloudService) ChangeServerBackupWindow

func (s *CloudService) ChangeServerBackupWindow(ctx context.Context, id int64, body any, opts ...RequestOption) (*Response, error)

ChangeServerBackupWindow calls POST /servers/{id}/actions/change_backup_window.

Change the backup window

func (*CloudService) ConvertBackup

func (s *CloudService) ConvertBackup(ctx context.Context, id int64, body any, opts ...RequestOption) (*Response, error)

ConvertBackup calls POST /backups/{id}/actions/convert.

Convert a backup to a snapshot

func (*CloudService) CreateElasticIP

func (s *CloudService) CreateElasticIP(ctx context.Context, body any, opts ...RequestOption) (*Response, error)

CreateElasticIP calls POST /elastic-ips.

Create an elastic IP

func (*CloudService) CreateFirewall

func (s *CloudService) CreateFirewall(ctx context.Context, body any, opts ...RequestOption) (*Response, error)

CreateFirewall calls POST /firewalls.

Create a firewall

func (*CloudService) CreateFloatingIP

func (s *CloudService) CreateFloatingIP(ctx context.Context, body any, opts ...RequestOption) (*Response, error)

CreateFloatingIP calls POST /floating-ips.

Create a floating IP

func (*CloudService) CreateLoadBalancer

func (s *CloudService) CreateLoadBalancer(ctx context.Context, body any, opts ...RequestOption) (*Response, error)

CreateLoadBalancer calls POST /load-balancers.

Create a load balancer

func (*CloudService) CreateNATGateway

func (s *CloudService) CreateNATGateway(ctx context.Context, body any, opts ...RequestOption) (*Response, error)

CreateNATGateway calls POST /nat-gateways.

Create a NAT gateway

func (*CloudService) CreateNetwork

func (s *CloudService) CreateNetwork(ctx context.Context, body any, opts ...RequestOption) (*Response, error)

CreateNetwork calls POST /networks.

Create a private network

func (*CloudService) CreatePlacementGroup

func (s *CloudService) CreatePlacementGroup(ctx context.Context, body any, opts ...RequestOption) (*Response, error)

CreatePlacementGroup calls POST /placement-groups.

Create a placement group

func (*CloudService) CreateServer

func (s *CloudService) CreateServer(ctx context.Context, body any, opts ...RequestOption) (*Response, error)

CreateServer calls POST /servers.

Create servers

func (*CloudService) CreateServerBackup

func (s *CloudService) CreateServerBackup(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

CreateServerBackup calls POST /servers/{id}/actions/create_backup.

Take a backup now

func (*CloudService) CreateServerSnapshot

func (s *CloudService) CreateServerSnapshot(ctx context.Context, id int64, body any, opts ...RequestOption) (*Response, error)

CreateServerSnapshot calls POST /servers/{id}/actions/create_image.

Snapshot a server

func (*CloudService) CreateVolume

func (s *CloudService) CreateVolume(ctx context.Context, body any, opts ...RequestOption) (*Response, error)

CreateVolume calls POST /volumes.

Create a volume

func (*CloudService) DeleteBackup

func (s *CloudService) DeleteBackup(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

DeleteBackup calls DELETE /backups/{id}.

Delete a backup

func (*CloudService) DeleteElasticIP

func (s *CloudService) DeleteElasticIP(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

DeleteElasticIP calls DELETE /elastic-ips/{id}.

Delete an elastic IP

func (*CloudService) DeleteFirewall

func (s *CloudService) DeleteFirewall(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

DeleteFirewall calls DELETE /firewalls/{id}.

Delete a firewall

func (*CloudService) DeleteFloatingIP

func (s *CloudService) DeleteFloatingIP(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

DeleteFloatingIP calls DELETE /floating-ips/{id}.

Delete a floating IP

func (*CloudService) DeleteLoadBalancer

func (s *CloudService) DeleteLoadBalancer(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

DeleteLoadBalancer calls DELETE /load-balancers/{id}.

Delete a load balancer

func (*CloudService) DeleteNATGateway

func (s *CloudService) DeleteNATGateway(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

DeleteNATGateway calls DELETE /nat-gateways/{id}.

Delete a NAT gateway

func (*CloudService) DeleteNetwork

func (s *CloudService) DeleteNetwork(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

DeleteNetwork calls DELETE /networks/{id}.

Delete a private network

func (*CloudService) DeletePlacementGroup

func (s *CloudService) DeletePlacementGroup(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

DeletePlacementGroup calls DELETE /placement-groups/{id}.

Delete a placement group

func (*CloudService) DeleteServer

func (s *CloudService) DeleteServer(ctx context.Context, id int64, params *CloudDeleteServerParams, opts ...RequestOption) (*Response, error)

DeleteServer calls DELETE /servers/{id}.

Delete a server

func (*CloudService) DeleteSnapshot

func (s *CloudService) DeleteSnapshot(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

DeleteSnapshot calls DELETE /snapshots/{id}.

Delete a snapshot

func (*CloudService) DeleteSubnet

func (s *CloudService) DeleteSubnet(ctx context.Context, id int64, subnet int64, opts ...RequestOption) (*Response, error)

DeleteSubnet calls DELETE /networks/{id}/subnets/{subnet}.

Delete a subnet

func (*CloudService) DeleteVolume

func (s *CloudService) DeleteVolume(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

DeleteVolume calls DELETE /volumes/{id}.

Delete a volume

func (*CloudService) DetachServerFromNetwork

func (s *CloudService) DetachServerFromNetwork(ctx context.Context, id int64, body any, opts ...RequestOption) (*Response, error)

DetachServerFromNetwork calls POST /servers/{id}/actions/detach_from_network.

Detach a server from a private network

func (*CloudService) DisableServerBackup

func (s *CloudService) DisableServerBackup(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

DisableServerBackup calls POST /servers/{id}/actions/disable_backup.

Disable daily backups

func (*CloudService) ElasticIPAction

func (s *CloudService) ElasticIPAction(ctx context.Context, id int64, op string, body any, opts ...RequestOption) (*Response, error)

ElasticIPAction calls POST /elastic-ips/{id}/actions/{op}.

Run an elastic IP action

func (*CloudService) EnableServerBackup

func (s *CloudService) EnableServerBackup(ctx context.Context, id int64, body any, opts ...RequestOption) (*Response, error)

EnableServerBackup calls POST /servers/{id}/actions/enable_backup.

Enable daily backups

func (*CloudService) FirewallAction

func (s *CloudService) FirewallAction(ctx context.Context, id int64, op string, body any, opts ...RequestOption) (*Response, error)

FirewallAction calls POST /firewalls/{id}/actions/{op}.

Apply a firewall to, or remove it from, resources

func (*CloudService) FloatingIPAction

func (s *CloudService) FloatingIPAction(ctx context.Context, id int64, op string, body any, opts ...RequestOption) (*Response, error)

FloatingIPAction calls POST /floating-ips/{id}/actions/{op}.

Run a floating IP action

func (*CloudService) GetAction

func (s *CloudService) GetAction(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

GetAction calls GET /actions/{id}.

Get an action

func (*CloudService) GetBackup

func (s *CloudService) GetBackup(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

GetBackup calls GET /backups/{id}.

Get a backup

func (*CloudService) GetElasticIP

func (s *CloudService) GetElasticIP(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

GetElasticIP calls GET /elastic-ips/{id}.

Get an elastic IP

func (*CloudService) GetFirewall

func (s *CloudService) GetFirewall(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

GetFirewall calls GET /firewalls/{id}.

Get a firewall

func (*CloudService) GetFloatingIP

func (s *CloudService) GetFloatingIP(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

GetFloatingIP calls GET /floating-ips/{id}.

Get a floating IP

func (*CloudService) GetLoadBalancer

func (s *CloudService) GetLoadBalancer(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

GetLoadBalancer calls GET /load-balancers/{id}.

Get a load balancer

func (*CloudService) GetLoadBalancerHealth

func (s *CloudService) GetLoadBalancerHealth(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

GetLoadBalancerHealth calls GET /load-balancers/{id}/health.

Refresh a load balancer's target health

func (*CloudService) GetNATGateway

func (s *CloudService) GetNATGateway(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

GetNATGateway calls GET /nat-gateways/{id}.

Get a NAT gateway

func (*CloudService) GetNetwork

func (s *CloudService) GetNetwork(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

GetNetwork calls GET /networks/{id}.

Get a private network

func (*CloudService) GetPlacementGroup

func (s *CloudService) GetPlacementGroup(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

GetPlacementGroup calls GET /placement-groups/{id}.

Get a placement group

func (*CloudService) GetPrimaryIP

func (s *CloudService) GetPrimaryIP(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

GetPrimaryIP calls GET /primary-ips/{id}.

Get a primary IP

func (*CloudService) GetPublicPricing

func (s *CloudService) GetPublicPricing(ctx context.Context, opts ...RequestOption) (*Response, error)

GetPublicPricing calls GET /public/pricing.

Public price list

func (*CloudService) GetServer

func (s *CloudService) GetServer(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

GetServer calls GET /servers/{id}.

Get a server

func (*CloudService) GetServerCosts

func (s *CloudService) GetServerCosts(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

GetServerCosts calls GET /servers/{id}/costs.

Get a server's cost

func (*CloudService) GetServerMetrics

func (s *CloudService) GetServerMetrics(ctx context.Context, id int64, params *CloudGetServerMetricsParams, opts ...RequestOption) (*Response, error)

GetServerMetrics calls GET /servers/{id}/metrics.

Get server metrics

func (*CloudService) GetServerNetworking

func (s *CloudService) GetServerNetworking(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

GetServerNetworking calls GET /servers/{id}/networking.

Get a server's networking

func (*CloudService) GetServerStorage

func (s *CloudService) GetServerStorage(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

GetServerStorage calls GET /servers/{id}/storage.

Get a server's boot disk and rescue state

func (*CloudService) GetSnapshot

func (s *CloudService) GetSnapshot(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

GetSnapshot calls GET /snapshots/{id}.

Get a snapshot

func (*CloudService) GetVolume

func (s *CloudService) GetVolume(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

GetVolume calls GET /volumes/{id}.

Get a volume

func (*CloudService) ListActionEvents

func (s *CloudService) ListActionEvents(ctx context.Context, id int64, params *CloudListActionEventsParams, opts ...RequestOption) (*Response, error)

ListActionEvents calls GET /actions/{id}/events.

List an action's OpenStack events

func (*CloudService) ListActions

func (s *CloudService) ListActions(ctx context.Context, params *CloudListActionsParams, opts ...RequestOption) (*Response, error)

ListActions calls GET /actions.

List the account's actions

func (*CloudService) ListBackups

func (s *CloudService) ListBackups(ctx context.Context, params *CloudListBackupsParams, opts ...RequestOption) (*Response, error)

ListBackups calls GET /backups.

List backups

func (*CloudService) ListCustomImages

func (s *CloudService) ListCustomImages(ctx context.Context, params *CloudListCustomImagesParams, opts ...RequestOption) (*Response, error)

ListCustomImages calls GET /images/custom.

List the account's snapshots and backups as catalog images

func (*CloudService) ListDatacenterImages

func (s *CloudService) ListDatacenterImages(ctx context.Context, code string, opts ...RequestOption) (*Response, error)

ListDatacenterImages calls GET /datacenters/{code}/images.

List a datacenter's image catalog

func (*CloudService) ListDatacenters

func (s *CloudService) ListDatacenters(ctx context.Context, opts ...RequestOption) (*Response, error)

ListDatacenters calls GET /datacenters.

List datacenters

func (*CloudService) ListElasticIPActions

func (s *CloudService) ListElasticIPActions(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

ListElasticIPActions calls GET /elastic-ips/{id}/actions.

List an elastic IP's actions

func (*CloudService) ListElasticIPs

func (s *CloudService) ListElasticIPs(ctx context.Context, params *CloudListElasticIPsParams, opts ...RequestOption) (*Response, error)

ListElasticIPs calls GET /elastic-ips.

List elastic IPs

func (*CloudService) ListFirewallActions

func (s *CloudService) ListFirewallActions(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

ListFirewallActions calls GET /firewalls/{id}/actions.

List a firewall's actions

func (*CloudService) ListFirewalls

func (s *CloudService) ListFirewalls(ctx context.Context, params *CloudListFirewallsParams, opts ...RequestOption) (*Response, error)

ListFirewalls calls GET /firewalls.

List firewalls

func (*CloudService) ListFloatingIPActions

func (s *CloudService) ListFloatingIPActions(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

ListFloatingIPActions calls GET /floating-ips/{id}/actions.

List a floating IP's actions

func (*CloudService) ListFloatingIPs

func (s *CloudService) ListFloatingIPs(ctx context.Context, params *CloudListFloatingIPsParams, opts ...RequestOption) (*Response, error)

ListFloatingIPs calls GET /floating-ips.

List floating IPs

func (*CloudService) ListImages

func (s *CloudService) ListImages(ctx context.Context, params *CloudListImagesParams, opts ...RequestOption) (*Response, error)

ListImages calls GET /images.

List images

func (*CloudService) ListLimits

func (s *CloudService) ListLimits(ctx context.Context, params *CloudListLimitsParams, opts ...RequestOption) (*Response, error)

ListLimits calls GET /limits.

List the account's limits

func (*CloudService) ListLoadBalancerActions

func (s *CloudService) ListLoadBalancerActions(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

ListLoadBalancerActions calls GET /load-balancers/{id}/actions.

List a load balancer's actions

func (*CloudService) ListLoadBalancerTypes

func (s *CloudService) ListLoadBalancerTypes(ctx context.Context, opts ...RequestOption) (*Response, error)

ListLoadBalancerTypes calls GET /load-balancer-types.

List load balancer types

func (*CloudService) ListLoadBalancers

func (s *CloudService) ListLoadBalancers(ctx context.Context, params *CloudListLoadBalancersParams, opts ...RequestOption) (*Response, error)

ListLoadBalancers calls GET /load-balancers.

List load balancers

func (*CloudService) ListNATGatewayActions

func (s *CloudService) ListNATGatewayActions(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

ListNATGatewayActions calls GET /nat-gateways/{id}/actions.

List a NAT gateway's actions

func (*CloudService) ListNATGateways

func (s *CloudService) ListNATGateways(ctx context.Context, params *CloudListNATGatewaysParams, opts ...RequestOption) (*Response, error)

ListNATGateways calls GET /nat-gateways.

List NAT gateways

func (*CloudService) ListNetworkActions

func (s *CloudService) ListNetworkActions(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

ListNetworkActions calls GET /networks/{id}/actions.

List a network's actions

func (*CloudService) ListNetworks

func (s *CloudService) ListNetworks(ctx context.Context, params *CloudListNetworksParams, opts ...RequestOption) (*Response, error)

ListNetworks calls GET /networks.

List private networks

func (*CloudService) ListPlacementGroups

func (s *CloudService) ListPlacementGroups(ctx context.Context, params *CloudListPlacementGroupsParams, opts ...RequestOption) (*Response, error)

ListPlacementGroups calls GET /placement-groups.

List placement groups

func (*CloudService) ListPlans

func (s *CloudService) ListPlans(ctx context.Context, params *CloudListPlansParams, opts ...RequestOption) (*Response, error)

ListPlans calls GET /plans.

List server plans

func (*CloudService) ListPricing

func (s *CloudService) ListPricing(ctx context.Context, params *CloudListPricingParams, opts ...RequestOption) (*Response, error)

ListPricing calls GET /pricing.

List prices

func (*CloudService) ListPrimaryIPActions

func (s *CloudService) ListPrimaryIPActions(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

ListPrimaryIPActions calls GET /primary-ips/{id}/actions.

List a primary IP's actions

func (*CloudService) ListPrimaryIPs

func (s *CloudService) ListPrimaryIPs(ctx context.Context, params *CloudListPrimaryIPsParams, opts ...RequestOption) (*Response, error)

ListPrimaryIPs calls GET /primary-ips.

List primary IPs

func (*CloudService) ListServerActions

func (s *CloudService) ListServerActions(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

ListServerActions calls GET /servers/{id}/actions.

List a server's actions

func (*CloudService) ListServerBackups

func (s *CloudService) ListServerBackups(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

ListServerBackups calls GET /servers/{id}/backups.

List a server's backups and backup plan

func (*CloudService) ListServerEvents

func (s *CloudService) ListServerEvents(ctx context.Context, id int64, params *CloudListServerEventsParams, opts ...RequestOption) (*Response, error)

ListServerEvents calls GET /servers/{id}/events.

List a server's OpenStack events

func (*CloudService) ListServerIPChanges

func (s *CloudService) ListServerIPChanges(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

ListServerIPChanges calls GET /servers/{id}/ip-changes.

List a server's IPv4 changes

func (*CloudService) ListServerSnapshots

func (s *CloudService) ListServerSnapshots(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

ListServerSnapshots calls GET /servers/{id}/snapshots.

List a server's snapshots

func (*CloudService) ListServers

func (s *CloudService) ListServers(ctx context.Context, params *CloudListServersParams, opts ...RequestOption) (*Response, error)

ListServers calls GET /servers.

List servers

func (*CloudService) ListSnapshots

func (s *CloudService) ListSnapshots(ctx context.Context, params *CloudListSnapshotsParams, opts ...RequestOption) (*Response, error)

ListSnapshots calls GET /snapshots.

List snapshots

func (*CloudService) ListVolumePrices

func (s *CloudService) ListVolumePrices(ctx context.Context, opts ...RequestOption) (*Response, error)

ListVolumePrices calls GET /volume-prices.

List block storage prices

func (*CloudService) ListVolumes

func (s *CloudService) ListVolumes(ctx context.Context, params *CloudListVolumesParams, opts ...RequestOption) (*Response, error)

ListVolumes calls GET /volumes.

List volumes

func (*CloudService) LoadBalancerAction

func (s *CloudService) LoadBalancerAction(ctx context.Context, id int64, op string, body any, opts ...RequestOption) (*Response, error)

LoadBalancerAction calls POST /load-balancers/{id}/actions/{op}.

Run a load balancer action

func (*CloudService) OpenServerConsole

func (s *CloudService) OpenServerConsole(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

OpenServerConsole calls POST /servers/{id}/console.

Open a VNC console

func (*CloudService) ReplaceFirewall

func (s *CloudService) ReplaceFirewall(ctx context.Context, id int64, body any, opts ...RequestOption) (*Response, error)

ReplaceFirewall calls PUT /firewalls/{id}.

Replace a firewall's name and rules

func (*CloudService) RestoreServerBackup

func (s *CloudService) RestoreServerBackup(ctx context.Context, id int64, body any, opts ...RequestOption) (*Response, error)

RestoreServerBackup calls POST /servers/{id}/actions/restore_backup.

Restore a server from a backup

func (*CloudService) ServerAction

func (s *CloudService) ServerAction(ctx context.Context, id int64, op string, body any, opts ...RequestOption) (*Response, error)

ServerAction calls POST /servers/{id}/actions/{op}.

Run a server action

func (*CloudService) SetFirewallServers

func (s *CloudService) SetFirewallServers(ctx context.Context, id int64, body any, opts ...RequestOption) (*Response, error)

SetFirewallServers calls PUT /firewalls/{id}/servers.

Set the servers a firewall is applied to

func (*CloudService) SetNetworkRoutes

func (s *CloudService) SetNetworkRoutes(ctx context.Context, id int64, body any, opts ...RequestOption) (*Response, error)

SetNetworkRoutes calls PUT /networks/{id}/routes.

Replace a network's routes

func (*CloudService) UpdateElasticIP

func (s *CloudService) UpdateElasticIP(ctx context.Context, id int64, body any, opts ...RequestOption) (*Response, error)

UpdateElasticIP calls PATCH /elastic-ips/{id}.

Update an elastic IP

func (*CloudService) UpdateFirewall

func (s *CloudService) UpdateFirewall(ctx context.Context, id int64, body any, opts ...RequestOption) (*Response, error)

UpdateFirewall calls PATCH /firewalls/{id}.

Update a firewall

func (*CloudService) UpdateFloatingIP

func (s *CloudService) UpdateFloatingIP(ctx context.Context, id int64, body any, opts ...RequestOption) (*Response, error)

UpdateFloatingIP calls PATCH /floating-ips/{id}.

Update a floating IP

func (*CloudService) UpdateLoadBalancer

func (s *CloudService) UpdateLoadBalancer(ctx context.Context, id int64, body any, opts ...RequestOption) (*Response, error)

UpdateLoadBalancer calls PATCH /load-balancers/{id}.

Update a load balancer

func (*CloudService) UpdateNATGateway

func (s *CloudService) UpdateNATGateway(ctx context.Context, id int64, body any, opts ...RequestOption) (*Response, error)

UpdateNATGateway calls PATCH /nat-gateways/{id}.

Update a NAT gateway

func (*CloudService) UpdateNetwork

func (s *CloudService) UpdateNetwork(ctx context.Context, id int64, body any, opts ...RequestOption) (*Response, error)

UpdateNetwork calls PATCH /networks/{id}.

Update a private network

func (*CloudService) UpdatePlacementGroup

func (s *CloudService) UpdatePlacementGroup(ctx context.Context, id int64, body any, opts ...RequestOption) (*Response, error)

UpdatePlacementGroup calls PATCH /placement-groups/{id}.

Update a placement group

func (*CloudService) UpdatePrimaryIP

func (s *CloudService) UpdatePrimaryIP(ctx context.Context, id int64, body any, opts ...RequestOption) (*Response, error)

UpdatePrimaryIP calls PATCH /primary-ips/{id}.

Move a primary IP to another project

func (*CloudService) UpdateServer

func (s *CloudService) UpdateServer(ctx context.Context, id int64, body any, opts ...RequestOption) (*Response, error)

UpdateServer calls PATCH /servers/{id}.

Update a server

func (*CloudService) UpdateSnapshot

func (s *CloudService) UpdateSnapshot(ctx context.Context, id int64, body any, opts ...RequestOption) (*Response, error)

UpdateSnapshot calls PATCH /snapshots/{id}.

Update a snapshot

func (*CloudService) UpdateVolume

func (s *CloudService) UpdateVolume(ctx context.Context, id int64, body any, opts ...RequestOption) (*Response, error)

UpdateVolume calls PATCH /volumes/{id}.

Update a volume

func (*CloudService) VolumeAction

func (s *CloudService) VolumeAction(ctx context.Context, id int64, op string, body any, opts ...RequestOption) (*Response, error)

VolumeAction calls POST /volumes/{id}/actions/{op}.

Run a volume action

func (*CloudService) WithRegion

func (s *CloudService) WithRegion(region string) *CloudService

WithRegion returns a copy of the service whose requests go to region (sent as the Arianet-Region header). An empty region means the default.

type ConnectionError

type ConnectionError struct{ Err error }

ConnectionError means the request got no answer (DNS, TLS, timeout, reset).

func (*ConnectionError) Error

func (e *ConnectionError) Error() string

func (*ConnectionError) Unwrap

func (e *ConnectionError) Unwrap() error

type CoreListFirewallsParams

type CoreListFirewallsParams struct {
	Page *int64
	// Page size, 1-100 (an out-of-range value falls back to 15).
	Limit *int64
}

CoreListFirewallsParams holds the query parameters of CoreService.ListFirewalls.

type CoreListInvoicesParams

type CoreListInvoicesParams struct {
	Page *int64
	// Page size, 1-100 (an out-of-range value falls back to 15).
	Limit  *int64
	Status *string
}

CoreListInvoicesParams holds the query parameters of CoreService.ListInvoices.

type CoreListRegionsParams

type CoreListRegionsParams struct {
	// `1` or `true` returns internal datacenter names instead of display names (not cached).
	SystemName *string
}

CoreListRegionsParams holds the query parameters of CoreService.ListRegions.

type CoreListSSHKeysParams

type CoreListSSHKeysParams struct {
	Page *int64
	// Page size, 1-100 (an out-of-range value falls back to 15).
	Limit *int64
}

CoreListSSHKeysParams holds the query parameters of CoreService.ListSSHKeys.

type CoreListServerActionsParams

type CoreListServerActionsParams struct {
	// Number of entries (1-100, default 15).
	Limit *int64
}

CoreListServerActionsParams holds the query parameters of CoreService.ListServerActions.

type CoreListServersParams

type CoreListServersParams struct {
	Page *int64
	// Page size, 1-100 (an out-of-range value falls back to 15).
	Limit *int64
	// Filter by server status.
	Status *string
}

CoreListServersParams holds the query parameters of CoreService.ListServers.

type CoreListTransactionsParams

type CoreListTransactionsParams struct {
	Page *int64
	// Page size, 1-100 (an out-of-range value falls back to 15).
	Limit *int64
}

CoreListTransactionsParams holds the query parameters of CoreService.ListTransactions.

type CoreService

type CoreService struct {
	// contains filtered or unexported fields
}

CoreService calls the Core API: account, API tokens, classic VPS, SSH keys, firewalls, balance and invoices (`/api/v1`).

func (*CoreService) AddFirewallRule

func (s *CoreService) AddFirewallRule(ctx context.Context, id int64, body any, opts ...RequestOption) (*Response, error)

AddFirewallRule calls POST /firewalls/{id}/rules.

Add a rule

func (*CoreService) AttachFirewall

func (s *CoreService) AttachFirewall(ctx context.Context, id int64, body any, opts ...RequestOption) (*Response, error)

AttachFirewall calls POST /firewalls/{id}/attach.

Attach a firewall to servers

func (*CoreService) CreateFirewall

func (s *CoreService) CreateFirewall(ctx context.Context, body any, opts ...RequestOption) (*Response, error)

CreateFirewall calls POST /firewalls.

Create a firewall

func (*CoreService) CreateSSHKey

func (s *CoreService) CreateSSHKey(ctx context.Context, body any, opts ...RequestOption) (*Response, error)

CreateSSHKey calls POST /ssh-keys.

Add an SSH key

func (*CoreService) CreateServer

func (s *CoreService) CreateServer(ctx context.Context, body any, opts ...RequestOption) (*Response, error)

CreateServer calls POST /servers.

Create a server

The request carries an Idempotency-Key (generated when none is given with WithIdempotencyKey), so it is retried safely after a network error or a 5xx.

func (*CoreService) DeleteFirewall

func (s *CoreService) DeleteFirewall(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

DeleteFirewall calls DELETE /firewalls/{id}.

Delete a firewall

func (*CoreService) DeleteFirewallRule

func (s *CoreService) DeleteFirewallRule(ctx context.Context, id int64, ruleID string, opts ...RequestOption) (*Response, error)

DeleteFirewallRule calls DELETE /firewalls/{id}/rules/{rule_id}.

Delete a rule

func (*CoreService) DeleteSSHKey

func (s *CoreService) DeleteSSHKey(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

DeleteSSHKey calls DELETE /ssh-keys/{id}.

Delete an SSH key

func (*CoreService) DeleteServer

func (s *CoreService) DeleteServer(ctx context.Context, id int64, body any, opts ...RequestOption) (*Response, error)

DeleteServer calls DELETE /servers/{id}.

Delete a server

func (*CoreService) DetachFirewall

func (s *CoreService) DetachFirewall(ctx context.Context, id int64, body any, opts ...RequestOption) (*Response, error)

DetachFirewall calls POST /firewalls/{id}/detach.

Detach a firewall from servers

func (*CoreService) GetBalance

func (s *CoreService) GetBalance(ctx context.Context, opts ...RequestOption) (*Response, error)

GetBalance calls GET /balance.

Wallet balances

func (*CoreService) GetFirewall

func (s *CoreService) GetFirewall(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

GetFirewall calls GET /firewalls/{id}.

Get a firewall with its rules

func (*CoreService) GetInvoice

func (s *CoreService) GetInvoice(ctx context.Context, number string, opts ...RequestOption) (*Response, error)

GetInvoice calls GET /invoices/{number}.

Get an invoice with its line items

func (*CoreService) GetMe

func (s *CoreService) GetMe(ctx context.Context, opts ...RequestOption) (*Response, error)

GetMe calls GET /auth/me.

Current user

func (*CoreService) GetPlan

func (s *CoreService) GetPlan(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

GetPlan calls GET /plans/{id}.

One plan

func (*CoreService) GetSSHKey

func (s *CoreService) GetSSHKey(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

GetSSHKey calls GET /ssh-keys/{id}.

Get an SSH key

func (*CoreService) GetServer

func (s *CoreService) GetServer(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

GetServer calls GET /servers/{id}.

Get a server

func (*CoreService) GetServerStatus

func (s *CoreService) GetServerStatus(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

GetServerStatus calls GET /servers/{id}/status.

Lightweight status

func (*CoreService) ListFirewalls

func (s *CoreService) ListFirewalls(ctx context.Context, params *CoreListFirewallsParams, opts ...RequestOption) (*Response, error)

ListFirewalls calls GET /firewalls.

List firewalls

func (*CoreService) ListInvoices

func (s *CoreService) ListInvoices(ctx context.Context, params *CoreListInvoicesParams, opts ...RequestOption) (*Response, error)

ListInvoices calls GET /invoices.

List invoices

func (*CoreService) ListOSByDatacenter

func (s *CoreService) ListOSByDatacenter(ctx context.Context, datacenterID int64, opts ...RequestOption) (*Response, error)

ListOSByDatacenter calls GET /os/datacenter/{datacenter_id}.

Operating systems available in a datacenter

func (*CoreService) ListPlansByDatacenter

func (s *CoreService) ListPlansByDatacenter(ctx context.Context, datacenterID int64, opts ...RequestOption) (*Response, error)

ListPlansByDatacenter calls GET /plans/datacenter/{datacenter_id}.

Plans orderable in a datacenter

func (*CoreService) ListRegions

func (s *CoreService) ListRegions(ctx context.Context, params *CoreListRegionsParams, opts ...RequestOption) (*Response, error)

ListRegions calls GET /regions.

Regions and datacenters

func (*CoreService) ListSSHKeys

func (s *CoreService) ListSSHKeys(ctx context.Context, params *CoreListSSHKeysParams, opts ...RequestOption) (*Response, error)

ListSSHKeys calls GET /ssh-keys.

List SSH keys

func (*CoreService) ListServerActions

func (s *CoreService) ListServerActions(ctx context.Context, id int64, params *CoreListServerActionsParams, opts ...RequestOption) (*Response, error)

ListServerActions calls GET /servers/{id}/actions.

Operation history of a server

func (*CoreService) ListServers

func (s *CoreService) ListServers(ctx context.Context, params *CoreListServersParams, opts ...RequestOption) (*Response, error)

ListServers calls GET /servers.

List servers

func (*CoreService) ListTokens

func (s *CoreService) ListTokens(ctx context.Context, opts ...RequestOption) (*Response, error)

ListTokens calls GET /auth/tokens.

List API tokens

func (*CoreService) ListTransactions

func (s *CoreService) ListTransactions(ctx context.Context, params *CoreListTransactionsParams, opts ...RequestOption) (*Response, error)

ListTransactions calls GET /balance/transactions.

Wallet transactions

func (*CoreService) Logout

func (s *CoreService) Logout(ctx context.Context, opts ...RequestOption) (*Response, error)

Logout calls DELETE /auth/logout.

Revoke the token used for this request

func (*CoreService) PowerOffServer

func (s *CoreService) PowerOffServer(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

PowerOffServer calls POST /servers/{id}/power-off.

Power a server off

func (*CoreService) PowerOnServer

func (s *CoreService) PowerOnServer(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

PowerOnServer calls POST /servers/{id}/power-on.

Power a server on

func (*CoreService) ReinstallServer

func (s *CoreService) ReinstallServer(ctx context.Context, id int64, body any, opts ...RequestOption) (*Response, error)

ReinstallServer calls POST /servers/{id}/reinstall.

Reinstall the operating system

func (*CoreService) RenameServer

func (s *CoreService) RenameServer(ctx context.Context, id int64, body any, opts ...RequestOption) (*Response, error)

RenameServer calls POST /servers/{id}/rename.

Rename a server

func (*CoreService) RestartServer

func (s *CoreService) RestartServer(ctx context.Context, id int64, body any, opts ...RequestOption) (*Response, error)

RestartServer calls POST /servers/{id}/restart.

Restart a server

func (*CoreService) RevokeToken

func (s *CoreService) RevokeToken(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

RevokeToken calls DELETE /auth/tokens/{id}.

Revoke a token

func (*CoreService) ToggleServerProtection

func (s *CoreService) ToggleServerProtection(ctx context.Context, id int64, body any, opts ...RequestOption) (*Response, error)

ToggleServerProtection calls POST /servers/{id}/toggle-protection.

Set or flip delete protection

func (*CoreService) UpdateFirewall

func (s *CoreService) UpdateFirewall(ctx context.Context, id int64, body any, opts ...RequestOption) (*Response, error)

UpdateFirewall calls PUT /firewalls/{id}.

Update a firewall

func (*CoreService) UpdateSSHKey

func (s *CoreService) UpdateSSHKey(ctx context.Context, id int64, body any, opts ...RequestOption) (*Response, error)

UpdateSSHKey calls PUT /ssh-keys/{id}.

Update an SSH key

func (*CoreService) WithRegion

func (s *CoreService) WithRegion(region string) *CoreService

WithRegion returns a copy of the service whose requests go to region (sent as the Arianet-Region header). An empty region means the default.

type HostingGetCloudLinuxParams

type HostingGetCloudLinuxParams struct {
	// Read the server again instead of answering from the snapshot (waits up to 30 s).
	Refresh *string
}

HostingGetCloudLinuxParams holds the query parameters of HostingService.GetCloudLinux.

type HostingGetPhpSelectorParams

type HostingGetPhpSelectorParams struct {
	// Read the server again instead of answering from the snapshot (waits up to 30 s).
	Refresh *string
}

HostingGetPhpSelectorParams holds the query parameters of HostingService.GetPhpSelector.

type HostingGetRedisParams

type HostingGetRedisParams struct {
	// Read the server again instead of answering from the snapshot (waits up to 30 s).
	Refresh *string
}

HostingGetRedisParams holds the query parameters of HostingService.GetRedis.

type HostingGetRedisUsageParams

type HostingGetRedisUsageParams struct {
	Period *string
}

HostingGetRedisUsageParams holds the query parameters of HostingService.GetRedisUsage.

type HostingGetResourceUsageParams

type HostingGetResourceUsageParams struct {
	// Read the server again instead of answering from the snapshot (waits up to 30 s).
	Refresh *string
	// Default 24h.
	Period *string
}

HostingGetResourceUsageParams holds the query parameters of HostingService.GetResourceUsage.

type HostingGetShellParams

type HostingGetShellParams struct {
	// Read the server again instead of answering from the snapshot (waits up to 30 s).
	Refresh *string
}

HostingGetShellParams holds the query parameters of HostingService.GetShell.

type HostingGetTrafficParams

type HostingGetTrafficParams struct {
	// Read the server now instead of serving the last reading.
	Refresh *string
}

HostingGetTrafficParams holds the query parameters of HostingService.GetTraffic.

type HostingListAccountActionsParams

type HostingListAccountActionsParams struct {
	Limit *int64
}

HostingListAccountActionsParams holds the query parameters of HostingService.ListAccountActions.

type HostingListActionsParams

type HostingListActionsParams struct {
	Limit *int64
}

HostingListActionsParams holds the query parameters of HostingService.ListActions.

type HostingListAlertsParams

type HostingListAlertsParams struct {
	Limit *int64
}

HostingListAlertsParams holds the query parameters of HostingService.ListAlerts.

type HostingListPlansParams

type HostingListPlansParams struct {
	Datacenter *string
	Kind       *string
}

HostingListPlansParams holds the query parameters of HostingService.ListPlans.

type HostingListSSHKeysParams

type HostingListSSHKeysParams struct {
	// Read the server again instead of answering from the snapshot (waits up to 30 s).
	Refresh *string
}

HostingListSSHKeysParams holds the query parameters of HostingService.ListSSHKeys.

type HostingService

type HostingService struct {
	// contains filtered or unexported fields
}

HostingService calls the Hosting API (`/hosting/v1`).

func (*HostingService) AccountOperation

func (s *HostingService) AccountOperation(ctx context.Context, id int64, op string, body any, opts ...RequestOption) (*Response, error)

AccountOperation calls POST /accounts/{id}/actions/{op}.

change_plan {plan_id}, renew a lapsed term, or reset {password}: the account wiped back to a fresh one (same server, username, domain, plan and paid term; files, mail, databases and DNS zone deleted; no charge; never for a reseller). On a reseller change_plan (to another reseller plan) and renew also need hosting:reseller:manage

func (*HostingService) AddSSHKey

func (s *HostingService) AddSSHKey(ctx context.Context, id int64, body any, opts ...RequestOption) (*Response, error)

AddSSHKey calls POST /accounts/{id}/ssh-keys.

Add and authorize a public key (ed25519, ECDSA, or RSA of 2048 bits or more); answers the keys and the new key's SHA256 fingerprint

func (*HostingService) ChangeDomain

func (s *HostingService) ChangeDomain(ctx context.Context, id int64, body any, opts ...RequestOption) (*Response, error)

ChangeDomain calls POST /accounts/{id}/domain.

Change the account's main domain: its sites, DNS zone and mailboxes move to the new domain, and a free SSL certificate is requested for it. The first change is free, each later one is charged (domain_change.price), pre-authorized now and charged once done. A reseller's own account also needs hosting:reseller:manage

func (*HostingService) CreateAccount

func (s *HostingService) CreateAccount(ctx context.Context, body any, opts ...RequestOption) (*Response, error)

CreateAccount calls POST /accounts.

Order a hosting account (a reseller plan also needs hosting:reseller:manage)

The request carries an Idempotency-Key (generated when none is given with WithIdempotencyKey), so it is retried safely after a network error or a 5xx.

func (*HostingService) CreateDNSRecord

func (s *HostingService) CreateDNSRecord(ctx context.Context, id int64, body any, opts ...RequestOption) (*Response, error)

CreateDNSRecord calls POST /accounts/{id}/dns-records.

Add a record; answers the zone

func (*HostingService) CreateDatabase

func (s *HostingService) CreateDatabase(ctx context.Context, id int64, body any, opts ...RequestOption) (*Response, error)

CreateDatabase calls POST /accounts/{id}/databases.

Create a database

func (*HostingService) CreateDatabaseUser

func (s *HostingService) CreateDatabaseUser(ctx context.Context, id int64, body any, opts ...RequestOption) (*Response, error)

CreateDatabaseUser calls POST /accounts/{id}/database-users.

Create a user (panels with standalone_database_users)

func (*HostingService) CreateMailbox

func (s *HostingService) CreateMailbox(ctx context.Context, id int64, body any, opts ...RequestOption) (*Response, error)

CreateMailbox calls POST /accounts/{id}/email-accounts.

Add a mailbox; answers the list

func (*HostingService) DeleteDNSRecord

func (s *HostingService) DeleteDNSRecord(ctx context.Context, id int64, record string, opts ...RequestOption) (*Response, error)

DeleteDNSRecord calls DELETE /accounts/{id}/dns-records/{record}.

Delete a record; answers the zone

func (*HostingService) DeleteDatabase

func (s *HostingService) DeleteDatabase(ctx context.Context, id int64, name string, opts ...RequestOption) (*Response, error)

DeleteDatabase calls DELETE /accounts/{id}/databases/{name}.

Delete a database

func (*HostingService) DeleteDatabaseUser

func (s *HostingService) DeleteDatabaseUser(ctx context.Context, id int64, name string, opts ...RequestOption) (*Response, error)

DeleteDatabaseUser calls DELETE /accounts/{id}/database-users/{name}.

Delete a user

func (*HostingService) DeleteMailbox

func (s *HostingService) DeleteMailbox(ctx context.Context, id int64, localPart string, opts ...RequestOption) (*Response, error)

DeleteMailbox calls DELETE /accounts/{id}/email-accounts/{local_part}.

Delete a mailbox

func (*HostingService) DeleteSSHKey

func (s *HostingService) DeleteSSHKey(ctx context.Context, id int64, name string, opts ...RequestOption) (*Response, error)

DeleteSSHKey calls DELETE /accounts/{id}/ssh-keys/{name}.

Deauthorize and delete a key; answers the keys

func (*HostingService) FlushRedis

func (s *HostingService) FlushRedis(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

FlushRedis calls POST /accounts/{id}/redis/flush.

Delete every key

func (*HostingService) GetAccount

func (s *HostingService) GetAccount(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

GetAccount calls GET /accounts/{id}.

One hosting account

func (*HostingService) GetAction

func (s *HostingService) GetAction(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

GetAction calls GET /actions/{id}.

One operation; poll it until state is success or error

func (*HostingService) GetCloudLinux

func (s *HostingService) GetCloudLinux(ctx context.Context, id int64, params *HostingGetCloudLinuxParams, opts ...RequestOption) (*Response, error)

GetCloudLinux calls GET /accounts/{id}/cloudlinux.

CloudLinux on the account: CageFS, symlink protection, its resource limits and the PHP Selector's state

func (*HostingService) GetNameservers

func (s *HostingService) GetNameservers(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

GetNameservers calls GET /accounts/{id}/nameservers.

Where the domain must point

func (*HostingService) GetPhpSelector

func (s *HostingService) GetPhpSelector(ctx context.Context, id int64, params *HostingGetPhpSelectorParams, opts ...RequestOption) (*Response, error)

GetPhpSelector calls GET /accounts/{id}/php.

The PHP Selector: versions, extensions, options

func (*HostingService) GetRedis

func (s *HostingService) GetRedis(ctx context.Context, id int64, params *HostingGetRedisParams, opts ...RequestOption) (*Response, error)

GetRedis calls GET /accounts/{id}/redis.

The account's Redis add-on: state, tier, connection, memory, the tiers with their prices

func (*HostingService) GetRedisUsage

func (s *HostingService) GetRedisUsage(ctx context.Context, id int64, params *HostingGetRedisUsageParams, opts ...RequestOption) (*Response, error)

GetRedisUsage calls GET /accounts/{id}/redis/usage.

Redis memory readings over a period

func (*HostingService) GetResellerUsage

func (s *HostingService) GetResellerUsage(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

GetResellerUsage calls GET /accounts/{id}/reseller/usage.

A reseller's accounts, disk and bandwidth against its plan's totals, and whether it may oversell. Also needs hosting:view

func (*HostingService) GetResourceUsage

func (s *HostingService) GetResourceUsage(ctx context.Context, id int64, params *HostingGetResourceUsageParams, opts ...RequestOption) (*Response, error)

GetResourceUsage calls GET /accounts/{id}/resource-usage.

CPU, memory, processes and disk I/O over time, with how often a limit was hit

func (*HostingService) GetShell

func (s *HostingService) GetShell(ctx context.Context, id int64, params *HostingGetShellParams, opts ...RequestOption) (*Response, error)

GetShell calls GET /accounts/{id}/shell.

Shell access and what confines it

func (*HostingService) GetTraffic

func (s *HostingService) GetTraffic(ctx context.Context, id int64, params *HostingGetTrafficParams, opts ...RequestOption) (*Response, error)

GetTraffic calls GET /accounts/{id}/traffic.

Download traffic of the current period, against the plan's quota, with its overage and a daily breakdown

func (*HostingService) GetUsage

func (s *HostingService) GetUsage(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

GetUsage calls GET /accounts/{id}/usage.

Disk and bandwidth use

func (*HostingService) GrantDatabase

func (s *HostingService) GrantDatabase(ctx context.Context, id int64, name string, body any, opts ...RequestOption) (*Response, error)

GrantDatabase calls POST /accounts/{id}/databases/{name}/grant.

Give a user all privileges on the database

func (*HostingService) ListAccountActions

func (s *HostingService) ListAccountActions(ctx context.Context, id int64, params *HostingListAccountActionsParams, opts ...RequestOption) (*Response, error)

ListAccountActions calls GET /accounts/{id}/actions.

The account's operations

func (*HostingService) ListAccounts

func (s *HostingService) ListAccounts(ctx context.Context, opts ...RequestOption) (*Response, error)

ListAccounts calls GET /accounts.

Your hosting accounts

func (*HostingService) ListActions

func (s *HostingService) ListActions(ctx context.Context, params *HostingListActionsParams, opts ...RequestOption) (*Response, error)

ListActions calls GET /actions.

Your latest operations

func (*HostingService) ListAlerts

func (s *HostingService) ListAlerts(ctx context.Context, id int64, params *HostingListAlertsParams, opts ...RequestOption) (*Response, error)

ListAlerts calls GET /accounts/{id}/alerts.

The account's alerts, newest first (kept 90 days)

func (*HostingService) ListDNSRecords

func (s *HostingService) ListDNSRecords(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

ListDNSRecords calls GET /accounts/{id}/dns-records.

The domain's zone

func (*HostingService) ListDatabaseUsers

func (s *HostingService) ListDatabaseUsers(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

ListDatabaseUsers calls GET /accounts/{id}/database-users.

MySQL users

func (*HostingService) ListDatabases

func (s *HostingService) ListDatabases(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

ListDatabases calls GET /accounts/{id}/databases.

MySQL databases

func (*HostingService) ListDatacenters

func (s *HostingService) ListDatacenters(ctx context.Context, opts ...RequestOption) (*Response, error)

ListDatacenters calls GET /datacenters.

Datacenters of this region, with what their panels can do

func (*HostingService) ListMailboxes

func (s *HostingService) ListMailboxes(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

ListMailboxes calls GET /accounts/{id}/email-accounts.

Mailboxes on the domain

func (*HostingService) ListPlans

func (s *HostingService) ListPlans(ctx context.Context, params *HostingListPlansParams, opts ...RequestOption) (*Response, error)

ListPlans calls GET /plans.

Plans for sale

func (*HostingService) ListResellerAccounts

func (s *HostingService) ListResellerAccounts(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

ListResellerAccounts calls GET /accounts/{id}/reseller/accounts.

A reseller's customer accounts as its control panel lists them (its own not included), by username. Also needs hosting:view

func (*HostingService) ListResellerPackages

func (s *HostingService) ListResellerPackages(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

ListResellerPackages calls GET /accounts/{id}/reseller/packages.

The hosting packages a reseller defined on its control panel for its customers, by name, with how many of its accounts run each. Also needs hosting:view

func (*HostingService) ListSSHKeys

func (s *HostingService) ListSSHKeys(ctx context.Context, id int64, params *HostingListSSHKeysParams, opts ...RequestOption) (*Response, error)

ListSSHKeys calls GET /accounts/{id}/ssh-keys.

SSH public keys

func (*HostingService) Login

func (s *HostingService) Login(ctx context.Context, id int64, body any, opts ...RequestOption) (*Response, error)

Login calls POST /accounts/{id}/login.

A one-time login link into the control panel

func (*HostingService) ResellerChangeDomain

func (s *HostingService) ResellerChangeDomain(ctx context.Context, id int64, username string, body any, opts ...RequestOption) (*Response, error)

ResellerChangeDomain calls POST /accounts/{id}/reseller/accounts/{username}/domain.

Change the main domain of one of the reseller's customer accounts, at once. Its first change is free, each later one is charged to the reseller's account. Also needs hosting:view

func (*HostingService) ResellerCreateAccount

func (s *HostingService) ResellerCreateAccount(ctx context.Context, id int64, body any, opts ...RequestOption) (*Response, error)

ResellerCreateAccount calls POST /accounts/{id}/reseller/accounts.

Create a customer account owned by the reseller, on one of its packages, within its plan's limits (its account cap; unless the plan allows overselling, the disk and bandwidth its packages give out against its totals). Also needs hosting:view

func (*HostingService) ResellerLogin

func (s *HostingService) ResellerLogin(ctx context.Context, id int64, username string, body any, opts ...RequestOption) (*Response, error)

ResellerLogin calls POST /accounts/{id}/reseller/accounts/{username}/login.

A one-time login link into one of the reseller's customer accounts (open it in a new tab). Also needs hosting:view

func (*HostingService) ResellerResetAccount

func (s *HostingService) ResellerResetAccount(ctx context.Context, id int64, username string, body any, opts ...RequestOption) (*Response, error)

ResellerResetAccount calls POST /accounts/{id}/reseller/accounts/{username}/reset.

Wipe one of the reseller's customer accounts back to a fresh one: same username, domain and package, still the reseller's; files, mail, databases and DNS zone deleted. Also needs hosting:view

func (*HostingService) ResellerSetPackage

func (s *HostingService) ResellerSetPackage(ctx context.Context, id int64, username string, body any, opts ...RequestOption) (*Response, error)

ResellerSetPackage calls POST /accounts/{id}/reseller/accounts/{username}/package.

Move one of the reseller's customer accounts to another of its packages, within its plan's limits. Also needs hosting:view

func (*HostingService) ResellerSetPassword

func (s *HostingService) ResellerSetPassword(ctx context.Context, id int64, username string, body any, opts ...RequestOption) (*Response, error)

ResellerSetPassword calls POST /accounts/{id}/reseller/accounts/{username}/password.

Set the password of one of the reseller's customer accounts (control panel login, FTP, SSH). Also needs hosting:view

func (*HostingService) ResellerSuspend

func (s *HostingService) ResellerSuspend(ctx context.Context, id int64, username string, body any, opts ...RequestOption) (*Response, error)

ResellerSuspend calls POST /accounts/{id}/reseller/accounts/{username}/suspend.

Suspend one of the reseller's customer accounts (already suspended: nothing changes). Also needs hosting:view

func (*HostingService) ResellerTerminateAccount

func (s *HostingService) ResellerTerminateAccount(ctx context.Context, id int64, username string, body any, opts ...RequestOption) (*Response, error)

ResellerTerminateAccount calls DELETE /accounts/{id}/reseller/accounts/{username}.

Delete one of the reseller's customer accounts and its data. Also needs hosting:view

func (*HostingService) ResellerUnsuspend

func (s *HostingService) ResellerUnsuspend(ctx context.Context, id int64, username string, opts ...RequestOption) (*Response, error)

ResellerUnsuspend calls POST /accounts/{id}/reseller/accounts/{username}/unsuspend.

Lift the suspension of one of the reseller's customer accounts (not suspended: nothing changes); never one the server's quota guard holds. Also needs hosting:view

func (*HostingService) RestartRedis

func (s *HostingService) RestartRedis(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

RestartRedis calls POST /accounts/{id}/redis/restart.

Restart Redis (the cache is emptied)

func (*HostingService) RotateRedisPassword

func (s *HostingService) RotateRedisPassword(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

RotateRedisPassword calls POST /accounts/{id}/redis/password.

Give Redis a new random password (it restarts; the cache is emptied)

func (*HostingService) SetAccountPassword

func (s *HostingService) SetAccountPassword(ctx context.Context, id int64, body any, opts ...RequestOption) (*Response, error)

SetAccountPassword calls POST /accounts/{id}/password.

Change the account's own password (control panel login, FTP, SSH)

func (*HostingService) SetPhpExtensions

func (s *HostingService) SetPhpExtensions(ctx context.Context, id int64, body any, opts ...RequestOption) (*Response, error)

SetPhpExtensions calls PUT /accounts/{id}/php/extensions.

Turn extensions of a version on or off; answers the selector

func (*HostingService) SetPhpOptions

func (s *HostingService) SetPhpOptions(ctx context.Context, id int64, body any, opts ...RequestOption) (*Response, error)

SetPhpOptions calls PUT /accounts/{id}/php/options.

Set php.ini options of a version; answers the selector

func (*HostingService) SetPhpVersion

func (s *HostingService) SetPhpVersion(ctx context.Context, id int64, body any, opts ...RequestOption) (*Response, error)

SetPhpVersion calls PUT /accounts/{id}/php/version.

Select the PHP version; answers the selector

func (*HostingService) SetRedis

func (s *HostingService) SetRedis(ctx context.Context, id int64, body any, opts ...RequestOption) (*Response, error)

SetRedis calls PUT /accounts/{id}/redis.

Turn Redis on at a tier, move it to another tier, or turn it off (tier null). A tier above the one this term is paid for is charged for the rest of the term; a smaller tier or off refunds nothing

func (*HostingService) SetShell

func (s *HostingService) SetShell(ctx context.Context, id int64, body any, opts ...RequestOption) (*Response, error)

SetShell calls PUT /accounts/{id}/shell.

Turn shell access on or off. On is only ever confined: CageFS (the account is caged first) or the panel's jail

func (*HostingService) SetTrafficSettings

func (s *HostingService) SetTrafficSettings(ctx context.Context, id int64, body any, opts ...RequestOption) (*Response, error)

SetTrafficSettings calls PUT /accounts/{id}/traffic/settings.

Turn overage billing on or off. On lifts a block at once; off blocks the sites at once when the quota is already exhausted, and charges what was used above it while it was on

func (*HostingService) TerminateAccount

func (s *HostingService) TerminateAccount(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

TerminateAccount calls DELETE /accounts/{id}.

Terminate the account and delete its data (a reseller: with every account it created; also needs hosting:reseller:manage). Nothing already charged is refunded or prorated: the rest of the paid term is forfeited

func (*HostingService) UpdateAccount

func (s *HostingService) UpdateAccount(ctx context.Context, id int64, body any, opts ...RequestOption) (*Response, error)

UpdateAccount calls PATCH /accounts/{id}.

Turn auto-renew on or off

func (*HostingService) UpdateDNSRecord

func (s *HostingService) UpdateDNSRecord(ctx context.Context, id int64, record string, body any, opts ...RequestOption) (*Response, error)

UpdateDNSRecord calls PUT /accounts/{id}/dns-records/{record}.

Change a record; answers the zone

func (*HostingService) UpdateDatabaseUser

func (s *HostingService) UpdateDatabaseUser(ctx context.Context, id int64, name string, body any, opts ...RequestOption) (*Response, error)

UpdateDatabaseUser calls PUT /accounts/{id}/database-users/{name}.

Set a user's password

func (*HostingService) UpdateMailbox

func (s *HostingService) UpdateMailbox(ctx context.Context, id int64, localPart string, body any, opts ...RequestOption) (*Response, error)

UpdateMailbox calls PUT /accounts/{id}/email-accounts/{local_part}.

Change a mailbox's password and/or quota; answers the list

func (*HostingService) WithRegion

func (s *HostingService) WithRegion(region string) *HostingService

WithRegion returns a copy of the service whose requests go to region (sent as the Arianet-Region header). An empty region means the default.

type Option

type Option func(*Client)

Option configures a Client.

func WithBaseURL

func WithBaseURL(u string) Option

WithBaseURL sets the API root (default https://api.ariaservice.net, or $ARIANET_API_URL). It must be https, except for localhost.

func WithHTTPClient

func WithHTTPClient(hc *http.Client) Option

WithHTTPClient replaces the underlying *http.Client. Its redirect policy is replaced so the token never follows a redirect to another host.

func WithMaxRetries

func WithMaxRetries(n int) Option

WithMaxRetries sets how many times a request is repeated after a 429, or after a network error or 502/503/504 when the request is safe to repeat. Default 3.

func WithMaxRetryWait

func WithMaxRetryWait(d time.Duration) Option

WithMaxRetryWait bounds how long the client waits before one retry. A 429 whose Retry-After is longer is returned as an error instead. Default 60s.

func WithUserAgent

func WithUserAgent(ua string) Option

WithUserAgent appends a product token to the User-Agent header.

type RegionalVPSGetTrafficParams

type RegionalVPSGetTrafficParams struct {
	From        *string
	To          *string
	Granularity *string
}

RegionalVPSGetTrafficParams holds the query parameters of RegionalVPSService.GetTraffic.

type RegionalVPSListActionsParams

type RegionalVPSListActionsParams struct {
	Limit *int64
}

RegionalVPSListActionsParams holds the query parameters of RegionalVPSService.ListActions.

type RegionalVPSListImagesParams

type RegionalVPSListImagesParams struct {
	// Only what can be ordered in this datacenter.
	Datacenter *string
}

RegionalVPSListImagesParams holds the query parameters of RegionalVPSService.ListImages.

type RegionalVPSListPlansParams

type RegionalVPSListPlansParams struct {
	// Only what can be ordered in this datacenter.
	Datacenter *string
}

RegionalVPSListPlansParams holds the query parameters of RegionalVPSService.ListPlans.

type RegionalVPSListServerActionsParams

type RegionalVPSListServerActionsParams struct {
	Limit *int64
}

RegionalVPSListServerActionsParams holds the query parameters of RegionalVPSService.ListServerActions.

type RegionalVPSService

type RegionalVPSService struct {
	// contains filtered or unexported fields
}

RegionalVPSService calls the Regional VPS API (`/vps/v1`).

func (*RegionalVPSService) CreateServer

func (s *RegionalVPSService) CreateServer(ctx context.Context, body any, opts ...RequestOption) (*Response, error)

CreateServer calls POST /servers.

Order a server

The request carries an Idempotency-Key (generated when none is given with WithIdempotencyKey), so it is retried safely after a network error or a 5xx.

func (*RegionalVPSService) GetAction

func (s *RegionalVPSService) GetAction(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

GetAction calls GET /actions/{id}.

One operation; poll it until state is success or error

func (*RegionalVPSService) GetConsole

func (s *RegionalVPSService) GetConsole(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

GetConsole calls POST /servers/{id}/console.

A one-time browser console URL (VNC). Open it at once: it expires in expires_in seconds and works once; never store it

func (*RegionalVPSService) GetServer

func (s *RegionalVPSService) GetServer(ctx context.Context, id int64, opts ...RequestOption) (*Response, error)

GetServer calls GET /servers/{id}.

One server, with what its hypervisor can do

func (*RegionalVPSService) GetTraffic

func (s *RegionalVPSService) GetTraffic(ctx context.Context, id int64, params *RegionalVPSGetTrafficParams, opts ...RequestOption) (*Response, error)

GetTraffic calls GET /servers/{id}/traffic.

Network traffic over a window (default: the current traffic period by day) and the quota of the current period

func (*RegionalVPSService) ListActions

ListActions calls GET /actions.

Your latest operations

func (*RegionalVPSService) ListDatacenters

func (s *RegionalVPSService) ListDatacenters(ctx context.Context, opts ...RequestOption) (*Response, error)

ListDatacenters calls GET /datacenters.

Datacenters of this region, with what their hosts can do

func (*RegionalVPSService) ListImages

ListImages calls GET /images.

Operating system images

func (*RegionalVPSService) ListPlans

ListPlans calls GET /plans.

Plans for sale

func (*RegionalVPSService) ListServerActions

func (s *RegionalVPSService) ListServerActions(ctx context.Context, id int64, params *RegionalVPSListServerActionsParams, opts ...RequestOption) (*Response, error)

ListServerActions calls GET /servers/{id}/actions.

The server's operations

func (*RegionalVPSService) ListServers

func (s *RegionalVPSService) ListServers(ctx context.Context, opts ...RequestOption) (*Response, error)

ListServers calls GET /servers.

Your servers

func (*RegionalVPSService) ReinstallServer

func (s *RegionalVPSService) ReinstallServer(ctx context.Context, id int64, body any, opts ...RequestOption) (*Response, error)

ReinstallServer calls POST /servers/{id}/reinstall.

Reinstall from an image: the disk is wiped. Without a password one is generated and returned once in this answer

func (*RegionalVPSService) ResetServerPassword

func (s *RegionalVPSService) ResetServerPassword(ctx context.Context, id int64, body any, opts ...RequestOption) (*Response, error)

ResetServerPassword calls POST /servers/{id}/reset-password.

Set the root password. Without one it is generated and returned once in this answer

func (*RegionalVPSService) ResizeServer

func (s *RegionalVPSService) ResizeServer(ctx context.Context, id int64, body any, opts ...RequestOption) (*Response, error)

ResizeServer calls POST /servers/{id}/resize.

Move to another plan of the server's host. Disks only grow. The new plan is billed from the moment the host finished

func (*RegionalVPSService) ServerOperation

func (s *RegionalVPSService) ServerOperation(ctx context.Context, id int64, op string, opts ...RequestOption) (*Response, error)

ServerOperation calls POST /servers/{id}/actions/{op}.

start, stop (graceful), restart or kill (hard power-off)

func (*RegionalVPSService) SetTrafficSettings

func (s *RegionalVPSService) SetTrafficSettings(ctx context.Context, id int64, body any, opts ...RequestOption) (*Response, error)

SetTrafficSettings calls PUT /servers/{id}/traffic-settings.

The traffic overage switch. Off: overage is never billed and the network is cut once the period's quota is used up, until the next period

func (*RegionalVPSService) TerminateServer

func (s *RegionalVPSService) TerminateServer(ctx context.Context, id int64, body any, opts ...RequestOption) (*Response, error)

TerminateServer calls DELETE /servers/{id}.

Delete the server and its disk. What it cost so far is settled by accounting

func (*RegionalVPSService) WithRegion

func (s *RegionalVPSService) WithRegion(region string) *RegionalVPSService

WithRegion returns a copy of the service whose requests go to region (sent as the Arianet-Region header). An empty region means the default.

type RequestOption

type RequestOption func(*requestConfig)

RequestOption adjusts one request.

func WithHeader

func WithHeader(name, value string) RequestOption

WithHeader adds a header to one request.

func WithIdempotencyKey

func WithIdempotencyKey(key string) RequestOption

WithIdempotencyKey sets the Idempotency-Key header. Requests with a key are also retried after a network error or a 5xx, since the API answers a repeat with the original result.

func WithRegion

func WithRegion(region string) RequestOption

WithRegion sends the request to one regional install of a product API.

type Response

type Response struct {
	StatusCode int
	Header     http.Header
	Body       []byte
}

Response is a successful API answer.

func (*Response) Decode

func (r *Response) Decode(v any) error

Decode unmarshals the JSON body into v.

func (*Response) DecodeData

func (r *Response) DecodeData(v any) error

DecodeData unmarshals the "data" member of the body into v. Core API answers wrap their payload as {"success": true, "data": ...}, and most product API lists use {"data": [...], "meta": ...}.

type SMSGetReportSummaryParams

type SMSGetReportSummaryParams struct {
	From *string
	To   *string
}

SMSGetReportSummaryParams holds the query parameters of SMSService.GetReportSummary.

type SMSListBatchesParams

type SMSListBatchesParams struct {
	Page    *int64
	PerPage *int64
	Status  *string
}

SMSListBatchesParams holds the query parameters of SMSService.ListBatches.

type SMSListBlockedRecipientsParams

type SMSListBlockedRecipientsParams struct {
	Page    *int64
	PerPage *int64
	Phone   *string
}

SMSListBlockedRecipientsParams holds the query parameters of SMSService.ListBlockedRecipients.

type SMSListInboundParams

type SMSListInboundParams struct {
	Page    *int64
	PerPage *int64
}

SMSListInboundParams holds the query parameters of SMSService.ListInbound.

type SMSListLinesParams

type SMSListLinesParams struct {
	Page    *int64
	PerPage *int64
}

SMSListLinesParams holds the query parameters of SMSService.ListLines.

type SMSListMessagesParams

type SMSListMessagesParams struct {
	Page    *int64
	PerPage *int64
	BatchID *string
	Status  *string
	To      *string
}

SMSListMessagesParams holds the query parameters of SMSService.ListMessages.

type SMSListScheduledParams

type SMSListScheduledParams struct {
	Page    *int64
	PerPage *int64
}

SMSListScheduledParams holds the query parameters of SMSService.ListScheduled.

type SMSListTemplatesParams

type SMSListTemplatesParams struct {
	Page    *int64
	PerPage *int64
}

SMSListTemplatesParams holds the query parameters of SMSService.ListTemplates.

type SMSService

type SMSService struct {
	// contains filtered or unexported fields
}

SMSService calls the SMS API (`/sms/v1`).

func (*SMSService) BlockRecipient

func (s *SMSService) BlockRecipient(ctx context.Context, body any, opts ...RequestOption) (*Response, error)

BlockRecipient calls POST /blocked-recipients.

Block a recipient

func (*SMSService) CancelScheduled

func (s *SMSService) CancelScheduled(ctx context.Context, scheduled string, opts ...RequestOption) (*Response, error)

CancelScheduled calls DELETE /scheduled/{scheduled}.

Cancel a pending scheduled send

func (*SMSService) CreateTemplate

func (s *SMSService) CreateTemplate(ctx context.Context, body any, opts ...RequestOption) (*Response, error)

CreateTemplate calls POST /templates.

Create a template

func (*SMSService) DeleteTemplate

func (s *SMSService) DeleteTemplate(ctx context.Context, template string, opts ...RequestOption) (*Response, error)

DeleteTemplate calls DELETE /templates/{template}.

Delete a template

func (*SMSService) GetBatch

func (s *SMSService) GetBatch(ctx context.Context, batch string, opts ...RequestOption) (*Response, error)

GetBatch calls GET /batches/{batch}.

Show a batch

func (*SMSService) GetMessage

func (s *SMSService) GetMessage(ctx context.Context, message string, opts ...RequestOption) (*Response, error)

GetMessage calls GET /messages/{message}.

Show a message

func (*SMSService) GetPrices

func (s *SMSService) GetPrices(ctx context.Context, opts ...RequestOption) (*Response, error)

GetPrices calls GET /prices.

Per-message price of the caller's pricing profile

func (*SMSService) GetReportSummary

func (s *SMSService) GetReportSummary(ctx context.Context, params *SMSGetReportSummaryParams, opts ...RequestOption) (*Response, error)

GetReportSummary calls GET /reports/summary.

Delivery and spend summary

func (*SMSService) GetTemplate

func (s *SMSService) GetTemplate(ctx context.Context, template string, opts ...RequestOption) (*Response, error)

GetTemplate calls GET /templates/{template}.

Show a template

func (*SMSService) GetWebhook

func (s *SMSService) GetWebhook(ctx context.Context, opts ...RequestOption) (*Response, error)

GetWebhook calls GET /webhook.

Show the webhook settings

func (*SMSService) ListBatches

func (s *SMSService) ListBatches(ctx context.Context, params *SMSListBatchesParams, opts ...RequestOption) (*Response, error)

ListBatches calls GET /batches.

List batches

func (*SMSService) ListBlockedRecipients

func (s *SMSService) ListBlockedRecipients(ctx context.Context, params *SMSListBlockedRecipientsParams, opts ...RequestOption) (*Response, error)

ListBlockedRecipients calls GET /blocked-recipients.

List blocked recipients

func (*SMSService) ListInbound

func (s *SMSService) ListInbound(ctx context.Context, params *SMSListInboundParams, opts ...RequestOption) (*Response, error)

ListInbound calls GET /inbound.

List inbound messages on the account's dedicated lines

func (*SMSService) ListLines

func (s *SMSService) ListLines(ctx context.Context, params *SMSListLinesParams, opts ...RequestOption) (*Response, error)

ListLines calls GET /lines.

List the sender lines the account may send from

func (*SMSService) ListMessages

func (s *SMSService) ListMessages(ctx context.Context, params *SMSListMessagesParams, opts ...RequestOption) (*Response, error)

ListMessages calls GET /messages.

List messages

func (*SMSService) ListScheduled

func (s *SMSService) ListScheduled(ctx context.Context, params *SMSListScheduledParams, opts ...RequestOption) (*Response, error)

ListScheduled calls GET /scheduled.

List scheduled sends

func (*SMSService) ListTemplates

func (s *SMSService) ListTemplates(ctx context.Context, params *SMSListTemplatesParams, opts ...RequestOption) (*Response, error)

ListTemplates calls GET /templates.

List templates

func (*SMSService) RequestLine

func (s *SMSService) RequestLine(ctx context.Context, body any, opts ...RequestOption) (*Response, error)

RequestLine calls POST /lines.

Request a dedicated line

func (*SMSService) RotateWebhookSecret

func (s *SMSService) RotateWebhookSecret(ctx context.Context, opts ...RequestOption) (*Response, error)

RotateWebhookSecret calls POST /webhook/secret.

Rotate the webhook signing secret

func (*SMSService) SendMessage

func (s *SMSService) SendMessage(ctx context.Context, body any, opts ...RequestOption) (*Response, error)

SendMessage calls POST /messages.

Send a message to one or more recipients (or schedule it)

func (*SMSService) SetWebhook

func (s *SMSService) SetWebhook(ctx context.Context, body any, opts ...RequestOption) (*Response, error)

SetWebhook calls PUT /webhook.

Set the webhook URL, enabled flag and subscribed events

func (*SMSService) UnblockRecipient

func (s *SMSService) UnblockRecipient(ctx context.Context, blockedRecipient string, opts ...RequestOption) (*Response, error)

UnblockRecipient calls DELETE /blocked-recipients/{blockedRecipient}.

Unblock a recipient

func (*SMSService) UpdateTemplate

func (s *SMSService) UpdateTemplate(ctx context.Context, template string, body any, opts ...RequestOption) (*Response, error)

UpdateTemplate calls PUT /templates/{template}.

Update a template

func (*SMSService) WithRegion

func (s *SMSService) WithRegion(region string) *SMSService

WithRegion returns a copy of the service whose requests go to region (sent as the Arianet-Region header). An empty region means the default.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL