fbpx
POSThttps://api.spotinst.io/gcp/setup/credentials/validation?accountId={ACCOUNT_ID}

Validate the credentials for connecting a Spotinst account to an GCP Cloud account.

The validation will test the credentials without actually set it.

Please notice to run the set credentials request to perform the set account credentials.

Parameter Type Description
ACCOUNT_ID * String

The Account id you want to set

Default: act-12345
Request

Headers
Content-Type: application/json
Authorization: Bearer ${token}
Body
Copied!
Downloaded!
{
 "serviceAccount": {
	 "type": "service_account",
	 "project_id": "test-labs",
	 "private_key_id": "XXXXXXXXXXXXXXXXX",
	 "private_key": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
	 "client_email": "test123@test-labs.iam.gserviceaccount.com",
	 "client_id": "XXXXXXXXXXXXXXXXXXXXX",
	 "auth_uri": "https://accounts.google.com/o/oauth2/auth",
	 "token_uri": "https://oauth2.googleapis.com/token",
	 "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
	 "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/test123%40test-labs.iam.gserviceaccount.com"
	}
}
Attribute Type Description
serviceAccount * Object

Set service account for credentials

serviceAccount.type * String

Valid values: service_account

Example: service_account
serviceAccount.project_id * String

Name of project in GCP

serviceAccount.private_key_id * String

Private key id of JSON key created during prerequisites stage

serviceAccount.private_key * String

Private key of JSON key created during prerequisites stage

serviceAccount.client_email * String

Email associated with service account

serviceAccount.client_id * String

Client ID of service account

serviceAccount.auth_uri * String

Default: https://accounts.google.com/o/oauth2/auth
serviceAccount.token_uri * String

Default: https://oauth2.googleapis.com/token
serviceAccount.auth_provider_x509_cert_url * String

Default: https://www.googleapis.com/oauth2/v1/certs
serviceAccount.client_x509_cert_url * String

Should be in following format: "https://www.googleapis.com/robot/v1/metadata/x509/"

Response

Headers
Content-Type: application/json
Body
Copied!
Downloaded!
{
  "request": {
    "id": "8a8a3f88-7620-4783-bf00-953e0b8892fe",
    "url": "/gcp/setup/credentials/validate?accountId=act-123456",
    "method": "POST",
    "timestamp": "2019-10-17T10:43:54.421Z"
  },
  "response": {
    "status": {
      "code": 200,
      "message": "OK"
    }
  }
}