Skip to content

Commit

Permalink
SNOW-658339: Implement CLOUD_PROVIDER_TOKEN secret type for Java (#120)
Browse files Browse the repository at this point in the history
* Implement CLOUD_PROVIDER_TOKEN secret type for Java Udx

* Address review comments

---------

Co-authored-by: Shawn Yang <[email protected]>
  • Loading branch information
sfc-gh-shyang and Shawn Yang authored Jul 17, 2024
1 parent ef78860 commit a86197d
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down

0 comments on commit a86197d

Please sign in to comment.