Interface SecretVersionInfo
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
SecretVersionInfo.Jsii$Proxy
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-06T23:25:18.741Z")
@Stability(Experimental)
public interface SecretVersionInfo
extends software.amazon.jsii.JsiiSerializable
(experimental) Specify the secret's version id or version stage.
Example:
import software.amazon.awscdk.services.secretsmanager.*; import software.amazon.awscdk.services.ssm.*; Stack stack; Secret secret = new Secret(stack, "Secret"); IStringParameter parameter = StringParameter.fromSecureStringParameterAttributes(stack, "Parameter", SecureStringParameterAttributes.builder() .parameterName("/name") .version(1) .build()); Service service = Service.Builder.create(stack, "Service") .source(Source.fromEcrPublic(EcrPublicProps.builder() .imageConfiguration(ImageConfiguration.builder() .port(8000) .environmentSecrets(Map.of( "SECRET", Secret.fromSecretsManager(secret), "PARAMETER", Secret.fromSsmParameter(parameter), "SECRET_ID", Secret.fromSecretsManagerVersion(secret, SecretVersionInfo.builder().versionId("version-id").build()), "SECRET_STAGE", Secret.fromSecretsManagerVersion(secret, SecretVersionInfo.builder().versionStage("version-stage").build()))) .build()) .imageIdentifier("public.ecr.aws/aws-containers/hello-app-runner:latest") .build())) .build(); service.addSecret("LATER_SECRET", Secret.fromSecretsManager(secret, "field"));
-
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
(experimental) version id of the secret.default String
(experimental) version stage of the secret.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getVersionId
(experimental) version id of the secret.Default: - use default version id
-
getVersionStage
(experimental) version stage of the secret.Default: - use default version stage
-
builder
- Returns:
- a
SecretVersionInfo.Builder
ofSecretVersionInfo
-