All Downloads are FREE. Search and download functionalities are using the official Maven repository.

awscala.stepfunctions.ArnFormat.scala Maven / Gradle / Ivy

package awscala.stepfunctions

object ArnFormat {
  sealed trait ArnFormat
  case object TypedResourceArn extends ArnFormat
  case object ResourceArn extends ArnFormat

  def parseArn(arn: String, format: ArnFormat): String = {
    val limit = format match {
      case TypedResourceArn => 8
      case ResourceArn => 7
    }
    arn.split(":", limit).last
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy