private static void submitCredential(String clusterName, Credential credential) {
    ResourceProvider provider = AmbariContext.getClusterController().ensureResourceProvider(Resource.Type.Credential);
    Map<String, Object> credentialProperties = ResourceProviderAdapter.createCredentialRequestProperties(clusterName, credential);
    Request request = new RequestImpl(ImmutableSet.of(), ImmutableSet.of(credentialProperties), ImmutableMap.of(), null);
    String baseMessage = String.format("Failed to add credential %s to cluster %s", credential.getAlias(), clusterName);
    try {
      RequestStatus status = provider.createResources(request);
      if (status.getStatus() != RequestStatus.Status.Complete) {
        String msg = String.format("%s, received status: %s", baseMessage, status.getStatus());
        LOG.error(msg);
        throw new RuntimeException(msg);
      }
    } catch (ResourceAlreadyExistsException | SystemException | UnsupportedPropertyException | NoSuchParentResourceException e) {
      String msg = String.format("%s, %s", baseMessage, e);
      LOG.error(msg);
      throw new RuntimeException(msg, e);
    }
  }
Saves the quick links profile to the DB as an Ambari setting. Creates a new setting entity or updates the existing
one.
@param quickLinksProfileJson the quicklinks profile in Json format
ambari-server/src/main/java/org/apache/ambari/server/topology/TopologyManager.java