Interface SecretAttributes
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
SecretAttributes.Jsii$Proxy
@Generated(value="jsii-pacmak/1.116.0 (build 0eddcff)",
date="2025-10-24T13:34:46.975Z")
@Stability(Stable)
public interface SecretAttributes
extends software.amazon.jsii.JsiiSerializable
Attributes required to import an existing secret into the Stack.
One ARN format (secretArn, secretCompleteArn, secretPartialArn) must be provided.
Example:
UserPool userpool = new UserPool(this, "Pool");
SecretValue secret = Secret.fromSecretAttributes(this, "CognitoClientSecret", SecretAttributes.builder()
.secretCompleteArn("arn:aws:secretsmanager:xxx:xxx:secret:xxx-xxx")
.build()).getSecretValue();
UserPoolIdentityProviderGoogle provider = UserPoolIdentityProviderGoogle.Builder.create(this, "Google")
.clientId("amzn-client-id")
.clientSecretValue(secret)
.userPool(userpool)
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forSecretAttributesstatic final classAn implementation forSecretAttributes -
Method Summary
Modifier and TypeMethodDescriptionstatic SecretAttributes.Builderbuilder()default IKeyThe encryption key that is used to encrypt the secret, unless the default SecretsManager key is used.default StringThe complete ARN of the secret in SecretsManager.default StringThe partial ARN of the secret in SecretsManager.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getEncryptionKey
The encryption key that is used to encrypt the secret, unless the default SecretsManager key is used. -
getSecretCompleteArn
The complete ARN of the secret in SecretsManager.This is the ARN including the Secrets Manager 6-character suffix. Cannot be used with
secretArnorsecretPartialArn. -
getSecretPartialArn
The partial ARN of the secret in SecretsManager.This is the ARN without the Secrets Manager 6-character suffix. Cannot be used with
secretArnorsecretCompleteArn. -
builder
- Returns:
- a
SecretAttributes.BuilderofSecretAttributes
-