public Supplier getClientForArnRegion()

in common/src/main/java/software/amazon/kms/common/ClientBuilder.java [27:36]


    public Supplier<KmsClient> getClientForArnRegion(final String arn) {
        try {
            final String regionStr = arn.split(":")[3];

            return getClientForRegion(regionStr);
        } catch (final ArrayIndexOutOfBoundsException e) {
            throw new CfnInvalidRequestException(InvalidArnException.create(
                "Invalid Arn Provided. Unable to determine the region of the supplied arn.", e));
        }
    }