KubernetesApi
All URIs are relative to https://api.ionos.com/cloudapi/v6
Method | HTTP request | Description |
---|---|---|
DELETE /k8s/{k8sClusterId} | Delete a Kubernetes Cluster by ID | |
GET /k8s/{k8sClusterId} | Get a Kubernetes Cluster by ID | |
GET /k8s | Get Kubernetes Clusters | |
GET /k8s/{k8sClusterId}/kubeconfig | Get Kubernetes Configuration File | |
DELETE /k8s/{k8sClusterId}/nodepools/{nodepoolId} | Delete a Kubernetes Node Pool by ID | |
GET /k8s/{k8sClusterId}/nodepools/{nodepoolId} | Get a Kubernetes Node Pool by ID | |
GET /k8s/{k8sClusterId}/nodepools | Get Kubernetes Node Pools | |
DELETE /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes/{nodeId} | Delete a Kubernetes Node by ID | |
GET /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes/{nodeId} | Get Kubernetes Node by ID | |
GET /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes | Get Kubernetes Nodes | |
POST /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes/{nodeId}/replace | Recreate a Kubernetes Node by ID | |
POST /k8s/{k8sClusterId}/nodepools | Create a Kubernetes Node Pool | |
PUT /k8s/{k8sClusterId}/nodepools/{nodepoolId} | Modify a Kubernetes Node Pool by ID | |
POST /k8s | Create a Kubernetes Cluster | |
PUT /k8s/{k8sClusterId} | Modify a Kubernetes Cluster by ID | |
GET /k8s/versions/default | Get Default Kubernetes Version | |
GET /k8s/versions | Get Kubernetes Versions |
k8s_delete(k8s_cluster_id, opts)
Delete a Kubernetes Cluster by ID
Deletes the K8s cluster specified by its ID.
require 'time'
require 'ionoscloud'
# setup authorization
Ionoscloud.configure do |config|
# Configure HTTP basic authorization: Basic Authentication
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
# Configure API key authorization: Token Authentication
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = Ionoscloud::KubernetesApi.new
k8s_cluster_id = 'k8s_cluster_id_example' # String | The unique ID of the Kubernetes cluster.
opts = {
pretty: true, # Boolean | Controls whether the response is pretty-printed (with indentations and new lines).
depth: 56, # Integer | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on
x_contract_number: 56 # Integer | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
}
begin
# Delete a Kubernetes Cluster by ID
api_instance.k8s_delete(k8s_cluster_id, opts)
rescue Ionoscloud::ApiError => e
puts "Error when calling KubernetesApi->k8s_delete: #{e}"
end
This returns an Array which contains the response data (
nil
in this case), status code and headers.<Array(nil, Integer, Hash)> k8s_delete_with_http_info(k8s_cluster_id, opts)
begin
# Delete a Kubernetes Cluster by ID
data, status_code, headers = api_instance.k8s_delete_with_http_info(k8s_cluster_id, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => nil
rescue Ionoscloud::ApiError => e
puts "Error when calling KubernetesApi->k8s_delete_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
k8s_cluster_id | String | The unique ID of the Kubernetes cluster. | |
pretty | Boolean | Controls whether the response is pretty-printed (with indentations and new lines). | [optional][default to true] |
depth | Integer | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional][default to 0] |
x_contract_number | Integer | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] |
nil (empty response body)
Basic Authentication, Token Authentication
- Content-Type: Not defined
- Accept: application/json
k8s_find_by_cluster_id(k8s_cluster_id, opts)
Get a Kubernetes Cluster by ID
Retrieves the K8s cluster specified by its ID.
require 'time'
require 'ionoscloud'
# setup authorization
Ionoscloud.configure do |config|
# Configure HTTP basic authorization: Basic Authentication
config.username = 'YOUR USERNAME'
config.password = 'YOUR PASSWORD'
# Configure API key authorization: Token Authentication
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = Ionoscloud::KubernetesApi.new
k8s_cluster_id = 'k8s_cluster_id_example' # String | The unique ID of the K8s cluster to be retrieved.
opts = {
pretty: true, # Boolean | Controls whether the response is pretty-printed (with indentations and new lines).
depth: 56, # Integer | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on
x_contract_number: 56 # Integer | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
}
begin
# Get a Kubernetes Cluster by ID
result = api_instance.k8s_find_by_cluster_id(k8s_cluster_id, opts)
p result
rescue Ionoscloud::ApiError => e
puts "Error when calling KubernetesApi->k8s_find_by_cluster_id: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> k8s_find_by_cluster_id_with_http_info(k8s_cluster_id, opts)
begin
# Get a Kubernetes Cluster by ID
data, status_code, headers = api_instance.k8s_find_by_cluster_id_with_http_info(k8s_cluster_id, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <KubernetesCluster>
rescue Ionoscloud::ApiError => e
puts "Error when calling KubernetesApi->k8s_find_by_cluster_id_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
k8s_cluster_id | String | The unique ID of the K8s cluster to be retrieved. | |
pretty | Boolean | Controls whether the response is pretty-printed (with indentations and new lines). | [optional][default to true] |
depth | Integer | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on | [optional][default to 0] |
x_contract_number | Integer | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] |