pub struct KCClient { /* private fields */ }Implementations§
Source§impl KCClient
impl KCClient
pub fn new(http_client: Arc<HTTPClient>) -> Self
Sourcepub async fn list_kubernetes_clusters(
&self,
project_id: &str,
query_params: Option<QueryParams>,
) -> Result<ResponseListKubernetesClusters, UbiClientError>
pub async fn list_kubernetes_clusters( &self, project_id: &str, query_params: Option<QueryParams>, ) -> Result<ResponseListKubernetesClusters, UbiClientError>
List KubernetesClusters in a specific location of a project https://api.ubicloud.com/project/{project_id}/kubernetes-cluster
project_id string required
Sourcepub async fn create_kubernetes_cluster(
&self,
project_id: &str,
location: &str,
kubernetes_cluster_reference: &str,
payload: &ReqClusterCreate,
) -> Result<ClusterItem, UbiClientError>
pub async fn create_kubernetes_cluster( &self, project_id: &str, location: &str, kubernetes_cluster_reference: &str, payload: &ReqClusterCreate, ) -> Result<ClusterItem, UbiClientError>
Create a new KubernetesCluster in a specific location of a project https://api.ubicloud.com/project/{project_id}/location/{location}/kubernetes-cluster/{kubernetes_cluster_reference}
§Arguments:
project_id- The ID of the project.location- The location/region of the Kubernetes cluster.kubernetes_cluster_reference- The ID or name of the Kubernetes cluster.payload- The request body containing the details of the Kubernetes cluster to create.
This function sends a POST request to create a new Kubernetes cluster with the specified parameters.
Sourcepub async fn delete_kubernetes_cluster(
&self,
project_id: &str,
location: &str,
kubernetes_cluster_reference: &str,
) -> Result<(), UbiClientError>
pub async fn delete_kubernetes_cluster( &self, project_id: &str, location: &str, kubernetes_cluster_reference: &str, ) -> Result<(), UbiClientError>
Delete a specific KubernetesCluster https://api.ubicloud.com/project/{project_id}/location/{location}/kubernetes-cluster/{kubernetes_cluster_reference}
§Arguments:
project_id- The ID of the project.location- The location/region of the Kubernetes cluster.kubernetes_cluster_reference- The ID or name of the Kubernetes cluster.
This function sends a DELETE request to remove the specified Kubernetes cluster.
Sourcepub async fn download_kc_config(
&self,
project_id: &str,
location: &str,
kubernetes_cluster_reference: &str,
) -> Result<Bytes, UbiClientError>
pub async fn download_kc_config( &self, project_id: &str, location: &str, kubernetes_cluster_reference: &str, ) -> Result<Bytes, UbiClientError>
Download the kubeconfig file for a specific Kubernetes cluster https://api.ubicloud.com/project/{project_id}/location/{location}/kubernetes-cluster/{kubernetes_cluster_reference}/kubeconfig ///
§Arguments:
project_id- The ID of the project.location- The location/region of the Kubernetes cluster.kubernetes_cluster_reference- The ID or name of the Kubernetes cluster.