diff --git a/src/main/java/com/snowflake/snowpark_java/types/CloudProviderToken.java b/src/main/java/com/snowflake/snowpark_java/types/CloudProviderToken.java new file mode 100644 index 00000000..f4cb9f4e --- /dev/null +++ b/src/main/java/com/snowflake/snowpark_java/types/CloudProviderToken.java @@ -0,0 +1,28 @@ +package com.snowflake.snowpark_java.types; + +/** The Snowflake class provides access to the CloudProviderToken secret object with the following properties: accessKeyId, + * secretAccessKey, and token.*/ + +public class CloudProviderToken { + private final String accessKeyId; + private final String secretAccessKey; + private final String token; + + public CloudProviderToken(String id, String key, String token) { + this.accessKeyId = id; + this.secretAccessKey = key; + this.token = token; + } + + public String getAccessKeyId() { + return accessKeyId; + } + + public String getSecretAccessKey() { + return secretAccessKey; + } + + public String getToken() { + return token; + } +} diff --git a/src/main/java/com/snowflake/snowpark_java/types/SnowflakeSecrets.java b/src/main/java/com/snowflake/snowpark_java/types/SnowflakeSecrets.java index 0a5f13ea..4438bea4 100644 --- a/src/main/java/com/snowflake/snowpark_java/types/SnowflakeSecrets.java +++ b/src/main/java/com/snowflake/snowpark_java/types/SnowflakeSecrets.java @@ -31,6 +31,15 @@ public UsernamePassword getUsernamePassword(String secretName) { throw new UnsupportedOperationException(); } + /** + * Get the Cloud provider token from the secret. On success, it returns a valid object with access key id, + * secret access key and token. + * + * @param secretName name of the secret object. + */ + public CloudProviderToken getCloudProviderToken(String secretName) { + throw new UnsupportedOperationException(); + } /** * Get the secret generic string of the secret. On success, it returns a valid token string. *