Package com.adobe.testing.s3mock.store
Record Class KmsKeyStore
java.lang.Object
java.lang.Record
com.adobe.testing.s3mock.store.KmsKeyStore
Stores valid KMS key references for the
S3MockApplication.
KMS key references must be added in valid ARN format:
"arn:aws:kms:region:acct-id:key/key-id"
API Reference-
Constructor Summary
ConstructorsConstructorDescriptionKmsKeyStore(Map<String, String> kmsKeysIdToARN) Creates an instance of aKmsKeyStorerecord class.KmsKeyStore(Set<String> validKmsKeys) -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thekmsKeysIdToARNrecord component.voidregisterKMSKeyRef(String validKeyRef) Register a valid KMS Key reference.final StringtoString()Returns a string representation of this record class.booleanvalidateKeyId(String keyId) Validate if the KMS key ID is valid.
-
Constructor Details
-
KmsKeyStore
-
KmsKeyStore
Creates an instance of aKmsKeyStorerecord class.- Parameters:
kmsKeysIdToARN- the value for thekmsKeysIdToARNrecord component
-
-
Method Details
-
registerKMSKeyRef
Register a valid KMS Key reference. KMS key references must be added in valid ARN format: "arn:aws:kms:region:acct-id:key/key-id"- Parameters:
validKeyRef- A KMS Key reference.
-
validateKeyId
Validate if the KMS key ID is valid.- Parameters:
keyId- A KMS ID reference.- Returns:
- Returns true if the key ID is valid for this Mock instance.
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
kmsKeysIdToARN
Returns the value of thekmsKeysIdToARNrecord component.- Returns:
- the value of the
kmsKeysIdToARNrecord component
-