Documentation
¶
Index ¶
- type Action
- type ActionError
- type ActionGetResponse
- type ActionListResponse
- type ActionResourceReference
- type Certificate
- type CertificateCreateRequest
- type CertificateCreateResponse
- type CertificateGetResponse
- type CertificateListResponse
- type CertificateUpdateRequest
- type CertificateUpdateResponse
- type Datacenter
- type DatacenterGetResponse
- type DatacenterListResponse
- type Error
- type ErrorDetailsInvalidInput
- type ErrorResponse
- type FloatingIP
- type FloatingIPActionAssignRequest
- type FloatingIPActionAssignResponse
- type FloatingIPActionChangeDNSPtrRequest
- type FloatingIPActionChangeDNSPtrResponse
- type FloatingIPActionChangeProtectionRequest
- type FloatingIPActionChangeProtectionResponse
- type FloatingIPActionUnassignRequest
- type FloatingIPActionUnassignResponse
- type FloatingIPCreateRequest
- type FloatingIPCreateResponse
- type FloatingIPDNSPtr
- type FloatingIPGetResponse
- type FloatingIPListResponse
- type FloatingIPProtection
- type FloatingIPUpdateRequest
- type FloatingIPUpdateResponse
- type ISO
- type ISOGetResponse
- type ISOListResponse
- type Image
- type ImageActionChangeProtectionRequest
- type ImageActionChangeProtectionResponse
- type ImageCreatedFrom
- type ImageGetResponse
- type ImageListResponse
- type ImageProtection
- type ImageUpdateRequest
- type ImageUpdateResponse
- type LoadBalancer
- type LoadBalancerActionAddServiceRequest
- type LoadBalancerActionAddServiceResponse
- type LoadBalancerActionChangeAlgorithmRequest
- type LoadBalancerActionChangeAlgorithmResponse
- type LoadBalancerActionChangeProtectionRequest
- type LoadBalancerActionChangeProtectionResponse
- type LoadBalancerActionTargetRequest
- type LoadBalancerActionTargetResponse
- type LoadBalancerActionUpdateHealthCheckRequest
- type LoadBalancerActionUpdateHealthCheckResponse
- type LoadBalancerAlgorithm
- type LoadBalancerCreateRequest
- type LoadBalancerCreateResponse
- type LoadBalancerDeleteServiceRequest
- type LoadBalancerDeleteServiceResponse
- type LoadBalancerGetResponse
- type LoadBalancerListResponse
- type LoadBalancerProtection
- type LoadBalancerService
- type LoadBalancerServiceHTTP
- type LoadBalancerServiceHealthCheck
- type LoadBalancerServiceHealthCheckHTTP
- type LoadBalancerTarget
- type LoadBalancerTargetHealthStatus
- type LoadBalancerTargetLabelSelector
- type LoadBalancerTargetServer
- type LoadBalancerType
- type LoadBalancerTypeGetResponse
- type LoadBalancerTypeListResponse
- type LoadBalancerUpdateRequest
- type LoadBalancerUpdateResponse
- type Location
- type LocationGetResponse
- type LocationListResponse
- type Meta
- type MetaPagination
- type MetaResponse
- type Network
- type NetworkActionAddRouteRequest
- type NetworkActionAddRouteResponse
- type NetworkActionAddSubnetRequest
- type NetworkActionAddSubnetResponse
- type NetworkActionChangeIPRangeRequest
- type NetworkActionChangeIPRangeResponse
- type NetworkActionChangeProtectionRequest
- type NetworkActionChangeProtectionResponse
- type NetworkActionDeleteRouteRequest
- type NetworkActionDeleteRouteResponse
- type NetworkActionDeleteSubnetRequest
- type NetworkActionDeleteSubnetResponse
- type NetworkCreateRequest
- type NetworkCreateResponse
- type NetworkGetResponse
- type NetworkListResponse
- type NetworkProtection
- type NetworkRoute
- type NetworkSubnet
- type NetworkUpdateRequest
- type NetworkUpdateResponse
- type Price
- type Pricing
- type PricingFloatingIP
- type PricingGetResponse
- type PricingImage
- type PricingLoadBalancerType
- type PricingLoadBalancerTypePrice
- type PricingServerBackup
- type PricingServerType
- type PricingServerTypePrice
- type PricingTraffic
- type SSHKey
- type SSHKeyCreateRequest
- type SSHKeyCreateResponse
- type SSHKeyGetResponse
- type SSHKeyListResponse
- type SSHKeyUpdateRequest
- type SSHKeyUpdateResponse
- type Server
- type ServerActionAttachISORequest
- type ServerActionAttachISOResponse
- type ServerActionAttachToNetworkRequest
- type ServerActionAttachToNetworkResponse
- type ServerActionChangeAliasIPsRequest
- type ServerActionChangeAliasIPsResponse
- type ServerActionChangeDNSPtrRequest
- type ServerActionChangeDNSPtrResponse
- type ServerActionChangeProtectionRequest
- type ServerActionChangeProtectionResponse
- type ServerActionChangeTypeRequest
- type ServerActionChangeTypeResponse
- type ServerActionCreateImageRequest
- type ServerActionCreateImageResponse
- type ServerActionDetachFromNetworkRequest
- type ServerActionDetachFromNetworkResponse
- type ServerActionDetachISORequest
- type ServerActionDetachISOResponse
- type ServerActionDisableBackupRequest
- type ServerActionDisableBackupResponse
- type ServerActionDisableRescueRequest
- type ServerActionDisableRescueResponse
- type ServerActionEnableBackupRequest
- type ServerActionEnableBackupResponse
- type ServerActionEnableRescueRequest
- type ServerActionEnableRescueResponse
- type ServerActionPoweroffRequest
- type ServerActionPoweroffResponse
- type ServerActionPoweronRequest
- type ServerActionPoweronResponse
- type ServerActionRebootRequest
- type ServerActionRebootResponse
- type ServerActionRebuildRequest
- type ServerActionRebuildResponse
- type ServerActionResetPasswordRequest
- type ServerActionResetPasswordResponse
- type ServerActionResetRequest
- type ServerActionResetResponse
- type ServerActionShutdownRequest
- type ServerActionShutdownResponse
- type ServerCreateRequest
- type ServerCreateResponse
- type ServerGetResponse
- type ServerListResponse
- type ServerPrivateNet
- type ServerProtection
- type ServerPublicNet
- type ServerPublicNetIPv4
- type ServerPublicNetIPv6
- type ServerPublicNetIPv6DNSPtr
- type ServerType
- type ServerTypeGetResponse
- type ServerTypeListResponse
- type ServerUpdateRequest
- type ServerUpdateResponse
- type Volume
- type VolumeActionAttachVolumeRequest
- type VolumeActionAttachVolumeResponse
- type VolumeActionChangeProtectionRequest
- type VolumeActionChangeProtectionResponse
- type VolumeActionDetachVolumeRequest
- type VolumeActionDetachVolumeResponse
- type VolumeActionResizeVolumeRequest
- type VolumeActionResizeVolumeResponse
- type VolumeCreateRequest
- type VolumeCreateResponse
- type VolumeGetResponse
- type VolumeListResponse
- type VolumeProtection
- type VolumeUpdateRequest
- type VolumeUpdateResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action struct {
ID int `json:"id"`
Status string `json:"status"`
Command string `json:"command"`
Progress int `json:"progress"`
Started time.Time `json:"started"`
Finished *time.Time `json:"finished"`
Error *ActionError `json:"error"`
Resources []ActionResourceReference `json:"resources"`
}
Action defines the schema of an action.
type ActionError ¶
ActionError defines the schema of an error embedded in an action.
type ActionGetResponse ¶
type ActionGetResponse struct {
Action Action `json:"action"`
}
ActionGetResponse is the schema of the response when retrieving a single action.
type ActionListResponse ¶
type ActionListResponse struct {
Actions []Action `json:"actions"`
}
ActionListResponse defines the schema of the response when listing actions.
type ActionResourceReference ¶
ActionResourceReference defines the schema of an action resource reference.
type Certificate ¶ added in v1.18.0
type Certificate struct {
ID int `json:"id"`
Name string `json:"name"`
Labels map[string]string `json:"labels"`
Certificate string `json:"certificate"`
Chain string `json:"chain"`
Created time.Time `json:"created"`
NotValidBefore time.Time `json:"not_valid_before"`
NotValidAfter time.Time `json:"not_valid_after"`
DomainNames []string `json:"domain_names"`
Fingerprint string `json:"fingerprint"`
}
Certificate defines the schema of an certificate.
type CertificateCreateRequest ¶ added in v1.18.0
type CertificateCreateRequest struct {
Name string `json:"name"`
Certificate string `json:"certificate"`
Chain string `json:"chain,omitempty"`
PrivateKey string `json:"private_key"`
Labels map[string]string `json:"labels,omitempty"`
}
CertificateCreateRequest defines the schema of the request to create a certificate.
type CertificateCreateResponse ¶ added in v1.18.0
type CertificateCreateResponse struct {
Certificate Certificate `json:"certificate"`
}
CertificateCreateResponse defines the schema of the response when creating a certificate.
type CertificateGetResponse ¶ added in v1.18.0
type CertificateGetResponse struct {
Certificate Certificate `json:"certificate"`
}
CertificateGetResponse defines the schema of the response when retrieving a single Certificate.
type CertificateListResponse ¶ added in v1.18.0
type CertificateListResponse struct {
Certificates []Certificate `json:"certificates"`
}
CertificateListResponse defines the schema of the response when listing Certificates.
type CertificateUpdateRequest ¶ added in v1.18.0
type CertificateUpdateRequest struct {
Name string `json:"name,omitempty"`
Labels *map[string]string `json:"labels,omitempty"`
}
CertificateUpdateRequest defines the schema of the request to update a certificate.
type CertificateUpdateResponse ¶ added in v1.18.0
type CertificateUpdateResponse struct {
Certificate Certificate `json:"certificate"`
}
CertificateUpdateResponse defines the schema of the response when updating a certificate.
type Datacenter ¶
type Datacenter struct {
ID int `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Location Location `json:"location"`
ServerTypes struct {
Supported []int `json:"supported"`
Available []int `json:"available"`
} `json:"server_types"`
}
Datacenter defines the schema of a datacenter.
type DatacenterGetResponse ¶
type DatacenterGetResponse struct {
Datacenter Datacenter `json:"datacenter"`
}
DatacenterGetResponse defines the schema of the response when retrieving a single datacenter.
type DatacenterListResponse ¶
type DatacenterListResponse struct {
Datacenters []Datacenter `json:"datacenters"`
}
DatacenterListResponse defines the schema of the response when listing datacenters.
type Error ¶
type Error struct {
Code string `json:"code"`
Message string `json:"message"`
DetailsRaw json.RawMessage `json:"details"`
Details interface{}
}
Error represents the schema of an error response.
func (*Error) UnmarshalJSON ¶
UnmarshalJSON overrides default json unmarshalling.
type ErrorDetailsInvalidInput ¶
type ErrorDetailsInvalidInput struct {
Fields []struct {
Name string `json:"name"`
Messages []string `json:"messages"`
} `json:"fields"`
}
ErrorDetailsInvalidInput defines the schema of the Details field of an error with code 'invalid_input'.
type ErrorResponse ¶
type ErrorResponse struct {
Error Error `json:"error"`
}
ErrorResponse defines the schema of a response containing an error.
type FloatingIP ¶
type FloatingIP struct {
ID int `json:"id"`
Description *string `json:"description"`
Created time.Time `json:"created"`
IP string `json:"ip"`
Type string `json:"type"`
Server *int `json:"server"`
DNSPtr []FloatingIPDNSPtr `json:"dns_ptr"`
HomeLocation Location `json:"home_location"`
Blocked bool `json:"blocked"`
Protection FloatingIPProtection `json:"protection"`
Labels map[string]string `json:"labels"`
Name string `json:"name"`
}
FloatingIP defines the schema of a Floating IP.
type FloatingIPActionAssignRequest ¶
type FloatingIPActionAssignRequest struct {
Server int `json:"server"`
}
FloatingIPActionAssignRequest defines the schema of the request to create an assign Floating IP action.
type FloatingIPActionAssignResponse ¶
type FloatingIPActionAssignResponse struct {
Action Action `json:"action"`
}
FloatingIPActionAssignResponse defines the schema of the response when creating an assign action.
type FloatingIPActionChangeDNSPtrRequest ¶
type FloatingIPActionChangeDNSPtrRequest struct {
IP string `json:"ip"`
DNSPtr *string `json:"dns_ptr"`
}
FloatingIPActionChangeDNSPtrRequest defines the schema for the request to change a Floating IP's reverse DNS pointer.
type FloatingIPActionChangeDNSPtrResponse ¶
type FloatingIPActionChangeDNSPtrResponse struct {
Action Action `json:"action"`
}
FloatingIPActionChangeDNSPtrResponse defines the schema of the response when creating a change_dns_ptr Floating IP action.
type FloatingIPActionChangeProtectionRequest ¶ added in v1.6.0
type FloatingIPActionChangeProtectionRequest struct {
Delete *bool `json:"delete,omitempty"`
}
FloatingIPActionChangeProtectionRequest defines the schema of the request to change the resource protection of a Floating IP.
type FloatingIPActionChangeProtectionResponse ¶ added in v1.6.0
type FloatingIPActionChangeProtectionResponse struct {
Action Action `json:"action"`
}
FloatingIPActionChangeProtectionResponse defines the schema of the response when changing the resource protection of a Floating IP.
type FloatingIPActionUnassignRequest ¶
type FloatingIPActionUnassignRequest struct{}
FloatingIPActionUnassignRequest defines the schema of the request to create an unassign Floating IP action.
type FloatingIPActionUnassignResponse ¶
type FloatingIPActionUnassignResponse struct {
Action Action `json:"action"`
}
FloatingIPActionUnassignResponse defines the schema of the response when creating an unassign action.
type FloatingIPCreateRequest ¶
type FloatingIPCreateRequest struct {
Type string `json:"type"`
HomeLocation *string `json:"home_location,omitempty"`
Server *int `json:"server,omitempty"`
Description *string `json:"description,omitempty"`
Labels *map[string]string `json:"labels,omitempty"`
Name *string `json:"name,omitempty"`
}
FloatingIPCreateRequest defines the schema of the request to create a Floating IP.
type FloatingIPCreateResponse ¶
type FloatingIPCreateResponse struct {
FloatingIP FloatingIP `json:"floating_ip"`
Action *Action `json:"action"`
}
FloatingIPCreateResponse defines the schema of the response when creating a Floating IP.
type FloatingIPDNSPtr ¶
FloatingIPDNSPtr contains reverse DNS information for a IPv4 or IPv6 Floating IP.
type FloatingIPGetResponse ¶
type FloatingIPGetResponse struct {
FloatingIP FloatingIP `json:"floating_ip"`
}
FloatingIPGetResponse defines the schema of the response when retrieving a single Floating IP.
type FloatingIPListResponse ¶
type FloatingIPListResponse struct {
FloatingIPs []FloatingIP `json:"floating_ips"`
}
FloatingIPListResponse defines the schema of the response when listing Floating IPs.
type FloatingIPProtection ¶ added in v1.6.0
type FloatingIPProtection struct {
Delete bool `json:"delete"`
}
FloatingIPProtection represents the protection level of a Floating IP.
type FloatingIPUpdateRequest ¶
type FloatingIPUpdateRequest struct {
Description string `json:"description,omitempty"`
Labels *map[string]string `json:"labels,omitempty"`
Name string `json:"name,omitempty"`
}
FloatingIPUpdateRequest defines the schema of the request to update a Floating IP.
type FloatingIPUpdateResponse ¶
type FloatingIPUpdateResponse struct {
FloatingIP FloatingIP `json:"floating_ip"`
}
FloatingIPUpdateResponse defines the schema of the response when updating a Floating IP.
type ISO ¶
type ISO struct {
ID int `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Type string `json:"type"`
Deprecated time.Time `json:"deprecated"`
}
ISO defines the schema of an ISO image.
type ISOGetResponse ¶
type ISOGetResponse struct {
ISO ISO `json:"iso"`
}
ISOGetResponse defines the schema of the response when retrieving a single ISO.
type ISOListResponse ¶
type ISOListResponse struct {
ISOs []ISO `json:"isos"`
}
ISOListResponse defines the schema of the response when listing ISOs.
type Image ¶
type Image struct {
ID int `json:"id"`
Status string `json:"status"`
Type string `json:"type"`
Name *string `json:"name"`
Description string `json:"description"`
ImageSize *float32 `json:"image_size"`
DiskSize float32 `json:"disk_size"`
Created time.Time `json:"created"`
CreatedFrom *ImageCreatedFrom `json:"created_from"`
BoundTo *int `json:"bound_to"`
OSFlavor string `json:"os_flavor"`
OSVersion *string `json:"os_version"`
RapidDeploy bool `json:"rapid_deploy"`
Protection ImageProtection `json:"protection"`
Deprecated time.Time `json:"deprecated"`
Labels map[string]string `json:"labels"`
}
Image defines the schema of an image.
type ImageActionChangeProtectionRequest ¶ added in v1.6.0
type ImageActionChangeProtectionRequest struct {
Delete *bool `json:"delete,omitempty"`
}
ImageActionChangeProtectionRequest defines the schema of the request to change the resource protection of an image.
type ImageActionChangeProtectionResponse ¶ added in v1.6.0
type ImageActionChangeProtectionResponse struct {
Action Action `json:"action"`
}
ImageActionChangeProtectionResponse defines the schema of the response when changing the resource protection of an image.
type ImageCreatedFrom ¶
ImageCreatedFrom defines the schema of the images created from reference.
type ImageGetResponse ¶
type ImageGetResponse struct {
Image Image `json:"image"`
}
ImageGetResponse defines the schema of the response when retrieving a single image.
type ImageListResponse ¶
type ImageListResponse struct {
Images []Image `json:"images"`
}
ImageListResponse defines the schema of the response when listing images.
type ImageProtection ¶ added in v1.6.0
type ImageProtection struct {
Delete bool `json:"delete"`
}
ImageProtection represents the protection level of a image.
type ImageUpdateRequest ¶
type ImageUpdateRequest struct {
Description *string `json:"description,omitempty"`
Type *string `json:"type,omitempty"`
Labels *map[string]string `json:"labels,omitempty"`
}
ImageUpdateRequest defines the schema of the request to update an image.
type ImageUpdateResponse ¶
type ImageUpdateResponse struct {
Image Image `json:"image"`
}
ImageUpdateResponse defines the schema of the response when updating an image.
type LoadBalancer ¶ added in v1.18.0
type LoadBalancer struct {
ID int `json:"id"`
Name string `json:"name"`
IPv4 string `json:"ipv4"`
IPv6 string `json:"ipv6"`
Location Location `json:"location"`
LoadBalancerType LoadBalancerType `json:"load_balancer_type"`
Protection LoadBalancerProtection `json:"protection"`
Labels map[string]string `json:"labels"`
Created time.Time `json:"created"`
Services []LoadBalancerService `json:"services"`
Targets []LoadBalancerTarget `json:"targets"`
Algorithm LoadBalancerAlgorithm `json:"algorithm"`
}
LoadBalancer represents a Load Balancer in the Hetzner Cloud.
type LoadBalancerActionAddServiceRequest ¶ added in v1.18.0
type LoadBalancerActionAddServiceRequest struct {
Protocol string `json:"protocol"`
ListenPort int `json:"listen_port,omitempty"`
DestinationPort int `json:"destination_port,omitempty"`
ProxyProtocol *bool `json:"proxyprotocol,omitempty"`
HTTP *LoadBalancerServiceHTTP `json:"http,omitempty"`
HealthCheck *LoadBalancerServiceHealthCheck `json:"health_check,omitempty"`
}
LoadBalancerActionAddServiceRequest defines the schema of the request to adding a service to a Load Balancer.
type LoadBalancerActionAddServiceResponse ¶ added in v1.18.0
type LoadBalancerActionAddServiceResponse struct {
Action Action `json:"action"`
}
LoadBalancerActionAddServiceResponse defines the schema of the response when creating a add service action.
type LoadBalancerActionChangeAlgorithmRequest ¶ added in v1.18.0
type LoadBalancerActionChangeAlgorithmRequest struct {
Type string `json:"type"`
}
LoadBalancerActionChangeAlgorithmRequest defines the schema of the request to change the algorithm of a load balancer.
type LoadBalancerActionChangeAlgorithmResponse ¶ added in v1.18.0
type LoadBalancerActionChangeAlgorithmResponse struct {
Action Action `json:"action"`
}
LoadBalancerActionChangeAlgorithmResponse defines the schema of the response when changing the algorithm of a load balancer.
type LoadBalancerActionChangeProtectionRequest ¶ added in v1.18.0
type LoadBalancerActionChangeProtectionRequest struct {
Delete *bool `json:"delete,omitempty"`
}
LoadBalancerActionChangeProtectionRequest defines the schema of the request to change the resource protection of a load balancer.
type LoadBalancerActionChangeProtectionResponse ¶ added in v1.18.0
type LoadBalancerActionChangeProtectionResponse struct {
Action Action `json:"action"`
}
LoadBalancerActionChangeProtectionResponse defines the schema of the response when changing the resource protection of a load balancer.
type LoadBalancerActionTargetRequest ¶
type LoadBalancerActionTargetRequest struct {
Type string `json:"type"`
Server *LoadBalancerTargetServer `json:"server"`
LabelSelector *LoadBalancerTargetLabelSelector `json:"label_selector,omitempty"`
}
LoadBalancerActionTargetRequest defines the schema of the request to add or remove a target from a Load Balancer.
type LoadBalancerActionTargetResponse ¶
type LoadBalancerActionTargetResponse struct {
Action Action `json:"action"`
}
LoadBalancerActionTargetResponse defines the schema of the response when adding or removing a target from a Load Balancer.
type LoadBalancerActionUpdateHealthCheckRequest ¶
type LoadBalancerActionUpdateHealthCheckRequest struct {
ListenPort int `json:"listen_port"`
HealthCheck LoadBalancerServiceHealthCheck `json:"health_check"`
}
LoadBalancerActionUpdateHealthCheckRequest defines the schema of the request to updates the health check of a load balancer service.
type LoadBalancerActionUpdateHealthCheckResponse ¶
type LoadBalancerActionUpdateHealthCheckResponse struct {
Action Action `json:"action"`
}
LoadBalancerActionUpdateHealthCheckResponse defines the schema of the response when updating the health check of a load balancer service.
type LoadBalancerAlgorithm ¶ added in v1.18.0
type LoadBalancerAlgorithm struct {
Type string `json:"type"`
}
LoadBalancerAlgorithm represents the algorithm of a Load Balancer.
type LoadBalancerCreateRequest ¶ added in v1.18.0
type LoadBalancerCreateRequest struct {
Name string `json:"name"`
LoadBalancerType interface{} `json:"load_balancer_type"` // int or string
Algorithm *LoadBalancerAlgorithm `json:"algorithm,omitempty"`
Location string `json:"location,omitempty"`
NetworkZone string `json:"network_zone,omitempty"`
Labels *map[string]string `json:"labels,omitempty"`
Targets []LoadBalancerTarget `json:"targets,omitempty"`
Services []LoadBalancerService `json:"services,omitempty"`
}
LoadBalancerCreateRequest defines the schema of the request to create a LoadBalancer.
type LoadBalancerCreateResponse ¶ added in v1.18.0
type LoadBalancerCreateResponse struct {
LoadBalancer LoadBalancer `json:"load_balancer"`
Action Action `json:"action"`
}
LoadBalancerCreateResponse defines the schema of the response to create a LoadBalancer.
type LoadBalancerDeleteServiceRequest ¶ added in v1.18.0
type LoadBalancerDeleteServiceRequest struct {
ListenPort int `json:"listen_port"`
}
LoadBalancerDeleteServiceRequest defines the schema of the request to delete a service from a Load Balancer.
type LoadBalancerDeleteServiceResponse ¶ added in v1.18.0
type LoadBalancerDeleteServiceResponse struct {
Action Action `json:"action"`
}
LoadBalancerDeleteServiceResponse defines the schema of the response when creating a delete_service action.
type LoadBalancerGetResponse ¶ added in v1.18.0
type LoadBalancerGetResponse struct {
LoadBalancer LoadBalancer `json:"load_balancer"`
}
LoadBalancerGetResponse defines the schema of the response when retrieving a single Load Balancer.
type LoadBalancerListResponse ¶ added in v1.18.0
type LoadBalancerListResponse struct {
LoadBalancers []LoadBalancer `json:"load_balancers"`
}
LoadBalancerListResponse defines the schema of the response when listing Load Balancer.
type LoadBalancerProtection ¶ added in v1.18.0
type LoadBalancerProtection struct {
Delete bool `json:"delete"`
}
LoadBalancerProtection represents the protection level of a Load Balancer.
type LoadBalancerService ¶ added in v1.18.0
type LoadBalancerService struct {
Protocol string `json:"protocol"`
ListenPort int `json:"listen_port,omitempty"`
DestinationPort int `json:"destination_port,omitempty"`
Proxyprotocol bool `json:"proxyprotocol,omitempty"`
HTTP *LoadBalancerServiceHTTP `json:"http,omitempty"`
HealthCheck *LoadBalancerServiceHealthCheck `json:"health_check,omitempty"`
}
LoadBalancerService represents a service of a Load Balancer.
type LoadBalancerServiceHTTP ¶ added in v1.18.0
type LoadBalancerServiceHTTP struct {
CookieName string `json:"cookie_name,omitempty"`
CookieLifetime int `json:"cookie_lifetime,omitempty"`
Certificates []int `json:"certificates,omitempty"`
}
LoadBalancerServiceHTTP represents the http configuration for a LoadBalancerService.
type LoadBalancerServiceHealthCheck ¶ added in v1.18.0
type LoadBalancerServiceHealthCheck struct {
Protocol string `json:"protocol"`
Port int `json:"port"`
Interval int `json:"interval"`
Timeout int `json:"timeout"`
Retries int `json:"retries"`
HTTP *LoadBalancerServiceHealthCheckHTTP `json:"http,omitempty"`
}
LoadBalancerServiceHealthCheck represents a service health check configuration.
type LoadBalancerServiceHealthCheckHTTP ¶ added in v1.18.0
type LoadBalancerServiceHealthCheckHTTP struct {
Domain string `json:"domain"`
Path string `json:"path"`
Response string `json:"response"`
StatusCodes []int `json:"status_codes"`
TLS bool `json:"tls"`
}
LoadBalancerServiceHealthCheckHTTP represents a http health check configuration.
type LoadBalancerTarget ¶ added in v1.18.0
type LoadBalancerTarget struct {
Type string `json:"type"`
Server *LoadBalancerTargetServer `json:"server,omitempty"`
LabelSelector *LoadBalancerTargetLabelSelector `json:"label_selector,omitempty"`
HealthStatus []LoadBalancerTargetHealthStatus `json:"health_status,omitempty"`
}
LoadBalancerTarget represents a target of a Load Balancer.
type LoadBalancerTargetHealthStatus ¶ added in v1.18.0
type LoadBalancerTargetHealthStatus struct {
ListenPort int `json:"listen_port"`
Status string `json:"status"`
}
LoadBalancerTargetHealthStatus represents a health status of target of a Load Balancer.
type LoadBalancerTargetLabelSelector ¶ added in v1.20.0
type LoadBalancerTargetLabelSelector struct {
Selector string `json:"selector"`
}
LoadBalancerTargetLabelSelector represents a label selector target of a Load Balancer.
type LoadBalancerTargetServer ¶ added in v1.18.0
type LoadBalancerTargetServer struct {
ID int `json:"id"`
}
LoadBalancerTargetServer represents a server target of a Load Balancer.
type LoadBalancerType ¶ added in v1.18.0
type LoadBalancerType struct {
ID int `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
MaxConnections int `json:"max_connections"`
MaxServices int `json:"max_services"`
MaxTargets int `json:"max_targets"`
MaxAssignedCertificates int `json:"max_assigned_certificates"`
Prices []PricingLoadBalancerTypePrice `json:"prices"`
}
LoadBalancerType defines the schema of a LoadBalancer type.
type LoadBalancerTypeGetResponse ¶ added in v1.18.0
type LoadBalancerTypeGetResponse struct {
LoadBalancerType LoadBalancerType `json:"load_balancer_type"`
}
LoadBalancerTypeGetResponse defines the schema of the response when retrieving a single LoadBalancer type.
type LoadBalancerTypeListResponse ¶ added in v1.18.0
type LoadBalancerTypeListResponse struct {
LoadBalancerTypes []LoadBalancerType `json:"load_balancer_types"`
}
LoadBalancerTypeListResponse defines the schema of the response when listing LoadBalancer types.
type LoadBalancerUpdateRequest ¶ added in v1.18.0
type LoadBalancerUpdateRequest struct {
Name string `json:"name,omitempty"`
Labels *map[string]string `json:"labels,omitempty"`
}
LoadBalancerUpdateRequest defines the schema of the request to update a load balancer.
type LoadBalancerUpdateResponse ¶ added in v1.18.0
type LoadBalancerUpdateResponse struct {
LoadBalancer LoadBalancer `json:"load_balancer"`
}
LoadBalancerUpdateResponse defines the schema of the response when updating a load balancer.
type Location ¶
type Location struct {
ID int `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Country string `json:"country"`
City string `json:"city"`
Latitude float64 `json:"latitude"`
Longitude float64 `json:"longitude"`
NetworkZone string `json:"network_zone"`
}
Location defines the schema of a location.
type LocationGetResponse ¶
type LocationGetResponse struct {
Location Location `json:"location"`
}
LocationGetResponse defines the schema of the response when retrieving a single location.
type LocationListResponse ¶
type LocationListResponse struct {
Locations []Location `json:"locations"`
}
LocationListResponse defines the schema of the response when listing locations.
type Meta ¶
type Meta struct {
Pagination *MetaPagination `json:"pagination"`
}
Meta defines the schema of meta information which may be included in responses.
type MetaPagination ¶
type MetaPagination struct {
Page int `json:"page"`
PerPage int `json:"per_page"`
PreviousPage int `json:"previous_page"`
NextPage int `json:"next_page"`
LastPage int `json:"last_page"`
TotalEntries int `json:"total_entries"`
}
MetaPagination defines the schema of pagination information.
type MetaResponse ¶
type MetaResponse struct {
Meta Meta `json:"meta"`
}
MetaResponse defines the schema of a response containing meta information.
type Network ¶ added in v1.14.0
type Network struct {
ID int `json:"id"`
Name string `json:"name"`
Created time.Time `json:"created"`
IPRange string `json:"ip_range"`
Subnets []NetworkSubnet `json:"subnets"`
Routes []NetworkRoute `json:"routes"`
Servers []int `json:"servers"`
Protection NetworkProtection `json:"protection"`
Labels map[string]string `json:"labels"`
}
Network defines the schema of a network.
type NetworkActionAddRouteRequest ¶ added in v1.14.0
type NetworkActionAddRouteRequest struct {
Destination string `json:"destination"`
Gateway string `json:"gateway"`
}
NetworkActionAddRouteRequest defines the schema of the request to add a route to a network.
type NetworkActionAddRouteResponse ¶ added in v1.14.0
type NetworkActionAddRouteResponse struct {
Action Action `json:"action"`
}
NetworkActionAddRouteResponse defines the schema of the response when adding a route to a network.
type NetworkActionAddSubnetRequest ¶ added in v1.14.0
type NetworkActionAddSubnetRequest struct {
Type string `json:"type"`
IPRange string `json:"ip_range,omitempty"`
NetworkZone string `json:"network_zone"`
Gateway string `json:"gateway"`
}
NetworkActionAddSubnetRequest defines the schema of the request to add a subnet to a network.
type NetworkActionAddSubnetResponse ¶ added in v1.14.0
type NetworkActionAddSubnetResponse struct {
Action Action `json:"action"`
}
NetworkActionAddSubnetResponse defines the schema of the response when adding a subnet to a network.
type NetworkActionChangeIPRangeRequest ¶ added in v1.14.0
type NetworkActionChangeIPRangeRequest struct {
IPRange string `json:"ip_range"`
}
NetworkActionChangeIPRangeRequest defines the schema of the request to change the IP range of a network.
type NetworkActionChangeIPRangeResponse ¶ added in v1.14.0
type NetworkActionChangeIPRangeResponse struct {
Action Action `json:"action"`
}
NetworkActionChangeIPRangeResponse defines the schema of the response when changing the IP range of a network.
type NetworkActionChangeProtectionRequest ¶ added in v1.14.0
type NetworkActionChangeProtectionRequest struct {
Delete *bool `json:"delete,omitempty"`
}
NetworkActionChangeProtectionRequest defines the schema of the request to change the resource protection of a network.
type NetworkActionChangeProtectionResponse ¶ added in v1.14.0
type NetworkActionChangeProtectionResponse struct {
Action Action `json:"action"`
}
NetworkActionChangeProtectionResponse defines the schema of the response when changing the resource protection of a network.
type NetworkActionDeleteRouteRequest ¶ added in v1.14.0
type NetworkActionDeleteRouteRequest struct {
Destination string `json:"destination"`
Gateway string `json:"gateway"`
}
NetworkActionDeleteRouteRequest defines the schema of the request to delete a route from a network.
type NetworkActionDeleteRouteResponse ¶ added in v1.14.0
type NetworkActionDeleteRouteResponse struct {
Action Action `json:"action"`
}
NetworkActionDeleteRouteResponse defines the schema of the response when deleting a route from a network.
type NetworkActionDeleteSubnetRequest ¶ added in v1.14.0
type NetworkActionDeleteSubnetRequest struct {
IPRange string `json:"ip_range"`
}
NetworkActionDeleteSubnetRequest defines the schema of the request to delete a subnet from a network.
type NetworkActionDeleteSubnetResponse ¶ added in v1.14.0
type NetworkActionDeleteSubnetResponse struct {
Action Action `json:"action"`
}
NetworkActionDeleteSubnetResponse defines the schema of the response when deleting a subnet from a network.
type NetworkCreateRequest ¶ added in v1.14.0
type NetworkCreateRequest struct {
Name string `json:"name"`
IPRange string `json:"ip_range"`
Subnets []NetworkSubnet `json:"subnets,omitempty"`
Routes []NetworkRoute `json:"routes,omitempty"`
Labels *map[string]string `json:"labels,omitempty"`
}
NetworkCreateRequest defines the schema of the request to create a network.
type NetworkCreateResponse ¶ added in v1.14.0
type NetworkCreateResponse struct {
Network Network `json:"network"`
}
NetworkCreateResponse defines the schema of the response when creating a network.
type NetworkGetResponse ¶ added in v1.14.0
type NetworkGetResponse struct {
Network Network `json:"network"`
}
NetworkGetResponse defines the schema of the response when retrieving a single network.
type NetworkListResponse ¶ added in v1.14.0
type NetworkListResponse struct {
Networks []Network `json:"networks"`
}
NetworkListResponse defines the schema of the response when listing networks.
type NetworkProtection ¶ added in v1.14.0
type NetworkProtection struct {
Delete bool `json:"delete"`
}
NetworkProtection represents the protection level of a network.
type NetworkRoute ¶ added in v1.14.0
type NetworkRoute struct {
Destination string `json:"destination"`
Gateway string `json:"gateway"`
}
NetworkRoute represents a route of a network.
type NetworkSubnet ¶ added in v1.14.0
type NetworkSubnet struct {
Type string `json:"type"`
IPRange string `json:"ip_range"`
NetworkZone string `json:"network_zone"`
Gateway string `json:"gateway"`
}
NetworkSubnet represents a subnet of a network.
type NetworkUpdateRequest ¶ added in v1.14.0
type NetworkUpdateRequest struct {
Name string `json:"name,omitempty"`
Labels *map[string]string `json:"labels,omitempty"`
}
NetworkUpdateRequest defines the schema of the request to update a network.
type NetworkUpdateResponse ¶ added in v1.14.0
type NetworkUpdateResponse struct {
Network Network `json:"network"`
}
NetworkUpdateResponse defines the schema of the response when updating a network.
type Pricing ¶
type Pricing struct {
Currency string `json:"currency"`
VATRate string `json:"vat_rate"`
Image PricingImage `json:"image"`
FloatingIP PricingFloatingIP `json:"floating_ip"`
Traffic PricingTraffic `json:"traffic"`
ServerBackup PricingServerBackup `json:"server_backup"`
ServerTypes []PricingServerType `json:"server_types"`
LoadBalancerTypes []PricingLoadBalancerType `json:"load_balancer_types"`
}
Pricing defines the schema for pricing information.
type PricingFloatingIP ¶
type PricingFloatingIP struct {
PriceMonthly Price `json:"price_monthly"`
}
PricingFloatingIP defines the schema of pricing information for a Floating IP.
type PricingGetResponse ¶
type PricingGetResponse struct {
Pricing Pricing `json:"pricing"`
}
PricingGetResponse defines the schema of the response when retrieving pricing information.
type PricingImage ¶
type PricingImage struct {
PricePerGBMonth Price `json:"price_per_gb_month"`
}
PricingImage defines the schema of pricing information for an image.
type PricingLoadBalancerType ¶ added in v1.18.0
type PricingLoadBalancerType struct {
ID int `json:"id"`
Name string `json:"name"`
Prices []PricingLoadBalancerTypePrice `json:"prices"`
}
PricingLoadBalancerType defines the schema of pricing information for a Load Balancer type.
type PricingLoadBalancerTypePrice ¶ added in v1.18.0
type PricingLoadBalancerTypePrice struct {
Location string `json:"location"`
PriceHourly Price `json:"price_hourly"`
PriceMonthly Price `json:"price_monthly"`
}
PricingLoadBalancerTypePrice defines the schema of pricing information for a Load Balancer type at a location.
type PricingServerBackup ¶
type PricingServerBackup struct {
Percentage string `json:"percentage"`
}
PricingServerBackup defines the schema of pricing information for server backups.
type PricingServerType ¶
type PricingServerType struct {
ID int `json:"id"`
Name string `json:"name"`
Prices []PricingServerTypePrice `json:"prices"`
}
PricingServerType defines the schema of pricing information for a server type.
type PricingServerTypePrice ¶
type PricingServerTypePrice struct {
Location string `json:"location"`
PriceHourly Price `json:"price_hourly"`
PriceMonthly Price `json:"price_monthly"`
}
PricingServerTypePrice defines the schema of pricing information for a server type at a location.
type PricingTraffic ¶
type PricingTraffic struct {
PricePerTB Price `json:"price_per_tb"`
}
PricingTraffic defines the schema of pricing information for traffic.
type SSHKey ¶
type SSHKey struct {
ID int `json:"id"`
Name string `json:"name"`
Fingerprint string `json:"fingerprint"`
PublicKey string `json:"public_key"`
Labels map[string]string `json:"labels"`
Created time.Time `json:"created"`
}
SSHKey defines the schema of a SSH key.
type SSHKeyCreateRequest ¶
type SSHKeyCreateRequest struct {
Name string `json:"name"`
PublicKey string `json:"public_key"`
Labels *map[string]string `json:"labels,omitempty"`
}
SSHKeyCreateRequest defines the schema of the request to create a SSH key.
type SSHKeyCreateResponse ¶
type SSHKeyCreateResponse struct {
SSHKey SSHKey `json:"ssh_key"`
}
SSHKeyCreateResponse defines the schema of the response when creating a SSH key.
type SSHKeyGetResponse ¶
type SSHKeyGetResponse struct {
SSHKey SSHKey `json:"ssh_key"`
}
SSHKeyGetResponse defines the schema of the response when retrieving a single SSH key.
type SSHKeyListResponse ¶
type SSHKeyListResponse struct {
SSHKeys []SSHKey `json:"ssh_keys"`
}
SSHKeyListResponse defines the schema of the response when listing SSH keys.
type SSHKeyUpdateRequest ¶
type SSHKeyUpdateRequest struct {
Name string `json:"name,omitempty"`
Labels *map[string]string `json:"labels,omitempty"`
}
SSHKeyUpdateRequest defines the schema of the request to update a SSH key.
type SSHKeyUpdateResponse ¶
type SSHKeyUpdateResponse struct {
SSHKey SSHKey `json:"ssh_key"`
}
SSHKeyUpdateResponse defines the schema of the response when updating a SSH key.
type Server ¶
type Server struct {
ID int `json:"id"`
Name string `json:"name"`
Status string `json:"status"`
Created time.Time `json:"created"`
PublicNet ServerPublicNet `json:"public_net"`
PrivateNet []ServerPrivateNet `json:"private_net"`
ServerType ServerType `json:"server_type"`
IncludedTraffic uint64 `json:"included_traffic"`
OutgoingTraffic *uint64 `json:"outgoing_traffic"`
IngoingTraffic *uint64 `json:"ingoing_traffic"`
BackupWindow *string `json:"backup_window"`
RescueEnabled bool `json:"rescue_enabled"`
ISO *ISO `json:"iso"`
Locked bool `json:"locked"`
Datacenter Datacenter `json:"datacenter"`
Image *Image `json:"image"`
Protection ServerProtection `json:"protection"`
Labels map[string]string `json:"labels"`
Volumes []int `json:"volumes"`
}
Server defines the schema of a server.
type ServerActionAttachISORequest ¶
type ServerActionAttachISORequest struct {
ISO interface{} `json:"iso"` // int or string
}
ServerActionAttachISORequest defines the schema for the request to attach an ISO to a server.
type ServerActionAttachISOResponse ¶
type ServerActionAttachISOResponse struct {
Action Action `json:"action"`
}
ServerActionAttachISOResponse defines the schema of the response when creating a attach_iso server action.
type ServerActionAttachToNetworkRequest ¶ added in v1.14.0
type ServerActionAttachToNetworkRequest struct {
Network int `json:"network"`
IP *string `json:"ip,omitempty"`
AliasIPs []*string `json:"alias_ips,omitempty"`
}
ServerActionAttachToNetworkRequest defines the schema for the request to attach a network to a server.
type ServerActionAttachToNetworkResponse ¶ added in v1.14.0
type ServerActionAttachToNetworkResponse struct {
Action Action `json:"action"`
}
ServerActionAttachToNetworkResponse defines the schema of the response when creating an attach_to_network server action.
type ServerActionChangeAliasIPsRequest ¶ added in v1.14.0
type ServerActionChangeAliasIPsRequest struct {
Network int `json:"network"`
AliasIPs []string `json:"alias_ips"`
}
ServerActionChangeAliasIPsRequest defines the schema for the request to change a server's alias IPs in a network.
type ServerActionChangeAliasIPsResponse ¶ added in v1.14.0
type ServerActionChangeAliasIPsResponse struct {
Action Action `json:"action"`
}
ServerActionChangeAliasIPsResponse defines the schema of the response when creating an change_alias_ips server action.
type ServerActionChangeDNSPtrRequest ¶
type ServerActionChangeDNSPtrRequest struct {
IP string `json:"ip"`
DNSPtr *string `json:"dns_ptr"`
}
ServerActionChangeDNSPtrRequest defines the schema for the request to change a server's reverse DNS pointer.
type ServerActionChangeDNSPtrResponse ¶
type ServerActionChangeDNSPtrResponse struct {
Action Action `json:"action"`
}
ServerActionChangeDNSPtrResponse defines the schema of the response when creating a change_dns_ptr server action.
type ServerActionChangeProtectionRequest ¶ added in v1.6.0
type ServerActionChangeProtectionRequest struct {
Rebuild *bool `json:"rebuild,omitempty"`
Delete *bool `json:"delete,omitempty"`
}
ServerActionChangeProtectionRequest defines the schema of the request to change the resource protection of a server.
type ServerActionChangeProtectionResponse ¶ added in v1.6.0
type ServerActionChangeProtectionResponse struct {
Action Action `json:"action"`
}
ServerActionChangeProtectionResponse defines the schema of the response when changing the resource protection of a server.
type ServerActionChangeTypeRequest ¶
type ServerActionChangeTypeRequest struct {
ServerType interface{} `json:"server_type"` // int or string
UpgradeDisk bool `json:"upgrade_disk"`
}
ServerActionChangeTypeRequest defines the schema for the request to change a server's type.
type ServerActionChangeTypeResponse ¶
type ServerActionChangeTypeResponse struct {
Action Action `json:"action"`
}
ServerActionChangeTypeResponse defines the schema of the response when creating a change_type server action.
type ServerActionCreateImageRequest ¶
type ServerActionCreateImageRequest struct {
Type *string `json:"type"`
Description *string `json:"description"`
Labels *map[string]string `json:"labels,omitempty"`
}
ServerActionCreateImageRequest defines the schema for the request to create a create_image server action.
type ServerActionCreateImageResponse ¶
type ServerActionCreateImageResponse struct {
Action Action `json:"action"`
Image Image `json:"image"`
}
ServerActionCreateImageResponse defines the schema of the response when creating a create_image server action.
type ServerActionDetachFromNetworkRequest ¶ added in v1.14.0
type ServerActionDetachFromNetworkRequest struct {
Network int `json:"network"`
}
ServerActionDetachFromNetworkRequest defines the schema for the request to detach a network from a server.
type ServerActionDetachFromNetworkResponse ¶ added in v1.14.0
type ServerActionDetachFromNetworkResponse struct {
Action Action `json:"action"`
}
ServerActionDetachFromNetworkResponse defines the schema of the response when creating a detach_from_network server action.
type ServerActionDetachISORequest ¶
type ServerActionDetachISORequest struct{}
ServerActionDetachISORequest defines the schema for the request to detach an ISO from a server.
type ServerActionDetachISOResponse ¶
type ServerActionDetachISOResponse struct {
Action Action `json:"action"`
}
ServerActionDetachISOResponse defines the schema of the response when creating a detach_iso server action.
type ServerActionDisableBackupRequest ¶
type ServerActionDisableBackupRequest struct{}
ServerActionDisableBackupRequest defines the schema for the request to disable backup for a server.
type ServerActionDisableBackupResponse ¶
type ServerActionDisableBackupResponse struct {
Action Action `json:"action"`
}
ServerActionDisableBackupResponse defines the schema of the response when creating a disable_backup server action.
type ServerActionDisableRescueRequest ¶
type ServerActionDisableRescueRequest struct{}
ServerActionDisableRescueRequest defines the schema for the request to create a disable_rescue server action.
type ServerActionDisableRescueResponse ¶
type ServerActionDisableRescueResponse struct {
Action Action `json:"action"`
}
ServerActionDisableRescueResponse defines the schema of the response when creating a disable_rescue server action.
type ServerActionEnableBackupRequest ¶
type ServerActionEnableBackupRequest struct {
BackupWindow *string `json:"backup_window,omitempty"`
}
ServerActionEnableBackupRequest defines the schema for the request to enable backup for a server.
type ServerActionEnableBackupResponse ¶
type ServerActionEnableBackupResponse struct {
Action Action `json:"action"`
}
ServerActionEnableBackupResponse defines the schema of the response when creating a enable_backup server action.
type ServerActionEnableRescueRequest ¶
type ServerActionEnableRescueRequest struct {
Type *string `json:"type,omitempty"`
SSHKeys []int `json:"ssh_keys,omitempty"`
}
ServerActionEnableRescueRequest defines the schema for the request to create a enable_rescue server action.
type ServerActionEnableRescueResponse ¶
type ServerActionEnableRescueResponse struct {
Action Action `json:"action"`
RootPassword string `json:"root_password"`
}
ServerActionEnableRescueResponse defines the schema of the response when creating a enable_rescue server action.
type ServerActionPoweroffRequest ¶
type ServerActionPoweroffRequest struct{}
ServerActionPoweroffRequest defines the schema for the request to create a poweroff server action.
type ServerActionPoweroffResponse ¶
type ServerActionPoweroffResponse struct {
Action Action `json:"action"`
}
ServerActionPoweroffResponse defines the schema of the response when creating a poweroff server action.
type ServerActionPoweronRequest ¶
type ServerActionPoweronRequest struct{}
ServerActionPoweronRequest defines the schema for the request to create a poweron server action.
type ServerActionPoweronResponse ¶
type ServerActionPoweronResponse struct {
Action Action `json:"action"`
}
ServerActionPoweronResponse defines the schema of the response when creating a poweron server action.
type ServerActionRebootRequest ¶
type ServerActionRebootRequest struct{}
ServerActionRebootRequest defines the schema for the request to create a reboot server action.
type ServerActionRebootResponse ¶
type ServerActionRebootResponse struct {
Action Action `json:"action"`
}
ServerActionRebootResponse defines the schema of the response when creating a reboot server action.
type ServerActionRebuildRequest ¶
type ServerActionRebuildRequest struct {
Image interface{} `json:"image"` // int or string
}
ServerActionRebuildRequest defines the schema for the request to rebuild a server.
type ServerActionRebuildResponse ¶
type ServerActionRebuildResponse struct {
Action Action `json:"action"`
}
ServerActionRebuildResponse defines the schema of the response when creating a rebuild server action.
type ServerActionResetPasswordRequest ¶
type ServerActionResetPasswordRequest struct{}
ServerActionResetPasswordRequest defines the schema for the request to create a reset_password server action.
type ServerActionResetPasswordResponse ¶
type ServerActionResetPasswordResponse struct {
Action Action `json:"action"`
RootPassword string `json:"root_password"`
}
ServerActionResetPasswordResponse defines the schema of the response when creating a reset_password server action.
type ServerActionResetRequest ¶
type ServerActionResetRequest struct{}
ServerActionResetRequest defines the schema for the request to create a reset server action.
type ServerActionResetResponse ¶
type ServerActionResetResponse struct {
Action Action `json:"action"`
}
ServerActionResetResponse defines the schema of the response when creating a reset server action.
type ServerActionShutdownRequest ¶
type ServerActionShutdownRequest struct{}
ServerActionShutdownRequest defines the schema for the request to create a shutdown server action.
type ServerActionShutdownResponse ¶
type ServerActionShutdownResponse struct {
Action Action `json:"action"`
}
ServerActionShutdownResponse defines the schema of the response when creating a shutdown server action.
type ServerCreateRequest ¶
type ServerCreateRequest struct {
Name string `json:"name"`
ServerType interface{} `json:"server_type"` // int or string
Image interface{} `json:"image"` // int or string
SSHKeys []int `json:"ssh_keys,omitempty"`
Location string `json:"location,omitempty"`
Datacenter string `json:"datacenter,omitempty"`
UserData string `json:"user_data,omitempty"`
StartAfterCreate *bool `json:"start_after_create,omitempty"`
Labels *map[string]string `json:"labels,omitempty"`
Automount *bool `json:"automount,omitempty"`
Volumes []int `json:"volumes,omitempty"`
Networks []int `json:"networks,omitempty"`
}
ServerCreateRequest defines the schema for the request to create a server.
type ServerCreateResponse ¶
type ServerCreateResponse struct {
Server Server `json:"server"`
Action Action `json:"action"`
RootPassword *string `json:"root_password"`
NextActions []Action `json:"next_actions"`
}
ServerCreateResponse defines the schema of the response when creating a server.
type ServerGetResponse ¶
type ServerGetResponse struct {
Server Server `json:"server"`
}
ServerGetResponse defines the schema of the response when retrieving a single server.
type ServerListResponse ¶
type ServerListResponse struct {
Servers []Server `json:"servers"`
}
ServerListResponse defines the schema of the response when listing servers.
type ServerPrivateNet ¶ added in v1.14.0
type ServerPrivateNet struct {
Network int `json:"network"`
IP string `json:"ip"`
AliasIPs []string `json:"alias_ips"`
MACAddress string `json:"mac_address"`
}
ServerPrivateNet defines the schema of a server's private network information.
type ServerProtection ¶ added in v1.6.0
ServerProtection defines the schema of a server's resource protection.
type ServerPublicNet ¶
type ServerPublicNet struct {
IPv4 ServerPublicNetIPv4 `json:"ipv4"`
IPv6 ServerPublicNetIPv6 `json:"ipv6"`
FloatingIPs []int `json:"floating_ips"`
}
ServerPublicNet defines the schema of a server's public network information.
type ServerPublicNetIPv4 ¶
type ServerPublicNetIPv4 struct {
IP string `json:"ip"`
Blocked bool `json:"blocked"`
DNSPtr string `json:"dns_ptr"`
}
ServerPublicNetIPv4 defines the schema of a server's public network information for an IPv4.
type ServerPublicNetIPv6 ¶
type ServerPublicNetIPv6 struct {
IP string `json:"ip"`
Blocked bool `json:"blocked"`
DNSPtr []ServerPublicNetIPv6DNSPtr `json:"dns_ptr"`
}
ServerPublicNetIPv6 defines the schema of a server's public network information for an IPv6.
type ServerPublicNetIPv6DNSPtr ¶
ServerPublicNetIPv6DNSPtr defines the schema of a server's public network information for an IPv6 reverse DNS.
type ServerType ¶
type ServerType struct {
ID int `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Cores int `json:"cores"`
Memory float32 `json:"memory"`
Disk int `json:"disk"`
StorageType string `json:"storage_type"`
CPUType string `json:"cpu_type"`
Prices []PricingServerTypePrice `json:"prices"`
}
ServerType defines the schema of a server type.
type ServerTypeGetResponse ¶
type ServerTypeGetResponse struct {
ServerType ServerType `json:"server_type"`
}
ServerTypeGetResponse defines the schema of the response when retrieving a single server type.
type ServerTypeListResponse ¶
type ServerTypeListResponse struct {
ServerTypes []ServerType `json:"server_types"`
}
ServerTypeListResponse defines the schema of the response when listing server types.
type ServerUpdateRequest ¶
type ServerUpdateRequest struct {
Name string `json:"name,omitempty"`
Labels *map[string]string `json:"labels,omitempty"`
}
ServerUpdateRequest defines the schema of the request to update a server.
type ServerUpdateResponse ¶
type ServerUpdateResponse struct {
Server Server `json:"server"`
}
ServerUpdateResponse defines the schema of the response when updating a server.
type Volume ¶ added in v1.10.0
type Volume struct {
ID int `json:"id"`
Name string `json:"name"`
Server *int `json:"server"`
Status string `json:"status"`
Location Location `json:"location"`
Size int `json:"size"`
Protection VolumeProtection `json:"protection"`
Labels map[string]string `json:"labels"`
LinuxDevice string `json:"linux_device"`
Created time.Time `json:"created"`
}
Volume defines the schema of a volume.
type VolumeActionAttachVolumeRequest ¶ added in v1.10.0
type VolumeActionAttachVolumeRequest struct {
Server int `json:"server"`
Automount *bool `json:"automount,omitempty"`
}
VolumeActionAttachVolumeRequest defines the schema of the request to attach a volume to a server.
type VolumeActionAttachVolumeResponse ¶ added in v1.10.0
type VolumeActionAttachVolumeResponse struct {
Action Action `json:"action"`
}
VolumeActionAttachVolumeResponse defines the schema of the response when attaching a volume to a server.
type VolumeActionChangeProtectionRequest ¶ added in v1.10.0
type VolumeActionChangeProtectionRequest struct {
Delete *bool `json:"delete,omitempty"`
}
VolumeActionChangeProtectionRequest defines the schema of the request to change the resource protection of a volume.
type VolumeActionChangeProtectionResponse ¶ added in v1.10.0
type VolumeActionChangeProtectionResponse struct {
Action Action `json:"action"`
}
VolumeActionChangeProtectionResponse defines the schema of the response when changing the resource protection of a volume.
type VolumeActionDetachVolumeRequest ¶ added in v1.10.0
type VolumeActionDetachVolumeRequest struct{}
VolumeActionDetachVolumeRequest defines the schema of the request to create an detach volume action.
type VolumeActionDetachVolumeResponse ¶ added in v1.10.0
type VolumeActionDetachVolumeResponse struct {
Action Action `json:"action"`
}
VolumeActionDetachVolumeResponse defines the schema of the response when creating an detach volume action.
type VolumeActionResizeVolumeRequest ¶ added in v1.10.0
type VolumeActionResizeVolumeRequest struct {
Size int `json:"size"`
}
VolumeActionResizeVolumeRequest defines the schema of the request to resize a volume.
type VolumeActionResizeVolumeResponse ¶ added in v1.10.0
type VolumeActionResizeVolumeResponse struct {
Action Action `json:"action"`
}
VolumeActionResizeVolumeResponse defines the schema of the response when resizing a volume.
type VolumeCreateRequest ¶ added in v1.10.0
type VolumeCreateRequest struct {
Name string `json:"name"`
Size int `json:"size"`
Server *int `json:"server,omitempty"`
Location interface{} `json:"location,omitempty"` // int, string, or nil
Labels *map[string]string `json:"labels,omitempty"`
Automount *bool `json:"automount,omitempty"`
Format *string `json:"format,omitempty"`
}
VolumeCreateRequest defines the schema of the request to create a volume.
type VolumeCreateResponse ¶ added in v1.10.0
type VolumeCreateResponse struct {
Volume Volume `json:"volume"`
Action *Action `json:"action"`
NextActions []Action `json:"next_actions"`
}
VolumeCreateResponse defines the schema of the response when creating a volume.
type VolumeGetResponse ¶ added in v1.10.0
type VolumeGetResponse struct {
Volume Volume `json:"volume"`
}
VolumeGetResponse defines the schema of the response when retrieving a single volume.
type VolumeListResponse ¶ added in v1.10.0
type VolumeListResponse struct {
Volumes []Volume `json:"volumes"`
}
VolumeListResponse defines the schema of the response when listing volumes.
type VolumeProtection ¶ added in v1.10.0
type VolumeProtection struct {
Delete bool `json:"delete"`
}
VolumeProtection defines the schema of a volume's resource protection.
type VolumeUpdateRequest ¶ added in v1.10.0
type VolumeUpdateRequest struct {
Name string `json:"name,omitempty"`
Labels *map[string]string `json:"labels,omitempty"`
}
VolumeUpdateRequest defines the schema of the request to update a volume.
type VolumeUpdateResponse ¶ added in v1.10.0
type VolumeUpdateResponse struct {
Volume Volume `json:"volume"`
}
VolumeUpdateResponse defines the schema of the response when updating a volume.