Package me.tomsdevsn.hetznercloud
Class HetznerCloudAPI
java.lang.Object
me.tomsdevsn.hetznercloud.HetznerCloudAPI
-
Constructor Summary
ConstructorDescriptionHetznerCloudAPI
(String hcloudToken) Initial method to use the APIHetznerCloudAPI
(String hcloudToken, okhttp3.OkHttpClient client) Initial method to use the API -
Method Summary
Modifier and TypeMethodDescriptionaddRouteToNetwork
(long id, NetworkRouteRequest networkRouteRequest) Add a route to a network.addServerToPlacementGroup
(long serverId, long placementGroupId) Add a server to a placement group.addServiceToLoadBalancer
(long id, LBServiceRequest lbServiceRequest) Add a service to a Load Balancer.addSubnetToNetwork
(long id, AddSubnetToNetworkRequest addSubnetToNetworkRequest) Add a new subnet to a network.addTargetToLoadBalancer
(long id, LBTargetRequest lbTargetRequest) Add a target to a Load Balancer.applyFirewallToResources
(long id, List<FWApplicationTarget> applicationTargets) Applies one Firewall to multiple resources.assignFloatingIP
(long id, AssignFloatingIPRequest assignFloatingIPRequest) Assign a Floating IP to a serverassignPrimaryIP
(long id, AssignPrimaryIPRequest assignPrimaryIPRequest) Assign a Primary IP to a resource.attachISO
(long id, AttachISORequest attachISORequest) Attach an ISO to a server.attachNetworkToLoadBalancer
(long id, long networkId) Attach a network to a Load Balancer.attachNetworkToLoadBalancer
(long id, long networkId, String ip) Attach a network to a Load Balancer.attachServerToNetwork
(long id, AttachServerToNetworkRequest attachServerToNetworkRequest) Attaches a server to a private network.attachVolumeToServer
(long id, AttachVolumeRequest attachVolumeRequest) Attach a volume to a server.changeAlgorithmOfLoadBalancer
(long id, String algorithmType) Changes the algorithm that determines to which target new requests are sent.changeAliasIPsOfNetwork
(long id, ChangeAliasIPsofNetworkRequest changeAliasIPsofNetworkRequest) Change alias IPs of a network.changeDNSPTR
(long id, ChangeReverseDNSRequest changeReverseDNSRequest) Changes the reverse DNS entry from a server.changeFloatingIPProtection
(long id, ChangeProtectionRequest protectionRequest) Enable or disable the Protection of a Floating IPchangeFloatingReverseDNS
(long id, ChangeReverseDNSRequest changeReverseDNSRequest) Change the reverse DNS entry for a Floating IPchangeImageProtection
(long id, ChangeProtectionRequest protectionRequest) Enable or disable the Protection of an ImagechangeIPRangeOfNetwork
(long id, ChangeIPRangeOfNetwork changeIPRangeOfNetwork) Change the IP range of a network.changeNetworkProtection
(long id, ChangeProtectionRequest changeProtection) Change the protection configuration for a networkchangePrimaryIPProtection
(long id, ChangeProtectionRequest changeProtectionRequest) changePrimaryIPReverseDNS
(long id, ChangeReverseDNSRequest changeReverseDNSRequest) Update a reverse DNS entry for a Primary IPchangeProtectionOfLoadBalancer
(long id, boolean delete) Change the protection configuration of a Load Balancer.changeServerProtection
(long id, ChangeProtectionRequest changeProtection) Change the protection configuration of a server.changeServerType
(long id, ChangeTypeRequest changeTypeRequest) Change the type from the serverchangeTypeOfLoadBalancer
(long id, String loadBalancerType) Changes the type of a Load Balancer.changeVolumeProtection
(long id, ChangeProtectionRequest changeProtectionRequest) Change the protection mode of the volume.convertToISO8601
(Date date) Converts a Date to the ISO-8601 formatcreateCertificate
(CreateCertificateRequest createCertificateRequest) Create a new certificate.createFirewall
(CreateFirewallRequest createFirewallRequest) Creates a new Firewall.createFloatingIP
(CreateFloatingIPRequest createFloatingIPRequest) Create a Floating IP for the project or for a Server.createImage
(long id, CreateImageRequest createImageRequest) Create an image from a servercreateLoadBalancer
(CreateLoadBalancerRequest createLoadBalancerRequest) Create a new Load Balancer.createNetwork
(CreateNetworkRequest createNetworkRequest) Create a new private network.createPlacementGroup
(CreatePlacementGroupRequest placementGroupRequest) Create a placement group.createPrimaryIP
(CreatePrimaryIPRequest createPrimaryIPRequest) Create a Primary IPcreateServer
(CreateServerRequest createServerRequest) Create a server.createSSHKey
(CreateSSHKeyRequest createSshKeyRequest) Create an SSH key.createVolume
(CreateVolumeRequest createVolumeRequest) Create a new volume.deleteCertificate
(long id) Delete a certificate.void
deleteFirewall
(long id) Deletes a Firewall.deleteFloatingIP
(long id) Delete a Floating IP.deleteImage
(long id) Delete an image,deleteLoadBalancer
(long id) Delete a Load Balancer.deleteNetwork
(long id) Delete a network.deletePlacementGroup
(long id) Delete a placement group.deletePrimaryIP
(Long id) Delete a Primary IPdeleteRouteFromNetwork
(long id, NetworkRouteRequest networkRouteRequest) Delete a route from a network.deleteServer
(long id) Delete a serverdeleteServiceOfLoadBalancer
(long id, long listenPort) Delete a service of a Load Balancer.deleteSSHKey
(long id) Delete an SSH key.deleteSubnetFromNetwork
(long id, DeleteSubnetFromNetwork deleteSubnetFromNetwork) Delete a subnet from a network.deleteVolume
(long id) Delete a volumedetachISO
(long id) Detach an ISO from a server.detachNetworkFromLoadBalancer
(long id, long networkId) Detach a network from a Load Balancer.detachServerFromNetwork
(long id, DetachServerFromNetworkRequest detachServerFromNetworkRequest) Detaches a server from a private network.detachVolume
(long id) Detach a volume from a server.disablePublicInterfaceOfLoadBalancer
(long id) Disable the public interface of a Load Balancer.disableRescue
(long id) Disables the rescue mode from the server.enableBackup
(long id) Enable the backups from a server Please note that this action will increase the price of the server by 20%enablePublicInterfaceOfLoadBalancer
(long id) Enable the public interface of a Load Balancer.enableRescue
(long id) Enables the rescue mode from the serverenableRescue
(long id, EnableRescueRequest enableRescueRequest) Enables the rescue mode from the servergetAction
(long id) Get an action by id.Deprecated.This function has been deprecated by HetznergetActions
(ActionStatus actionStatus) Deprecated.This function has been deprecated by HetznergetActions
(ActionStatus actionStatus, PaginationParameters paginationParameters) Deprecated.This function has been deprecated by HetznergetCertificate
(long id) Get a specific certificate by id.getCertificate
(String name) Get a specific certificate by its name.Get all certificates from the project.getCertificates
(String labelSelector) Get all certificates by label selector.getCertificates
(String labelSelector, PaginationParameters paginationParameters) Get all certificates by label selector.getCertificates
(PaginationParameters paginationParameters) Get all certificates from the project.getDatacenter
(long id) Get a Datacenter by IDgetDatacenter
(String name) Get a datacenter by nameGet all available datacenters and the recommendationgetFirewall
(long id) Gets a specific Firewall.getFirewallActions
(long id) Returns all Action objects for a Firewall.Returns 25 Firewall objects.getFirewalls
(String labelSelector) Get all Firewalls in a project by label selector.getFirewalls
(String labelSelector, PaginationParameters paginationParameters) Returns all Firewall objects.getFirewalls
(PaginationParameters paginationParameters) Get all Firewalls in a project.getFloatingIP
(long id) Get a specific Floating IP.getFloatingIPActions
(long id) Get all performed Actions of a Floating IPGet all Floating IPs in a project.getFloatingIPs
(String labelSelector) Get all Floating IPs in a project by label selector.getFloatingIPs
(String labelSelector, PaginationParameters paginationParameters) Get all Floating IPs in a project.getFloatingIPs
(PaginationParameters paginationParameters) Get all Floating IPs in a project.getImage
(long id) Get image by ID.getImageByName
(String name) Get an image by name.Get all available images.Get all images by label selector.getImages
(String labelSelector, Architecture architecture) Get all images by label selector and architecture.getImages
(String labelSelector, Architecture architecture, PaginationParameters paginationParameters) Get all available images.getImages
(String labelSelector, PaginationParameters paginationParameters) Get all images by label selector with pagination.getImages
(Architecture architecture) Get all images by architecture.getImages
(Architecture architecture, PaginationParameters paginationParameters) Get all images by architecture with pagination.getImagesByType
(ImageType type) Get all images by type.getImagesByType
(ImageType type, PaginationParameters paginationParameters) Get all images by type.getISO
(long id) Get an ISO by IDgetISOS()
Get all available ISO's.getISOS
(Architecture architecture) Get all available ISO's by architecture.getISOS
(Architecture architecture, PaginationParameters paginationParameters) Get all available ISO's.getISOS
(PaginationParameters paginationParameters) Get all available ISO's with pagination.getLoadBalancer
(long id) Get a specific Load Balancer.getLoadBalancerActions
(long id) Get all actions of a Load Balancer.getLoadBalancerByName
(String name) Get Load Balancer by name.Get all Load Balancers.getLoadBalancers
(String labelSelector) Get all Load Balancers by label selector.getLoadBalancers
(String labelSelector, PaginationParameters paginationParameters) Get all Load Balancers.getLoadBalancerType
(long id) Get a Load Balancer type by id.Get Load Balancer type by name.Get all Load Balancer types.getLocation
(long id) Get a location by id.getLocationByName
(String name) Get a Location by name.Get all available Locations.getNetwork
(long id) Get a network with it's specific ID.getNetworkActions
(long id) Get all performed Actions for a networkGet all Private networks in a project.getNetworks
(String labelSelector) Get all Private Networks in a project with a label selector.getNetworks
(String labelSelector, PaginationParameters paginationParameters) Get all Private networks in a project.getNetworks
(PaginationParameters paginationParameters) Get all Private networks in a project.getNetworksByName
(String name) Get all networks with specific name.getPlacementGroup
(long id) Get a specific placement group.getPlacementGroup
(String name) Get placement group by name.Get placement groups by typeGet all placement groups.getPlacementGroups
(String labelSelector) Get placement groups by label selector.getPlacementGroups
(PaginationParameters paginationParameters) Get all placement groups.Get all prices from the productsgetPrimaryIP
(long id) Get a Primary IP by its idgetPrimaryIP
(String ip) Get a Primary IP by the IP address itselfgetPrimaryIPByName
(String name) Get a Primary IP by its name in a projectGet all Primary IPs in a projectgetPrimaryIPs
(String labelSelector) Get all Primary IPs in a project by label selectorgetPrimaryIPs
(String labelSelector, PaginationParameters paginationParameters) Get all Primary IPs in a projectgetServer
(long id) Get a server by idGet servers by name.getServerActions
(long id) Get all performed Actions of a server.getServerMetrics
(long id, String metricType, String start, String end) Get the metrics from a serverGet all servers in a project.getServers
(String labelSelector) Get all servers in a project filtered by a label selectorgetServers
(String labelSelector, PaginationParameters paginationParameters) Get all servers in a project.getServerType
(long id) Get a Server type by id.getServerTypeByName
(String name) Get a Server type by name.Get all Server types.getServerTypes
(PaginationParameters paginationParameters) Get Server types Paginated.getSSHKey
(long id) Get an SSH key by ID.Get an SSH key by name.getSSHKeyByFingerprint
(String fingerprint) Get a SSH key by the fingerprint.Get all SSH keys.getSSHKeys
(String labelSelector) Get all SSH keys by label.getSSHKeys
(String labelSelector, PaginationParameters paginationParameters) Get all SSH keys by label.getSSHKeys
(PaginationParameters paginationParameters) Get all SSH keys.getVolume
(long id) Get a specific volume by id.getVolumeActions
(long id) Get all actions of a volume.Get all volumes in a project.getVolumes
(String labelSelector) Get all volumes in a project filtered by volumesgetVolumes
(String labelSelector, PaginationParameters paginationParameters) Get all volumes in a project.getVolumes
(PaginationParameters paginationParameters) Get all volumes in a project.powerOffServer
(long id) Force power off a specific server with the idpowerOnServer
(long id) Power on a specific server with the idrebootServer
(long id) Reboot a specific server with the idrebuildServer
(long id, RebuildServerRequest rebuildServerRequest) Rebuild a server, with the specific image.removeAllRulesFromFirewall
(long id) Removes all rules of a Firewall.removeFirewallFromResources
(long id, List<FWApplicationTarget> removalTargets) Removes one Firewall from multiple resources.removeServerFromPlacementGroup
(long serverId) Remove a server from a placement group.removeTargetFromLoadBalancer
(long id, LBTargetRequest lbTargetRequest) Removes a target from a load balancer.requestConsole
(long id) Request a WebSocket URL for a server.resetRootPassword
(long id) Resets the root password from a specific server with the idresetServer
(long id) Reset a specific server with the idresizeVolume
(long id, ResizeVolumeRequest resizeVolumeRequest) Resize a volume.retryCertificate
(long id) Retry an issuance or renewal for a managed certificate.setFirewallRules
(long id, List<FirewallRule> firewallRules) Sets the rules of a Firewall.shutdownServer
(long id) Shutdown a specific server via ACPI with the idunassignFloatingIP
(long id) Unassign a Floating IP from a serverunassignPrimaryIP
(long id) Unassign a Primary IP from a resource.updateCertificate
(long id, UpdateCertificateRequest updateCertificateRequest) Update a certificate.updateFirewall
(long id, UpdateFirewallRequest updateFirewallRequest) Updates the Firewall.updateFloatingIP
(long id, UpdateFloatingIPRequest updateFloatingIPRequest) Update the description or labels of a Floating IP.updateImage
(long id, UpdateImageRequest updateImageRequest) Update the description or the type of a image.updateLoadBalancer
(long id, UpdateLoadBalancerRequest updateLoadBalancerRequest) Update an existing Load Balancer.updateNetwork
(long id, UpdateNetworkRequest updateNetworkRequest) Update the labels or the name of a network.updatePrimaryIP
(long id, UpdatePrimaryIPRequest updatePrimaryIPRequest) Update a Primary IPupdateServer
(long id, UpdateServerRequest updateServerRequest) Update a server's name and its labels.updateServiceOfLoadBalancer
(long id, LBServiceRequest lbServiceRequest) Update a service of a Load Balancer.updateSSHKey
(long id, UpdateSSHKeyRequest updateSSHKeyRequest) Update parameters of an SSH keyupdateVolume
(long id, UpdateVolumeRequest updateVolumeRequest) Update some specific options of a volume.
-
Constructor Details
-
HetznerCloudAPI
Initial method to use the API- Parameters:
hcloudToken
- API-Token for Hetzner Cloud API- See Also:
-
HetznerCloudAPI
Initial method to use the API- Parameters:
hcloudToken
- API-Token for Hetzner Cloud API The API token can be created within the Hetzner Cloud Consoleclient
- OkHttpClient instance to be used
-
-
Method Details
-
getActions
Deprecated.This function has been deprecated by HetznerGet all actions in a project.- Returns:
- All Actions without pagination
-
getActions
Deprecated.This function has been deprecated by HetznerGet all action in a project filtered by its status.- Parameters:
actionStatus
- Action status type- Returns:
- ActionsResponse containing all actions without pagination filtered by its status
-
getActions
@Deprecated public ActionsResponse getActions(ActionStatus actionStatus, PaginationParameters paginationParameters) Deprecated.This function has been deprecated by HetznerGet all actions in a project.- Parameters:
actionStatus
- Query only actions with the specified statuspaginationParameters
- Pagination parameters- Returns:
- ActionsResponse
-
getAction
Get an action by id.- Parameters:
id
- ID of the action- Returns:
- ActionResponse
-
getServers
Get all servers in a project.- Returns:
- All servers as Servers object without pagination
-
getServers
Get all servers in a project filtered by a label selector- Parameters:
labelSelector
- Label selector- Returns:
- ServersResponse containing all servers which match the label selector
-
getServers
Get all servers in a project.- Parameters:
labelSelector
- Label selector filterpaginationParameters
- Pagination parameters- Returns:
- All servers as Servers object
-
getServer
Get servers by name.- Parameters:
name
- Name of the server- Returns:
- Matching servers as Servers object
-
getServer
Get a server by id- Parameters:
id
- id of the server- Returns:
- GetServerResponse
-
createServer
Create a server.- Parameters:
createServerRequest
- Parameters for server creation.- Returns:
- ServerResponse including Action status, Server object and (if no ssh key defined) root password.
-
deleteServer
Delete a server- Parameters:
id
- id of the server.- Returns:
- ActionResponse object
-
updateServer
Update a server's name and its labels.- Parameters:
id
- id of the server.updateServerRequest
- request- Returns:
- ServerResponse object
-
requestConsole
Request a WebSocket URL for a server.- Parameters:
id
- id of the server- Returns:
- ConsoleResponse object
-
changeServerProtection
Change the protection configuration of a server.- Parameters:
id
- id of the serverchangeProtection
- Request Object (both optional)- Returns:
- ActionResponse object
-
addServerToPlacementGroup
Add a server to a placement group. Server has to be stopped.- Parameters:
serverId
- server idplacementGroupId
- placement group id- Returns:
- ActionResponse
-
removeServerFromPlacementGroup
Remove a server from a placement group.- Parameters:
serverId
- server id- Returns:
- ActionResponse
-
getServerActions
Get all performed Actions of a server.- Parameters:
id
- id of the server- Returns:
- ActionsResponse object
-
getFloatingIPActions
Get all performed Actions of a Floating IP- Parameters:
id
- ID of the FloatingIP- Returns:
- ActionsResponse object
-
powerOnServer
Power on a specific server with the id- Parameters:
id
- of the server- Returns:
- respond
-
powerOffServer
Force power off a specific server with the id- Parameters:
id
- of the server- Returns:
- respond
-
rebootServer
Reboot a specific server with the id- Parameters:
id
- of the server- Returns:
- respond
-
resetServer
Reset a specific server with the id- Parameters:
id
- of the server- Returns:
- respond
-
shutdownServer
Shutdown a specific server via ACPI with the id- Parameters:
id
- ID of the server- Returns:
- respond
-
resetRootPassword
Resets the root password from a specific server with the id- Parameters:
id
- ID of the server- Returns:
- respond
-
enableRescue
Enables the rescue mode from the server- Parameters:
id
- ID of the server- Returns:
- respond
-
enableRescue
Enables the rescue mode from the server- Parameters:
id
- ID of the serverenableRescueRequest
- Request object- Returns:
- respond
-
disableRescue
Disables the rescue mode from the server.Only needed, if the server doesn't booted into the rescue mode.
- Parameters:
id
- ID of the server- Returns:
- respond
-
rebuildServer
Rebuild a server, with the specific image.example: ubuntu-16.04
- Parameters:
id
- ID of the serverrebuildServerRequest
- Request object- Returns:
- respond
-
changeServerType
Change the type from the serverexample: from cx11 to cpx21
- Parameters:
id
- ID of the serverchangeTypeRequest
- Request object- Returns:
- respond
-
getServerMetrics
Get the metrics from a server- Parameters:
id
- ID of the servermetricType
- like cpu, disk or network (but also cpu,disk possible)start
- of the metricend
- of the metric- Returns:
- respond
-
createImage
Create an image from a server- Parameters:
id
- ID of the servercreateImageRequest
- Request object- Returns:
- respond
-
changeImageProtection
Enable or disable the Protection of an Image- Parameters:
id
- ID of the imageprotectionRequest
- Only the delete parameter!- Returns:
- ActionResponse object
-
enableBackup
Enable the backups from a server Please note that this action will increase the price of the server by 20%- Parameters:
id
- ID of the server- Returns:
- response
-
getISOS
Get all available ISO's.- Returns:
- ISOSResponse
-
getISOS
Get all available ISO's by architecture.- Parameters:
architecture
-Architecture
- Returns:
ISOSResponse
-
getISOS
Get all available ISO's with pagination.- Parameters:
paginationParameters
- Pagination- Returns:
ISOSResponse
-
getISOS
Get all available ISO's.- Parameters:
architecture
-Architecture
paginationParameters
- Pagination parametres- Returns:
ISOSResponse
-
getISO
Get an ISO by ID- Parameters:
id
- ID of the ISO- Returns:
- ISOResponse Object
-
attachISO
Attach an ISO to a server.To get all ISO's
getISOS()
- Parameters:
id
- of the serverattachISORequest
- Request object- Returns:
- ActionResponse object
-
detachISO
Detach an ISO from a server.- Parameters:
id
- of the server- Returns:
- respond
-
changeDNSPTR
Changes the reverse DNS entry from a server.Floating IPs assigned to the server are not affected!
- Parameters:
id
- ID of the serverchangeReverseDNSRequest
- Request object- Returns:
- respond
-
getDatacenter
Get a Datacenter by ID- Parameters:
id
- of the Datacenter- Returns:
- respond
-
getDatacenters
Get all available datacenters and the recommendation- Returns:
- respond
-
getDatacenter
Get a datacenter by name- Parameters:
name
- of the datacenter- Returns:
- DatacentersResponse
-
getFirewalls
Returns 25 Firewall objects.- Returns:
- a FirewallsResponse containing all Firewalls of the requested page and paging metadata
- See Also:
-
getFirewalls
Get all Firewalls in a project by label selector.- Parameters:
labelSelector
- Label Selector- Returns:
- FirewallsResponse
- See Also:
-
getFirewalls
Get all Firewalls in a project.- Parameters:
paginationParameters
- Pagination parametres- Returns:
- FirewallsResponse
- See Also:
-
getFirewalls
public FirewallsResponse getFirewalls(String labelSelector, PaginationParameters paginationParameters) Returns all Firewall objects.- Parameters:
paginationParameters
-- Returns:
- a FirewallsResponse containing all Firewalls of the requested page and paging metadata
-
createFirewall
Creates a new Firewall.- Parameters:
createFirewallRequest
- the config of the Firewall you want to create- Returns:
- a FirewallResponse containing the created Firewall and taken Actions
-
deleteFirewall
public void deleteFirewall(long id) Deletes a Firewall.- Parameters:
id
-
-
getFirewall
Gets a specific Firewall.- Parameters:
id
-- Returns:
- the FirewallResponse containing the searched Firewall
-
updateFirewall
Updates the Firewall. This replaces the current labels with the given- Parameters:
id
-updateFirewallRequest
- the changes you want to perform- Returns:
- the FirewallResponse of the request, containing the new Firewall and Metadata
-
getFirewallActions
Returns all Action objects for a Firewall.- Parameters:
id
-- Returns:
- an ActionsResponse with the executed actions
-
applyFirewallToResources
public ActionsResponse applyFirewallToResources(long id, List<FWApplicationTarget> applicationTargets) Applies one Firewall to multiple resources.- Parameters:
id
- of the firewall you want to add to resourcesapplicationTargets
- you want to add- Returns:
- an ActionsResponse with the executed actions
-
removeFirewallFromResources
public ActionsResponse removeFirewallFromResources(long id, List<FWApplicationTarget> removalTargets) Removes one Firewall from multiple resources.- Parameters:
id
- of the firewall you want to remove resources fromremovalTargets
- you want to remove- Returns:
- an ActionsResponse with the executed actions
-
removeAllRulesFromFirewall
Removes all rules of a Firewall.- Parameters:
id
- the firewall you want to remove the rules from- Returns:
- an ActionsResponse with the executed actions
- See Also:
-
setFirewallRules
Sets the rules of a Firewall. All existing rules will be overwritten. If the firewallRules are empty, all rules are deleted.- Parameters:
id
- of the Firewall you want to set the Rules on.firewallRules
- you want to set.- Returns:
- an ActionsResponse with the executed actions
-
getPricing
Get all prices from the products- Returns:
- PricingResponse
-
getPrimaryIPs
Get all Primary IPs in a project- Returns:
- PrimaryIPsResponse
-
getPrimaryIPs
Get all Primary IPs in a project by label selector- Parameters:
labelSelector
- Label selector- Returns:
- PrimaryIPsResponse
-
getPrimaryIPs
public PrimaryIPsResponse getPrimaryIPs(String labelSelector, PaginationParameters paginationParameters) Get all Primary IPs in a project- Parameters:
labelSelector
- Label selectorpaginationParameters
- Pagination parametres- Returns:
- PrimaryIPsResponse
-
getPrimaryIPByName
Get a Primary IP by its name in a project- Parameters:
name
- Name of the Primary IP- Returns:
- PrimaryIPsResponse
-
getPrimaryIP
Get a Primary IP by the IP address itself- Parameters:
ip
- IP address- Returns:
- PrimaryIPsResponse
-
getPrimaryIP
Get a Primary IP by its id- Parameters:
id
- id of the Primary IP- Returns:
- PrimaryIPResponse
-
createPrimaryIP
Create a Primary IP- Parameters:
createPrimaryIPRequest
- Primary IP request- Returns:
- CreatePrimaryIPResponse
-
updatePrimaryIP
Update a Primary IP- Parameters:
updatePrimaryIPRequest
- Primary IP Update request- Returns:
- PrimaryIPResponse
-
assignPrimaryIP
Assign a Primary IP to a resource.- Parameters:
id
- id of the Primary IPassignPrimaryIPRequest
- Primary IP Resource Assignment request- Returns:
- ActionResponse
-
unassignPrimaryIP
Unassign a Primary IP from a resource.- Parameters:
id
- id of the Primary IP- Returns:
- ActionResponse
-
changePrimaryIPReverseDNS
public ActionResponse changePrimaryIPReverseDNS(long id, ChangeReverseDNSRequest changeReverseDNSRequest) Update a reverse DNS entry for a Primary IP- Parameters:
id
- id of the Primary IPchangeReverseDNSRequest
- Reverse DNS update change- Returns:
- ActionResponse
-
changePrimaryIPProtection
public ActionResponse changePrimaryIPProtection(long id, ChangeProtectionRequest changeProtectionRequest) -
deletePrimaryIP
Delete a Primary IP- Parameters:
id
- id of the Primary IP- Returns:
- nothing
-
getFloatingIPs
Get all Floating IPs in a project.- Returns:
- FloatingIPsResponse
-
getFloatingIPs
Get all Floating IPs in a project.- Parameters:
paginationParameters
- Pagination parametres- Returns:
- FloatingIPsResponse
-
getFloatingIPs
Get all Floating IPs in a project by label selector. A label selector can be e.g. env=prod- Parameters:
labelSelector
- Label selector- Returns:
- FloatingIPsResponse
-
getFloatingIPs
public FloatingIPsResponse getFloatingIPs(String labelSelector, PaginationParameters paginationParameters) Get all Floating IPs in a project. A label selector can be e.g. env=prod- Parameters:
labelSelector
- Label selectorpaginationParameters
- Pagination parametres- Returns:
- FloatingIPsResponse
-
getFloatingIP
Get a specific Floating IP.- Parameters:
id
- ID of the Floating IP- Returns:
- GetFloatingIPResponse
-
createFloatingIP
Create a Floating IP for the project or for a Server.- Parameters:
createFloatingIPRequest
- Request object- Returns:
- FloatingIPResponse object
-
changeFloatingIPProtection
public ActionResponse changeFloatingIPProtection(long id, ChangeProtectionRequest protectionRequest) Enable or disable the Protection of a Floating IP- Parameters:
id
- ID of the Floating IPprotectionRequest
- Only the delete parameter!- Returns:
- ActionResponse object
-
assignFloatingIP
Assign a Floating IP to a server- Parameters:
id
- ID of the Floating IPassignFloatingIPRequest
- Request object- Returns:
- ActionResponse object
-
unassignFloatingIP
Unassign a Floating IP from a server- Parameters:
id
- ID of the Floating IP- Returns:
- ActionResponse object
-
changeFloatingReverseDNS
public ActionResponse changeFloatingReverseDNS(long id, ChangeReverseDNSRequest changeReverseDNSRequest) Change the reverse DNS entry for a Floating IP- Parameters:
id
- ID of the Floating IPchangeReverseDNSRequest
- Request object- Returns:
- ActionResponse object
-
deleteFloatingIP
Delete a Floating IP.This object does not have a respond!
- Parameters:
id
- ID of the Floating ID- Returns:
- String
-
updateFloatingIP
public CreateFloatingIPResponse updateFloatingIP(long id, UpdateFloatingIPRequest updateFloatingIPRequest) Update the description or labels of a Floating IP.- Parameters:
id
- ID of the Floating IPupdateFloatingIPRequest
- Request Object- Returns:
- Response from API (Action will be null)
-
getSSHKeys
Get all SSH keys.- Returns:
- SSHKeysResponse
-
getSSHKeys
Get all SSH keys.- Parameters:
paginationParameters
- Pagination parameters- Returns:
- SSHKeysResponse
-
getSSHKeys
Get all SSH keys by label.- Parameters:
labelSelector
- Label selector- Returns:
- SSHKeysResponse
-
getSSHKeys
Get all SSH keys by label.- Parameters:
labelSelector
- Label selectorpaginationParameters
- Pagination parameters- Returns:
- SSHKeysResponse
-
getSSHKey
Get an SSH key by ID.- Parameters:
id
- ID of the SSH key- Returns:
- SSHKeyResponse
-
getSSHKey
Get an SSH key by name.- Parameters:
name
- name of the SSH key- Returns:
- SSHKeysResponse object
-
getSSHKeyByFingerprint
Get a SSH key by the fingerprint.- Parameters:
fingerprint
- Fingerprint of the SSH key- Returns:
- SSHKeysResponse object
-
createSSHKey
Create an SSH key.- Parameters:
createSshKeyRequest
- Request object- Returns:
- SSHKeyResponse object
-
updateSSHKey
Update parameters of an SSH key- Parameters:
id
- ID of the SSH keyupdateSSHKeyRequest
- Request Object- Returns:
- SSHKeyResponse object
-
deleteSSHKey
Delete an SSH key.This object does not have a response!
- Parameters:
id
- ID of the SSH key- Returns:
- String
-
getServerTypes
Get all Server types.- Returns:
- ServerTypesResponse object
-
getServerTypes
Get Server types Paginated.- Returns:
- ServerTypesResponse object
-
getLoadBalancerTypes
Get all Load Balancer types.- Returns:
- LoadBalancerTypesResponse object
-
getLoadBalancerTypeByName
Get Load Balancer type by name.- Parameters:
name
- Name of the Load Balancer type- Returns:
- LoadBalancerTypesResponse object
-
getLoadBalancerType
Get a Load Balancer type by id.- Parameters:
id
- ID of the load balancer type- Returns:
- LoadBalancerTypeResponse
-
getServerTypeByName
Get a Server type by name.- Parameters:
name
- name of the Server type- Returns:
- ServerTypesResponse object
-
getServerType
Get a Server type by id.- Parameters:
id
- id of the Server type- Returns:
- ServerTypeResponse object
-
getLocations
Get all available Locations.- Returns:
- LocationsResponse object
-
getLocationByName
Get a Location by name.- Parameters:
name
- Name of the location- Returns:
- LocationsResponse object
-
getLocation
Get a location by id.- Parameters:
id
- id of the location- Returns:
- LocationResponse object
-
getImages
Get all available images.- Returns:
- ImagesResponse object
-
getImages
Get all images by label selector.- Parameters:
labelSelector
- Label Selector- Returns:
ImagesResponse
-
getImages
Get all images by architecture.- Parameters:
architecture
- Architecture of the Image- Returns:
ImagesResponse
-
getImages
Get all images by label selector and architecture.- Parameters:
labelSelector
- Label Selectorarchitecture
- Architecture of the Image- Returns:
ImagesResponse
-
getImages
Get all images by label selector with pagination.- Parameters:
labelSelector
- Label SelectorpaginationParameters
- Pagination parametres- Returns:
ImagesResponse
-
getImages
public ImagesResponse getImages(Architecture architecture, PaginationParameters paginationParameters) Get all images by architecture with pagination.- Parameters:
architecture
- ArchitecturepaginationParameters
- Pagination parametres- Returns:
ImagesResponse
-
getImages
public ImagesResponse getImages(String labelSelector, Architecture architecture, PaginationParameters paginationParameters) Get all available images.- Parameters:
labelSelector
- Label selectorarchitecture
- Architecture of the imagepaginationParameters
- Pagination parametres- Returns:
ImagesResponse
-
getImagesByType
Get all images by type.- Parameters:
type
- Type of image- Returns:
- ImagesResponse object
-
getImagesByType
Get all images by type.- Parameters:
type
- Type of imagepaginationParameters
- Pagination parametres- Returns:
- ImagesResponse object
-
getImageByName
Get an image by name.- Parameters:
name
- Name of the image- Returns:
- ImagesResponse object
-
getImage
Get image by ID.- Parameters:
id
- ID of the image- Returns:
- ImageResponse object
-
updateImage
Update the description or the type of a image.- Parameters:
id
- ID of the imageupdateImageRequest
- Request object- Returns:
- ImageResponse object
-
deleteImage
Delete an image,This object does not have a respond!
- Parameters:
id
- ID of the image- Returns:
- String
-
getVolumes
Get all volumes in a project.- Returns:
- VolumesResponse
-
getVolumes
Get all volumes in a project.- Parameters:
paginationParameters
- Pagination parametres- Returns:
- VolumesResponse
-
getVolumes
Get all volumes in a project filtered by volumes- Parameters:
labelSelector
- Label selector- Returns:
- VolumesResponse
-
getVolumes
Get all volumes in a project.- Parameters:
labelSelector
- Filter response by label selectorpaginationParameters
- Pagination parametres- Returns:
- VolumesResponse
-
getVolume
Get a specific volume by id.- Parameters:
id
- ID of the volume- Returns:
- Volume object
-
createVolume
Create a new volume.- Parameters:
createVolumeRequest
- Volume request object- Returns:
- Volume object with action
-
updateVolume
Update some specific options of a volume.- Parameters:
id
- ID of the volumeupdateVolumeRequest
- Update volume request object- Returns:
- GetVolume object
-
deleteVolume
Delete a volume- Parameters:
id
- ID of the volume- Returns:
- no return object
-
getVolumeActions
Get all actions of a volume.- Parameters:
id
- ID of the volume- Returns:
- Action array
-
attachVolumeToServer
Attach a volume to a server.- Parameters:
id
- ID of the volumeattachVolumeRequest
- Request object- Returns:
- Action object
-
detachVolume
Detach a volume from a server.- Parameters:
id
- ID of the volume- Returns:
- Action object
-
resizeVolume
Resize a volume. Downsizing not possible!- Parameters:
id
- ID of the volumeresizeVolumeRequest
- Request object- Returns:
- Action object
-
changeVolumeProtection
public ActionResponse changeVolumeProtection(long id, ChangeProtectionRequest changeProtectionRequest) Change the protection mode of the volume. Only deletion protection is available!- Parameters:
id
- ID of the volumechangeProtectionRequest
- Request object- Returns:
- Action object
-
getNetworks
Get all Private networks in a project.- Returns:
- NetworksResponse
-
getNetworks
Get all Private networks in a project.- Parameters:
paginationParameters
- Pagination parametres- Returns:
- NetworksResponse
-
getNetworks
Get all Private Networks in a project with a label selector.- Parameters:
labelSelector
- Label Selector- Returns:
- NetworksResponse
-
getNetworks
public NetworksResponse getNetworks(String labelSelector, PaginationParameters paginationParameters) Get all Private networks in a project.- Parameters:
labelSelector
- Label selectorpaginationParameters
- Pagination parametres- Returns:
- NetworksResponse
-
getNetworksByName
Get all networks with specific name.- Parameters:
name
- Name of the network- Returns:
- Response from API
-
getNetwork
Get a network with it's specific ID.- Parameters:
id
- ID of the network- Returns:
- Response from API
-
updateNetwork
Update the labels or the name of a network.- Parameters:
id
- ID of the networkupdateNetworkRequest
- Request object- Returns:
- Response from API
-
createNetwork
Create a new private network.- Parameters:
createNetworkRequest
- Request object- Returns:
- Response from API
-
deleteNetwork
Delete a network.- Parameters:
id
- ID of the network- Returns:
- There is no response.
-
attachServerToNetwork
public ActionResponse attachServerToNetwork(long id, AttachServerToNetworkRequest attachServerToNetworkRequest) Attaches a server to a private network.- Parameters:
id
- ID of the serverattachServerToNetworkRequest
- Request object- Returns:
- Response from API
-
detachServerFromNetwork
public ActionResponse detachServerFromNetwork(long id, DetachServerFromNetworkRequest detachServerFromNetworkRequest) Detaches a server from a private network.- Parameters:
id
- ID of the serverdetachServerFromNetworkRequest
- Request object- Returns:
- Response from API
-
changeAliasIPsOfNetwork
public ActionResponse changeAliasIPsOfNetwork(long id, ChangeAliasIPsofNetworkRequest changeAliasIPsofNetworkRequest) Change alias IPs of a network.- Parameters:
id
- ID of the serverchangeAliasIPsofNetworkRequest
- Request object- Returns:
- Response from API
-
changeNetworkProtection
Change the protection configuration for a network- Parameters:
id
- ID of the networkchangeProtection
- Request Object- Returns:
- Response from API
-
getNetworkActions
Get all performed Actions for a network- Parameters:
id
- ID of the network- Returns:
- Response from API
-
addSubnetToNetwork
public ActionResponse addSubnetToNetwork(long id, AddSubnetToNetworkRequest addSubnetToNetworkRequest) Add a new subnet to a network.- Parameters:
id
- ID of the networkaddSubnetToNetworkRequest
- Request object- Returns:
- Response from API
-
deleteSubnetFromNetwork
public ActionResponse deleteSubnetFromNetwork(long id, DeleteSubnetFromNetwork deleteSubnetFromNetwork) Delete a subnet from a network.- Parameters:
id
- ID of the networkdeleteSubnetFromNetwork
- Request object- Returns:
- Response from API
-
addRouteToNetwork
Add a route to a network.- Parameters:
id
- ID of the networknetworkRouteRequest
- Request object- Returns:
- Response from API
-
deleteRouteFromNetwork
Delete a route from a network.- Parameters:
id
- ID of the networknetworkRouteRequest
- Request object- Returns:
- Response from API
-
changeIPRangeOfNetwork
public ActionResponse changeIPRangeOfNetwork(long id, ChangeIPRangeOfNetwork changeIPRangeOfNetwork) Change the IP range of a network. Shrinking not possible!- Parameters:
id
- ID of the networkchangeIPRangeOfNetwork
- Request object- Returns:
- Response from API
-
getCertificates
Get all certificates from the project.- Returns:
- CertificatesResponse
-
getCertificates
Get all certificates from the project.- Parameters:
paginationParameters
- Pagination parametres- Returns:
- CertificatesResponse
-
getCertificates
Get all certificates by label selector. A label selector can be e.g. env=prod- Parameters:
labelSelector
- Label selector used for filtering- Returns:
- CertificatesResponse
-
getCertificates
public CertificatesResponse getCertificates(String labelSelector, PaginationParameters paginationParameters) Get all certificates by label selector. A label selector can be e.g. env=prod- Parameters:
labelSelector
- Label selector used for filteringpaginationParameters
- Pagination parametres- Returns:
- CertificatesResponse
-
getCertificate
Get a specific certificate by its name.- Parameters:
name
- Name of the certificate- Returns:
- CertificatesResponse
-
getCertificate
Get a specific certificate by id.- Parameters:
id
- ID of the certificate- Returns:
- CertificateResponse
-
createCertificate
Create a new certificate.- Parameters:
createCertificateRequest
- CertificateRequest object with name, public- and private-key- Returns:
- CertificateResponse
-
updateCertificate
public CertificateResponse updateCertificate(long id, UpdateCertificateRequest updateCertificateRequest) Update a certificate.Available options to update: - Name - Labels
- Parameters:
id
- ID of the certificateupdateCertificateRequest
- Certificate Update object- Returns:
- CertificateResponse
-
retryCertificate
Retry an issuance or renewal for a managed certificate.This method is only applicable to managed certificate where either the issuance or renewal status is failed.
- Parameters:
id
- ID of the certificate- Returns:
- ActionResponse
-
deleteCertificate
Delete a certificate.- Parameters:
id
- ID of the certificate- Returns:
- nothing...
-
getLoadBalancers
Get all Load Balancers.- Returns:
- LoadBalancersResponse
-
getLoadBalancerByName
Get Load Balancer by name.- Returns:
- LoadBalancersResponse
-
getLoadBalancers
Get all Load Balancers by label selector.- Parameters:
labelSelector
- Label Selector- Returns:
- LoadBalancersResponse
-
getLoadBalancers
public LoadBalancersResponse getLoadBalancers(String labelSelector, PaginationParameters paginationParameters) Get all Load Balancers.- Parameters:
labelSelector
- Label SelectorpaginationParameters
- Pagination parametres- Returns:
- LoadBalancersResponse
-
getLoadBalancer
Get a specific Load Balancer.- Parameters:
id
- ID of the Load Balancer- Returns:
- LoadBalancerResponse
-
createLoadBalancer
Create a new Load Balancer.- Parameters:
createLoadBalancerRequest
- Load Balancer Request object- Returns:
- LoadBalancerResponse
-
updateLoadBalancer
public LoadBalancerResponse updateLoadBalancer(long id, UpdateLoadBalancerRequest updateLoadBalancerRequest) Update an existing Load Balancer.- Parameters:
id
- ID of the Load BalancerupdateLoadBalancerRequest
- Load Balancer Update Request Object- Returns:
- LoadBalancerResponse
-
deleteLoadBalancer
Delete a Load Balancer.- Parameters:
id
- ID of the Load Balancer- Returns:
- nothing
-
getLoadBalancerActions
Get all actions of a Load Balancer.- Parameters:
id
- ID of the Load Balancer- Returns:
- ActionsResponse
-
addServiceToLoadBalancer
Add a service to a Load Balancer.- Parameters:
id
- ID of the Load BalancerlbServiceRequest
- Load Balancer Service Request- Returns:
- LoadBalancerResponse
-
updateServiceOfLoadBalancer
Update a service of a Load Balancer.- Parameters:
id
- ID of the Load BalancerlbServiceRequest
- Load Balancer Service Request- Returns:
- LoadBalancerResponse
-
deleteServiceOfLoadBalancer
Delete a service of a Load Balancer.- Parameters:
id
- ID of the Load BalancerlistenPort
- The desired "listen port" of the service- Returns:
- ActionResponse
-
addTargetToLoadBalancer
Add a target to a Load Balancer.- Parameters:
id
- ID of the Load BalancerlbTargetRequest
- Load Balancer Target Request- Returns:
- ActionResponse
-
removeTargetFromLoadBalancer
Removes a target from a load balancer.- Parameters:
id
- ID of the Load BalancerlbTargetRequest
- Load Balancer Target Request- Returns:
- ActionResponse
-
changeAlgorithmOfLoadBalancer
Changes the algorithm that determines to which target new requests are sent.- Parameters:
id
- ID of the Load BalanceralgorithmType
- Algorithm Type- Returns:
- ActionResponse
-
changeTypeOfLoadBalancer
Changes the type of a Load Balancer.- Parameters:
id
- ID of the Load BalancerloadBalancerType
- New type of the Load Balancer- Returns:
- ActionResponse
-
attachNetworkToLoadBalancer
Attach a network to a Load Balancer.- Parameters:
id
- ID of the Load BalancernetworkId
- ID of the Networkip
- IP for the Load Balancer in this private network- Returns:
- ActionResponse
-
attachNetworkToLoadBalancer
Attach a network to a Load Balancer.- Parameters:
id
- ID of the Load BalancernetworkId
- ID of the Network- Returns:
- ActionResponse
-
detachNetworkFromLoadBalancer
Detach a network from a Load Balancer.- Parameters:
id
- ID of the Load BalancernetworkId
- ID of the Network- Returns:
- ActionResponse
-
enablePublicInterfaceOfLoadBalancer
Enable the public interface of a Load Balancer.- Parameters:
id
- ID of the Load Balancer- Returns:
- ActionResponse
-
disablePublicInterfaceOfLoadBalancer
Disable the public interface of a Load Balancer.- Parameters:
id
- ID of the Load Balancer- Returns:
- ActionResponse
-
changeProtectionOfLoadBalancer
Change the protection configuration of a Load Balancer.- Parameters:
id
- ID of the Load Balancerdelete
- Delete protection- Returns:
- ActionResponse
-
getPlacementGroup
Get a specific placement group.- Parameters:
id
- placement group ID- Returns:
- PlacementGroupResponse
-
getPlacementGroups
Get all placement groups.- Returns:
- PlacementGroupsResponse
-
getPlacementGroups
Get all placement groups.- Parameters:
paginationParameters
- Pagination parametres- Returns:
- PlacementGroupsResponse
-
getPlacementGroup
Get placement group by name.- Parameters:
name
- name of the placement grouo- Returns:
- PlacementGroupsResponse
-
getPlacementGroups
Get placement groups by label selector.- Parameters:
labelSelector
- label selector used by resource- Returns:
- PlacementGroupsResponse
-
getPlacementGroup
Get placement groups by type- Parameters:
type
- Type of the placement group- Returns:
- PlacementGroupsResponse
-
createPlacementGroup
public PlacementGroupResponse createPlacementGroup(CreatePlacementGroupRequest placementGroupRequest) Create a placement group.- Parameters:
placementGroupRequest
- PlacementGroupRequest object- Returns:
- PlacementGroupResponse
-
deletePlacementGroup
Delete a placement group.- Parameters:
id
- placement group ID- Returns:
- ActionResponse
-
convertToISO8601
Converts a Date to the ISO-8601 format- Parameters:
date
- Date to be converted- Returns:
- Date in ISO-8601 format
-