---
title: "Create Cloud Credential"
method: POST
path: "/cloud-credentials"
tags: ["Cloud Credentials"]
---

# Create Cloud Credential

`POST /cloud-credentials`

## Request

- Base URL: `https://am1.portal.api.nasuni.com`
- URL: `https://am1.portal.api.nasuni.com/cloud-credentials`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/nasuni/apis/portal-api/docs/cloud-credentials/post.ts> (a function with typed inputs; its response is checked against the schema)

## Request body

- union
  - AWSS3CredentialRequest
    - `name` string, required
    - `hostname` string
    - `username` string, required
    - `secret` string, required
    - `verify_certs` boolean
    - `note` string
    - `appliance_id` string, uuid, required
    - `cred_type` 'amazons3'
    - `region_code` string, nullable
    - `skip_validation` boolean
  - AWSS3GovCloudCredentialRequest
    - `name` string, required
    - `hostname` string
    - `username` string, required
    - `secret` string, required
    - `verify_certs` boolean
    - `note` string
    - `appliance_id` string, uuid, required
    - `cred_type` 'amazons3gov'
    - `region_code` string, nullable
    - `skip_validation` boolean
  - S3CompatibleCredentialRequest
    - `name` string, required
    - `hostname` string
    - `username` string, required
    - `secret` string, required
    - `verify_certs` boolean
    - `note` string
    - `appliance_id` string, uuid, required
    - `cred_type` 's3_compatible'
    - `region_code` string, nullable
    - `skip_validation` boolean
  - AzureCredentialRequest
    - `name` string, required
    - `hostname` string
    - `username` string, required
    - `secret` string, required
    - `verify_certs` boolean
    - `note` string
    - `appliance_id` string, uuid, required
    - `cred_type` 'azure'
    - `region_code` string, nullable
  - GCSCredentialRequest
    - `name` string, required
    - `hostname` string
    - `username` string, required
    - `secret` string, required
    - `verify_certs` boolean
    - `note` string
    - `appliance_id` string, uuid, required
    - `cred_type` 'googles3'
  - IBMCredentialRequest
    - `name` string, required
    - `hostname` string
    - `username` string, required
    - `secret` string, required
    - `verify_certs` boolean
    - `note` string
    - `appliance_id` string, uuid, required
    - `cred_type` 'ibmcos'
  - HCPCredentialRequest
    - `name` string, required
    - `hostname` string
    - `username` string, required
    - `secret` string, required
    - `verify_certs` boolean
    - `note` string
    - `appliance_id` string, uuid, required
    - `cred_type` 'hcp'
  - CleversafeCredentialRequest
    - `name` string, required
    - `hostname` string
    - `username` string, required
    - `secret` string, required
    - `verify_certs` boolean
    - `note` string
    - `appliance_id` string, uuid, required
    - `cred_type` 'cleversafe'
  - ViprCredentialRequest
    - `name` string, required
    - `hostname` string
    - `username` string, required
    - `secret` string, required
    - `verify_certs` boolean
    - `note` string
    - `appliance_id` string, uuid, required
    - `cred_type` 'vipr'

## Response `202`

Cloud credential creation accepted; command dispatched to edge

- TaskCreatedDto: Minimal task response returned when an async operation is accepted (HTTP 202).
  - `id` string, uuid, required
  - `state` 'in_progress' | 'completed' | 'failed', required

## Other responses

- `401`: Not authenticated
- `403`: Insufficient permissions
- `404`: Appliance with the given ID does not exist
- `422`: Validation Error
- `500`: Internal server error
- `503`: Edge appliance is unreachable (no recent heartbeat)

---

[API](https://skmtc.dev/nasuni/apis/portal-api.md) - [All operations](https://skmtc.dev/nasuni/apis/portal-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nasuni/apis/portal-api/revisions/2a505bec6d14?raw)
