Interface ISecretVersionInfo
(experimental) Specify the secret's version id or version stage.
Namespace: Amazon.CDK.AWS.AppRunner.Alpha
Assembly: Amazon.CDK.AWS.AppRunner.Alpha.dll
Syntax (csharp)
public interface ISecretVersionInfo
Syntax (vb)
Public Interface ISecretVersionInfo
Remarks
Stability: Experimental
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.SecretsManager;
using Amazon.CDK.AWS.SSM;
Stack stack;
var secret = new Secret(stack, "Secret");
var parameter = StringParameter.FromSecureStringParameterAttributes(stack, "Parameter", new SecureStringParameterAttributes {
ParameterName = "/name",
Version = 1
});
var service = new Service(stack, "Service", new ServiceProps {
Source = Source.FromEcrPublic(new EcrPublicProps {
ImageConfiguration = new ImageConfiguration {
Port = 8000,
EnvironmentSecrets = new Dictionary<string, Secret> {
{ "SECRET", Secret.FromSecretsManager(secret) },
{ "PARAMETER", Secret.FromSsmParameter(parameter) },
{ "SECRET_ID", Secret.FromSecretsManagerVersion(secret, new SecretVersionInfo { VersionId = "version-id" }) },
{ "SECRET_STAGE", Secret.FromSecretsManagerVersion(secret, new SecretVersionInfo { VersionStage = "version-stage" }) }
}
},
ImageIdentifier = "public.ecr.aws/aws-containers/hello-app-runner:latest"
})
});
service.AddSecret("LATER_SECRET", Secret.FromSecretsManager(secret, "field"));
Synopsis
Properties
VersionId | (experimental) version id of the secret. |
VersionStage | (experimental) version stage of the secret. |
Properties
VersionId
(experimental) version id of the secret.
virtual string VersionId { get; }
Property Value
System.String
Remarks
Default: - use default version id
Stability: Experimental
VersionStage
(experimental) version stage of the secret.
virtual string VersionStage { get; }
Property Value
System.String
Remarks
Default: - use default version stage
Stability: Experimental