Skip to content

Instantly share code, notes, and snippets.

@maksim77
Last active October 19, 2020 08:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maksim77/432e4b6bce56aabc6b7b5174095b30e5 to your computer and use it in GitHub Desktop.
Save maksim77/432e4b6bce56aabc6b7b5174095b30e5 to your computer and use it in GitHub Desktop.
package ru.mak_sim.ydb_test;
import yandex.cloud.sdk.auth.provider.ApiKeyCredentialProvider;
import yandex.cloud.sdk.auth.provider.CredentialProvider;
import java.io.IOException;
import java.nio.file.Path;
public class Main {
public static void main(String[] args) throws IOException {
Path sa = Path.of("/path/to/sa_name.json");
CredentialProvider provider = ApiKeyCredentialProvider.builder()
.fromFile(sa)
.enableCache()
.build();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment