# Cloud Provider

## GET /v4/{projectId}/cloudProviders

> Get the list of the cloud provider accounts currently setup in a project identified by project UUID

```json
{"openapi":"3.1.1","info":{"title":"Platform9 Managed Kubernetes","version":"4.0.0"},"servers":[{"url":"/qbert"}],"paths":{"/v4/{projectId}/cloudProviders":{"get":{"tags":["Cloud Provider"],"summary":"Get the list of the cloud provider accounts currently setup in a project identified by project UUID","parameters":[{"schema":{"type":"string"},"name":"X-Auth-Token","in":"header","required":true},{"schema":{"type":"string"},"name":"projectId","in":"path","required":true,"description":"UUID of the project the cloud provider belongs to"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/cloudprovider"}}}}},"403":{"description":"unauthorized to perform this operation"}}}}},"components":{"schemas":{"cloudprovider":{"type":"object","properties":{"name":{"type":"string","description":"Name of the cloud provider account"},"uuid":{"type":"string","description":"UUID of the cloud provider account"},"type":{"type":"string","description":"Type of the cloud provider account"},"nodePoolUuid":{"type":"string","description":"UUID of the associated node pool"}}}}}}
```

## Add a cloud provider account

> Note that by default, there is one “local” cloud provider, which is used for building clusters manually. Currently, AWS is the only supported cloudProvider, other than the “local” provider.

```json
{"openapi":"3.1.1","info":{"title":"Platform9 Managed Kubernetes","version":"4.0.0"},"servers":[{"url":"/qbert"}],"paths":{"/v4/{projectId}/cloudProviders":{"post":{"tags":["Cloud Provider"],"summary":"Add a cloud provider account","description":"Note that by default, there is one “local” cloud provider, which is used for building clusters manually. Currently, AWS is the only supported cloudProvider, other than the “local” provider.","parameters":[{"schema":{"type":"string"},"name":"X-Auth-Token","in":"header","required":true},{"schema":{"type":"string"},"name":"projectId","in":"path","required":true,"description":"UUID of the project the cloud provider account belongs to"}],"responses":{"200":{"description":"OK, if the cloud provider gets created successfully"},"403":{"description":"Unauthorized to perform this operation"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/cloudprovider_for_post"}}},"required":true}}}},"components":{"schemas":{"cloudprovider_for_post":{"type":"object","properties":{"name":{"type":"string","description":"Name of the cloud provider account"},"type":{"type":"string","description":"Type of the cloud provider account"},"key":{"type":"string","description":"Cloud access key"},"secret":{"type":"string","description":"Cloud secret key"}}}}}}
```

## GET /v4/{projectId}/cloudProvider/types

> Get all available cloud provider types, in a project identified by project UUID

```json
{"openapi":"3.1.1","info":{"title":"Platform9 Managed Kubernetes","version":"4.0.0"},"servers":[{"url":"/qbert"}],"paths":{"/v4/{projectId}/cloudProvider/types":{"get":{"tags":["Cloud Provider"],"summary":"Get all available cloud provider types, in a project identified by project UUID","parameters":[{"schema":{"type":"string"},"name":"X-Auth-Token","in":"header","required":true},{"schema":{"type":"string"},"name":"projectId","in":"path","required":true,"description":"UUID of the project the cloud provider belongs to"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/type_details"}}}},"403":{"description":"unauthorized to perform this operation"}}}}},"components":{"schemas":{"type_details":{"type":"object","properties":{"type":{"type":"string","description":"Cloud provider type. Examples are 'aws','local'"}}}}}}
```

## Get the details for cloud provider account identified by the account\_uuid

> This is applicable only for public cloud providers

```json
{"openapi":"3.1.1","info":{"title":"Platform9 Managed Kubernetes","version":"4.0.0"},"servers":[{"url":"/qbert"}],"paths":{"/v4/{projectId}/cloudProviders/{uuid}":{"get":{"tags":["Cloud Provider"],"summary":"Get the details for cloud provider account identified by the account_uuid","description":"This is applicable only for public cloud providers","parameters":[{"schema":{"type":"string"},"name":"X-Auth-Token","in":"header","required":true},{"schema":{"type":"string"},"name":"uuid","in":"path","required":true,"description":"UUID of the cloud provider"},{"schema":{"type":"string"},"name":"projectId","in":"path","required":true,"description":"UUID of the project the cloud provider belongs to"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/provider_details"}}}},"403":{"description":"unauthorized to perform this operation"}}}}},"components":{"schemas":{"provider_details":{"type":"object","properties":{"Regions":{"type":"array","description":"Regions belonging to the provider","items":{"$ref":"#/components/schemas/region"}}}},"region":{"type":"object","properties":{"Endpoint":{"type":"string","description":"endpoint of the region"},"RegionName":{"type":"string","description":"name of the region"}}}}}}
```

## DELETE /v4/{projectId}/cloudProviders/{uuid}

> Delete a cloud provider account specified by account uuid

```json
{"openapi":"3.1.1","info":{"title":"Platform9 Managed Kubernetes","version":"4.0.0"},"servers":[{"url":"/qbert"}],"paths":{"/v4/{projectId}/cloudProviders/{uuid}":{"delete":{"tags":["Cloud Provider"],"summary":"Delete a cloud provider account specified by account uuid","parameters":[{"schema":{"type":"string"},"name":"X-Auth-Token","in":"header","required":true},{"schema":{"type":"string"},"name":"uuid","in":"path","required":true,"description":"UUID of the cloud provider"},{"schema":{"type":"string"},"name":"projectId","in":"path","required":true,"description":"UUID of the project the cloud provider account belongs to"}],"responses":{"200":{"description":"OK, if the cloud provider gets deleted successfully"},"403":{"description":"Unauthorized to perform this operation"}}}}}}
```

