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

ecret-rotation.aws-parameterstore-sdk-v1_3.11.3.4.source-code.AwsSdkV1.scala Maven / Gradle / Ivy

There is a newer version: 11.3.0
Show newest version
package com.gu.play.secretrotation.aws.parameterstore

import com.amazonaws.services.simplesystemsmanagement.AWSSimpleSystemsManagement
import com.amazonaws.services.simplesystemsmanagement.model.GetParametersRequest

import scala.jdk.CollectionConverters._

case class AwsSdkV1(ssmClient: AWSSimpleSystemsManagement) extends MinimalAwsSdkWrapper {
  override def fetchValues(parameters: Seq[String]): Iterable[ParameterValue] = ssmClient.getParameters(
    new GetParametersRequest()
      .withWithDecryption(true)
      .withNames(parameters.asJavaCollection)
  ).getParameters.asScala.map(p => ParameterValue(p.getValue, Metadata(p.getVersion, p.getLastModifiedDate.toInstant)))
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy