Class StorageCredentials
- java.lang.Object
-
- org.apache.cassandra.spark.transports.storage.StorageCredentials
-
public class StorageCredentials extends java.lang.ObjectStorageCredentials are used to represent the security information required to read from or write to a storage endpoint. Storage credentials can be either an access key ID and secret key, or also include a sessionToken when using temporary a temporary IAM credential.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classStorageCredentials.Serializer
-
Constructor Summary
Constructors Constructor Description StorageCredentials(java.lang.String accessKeyId, java.lang.String secretKey)Creates a Storage Credential instance with only an Access Key and Secret Key.StorageCredentials(java.lang.String accessKeyId, java.lang.String secretKey, java.lang.String sessionToken)Creates a Storage Credential instance with only an Access Key, Secret Key, and Session Token.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)static StorageCredentialsfromSidecarCredentials(o.a.c.sidecar.client.shaded.common.data.StorageCredentials credentials)java.lang.StringgetAccessKeyId()java.lang.StringgetSecretKey()java.lang.StringgetSessionToken()inthashCode()o.a.c.sidecar.client.shaded.common.data.StorageCredentialstoSidecarCredentials(java.lang.String region)java.lang.StringtoString()
-
-
-
Constructor Detail
-
StorageCredentials
public StorageCredentials(java.lang.String accessKeyId, java.lang.String secretKey)Creates a Storage Credential instance with only an Access Key and Secret Key.- Parameters:
accessKeyId- the accessKeyId to use to access the S3 bucketsecretKey- the secretKey to use to access the S3 Bucket
-
StorageCredentials
public StorageCredentials(java.lang.String accessKeyId, java.lang.String secretKey, java.lang.String sessionToken)Creates a Storage Credential instance with only an Access Key, Secret Key, and Session Token. Used when a temporary IAM credential is to be provided to S3 for authentication/authorization. See The Amazon Documentation on Temporary IAM Credentials for more details.- Parameters:
accessKeyId- the accessKeyId to use to access the S3 bucketsecretKey- the secretKey to use to access the S3 BucketsessionToken- the session token to use to access the S3 Bucket
-
-
Method Detail
-
fromSidecarCredentials
public static StorageCredentials fromSidecarCredentials(o.a.c.sidecar.client.shaded.common.data.StorageCredentials credentials)
-
getAccessKeyId
public java.lang.String getAccessKeyId()
-
getSecretKey
public java.lang.String getSecretKey()
-
getSessionToken
public java.lang.String getSessionToken()
-
toSidecarCredentials
public o.a.c.sidecar.client.shaded.common.data.StorageCredentials toSidecarCredentials(java.lang.String region)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-