Documentation ¶
Index ¶
- Constants
- Variables
- func NewLoadBalancerBodySizeMatcher(m upcloud.LoadBalancerIntegerMatcherMethod, bodySize int) upcloud.LoadBalancerMatcher
- func NewLoadBalancerBodySizeRangeMatcher(start, end int) upcloud.LoadBalancerMatcher
- func NewLoadBalancerCookieMatcher(m upcloud.LoadBalancerStringMatcherMethod, name, value string, ...) upcloud.LoadBalancerMatcher
- func NewLoadBalancerHTTPMethodMatcher(method upcloud.LoadBalancerHTTPMatcherMethod) upcloud.LoadBalancerMatcher
- func NewLoadBalancerHTTPRedirectAction(location string) upcloud.LoadBalancerAction
- func NewLoadBalancerHTTPReturnAction(statusCode int, contentType, payload string) upcloud.LoadBalancerAction
- func NewLoadBalancerHeaderMatcher(m upcloud.LoadBalancerStringMatcherMethod, name, value string, ...) upcloud.LoadBalancerMatcher
- func NewLoadBalancerHostMatcher(host string) upcloud.LoadBalancerMatcher
- func NewLoadBalancerNumMembersUpMatcher(m upcloud.LoadBalancerIntegerMatcherMethod, count int, backend string) upcloud.LoadBalancerMatcher
- func NewLoadBalancerPathMatcher(m upcloud.LoadBalancerStringMatcherMethod, path string, ignoreCase *bool) upcloud.LoadBalancerMatcher
- func NewLoadBalancerSetForwardedHeadersAction() upcloud.LoadBalancerAction
- func NewLoadBalancerSrcIPMatcher(IP string) upcloud.LoadBalancerMatcher
- func NewLoadBalancerSrcPortMatcher(m upcloud.LoadBalancerIntegerMatcherMethod, port int) upcloud.LoadBalancerMatcher
- func NewLoadBalancerSrcPortRangeMatcher(start, end int) upcloud.LoadBalancerMatcher
- func NewLoadBalancerTCPRejectAction() upcloud.LoadBalancerAction
- func NewLoadBalancerURLMatcher(m upcloud.LoadBalancerStringMatcherMethod, URL string, ignoreCase *bool) upcloud.LoadBalancerMatcher
- func NewLoadBalancerURLParamMatcher(m upcloud.LoadBalancerStringMatcherMethod, name, value string, ...) upcloud.LoadBalancerMatcher
- func NewLoadBalancerURLQueryMatcher(m upcloud.LoadBalancerStringMatcherMethod, query string, ignoreCase *bool) upcloud.LoadBalancerMatcher
- func NewLoadBalancerUseBackendAction(name string) upcloud.LoadBalancerAction
- type AssignIPAddressRequest
- type AttachNetworkRouterRequest
- type AttachStorageRequest
- type CancelManagedDatabaseConnection
- type CloneManagedDatabaseRequest
- type CloneStorageRequest
- type CreateBackupRequest
- type CreateFirewallRuleRequest
- type CreateFirewallRulesRequest
- type CreateLoadBalancerBackendMemberRequest
- type CreateLoadBalancerBackendRequest
- type CreateLoadBalancerCertificateBundleRequest
- type CreateLoadBalancerFrontendRequest
- type CreateLoadBalancerFrontendRuleRequest
- type CreateLoadBalancerFrontendTLSConfigRequest
- type CreateLoadBalancerRequest
- type CreateLoadBalancerResolverRequest
- type CreateManagedDatabaseLogicalDatabaseRequest
- type CreateManagedDatabaseRequest
- type CreateManagedDatabaseUserRequest
- type CreateNetworkInterfaceIPAddress
- type CreateNetworkInterfaceIPAddressSlice
- type CreateNetworkInterfaceRequest
- type CreateNetworkRequest
- type CreateObjectStorageRequest
- type CreateRouterRequest
- type CreateServerGroupRequest
- 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 DeleteLoadBalancerBackendMemberRequest
- type DeleteLoadBalancerBackendRequest
- type DeleteLoadBalancerCertificateBundleRequest
- type DeleteLoadBalancerFrontendRequest
- type DeleteLoadBalancerFrontendRuleRequest
- type DeleteLoadBalancerFrontendTLSConfigRequest
- type DeleteLoadBalancerRequest
- type DeleteLoadBalancerResolverRequest
- type DeleteManagedDatabaseLogicalDatabaseRequest
- type DeleteManagedDatabaseRequest
- type DeleteManagedDatabaseUserRequest
- type DeleteNetworkInterfaceRequest
- type DeleteNetworkRequest
- type DeleteObjectStorageRequest
- type DeleteRouterRequest
- type DeleteServerAndStoragesRequest
- type DeleteServerGroupRequest
- 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 GetLoadBalancerBackendMemberRequest
- type GetLoadBalancerBackendMembersRequest
- type GetLoadBalancerBackendRequest
- type GetLoadBalancerBackendsRequest
- type GetLoadBalancerCertificateBundleRequest
- type GetLoadBalancerCertificateBundlesRequest
- type GetLoadBalancerFrontendRequest
- type GetLoadBalancerFrontendRuleRequest
- type GetLoadBalancerFrontendRulesRequest
- type GetLoadBalancerFrontendTLSConfigRequest
- type GetLoadBalancerFrontendTLSConfigsRequest
- type GetLoadBalancerFrontendsRequest
- type GetLoadBalancerPlansRequest
- type GetLoadBalancerRequest
- type GetLoadBalancerResolverRequest
- type GetLoadBalancerResolversRequest
- type GetLoadBalancersRequest
- type GetManagedDatabaseConnectionsRequest
- type GetManagedDatabaseLogicalDatabasesRequest
- type GetManagedDatabaseLogsRequest
- type GetManagedDatabaseMetricsRequest
- type GetManagedDatabaseQueryStatisticsRequest
- type GetManagedDatabaseRequest
- type GetManagedDatabaseServiceTypeRequest
- type GetManagedDatabaseServiceTypesRequest
- type GetManagedDatabaseUserRequest
- type GetManagedDatabaseUsersRequest
- type GetManagedDatabaseVersionsRequest
- type GetManagedDatabasesRequest
- type GetNetworkDetailsRequest
- type GetNetworksInZoneRequest
- type GetObjectStorageDetailsRequest
- type GetRouterDetailsRequest
- type GetServerDetailsRequest
- type GetServerGroupRequest
- type GetServerGroupsRequest
- type GetServerNetworksRequest
- type GetStorageDetailsRequest
- type GetStorageImportDetailsRequest
- type GetStoragesRequest
- type ImportSourceLocation
- type LoadBalancerBackend
- type LoadBalancerBackendMember
- type LoadBalancerFrontend
- type LoadBalancerFrontendRule
- type LoadBalancerFrontendTLSConfig
- type LoadBalancerResolver
- 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 ModifyLoadBalancerBackend
- type ModifyLoadBalancerBackendMember
- type ModifyLoadBalancerBackendMemberRequest
- type ModifyLoadBalancerBackendRequest
- type ModifyLoadBalancerCertificateBundleRequest
- type ModifyLoadBalancerFrontend
- type ModifyLoadBalancerFrontendRequest
- type ModifyLoadBalancerFrontendRule
- type ModifyLoadBalancerFrontendRuleRequest
- type ModifyLoadBalancerFrontendTLSConfigRequest
- type ModifyLoadBalancerRequest
- type ModifyLoadBalancerResolverRequest
- type ModifyManagedDatabaseRequest
- type ModifyManagedDatabaseUserRequest
- type ModifyNetworkInterfaceRequest
- type ModifyNetworkRequest
- type ModifyObjectStorageRequest
- type ModifyRouterRequest
- type ModifyServerGroupRequest
- type ModifyServerRequest
- type ModifyStorageRequest
- type ModifySubaccount
- type ModifySubaccountRequest
- type ModifyTagRequest
- type Page
- type ReleaseIPAddressRequest
- type ReplaceLoadBalancerFrontendRuleRequest
- type Request
- type ResizeStorageFilesystemRequest
- type RestartServerRequest
- type RestoreBackupRequest
- type SSHKeySlice
- type ShutdownManagedDatabaseRequest
- type StartManagedDatabaseRequest
- type StartServerRequest
- type StopServerRequest
- type TagServerRequest
- type TemplatizeStorageRequest
- type UntagServerRequest
- type UpgradeManagedDatabaseVersionRequest
- type WaitForManagedDatabaseStateRequest
- type WaitForServerStateRequest
- type WaitForStorageImportCompletionRequest
- type WaitForStorageStateRequest
Examples ¶
Constants ¶
const ( PageSizeMax int = 100 PageResultMaxSize int = 1000 )
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 ¶
var DefaultPage = &Page{Number: 1, Size: PageSizeMax}
Functions ¶
func NewLoadBalancerBodySizeMatcher ¶ added in v4.4.0
func NewLoadBalancerBodySizeMatcher(m upcloud.LoadBalancerIntegerMatcherMethod, bodySize int) upcloud.LoadBalancerMatcher
func NewLoadBalancerBodySizeRangeMatcher ¶ added in v4.4.0
func NewLoadBalancerBodySizeRangeMatcher(start, end int) upcloud.LoadBalancerMatcher
func NewLoadBalancerCookieMatcher ¶ added in v4.4.0
func NewLoadBalancerCookieMatcher(m upcloud.LoadBalancerStringMatcherMethod, name, value string, ignoreCase *bool) upcloud.LoadBalancerMatcher
func NewLoadBalancerHTTPMethodMatcher ¶ added in v4.4.0
func NewLoadBalancerHTTPMethodMatcher(method upcloud.LoadBalancerHTTPMatcherMethod) upcloud.LoadBalancerMatcher
func NewLoadBalancerHTTPRedirectAction ¶ added in v4.4.0
func NewLoadBalancerHTTPRedirectAction(location string) upcloud.LoadBalancerAction
func NewLoadBalancerHTTPReturnAction ¶ added in v4.4.0
func NewLoadBalancerHTTPReturnAction(statusCode int, contentType, payload string) upcloud.LoadBalancerAction
func NewLoadBalancerHeaderMatcher ¶ added in v4.4.0
func NewLoadBalancerHeaderMatcher(m upcloud.LoadBalancerStringMatcherMethod, name, value string, ignoreCase *bool) upcloud.LoadBalancerMatcher
func NewLoadBalancerHostMatcher ¶ added in v4.4.0
func NewLoadBalancerHostMatcher(host string) upcloud.LoadBalancerMatcher
func NewLoadBalancerNumMembersUpMatcher ¶ added in v4.4.1
func NewLoadBalancerNumMembersUpMatcher(m upcloud.LoadBalancerIntegerMatcherMethod, count int, backend string) upcloud.LoadBalancerMatcher
func NewLoadBalancerPathMatcher ¶ added in v4.4.0
func NewLoadBalancerPathMatcher(m upcloud.LoadBalancerStringMatcherMethod, path string, ignoreCase *bool) upcloud.LoadBalancerMatcher
func NewLoadBalancerSetForwardedHeadersAction ¶ added in v4.8.0
func NewLoadBalancerSetForwardedHeadersAction() upcloud.LoadBalancerAction
func NewLoadBalancerSrcIPMatcher ¶ added in v4.4.0
func NewLoadBalancerSrcIPMatcher(IP string) upcloud.LoadBalancerMatcher
func NewLoadBalancerSrcPortMatcher ¶ added in v4.4.0
func NewLoadBalancerSrcPortMatcher(m upcloud.LoadBalancerIntegerMatcherMethod, port int) upcloud.LoadBalancerMatcher
func NewLoadBalancerSrcPortRangeMatcher ¶ added in v4.4.0
func NewLoadBalancerSrcPortRangeMatcher(start, end int) upcloud.LoadBalancerMatcher
func NewLoadBalancerTCPRejectAction ¶ added in v4.4.0
func NewLoadBalancerTCPRejectAction() upcloud.LoadBalancerAction
func NewLoadBalancerURLMatcher ¶ added in v4.4.0
func NewLoadBalancerURLMatcher(m upcloud.LoadBalancerStringMatcherMethod, URL string, ignoreCase *bool) upcloud.LoadBalancerMatcher
func NewLoadBalancerURLParamMatcher ¶ added in v4.4.0
func NewLoadBalancerURLParamMatcher(m upcloud.LoadBalancerStringMatcherMethod, name, value string, ignoreCase *bool) upcloud.LoadBalancerMatcher
func NewLoadBalancerURLQueryMatcher ¶ added in v4.4.0
func NewLoadBalancerURLQueryMatcher(m upcloud.LoadBalancerStringMatcherMethod, query string, ignoreCase *bool) upcloud.LoadBalancerMatcher
func NewLoadBalancerUseBackendAction ¶ added in v4.4.0
func NewLoadBalancerUseBackendAction(name string) upcloud.LoadBalancerAction
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 CreateLoadBalancerBackendMemberRequest ¶ added in v4.4.0
type CreateLoadBalancerBackendMemberRequest struct { ServiceUUID string `json:"-"` BackendName string `json:"-"` Member LoadBalancerBackendMember }
CreateLoadBalancerBackendMemberRequest represents a request to create load balancer backend member
func (*CreateLoadBalancerBackendMemberRequest) MarshalJSON ¶ added in v4.4.0
func (r *CreateLoadBalancerBackendMemberRequest) MarshalJSON() ([]byte, error)
func (*CreateLoadBalancerBackendMemberRequest) RequestURL ¶ added in v4.4.0
func (r *CreateLoadBalancerBackendMemberRequest) RequestURL() string
type CreateLoadBalancerBackendRequest ¶ added in v4.4.0
type CreateLoadBalancerBackendRequest struct { ServiceUUID string `json:"-"` Backend LoadBalancerBackend }
CreateLoadBalancerBackendRequest represents a request to create load balancer backend
func (*CreateLoadBalancerBackendRequest) MarshalJSON ¶ added in v4.4.0
func (r *CreateLoadBalancerBackendRequest) MarshalJSON() ([]byte, error)
func (*CreateLoadBalancerBackendRequest) RequestURL ¶ added in v4.4.0
func (r *CreateLoadBalancerBackendRequest) RequestURL() string
type CreateLoadBalancerCertificateBundleRequest ¶ added in v4.4.0
type CreateLoadBalancerCertificateBundleRequest struct { Type upcloud.LoadBalancerCertificateBundleType `json:"type,omitempty"` Name string `json:"name,omitempty"` Certificate string `json:"certificate,omitempty"` Intermediates string `json:"intermediates,omitempty"` PrivateKey string `json:"private_key,omitempty"` KeyType string `json:"key_type,omitempty"` Hostnames []string `json:"hostnames,omitempty"` }
CreateLoadBalancerCertificateBundleRequest represents a request to create certificate bundle
func NewCreateLoadBalancerDynamicCertificateBundleRequest ¶ added in v4.4.0
func NewCreateLoadBalancerDynamicCertificateBundleRequest(name, keyType string, hostnames []string) CreateLoadBalancerCertificateBundleRequest
func NewCreateLoadBalancerManualCertificateBundleRequest ¶ added in v4.4.0
func NewCreateLoadBalancerManualCertificateBundleRequest(name, certificate, intermediates, privateKey string) CreateLoadBalancerCertificateBundleRequest
func (*CreateLoadBalancerCertificateBundleRequest) RequestURL ¶ added in v4.4.0
func (r *CreateLoadBalancerCertificateBundleRequest) RequestURL() string
type CreateLoadBalancerFrontendRequest ¶ added in v4.4.0
type CreateLoadBalancerFrontendRequest struct { ServiceUUID string Frontend LoadBalancerFrontend }
CreateLoadBalancerFrontendRequest represents a request to create load balancer frontend
func (*CreateLoadBalancerFrontendRequest) MarshalJSON ¶ added in v4.4.0
func (r *CreateLoadBalancerFrontendRequest) MarshalJSON() ([]byte, error)
func (*CreateLoadBalancerFrontendRequest) RequestURL ¶ added in v4.4.0
func (r *CreateLoadBalancerFrontendRequest) RequestURL() string
type CreateLoadBalancerFrontendRuleRequest ¶ added in v4.4.0
type CreateLoadBalancerFrontendRuleRequest struct { ServiceUUID string `json:"-"` FrontendName string `json:"-"` Rule LoadBalancerFrontendRule }
CreateLoadBalancerFrontendRuleRequest represents a request to create frontend rule
func (*CreateLoadBalancerFrontendRuleRequest) MarshalJSON ¶ added in v4.4.0
func (r *CreateLoadBalancerFrontendRuleRequest) MarshalJSON() ([]byte, error)
func (*CreateLoadBalancerFrontendRuleRequest) RequestURL ¶ added in v4.4.0
func (r *CreateLoadBalancerFrontendRuleRequest) RequestURL() string
type CreateLoadBalancerFrontendTLSConfigRequest ¶ added in v4.4.0
type CreateLoadBalancerFrontendTLSConfigRequest struct { ServiceUUID string `json:"-"` FrontendName string `json:"-"` Config LoadBalancerFrontendTLSConfig }
CreateLoadBalancerFrontendTLSConfigRequest represents a request to create frontend TLS config
func (*CreateLoadBalancerFrontendTLSConfigRequest) MarshalJSON ¶ added in v4.4.0
func (r *CreateLoadBalancerFrontendTLSConfigRequest) MarshalJSON() ([]byte, error)
func (*CreateLoadBalancerFrontendTLSConfigRequest) RequestURL ¶ added in v4.4.0
func (r *CreateLoadBalancerFrontendTLSConfigRequest) RequestURL() string
type CreateLoadBalancerRequest ¶ added in v4.4.0
type CreateLoadBalancerRequest struct { Name string `json:"name,omitempty"` Plan string `json:"plan,omitempty"` Zone string `json:"zone,omitempty"` NetworkUUID string `json:"network_uuid,omitempty"` ConfiguredStatus upcloud.LoadBalancerConfiguredStatus `json:"configured_status,omitempty"` Frontends []LoadBalancerFrontend `json:"frontends"` Backends []LoadBalancerBackend `json:"backends"` Resolvers []LoadBalancerResolver `json:"resolvers"` }
CreateLoadBalancerRequest represents a request to create load balancer
Example ¶
request := CreateLoadBalancerRequest{ Name: "example-service", Plan: "development", Zone: "fi-hel1", NetworkUUID: "03631160-d57a-4926-ad48-a2f828229dcb", ConfiguredStatus: upcloud.LoadBalancerConfiguredStatusStarted, Frontends: []LoadBalancerFrontend{{ Name: "example-frontend", Mode: upcloud.LoadBalancerModeHTTP, Port: 443, DefaultBackend: "example-backend-1", Rules: []LoadBalancerFrontendRule{ { Name: "rule-name", Priority: 0, Matchers: []upcloud.LoadBalancerMatcher{ NewLoadBalancerHostMatcher("example.com"), NewLoadBalancerSrcPortRangeMatcher(8000, 9000), }, Actions: []upcloud.LoadBalancerAction{ NewLoadBalancerUseBackendAction("example-backend-1"), }, }, }, }}, Backends: []LoadBalancerBackend{{ Name: "example-backend-1", Members: []LoadBalancerBackendMember{{ Name: "example-member-1", Weight: 100, MaxSessions: 1000, Type: upcloud.LoadBalancerBackendMemberTypeStatic, IP: "172.16.1.4", Port: 8000, Enabled: true, }}, }}, Resolvers: []LoadBalancerResolver{{ Name: "example-resolver", Nameservers: []string{"172.16.1.4:53"}, Retries: 5, Timeout: 30, TimeoutRetry: 10, CacheValid: 180, CacheInvalid: 10, }}, } if js, err := json.Marshal(request); err == nil { fmt.Println(string(js)) }
Output:
func (*CreateLoadBalancerRequest) RequestURL ¶ added in v4.4.0
func (r *CreateLoadBalancerRequest) RequestURL() string
type CreateLoadBalancerResolverRequest ¶ added in v4.4.0
type CreateLoadBalancerResolverRequest struct { ServiceUUID string `json:"-"` Resolver LoadBalancerResolver }
CreateLoadBalancerResolverRequest represents a request to create load balancer resolver
func (*CreateLoadBalancerResolverRequest) MarshalJSON ¶ added in v4.4.0
func (r *CreateLoadBalancerResolverRequest) MarshalJSON() ([]byte, error)
func (*CreateLoadBalancerResolverRequest) RequestURL ¶ added in v4.4.0
func (r *CreateLoadBalancerResolverRequest) RequestURL() string
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 CreateServerGroupRequest ¶ added in v4.5.0
type CreateServerGroupRequest struct { Title string `json:"title,omitempty"` Members upcloud.ServerUUIDSlice `json:"servers,omitempty"` }
CreateServerGroupRequest represents a request to create server group
func (CreateServerGroupRequest) MarshalJSON ¶ added in v4.5.0
func (r CreateServerGroupRequest) MarshalJSON() ([]byte, error)
MarshalJSON is a custom marshaller that deals with deeply embedded values.
func (CreateServerGroupRequest) RequestURL ¶ added in v4.5.0
func (s CreateServerGroupRequest) RequestURL() string
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 DeleteLoadBalancerBackendMemberRequest ¶ added in v4.4.0
type DeleteLoadBalancerBackendMemberRequest struct { ServiceUUID string `json:"-"` BackendName string `json:"-"` Name string `json:"-"` }
DeleteLoadBalancerBackendMemberRequest represents a request to delete load balancer backend member
func (*DeleteLoadBalancerBackendMemberRequest) RequestURL ¶ added in v4.4.0
func (r *DeleteLoadBalancerBackendMemberRequest) RequestURL() string
type DeleteLoadBalancerBackendRequest ¶ added in v4.4.0
type DeleteLoadBalancerBackendRequest struct { ServiceUUID string `json:"-"` Name string `json:"-"` }
DeleteLoadBalancerBackendRequest represents a request to delete load balancer backend
func (*DeleteLoadBalancerBackendRequest) RequestURL ¶ added in v4.4.0
func (r *DeleteLoadBalancerBackendRequest) RequestURL() string
type DeleteLoadBalancerCertificateBundleRequest ¶ added in v4.4.0
type DeleteLoadBalancerCertificateBundleRequest struct {
UUID string `json:"-"`
}
DeleteLoadBalancerCertificateBundleRequest represents a request to delete certificate bundle
func (*DeleteLoadBalancerCertificateBundleRequest) RequestURL ¶ added in v4.4.0
func (r *DeleteLoadBalancerCertificateBundleRequest) RequestURL() string
type DeleteLoadBalancerFrontendRequest ¶ added in v4.4.0
type DeleteLoadBalancerFrontendRequest struct { ServiceUUID string `json:"-"` Name string `json:"-"` }
DeleteLoadBalancerFrontendRequest represents a request to delete load balancer frontend
func (*DeleteLoadBalancerFrontendRequest) RequestURL ¶ added in v4.4.0
func (r *DeleteLoadBalancerFrontendRequest) RequestURL() string
type DeleteLoadBalancerFrontendRuleRequest ¶ added in v4.4.0
type DeleteLoadBalancerFrontendRuleRequest struct { ServiceUUID string `json:"-"` FrontendName string `json:"-"` Name string `json:"-"` }
DeleteLoadBalancerFrontendRuleRequest represents a request to delete frontend rule
func (*DeleteLoadBalancerFrontendRuleRequest) RequestURL ¶ added in v4.4.0
func (r *DeleteLoadBalancerFrontendRuleRequest) RequestURL() string
type DeleteLoadBalancerFrontendTLSConfigRequest ¶ added in v4.4.0
type DeleteLoadBalancerFrontendTLSConfigRequest struct { ServiceUUID string `json:"-"` FrontendName string `json:"-"` Name string `json:"-"` }
DeleteLoadBalancerFrontendTLSConfigRequest represents a request to delete frontend TLS config
func (*DeleteLoadBalancerFrontendTLSConfigRequest) RequestURL ¶ added in v4.4.0
func (r *DeleteLoadBalancerFrontendTLSConfigRequest) RequestURL() string
type DeleteLoadBalancerRequest ¶ added in v4.4.0
type DeleteLoadBalancerRequest struct {
UUID string `json:"-"`
}
DeleteLoadBalancerRequest represents a request to delete load balancer
func (*DeleteLoadBalancerRequest) RequestURL ¶ added in v4.4.0
func (r *DeleteLoadBalancerRequest) RequestURL() string
type DeleteLoadBalancerResolverRequest ¶ added in v4.4.0
type DeleteLoadBalancerResolverRequest struct { ServiceUUID string `json:"-"` Name string `json:"-"` }
DeleteLoadBalancerResolverRequest represents a request to delete load balancer resolver
func (*DeleteLoadBalancerResolverRequest) RequestURL ¶ added in v4.4.0
func (r *DeleteLoadBalancerResolverRequest) RequestURL() string
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 DeleteServerGroupRequest ¶ added in v4.5.0
type DeleteServerGroupRequest struct {
UUID string `json:"-"`
}
DeleteServerGroupRequest represents a request to delete server group
func (DeleteServerGroupRequest) RequestURL ¶ added in v4.5.0
func (s DeleteServerGroupRequest) RequestURL() string
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 GetLoadBalancerBackendMemberRequest ¶ added in v4.4.0
type GetLoadBalancerBackendMemberRequest struct { ServiceUUID string `json:"-"` BackendName string `json:"-"` Name string `json:"-"` }
GetLoadBalancerBackendMemberRequest represents a request to get load balancer backend member details
func (*GetLoadBalancerBackendMemberRequest) RequestURL ¶ added in v4.4.0
func (r *GetLoadBalancerBackendMemberRequest) RequestURL() string
type GetLoadBalancerBackendMembersRequest ¶ added in v4.4.0
type GetLoadBalancerBackendMembersRequest struct { ServiceUUID string `json:"-"` BackendName string `json:"-"` }
GetLoadBalancerBackendMembersRequest represents a request to get load balancer backend member list
func (*GetLoadBalancerBackendMembersRequest) RequestURL ¶ added in v4.4.0
func (r *GetLoadBalancerBackendMembersRequest) RequestURL() string
type GetLoadBalancerBackendRequest ¶ added in v4.4.0
GetLoadBalancerBackendRequest represents a request to get load balancer backend details
func (*GetLoadBalancerBackendRequest) RequestURL ¶ added in v4.4.0
func (r *GetLoadBalancerBackendRequest) RequestURL() string
type GetLoadBalancerBackendsRequest ¶ added in v4.4.0
type GetLoadBalancerBackendsRequest struct {
ServiceUUID string `json:"-"`
}
GetLoadBalancerBackendsRequest represents a request to list load balancer backends
func (*GetLoadBalancerBackendsRequest) RequestURL ¶ added in v4.4.0
func (r *GetLoadBalancerBackendsRequest) RequestURL() string
type GetLoadBalancerCertificateBundleRequest ¶ added in v4.4.0
type GetLoadBalancerCertificateBundleRequest struct {
UUID string `json:"-"`
}
GetLoadBalancerCertificateBundleRequest represents a request to get certificate bundle details
func (*GetLoadBalancerCertificateBundleRequest) RequestURL ¶ added in v4.4.0
func (r *GetLoadBalancerCertificateBundleRequest) RequestURL() string
type GetLoadBalancerCertificateBundlesRequest ¶ added in v4.4.0
type GetLoadBalancerCertificateBundlesRequest struct {
Page *Page
}
GetLoadBalancerCertificateBundlesRequest represents a request to list certificate bundles List size can be filtered using optional Page object
func (*GetLoadBalancerCertificateBundlesRequest) RequestURL ¶ added in v4.4.0
func (r *GetLoadBalancerCertificateBundlesRequest) RequestURL() string
type GetLoadBalancerFrontendRequest ¶ added in v4.4.0
GetLoadBalancerFrontendRequest represents a request to get load balancer frontend details
func (*GetLoadBalancerFrontendRequest) RequestURL ¶ added in v4.4.0
func (r *GetLoadBalancerFrontendRequest) RequestURL() string
type GetLoadBalancerFrontendRuleRequest ¶ added in v4.4.0
type GetLoadBalancerFrontendRuleRequest struct { ServiceUUID string `json:"-"` FrontendName string `json:"-"` Name string `json:"-"` }
GetLoadBalancerFrontendRuleRequest represents a request to get frontend rule details
func (*GetLoadBalancerFrontendRuleRequest) RequestURL ¶ added in v4.4.0
func (r *GetLoadBalancerFrontendRuleRequest) RequestURL() string
type GetLoadBalancerFrontendRulesRequest ¶ added in v4.4.0
type GetLoadBalancerFrontendRulesRequest struct { ServiceUUID string `json:"-"` FrontendName string `json:"-"` }
GetLoadBalancerFrontendRulesRequest represents a request to list frontend rules
func (*GetLoadBalancerFrontendRulesRequest) RequestURL ¶ added in v4.4.0
func (r *GetLoadBalancerFrontendRulesRequest) RequestURL() string
type GetLoadBalancerFrontendTLSConfigRequest ¶ added in v4.4.0
type GetLoadBalancerFrontendTLSConfigRequest struct { ServiceUUID string `json:"-"` FrontendName string `json:"-"` Name string `json:"-"` }
GetLoadBalancerFrontendTLSConfigRequest represents a request to get frontend TLS config
func (*GetLoadBalancerFrontendTLSConfigRequest) RequestURL ¶ added in v4.4.0
func (r *GetLoadBalancerFrontendTLSConfigRequest) RequestURL() string
type GetLoadBalancerFrontendTLSConfigsRequest ¶ added in v4.4.0
type GetLoadBalancerFrontendTLSConfigsRequest struct { ServiceUUID string `json:"-"` FrontendName string `json:"-"` }
GetLoadBalancerFrontendTLSConfigsRequest represents a request to get frontend TLS configs
func (*GetLoadBalancerFrontendTLSConfigsRequest) RequestURL ¶ added in v4.4.0
func (r *GetLoadBalancerFrontendTLSConfigsRequest) RequestURL() string
type GetLoadBalancerFrontendsRequest ¶ added in v4.4.0
type GetLoadBalancerFrontendsRequest struct {
ServiceUUID string `json:"-"`
}
GetLoadBalancerFrontendsRequest represents a request to list load balancer frontends
func (*GetLoadBalancerFrontendsRequest) RequestURL ¶ added in v4.4.0
func (r *GetLoadBalancerFrontendsRequest) RequestURL() string
type GetLoadBalancerPlansRequest ¶ added in v4.4.0
type GetLoadBalancerPlansRequest struct {
Page *Page
}
GetLoadBalancerPlansRequest represents a request to list load balancer plans List size can be filtered using optional Page object
func (*GetLoadBalancerPlansRequest) RequestURL ¶ added in v4.4.0
func (r *GetLoadBalancerPlansRequest) RequestURL() string
type GetLoadBalancerRequest ¶ added in v4.4.0
type GetLoadBalancerRequest struct {
UUID string
}
GetLoadBalancerRequest represents a request to get load balancer details
func (*GetLoadBalancerRequest) RequestURL ¶ added in v4.4.0
func (r *GetLoadBalancerRequest) RequestURL() string
type GetLoadBalancerResolverRequest ¶ added in v4.4.0
GetLoadBalancerResolverRequest represents a request to get load balancer resolver details
func (*GetLoadBalancerResolverRequest) RequestURL ¶ added in v4.4.0
func (r *GetLoadBalancerResolverRequest) RequestURL() string
type GetLoadBalancerResolversRequest ¶ added in v4.4.0
type GetLoadBalancerResolversRequest struct {
ServiceUUID string `json:"-"`
}
GetLoadBalancerResolversRequest represents a request to get load balancer resolver list
func (*GetLoadBalancerResolversRequest) RequestURL ¶ added in v4.4.0
func (r *GetLoadBalancerResolversRequest) RequestURL() string
type GetLoadBalancersRequest ¶ added in v4.4.0
type GetLoadBalancersRequest struct {
Page *Page
}
GetLoadBalancersRequest represents a request to list load balancers List size can be filtered using optional Page object
func (*GetLoadBalancersRequest) RequestURL ¶ added in v4.4.0
func (r *GetLoadBalancersRequest) RequestURL() string
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 GetManagedDatabaseServiceTypeRequest ¶ added in v4.6.0
type GetManagedDatabaseServiceTypeRequest struct {
Type string
}
GetManagedDatabaseServiceTypeRequest represents a request to get details of a database type
func (*GetManagedDatabaseServiceTypeRequest) RequestURL ¶ added in v4.6.0
func (g *GetManagedDatabaseServiceTypeRequest) RequestURL() string
RequestURL implements the request.Request interface
type GetManagedDatabaseServiceTypesRequest ¶ added in v4.6.0
type GetManagedDatabaseServiceTypesRequest struct{}
GetManagedDatabaseServiceTypesRequest represents a request to get a map of available database types
func (*GetManagedDatabaseServiceTypesRequest) RequestURL ¶ added in v4.6.0
func (g *GetManagedDatabaseServiceTypesRequest) 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 GetManagedDatabaseVersionsRequest ¶ added in v4.3.0
type GetManagedDatabaseVersionsRequest struct {
UUID string `json:"-"`
}
GetManagedDatabaseVersionsRequests represents a request to list available versions of the Managed Database service by its UUID
func (*GetManagedDatabaseVersionsRequest) RequestURL ¶ added in v4.3.0
func (r *GetManagedDatabaseVersionsRequest) 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 GetServerGroupRequest ¶ added in v4.5.0
type GetServerGroupRequest struct {
UUID string `json:"-"`
}
GetServerGroupsRequest represents a request to get server group details
func (GetServerGroupRequest) RequestURL ¶ added in v4.5.0
func (s GetServerGroupRequest) RequestURL() string
type GetServerGroupsRequest ¶ added in v4.5.0
type GetServerGroupsRequest struct{}
GetServerGroupsRequest represents a request to list server groups
func (GetServerGroupsRequest) RequestURL ¶ added in v4.5.0
func (s GetServerGroupsRequest) RequestURL() string
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 LoadBalancerBackend ¶ added in v4.4.0
type LoadBalancerBackend struct { Name string `json:"name"` Resolver string `json:"resolver,omitempty"` Members []LoadBalancerBackendMember `json:"members"` Properties *upcloud.LoadBalancerBackendProperties `json:"properties,omitempty"` }
BalancerBackend represents the payload for CreateLoadBalancerBackendRequest
type LoadBalancerBackendMember ¶ added in v4.4.0
type LoadBalancerBackendMember struct { Name string `json:"name,omitempty"` Weight int `json:"weight"` MaxSessions int `json:"max_sessions"` Enabled bool `json:"enabled"` Type upcloud.LoadBalancerBackendMemberType `json:"type,omitempty"` IP string `json:"ip,omitempty"` Port int `json:"port,omitempty"` }
LoadBalancerBackendMember represents the payload for backend member request
func NewLoadBalancerDynamicBackendMember ¶ added in v4.4.0
func NewLoadBalancerStaticBackendMember ¶ added in v4.4.0
type LoadBalancerFrontend ¶ added in v4.4.0
type LoadBalancerFrontend struct { Name string `json:"name,omitempty"` Mode upcloud.LoadBalancerMode `json:"mode,omitempty"` Port int `json:"port,omitempty"` DefaultBackend string `json:"default_backend,omitempty"` Rules []LoadBalancerFrontendRule `json:"rules,omitempty"` TLSConfigs []LoadBalancerFrontendTLSConfig `json:"tls_configs,omitempty"` Properties *upcloud.LoadBalancerFrontendProperties `json:"properties,omitempty"` }
LoadBalancerFrontend represents frontend payload
type LoadBalancerFrontendRule ¶ added in v4.4.0
type LoadBalancerFrontendRule struct { Name string `json:"name"` Priority int `json:"priority"` // Set of rule matchers. // Use NewLoadBalancer<Type>Matcher helper functions to define matcher items. Matchers []upcloud.LoadBalancerMatcher `json:"matchers"` // Set of rule actions. // Use NewLoadBalancer<Type>Action helper functions to define action items Actions []upcloud.LoadBalancerAction `json:"actions"` }
LoadBalancerFrontendRule represents frontend rule payload
Example ¶
rule := LoadBalancerFrontendRule{ Name: "rule-name", Priority: 0, Matchers: []upcloud.LoadBalancerMatcher{ NewLoadBalancerHostMatcher("example.com"), NewLoadBalancerSrcPortRangeMatcher(8000, 9000), }, Actions: []upcloud.LoadBalancerAction{ NewLoadBalancerHTTPRedirectAction("https://internal.example.com"), }, } if js, err := json.Marshal(rule); err == nil { fmt.Println(string(js)) }
Output:
type LoadBalancerFrontendTLSConfig ¶ added in v4.4.0
type LoadBalancerFrontendTLSConfig struct { Name string `json:"name,omitempty"` CertificateBundleUUID string `json:"certificate_bundle_uuid,omitempty"` }
LoadBalancerFrontendTLSConfig represents TLS config payload
type LoadBalancerResolver ¶ added in v4.4.0
type LoadBalancerResolver struct { Name string `json:"name,omitempty"` Nameservers []string `json:"nameservers"` Retries int `json:"retries,omitempty"` Timeout int `json:"timeout,omitempty"` TimeoutRetry int `json:"timeout_retry,omitempty"` CacheValid int `json:"cache_valid,omitempty"` CacheInvalid int `json:"cache_invalid,omitempty"` }
LoadBalancerResolver represents resolver payload
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 ModifyLoadBalancerBackend ¶ added in v4.4.0
type ModifyLoadBalancerBackend struct { Name string `json:"name,omitempty"` Resolver *string `json:"resolver,omitempty"` Properties *upcloud.LoadBalancerBackendProperties `json:"properties,omitempty"` }
ModifyLoadBalancerBackend represents the payload for ModifyLoadBalancerBackendRequest
type ModifyLoadBalancerBackendMember ¶ added in v4.4.0
type ModifyLoadBalancerBackendMember struct { Type upcloud.LoadBalancerBackendMemberType `json:"type,omitempty"` Name string `json:"name,omitempty"` Weight *int `json:"weight,omitempty"` MaxSessions *int `json:"max_sessions,omitempty"` Enabled *bool `json:"enabled,omitempty"` IP *string `json:"ip,omitempty"` Port int `json:"port,omitempty"` }
ModifyLoadBalancerBackendMember represents the payload for backend member modification request
type ModifyLoadBalancerBackendMemberRequest ¶ added in v4.4.0
type ModifyLoadBalancerBackendMemberRequest struct { ServiceUUID string `json:"-"` BackendName string `json:"-"` Name string `json:"-"` Member ModifyLoadBalancerBackendMember }
ModifyLoadBalancerBackendMemberRequest represents a request to modify load balancer backend member
func (*ModifyLoadBalancerBackendMemberRequest) MarshalJSON ¶ added in v4.4.0
func (r *ModifyLoadBalancerBackendMemberRequest) MarshalJSON() ([]byte, error)
func (*ModifyLoadBalancerBackendMemberRequest) RequestURL ¶ added in v4.4.0
func (r *ModifyLoadBalancerBackendMemberRequest) RequestURL() string
type ModifyLoadBalancerBackendRequest ¶ added in v4.4.0
type ModifyLoadBalancerBackendRequest struct { ServiceUUID string `json:"-"` Name string `json:"-"` Backend ModifyLoadBalancerBackend }
ModifyLoadBalancerBackendRequest represents a request to modify load balancer backend
func (*ModifyLoadBalancerBackendRequest) MarshalJSON ¶ added in v4.4.0
func (r *ModifyLoadBalancerBackendRequest) MarshalJSON() ([]byte, error)
func (*ModifyLoadBalancerBackendRequest) RequestURL ¶ added in v4.4.0
func (r *ModifyLoadBalancerBackendRequest) RequestURL() string
type ModifyLoadBalancerCertificateBundleRequest ¶ added in v4.4.0
type ModifyLoadBalancerCertificateBundleRequest struct { UUID string `json:"-"` Name string `json:"name,omitempty"` Certificate string `json:"certificate,omitempty"` Intermediates *string `json:"intermediates,omitempty"` PrivateKey string `json:"private_key,omitempty"` Hostnames []string `json:"hostnames,omitempty"` }
ModifyLoadBalancerCertificateBundleRequest represents a request to modify certificate bundle
func (*ModifyLoadBalancerCertificateBundleRequest) RequestURL ¶ added in v4.4.0
func (r *ModifyLoadBalancerCertificateBundleRequest) RequestURL() string
type ModifyLoadBalancerFrontend ¶ added in v4.4.0
type ModifyLoadBalancerFrontend struct { Name string `json:"name,omitempty"` Mode upcloud.LoadBalancerMode `json:"mode,omitempty"` Port int `json:"port,omitempty"` DefaultBackend string `json:"default_backend,omitempty"` Properties *upcloud.LoadBalancerFrontendProperties `json:"properties,omitempty"` }
ModifyLoadBalancerFrontend represents payload to modify frontend
type ModifyLoadBalancerFrontendRequest ¶ added in v4.4.0
type ModifyLoadBalancerFrontendRequest struct { ServiceUUID string `json:"-"` Name string `json:"-"` Frontend ModifyLoadBalancerFrontend }
ModifyLoadBalancerFrontendRequest represents a request to modify load balancer frontend
func (*ModifyLoadBalancerFrontendRequest) MarshalJSON ¶ added in v4.4.0
func (r *ModifyLoadBalancerFrontendRequest) MarshalJSON() ([]byte, error)
func (*ModifyLoadBalancerFrontendRequest) RequestURL ¶ added in v4.4.0
func (r *ModifyLoadBalancerFrontendRequest) RequestURL() string
type ModifyLoadBalancerFrontendRule ¶ added in v4.4.0
type ModifyLoadBalancerFrontendRule struct { Name string `json:"name,omitempty"` Priority *int `json:"priority,omitempty"` }
ModifyLoadBalancerFrontendRule represents frontend rule modification payload
type ModifyLoadBalancerFrontendRuleRequest ¶ added in v4.4.0
type ModifyLoadBalancerFrontendRuleRequest struct { ServiceUUID string `json:"-"` FrontendName string `json:"-"` Name string `json:"-"` Rule ModifyLoadBalancerFrontendRule }
ModifyLoadBalancerFrontendRuleRequest represents a request to modify frontend rule
func (*ModifyLoadBalancerFrontendRuleRequest) MarshalJSON ¶ added in v4.4.0
func (r *ModifyLoadBalancerFrontendRuleRequest) MarshalJSON() ([]byte, error)
func (*ModifyLoadBalancerFrontendRuleRequest) RequestURL ¶ added in v4.4.0
func (r *ModifyLoadBalancerFrontendRuleRequest) RequestURL() string
type ModifyLoadBalancerFrontendTLSConfigRequest ¶ added in v4.4.0
type ModifyLoadBalancerFrontendTLSConfigRequest struct { ServiceUUID string `json:"-"` FrontendName string `json:"-"` Name string `json:"-"` Config LoadBalancerFrontendTLSConfig }
ModifyLoadBalancerFrontendTLSConfigRequest represents a request to modify frontend TLS config
func (*ModifyLoadBalancerFrontendTLSConfigRequest) MarshalJSON ¶ added in v4.4.0
func (r *ModifyLoadBalancerFrontendTLSConfigRequest) MarshalJSON() ([]byte, error)
func (*ModifyLoadBalancerFrontendTLSConfigRequest) RequestURL ¶ added in v4.4.0
func (r *ModifyLoadBalancerFrontendTLSConfigRequest) RequestURL() string
type ModifyLoadBalancerRequest ¶ added in v4.4.0
type ModifyLoadBalancerRequest struct { UUID string `json:"-"` Name string `json:"name,omitempty"` Plan string `json:"plan,omitempty"` ConfiguredStatus string `json:"configured_status,omitempty"` }
ModifyLoadBalancerRequest represents a request to modify load balancer
func (*ModifyLoadBalancerRequest) RequestURL ¶ added in v4.4.0
func (r *ModifyLoadBalancerRequest) RequestURL() string
type ModifyLoadBalancerResolverRequest ¶ added in v4.4.2
type ModifyLoadBalancerResolverRequest struct { ServiceUUID string `json:"-"` Name string `json:"-"` Resolver LoadBalancerResolver }
ModifyLoadBalancerResolverRequest represents a request to modify load balancer resolver
func (*ModifyLoadBalancerResolverRequest) MarshalJSON ¶ added in v4.4.2
func (r *ModifyLoadBalancerResolverRequest) MarshalJSON() ([]byte, error)
func (*ModifyLoadBalancerResolverRequest) RequestURL ¶ added in v4.4.2
func (r *ModifyLoadBalancerResolverRequest) RequestURL() string
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 ModifyServerGroupRequest ¶ added in v4.5.0
type ModifyServerGroupRequest struct { UUID string `json:"-"` Title string `json:"title,omitempty"` Members *upcloud.ServerUUIDSlice `json:"servers,omitempty"` }
ModifyServerGroupRequest represents a request to modify server group
func (ModifyServerGroupRequest) MarshalJSON ¶ added in v4.5.0
func (r ModifyServerGroupRequest) MarshalJSON() ([]byte, error)
MarshalJSON is a custom marshaller that deals with deeply embedded values.
func (ModifyServerGroupRequest) RequestURL ¶ added in v4.5.0
func (s ModifyServerGroupRequest) RequestURL() string
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 Page ¶ added in v4.4.0
type Page struct { // Size of the page limits the number of items in the list Size int // Page number sets offset where to start returning data. Number int }
Page represents list query filter that can be used to limit the number of results that are returned from the endpoint.
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 ReplaceLoadBalancerFrontendRuleRequest ¶ added in v4.4.0
type ReplaceLoadBalancerFrontendRuleRequest struct { ServiceUUID string `json:"-"` FrontendName string `json:"-"` Name string `json:"-"` Rule LoadBalancerFrontendRule }
ReplaceLoadBalancerFrontendRuleRequest represents a request to replace frontend rule
func (*ReplaceLoadBalancerFrontendRuleRequest) MarshalJSON ¶ added in v4.4.0
func (r *ReplaceLoadBalancerFrontendRuleRequest) MarshalJSON() ([]byte, error)
func (*ReplaceLoadBalancerFrontendRuleRequest) RequestURL ¶ added in v4.4.0
func (r *ReplaceLoadBalancerFrontendRuleRequest) RequestURL() string
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 ResizeStorageFilesystemRequest ¶ added in v4.2.0
type ResizeStorageFilesystemRequest struct {
UUID string
}
ResizeStorageFilesystemRequest represents a request to resize storage filesystem
func (*ResizeStorageFilesystemRequest) RequestURL ¶ added in v4.2.0
func (r *ResizeStorageFilesystemRequest) RequestURL() string
RequestURL implements the Request interface
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 UpgradeManagedDatabaseVersionRequest ¶ added in v4.3.0
type UpgradeManagedDatabaseVersionRequest struct { UUID string `json:"-"` TargetVersion string `json:"target_version,omitempty"` }
UpgradeManagedDatabaseVersionRequest represents a request to upgrade an existing managed database version; for a list of available versions use GetManagedDatabaseVersionsRequest
func (*UpgradeManagedDatabaseVersionRequest) RequestURL ¶ added in v4.3.0
func (r *UpgradeManagedDatabaseVersionRequest) RequestURL() string
RequestURL implements the request.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.