Class SecretsManagerPropertySourceImporter

java.lang.Object
io.micronaut.discovery.config.RetryablePropertySourceImporter<io.micronaut.aws.secretsmanager.imports.SecretsManagerPropertySourceImporter.SecretsManagerImport>
io.micronaut.aws.secretsmanager.imports.SecretsManagerPropertySourceImporter
All Implemented Interfaces:
io.micronaut.context.env.PropertySourceImporter<io.micronaut.discovery.config.RetryablePropertySourceImporter.RetryableImportDeclaration<io.micronaut.aws.secretsmanager.imports.SecretsManagerPropertySourceImporter.SecretsManagerImport>>, io.micronaut.core.util.Toggleable, AutoCloseable

@Internal public final class SecretsManagerPropertySourceImporter extends io.micronaut.discovery.config.RetryablePropertySourceImporter<io.micronaut.aws.secretsmanager.imports.SecretsManagerPropertySourceImporter.SecretsManagerImport>
Property source importer for AWS Secrets Manager.

Supported credentials/configuration options may be supplied either in the connection string or the structured map declaration. User-info in the connection string maps to `aws.access-key-id` and `aws.secret-access-key`. Connection-string query parameters accept both prefixed and unprefixed aliases for AWS credentials and region (for example `region` or `aws.region`). Supported option keys are `aws.access-key-id` / `access-key-id`, `aws.secret-access-key` / `secret-access-key`, `aws.secret-key` / `secret-key`, `aws.session-token` / `session-token`, and `aws.region` / `region`. In the structured map form, secret mappings are supplied via `secrets` entries using `secret-name` and optional `prefix` fields. Standard retry settings are also supported with `retry-attempts`, `retry-count`, `retry-delay`, `retry-max-delay`, `retry-multiplier`, and `retry-jitter`.

Since:
5.0.0
  • Nested Class Summary

    Nested classes/interfaces inherited from class io.micronaut.discovery.config.RetryablePropertySourceImporter

    io.micronaut.discovery.config.RetryablePropertySourceImporter.RetryableImportDeclaration<D>

    Nested classes/interfaces inherited from interface io.micronaut.context.env.PropertySourceImporter

    io.micronaut.context.env.PropertySourceImporter.ImportContext<T>
  • Field Summary

    Fields inherited from class io.micronaut.discovery.config.RetryablePropertySourceImporter

    RETRY_ATTEMPTS, RETRY_COUNT, RETRY_DELAY, RETRY_JITTER, RETRY_MAX_DELAY, RETRY_MULTIPLIER
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    protected Optional<io.micronaut.context.env.PropertySource>
    importRetryablePropertySource(io.micronaut.context.env.PropertySourceImporter.ImportContext<io.micronaut.aws.secretsmanager.imports.SecretsManagerPropertySourceImporter.SecretsManagerImport> context)
     
    protected io.micronaut.aws.secretsmanager.imports.SecretsManagerPropertySourceImporter.SecretsManagerImport
    newImportDeclaration(io.micronaut.core.convert.value.ConvertibleValues<Object> values, io.micronaut.retry.RetryPolicy retryPolicy)
     
    protected io.micronaut.aws.secretsmanager.imports.SecretsManagerPropertySourceImporter.SecretsManagerImport
    newImportDeclaration(io.micronaut.core.util.ConnectionString connectionString, io.micronaut.retry.RetryPolicy retryPolicy)
     

    Methods inherited from class io.micronaut.discovery.config.RetryablePropertySourceImporter

    close, closeRetryableImporter, importPropertySource, newImportDeclaration, newImportDeclaration, resolveRetryPolicy

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.micronaut.core.util.Toggleable

    isEnabled
  • Constructor Details

    • SecretsManagerPropertySourceImporter

      public SecretsManagerPropertySourceImporter()
      Default constructor.
  • Method Details

    • getProvider

      public String getProvider()
    • newImportDeclaration

      protected io.micronaut.aws.secretsmanager.imports.SecretsManagerPropertySourceImporter.SecretsManagerImport newImportDeclaration(io.micronaut.core.util.ConnectionString connectionString, io.micronaut.retry.RetryPolicy retryPolicy)
      Specified by:
      newImportDeclaration in class io.micronaut.discovery.config.RetryablePropertySourceImporter<io.micronaut.aws.secretsmanager.imports.SecretsManagerPropertySourceImporter.SecretsManagerImport>
    • newImportDeclaration

      protected io.micronaut.aws.secretsmanager.imports.SecretsManagerPropertySourceImporter.SecretsManagerImport newImportDeclaration(io.micronaut.core.convert.value.ConvertibleValues<Object> values, io.micronaut.retry.RetryPolicy retryPolicy)
      Specified by:
      newImportDeclaration in class io.micronaut.discovery.config.RetryablePropertySourceImporter<io.micronaut.aws.secretsmanager.imports.SecretsManagerPropertySourceImporter.SecretsManagerImport>
    • importRetryablePropertySource

      protected Optional<io.micronaut.context.env.PropertySource> importRetryablePropertySource(io.micronaut.context.env.PropertySourceImporter.ImportContext<io.micronaut.aws.secretsmanager.imports.SecretsManagerPropertySourceImporter.SecretsManagerImport> context)
      Specified by:
      importRetryablePropertySource in class io.micronaut.discovery.config.RetryablePropertySourceImporter<io.micronaut.aws.secretsmanager.imports.SecretsManagerPropertySourceImporter.SecretsManagerImport>