getKeyPolicy  
  inline suspend fun KmsClient.getKeyPolicy(crossinline block: GetKeyPolicyRequest.Builder.() -> Unit): GetKeyPolicyResponse
Gets a key policy attached to the specified KMS key.
Cross-account use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.
Required permissions: kms:GetKeyPolicy (key policy)
Related operations: PutKeyPolicy
Eventual consistency: The KMS API follows an eventual consistency model. For more information, see KMS eventual consistency.
Samples
fun main() { 
   //sampleStart 
   // The following example retrieves the key policy for the specified KMS key.
val resp = kmsClient.getKeyPolicy {
    keyId = "1234abcd-12ab-34cd-56ef-1234567890ab"
    policyName = "default"
} 
   //sampleEnd
}