From bf2327d4568ce717a32a7dba5fef936555ecfa82 Mon Sep 17 00:00:00 2001 From: Kevin Reeuwijk Date: Fri, 3 Jan 2025 12:22:38 +0100 Subject: [PATCH] Fix sample shell commands (#5220) * Fix sample shell commands * ci: auto-formatting prettier issues * Fix more shell errors * docs: table format for provider values --------- Co-authored-by: kreeuwijk Co-authored-by: Ben Radstone Co-authored-by: Ben Radstone <56587332+benradstone@users.noreply.github.com> --- docs/api-content/api-docs/2-samples.md | 33 +++++++++++++++++++------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/docs/api-content/api-docs/2-samples.md b/docs/api-content/api-docs/2-samples.md index da4a65e672..e53c08b756 100644 --- a/docs/api-content/api-docs/2-samples.md +++ b/docs/api-content/api-docs/2-samples.md @@ -69,13 +69,30 @@ want to deploy the cluster, such as public cloud or on-prem. **Endpoint**: `https://api.spectrocloud.com/v1/spectroclusters/{provider}` -Set the provider as an environment variable. +The following table outlines all available provider options. + +| **Provider** | **Value** | +| ---------------------------------------------- | ------------- | +| **Azure IaaS** | `azure` | +| **Azure AKS** | `aks` | +| **AWS IaaS** | `aws` | +| **AWS EKS** | `eks` | +| **GCP IaaS** | `gcp` | +| **GCP GKE** | `gke` | +| **TKE** (Tencent) | `tke` | +| **MAAS** (Canonical) | `maas` | +| **VMware vSphere** | `vsphere` | +| **Openstack** | `openstack` | +| **Edge Native** | `edge-native` | +| [**Virtual**](/devx/palette-virtual-clusters/) | `virtual` | + +Set the provider as an environment variable. For example, issue the following command to set Azure IaaS as the provider. ```shell -export PROVIDER="Your Provider" +export PROVIDER="azure" ``` -
+Example payload. ```shell export PAYLOAD='{ @@ -93,10 +110,10 @@ export PAYLOAD='{ ```shell -curl --location 'https://api.spectrocloud.com/v1/spectroclusters/$PROVIDER?projectUid=$PROJECT_ID"' \ +curl --location "https://api.spectrocloud.com/v1/spectroclusters/$PROVIDER?projectUid=$PROJECT_ID" \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ - --header "apiKey: $API_KEY" + --header "apiKey: $API_KEY" \ --data "$PAYLOAD" ``` @@ -1647,10 +1664,10 @@ export CLUSTER_ID="Your Cluster ID" ```shell - curl --location 'https://api.spectrocloud.com/v1/spectroclusters/$CLUSTER_ID/assets/kubeconfig' \ + curl --location "https://api.spectrocloud.com/v1/spectroclusters/$CLUSTER_ID/assets/kubeconfig" \ --header 'Accept: application/octet-stream' \ - --header 'projectUid: $PROJECT_ID' \ - --header 'apiKey: $API_KEY' + --header "projectUid: $PROJECT_ID" \ + --header "apiKey: $API_KEY" ```