public final class AwsKmsCmkArnInfo extends Object
Modifier and Type | Method and Description |
---|---|
static boolean |
awsKmsArnMatchForDecrypt(String configuredKeyIdentifier,
String providerInfoKeyIdentifier)
Tell if two different AWS KMS ARNs match.
|
String |
getAccountId() |
String |
getPartition() |
String |
getRegion() |
String |
getResource() |
String |
getResourceType() |
static boolean |
isMRK(AwsKmsCmkArnInfo arn)
Identifies Multi Region AWS KMS keys.
|
static boolean |
isMRK(String resource)
Identifies Multi Region AWS KMS keys.
|
static AwsKmsCmkArnInfo |
parseInfoFromKeyArn(String keyArn)
Takes an AWS KMS identifier that may or may not be an ARN and attempts to parse the identifier
as an ARN.
|
String |
toString()
Returns the well-formed ARN this object describes.
|
String |
toString(String mrkRegion)
AWS KMS multi-Region keys can have replicas in other region.
|
static void |
validAwsKmsIdentifier(String identifier)
Takes a string an will throw if this identifier is invalid Raw resources like a key ID or alias
`mrk-edb7fe6942894d32ac46dbb1c922d574`, `alias/my-alias` or ARNs like
arn:aws:kms:us-west-2:111122223333:key/mrk-edb7fe6942894d32ac46dbb1c922d574
arn:aws:kms:us-west-2:111122223333:alias/my-alias
|
public static AwsKmsCmkArnInfo parseInfoFromKeyArn(String keyArn)
keyArn
- The string to parsepublic static void validAwsKmsIdentifier(String identifier)
identifier
- an identifier that is an ARN or raw resourcepublic static boolean isMRK(String resource)
public static boolean isMRK(AwsKmsCmkArnInfo arn)
public static boolean awsKmsArnMatchForDecrypt(String configuredKeyIdentifier, String providerInfoKeyIdentifier)
public String getPartition()
public String getAccountId()
public String getRegion()
public String getResourceType()
public String getResource()
public String toString()
Copyright © 2023. All rights reserved.