## Get the details for a region in a particular cloud provider account identified by the account\_uuid

> This is applicable only for public cloud providers

```json
{"openapi":"3.1.1","info":{"title":"Platform9 Managed Kubernetes","version":"4.0.0"},"servers":[{"url":"/qbert"}],"paths":{"/v4/{projectId}/cloudProviders/{uuid}/region/{regionid}":{"get":{"tags":["Cloud Provider"],"summary":"Get the details for a region in a particular cloud provider account identified by the account_uuid","description":"This is applicable only for public cloud providers","parameters":[{"schema":{"type":"string"},"name":"X-Auth-Token","in":"header","required":true},{"schema":{"type":"string"},"name":"uuid","in":"path","required":true,"description":"UUID of the cloud provider"},{"schema":{"type":"string"},"name":"regionid","in":"path","required":true,"description":"Name of the region"},{"schema":{"type":"string"},"name":"projectId","in":"path","required":true,"description":"UUID of the project the cloud provider belongs to"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/region_details"}}}},"403":{"description":"unauthorized to perform this operation"}}}}},"components":{"schemas":{"region_details":{"type":"object","properties":{"azs":{"type":"array","items":{"type":"object"},"description":"The list of availability zones in the region"},"domains":{"type":"array","items":{"type":"object"},"description":"The list of hosting domains"},"flavors":{"type":"array","items":{"type":"object"},"description":"The list of instance flavors supported in the region"},"keyPairs":{"type":"array","items":{"type":"object"},"description":"The list of ssh key pairs in the region"},"operatingSystems":{"type":"array","items":{"type":"object"},"description":"The list of operating systems available in the region"},"vpcs":{"type":"array","items":{"type":"object"},"description":"The list of virtual private networks available in the region"}}}}}}
```

## POST /v4/{projectId}/cloudProviders/{uuid}/region/{regionid}/sshKey

> Add ssh key to a cloud provider region

```json
{"openapi":"3.1.1","info":{"title":"Platform9 Managed Kubernetes","version":"4.0.0"},"servers":[{"url":"/qbert"}],"paths":{"/v4/{projectId}/cloudProviders/{uuid}/region/{regionid}/sshKey":{"post":{"tags":["Cloud Provider"],"summary":"Add ssh key to a cloud provider region","parameters":[{"schema":{"type":"string"},"name":"X-Auth-Token","in":"header","required":true},{"schema":{"type":"string"},"name":"uuid","in":"path","required":true,"description":"UUID of the cloud provider"},{"schema":{"type":"string"},"name":"regionid","in":"path","required":true,"description":"Name of the region"},{"schema":{"type":"string"},"name":"projectId","in":"path","required":true,"description":"UUID of the project the cloud provider belongs to"}],"responses":{"200":{"description":"OK"},"400":{"description":"Key is not in valid OpenSSH public key format"},"403":{"description":"unauthorized to perform this operation"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/key_details"}}},"required":true}}}},"components":{"schemas":{"key_details":{"type":"object","properties":{"name":{"type":"string","description":"Name of the key"},"key":{"type":"string","description":"Contents of the key"}}}}}}
```

## Validate a cloud provider account

> Validate a cloud provider credentials before adding it

```json
{"openapi":"3.1.1","info":{"title":"Platform9 Managed Kubernetes","version":"4.0.0"},"servers":[{"url":"/qbert"}],"paths":{"/v4/{projectId}/cloudProviders/validate":{"post":{"tags":["Cloud Provider"],"summary":"Validate a cloud provider account","description":"Validate a cloud provider credentials before adding it","parameters":[{"schema":{"type":"string"},"name":"X-Auth-Token","in":"header","required":true},{"schema":{"type":"string"},"name":"projectId","in":"path","required":true,"description":"UUID of the project the cloud provider account belongs to"}],"responses":{"200":{"description":"OK, if the cloud provider gets created successfully"},"403":{"description":"Unauthorized to perform this operation"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/cloudprovider_for_post"}}},"required":true}}}},"components":{"schemas":{"cloudprovider_for_post":{"type":"object","properties":{"name":{"type":"string","description":"Name of the cloud provider account"},"type":{"type":"string","description":"Type of the cloud provider account"},"key":{"type":"string","description":"Cloud access key"},"secret":{"type":"string","description":"Cloud secret key"}}}}}}
```

## PUT /v4/cloudProviders/{uuid}

> Update a cloud provider account specified by account uuid

```json
{"openapi":"3.1.1","info":{"title":"Platform9 Managed Kubernetes","version":"4.0.0"},"servers":[{"url":"/qbert"}],"paths":{"/v4/cloudProviders/{uuid}":{"put":{"tags":["Cloud Provider"],"summary":"Update a cloud provider account specified by account uuid","parameters":[{"schema":{"type":"string"},"name":"X-Auth-Token","in":"header","required":true},{"schema":{"type":"string"},"name":"uuid","in":"path","required":true,"description":"UUID of the cloud provider"}],"responses":{"200":{"description":"OK, if the cloud provider gets upddated successfully"},"403":{"description":"Unauthorized to perform this operation"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/cloudprovider_for_put"}}},"required":true}}}},"components":{"schemas":{"cloudprovider_for_put":{"type":"object","properties":{"name":{"type":"string","description":"Name of the cloud provider account"},"key":{"type":"string","description":"Cloud access key"},"secret":{"type":"string","description":"Cloud secret key"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.platform9.com/managed-kubernetes/apis/qbert-api/cloud-provider.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
