Connect a cloud account
Creates a connection reporting into one environment, in state
pending. It is created before access is granted, so you have its
external_id for the AWS role's trust policy, or for the Azure tag
or GCP label. Then give the role ARN (AWS), directory id (Azure) or
application credential (portvMind) with a PATCH. Leave regions
empty to read every region the account has enabled. An organization
may have at most 20 connections.
Requires the identity:cloudaccount:write and catalog:source:write scopes.
Authorization
Request body required
providerstring requirednamestring requiredenvironment_idstring requiredrole_arnstringAWS:arn:aws:iam::<account>:role/EvoHub…, no path.tenant_idstringAzure: the directory (tenant) id.regionsarray of string
Responses
201
The cloud account.
dataCloudConnectionShow CloudConnection properties
idstringsource_idstringenvironment_idstringproviderstringnamestringrole_arnstringtenant_idstringcredential_idstringhas_secretbooleanexternal_idstringOurs, random and unique. Empty withoutidentity:cloudaccount:write.regionsarray of stringEmpty means every region the account has enabled.account_idstringstatusstringlast_errorstringdeniedarray of stringServices the access did not let it read on the last read. Not a failure.last_polled_atstring (date-time) | nullnext_poll_atstring (date-time)created_bystringcreated_atstring (date-time)updated_atstring (date-time)
400
The request is not valid: a field or filter value is wrong
(VALIDATION_ERROR, with a sentence saying what), the body is not
the expected JSON or carries an unknown field (INVALID_BODY), the
cursor is not one this list gave (INVALID_CURSOR), a binding names
a service that does not exist (UNKNOWN_COMPONENT), or a PATCH
tries to change a slug (SLUG_IMMUTABLE).
errorobject requiredcodestring requiredmessagestring requiredrequest_idstring
401
No API key was sent, or it is unknown, revoked or expired (UNAUTHORIZED).
errorobject requiredcodestring requiredmessagestring requiredrequest_idstring
403
The key lacks a scope this endpoint needs (FORBIDDEN).
errorobject requiredcodestring requiredmessagestring requiredrequest_idstring
409
The name is taken (NAME_TAKEN), or the organization has 20 connections (TOO_MANY_CONNECTIONS).
errorobject requiredcodestring requiredmessagestring requiredrequest_idstring
429
Too many requests (RATE_LIMITED). Wait for Retry-After seconds.
Retry-AfterintegerSeconds to wait before retrying.
errorobject requiredcodestring requiredmessagestring requiredrequest_idstring
500
Something went wrong on EvoHub's side (INTERNAL_ERROR). Retry later.
errorobject requiredcodestring requiredmessagestring requiredrequest_idstring
503
Cloud accounts for this provider cannot be connected on this EvoHub (CLOUD_NOT_CONFIGURED).
errorobject requiredcodestring requiredmessagestring requiredrequest_idstring
Example request
curl -X POST 'https://evohub.io/api/v1/catalog/connections' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"name": "Production account",
"regions": [
"eu-central-1"
],
"provider": "aws",
"environment_id": "env_2c4e6a8b0d1f3a5c7e9b1d3f5a7c9e0b"
}'
