Documentation
¶
Index ¶
- Constants
- type AssignIPAddressRequest
- type AttachNetworkRouterRequest
- type AttachStorageRequest
- type CancelManagedDatabaseConnection
- type CloneManagedDatabaseRequest
- type CloneStorageRequest
- type CreateBackupRequest
- type CreateFirewallRuleRequest
- type CreateFirewallRulesRequest
- type CreateManagedDatabaseLogicalDatabaseRequest
- type CreateManagedDatabaseRequest
- type CreateManagedDatabaseUserRequest
- type CreateNetworkInterfaceIPAddress
- type CreateNetworkInterfaceIPAddressSlice
- type CreateNetworkInterfaceRequest
- type CreateNetworkRequest
- type CreateObjectStorageRequest
- type CreateRouterRequest
- type CreateServerIPAddress
- type CreateServerIPAddressSlice
- type CreateServerInterface
- type CreateServerInterfaceSlice
- type CreateServerNetworking
- type CreateServerRequest
- type CreateServerStorageDevice
- type CreateServerStorageDeviceSlice
- type CreateStorageImportRequest
- type CreateStorageRequest
- type CreateSubaccount
- type CreateSubaccountRequest
- type CreateTagRequest
- type DeleteFirewallRuleRequest
- type DeleteManagedDatabaseLogicalDatabaseRequest
- type DeleteManagedDatabaseRequest
- type DeleteManagedDatabaseUserRequest
- type DeleteNetworkInterfaceRequest
- type DeleteNetworkRequest
- type DeleteObjectStorageRequest
- type DeleteRouterRequest
- type DeleteServerAndStoragesRequest
- type DeleteServerRequest
- type DeleteStorageRequest
- type DeleteSubaccountRequest
- type DeleteTagRequest
- type DetachNetworkRouterRequest
- type DetachStorageRequest
- type EjectCDROMRequest
- type FirewallRuleSlice
- type GetAccountDetailsRequest
- type GetFirewallRuleDetailsRequest
- type GetFirewallRulesRequest
- type GetHostDetailsRequest
- type GetIPAddressDetailsRequest
- type GetManagedDatabaseConnectionsRequest
- type GetManagedDatabaseLogicalDatabasesRequest
- type GetManagedDatabaseLogsRequest
- type GetManagedDatabaseMetricsRequest
- type GetManagedDatabaseQueryStatisticsRequest
- type GetManagedDatabaseRequest
- type GetManagedDatabaseUserRequest
- type GetManagedDatabaseUsersRequest
- type GetManagedDatabasesRequest
- type GetNetworkDetailsRequest
- type GetNetworksInZoneRequest
- type GetObjectStorageDetailsRequest
- type GetRouterDetailsRequest
- type GetServerDetailsRequest
- type GetServerNetworksRequest
- type GetStorageDetailsRequest
- type GetStorageImportDetailsRequest
- type GetStoragesRequest
- type ImportSourceLocation
- type LoadCDROMRequest
- type LoginUser
- type ManagedDatabaseMaintenanceTimeRequest
- type ManagedDatabasePropertiesRequest
- func (m *ManagedDatabasePropertiesRequest) Get(name upcloud.ManagedDatabasePropertyKey) interface{}
- func (m *ManagedDatabasePropertiesRequest) GetAutoUtilityIPFilter() bool
- func (m *ManagedDatabasePropertiesRequest) GetBool(name upcloud.ManagedDatabasePropertyKey) (bool, error)
- func (m *ManagedDatabasePropertiesRequest) GetIPFilter() []string
- func (m *ManagedDatabasePropertiesRequest) GetInt(name upcloud.ManagedDatabasePropertyKey) (int, error)
- func (m *ManagedDatabasePropertiesRequest) GetPublicAccess() bool
- func (m *ManagedDatabasePropertiesRequest) GetString(name upcloud.ManagedDatabasePropertyKey) (string, error)
- func (m *ManagedDatabasePropertiesRequest) GetStringSlice(name upcloud.ManagedDatabasePropertyKey) ([]string, error)
- func (m *ManagedDatabasePropertiesRequest) Set(name upcloud.ManagedDatabasePropertyKey, value interface{}) *ManagedDatabasePropertiesRequest
- func (m *ManagedDatabasePropertiesRequest) SetAutoUtilityIPFilter(enabled bool) *ManagedDatabasePropertiesRequest
- func (m *ManagedDatabasePropertiesRequest) SetBool(name upcloud.ManagedDatabasePropertyKey, value bool) *ManagedDatabasePropertiesRequest
- func (m *ManagedDatabasePropertiesRequest) SetIPFilter(addressOrNetworkWithCIDRMask ...string) *ManagedDatabasePropertiesRequest
- func (m *ManagedDatabasePropertiesRequest) SetInt(name upcloud.ManagedDatabasePropertyKey, value int) *ManagedDatabasePropertiesRequest
- func (m *ManagedDatabasePropertiesRequest) SetPublicAccess(enabled bool) *ManagedDatabasePropertiesRequest
- func (m *ManagedDatabasePropertiesRequest) SetString(name upcloud.ManagedDatabasePropertyKey, value string) *ManagedDatabasePropertiesRequest
- func (m *ManagedDatabasePropertiesRequest) SetStringSlice(name upcloud.ManagedDatabasePropertyKey, value []string) *ManagedDatabasePropertiesRequest
- type ModifyHostRequest
- type ModifyIPAddressRequest
- type ModifyManagedDatabaseRequest
- type ModifyManagedDatabaseUserRequest
- type ModifyNetworkInterfaceRequest
- type ModifyNetworkRequest
- type ModifyObjectStorageRequest
- type ModifyRouterRequest
- type ModifyServerRequest
- type ModifyStorageRequest
- type ModifySubaccount
- type ModifySubaccountRequest
- type ModifyTagRequest
- type ReleaseIPAddressRequest
- type Request
- type RestartServerRequest
- type RestoreBackupRequest
- type SSHKeySlice
- type ShutdownManagedDatabaseRequest
- type StartManagedDatabaseRequest
- type StartServerRequest
- type StopServerRequest
- type TagServerRequest
- type TemplatizeStorageRequest
- type UntagServerRequest
- type WaitForManagedDatabaseStateRequest
- type WaitForServerStateRequest
- type WaitForStorageImportCompletionRequest
- type WaitForStorageStateRequest
Constants ¶
const ( PasswordDeliveryNone = "none" PasswordDeliveryEmail = "email" PasswordDeliverySMS = "sms" ServerStopTypeSoft = "soft" ServerStopTypeHard = "hard" RestartTimeoutActionDestroy = "destroy" RestartTimeoutActionIgnore = "ignore" CreateServerStorageDeviceActionCreate = "create" CreateServerStorageDeviceActionClone = "clone" CreateServerStorageDeviceActionAttach = "attach" )
Constants
const ( StorageImportSourceDirectUpload = "direct_upload" StorageImportSourceHTTPImport = "http_import" )
Constants
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AssignIPAddressRequest ¶
type AssignIPAddressRequest struct { Access string `json:"access,omitempty"` Family string `json:"family,omitempty"` ServerUUID string `json:"server,omitempty"` Floating upcloud.Boolean `json:"floating,omitempty"` MAC string `json:"mac,omitempty"` Zone string `json:"zone,omitempty"` }
AssignIPAddressRequest represents a request to assign a new IP address to a server
func (AssignIPAddressRequest) MarshalJSON ¶
func (r AssignIPAddressRequest) MarshalJSON() ([]byte, error)
MarshalJSON is a custom marshaller that deals with deeply embedded values.
func (*AssignIPAddressRequest) RequestURL ¶
func (r *AssignIPAddressRequest) RequestURL() string
RequestURL implements the Request interface
type AttachNetworkRouterRequest ¶
type AttachNetworkRouterRequest struct { NetworkUUID string `json:"-"` RouterUUID string `json:"router"` }
AttachNetworkRouterRequest represents a request to attach a particular router to a network
func (AttachNetworkRouterRequest) MarshalJSON ¶
func (r AttachNetworkRouterRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface
func (*AttachNetworkRouterRequest) RequestURL ¶
func (r *AttachNetworkRouterRequest) RequestURL() string
RequestURL implements the Request interface
type AttachStorageRequest ¶
type AttachStorageRequest struct { ServerUUID string `json:"-"` Type string `json:"type,omitempty"` Address string `json:"address,omitempty"` StorageUUID string `json:"storage,omitempty"` BootDisk int `json:"boot_disk,omitempty,string"` }
AttachStorageRequest represents a request to attach a storage device to a server
func (AttachStorageRequest) MarshalJSON ¶
func (r AttachStorageRequest) MarshalJSON() ([]byte, error)
MarshalJSON is a custom marshaller that deals with deeply embedded values.
func (*AttachStorageRequest) RequestURL ¶
func (r *AttachStorageRequest) RequestURL() string
RequestURL implements the Request interface
type CancelManagedDatabaseConnection ¶
type CancelManagedDatabaseConnection struct { // UUID selects a managed database instance to manage queries of UUID string // Pid selects a connection pid to cancel or terminate Pid int // Terminate selects whether the connection will be forcefully terminated Terminate bool }
CancelManagedDatabaseConnection represents a request to cancel the current query of a connection or terminate the entire connection.
func (*CancelManagedDatabaseConnection) RequestURL ¶
func (c *CancelManagedDatabaseConnection) RequestURL() string
RequestURL implements the request.Request interface
type CloneManagedDatabaseRequest ¶
type CloneManagedDatabaseRequest struct { // UUID selects an existing managed database instance to clone UUID string `json:"-"` // CloneTime selects a point-in-time from where to clone the data. Zero value selects the most recent available. CloneTime time.Time `json:"clone_time"` HostNamePrefix string `json:"hostname_prefix"` Maintenance ManagedDatabaseMaintenanceTimeRequest `json:"maintenance,omitempty"` Plan string `json:"plan"` Properties ManagedDatabasePropertiesRequest `json:"properties,omitempty"` Title string `json:"title,omitempty"` Type upcloud.ManagedDatabaseServiceType `json:"type"` Zone string `json:"zone"` }
CloneManagedDatabaseRequest represents a request to cancel
func (CloneManagedDatabaseRequest) MarshalJSON ¶
func (c CloneManagedDatabaseRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler
func (*CloneManagedDatabaseRequest) RequestURL ¶
func (c *CloneManagedDatabaseRequest) RequestURL() string
RequestURL implements the request.Request interface
type CloneStorageRequest ¶
type CloneStorageRequest struct { UUID string `json:"-"` Zone string `json:"zone"` Tier string `json:"tier,omitempty"` Title string `json:"title"` }
CloneStorageRequest represents a requests to clone a storage device
func (CloneStorageRequest) MarshalJSON ¶
func (r CloneStorageRequest) MarshalJSON() ([]byte, error)
MarshalJSON is a custom marshaller that deals with deeply embedded values.
func (*CloneStorageRequest) RequestURL ¶
func (r *CloneStorageRequest) RequestURL() string
RequestURL implements the Request interface
type CreateBackupRequest ¶
CreateBackupRequest represents a request to create a backup of a storage device
func (CreateBackupRequest) MarshalJSON ¶
func (r CreateBackupRequest) MarshalJSON() ([]byte, error)
MarshalJSON is a custom marshaller that deals with deeply embedded values.
func (*CreateBackupRequest) RequestURL ¶
func (r *CreateBackupRequest) RequestURL() string
RequestURL implements the Request interface
type CreateFirewallRuleRequest ¶
type CreateFirewallRuleRequest struct { upcloud.FirewallRule ServerUUID string `json:"-"` }
CreateFirewallRuleRequest represents a request to create a new firewall rule for a specific server
func (CreateFirewallRuleRequest) MarshalJSON ¶
func (r CreateFirewallRuleRequest) MarshalJSON() ([]byte, error)
MarshalJSON is a custom marshaller that deals with deeply embedded values.
func (*CreateFirewallRuleRequest) RequestURL ¶
func (r *CreateFirewallRuleRequest) RequestURL() string
RequestURL implements the Request interface
type CreateFirewallRulesRequest ¶
type CreateFirewallRulesRequest struct { ServerUUID string `json:"-"` FirewallRules FirewallRuleSlice `json:"firewall_rules"` }
CreateFirewallRulesRequest represents a request to create (and replace) the entire firewall rule set.
func (*CreateFirewallRulesRequest) RequestURL ¶
func (r *CreateFirewallRulesRequest) RequestURL() string
RequestURL implements the Request interface
type CreateManagedDatabaseLogicalDatabaseRequest ¶
type CreateManagedDatabaseLogicalDatabaseRequest struct { // ServiceUUID selects a managed database service to modify ServiceUUID string `json:"-"` Name string `json:"name"` // LCCollate represents a default string sort order of a logical database LCCollate string `json:"lc_collate"` // LCCType represents a default character classification of a logical database LCCType string `json:"lc_ctype"` }
CreateManagedDatabaseLogicalDatabaseRequest represents a request to create a new logical database to an existing managed database instance
func (*CreateManagedDatabaseLogicalDatabaseRequest) RequestURL ¶
func (c *CreateManagedDatabaseLogicalDatabaseRequest) RequestURL() string
RequestURL implements the request.Request interface
type CreateManagedDatabaseRequest ¶
type CreateManagedDatabaseRequest struct { HostNamePrefix string `json:"hostname_prefix"` Maintenance ManagedDatabaseMaintenanceTimeRequest `json:"maintenance,omitempty"` Plan string `json:"plan"` Properties ManagedDatabasePropertiesRequest `json:"properties,omitempty"` Title string `json:"title,omitempty"` Type upcloud.ManagedDatabaseServiceType `json:"type"` Zone string `json:"zone"` }
CreateManagedDatabaseRequest represents a request to create a new managed database instance
func (CreateManagedDatabaseRequest) MarshalJSON ¶
func (c CreateManagedDatabaseRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler
func (*CreateManagedDatabaseRequest) RequestURL ¶
func (c *CreateManagedDatabaseRequest) RequestURL() string
RequestURL implements the request.Request interface
type CreateManagedDatabaseUserRequest ¶
type CreateManagedDatabaseUserRequest struct { // ServiceUUID selects a managed database service to modify ServiceUUID string `json:"-"` Username string `json:"username"` Password string `json:"password,omitempty"` // Authentication selects authentication type for the user. See following constants for more information: // upcloud.ManagedDatabaseUserAuthenticationCachingSHA2Password // upcloud.ManagedDatabaseUserAuthenticationMySQLNativePassword Authentication upcloud.ManagedDatabaseUserAuthenticationType `json:"authentication,omitempty"` }
CreateManagedDatabaseUserRequest represents a request to create a new normal user to an existing managed database instance
func (*CreateManagedDatabaseUserRequest) RequestURL ¶
func (m *CreateManagedDatabaseUserRequest) RequestURL() string
RequestURL implements the request.Request interface
type CreateNetworkInterfaceIPAddress ¶
type CreateNetworkInterfaceIPAddress struct { Family string `json:"family"` Address string `json:"address,omitempty"` }
CreateNetworkInterfaceIPAddress represents an IP Address object that is needed to create a network interface.
type CreateNetworkInterfaceIPAddressSlice ¶
type CreateNetworkInterfaceIPAddressSlice []CreateNetworkInterfaceIPAddress
CreateNetworkInterfaceIPAddressSlice is a slice of CreateNetworkInterfaceIPAddress. It exists to allow for a custom JSON marshaller.
func (CreateNetworkInterfaceIPAddressSlice) MarshalJSON ¶
func (s CreateNetworkInterfaceIPAddressSlice) MarshalJSON() ([]byte, error)
MarshalJSON is a custom marshaller that deals with deeply embedded values.
type CreateNetworkInterfaceRequest ¶
type CreateNetworkInterfaceRequest struct { ServerUUID string `json:"-"` Type string `json:"type"` NetworkUUID string `json:"network,omitempty"` Index int `json:"index,omitempty"` IPAddresses CreateNetworkInterfaceIPAddressSlice `json:"ip_addresses"` SourceIPFiltering upcloud.Boolean `json:"source_ip_filtering,omitempty"` Bootable upcloud.Boolean `json:"bootable,omitempty"` }
CreateNetworkInterfaceRequest represents a request to create a new network interface on a server.
func (CreateNetworkInterfaceRequest) MarshalJSON ¶
func (r CreateNetworkInterfaceRequest) MarshalJSON() ([]byte, error)
MarshalJSON is a custom marshaller that deals with deeply embedded values.
func (*CreateNetworkInterfaceRequest) RequestURL ¶
func (r *CreateNetworkInterfaceRequest) RequestURL() string
RequestURL implements the Request interface.
type CreateNetworkRequest ¶
type CreateNetworkRequest struct { Name string `json:"name,omitempty"` Zone string `json:"zone,omitempty"` Router string `json:"router,omitempty"` IPNetworks upcloud.IPNetworkSlice `json:"ip_networks,omitempty"` }
CreateNetworkRequest represents a request to create a new network.
func (CreateNetworkRequest) MarshalJSON ¶
func (r CreateNetworkRequest) MarshalJSON() ([]byte, error)
MarshalJSON is a custom marshaller that deals with deeply embedded values.
func (*CreateNetworkRequest) RequestURL ¶
func (r *CreateNetworkRequest) RequestURL() string
RequestURL implements the Request interface.
type CreateObjectStorageRequest ¶
type CreateObjectStorageRequest struct { Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` Zone string `json:"zone"` AccessKey string `json:"access_key"` SecretKey string `json:"secret_key"` Size int `json:"size"` }
CreateObjectStorageRequest represents a request for creating a new Object Storage device
func (CreateObjectStorageRequest) MarshalJSON ¶
func (r CreateObjectStorageRequest) MarshalJSON() ([]byte, error)
MarshalJSON is a custom marshaller that deals with deeply embedded values.
func (*CreateObjectStorageRequest) RequestURL ¶
func (r *CreateObjectStorageRequest) RequestURL() string
RequestURL implements the Request interface
type CreateRouterRequest ¶
type CreateRouterRequest struct {
Name string `json:"name"`
}
CreateRouterRequest represents a request to create a new router.
func (CreateRouterRequest) MarshalJSON ¶
func (r CreateRouterRequest) MarshalJSON() ([]byte, error)
MarshalJSON is a custom marshaller that deals with deeply embedded values.
func (*CreateRouterRequest) RequestURL ¶
func (r *CreateRouterRequest) RequestURL() string
RequestURL implements the Request interface.
type CreateServerIPAddress ¶
type CreateServerIPAddress struct { Family string `json:"family"` Address string `json:"address,omitempty"` }
CreateServerIPAddress represents an IP address for a CreateServerRequest
type CreateServerIPAddressSlice ¶
type CreateServerIPAddressSlice []CreateServerIPAddress
CreateServerIPAddressSlice is a slice of strings It exists to allow for a custom JSON marshaller.
func (CreateServerIPAddressSlice) MarshalJSON ¶
func (s CreateServerIPAddressSlice) MarshalJSON() ([]byte, error)
MarshalJSON is a custom marshaller that deals with deeply embedded values.
type CreateServerInterface ¶
type CreateServerInterface struct { IPAddresses CreateServerIPAddressSlice `json:"ip_addresses"` Type string `json:"type"` Network string `json:"network,omitempty"` SourceIPFiltering upcloud.Boolean `json:"source_ip_filtering,omitempty"` Bootable upcloud.Boolean `json:"bootable,omitempty"` }
CreateServerInterface represents a server network interface that is needed during server creation.
type CreateServerInterfaceSlice ¶
type CreateServerInterfaceSlice []CreateServerInterface
CreateServerInterfaceSlice is a slice of CreateServerInterfaces. It exists to allow for a custom JSON marshaller.
func (CreateServerInterfaceSlice) MarshalJSON ¶
func (s CreateServerInterfaceSlice) MarshalJSON() ([]byte, error)
MarshalJSON is a custom marshaller that deals with deeply embedded values.
type CreateServerNetworking ¶
type CreateServerNetworking struct {
Interfaces CreateServerInterfaceSlice `json:"interfaces"`
}
CreateServerNetworking represents the networking details of a server needed during server creation.
type CreateServerRequest ¶
type CreateServerRequest struct { AvoidHost int `json:"avoid_host,omitempty"` Host int `json:"host,omitempty"` BootOrder string `json:"boot_order,omitempty"` CoreNumber int `json:"core_number,omitempty"` // TODO: Convert to boolean Firewall string `json:"firewall,omitempty"` Hostname string `json:"hostname"` LoginUser *LoginUser `json:"login_user,omitempty"` MemoryAmount int `json:"memory_amount,omitempty"` Metadata upcloud.Boolean `json:"metadata"` Networking *CreateServerNetworking `json:"networking"` PasswordDelivery string `json:"password_delivery,omitempty"` Plan string `json:"plan,omitempty"` SimpleBackup string `json:"simple_backup,omitempty"` StorageDevices CreateServerStorageDeviceSlice `json:"storage_devices"` TimeZone string `json:"timezone,omitempty"` Title string `json:"title"` UserData string `json:"user_data,omitempty"` VideoModel string `json:"video_model,omitempty"` RemoteAccessEnabled upcloud.Boolean `json:"remote_access_enabled"` RemoteAccessType string `json:"remote_access_type,omitempty"` RemoteAccessPassword string `json:"remote_access_password,omitempty"` Zone string `json:"zone"` }
CreateServerRequest represents a request for creating a new server
func (CreateServerRequest) MarshalJSON ¶
func (r CreateServerRequest) MarshalJSON() ([]byte, error)
MarshalJSON is a custom marshaller that deals with deeply embedded values.
func (*CreateServerRequest) RequestURL ¶
func (r *CreateServerRequest) RequestURL() string
RequestURL implements the Request interface
type CreateServerStorageDevice ¶
type CreateServerStorageDevice struct { Action string `json:"action"` Address string `json:"address,omitempty"` Storage string `json:"storage"` Title string `json:"title,omitempty"` // Storage size in gigabytes Size int `json:"size,omitempty"` Tier string `json:"tier,omitempty"` Type string `json:"type,omitempty"` BackupRule *upcloud.BackupRule `json:"backup_rule,omitempty"` }
CreateServerStorageDevice represents a storage device for a CreateServerRequest
type CreateServerStorageDeviceSlice ¶
type CreateServerStorageDeviceSlice []CreateServerStorageDevice
CreateServerStorageDeviceSlice is a slice of CreateServerStorageDevices It exists to allow for a custom JSON marshaller.
func (CreateServerStorageDeviceSlice) MarshalJSON ¶
func (s CreateServerStorageDeviceSlice) MarshalJSON() ([]byte, error)
MarshalJSON is a custom marshaller that deals with deeply embedded values.
type CreateStorageImportRequest ¶
type CreateStorageImportRequest struct { StorageUUID string `json:"-"` // ContentType can be given when using the StorageImportSourceDirectUpload mode ContentType string `json:"-"` Source string `json:"source"` SourceLocation ImportSourceLocation `json:"source_location,omitempty"` }
CreateStorageImportRequest represent a request to import storage.
func (CreateStorageImportRequest) MarshalJSON ¶
func (r CreateStorageImportRequest) MarshalJSON() ([]byte, error)
MarshalJSON is a custom marshaller that deals with deeply embedded values.
func (*CreateStorageImportRequest) RequestURL ¶
func (r *CreateStorageImportRequest) RequestURL() string
RequestURL implements the Request interface
type CreateStorageRequest ¶
type CreateStorageRequest struct { Size int `json:"size,string"` Tier string `json:"tier,omitempty"` Title string `json:"title,omitempty"` Zone string `json:"zone"` BackupRule *upcloud.BackupRule `json:"backup_rule,omitempty"` }
CreateStorageRequest represents a request to create a storage device
func (CreateStorageRequest) MarshalJSON ¶
func (r CreateStorageRequest) MarshalJSON() ([]byte, error)
MarshalJSON is a custom marshaller that deals with deeply embedded values.
func (*CreateStorageRequest) RequestURL ¶
func (r *CreateStorageRequest) RequestURL() string
RequestURL implements the Request interface
type CreateSubaccount ¶ added in v4.1.3
type CreateSubaccount struct { Username string `json:"username"` Password string `json:"password"` FirstName string `json:"first_name"` LastName string `json:"last_name"` Company string `json:"company"` Address string `json:"address"` PostalCode string `json:"postal_code"` City string `json:"city"` Email string `json:"email"` // Phone number in international format, country code and national part separated by a period Phone string `json:"phone"` // U.S. state if applicable State string `json:"state"` // ISO 3166-1 three character country code Country string `json:"country"` Currency string `json:"currency"` Language string `json:"language"` VATNnumber string `json:"vat_number"` Timezone string `json:"timezone"` AllowAPI upcloud.Boolean `json:"allow_api"` AllowGUI upcloud.Boolean `json:"allow_gui"` TagAccess upcloud.AccountTagAccess `json:"tag_access"` Roles upcloud.AccountRoles `json:"roles"` ServerAccess upcloud.AccountServerAccess `json:"server_access"` StorageAccess upcloud.AccountStorageAccess `json:"storage_access"` NetworkAccess upcloud.AccountNetworkAccess `json:"network_access"` IPFilters upcloud.AccountIPFilters `json:"ip_filters"` }
CreateSubaccount represents data required to create a sub account
type CreateSubaccountRequest ¶ added in v4.1.3
type CreateSubaccountRequest struct {
Subaccount CreateSubaccount `json:"sub_account"`
}
CreateSubaccountRequest represents a request to create a sub account
func (CreateSubaccountRequest) RequestURL ¶ added in v4.1.3
func (r CreateSubaccountRequest) RequestURL() string
type CreateTagRequest ¶
CreateTagRequest represents a request to create a tag and assign it to zero or more servers
func (CreateTagRequest) MarshalJSON ¶
func (r CreateTagRequest) MarshalJSON() ([]byte, error)
MarshalJSON is a custom marshaller that deals with deeply embedded values.
func (*CreateTagRequest) RequestURL ¶
func (r *CreateTagRequest) RequestURL() string
RequestURL implements the Request interface
type DeleteFirewallRuleRequest ¶
DeleteFirewallRuleRequest represents a request to remove a firewall rule
func (*DeleteFirewallRuleRequest) RequestURL ¶
func (r *DeleteFirewallRuleRequest) RequestURL() string
RequestURL implements the Request interface
type DeleteManagedDatabaseLogicalDatabaseRequest ¶
type DeleteManagedDatabaseLogicalDatabaseRequest struct { // ServiceUUID selects a managed database service to modify ServiceUUID string `json:"-"` Name string `json:"-"` }
DeleteManagedDatabaseLogicalDatabaseRequest represents a request to delete a logical database from an existing managed database instance
func (*DeleteManagedDatabaseLogicalDatabaseRequest) RequestURL ¶
func (d *DeleteManagedDatabaseLogicalDatabaseRequest) RequestURL() string
RequestURL implements the request.Request interface
type DeleteManagedDatabaseRequest ¶
type DeleteManagedDatabaseRequest struct {
UUID string
}
DeleteManagedDatabaseRequest represents a request to delete an existing managed database instance
func (*DeleteManagedDatabaseRequest) RequestURL ¶
func (d *DeleteManagedDatabaseRequest) RequestURL() string
RequestURL implements the request.Request interface
type DeleteManagedDatabaseUserRequest ¶
type DeleteManagedDatabaseUserRequest struct { // ServiceUUID selects a managed database service to modify ServiceUUID string `json:"-"` // Username selects the username to delete Username string `json:"-"` }
DeleteManagedDatabaseUserRequest represents a request to delete a normal user from an existing managed database instance
func (*DeleteManagedDatabaseUserRequest) RequestURL ¶
func (m *DeleteManagedDatabaseUserRequest) RequestURL() string
RequestURL implements the request.Request interface
type DeleteNetworkInterfaceRequest ¶
DeleteNetworkInterfaceRequest represents a request to delete a network interface from a server.
func (*DeleteNetworkInterfaceRequest) RequestURL ¶
func (r *DeleteNetworkInterfaceRequest) RequestURL() string
RequestURL implements the Request interface.
type DeleteNetworkRequest ¶
type DeleteNetworkRequest struct {
UUID string
}
DeleteNetworkRequest represents a request to delete a network.
func (*DeleteNetworkRequest) RequestURL ¶
func (r *DeleteNetworkRequest) RequestURL() string
RequestURL implements the Request interface.
type DeleteObjectStorageRequest ¶
type DeleteObjectStorageRequest struct {
UUID string
}
DeleteObjectStorageRequest represents a request to delete a Object Storage
func (*DeleteObjectStorageRequest) RequestURL ¶
func (r *DeleteObjectStorageRequest) RequestURL() string
RequestURL implements the Request interface
type DeleteRouterRequest ¶
type DeleteRouterRequest struct {
UUID string
}
DeleteRouterRequest represents a request to delete a router.
func (*DeleteRouterRequest) RequestURL ¶
func (r *DeleteRouterRequest) RequestURL() string
RequestURL implements the Request interface.
type DeleteServerAndStoragesRequest ¶
type DeleteServerAndStoragesRequest struct {
UUID string
}
DeleteServerAndStoragesRequest represents a request to delete a server and all attached storages
func (*DeleteServerAndStoragesRequest) RequestURL ¶
func (r *DeleteServerAndStoragesRequest) RequestURL() string
RequestURL implements the Request interface
type DeleteServerRequest ¶
type DeleteServerRequest struct {
UUID string
}
DeleteServerRequest represents a request to delete a server
func (*DeleteServerRequest) RequestURL ¶
func (r *DeleteServerRequest) RequestURL() string
RequestURL implements the Request interface
type DeleteStorageRequest ¶
type DeleteStorageRequest struct {
UUID string
}
DeleteStorageRequest represents a request to delete a storage device
func (*DeleteStorageRequest) RequestURL ¶
func (r *DeleteStorageRequest) RequestURL() string
RequestURL implements the Request interface
type DeleteSubaccountRequest ¶ added in v4.1.3
type DeleteSubaccountRequest struct {
Username string
}
DeleteSubaccountRequest represents a request to delete a subaccount
func (*DeleteSubaccountRequest) RequestURL ¶ added in v4.1.3
func (r *DeleteSubaccountRequest) RequestURL() string
RequestURL implements the Request interface
type DeleteTagRequest ¶
type DeleteTagRequest struct {
Name string
}
DeleteTagRequest represents a request to delete a tag
func (*DeleteTagRequest) RequestURL ¶
func (r *DeleteTagRequest) RequestURL() string
RequestURL implements the Request interface
type DetachNetworkRouterRequest ¶
type DetachNetworkRouterRequest struct {
NetworkUUID string `json:"-"`
}
DetachNetworkRouterRequest represents a request to detach a router from a network
func (DetachNetworkRouterRequest) MarshalJSON ¶
func (r DetachNetworkRouterRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface
func (*DetachNetworkRouterRequest) RequestURL ¶
func (r *DetachNetworkRouterRequest) RequestURL() string
RequestURL implements the Request interface
type DetachStorageRequest ¶
DetachStorageRequest represents a request to detach a storage device from a server
func (DetachStorageRequest) MarshalJSON ¶
func (r DetachStorageRequest) MarshalJSON() ([]byte, error)
MarshalJSON is a custom marshaller that deals with deeply embedded values.
func (*DetachStorageRequest) RequestURL ¶
func (r *DetachStorageRequest) RequestURL() string
RequestURL implements the Request interface
type EjectCDROMRequest ¶
type EjectCDROMRequest struct {
ServerUUID string
}
EjectCDROMRequest represents a request to load a storage as a CD-ROM in the CD-ROM device of a server
func (*EjectCDROMRequest) RequestURL ¶
func (r *EjectCDROMRequest) RequestURL() string
RequestURL implements the Request interface
type FirewallRuleSlice ¶
type FirewallRuleSlice []upcloud.FirewallRule
FirewallRuleSlice is a slice of firewall rules It exists to allow for a custom JSON marshaller.
func (FirewallRuleSlice) MarshalJSON ¶
func (s FirewallRuleSlice) MarshalJSON() ([]byte, error)
MarshalJSON is a custom marshaller that deals with deeply embedded values.
type GetAccountDetailsRequest ¶ added in v4.1.3
type GetAccountDetailsRequest struct {
Username string
}
GetAccountDetailsRequest represents a request to get account details
func (*GetAccountDetailsRequest) RequestURL ¶ added in v4.1.3
func (r *GetAccountDetailsRequest) RequestURL() string
RequestURL implements the Request interface
type GetFirewallRuleDetailsRequest ¶
GetFirewallRuleDetailsRequest represents a request to get details about a specific firewall rule
func (*GetFirewallRuleDetailsRequest) RequestURL ¶
func (r *GetFirewallRuleDetailsRequest) RequestURL() string
RequestURL implements the Request interface
type GetFirewallRulesRequest ¶
type GetFirewallRulesRequest struct {
ServerUUID string
}
GetFirewallRulesRequest represents a request for retrieving the firewall rules for a specific server
func (*GetFirewallRulesRequest) RequestURL ¶
func (r *GetFirewallRulesRequest) RequestURL() string
RequestURL implements the Request interface
type GetHostDetailsRequest ¶
type GetHostDetailsRequest struct {
ID int
}
GetHostDetailsRequest represents the request for the details of a single private host
func (*GetHostDetailsRequest) RequestURL ¶
func (r *GetHostDetailsRequest) RequestURL() string
RequestURL implements the Request interface
type GetIPAddressDetailsRequest ¶
type GetIPAddressDetailsRequest struct {
Address string
}
GetIPAddressDetailsRequest represents a request to retrieve details about a specific IP address
func (*GetIPAddressDetailsRequest) RequestURL ¶
func (r *GetIPAddressDetailsRequest) RequestURL() string
RequestURL implements the Request interface
type GetManagedDatabaseConnectionsRequest ¶
type GetManagedDatabaseConnectionsRequest struct { // UUID selects a managed database instance to query connections from UUID string // Limit sets the upper bound how many connections to fetch Limit int // Offset skips n connections before returning them. It can be used to iteratively fetch connections. Offset int }
GetManagedDatabaseConnectionsRequest represents a request to get managed database instance's current connections
func (*GetManagedDatabaseConnectionsRequest) RequestURL ¶
func (g *GetManagedDatabaseConnectionsRequest) RequestURL() string
RequestURL implements the request.Request interface
type GetManagedDatabaseLogicalDatabasesRequest ¶
type GetManagedDatabaseLogicalDatabasesRequest struct { // ServiceUUID selects a managed database service to query ServiceUUID string `json:"-"` }
GetManagedDatabaseLogicalDatabasesRequest represents a request to get a slice of existing logical databases of a managed database instance
func (*GetManagedDatabaseLogicalDatabasesRequest) RequestURL ¶
func (g *GetManagedDatabaseLogicalDatabasesRequest) RequestURL() string
RequestURL implements the request.Request interface
type GetManagedDatabaseLogsRequest ¶
type GetManagedDatabaseLogsRequest struct { // UUID selects a managed database instance to query logs from UUID string // Limit sets the maximum number of logs to query in one go Limit int // Offset sets the offset from which to query logs onwards Offset string // Order sets the log sort order. See: // upcloud.ManagedDatabaseLogOrderAscending // upcloud.ManagedDatabaseLogOrderDescending Order upcloud.ManagedDatabaseLogOrder }
GetManagedDatabaseLogsRequest represents a request to get managed database instance logs
func (*GetManagedDatabaseLogsRequest) RequestURL ¶
func (g *GetManagedDatabaseLogsRequest) RequestURL() string
RequestURL implements the request.Request interface
type GetManagedDatabaseMetricsRequest ¶
type GetManagedDatabaseMetricsRequest struct { // UUID selects a managed database instance to query metrics from UUID string // Period selects the observation window. See: // upcloud.ManagedDatabaseMetricPeriodHour // upcloud.ManagedDatabaseMetricPeriodDay // upcloud.ManagedDatabaseMetricPeriodWeek // upcloud.ManagedDatabaseMetricPeriodMonth // upcloud.ManagedDatabaseMetricPeriodYear Period upcloud.ManagedDatabaseMetricPeriod }
GetManagedDatabaseMetricsRequest represents a request to get managed database instance performance metrics
func (*GetManagedDatabaseMetricsRequest) RequestURL ¶
func (g *GetManagedDatabaseMetricsRequest) RequestURL() string
RequestURL implements the request.Request interface
type GetManagedDatabaseQueryStatisticsRequest ¶
type GetManagedDatabaseQueryStatisticsRequest struct { // UUID selects a managed database instance to query statistics from UUID string // Limit sets the upper bound how many query stats to fetch Limit int // Offset skips n query stat rows before returning them. It can be used to iteratively fetch all. Offset int }
func (*GetManagedDatabaseQueryStatisticsRequest) RequestURL ¶
func (g *GetManagedDatabaseQueryStatisticsRequest) RequestURL() string
RequestURL implements the request.Request interface
type GetManagedDatabaseRequest ¶
type GetManagedDatabaseRequest struct {
UUID string
}
GetManagedDatabaseRequest represents a request to get details of an existing managed database instance
func (*GetManagedDatabaseRequest) RequestURL ¶
func (g *GetManagedDatabaseRequest) RequestURL() string
RequestURL implements the request.Request interface
type GetManagedDatabaseUserRequest ¶
type GetManagedDatabaseUserRequest struct { // ServiceUUID selects a managed database service to query ServiceUUID string `json:"-"` // Username selects the username to get Username string `json:"-"` }
GetManagedDatabaseUserRequest represents a request to get details of a user of an existing managed database instance. This request also returns the password of the user if it's known by the API.
func (*GetManagedDatabaseUserRequest) RequestURL ¶
func (g *GetManagedDatabaseUserRequest) RequestURL() string
RequestURL implements the request.Request interface
type GetManagedDatabaseUsersRequest ¶
type GetManagedDatabaseUsersRequest struct { // ServiceUUID selects a managed database service to query ServiceUUID string `json:"-"` }
GetManagedDatabaseUsersRequest represents a request to get a slice of users of an existing managed database instance The returned response doesn't contain the passwords of the users.
func (*GetManagedDatabaseUsersRequest) RequestURL ¶
func (g *GetManagedDatabaseUsersRequest) RequestURL() string
RequestURL implements the request.Request interface
type GetManagedDatabasesRequest ¶
type GetManagedDatabasesRequest struct{}
GetManagedDatabasesRequest represents a request to get a slice of existing managed database instances
func (*GetManagedDatabasesRequest) RequestURL ¶
func (g *GetManagedDatabasesRequest) RequestURL() string
RequestURL implements the request.Request interface
type GetNetworkDetailsRequest ¶
type GetNetworkDetailsRequest struct {
UUID string
}
GetNetworkDetailsRequest represents a request to the the details of a single network.
func (*GetNetworkDetailsRequest) RequestURL ¶
func (r *GetNetworkDetailsRequest) RequestURL() string
RequestURL implements the Request interface.
type GetNetworksInZoneRequest ¶
type GetNetworksInZoneRequest struct {
Zone string
}
GetNetworksInZoneRequest represents a request to get all networks within the specified zone.
func (*GetNetworksInZoneRequest) RequestURL ¶
func (r *GetNetworksInZoneRequest) RequestURL() string
RequestURL implements the Request interface.
type GetObjectStorageDetailsRequest ¶
type GetObjectStorageDetailsRequest struct {
UUID string
}
GetObjectStorageDetailsRequest represents a request for retrieving details about a Object Storage device
func (*GetObjectStorageDetailsRequest) RequestURL ¶
func (r *GetObjectStorageDetailsRequest) RequestURL() string
RequestURL implements the Request interface
type GetRouterDetailsRequest ¶
type GetRouterDetailsRequest struct {
UUID string
}
GetRouterDetailsRequest represents a request to get details about a single router.
func (*GetRouterDetailsRequest) RequestURL ¶
func (r *GetRouterDetailsRequest) RequestURL() string
RequestURL implements the Request interface.
type GetServerDetailsRequest ¶
type GetServerDetailsRequest struct {
UUID string
}
GetServerDetailsRequest represents a request for retrieving details about a server
func (*GetServerDetailsRequest) RequestURL ¶
func (r *GetServerDetailsRequest) RequestURL() string
RequestURL implements the Request interface
type GetServerNetworksRequest ¶
type GetServerNetworksRequest struct {
ServerUUID string
}
GetServerNetworksRequest represents a request to get the networks a server is part of.
func (*GetServerNetworksRequest) RequestURL ¶
func (r *GetServerNetworksRequest) RequestURL() string
RequestURL implements the Request interface.
type GetStorageDetailsRequest ¶
type GetStorageDetailsRequest struct {
UUID string
}
GetStorageDetailsRequest represents a request for retrieving details about a piece of storage
func (*GetStorageDetailsRequest) RequestURL ¶
func (r *GetStorageDetailsRequest) RequestURL() string
RequestURL implements the Request interface
type GetStorageImportDetailsRequest ¶
type GetStorageImportDetailsRequest struct {
UUID string
}
GetStorageImportDetailsRequest represents a request to get details about an import
func (*GetStorageImportDetailsRequest) RequestURL ¶
func (r *GetStorageImportDetailsRequest) RequestURL() string
RequestURL implements the Request interface
type GetStoragesRequest ¶
type GetStoragesRequest struct { // If specified, only storages with this access type will be retrieved Access string // If specified, only storages with this type will be retrieved Type string // If specified, only storages marked as favorite will be retrieved Favorite bool }
GetStoragesRequest represents a request for retrieving all or some storages
func (*GetStoragesRequest) RequestURL ¶
func (r *GetStoragesRequest) RequestURL() string
RequestURL implements the Request interface
type ImportSourceLocation ¶
type ImportSourceLocation interface{}
ImportSourceLocation can be a string to a file or io.Reader in StorageImportSourceDirectUpload mode or a URL in StorageImportSourceHTTPImport mode
type LoadCDROMRequest ¶
LoadCDROMRequest represents a request to load a storage as a CD-ROM in the CD-ROM device of a server
func (LoadCDROMRequest) MarshalJSON ¶
func (r LoadCDROMRequest) MarshalJSON() ([]byte, error)
MarshalJSON is a custom marshaller that deals with deeply embedded values.
func (*LoadCDROMRequest) RequestURL ¶
func (r *LoadCDROMRequest) RequestURL() string
RequestURL implements the Request interface
type LoginUser ¶
type LoginUser struct { CreatePassword string `json:"create_password,omitempty"` Username string `json:"username,omitempty"` SSHKeys SSHKeySlice `json:"ssh_keys,omitempty"` }
LoginUser represents the login_user block when creating a new server
type ManagedDatabaseMaintenanceTimeRequest ¶
type ManagedDatabaseMaintenanceTimeRequest struct { DayOfWeek string `json:"dow,omitempty"` Time string `json:"time,omitempty"` }
ManagedDatabaseMaintenanceTimeRequest represents the set time of week when automatic maintenance operations are allowed
type ManagedDatabasePropertiesRequest ¶
type ManagedDatabasePropertiesRequest map[upcloud.ManagedDatabasePropertyKey]interface{}
ManagedDatabasePropertiesRequest is a Properties helper type for CreateManagedDatabaseRequest and ModifyManagedDatabaseRequest. It allows initialisation by chaining the Set methods.
For example:
req := CreateManagedDatabaseRequest{}; req.Properties.SetString("foo", "bar").Set("test", customValue)
func (*ManagedDatabasePropertiesRequest) Get ¶
func (m *ManagedDatabasePropertiesRequest) Get(name upcloud.ManagedDatabasePropertyKey) interface{}
Get returns a property value by name. The underlying map is initialised if it's nil
func (*ManagedDatabasePropertiesRequest) GetAutoUtilityIPFilter ¶
func (m *ManagedDatabasePropertiesRequest) GetAutoUtilityIPFilter() bool
GetAutoUtilityIPFilter returns the state of automatic utility network IP filtering. See upcloud.ManagedDatabasePropertyAutoUtilityIPFilter for more information.
func (*ManagedDatabasePropertiesRequest) GetBool ¶
func (m *ManagedDatabasePropertiesRequest) GetBool(name upcloud.ManagedDatabasePropertyKey) (bool, error)
GetBool returns a boolean property value. The underlying map is initialised if it's nil.
func (*ManagedDatabasePropertiesRequest) GetIPFilter ¶
func (m *ManagedDatabasePropertiesRequest) GetIPFilter() []string
GetIPFilter returns a slice of allowed hosts or networks. See upcloud.ManagedDatabasePropertyIPFilter for more information.
func (*ManagedDatabasePropertiesRequest) GetInt ¶
func (m *ManagedDatabasePropertiesRequest) GetInt(name upcloud.ManagedDatabasePropertyKey) (int, error)
GetInt returns an integer property value. The underlying map is initialised if it's nil.
func (*ManagedDatabasePropertiesRequest) GetPublicAccess ¶
func (m *ManagedDatabasePropertiesRequest) GetPublicAccess() bool
GetPublicAccess returns the state of public access to the service. See upcloud.ManagedDatabasePropertyPublicAccess for more information.
func (*ManagedDatabasePropertiesRequest) GetString ¶
func (m *ManagedDatabasePropertiesRequest) GetString(name upcloud.ManagedDatabasePropertyKey) (string, error)
GetString returns a string property value. The underlying map is initialised if it's nil.
func (*ManagedDatabasePropertiesRequest) GetStringSlice ¶
func (m *ManagedDatabasePropertiesRequest) GetStringSlice(name upcloud.ManagedDatabasePropertyKey) ([]string, error)
GetStringSlice returns a string-slice property value. The underlying map is initialised if it's nil.
func (*ManagedDatabasePropertiesRequest) Set ¶
func (m *ManagedDatabasePropertiesRequest) Set(name upcloud.ManagedDatabasePropertyKey, value interface{}) *ManagedDatabasePropertiesRequest
Set associates key with a any type of value. The underlying map is initialised if it's nil
func (*ManagedDatabasePropertiesRequest) SetAutoUtilityIPFilter ¶
func (m *ManagedDatabasePropertiesRequest) SetAutoUtilityIPFilter(enabled bool) *ManagedDatabasePropertiesRequest
SetAutoUtilityIPFilter enables or disables automatic utility network ip filtering. See upcloud.ManagedDatabasePropertyAutoUtilityIPFilter for more information.
func (*ManagedDatabasePropertiesRequest) SetBool ¶
func (m *ManagedDatabasePropertiesRequest) SetBool(name upcloud.ManagedDatabasePropertyKey, value bool) *ManagedDatabasePropertiesRequest
SetBool associates key with a boolean value. The underlying map is initialised if it's nil
func (*ManagedDatabasePropertiesRequest) SetIPFilter ¶
func (m *ManagedDatabasePropertiesRequest) SetIPFilter(addressOrNetworkWithCIDRMask ...string) *ManagedDatabasePropertiesRequest
SetIPFilter sets the list of allowed host or networks that can access the service.
Use upcloud.ManagedDatabaseAllIPv4 to enable access from anywhere.
See upcloud.ManagedDatabasePropertyIPFilter for more information.
func (*ManagedDatabasePropertiesRequest) SetInt ¶
func (m *ManagedDatabasePropertiesRequest) SetInt(name upcloud.ManagedDatabasePropertyKey, value int) *ManagedDatabasePropertiesRequest
SetInt associates key with an integer value. The underlying map is initialised if it's nil
func (*ManagedDatabasePropertiesRequest) SetPublicAccess ¶
func (m *ManagedDatabasePropertiesRequest) SetPublicAccess(enabled bool) *ManagedDatabasePropertiesRequest
SetPublicAccess enables or disables public access from the internet. See upcloud.ManagedDatabasePropertyPublicAccess for more information.
func (*ManagedDatabasePropertiesRequest) SetString ¶
func (m *ManagedDatabasePropertiesRequest) SetString(name upcloud.ManagedDatabasePropertyKey, value string) *ManagedDatabasePropertiesRequest
SetString associates key with a string value. The underlying map is initialised if it's nil
func (*ManagedDatabasePropertiesRequest) SetStringSlice ¶
func (m *ManagedDatabasePropertiesRequest) SetStringSlice(name upcloud.ManagedDatabasePropertyKey, value []string) *ManagedDatabasePropertiesRequest
SetStringSlice associates key with a slice of strings. The underlying map is initialised if it's nil
type ModifyHostRequest ¶
ModifyHostRequest represents the request to modify a private host
func (ModifyHostRequest) MarshalJSON ¶
func (r ModifyHostRequest) MarshalJSON() ([]byte, error)
MarshalJSON is a custom marshaller that deals with deeply embedded values.
func (*ModifyHostRequest) RequestURL ¶
func (r *ModifyHostRequest) RequestURL() string
RequestURL implements the Request interface
type ModifyIPAddressRequest ¶
type ModifyIPAddressRequest struct { IPAddress string `json:"-"` PTRRecord string `json:"ptr_record,omitempty"` MAC string `json:"mac,omitempty"` }
ModifyIPAddressRequest represents a request to modify the PTR DNS record of a specific IP address
func (ModifyIPAddressRequest) MarshalJSON ¶
func (r ModifyIPAddressRequest) MarshalJSON() ([]byte, error)
MarshalJSON is a custom marshaller that deals with deeply embedded values.
func (*ModifyIPAddressRequest) RequestURL ¶
func (r *ModifyIPAddressRequest) RequestURL() string
RequestURL implements the Request interface
type ModifyManagedDatabaseRequest ¶
type ModifyManagedDatabaseRequest struct { Maintenance ManagedDatabaseMaintenanceTimeRequest `json:"maintenance"` Plan string `json:"plan,omitempty"` Properties ManagedDatabasePropertiesRequest `json:"properties,omitempty"` Title string `json:"title,omitempty"` Type upcloud.ManagedDatabaseServiceType `json:"type,omitempty"` UUID string `json:"-"` Zone string `json:"zone,omitempty"` }
ModifyManagedDatabaseRequest represents a request to modify an existing managed database instance
func (ModifyManagedDatabaseRequest) MarshalJSON ¶
func (m ModifyManagedDatabaseRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler
func (*ModifyManagedDatabaseRequest) RequestURL ¶
func (m *ModifyManagedDatabaseRequest) RequestURL() string
RequestURL implements the request.Request interface
type ModifyManagedDatabaseUserRequest ¶
type ModifyManagedDatabaseUserRequest struct { // ServiceUUID selects a managed database service to modify ServiceUUID string `json:"-"` // Username selects the username to modify. The username itself is immutable. To change it, recreate the user. Username string `json:"-"` Password string `json:"password,omitempty"` // Authentication selects authentication type for the user. See following constants for more information: // upcloud.ManagedDatabaseUserAuthenticationCachingSHA2Password // upcloud.ManagedDatabaseUserAuthenticationMySQLNativePassword Authentication upcloud.ManagedDatabaseUserAuthenticationType `json:"authentication,omitempty"` }
ModifyManagedDatabaseUserRequest represents a request to modify an existing user of an existing managed database instance
func (*ModifyManagedDatabaseUserRequest) RequestURL ¶
func (m *ModifyManagedDatabaseUserRequest) RequestURL() string
RequestURL implements the request.Request interface
type ModifyNetworkInterfaceRequest ¶
type ModifyNetworkInterfaceRequest struct { ServerUUID string `json:"-"` CurrentIndex int `json:"-"` Type string `json:"type,omitempty"` NetworkUUID string `json:"network,omitempty"` NewIndex int `json:"index,omitempty"` IPAddresses CreateNetworkInterfaceIPAddressSlice `json:"ip_addresses,omitempty"` SourceIPFiltering upcloud.Boolean `json:"source_ip_filtering,omitempty"` Bootable upcloud.Boolean `json:"bootable,omitempty"` }
ModifyNetworkInterfaceRequest represents a request to modify a network interface on a server.
func (ModifyNetworkInterfaceRequest) MarshalJSON ¶
func (r ModifyNetworkInterfaceRequest) MarshalJSON() ([]byte, error)
MarshalJSON is a custom marshaller that deals with deeply embedded values.
func (*ModifyNetworkInterfaceRequest) RequestURL ¶
func (r *ModifyNetworkInterfaceRequest) RequestURL() string
RequestURL implements the Request interface.
type ModifyNetworkRequest ¶
type ModifyNetworkRequest struct { UUID string `json:"-"` Name string `json:"name,omitempty"` Zone string `json:"zone,omitempty"` IPNetworks upcloud.IPNetworkSlice `json:"ip_networks,omitempty"` }
ModifyNetworkRequest represents a request to modify an existing network.
func (ModifyNetworkRequest) MarshalJSON ¶
func (r ModifyNetworkRequest) MarshalJSON() ([]byte, error)
MarshalJSON is a custom marshaller that deals with deeply embedded values.
func (*ModifyNetworkRequest) RequestURL ¶
func (r *ModifyNetworkRequest) RequestURL() string
RequestURL implements the Request interface.
type ModifyObjectStorageRequest ¶
type ModifyObjectStorageRequest struct { UUID string `json:"-"` Description string `json:"description,omitempty"` AccessKey string `json:"access_key,omitempty"` SecretKey string `json:"secret_key,omitempty"` Size int `json:"size,omitempty"` }
ModifyObjectStorageRequest represents a request to modify a Object Storage
func (ModifyObjectStorageRequest) MarshalJSON ¶
func (r ModifyObjectStorageRequest) MarshalJSON() ([]byte, error)
MarshalJSON is a custom marshaller that deals with deeply embedded values.
func (*ModifyObjectStorageRequest) RequestURL ¶
func (r *ModifyObjectStorageRequest) RequestURL() string
RequestURL implements the Request interface
type ModifyRouterRequest ¶
ModifyRouterRequest represents a request to modify an existing router.
func (ModifyRouterRequest) MarshalJSON ¶
func (r ModifyRouterRequest) MarshalJSON() ([]byte, error)
MarshalJSON is a custom marshaller that deals with deeply embedded values.
func (*ModifyRouterRequest) RequestURL ¶
func (r *ModifyRouterRequest) RequestURL() string
RequestURL implements the Request interface.
type ModifyServerRequest ¶
type ModifyServerRequest struct { UUID string `json:"-"` BootOrder string `json:"boot_order,omitempty"` CoreNumber int `json:"core_number,omitempty,string"` // TODO: Convert to boolean Firewall string `json:"firewall,omitempty"` Hostname string `json:"hostname,omitempty"` MemoryAmount int `json:"memory_amount,omitempty,string"` Metadata upcloud.Boolean `json:"metadata"` Plan string `json:"plan,omitempty"` SimpleBackup string `json:"simple_backup,omitempty"` TimeZone string `json:"timezone,omitempty"` Title string `json:"title,omitempty"` VideoModel string `json:"video_model,omitempty"` RemoteAccessEnabled upcloud.Boolean `json:"remote_access_enabled"` RemoteAccessType string `json:"remote_access_type,omitempty"` RemoteAccessPassword string `json:"remote_access_password,omitempty"` Zone string `json:"zone,omitempty"` }
ModifyServerRequest represents a request to modify a server
func (ModifyServerRequest) MarshalJSON ¶
func (r ModifyServerRequest) MarshalJSON() ([]byte, error)
MarshalJSON is a custom marshaller that deals with deeply embedded values.
func (*ModifyServerRequest) RequestURL ¶
func (r *ModifyServerRequest) RequestURL() string
RequestURL implements the Request interface
type ModifyStorageRequest ¶
type ModifyStorageRequest struct { UUID string `json:"-"` Title string `json:"title,omitempty"` Size int `json:"size,omitempty,string"` BackupRule *upcloud.BackupRule `json:"backup_rule,omitempty"` }
ModifyStorageRequest represents a request to modify a storage device
func (ModifyStorageRequest) MarshalJSON ¶
func (r ModifyStorageRequest) MarshalJSON() ([]byte, error)
MarshalJSON is a custom marshaller that deals with deeply embedded values.
func (*ModifyStorageRequest) RequestURL ¶
func (r *ModifyStorageRequest) RequestURL() string
RequestURL implements the Request interface
type ModifySubaccount ¶ added in v4.1.3
type ModifySubaccount struct { FirstName string `json:"first_name,omitempty"` LastName string `json:"last_name,omitempty"` Company string `json:"company,omitempty"` Address string `json:"address,omitempty"` PostalCode string `json:"postal_code,omitempty"` City string `json:"city,omitempty"` Email string `json:"email,omitempty"` // Phone number in international format, country code and national part separated by a period Phone string `json:"phone,omitempty"` // U.S. state if applicable State string `json:"state"` // ISO 3166-1 three character country code Country string `json:"country,omitempty"` Currency string `json:"currency,omitempty"` Language string `json:"language,omitempty"` VATNnumber string `json:"vat_number"` Timezone string `json:"timezone,omitempty"` AllowAPI upcloud.Boolean `json:"allow_api,omitempty"` AllowGUI upcloud.Boolean `json:"allow_gui,omitempty"` TagAccess upcloud.AccountTagAccess `json:"tag_access,omitempty"` Roles upcloud.AccountRoles `json:"roles,omitempty"` ServerAccess upcloud.AccountServerAccess `json:"server_access,omitempty"` StorageAccess upcloud.AccountStorageAccess `json:"storage_access,omitempty"` NetworkAccess upcloud.AccountNetworkAccess `json:"network_access,omitempty"` IPFilters upcloud.AccountIPFilters `json:"ip_filters,omitempty"` }
ModifySubaccount represents data required to modify a Subaccount
type ModifySubaccountRequest ¶ added in v4.1.3
type ModifySubaccountRequest struct { Username string `json:"-"` Subaccount ModifySubaccount `json:"account"` }
ModifySubaccountRequest represents a request to modify a Subaccount
func (ModifySubaccountRequest) RequestURL ¶ added in v4.1.3
func (r ModifySubaccountRequest) RequestURL() string
type ModifyTagRequest ¶
ModifyTagRequest represents a request to modify an existing tag. The Name is the name of the current tag, the Tag is the new values for the tag.
func (ModifyTagRequest) MarshalJSON ¶
func (r ModifyTagRequest) MarshalJSON() ([]byte, error)
MarshalJSON is a custom marshaller that deals with deeply embedded values.
func (*ModifyTagRequest) RequestURL ¶
func (r *ModifyTagRequest) RequestURL() string
RequestURL implements the Request interface
type ReleaseIPAddressRequest ¶
type ReleaseIPAddressRequest struct {
IPAddress string
}
ReleaseIPAddressRequest represents a request to remove a specific IP address from server
func (*ReleaseIPAddressRequest) RequestURL ¶
func (r *ReleaseIPAddressRequest) RequestURL() string
RequestURL implements the Request interface
type Request ¶
type Request interface { // RequestURL returns the relative API URL for the request, excluding the API version. RequestURL() string }
Request is the interface for request objects
type RestartServerRequest ¶
type RestartServerRequest struct { UUID string `json:"-"` StopType string `json:"stop_type,omitempty"` Timeout time.Duration `json:"timeout,omitempty,string"` TimeoutAction string `json:"timeout_action,omitempty"` Host int `json:"host,omitempty"` }
RestartServerRequest represents a request to restart a server
func (RestartServerRequest) MarshalJSON ¶
func (r RestartServerRequest) MarshalJSON() ([]byte, error)
MarshalJSON is a custom marshaller that deals with deeply embedded values.
func (*RestartServerRequest) RequestURL ¶
func (r *RestartServerRequest) RequestURL() string
RequestURL implements the Request interface
type RestoreBackupRequest ¶
type RestoreBackupRequest struct {
UUID string
}
RestoreBackupRequest represents a request to restore a storage from the specified backup
func (*RestoreBackupRequest) RequestURL ¶
func (r *RestoreBackupRequest) RequestURL() string
RequestURL implements the Request interface
type SSHKeySlice ¶
type SSHKeySlice []string
SSHKeySlice is a slice of strings It exists to allow for a custom JSON unmarshaller.
func (SSHKeySlice) MarshalJSON ¶
func (s SSHKeySlice) MarshalJSON() ([]byte, error)
MarshalJSON is a custom marshaller that deals with deeply embedded values.
func (*SSHKeySlice) UnmarshalJSON ¶
func (s *SSHKeySlice) UnmarshalJSON(b []byte) error
UnmarshalJSON is a custom unmarshaller that deals with deeply embedded values.
type ShutdownManagedDatabaseRequest ¶
type ShutdownManagedDatabaseRequest struct {
UUID string
}
ShutdownManagedDatabaseRequest represents a request to shut down an existing managed database instance
func (*ShutdownManagedDatabaseRequest) MarshalJSON ¶
func (m *ShutdownManagedDatabaseRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler
func (*ShutdownManagedDatabaseRequest) RequestURL ¶
func (m *ShutdownManagedDatabaseRequest) RequestURL() string
RequestURL implements the request.Request interface
type StartManagedDatabaseRequest ¶
type StartManagedDatabaseRequest struct {
UUID string
}
StartManagedDatabaseRequest represents a request to start an existing managed database instance
func (*StartManagedDatabaseRequest) MarshalJSON ¶
func (m *StartManagedDatabaseRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler
func (*StartManagedDatabaseRequest) RequestURL ¶
func (m *StartManagedDatabaseRequest) RequestURL() string
RequestURL implements the request.Request interface
type StartServerRequest ¶
type StartServerRequest struct { UUID string `json:"-"` // TODO: Start server requests have no timeout in the API Timeout time.Duration `json:"-"` AvoidHost int `json:"avoid_host,omitempty"` Host int `json:"host,omitempty"` }
StartServerRequest represents a request to start a server
func (StartServerRequest) MarshalJSON ¶
func (r StartServerRequest) MarshalJSON() ([]byte, error)
MarshalJSON is a custom marshaller that deals with deeply embedded values.
func (*StartServerRequest) RequestURL ¶
func (r *StartServerRequest) RequestURL() string
RequestURL implements the Request interface
type StopServerRequest ¶
type StopServerRequest struct { UUID string `json:"-"` StopType string `json:"stop_type,omitempty"` Timeout time.Duration `json:"timeout,omitempty,string"` }
StopServerRequest represents a request to stop a server
func (StopServerRequest) MarshalJSON ¶
func (r StopServerRequest) MarshalJSON() ([]byte, error)
MarshalJSON is a custom marshaller that deals with deeply embedded values.
func (*StopServerRequest) RequestURL ¶
func (r *StopServerRequest) RequestURL() string
RequestURL implements the Request interface
type TagServerRequest ¶
TagServerRequest represents a request to tag a server with one or more tags
func (*TagServerRequest) RequestURL ¶
func (r *TagServerRequest) RequestURL() string
RequestURL implements the Request interface
type TemplatizeStorageRequest ¶
TemplatizeStorageRequest represents a request to templatize a storage device
func (TemplatizeStorageRequest) MarshalJSON ¶
func (r TemplatizeStorageRequest) MarshalJSON() ([]byte, error)
MarshalJSON is a custom marshaller that deals with deeply embedded values.
func (*TemplatizeStorageRequest) RequestURL ¶
func (r *TemplatizeStorageRequest) RequestURL() string
RequestURL implements the Request interface
type UntagServerRequest ¶
UntagServerRequest represents a request to remove one or more tags from a server
func (*UntagServerRequest) RequestURL ¶
func (r *UntagServerRequest) RequestURL() string
RequestURL implements the Request interface
type WaitForManagedDatabaseStateRequest ¶
type WaitForManagedDatabaseStateRequest struct { UUID string DesiredState upcloud.ManagedDatabaseState Timeout time.Duration }
WaitForManagedDatabaseStateRequest represents a request to wait for a managed database instance to enter a specific state
type WaitForServerStateRequest ¶
type WaitForServerStateRequest struct { UUID string DesiredState string UndesiredState string Timeout time.Duration }
WaitForServerStateRequest represents a request to wait for a server to enter or exit a specific state
type WaitForStorageImportCompletionRequest ¶
WaitForStorageImportCompletionRequest represents a request to wait for storage import to complete.