Skip to content

Instantly share code, notes, and snippets.

@tommyshiou
tommyshiou / AWSManagedSecretExample
Created August 23, 2019 20:42
AWSManagedSecret annotation example
public class ExampleClass {
@Inject @AwsManagedSecret("credentials/mydb/readonly-user")
Secret<Credentials> myDbReadonlyCredentials;
public void readDataFromDb() {
String password = myDbReadonlyCredentials.getSecretValue().getPassword()
// Use password to set up connection
...
}
class StatusUpdateStreamingListener(
pipelineName: String,
pipelineId: Long) extends StreamingListener {
@Inject var statusTrackerClient: StatusTrackerClient = _
override def onBatchCompleted(batch: StreamingListenerBatchCompleted): Unit = {
val msg = StreamingStatusMessage.newBuilder()
.setPipelineName(pipelineName)