public function deleteAction($cloudCredentialsId)
{
$this->checkScopedPermissions('CLOUD_CREDENTIALS');
$cloudCredentials = $this->getCloudCredentials($cloudCredentialsId, true);
if ($cloudCredentials->isUsed()) {
throw new ApiErrorException(409, ErrorMessage::ERR_OBJECT_IN_USE, "Cloud Credentials that are in use can not be removed. Please disassociate them from the Environments first.");
}
$cloudCredentials->delete();
return $this->result(null);
}