Where AwsSecretsManagerApiKeyProvider reads an API key in AWS Secrets Manager (#2479): the secret secretId (its name or ARN) in region, either its whole SecretString or, with withField, one field of a SecretString that is a JSON object, as the console's key/value secrets are.
// the field apiKey of the key/value secret llm4s/openai, in eu-west-1
val settings = AwsSecretsManagerSettings("eu-west-1", AwsCredentials(accessKeyId, Secret(secretAccessKey)), "llm4s/openai")
.withField("apiKey")
.withRefreshInterval(1.minute)
Credentials that expire - an assumed role's, a pod identity's - are passed as a function, which is called again for every read from Secrets Manager: withCredentials(() => myCredentials()).
Value parameters
- credentials
-
called once per read for the credentials that sign it; never printed by
toString - endpoint
-
the Secrets Manager endpoint;
https://secretsmanager.<region>.amazonaws.comby default, set for a VPC endpoint or a FIPS endpoint - field
-
the key of a JSON-object
SecretStringthat holds the API key; none for the whole string - refreshInterval
-
how long a key read from Secrets Manager is used before it is read again
- region
-
the AWS region, such as
us-east-1; picks the endpoint and is part of the signature - requestTimeout
-
how long one read from Secrets Manager may take
- secretId
-
the secret's name or ARN
- versionStage
-
the version stage read:
AWSCURRENTby default, the version rotation last promoted
Attributes
- Companion
- object
- Source
- AwsSecretsManagerSettings.scala
- Graph
-
- Supertypes
