Documentation
¶
Overview ¶
Breaking changes may occur without notice. Do not use in production!
Index ¶
- type Action
- type ActionError
- type ActionGetResponse
- type ActionListResponse
- type ActionResourceReference
- type Certificate
- type CertificateCreateRequest
- type CertificateCreateResponse
- type CertificateGetResponse
- type CertificateIssuanceRetryResponse
- type CertificateListResponse
- type CertificateStatusRef
- type CertificateUpdateRequest
- type CertificateUpdateResponse
- type CertificateUsedByRef
- type Datacenter
- type DatacenterGetResponse
- type DatacenterListResponse
- type DatacenterServerTypes
- type DeprecatableResource
- type DeprecationInfo
- type Error
- type ErrorDetailsDeprecatedAPIEndpoint
- type ErrorDetailsInvalidInput
- type ErrorResponse
- type Firewall
- type FirewallActionApplyToResourcesRequest
- type FirewallActionApplyToResourcesResponse
- type FirewallActionRemoveFromResourcesRequest
- type FirewallActionRemoveFromResourcesResponse
- type FirewallActionSetRulesRequest
- type FirewallActionSetRulesResponse
- type FirewallCreateRequest
- type FirewallCreateResponse
- type FirewallGetResponse
- type FirewallListResponse
- type FirewallResource
- type FirewallResourceLabelSelector
- type FirewallResourceServer
- type FirewallRule
- type FirewallRuleRequest
- type FirewallUpdateRequest
- type FirewallUpdateResponse
- 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 IDOrName
- 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 LoadBalancerActionAddServiceRequestHTTP
- type LoadBalancerActionAddServiceRequestHealthCheck
- type LoadBalancerActionAddServiceRequestHealthCheckHTTP
- type LoadBalancerActionAddServiceResponse
- type LoadBalancerActionAddTargetRequest
- type LoadBalancerActionAddTargetRequestIP
- type LoadBalancerActionAddTargetRequestLabelSelector
- type LoadBalancerActionAddTargetRequestServer
- type LoadBalancerActionAddTargetResponse
- type LoadBalancerActionAttachToNetworkRequest
- type LoadBalancerActionAttachToNetworkResponse
- type LoadBalancerActionChangeAlgorithmRequest
- type LoadBalancerActionChangeAlgorithmResponse
- type LoadBalancerActionChangeDNSPtrRequest
- type LoadBalancerActionChangeDNSPtrResponse
- type LoadBalancerActionChangeProtectionRequest
- type LoadBalancerActionChangeProtectionResponse
- type LoadBalancerActionChangeTypeRequest
- type LoadBalancerActionChangeTypeResponse
- type LoadBalancerActionDetachFromNetworkRequest
- type LoadBalancerActionDetachFromNetworkResponse
- type LoadBalancerActionDisablePublicInterfaceRequest
- type LoadBalancerActionDisablePublicInterfaceResponse
- type LoadBalancerActionEnablePublicInterfaceRequest
- type LoadBalancerActionEnablePublicInterfaceResponse
- type LoadBalancerActionRemoveTargetRequest
- type LoadBalancerActionRemoveTargetRequestIP
- type LoadBalancerActionRemoveTargetRequestLabelSelector
- type LoadBalancerActionRemoveTargetRequestServer
- type LoadBalancerActionRemoveTargetResponse
- type LoadBalancerActionUpdateServiceRequest
- type LoadBalancerActionUpdateServiceRequestHTTP
- type LoadBalancerActionUpdateServiceRequestHealthCheck
- type LoadBalancerActionUpdateServiceRequestHealthCheckHTTP
- type LoadBalancerActionUpdateServiceResponse
- type LoadBalancerAlgorithm
- type LoadBalancerCreateRequest
- type LoadBalancerCreateRequestAlgorithm
- type LoadBalancerCreateRequestService
- type LoadBalancerCreateRequestServiceHTTP
- type LoadBalancerCreateRequestServiceHealthCheck
- type LoadBalancerCreateRequestServiceHealthCheckHTTP
- type LoadBalancerCreateRequestTarget
- type LoadBalancerCreateRequestTargetIP
- type LoadBalancerCreateRequestTargetLabelSelector
- type LoadBalancerCreateRequestTargetServer
- type LoadBalancerCreateResponse
- type LoadBalancerDeleteServiceRequest
- type LoadBalancerDeleteServiceResponse
- type LoadBalancerGetMetricsResponse
- type LoadBalancerGetResponse
- type LoadBalancerListResponse
- type LoadBalancerPrivateNet
- type LoadBalancerProtection
- type LoadBalancerPublicNet
- type LoadBalancerPublicNetIPv4
- type LoadBalancerPublicNetIPv6
- type LoadBalancerService
- type LoadBalancerServiceHTTP
- type LoadBalancerServiceHealthCheck
- type LoadBalancerServiceHealthCheckHTTP
- type LoadBalancerTarget
- type LoadBalancerTargetHealthStatus
- type LoadBalancerTargetIP
- type LoadBalancerTargetLabelSelector
- type LoadBalancerTargetServer
- type LoadBalancerTimeSeriesVals
- 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 PlacementGroup
- type PlacementGroupCreateRequest
- type PlacementGroupCreateResponse
- type PlacementGroupGetResponse
- type PlacementGroupListResponse
- type PlacementGroupUpdateRequest
- type PlacementGroupUpdateResponse
- type Price
- type Pricing
- type PricingFloatingIP
- type PricingFloatingIPType
- type PricingFloatingIPTypePrice
- type PricingGetResponse
- type PricingImage
- type PricingLoadBalancerType
- type PricingLoadBalancerTypePrice
- type PricingPrimaryIP
- type PricingPrimaryIPTypePrice
- type PricingServerBackup
- type PricingServerType
- type PricingServerTypePrice
- type PricingTraffic
- type PricingVolume
- type PrimaryIP
- type PrimaryIPActionAssignRequest
- type PrimaryIPActionAssignResponse
- type PrimaryIPActionChangeDNSPtrRequest
- type PrimaryIPActionChangeDNSPtrResponse
- type PrimaryIPActionChangeProtectionRequest
- type PrimaryIPActionChangeProtectionResponse
- type PrimaryIPActionUnassignResponse
- type PrimaryIPCreateRequest
- type PrimaryIPCreateResponse
- type PrimaryIPDNSPTR
- type PrimaryIPGetResponse
- type PrimaryIPListResponse
- type PrimaryIPProtection
- type PrimaryIPUpdateRequest
- type PrimaryIPUpdateResponse
- type SSHKey
- type SSHKeyCreateRequest
- type SSHKeyCreateResponse
- type SSHKeyGetResponse
- type SSHKeyListResponse
- type SSHKeyUpdateRequest
- type SSHKeyUpdateResponse
- type Server
- type ServerActionAddToPlacementGroupRequest
- type ServerActionAddToPlacementGroupResponse
- 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 ServerActionEnableBackupResponse
- type ServerActionEnableRescueRequest
- type ServerActionEnableRescueResponse
- type ServerActionPoweroffRequest
- type ServerActionPoweroffResponse
- type ServerActionPoweronRequest
- type ServerActionPoweronResponse
- type ServerActionRebootRequest
- type ServerActionRebootResponse
- type ServerActionRebuildRequest
- type ServerActionRebuildResponse
- type ServerActionRemoveFromPlacementGroupResponse
- type ServerActionRequestConsoleRequest
- type ServerActionRequestConsoleResponse
- type ServerActionResetPasswordRequest
- type ServerActionResetPasswordResponse
- type ServerActionResetRequest
- type ServerActionResetResponse
- type ServerActionShutdownRequest
- type ServerActionShutdownResponse
- type ServerCreateFirewalls
- type ServerCreatePublicNet
- type ServerCreateRequest
- type ServerCreateResponse
- type ServerDeleteResponse
- type ServerFirewall
- type ServerGetMetricsResponse
- type ServerGetResponse
- type ServerListResponse
- type ServerPrivateNet
- type ServerProtection
- type ServerPublicNet
- type ServerPublicNetIPv4
- type ServerPublicNetIPv6
- type ServerPublicNetIPv6DNSPtr
- type ServerTimeSeriesVals
- type ServerType
- type ServerTypeGetResponse
- type ServerTypeListResponse
- type ServerTypeLocation
- type ServerUpdateRequest
- type ServerUpdateResponse
- type StorageBox
- type StorageBoxAccessSettings
- type StorageBoxChangeProtectionRequest
- type StorageBoxChangeTypeRequest
- type StorageBoxCreateRequest
- type StorageBoxCreateRequestAccessSettings
- type StorageBoxCreateResponse
- type StorageBoxEnableSnapshotPlanRequest
- type StorageBoxFoldersResponse
- type StorageBoxGetResponse
- type StorageBoxListResponse
- type StorageBoxProtection
- type StorageBoxResetPasswordRequest
- type StorageBoxRollbackSnapshotRequest
- type StorageBoxSnapshot
- type StorageBoxSnapshotCreateRequest
- type StorageBoxSnapshotCreateResponse
- type StorageBoxSnapshotGetResponse
- type StorageBoxSnapshotListResponse
- type StorageBoxSnapshotPlan
- type StorageBoxSnapshotStats
- type StorageBoxSnapshotUpdateRequest
- type StorageBoxSnapshotUpdateResponse
- type StorageBoxStats
- type StorageBoxSubaccount
- type StorageBoxSubaccountAccessSettings
- type StorageBoxSubaccountChangeHomeDirectoryRequest
- type StorageBoxSubaccountCreateRequest
- type StorageBoxSubaccountCreateRequestAccessSettings
- type StorageBoxSubaccountCreateResponse
- type StorageBoxSubaccountCreateResponseSubaccount
- type StorageBoxSubaccountGetResponse
- type StorageBoxSubaccountListResponse
- type StorageBoxSubaccountResetPasswordRequest
- type StorageBoxSubaccountUpdateAccessSettingsRequest
- type StorageBoxSubaccountUpdateRequest
- type StorageBoxSubaccountUpdateResponse
- type StorageBoxType
- type StorageBoxTypeGetResponse
- type StorageBoxTypeListResponse
- type StorageBoxTypePrice
- type StorageBoxUpdateAccessSettingsRequest
- type StorageBoxUpdateRequest
- type StorageBoxUpdateResponse
- 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
- type Zone
- type ZoneAuthoritativeNameservers
- type ZoneChangePrimaryNameserversRequest
- type ZoneChangePrimaryNameserversRequestPrimaryNameserver
- type ZoneChangeProtectionRequest
- type ZoneChangeTTLRequest
- type ZoneCreateRequest
- type ZoneCreateRequestPrimaryNameserver
- type ZoneCreateRequestRRSet
- type ZoneCreateResponse
- type ZoneExportZonefileResponse
- type ZoneGetResponse
- type ZoneImportZonefileRequest
- type ZoneListResponse
- type ZonePrimaryNameserver
- type ZoneProtection
- type ZoneRRSet
- type ZoneRRSetAddRecordsRequest
- type ZoneRRSetChangeProtectionRequest
- type ZoneRRSetChangeTTLRequest
- type ZoneRRSetCreateRequest
- type ZoneRRSetCreateResponse
- type ZoneRRSetGetResponse
- type ZoneRRSetListResponse
- type ZoneRRSetProtection
- type ZoneRRSetRecord
- type ZoneRRSetRemoveRecordsRequest
- type ZoneRRSetSetRecordsRequest
- type ZoneRRSetUpdateRecordsRequest
- type ZoneRRSetUpdateRecordsRequestRecord
- type ZoneRRSetUpdateRequest
- type ZoneRRSetUpdateResponse
- type ZoneUpdateRequest
- type ZoneUpdateResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action struct {
ID int64 `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 ¶
type Certificate struct {
ID int64 `json:"id"`
Name string `json:"name"`
Labels map[string]string `json:"labels"`
Type string `json:"type"`
Certificate string `json:"certificate"`
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"`
Status *CertificateStatusRef `json:"status"`
UsedBy []CertificateUsedByRef `json:"used_by"`
}
Certificate defines the schema of an certificate.
type CertificateCreateRequest ¶
type CertificateCreateRequest struct {
Name string `json:"name"`
Type string `json:"type"`
DomainNames []string `json:"domain_names,omitempty"`
Certificate string `json:"certificate,omitempty"`
PrivateKey string `json:"private_key,omitempty"`
Labels *map[string]string `json:"labels,omitempty"`
}
CertificateCreateRequest defines the schema of the request to create a certificate.
type CertificateCreateResponse ¶
type CertificateCreateResponse struct {
Certificate Certificate `json:"certificate"`
Action *Action `json:"action"`
}
CertificateCreateResponse defines the schema of the response when creating a certificate.
type CertificateGetResponse ¶
type CertificateGetResponse struct {
Certificate Certificate `json:"certificate"`
}
CertificateGetResponse defines the schema of the response when retrieving a single Certificate.
type CertificateIssuanceRetryResponse ¶
type CertificateIssuanceRetryResponse struct {
Action Action `json:"action"`
}
CertificateIssuanceRetryResponse defines the schema for the response of the retry issuance endpoint.
type CertificateListResponse ¶
type CertificateListResponse struct {
Certificates []Certificate `json:"certificates"`
}
CertificateListResponse defines the schema of the response when listing Certificates.
type CertificateStatusRef ¶
type CertificateUpdateRequest ¶
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 ¶
type CertificateUpdateResponse struct {
Certificate Certificate `json:"certificate"`
}
CertificateUpdateResponse defines the schema of the response when updating a certificate.
type CertificateUsedByRef ¶
CertificateUsedByRef defines the schema of a resource using a certificate.
type Datacenter ¶
type Datacenter struct {
ID int64 `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Location Location `json:"location"`
ServerTypes DatacenterServerTypes `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 DatacenterServerTypes ¶ added in v2.5.0
type DatacenterServerTypes struct {
Supported []int64 `json:"supported"`
AvailableForMigration []int64 `json:"available_for_migration"`
Available []int64 `json:"available"`
}
DatacenterServerTypes defines the schema of the server types available in a datacenter.
type DeprecatableResource ¶
type DeprecatableResource struct {
Deprecation *DeprecationInfo `json:"deprecation"`
}
type DeprecationInfo ¶
type Error ¶
type Error struct {
Code string `json:"code"`
Message string `json:"message"`
DetailsRaw json.RawMessage `json:"details"`
Details any `json:"-"`
}
Error represents the schema of an error response.
func (*Error) UnmarshalJSON ¶
UnmarshalJSON overrides default json unmarshalling.
type ErrorDetailsDeprecatedAPIEndpoint ¶ added in v2.19.0
type ErrorDetailsDeprecatedAPIEndpoint struct {
Announcement string `json:"announcement"`
}
ErrorDetailsDeprecatedAPIEndpoint defines the schema of the Details field of an error with code 'deprecated_api_endpoint'.
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 Firewall ¶
type Firewall struct {
ID int64 `json:"id"`
Name string `json:"name"`
Labels map[string]string `json:"labels"`
Created time.Time `json:"created"`
Rules []FirewallRule `json:"rules"`
AppliedTo []FirewallResource `json:"applied_to"`
}
Firewall defines the schema of a Firewall.
type FirewallActionApplyToResourcesRequest ¶
type FirewallActionApplyToResourcesRequest struct {
ApplyTo []FirewallResource `json:"apply_to"`
}
FirewallActionApplyToResourcesRequest defines the schema of the request when applying a Firewall on resources.
type FirewallActionApplyToResourcesResponse ¶
type FirewallActionApplyToResourcesResponse struct {
Actions []Action `json:"actions"`
}
FirewallActionApplyToResourcesResponse defines the schema of the response when applying a Firewall on resources.
type FirewallActionRemoveFromResourcesRequest ¶
type FirewallActionRemoveFromResourcesRequest struct {
RemoveFrom []FirewallResource `json:"remove_from"`
}
FirewallActionRemoveFromResourcesRequest defines the schema of the request when removing a Firewall from resources.
type FirewallActionRemoveFromResourcesResponse ¶
type FirewallActionRemoveFromResourcesResponse struct {
Actions []Action `json:"actions"`
}
FirewallActionRemoveFromResourcesResponse defines the schema of the response when removing a Firewall from resources.
type FirewallActionSetRulesRequest ¶
type FirewallActionSetRulesRequest struct {
Rules []FirewallRuleRequest `json:"rules"`
}
FirewallActionSetRulesRequest defines the schema of the request when setting Firewall rules.
type FirewallActionSetRulesResponse ¶
type FirewallActionSetRulesResponse struct {
Actions []Action `json:"actions"`
}
FirewallActionSetRulesResponse defines the schema of the response when setting Firewall rules.
type FirewallCreateRequest ¶
type FirewallCreateRequest struct {
Name string `json:"name"`
Labels *map[string]string `json:"labels,omitempty"`
Rules []FirewallRuleRequest `json:"rules,omitempty"`
ApplyTo []FirewallResource `json:"apply_to,omitempty"`
}
FirewallCreateRequest defines the schema of the request to create a Firewall.
type FirewallCreateResponse ¶
type FirewallCreateResponse struct {
Firewall Firewall `json:"firewall"`
Actions []Action `json:"actions"`
}
FirewallCreateResponse defines the schema of the response when creating a Firewall.
type FirewallGetResponse ¶
type FirewallGetResponse struct {
Firewall Firewall `json:"firewall"`
}
FirewallGetResponse defines the schema of the response when retrieving a single Firewall.
type FirewallListResponse ¶
type FirewallListResponse struct {
Firewalls []Firewall `json:"firewalls"`
}
FirewallListResponse defines the schema of the response when listing Firewalls.
type FirewallResource ¶
type FirewallResource struct {
Type string `json:"type"`
Server *FirewallResourceServer `json:"server,omitempty"`
LabelSelector *FirewallResourceLabelSelector `json:"label_selector,omitempty"`
AppliedToResources []FirewallResource `json:"applied_to_resources,omitempty"`
}
FirewallResource defines the schema of a resource to apply the new Firewall on.
type FirewallResourceLabelSelector ¶
type FirewallResourceLabelSelector struct {
Selector string `json:"selector"`
}
FirewallResourceLabelSelector defines the schema of a LabelSelector to apply a Firewall on.
type FirewallResourceServer ¶
type FirewallResourceServer struct {
ID int64 `json:"id"`
}
FirewallResourceServer defines the schema of a Server to apply a Firewall on.
type FirewallRule ¶
type FirewallRule struct {
Direction string `json:"direction"`
SourceIPs []string `json:"source_ips"`
DestinationIPs []string `json:"destination_ips"`
Protocol string `json:"protocol"`
Port *string `json:"port"`
Description *string `json:"description"`
}
FirewallRule defines the schema of a Firewall rule in responses.
type FirewallRuleRequest ¶ added in v2.7.2
type FirewallRuleRequest struct {
Direction string `json:"direction"`
SourceIPs []string `json:"source_ips,omitempty"`
DestinationIPs []string `json:"destination_ips,omitempty"`
Protocol string `json:"protocol"`
Port *string `json:"port,omitempty"`
Description *string `json:"description,omitempty"`
}
FirewallRuleRequest defines the schema of a Firewall rule in requests.
type FirewallUpdateRequest ¶
type FirewallUpdateRequest struct {
Name *string `json:"name,omitempty"`
Labels *map[string]string `json:"labels,omitempty"`
}
FirewallUpdateRequest defines the schema of the request to update a Firewall.
type FirewallUpdateResponse ¶
type FirewallUpdateResponse struct {
Firewall Firewall `json:"firewall"`
}
FirewallUpdateResponse defines the schema of the response when updating a Firewall.
type FloatingIP ¶
type FloatingIP struct {
ID int64 `json:"id"`
Description *string `json:"description"`
Created time.Time `json:"created"`
IP string `json:"ip"`
Type string `json:"type"`
Server *int64 `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 int64 `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 ¶
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 ¶
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 *int64 `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 ¶
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 IDOrName ¶ added in v2.16.0
IDOrName can be used in API requests where either a resource id or name can be specified.
func (IDOrName) MarshalJSON ¶ added in v2.16.0
func (*IDOrName) UnmarshalJSON ¶ added in v2.16.0
type ISO ¶
type ISO struct {
ID int64 `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Type string `json:"type"`
Architecture *string `json:"architecture"`
DeprecatableResource
}
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 int64 `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 *int64 `json:"bound_to"`
OSFlavor string `json:"os_flavor"`
OSVersion *string `json:"os_version"`
Architecture string `json:"architecture"`
RapidDeploy bool `json:"rapid_deploy"`
Protection ImageProtection `json:"protection"`
Deprecated *time.Time `json:"deprecated"`
Deleted *time.Time `json:"deleted"`
Labels map[string]string `json:"labels"`
}
Image defines the schema of an image.
type ImageActionChangeProtectionRequest ¶
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 ¶
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 ¶
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 ¶
type LoadBalancer struct {
ID int64 `json:"id"`
Name string `json:"name"`
PublicNet LoadBalancerPublicNet `json:"public_net"`
PrivateNet []LoadBalancerPrivateNet `json:"private_net"`
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"`
IncludedTraffic uint64 `json:"included_traffic"`
OutgoingTraffic *uint64 `json:"outgoing_traffic"`
IngoingTraffic *uint64 `json:"ingoing_traffic"`
}
type LoadBalancerActionAddServiceRequest ¶
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 *LoadBalancerActionAddServiceRequestHTTP `json:"http,omitempty"`
HealthCheck *LoadBalancerActionAddServiceRequestHealthCheck `json:"health_check,omitempty"`
}
type LoadBalancerActionAddServiceRequestHTTP ¶
type LoadBalancerActionAddServiceRequestHTTP struct {
CookieName *string `json:"cookie_name,omitempty"`
CookieLifetime *int `json:"cookie_lifetime,omitempty"`
Certificates *[]int64 `json:"certificates,omitempty"`
RedirectHTTP *bool `json:"redirect_http,omitempty"`
StickySessions *bool `json:"sticky_sessions,omitempty"`
}
type LoadBalancerActionAddServiceRequestHealthCheck ¶
type LoadBalancerActionAddServiceRequestHealthCheck struct {
Protocol string `json:"protocol"`
Port *int `json:"port,omitempty"`
Interval *int `json:"interval,omitempty"`
Timeout *int `json:"timeout,omitempty"`
Retries *int `json:"retries,omitempty"`
HTTP *LoadBalancerActionAddServiceRequestHealthCheckHTTP `json:"http,omitempty"`
}
type LoadBalancerActionAddServiceResponse ¶
type LoadBalancerActionAddServiceResponse struct {
Action Action `json:"action"`
}
type LoadBalancerActionAddTargetRequest ¶
type LoadBalancerActionAddTargetRequest struct {
Type string `json:"type"`
Server *LoadBalancerActionAddTargetRequestServer `json:"server,omitempty"`
LabelSelector *LoadBalancerActionAddTargetRequestLabelSelector `json:"label_selector,omitempty"`
IP *LoadBalancerActionAddTargetRequestIP `json:"ip,omitempty"`
UsePrivateIP *bool `json:"use_private_ip,omitempty"`
}
type LoadBalancerActionAddTargetRequestIP ¶
type LoadBalancerActionAddTargetRequestIP struct {
IP string `json:"ip"`
}
type LoadBalancerActionAddTargetRequestLabelSelector ¶
type LoadBalancerActionAddTargetRequestLabelSelector struct {
Selector string `json:"selector"`
}
type LoadBalancerActionAddTargetRequestServer ¶
type LoadBalancerActionAddTargetRequestServer struct {
ID int64 `json:"id"`
}
type LoadBalancerActionAddTargetResponse ¶
type LoadBalancerActionAddTargetResponse struct {
Action Action `json:"action"`
}
type LoadBalancerActionAttachToNetworkResponse ¶
type LoadBalancerActionAttachToNetworkResponse struct {
Action Action `json:"action"`
}
type LoadBalancerActionChangeAlgorithmRequest ¶
type LoadBalancerActionChangeAlgorithmRequest struct {
Type string `json:"type"`
}
type LoadBalancerActionChangeAlgorithmResponse ¶
type LoadBalancerActionChangeAlgorithmResponse struct {
Action Action `json:"action"`
}
type LoadBalancerActionChangeDNSPtrRequest ¶
type LoadBalancerActionChangeDNSPtrRequest struct {
IP string `json:"ip"`
DNSPtr *string `json:"dns_ptr"`
}
LoadBalancerActionChangeDNSPtrRequest defines the schema for the request to change a Load Balancer reverse DNS pointer.
type LoadBalancerActionChangeDNSPtrResponse ¶
type LoadBalancerActionChangeDNSPtrResponse struct {
Action Action `json:"action"`
}
LoadBalancerActionChangeDNSPtrResponse defines the schema of the response when creating a change_dns_ptr Floating IP action.
type LoadBalancerActionChangeProtectionRequest ¶
type LoadBalancerActionChangeProtectionRequest struct {
Delete *bool `json:"delete,omitempty"`
}
type LoadBalancerActionChangeProtectionResponse ¶
type LoadBalancerActionChangeProtectionResponse struct {
Action Action `json:"action"`
}
type LoadBalancerActionChangeTypeRequest ¶
type LoadBalancerActionChangeTypeRequest struct {
LoadBalancerType IDOrName `json:"load_balancer_type"`
}
type LoadBalancerActionChangeTypeResponse ¶
type LoadBalancerActionChangeTypeResponse struct {
Action Action `json:"action"`
}
type LoadBalancerActionDetachFromNetworkRequest ¶
type LoadBalancerActionDetachFromNetworkRequest struct {
Network int64 `json:"network"`
}
type LoadBalancerActionDetachFromNetworkResponse ¶
type LoadBalancerActionDetachFromNetworkResponse struct {
Action Action `json:"action"`
}
type LoadBalancerActionDisablePublicInterfaceRequest ¶
type LoadBalancerActionDisablePublicInterfaceRequest struct{}
type LoadBalancerActionDisablePublicInterfaceResponse ¶
type LoadBalancerActionDisablePublicInterfaceResponse struct {
Action Action `json:"action"`
}
type LoadBalancerActionEnablePublicInterfaceRequest ¶
type LoadBalancerActionEnablePublicInterfaceRequest struct{}
type LoadBalancerActionEnablePublicInterfaceResponse ¶
type LoadBalancerActionEnablePublicInterfaceResponse struct {
Action Action `json:"action"`
}
type LoadBalancerActionRemoveTargetRequest ¶
type LoadBalancerActionRemoveTargetRequest struct {
Type string `json:"type"`
Server *LoadBalancerActionRemoveTargetRequestServer `json:"server,omitempty"`
LabelSelector *LoadBalancerActionRemoveTargetRequestLabelSelector `json:"label_selector,omitempty"`
IP *LoadBalancerActionRemoveTargetRequestIP `json:"ip,omitempty"`
}
type LoadBalancerActionRemoveTargetRequestIP ¶
type LoadBalancerActionRemoveTargetRequestIP struct {
IP string `json:"ip"`
}
type LoadBalancerActionRemoveTargetRequestLabelSelector ¶
type LoadBalancerActionRemoveTargetRequestLabelSelector struct {
Selector string `json:"selector"`
}
type LoadBalancerActionRemoveTargetRequestServer ¶
type LoadBalancerActionRemoveTargetRequestServer struct {
ID int64 `json:"id"`
}
type LoadBalancerActionRemoveTargetResponse ¶
type LoadBalancerActionRemoveTargetResponse struct {
Action Action `json:"action"`
}
type LoadBalancerActionUpdateServiceRequest ¶
type LoadBalancerActionUpdateServiceRequest struct {
ListenPort int `json:"listen_port"`
Protocol *string `json:"protocol,omitempty"`
DestinationPort *int `json:"destination_port,omitempty"`
Proxyprotocol *bool `json:"proxyprotocol,omitempty"`
HTTP *LoadBalancerActionUpdateServiceRequestHTTP `json:"http,omitempty"`
HealthCheck *LoadBalancerActionUpdateServiceRequestHealthCheck `json:"health_check,omitempty"`
}
type LoadBalancerActionUpdateServiceRequestHTTP ¶
type LoadBalancerActionUpdateServiceRequestHTTP struct {
CookieName *string `json:"cookie_name,omitempty"`
CookieLifetime *int `json:"cookie_lifetime,omitempty"`
Certificates *[]int64 `json:"certificates,omitempty"`
RedirectHTTP *bool `json:"redirect_http,omitempty"`
StickySessions *bool `json:"sticky_sessions,omitempty"`
}
type LoadBalancerActionUpdateServiceRequestHealthCheck ¶
type LoadBalancerActionUpdateServiceRequestHealthCheck struct {
Protocol *string `json:"protocol,omitempty"`
Port *int `json:"port,omitempty"`
Interval *int `json:"interval,omitempty"`
Timeout *int `json:"timeout,omitempty"`
Retries *int `json:"retries,omitempty"`
HTTP *LoadBalancerActionUpdateServiceRequestHealthCheckHTTP `json:"http,omitempty"`
}
type LoadBalancerActionUpdateServiceResponse ¶
type LoadBalancerActionUpdateServiceResponse struct {
Action Action `json:"action"`
}
type LoadBalancerAlgorithm ¶
type LoadBalancerAlgorithm struct {
Type string `json:"type"`
}
type LoadBalancerCreateRequest ¶
type LoadBalancerCreateRequest struct {
Name string `json:"name"`
LoadBalancerType IDOrName `json:"load_balancer_type"`
Algorithm *LoadBalancerCreateRequestAlgorithm `json:"algorithm,omitempty"`
Location *string `json:"location,omitempty"`
NetworkZone *string `json:"network_zone,omitempty"`
Labels *map[string]string `json:"labels,omitempty"`
Targets []LoadBalancerCreateRequestTarget `json:"targets,omitempty"`
Services []LoadBalancerCreateRequestService `json:"services,omitempty"`
PublicInterface *bool `json:"public_interface,omitempty"`
Network *int64 `json:"network,omitempty"`
}
type LoadBalancerCreateRequestAlgorithm ¶
type LoadBalancerCreateRequestAlgorithm struct {
Type string `json:"type"`
}
type LoadBalancerCreateRequestService ¶
type LoadBalancerCreateRequestService struct {
Protocol string `json:"protocol"`
ListenPort *int `json:"listen_port,omitempty"`
DestinationPort *int `json:"destination_port,omitempty"`
Proxyprotocol *bool `json:"proxyprotocol,omitempty"`
HTTP *LoadBalancerCreateRequestServiceHTTP `json:"http,omitempty"`
HealthCheck *LoadBalancerCreateRequestServiceHealthCheck `json:"health_check,omitempty"`
}
type LoadBalancerCreateRequestServiceHTTP ¶
type LoadBalancerCreateRequestServiceHTTP struct {
CookieName *string `json:"cookie_name,omitempty"`
CookieLifetime *int `json:"cookie_lifetime,omitempty"`
Certificates *[]int64 `json:"certificates,omitempty"`
RedirectHTTP *bool `json:"redirect_http,omitempty"`
StickySessions *bool `json:"sticky_sessions,omitempty"`
}
type LoadBalancerCreateRequestServiceHealthCheck ¶
type LoadBalancerCreateRequestServiceHealthCheck struct {
Protocol string `json:"protocol"`
Port *int `json:"port,omitempty"`
Interval *int `json:"interval,omitempty"`
Timeout *int `json:"timeout,omitempty"`
Retries *int `json:"retries,omitempty"`
HTTP *LoadBalancerCreateRequestServiceHealthCheckHTTP `json:"http,omitempty"`
}
type LoadBalancerCreateRequestTarget ¶
type LoadBalancerCreateRequestTarget struct {
Type string `json:"type"`
Server *LoadBalancerCreateRequestTargetServer `json:"server,omitempty"`
LabelSelector *LoadBalancerCreateRequestTargetLabelSelector `json:"label_selector,omitempty"`
IP *LoadBalancerCreateRequestTargetIP `json:"ip,omitempty"`
UsePrivateIP *bool `json:"use_private_ip,omitempty"`
}
type LoadBalancerCreateRequestTargetIP ¶
type LoadBalancerCreateRequestTargetIP struct {
IP string `json:"ip"`
}
type LoadBalancerCreateRequestTargetLabelSelector ¶
type LoadBalancerCreateRequestTargetLabelSelector struct {
Selector string `json:"selector"`
}
type LoadBalancerCreateRequestTargetServer ¶
type LoadBalancerCreateRequestTargetServer struct {
ID int64 `json:"id"`
}
type LoadBalancerCreateResponse ¶
type LoadBalancerCreateResponse struct {
LoadBalancer LoadBalancer `json:"load_balancer"`
Action Action `json:"action"`
}
type LoadBalancerDeleteServiceRequest ¶
type LoadBalancerDeleteServiceRequest struct {
ListenPort int `json:"listen_port"`
}
type LoadBalancerDeleteServiceResponse ¶
type LoadBalancerDeleteServiceResponse struct {
Action Action `json:"action"`
}
type LoadBalancerGetMetricsResponse ¶
type LoadBalancerGetMetricsResponse struct {
Metrics struct {
Start time.Time `json:"start"`
End time.Time `json:"end"`
Step float64 `json:"step"`
TimeSeries map[string]LoadBalancerTimeSeriesVals `json:"time_series"`
} `json:"metrics"`
}
LoadBalancerGetMetricsResponse defines the schema of the response when requesting metrics for a Load Balancer.
type LoadBalancerGetResponse ¶
type LoadBalancerGetResponse struct {
LoadBalancer LoadBalancer `json:"load_balancer"`
}
type LoadBalancerListResponse ¶
type LoadBalancerListResponse struct {
LoadBalancers []LoadBalancer `json:"load_balancers"`
}
type LoadBalancerPrivateNet ¶
type LoadBalancerProtection ¶
type LoadBalancerProtection struct {
Delete bool `json:"delete"`
}
type LoadBalancerPublicNet ¶
type LoadBalancerPublicNet struct {
Enabled bool `json:"enabled"`
IPv4 LoadBalancerPublicNetIPv4 `json:"ipv4"`
IPv6 LoadBalancerPublicNetIPv6 `json:"ipv6"`
}
type LoadBalancerService ¶
type LoadBalancerService struct {
Protocol string `json:"protocol"`
ListenPort int `json:"listen_port"`
DestinationPort int `json:"destination_port"`
Proxyprotocol bool `json:"proxyprotocol"`
HTTP *LoadBalancerServiceHTTP `json:"http"`
HealthCheck *LoadBalancerServiceHealthCheck `json:"health_check"`
}
type LoadBalancerServiceHTTP ¶
type LoadBalancerTarget ¶
type LoadBalancerTarget struct {
Type string `json:"type"`
Server *LoadBalancerTargetServer `json:"server"`
LabelSelector *LoadBalancerTargetLabelSelector `json:"label_selector"`
IP *LoadBalancerTargetIP `json:"ip"`
HealthStatus []LoadBalancerTargetHealthStatus `json:"health_status"`
UsePrivateIP bool `json:"use_private_ip"`
Targets []LoadBalancerTarget `json:"targets,omitempty"`
}
type LoadBalancerTargetIP ¶
type LoadBalancerTargetIP struct {
IP string `json:"ip"`
}
type LoadBalancerTargetLabelSelector ¶
type LoadBalancerTargetLabelSelector struct {
Selector string `json:"selector"`
}
type LoadBalancerTargetServer ¶
type LoadBalancerTargetServer struct {
ID int64 `json:"id"`
}
type LoadBalancerTimeSeriesVals ¶
type LoadBalancerTimeSeriesVals struct {
Values []interface{} `json:"values"`
}
LoadBalancerTimeSeriesVals contains the values for a Load Balancer time series.
type LoadBalancerType ¶
type LoadBalancerType struct {
ID int64 `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"`
Deprecated *string `json:"deprecated"`
}
LoadBalancerType defines the schema of a LoadBalancer type.
type LoadBalancerTypeGetResponse ¶
type LoadBalancerTypeGetResponse struct {
LoadBalancerType LoadBalancerType `json:"load_balancer_type"`
}
LoadBalancerTypeGetResponse defines the schema of the response when retrieving a single LoadBalancer type.
type LoadBalancerTypeListResponse ¶
type LoadBalancerTypeListResponse struct {
LoadBalancerTypes []LoadBalancerType `json:"load_balancer_types"`
}
LoadBalancerTypeListResponse defines the schema of the response when listing LoadBalancer types.
type LoadBalancerUpdateResponse ¶
type LoadBalancerUpdateResponse struct {
LoadBalancer LoadBalancer `json:"load_balancer"`
}
type Location ¶
type Location struct {
ID int64 `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 ¶
type Network struct {
ID int64 `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 []int64 `json:"servers"`
LoadBalancers []int64 `json:"load_balancers"`
Protection NetworkProtection `json:"protection"`
Labels map[string]string `json:"labels"`
ExposeRoutesToVSwitch bool `json:"expose_routes_to_vswitch"`
}
Network defines the schema of a network.
type NetworkActionAddRouteRequest ¶
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 ¶
type NetworkActionAddRouteResponse struct {
Action Action `json:"action"`
}
NetworkActionAddRouteResponse defines the schema of the response when adding a route to a network.
type NetworkActionAddSubnetRequest ¶
type NetworkActionAddSubnetRequest struct {
Type string `json:"type"`
IPRange string `json:"ip_range,omitempty"`
NetworkZone string `json:"network_zone"`
VSwitchID int64 `json:"vswitch_id,omitempty"`
}
NetworkActionAddSubnetRequest defines the schema of the request to add a subnet to a network.
type NetworkActionAddSubnetResponse ¶
type NetworkActionAddSubnetResponse struct {
Action Action `json:"action"`
}
NetworkActionAddSubnetResponse defines the schema of the response when adding a subnet to a network.
type NetworkActionChangeIPRangeRequest ¶
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 ¶
type NetworkActionChangeIPRangeResponse struct {
Action Action `json:"action"`
}
NetworkActionChangeIPRangeResponse defines the schema of the response when changing the IP range of a network.
type NetworkActionChangeProtectionRequest ¶
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 ¶
type NetworkActionChangeProtectionResponse struct {
Action Action `json:"action"`
}
NetworkActionChangeProtectionResponse defines the schema of the response when changing the resource protection of a network.
type NetworkActionDeleteRouteRequest ¶
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 ¶
type NetworkActionDeleteRouteResponse struct {
Action Action `json:"action"`
}
NetworkActionDeleteRouteResponse defines the schema of the response when deleting a route from a network.
type NetworkActionDeleteSubnetRequest ¶
type NetworkActionDeleteSubnetRequest struct {
IPRange string `json:"ip_range"`
}
NetworkActionDeleteSubnetRequest defines the schema of the request to delete a subnet from a network.
type NetworkActionDeleteSubnetResponse ¶
type NetworkActionDeleteSubnetResponse struct {
Action Action `json:"action"`
}
NetworkActionDeleteSubnetResponse defines the schema of the response when deleting a subnet from a network.
type NetworkCreateRequest ¶
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"`
ExposeRoutesToVSwitch bool `json:"expose_routes_to_vswitch"`
}
NetworkCreateRequest defines the schema of the request to create a network.
type NetworkCreateResponse ¶
type NetworkCreateResponse struct {
Network Network `json:"network"`
}
NetworkCreateResponse defines the schema of the response when creating a network.
type NetworkGetResponse ¶
type NetworkGetResponse struct {
Network Network `json:"network"`
}
NetworkGetResponse defines the schema of the response when retrieving a single network.
type NetworkListResponse ¶
type NetworkListResponse struct {
Networks []Network `json:"networks"`
}
NetworkListResponse defines the schema of the response when listing networks.
type NetworkProtection ¶
type NetworkProtection struct {
Delete bool `json:"delete"`
}
NetworkProtection represents the protection level of a network.
type NetworkRoute ¶
type NetworkRoute struct {
Destination string `json:"destination"`
Gateway string `json:"gateway"`
}
NetworkRoute represents a route of a network.
type NetworkSubnet ¶
type NetworkSubnet struct {
Type string `json:"type"`
IPRange string `json:"ip_range"`
NetworkZone string `json:"network_zone"`
Gateway string `json:"gateway,omitempty"`
VSwitchID int64 `json:"vswitch_id,omitempty"`
}
NetworkSubnet represents a subnet of a network.
type NetworkUpdateRequest ¶
type NetworkUpdateRequest struct {
Name string `json:"name,omitempty"`
Labels *map[string]string `json:"labels,omitempty"`
ExposeRoutesToVSwitch *bool `json:"expose_routes_to_vswitch,omitempty"`
}
NetworkUpdateRequest defines the schema of the request to update a network.
type NetworkUpdateResponse ¶
type NetworkUpdateResponse struct {
Network Network `json:"network"`
}
NetworkUpdateResponse defines the schema of the response when updating a network.
type PlacementGroup ¶
type PlacementGroupCreateResponse ¶
type PlacementGroupCreateResponse struct {
PlacementGroup PlacementGroup `json:"placement_group"`
Action *Action `json:"action"`
}
type PlacementGroupGetResponse ¶
type PlacementGroupGetResponse struct {
PlacementGroup PlacementGroup `json:"placement_group"`
}
type PlacementGroupListResponse ¶
type PlacementGroupListResponse struct {
PlacementGroups []PlacementGroup `json:"placement_groups"`
}
type PlacementGroupUpdateResponse ¶
type PlacementGroupUpdateResponse struct {
PlacementGroup PlacementGroup `json:"placement_group"`
}
type Pricing ¶
type Pricing struct {
Currency string `json:"currency"`
VATRate string `json:"vat_rate"`
Image PricingImage `json:"image"`
// Deprecated: [Pricing.FloatingIP] is deprecated, use [Pricing.FloatingIPs] instead.
FloatingIP PricingFloatingIP `json:"floating_ip"`
FloatingIPs []PricingFloatingIPType `json:"floating_ips"`
PrimaryIPs []PricingPrimaryIP `json:"primary_ips"`
// Deprecated: [Pricing.Traffic] is deprecated and will report 0 after 2024-08-05.
// Use traffic pricing from [Pricing.ServerTypes] or [Pricing.LoadBalancerTypes] instead.
Traffic PricingTraffic `json:"traffic"`
ServerBackup PricingServerBackup `json:"server_backup"`
ServerTypes []PricingServerType `json:"server_types"`
LoadBalancerTypes []PricingLoadBalancerType `json:"load_balancer_types"`
Volume PricingVolume `json:"volume"`
}
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 PricingFloatingIPType ¶
type PricingFloatingIPType struct {
Type string `json:"type"`
Prices []PricingFloatingIPTypePrice `json:"prices"`
}
PricingFloatingIPType defines the schema of pricing information for a Floating IP per type.
type PricingFloatingIPTypePrice ¶
type PricingFloatingIPTypePrice struct {
Location string `json:"location"`
PriceMonthly Price `json:"price_monthly"`
}
PricingFloatingIPTypePrice defines the schema of pricing information for a Floating IP type at a location.
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 ¶
type PricingLoadBalancerType struct {
ID int64 `json:"id"`
Name string `json:"name"`
Prices []PricingLoadBalancerTypePrice `json:"prices"`
}
PricingLoadBalancerType defines the schema of pricing information for a Load Balancer type.
type PricingLoadBalancerTypePrice ¶
type PricingLoadBalancerTypePrice struct {
Location string `json:"location"`
PriceHourly Price `json:"price_hourly"`
PriceMonthly Price `json:"price_monthly"`
IncludedTraffic uint64 `json:"included_traffic"`
PricePerTBTraffic Price `json:"price_per_tb_traffic"`
}
PricingLoadBalancerTypePrice defines the schema of pricing information for a Load Balancer type at a location.
type PricingPrimaryIP ¶
type PricingPrimaryIP struct {
Type string `json:"type"`
Prices []PricingPrimaryIPTypePrice `json:"prices"`
}
PricingPrimaryIP define the schema of pricing information for a primary IP at a datacenter.
type PricingPrimaryIPTypePrice ¶
type PricingPrimaryIPTypePrice struct {
Datacenter string `json:"datacenter"` // Deprecated: the API does not return pricing for the individual DCs anymore
Location string `json:"location"`
PriceHourly Price `json:"price_hourly"`
PriceMonthly Price `json:"price_monthly"`
}
PricingPrimaryIPTypePrice defines the schema of pricing information for a primary IP. type at a datacenter.
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 int64 `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"`
IncludedTraffic uint64 `json:"included_traffic"`
PricePerTBTraffic Price `json:"price_per_tb_traffic"`
}
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 PricingVolume ¶
type PricingVolume struct {
PricePerGBPerMonth Price `json:"price_per_gb_month"`
}
PricingVolume defines the schema of pricing information for a Volume.
type PrimaryIP ¶
type PrimaryIP struct {
ID int64 `json:"id"`
IP string `json:"ip"`
Labels map[string]string `json:"labels"`
Name string `json:"name"`
Type string `json:"type"`
Protection PrimaryIPProtection `json:"protection"`
DNSPtr []PrimaryIPDNSPTR `json:"dns_ptr"`
AssigneeID *int64 `json:"assignee_id"`
AssigneeType string `json:"assignee_type"`
AutoDelete bool `json:"auto_delete"`
Blocked bool `json:"blocked"`
Created time.Time `json:"created"`
Location Location `json:"location"`
// Deprecated: [PrimaryIP.Datacenter] is deprecated and will be removed after 1 July 2026.
// Use [PrimaryIP.Location] instead.
// See https://docs.hetzner.cloud/changelog#2025-12-16-phasing-out-datacenters
Datacenter *Datacenter `json:"datacenter"`
}
PrimaryIP defines a Primary IP.
type PrimaryIPActionAssignRequest ¶ added in v2.20.0
type PrimaryIPActionAssignRequest struct {
AssigneeID int64 `json:"assignee_id"`
AssigneeType string `json:"assignee_type"`
}
PrimaryIPActionAssignRequest defines the request to assign a Primary IP to an assignee (usually a server).
type PrimaryIPActionAssignResponse ¶ added in v2.20.0
type PrimaryIPActionAssignResponse struct {
Action Action `json:"action"`
}
PrimaryIPActionAssignResponse defines the response when assigning a Primary IP to a assignee.
type PrimaryIPActionChangeDNSPtrRequest ¶
type PrimaryIPActionChangeDNSPtrRequest struct {
IP string `json:"ip"`
DNSPtr *string `json:"dns_ptr"`
}
PrimaryIPActionChangeDNSPtrRequest defines the schema for the request to change a Primary IP's reverse DNS pointer.
type PrimaryIPActionChangeDNSPtrResponse ¶ added in v2.20.0
type PrimaryIPActionChangeDNSPtrResponse struct {
Action Action `json:"action"`
}
PrimaryIPActionChangeDNSPtrResponse defines the response when setting a reverse DNS pointer for a IP address.
type PrimaryIPActionChangeProtectionRequest ¶ added in v2.20.0
type PrimaryIPActionChangeProtectionRequest struct {
Delete bool `json:"delete"`
}
PrimaryIPActionChangeProtectionRequest defines the request to change protection configuration of a Primary IP.
type PrimaryIPActionChangeProtectionResponse ¶ added in v2.20.0
type PrimaryIPActionChangeProtectionResponse struct {
Action Action `json:"action"`
}
PrimaryIPActionChangeProtectionResponse defines the response when changing the protection of a Primary IP.
type PrimaryIPActionUnassignResponse ¶ added in v2.20.0
type PrimaryIPActionUnassignResponse struct {
Action Action `json:"action"`
}
PrimaryIPActionUnassignResponse defines the response to unassign a Primary IP.
type PrimaryIPCreateRequest ¶ added in v2.20.0
type PrimaryIPCreateRequest struct {
Name string `json:"name"`
Type string `json:"type"`
AssigneeType string `json:"assignee_type"`
AssigneeID *int64 `json:"assignee_id,omitempty"`
Labels *map[string]string `json:"labels,omitempty"`
AutoDelete *bool `json:"auto_delete,omitempty"`
Location string `json:"location,omitempty"`
// Deprecated: [PrimaryIPCreateRequest.Datacenter] is deprecated and will be removed after 1 July 2026.
// Use [PrimaryIPCreateRequest.Location] instead.
// See https://docs.hetzner.cloud/changelog#2025-12-16-phasing-out-datacenters
Datacenter string `json:"datacenter,omitempty"`
}
PrimaryIPCreateOpts defines the request to create a Primary IP.
type PrimaryIPCreateResponse ¶
type PrimaryIPCreateResponse struct {
PrimaryIP PrimaryIP `json:"primary_ip"`
Action *Action `json:"action"`
}
PrimaryIPCreateResponse defines the schema of the response when creating a Primary IP.
type PrimaryIPDNSPTR ¶
PrimaryIPDNSPTR contains reverse DNS information for a IPv4 or IPv6 Primary IP.
type PrimaryIPGetResponse ¶ added in v2.20.0
type PrimaryIPGetResponse struct {
PrimaryIP PrimaryIP `json:"primary_ip"`
}
PrimaryIPGetResponse defines the response when retrieving a single Primary IP.
type PrimaryIPListResponse ¶ added in v2.20.0
type PrimaryIPListResponse struct {
PrimaryIPs []PrimaryIP `json:"primary_ips"`
}
PrimaryIPListResponse defines the response when listing Primary IPs.
type PrimaryIPProtection ¶
type PrimaryIPProtection struct {
Delete bool `json:"delete"`
}
PrimaryIPProtection represents the protection level of a Primary IP.
type PrimaryIPUpdateRequest ¶ added in v2.20.0
type PrimaryIPUpdateRequest struct {
Name string `json:"name,omitempty"`
Labels *map[string]string `json:"labels,omitempty"`
AutoDelete *bool `json:"auto_delete,omitempty"`
}
PrimaryIPUpdateOpts defines the request to update a Primary IP.
type PrimaryIPUpdateResponse ¶ added in v2.20.0
type PrimaryIPUpdateResponse struct {
PrimaryIP PrimaryIP `json:"primary_ip"`
}
PrimaryIPUpdateResponse defines the response when updating a Primary IP.
type SSHKey ¶
type SSHKey struct {
ID int64 `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 int64 `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"`
Location Location `json:"location"`
Image *Image `json:"image"`
Protection ServerProtection `json:"protection"`
Labels map[string]string `json:"labels"`
Volumes []int64 `json:"volumes"`
PrimaryDiskSize int `json:"primary_disk_size"`
PlacementGroup *PlacementGroup `json:"placement_group"`
LoadBalancers []int64 `json:"load_balancers"`
// Deprecated: [Server.Datacenter] is deprecated and will be removed after 1 July 2026.
// Use [Server.Location] instead.
// See https://docs.hetzner.cloud/changelog#2025-12-16-phasing-out-datacenters
Datacenter *Datacenter `json:"datacenter"`
}
Server defines the schema of a server.
type ServerActionAddToPlacementGroupRequest ¶
type ServerActionAddToPlacementGroupRequest struct {
PlacementGroup int64 `json:"placement_group"`
}
ServerActionAddToPlacementGroupRequest defines the schema for the request to add a server to a placement group.
type ServerActionAddToPlacementGroupResponse ¶
type ServerActionAddToPlacementGroupResponse struct {
Action Action `json:"action"`
}
ServerActionAddToPlacementGroupResponse defines the schema of the response when creating an add_to_placement_group server action.
type ServerActionAttachISORequest ¶
type ServerActionAttachISORequest struct {
ISO IDOrName `json:"iso"`
}
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 ¶
type ServerActionAttachToNetworkRequest struct {
Network int64 `json:"network"`
IP *string `json:"ip,omitempty"`
AliasIPs []*string `json:"alias_ips,omitempty"`
IPRange *string `json:"ip_range,omitempty"`
}
ServerActionAttachToNetworkRequest defines the schema for the request to attach a network to a server.
type ServerActionAttachToNetworkResponse ¶
type ServerActionAttachToNetworkResponse struct {
Action Action `json:"action"`
}
ServerActionAttachToNetworkResponse defines the schema of the response when creating an attach_to_network server action.
type ServerActionChangeAliasIPsRequest ¶
type ServerActionChangeAliasIPsRequest struct {
Network int64 `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 ¶
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 ¶
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 ¶
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 IDOrName `json:"server_type"`
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 ¶
type ServerActionDetachFromNetworkRequest struct {
Network int64 `json:"network"`
}
ServerActionDetachFromNetworkRequest defines the schema for the request to detach a network from a server.
type ServerActionDetachFromNetworkResponse ¶
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 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 []int64 `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 IDOrName `json:"image"`
}
ServerActionRebuildRequest defines the schema for the request to rebuild a server.
type ServerActionRebuildResponse ¶
type ServerActionRebuildResponse struct {
Action Action `json:"action"`
RootPassword *string `json:"root_password"`
}
ServerActionRebuildResponse defines the schema of the response when creating a rebuild server action.
type ServerActionRemoveFromPlacementGroupResponse ¶
type ServerActionRemoveFromPlacementGroupResponse struct {
Action Action `json:"action"`
}
ServerActionRemoveFromPlacementGroupResponse defines the schema of the response when creating a remove_from_placement_group server action.
type ServerActionRequestConsoleRequest ¶
type ServerActionRequestConsoleRequest struct{}
ServerActionRequestConsoleRequest defines the schema of the request to request a WebSocket VNC console.
type ServerActionRequestConsoleResponse ¶
type ServerActionRequestConsoleResponse struct {
Action Action `json:"action"`
WSSURL string `json:"wss_url"`
Password string `json:"password"`
}
ServerActionRequestConsoleResponse defines the schema of the response when requesting a WebSocket VNC console.
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 ServerCreateFirewalls ¶
type ServerCreateFirewalls struct {
Firewall int64 `json:"firewall"`
}
ServerCreateFirewalls defines which Firewalls to apply when creating a Server.
type ServerCreatePublicNet ¶
type ServerCreatePublicNet struct {
EnableIPv4 bool `json:"enable_ipv4"`
EnableIPv6 bool `json:"enable_ipv6"`
IPv4ID int64 `json:"ipv4,omitempty"`
IPv6ID int64 `json:"ipv6,omitempty"`
}
ServerCreatePublicNet defines the public network configuration of a server.
type ServerCreateRequest ¶
type ServerCreateRequest struct {
Name string `json:"name"`
ServerType IDOrName `json:"server_type"`
Image IDOrName `json:"image"`
SSHKeys []int64 `json:"ssh_keys,omitempty"`
Location string `json:"location,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 []int64 `json:"volumes,omitempty"`
Networks []int64 `json:"networks,omitempty"`
Firewalls []ServerCreateFirewalls `json:"firewalls,omitempty"`
PlacementGroup int64 `json:"placement_group,omitempty"`
PublicNet *ServerCreatePublicNet `json:"public_net,omitempty"`
// Deprecated: [ServerCreateRequest.Datacenter] is deprecated and will be removed after 1 July 2026.
// Use [ServerCreateRequest.Location] instead.
// See https://docs.hetzner.cloud/changelog#2025-12-16-phasing-out-datacenters
Datacenter string `json:"datacenter,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 ServerDeleteResponse ¶
type ServerDeleteResponse struct {
Action Action `json:"action"`
}
ServerDeleteResponse defines the schema of the response when deleting a server.
type ServerFirewall ¶
ServerFirewall defines the schema of a Server's Firewalls on a certain network interface.
type ServerGetMetricsResponse ¶
type ServerGetMetricsResponse struct {
Metrics struct {
Start time.Time `json:"start"`
End time.Time `json:"end"`
Step float64 `json:"step"`
TimeSeries map[string]ServerTimeSeriesVals `json:"time_series"`
} `json:"metrics"`
}
ServerGetMetricsResponse defines the schema of the response when requesting metrics for 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 ¶
type ServerPrivateNet struct {
Network int64 `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 ¶
ServerProtection defines the schema of a server's resource protection.
type ServerPublicNet ¶
type ServerPublicNet struct {
IPv4 ServerPublicNetIPv4 `json:"ipv4"`
IPv6 ServerPublicNetIPv6 `json:"ipv6"`
FloatingIPs []int64 `json:"floating_ips"`
Firewalls []ServerFirewall `json:"firewalls"`
}
ServerPublicNet defines the schema of a server's public network information.
type ServerPublicNetIPv4 ¶
type ServerPublicNetIPv4 struct {
ID int64 `json:"id"`
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 {
ID int64 `json:"id"`
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 ServerTimeSeriesVals ¶
type ServerTimeSeriesVals struct {
Values []interface{} `json:"values"`
}
ServerTimeSeriesVals contains the values for a Server time series.
type ServerType ¶
type ServerType struct {
ID int64 `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Category string `json:"category"`
Cores int `json:"cores"`
Memory float32 `json:"memory"`
Disk int `json:"disk"`
StorageType string `json:"storage_type"`
CPUType string `json:"cpu_type"`
Architecture string `json:"architecture"`
// Deprecated: [ServerType.IncludedTraffic] is deprecated and will always report 0 after 2024-08-05.
// Use [ServerType.Prices] instead to get the included traffic for each location.
IncludedTraffic int64 `json:"included_traffic"`
Prices []PricingServerTypePrice `json:"prices"`
// Deprecated: [ServerType.Deprecated] is deprecated and will gradually be phased out starting 2025-09-24.
// To learn about deprecations affecting individual locations you can use [ServerType.Locations] instead.
Deprecated bool `json:"deprecated"`
// Deprecated: [ServerType.DeprecatableResource] is deprecated and will gradually be phased out starting 2025-09-24.
// To learn about deprecations affecting individual locations you can use [ServerType.Locations] instead.
DeprecatableResource
Locations []ServerTypeLocation `json:"locations"`
}
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 ServerTypeLocation ¶ added in v2.25.0
type ServerTypeLocation struct {
ID int64 `json:"id"`
Name string `json:"name"`
DeprecatableResource
}
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 StorageBox ¶ added in v2.28.0
type StorageBox struct {
ID int64 `json:"id"`
Username *string `json:"username"`
Status string `json:"status"`
Name string `json:"name"`
StorageBoxType StorageBoxType `json:"storage_box_type"`
Location Location `json:"location"`
AccessSettings StorageBoxAccessSettings `json:"access_settings"`
Server *string `json:"server"`
System *string `json:"system"`
Stats StorageBoxStats `json:"stats"`
Labels map[string]string `json:"labels"`
Protection StorageBoxProtection `json:"protection"`
SnapshotPlan *StorageBoxSnapshotPlan `json:"snapshot_plan"`
Created time.Time `json:"created"`
}
StorageBox defines the schema of a Storage Box.
type StorageBoxAccessSettings ¶ added in v2.28.0
type StorageBoxAccessSettings struct {
ReachableExternally bool `json:"reachable_externally"`
SambaEnabled bool `json:"samba_enabled"`
SSHEnabled bool `json:"ssh_enabled"`
WebDAVEnabled bool `json:"webdav_enabled"`
ZFSEnabled bool `json:"zfs_enabled"`
}
StorageBoxAccessSettings defines the schema of a Storage Box's access settings.
type StorageBoxChangeProtectionRequest ¶ added in v2.28.0
type StorageBoxChangeProtectionRequest struct {
Delete *bool `json:"delete,omitempty"`
}
StorageBoxChangeProtectionRequest defines the schema of the request to change the resource protection of a Storage Box.
type StorageBoxChangeTypeRequest ¶ added in v2.28.0
type StorageBoxChangeTypeRequest struct {
StorageBoxType IDOrName `json:"storage_box_type"`
}
StorageBoxChangeTypeRequest defines the schema of the request to change the type of a Storage Box.
type StorageBoxCreateRequest ¶ added in v2.28.0
type StorageBoxCreateRequest struct {
Name string `json:"name"`
StorageBoxType IDOrName `json:"storage_box_type"`
Location IDOrName `json:"location"`
Labels *map[string]string `json:"labels,omitempty"`
Password string `json:"password"`
SSHKeys []string `json:"ssh_keys,omitempty"`
AccessSettings *StorageBoxCreateRequestAccessSettings `json:"access_settings,omitempty"`
}
StorageBoxCreateRequest defines the schema for the request to create a Storage Box.
type StorageBoxCreateRequestAccessSettings ¶ added in v2.28.0
type StorageBoxCreateRequestAccessSettings struct {
ReachableExternally *bool `json:"reachable_externally,omitempty"`
SambaEnabled *bool `json:"samba_enabled,omitempty"`
SSHEnabled *bool `json:"ssh_enabled,omitempty"`
WebDAVEnabled *bool `json:"webdav_enabled,omitempty"`
ZFSEnabled *bool `json:"zfs_enabled,omitempty"`
}
type StorageBoxCreateResponse ¶ added in v2.28.0
type StorageBoxCreateResponse struct {
StorageBox StorageBox `json:"storage_box"`
Action Action `json:"action"`
}
StorageBoxCreateResponse defines the schema of the response when creating a Storage Box.
type StorageBoxEnableSnapshotPlanRequest ¶ added in v2.28.0
type StorageBoxEnableSnapshotPlanRequest struct {
MaxSnapshots int `json:"max_snapshots"`
Minute int `json:"minute"`
Hour int `json:"hour"`
DayOfWeek *int `json:"day_of_week"` // No omitempty because nil have a meaning and is the default in the API.
DayOfMonth *int `json:"day_of_month"` // No omitempty because nil have a meaning and is the default in the API.
}
StorageBoxEnableSnapshotPlanRequest defines the schema of the request to enable a snapshot plan for a Storage Box.
type StorageBoxFoldersResponse ¶ added in v2.28.0
type StorageBoxFoldersResponse struct {
Folders []string `json:"folders"`
}
StorageBoxFoldersResponse defines the schema of the response when listing folders in a Storage Box.
type StorageBoxGetResponse ¶ added in v2.28.0
type StorageBoxGetResponse struct {
StorageBox StorageBox `json:"storage_box"`
}
StorageBoxGetResponse defines the schema of the response when retrieving a single Storage Box.
type StorageBoxListResponse ¶ added in v2.28.0
type StorageBoxListResponse struct {
StorageBoxes []StorageBox `json:"storage_boxes"`
}
StorageBoxListResponse defines the schema of the response when listing Storage Boxes.
type StorageBoxProtection ¶ added in v2.28.0
type StorageBoxProtection struct {
Delete bool `json:"delete"`
}
StorageBoxProtection defines the schema of a Storage Box's resource protection.
type StorageBoxResetPasswordRequest ¶ added in v2.28.0
type StorageBoxResetPasswordRequest struct {
Password string `json:"password"`
}
StorageBoxChangeTypeResponse defines the schema of the response when changing the type of a Storage Box.
type StorageBoxRollbackSnapshotRequest ¶ added in v2.28.0
type StorageBoxRollbackSnapshotRequest struct {
Snapshot IDOrName `json:"snapshot"`
}
StorageBoxRollbackSnapshotRequest defines the schema of the request to roll back a Storage Box to a snapshot.
type StorageBoxSnapshot ¶ added in v2.28.0
type StorageBoxSnapshot struct {
ID int64 `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Stats StorageBoxSnapshotStats `json:"stats"`
IsAutomatic bool `json:"is_automatic"`
Labels map[string]string `json:"labels"`
Created time.Time `json:"created"`
StorageBox int64 `json:"storage_box"`
}
StorageBoxSnapshot defines the schema of a Storage Box snapshot.
type StorageBoxSnapshotCreateRequest ¶ added in v2.28.0
type StorageBoxSnapshotCreateRequest struct {
Description string `json:"description,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
}
StorageBoxSnapshotCreateRequest defines the schema of the request to create a Storage Box snapshot.
type StorageBoxSnapshotCreateResponse ¶ added in v2.28.0
type StorageBoxSnapshotCreateResponse struct {
Snapshot StorageBoxSnapshot `json:"snapshot"`
Action Action `json:"action"`
}
StorageBoxSnapshotCreateResponse defines the schema of the response when creating a Storage Box snapshot.
type StorageBoxSnapshotGetResponse ¶ added in v2.28.0
type StorageBoxSnapshotGetResponse struct {
Snapshot StorageBoxSnapshot `json:"snapshot"`
}
StorageBoxSnapshotGetResponse defines the schema of the response when retrieving a single Storage Box snapshot.
type StorageBoxSnapshotListResponse ¶ added in v2.28.0
type StorageBoxSnapshotListResponse struct {
Snapshots []StorageBoxSnapshot `json:"snapshots"`
}
StorageBoxSnapshotListResponse defines the schema of the response when listing Storage Box snapshots.
type StorageBoxSnapshotPlan ¶ added in v2.28.0
type StorageBoxSnapshotPlan struct {
MaxSnapshots int `json:"max_snapshots"`
Minute int `json:"minute"`
Hour int `json:"hour"`
DayOfWeek *int `json:"day_of_week"`
DayOfMonth *int `json:"day_of_month"`
}
StorageBoxSnapshotPlan defines the schema of a Storage Box's snapshot plan.
type StorageBoxSnapshotStats ¶ added in v2.28.0
type StorageBoxSnapshotStats struct {
Size uint64 `json:"size"`
SizeFilesystem uint64 `json:"size_filesystem"`
}
StorageBoxSnapshotStats defines the schema of a Storage Box snapshot's size statistics.
type StorageBoxSnapshotUpdateRequest ¶ added in v2.28.0
type StorageBoxSnapshotUpdateRequest struct {
Description *string `json:"description,omitempty"`
Labels *map[string]string `json:"labels,omitempty"`
}
StorageBoxSnapshotUpdateRequest defines the schema of the request to update a Storage Box snapshot.
type StorageBoxSnapshotUpdateResponse ¶ added in v2.28.0
type StorageBoxSnapshotUpdateResponse struct {
Snapshot StorageBoxSnapshot `json:"snapshot"`
}
StorageBoxSnapshotUpdateResponse defines the schema of the response when updating a Storage Box snapshot.
type StorageBoxStats ¶ added in v2.28.0
type StorageBoxStats struct {
Size uint64 `json:"size"`
SizeData uint64 `json:"size_data"`
SizeSnapshots uint64 `json:"size_snapshots"`
}
StorageBoxStats defines the schema of a Storage Box's disk usage statistics.
type StorageBoxSubaccount ¶ added in v2.28.0
type StorageBoxSubaccount struct {
ID int64 `json:"id"`
Username string `json:"username"`
HomeDirectory string `json:"home_directory"`
Server string `json:"server"`
AccessSettings StorageBoxSubaccountAccessSettings `json:"access_settings"`
Description string `json:"description"`
Labels map[string]string `json:"labels"`
Created time.Time `json:"created"`
StorageBox int64 `json:"storage_box"`
}
StorageBoxSubaccount defines the schema of a Storage Box subaccount.
type StorageBoxSubaccountAccessSettings ¶ added in v2.28.0
type StorageBoxSubaccountAccessSettings struct {
ReachableExternally bool `json:"reachable_externally"`
Readonly bool `json:"readonly"`
SambaEnabled bool `json:"samba_enabled"`
SSHEnabled bool `json:"ssh_enabled"`
WebDAVEnabled bool `json:"webdav_enabled"`
}
StorageBoxSubaccountAccessSettings defines the schema of a Storage Box subaccount's access settings.
type StorageBoxSubaccountChangeHomeDirectoryRequest ¶ added in v2.28.0
type StorageBoxSubaccountChangeHomeDirectoryRequest struct {
HomeDirectory string `json:"home_directory"`
}
StorageBoxSubaccountChangeHomeDirectoryRequest defines the schema of the request when changing the home directory of a Storage Box subaccount.
type StorageBoxSubaccountCreateRequest ¶ added in v2.28.0
type StorageBoxSubaccountCreateRequest struct {
HomeDirectory string `json:"home_directory"`
Password string `json:"password"`
Description string `json:"description,omitempty"`
AccessSettings *StorageBoxSubaccountCreateRequestAccessSettings `json:"access_settings,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
}
StorageBoxSubaccountCreateRequest defines the schema of the request when creating a Storage Box subaccount.
type StorageBoxSubaccountCreateRequestAccessSettings ¶ added in v2.28.0
type StorageBoxSubaccountCreateRequestAccessSettings struct {
ReachableExternally *bool `json:"reachable_externally,omitempty"`
Readonly *bool `json:"readonly,omitempty"`
SambaEnabled *bool `json:"samba_enabled,omitempty"`
SSHEnabled *bool `json:"ssh_enabled,omitempty"`
WebDAVEnabled *bool `json:"webdav_enabled,omitempty"`
}
StorageBoxSubaccountCreateRequestAccessSettings defines the schema of the access settings in the request when creating a Storage Box subaccount.
type StorageBoxSubaccountCreateResponse ¶ added in v2.28.0
type StorageBoxSubaccountCreateResponse struct {
Subaccount StorageBoxSubaccountCreateResponseSubaccount `json:"subaccount"`
Action Action `json:"action"`
}
StorageBoxSubaccountCreateResponse defines the schema of the response when creating a Storage Box subaccount.
type StorageBoxSubaccountCreateResponseSubaccount ¶ added in v2.28.0
type StorageBoxSubaccountCreateResponseSubaccount struct {
ID int64 `json:"id"`
StorageBox int64 `json:"storage_box"`
}
StorageBoxSubaccountCreateResponseSubaccount defines the schema of the subaccount in the response when creating a Storage Box subaccount.
type StorageBoxSubaccountGetResponse ¶ added in v2.28.0
type StorageBoxSubaccountGetResponse struct {
Subaccount StorageBoxSubaccount `json:"subaccount"`
}
StorageBoxSubaccountGetResponse defines the schema of the response when retrieving a single Storage Box subaccount.
type StorageBoxSubaccountListResponse ¶ added in v2.28.0
type StorageBoxSubaccountListResponse struct {
Subaccounts []StorageBoxSubaccount `json:"subaccounts"`
}
StorageBoxSubaccountListResponse defines the schema of the response when listing Storage Box subaccounts.
type StorageBoxSubaccountResetPasswordRequest ¶ added in v2.28.0
type StorageBoxSubaccountResetPasswordRequest struct {
Password string `json:"password"`
}
StorageBoxSubaccountResetPasswordRequest defines the schema of the request when resetting a Storage Box subaccount's password.
type StorageBoxSubaccountUpdateAccessSettingsRequest ¶ added in v2.28.0
type StorageBoxSubaccountUpdateAccessSettingsRequest struct {
ReachableExternally *bool `json:"reachable_externally,omitempty"`
Readonly *bool `json:"readonly,omitempty"`
SambaEnabled *bool `json:"samba_enabled,omitempty"`
SSHEnabled *bool `json:"ssh_enabled,omitempty"`
WebDAVEnabled *bool `json:"webdav_enabled,omitempty"`
}
StorageBoxSubaccountUpdateAccessSettingsRequest defines the schema of the request when updating Storage Box subaccount's access settings.
type StorageBoxSubaccountUpdateRequest ¶ added in v2.28.0
type StorageBoxSubaccountUpdateRequest struct {
Description *string `json:"description,omitempty"`
Labels *map[string]string `json:"labels,omitempty"`
}
StorageBoxSubaccountUpdateRequest defines the schema of the request when updating a Storage Box subaccount.
type StorageBoxSubaccountUpdateResponse ¶ added in v2.28.0
type StorageBoxSubaccountUpdateResponse struct {
Subaccount StorageBoxSubaccount `json:"subaccount"`
}
StorageBoxSubaccountUpdateResponse defines the schema of the response when updating a Storage Box subaccount.
type StorageBoxType ¶ added in v2.28.0
type StorageBoxType struct {
ID int64 `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
SnapshotLimit *int `json:"snapshot_limit"`
AutomaticSnapshotLimit *int `json:"automatic_snapshot_limit"`
SubaccountsLimit int `json:"subaccounts_limit"`
Size int64 `json:"size"`
Prices []StorageBoxTypePrice `json:"prices"`
DeprecatableResource
}
StorageBoxType represents a Storage Box type as returned by the Hetzner Cloud API.
type StorageBoxTypeGetResponse ¶ added in v2.28.0
type StorageBoxTypeGetResponse struct {
StorageBoxType StorageBoxType `json:"storage_box_type"`
}
StorageBoxTypeGetResponse represents the response for getting a single Storage Box Type.
type StorageBoxTypeListResponse ¶ added in v2.28.0
type StorageBoxTypeListResponse struct {
StorageBoxTypes []StorageBoxType `json:"storage_box_types"`
}
StorageBoxTypeListResponse represents the response for listing Storage Box Types.
type StorageBoxTypePrice ¶ added in v2.28.0
type StorageBoxTypePrice struct {
Location string `json:"location"`
PriceHourly Price `json:"price_hourly"`
PriceMonthly Price `json:"price_monthly"`
SetupFee Price `json:"setup_fee"`
}
StorageBoxTypePrice represents pricing for a Storage Box type in a specific location.
type StorageBoxUpdateAccessSettingsRequest ¶ added in v2.28.0
type StorageBoxUpdateAccessSettingsRequest struct {
ReachableExternally *bool `json:"reachable_externally,omitempty"`
SambaEnabled *bool `json:"samba_enabled,omitempty"`
SSHEnabled *bool `json:"ssh_enabled,omitempty"`
WebDAVEnabled *bool `json:"webdav_enabled,omitempty"`
ZFSEnabled *bool `json:"zfs_enabled,omitempty"`
}
StorageBoxUpdateAccessSettingsRequest defines the schema of the request when updating a Storage Box's access settings.
type StorageBoxUpdateRequest ¶ added in v2.28.0
type StorageBoxUpdateRequest struct {
Name string `json:"name,omitempty"`
Labels *map[string]string `json:"labels,omitempty"`
}
StorageBoxUpdateRequest defines the schema of the request to update a Storage Box.
type StorageBoxUpdateResponse ¶ added in v2.28.0
type StorageBoxUpdateResponse struct {
StorageBox StorageBox `json:"storage_box"`
}
StorageBoxUpdateResponse defines the schema of the response when updating a Storage Box.
type Volume ¶
type Volume struct {
ID int64 `json:"id"`
Name string `json:"name"`
Server *int64 `json:"server"`
Status string `json:"status"`
Location Location `json:"location"`
Size int `json:"size"`
Format *string `json:"format"`
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 ¶
type VolumeActionAttachVolumeRequest struct {
Server int64 `json:"server"`
Automount *bool `json:"automount,omitempty"`
}
VolumeActionAttachVolumeRequest defines the schema of the request to attach a volume to a server.
type VolumeActionAttachVolumeResponse ¶
type VolumeActionAttachVolumeResponse struct {
Action Action `json:"action"`
}
VolumeActionAttachVolumeResponse defines the schema of the response when attaching a volume to a server.
type VolumeActionChangeProtectionRequest ¶
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 ¶
type VolumeActionChangeProtectionResponse struct {
Action Action `json:"action"`
}
VolumeActionChangeProtectionResponse defines the schema of the response when changing the resource protection of a volume.
type VolumeActionDetachVolumeRequest ¶
type VolumeActionDetachVolumeRequest struct{}
VolumeActionDetachVolumeRequest defines the schema of the request to create an detach volume action.
type VolumeActionDetachVolumeResponse ¶
type VolumeActionDetachVolumeResponse struct {
Action Action `json:"action"`
}
VolumeActionDetachVolumeResponse defines the schema of the response when creating an detach volume action.
type VolumeActionResizeVolumeRequest ¶
type VolumeActionResizeVolumeRequest struct {
Size int `json:"size"`
}
VolumeActionResizeVolumeRequest defines the schema of the request to resize a volume.
type VolumeActionResizeVolumeResponse ¶
type VolumeActionResizeVolumeResponse struct {
Action Action `json:"action"`
}
VolumeActionResizeVolumeResponse defines the schema of the response when resizing a volume.
type VolumeCreateRequest ¶
type VolumeCreateRequest struct {
Name string `json:"name"`
Size int `json:"size"`
Server *int64 `json:"server,omitempty"`
Location *IDOrName `json:"location,omitempty"`
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 ¶
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 ¶
type VolumeGetResponse struct {
Volume Volume `json:"volume"`
}
VolumeGetResponse defines the schema of the response when retrieving a single volume.
type VolumeListResponse ¶
type VolumeListResponse struct {
Volumes []Volume `json:"volumes"`
}
VolumeListResponse defines the schema of the response when listing volumes.
type VolumeProtection ¶
type VolumeProtection struct {
Delete bool `json:"delete"`
}
VolumeProtection defines the schema of a volume's resource protection.
type VolumeUpdateRequest ¶
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 ¶
type VolumeUpdateResponse struct {
Volume Volume `json:"volume"`
}
VolumeUpdateResponse defines the schema of the response when updating a volume.
type Zone ¶ added in v2.27.0
type Zone struct {
ID int64 `json:"id"`
Name string `json:"name"`
Created time.Time `json:"created"`
TTL int `json:"ttl"`
Mode string `json:"mode"`
PrimaryNameservers []ZonePrimaryNameserver `json:"primary_nameservers"`
Protection ZoneProtection `json:"protection"`
Labels map[string]string `json:"labels"`
AuthoritativeNameservers ZoneAuthoritativeNameservers `json:"authoritative_nameservers"`
Registrar string `json:"registrar"`
Status string `json:"status"`
RecordCount int `json:"record_count"`
}
type ZoneAuthoritativeNameservers ¶ added in v2.27.0
type ZoneChangePrimaryNameserversRequest ¶ added in v2.27.0
type ZoneChangePrimaryNameserversRequest struct {
PrimaryNameservers []ZoneChangePrimaryNameserversRequestPrimaryNameserver `json:"primary_nameservers"`
}
type ZoneChangePrimaryNameserversRequestPrimaryNameserver ¶ added in v2.27.0
type ZoneChangeProtectionRequest ¶ added in v2.27.0
type ZoneChangeProtectionRequest struct {
Delete *bool `json:"delete,omitempty"`
}
type ZoneChangeTTLRequest ¶ added in v2.27.0
type ZoneChangeTTLRequest struct {
TTL int `json:"ttl"`
}
type ZoneCreateRequest ¶ added in v2.27.0
type ZoneCreateRequest struct {
Name string `json:"name"`
Mode string `json:"mode"`
TTL *int `json:"ttl,omitempty"`
Labels *map[string]string `json:"labels,omitempty"`
PrimaryNameservers []ZoneCreateRequestPrimaryNameserver `json:"primary_nameservers,omitempty"`
RRSets []ZoneCreateRequestRRSet `json:"rrsets,omitempty"`
Zonefile string `json:"zonefile,omitempty"`
}
type ZoneCreateRequestPrimaryNameserver ¶ added in v2.27.0
type ZoneCreateRequestRRSet ¶ added in v2.27.0
type ZoneCreateResponse ¶ added in v2.27.0
type ZoneExportZonefileResponse ¶ added in v2.27.0
type ZoneExportZonefileResponse struct {
Zonefile string `json:"zonefile"`
}
type ZoneGetResponse ¶ added in v2.27.0
type ZoneGetResponse struct {
Zone Zone `json:"zone"`
}
type ZoneImportZonefileRequest ¶ added in v2.27.0
type ZoneImportZonefileRequest struct {
Zonefile string `json:"zonefile"`
}
type ZoneListResponse ¶ added in v2.27.0
type ZoneListResponse struct {
Zones []Zone `json:"zones"`
}
type ZonePrimaryNameserver ¶ added in v2.27.0
type ZoneProtection ¶ added in v2.27.0
type ZoneProtection struct {
Delete bool `json:"delete"`
}
type ZoneRRSet ¶ added in v2.27.0
type ZoneRRSet struct {
ID string `json:"id"`
Name string `json:"name"`
Type string `json:"type"`
TTL *int `json:"ttl"`
Labels map[string]string `json:"labels"`
Protection ZoneRRSetProtection `json:"protection"`
Records []ZoneRRSetRecord `json:"records"`
Zone int64 `json:"zone"`
}
type ZoneRRSetAddRecordsRequest ¶ added in v2.27.0
type ZoneRRSetAddRecordsRequest struct {
Records []ZoneRRSetRecord `json:"records"`
TTL *int `json:"ttl,omitempty"`
}
type ZoneRRSetChangeProtectionRequest ¶ added in v2.27.0
type ZoneRRSetChangeProtectionRequest struct {
Change *bool `json:"change,omitempty"`
}
type ZoneRRSetChangeTTLRequest ¶ added in v2.27.0
type ZoneRRSetChangeTTLRequest struct {
TTL *int `json:"ttl"`
}
type ZoneRRSetCreateRequest ¶ added in v2.27.0
type ZoneRRSetCreateResponse ¶ added in v2.27.0
type ZoneRRSetGetResponse ¶ added in v2.27.0
type ZoneRRSetGetResponse struct {
RRSet ZoneRRSet `json:"rrset"`
}
type ZoneRRSetListResponse ¶ added in v2.27.0
type ZoneRRSetListResponse struct {
RRSets []ZoneRRSet `json:"rrsets"`
}
type ZoneRRSetProtection ¶ added in v2.27.0
type ZoneRRSetProtection struct {
Change bool `json:"change"`
}
type ZoneRRSetRecord ¶ added in v2.27.0
type ZoneRRSetRemoveRecordsRequest ¶ added in v2.27.0
type ZoneRRSetRemoveRecordsRequest struct {
Records []ZoneRRSetRecord `json:"records"`
}
type ZoneRRSetSetRecordsRequest ¶ added in v2.27.0
type ZoneRRSetSetRecordsRequest struct {
Records []ZoneRRSetRecord `json:"records"`
}
type ZoneRRSetUpdateRecordsRequest ¶ added in v2.33.0
type ZoneRRSetUpdateRecordsRequest struct {
Records []ZoneRRSetUpdateRecordsRequestRecord `json:"records"`
}
type ZoneRRSetUpdateRecordsRequestRecord ¶ added in v2.33.0
type ZoneRRSetUpdateRequest ¶ added in v2.27.0
type ZoneRRSetUpdateResponse ¶ added in v2.27.0
type ZoneRRSetUpdateResponse struct {
RRSet ZoneRRSet `json:"rrset"`
}
type ZoneUpdateRequest ¶ added in v2.27.0
type ZoneUpdateResponse ¶ added in v2.27.0
type ZoneUpdateResponse struct {
Zone Zone `json:"zone"`
}
Source Files
¶
- action.go
- certificate.go
- datacenter.go
- deprecation.go
- doc.go
- error.go
- firewall.go
- floating_ip.go
- id_or_name.go
- image.go
- iso.go
- load_balancer.go
- load_balancer_type.go
- location.go
- meta.go
- network.go
- placement_group.go
- pricing.go
- primary_ip.go
- server.go
- server_type.go
- ssh_key.go
- storage_box.go
- storage_box_snapshot.go
- storage_box_subaccount.go
- storage_box_type.go
- volume.go
- zone.go
- zone_rrset.go