Interface SecretAttributes
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
SecretAttributes.Jsii$Proxy
One ARN format (secretArn
, secretCompleteArn
, secretPartialArn
) must be provided.
Example:
Key encryptionKey; ISecret secret = Secret.fromSecretAttributes(this, "ImportedSecret", SecretAttributes.builder() .secretArn("arn:aws:secretsmanager:<region>:<account-id-number>:secret:<secret-name>-<random-6-characters>") // If the secret is encrypted using a KMS-hosted CMK, either import or reference that key: .encryptionKey(encryptionKey) .build());
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forSecretAttributes
static final class
An implementation forSecretAttributes
-
Method Summary
Modifier and TypeMethodDescriptionstatic SecretAttributes.Builder
builder()
default IKey
The encryption key that is used to encrypt the secret, unless the default SecretsManager key is used.default String
Deprecated.default String
The complete ARN of the secret in SecretsManager.default String
The 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. -
getSecretArn
Deprecated.usesecretCompleteArn
orsecretPartialArn
instead.(deprecated) The ARN of the secret in SecretsManager.Cannot be used with
secretCompleteArn
orsecretPartialArn
. -
getSecretCompleteArn
The complete ARN of the secret in SecretsManager.This is the ARN including the Secrets Manager 6-character suffix. Cannot be used with
secretArn
orsecretPartialArn
. -
getSecretPartialArn
The partial ARN of the secret in SecretsManager.This is the ARN without the Secrets Manager 6-character suffix. Cannot be used with
secretArn
orsecretCompleteArn
. -
builder
- Returns:
- a
SecretAttributes.Builder
ofSecretAttributes
-
secretCompleteArn
orsecretPartialArn
instead.