Interface SecretVersionInfo
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
SecretVersionInfo.Jsii$Proxy
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:47.445Z")
@Stability(Stable)
public interface SecretVersionInfo
extends software.amazon.jsii.JsiiSerializable
Specify the secret's version id or version stage.
Example:
Secret secret; Secret dbSecret; StringParameter parameter; TaskDefinition taskDefinition; Bucket s3Bucket; ContainerDefinition newContainer = taskDefinition.addContainer("container", ContainerDefinitionOptions.builder() .image(ContainerImage.fromRegistry("amazon/amazon-ecs-sample")) .memoryLimitMiB(1024) .environment(Map.of( // clear text, not for sensitive data "STAGE", "prod")) .environmentFiles(List.of(EnvironmentFile.fromAsset("./demo-env-file.env"), EnvironmentFile.fromBucket(s3Bucket, "assets/demo-env-file.env"))) .secrets(Map.of( // Retrieved from AWS Secrets Manager or AWS Systems Manager Parameter Store at container start-up. "SECRET", Secret.fromSecretsManager(secret), "DB_PASSWORD", Secret.fromSecretsManager(dbSecret, "password"), // Reference a specific JSON field, (requires platform version 1.4.0 or later for Fargate tasks) "API_KEY", Secret.fromSecretsManagerVersion(secret, SecretVersionInfo.builder().versionId("12345").build(), "apiKey"), // Reference a specific version of the secret by its version id or version stage (requires platform version 1.4.0 or later for Fargate tasks) "PARAMETER", Secret.fromSsmParameter(parameter))) .build()); newContainer.addEnvironment("QUEUE_NAME", "MyQueue");
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forSecretVersionInfo
static final class
An implementation forSecretVersionInfo
-
Method Summary
Modifier and TypeMethodDescriptionstatic SecretVersionInfo.Builder
builder()
default String
version id of the secret.default String
version stage of the secret.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getVersionId
version id of the secret.Default: - use default version id
-
getVersionStage
version stage of the secret.Default: - use default version stage
-
builder
- Returns:
- a
SecretVersionInfo.Builder
ofSecretVersionInfo
-