Get a single SSH Key as an Optional instance.

<pre><code>GitLab Endpoint: GET /user/keys/:key_id</code></pre>

@param keyId the ID of the SSH key
@return an SshKey as an Optional instance holding the info on the SSH key specified by keyId
489194
public Optional<SshKey> getOptionalSshKey(Integer keyId) {
        try {
            return (Optional.ofNullable(getSshKey(keyId)));
        } catch (GitLabApiException glae) {
            return (GitLabApi.createOptionalFromException(glae));
        }
    }
283495
public GitlabRunner getRunnerDetail(int id) throws IOException {
        String tailUrl = String.format("%s/%d", GitlabRunner.URL, id);
        return retrieve().to(tailUrl, GitlabRunner.class);
    }
1361561
public Optional<Server> getPossiblyUnreadyServerById(long id) {
        if (nonReadyServers.containsKey(id)) {
            return Optional.ofNullable(nonReadyServers.get(id));
        }
        return Optional.ofNullable(servers.get(id));
    }
77807
def open_id_connect(self, client_id, client_secret):
        
        return KeycloakOpenidConnect(realm=self, client_id=client_id,
                                     client_secret=client_secret)
249988
public BareJid getOwnJid() {
        if (ownJid == null && connection().isAuthenticated()) {
            ownJid = connection().getUser().asBareJid();
        }

        return ownJid;
    }
896910
protected PrivateKey getKey(KeyStore ks, String alias, char[] password) throws KeyStoreException, NoSuchAlgorithmException, UnrecoverableKeyException {
      return CertificateHelper.getKey(ks, alias, password);
   }
93959
public static String getServerId(String clientId) {

        String serverId = clientId;
        if (clientId.contains(CLIENT_ID_SEPERATOR)) {
            serverId = clientId.substring(0, clientId.lastIndexOf(CLIENT_ID_SEPERATOR));
        }
        return serverId;
    }
180428
public static Credentials lookupSystemCredentials(String credentialsId) {
        return firstOrNull(
                lookupCredentials(
                        Credentials.class,
                        Jenkins.getInstance(),
                        ACL.SYSTEM,
                        emptyList()
                ),
                withId(credentialsId)
        );
    }
897957
public String commitId(final String id) {
        return new StringBuilder().append(baseUrl).append("commit/").append(id).toString();
    }
837600
public synchronized PrivateKey getPrivateKeyForLocalCert(final X509Certificate cert)
	throws CertificateEncodingException, KeyStoreException, UnrecoverableKeyException,
	NoSuchAlgorithmException
	{
		String thumbprint = ThumbprintUtil.getThumbprint(cert);

		return (PrivateKey)_ks.getKey(thumbprint, _keypassword);
	}
537435
public ClientBuilderForConnector withCredentialsId(String credentialsId)
            throws UnrecoverableKeyException, NoSuchAlgorithmException, KeyStoreException, KeyManagementException {
        if (isNotBlank(credentialsId)) {
            withCredentials(lookupSystemCredentials(credentialsId));
        } else {
            withSslConfig(null);
        }

        return this;
    }
1053652
public Key getKey(String alias, String password) {
        try {
            return keyStore.getKey(alias, password.toCharArray());
        } catch (GeneralSecurityException e) {
            throw new IllegalStateException(e);
        }
    }
578379
async def get_ssh_key(self, raw_ssh=False):
        
        key_facade = client.KeyManagerFacade.from_connection(self.connection())
        entity = {'tag': tag.model(self.info.uuid)}
        entities = client.Entities([entity])
        return await key_facade.ListKeys(entities, raw_ssh)
1271354
public static sslcertkey get(nitro_service service, String certkey) throws Exception{
		sslcertkey obj = new sslcertkey();
		obj.set_certkey(certkey);
		sslcertkey response = (sslcertkey) obj.get_resource(service);
		return response;
	}
861764
public Optional<User> getOptionalUser(int userId) {
        try {
            return (Optional.ofNullable(getUser(userId)));
        } catch (GitLabApiException glae) {
            return (GitLabApi.createOptionalFromException(glae));
        }
    }
717214
public Optional<LinkedResource> getById(String id)
  {
    return Optional.fromNullable(resourcesById.get(id));
  }
402141
protected static final <T, K extends Serializable>
    K _key2Id(
                    final Key<T> key
                    )
    {
        K  id = null;
        try {
            @SuppressWarnings( "unchecked" )
            K  obj = (K)key.getId();
            id = obj;
        } catch (Exception ex) {
            throw new RepositoryException( ex );
        }

        return id;
    }