Interface ISecretAttributes
Attributes required to import an existing secret into the Stack.
Namespace: Amazon.CDK.AWS.SecretsManager
Assembly: Amazon.CDK.AWS.SecretsManager.dll
Syntax (csharp)
public interface ISecretAttributes
Syntax (vb)
Public Interface ISecretAttributes
Remarks
One ARN format (secretArn
, secretCompleteArn
, secretPartialArn
) must be provided.
ExampleMetadata: infused
Examples
Key encryptionKey;
var secret = Secret.FromSecretAttributes(this, "ImportedSecret", new SecretAttributes {
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
});
Synopsis
Properties
EncryptionKey | The encryption key that is used to encrypt the secret, unless the default SecretsManager key is used. |
SecretArn | (deprecated) The ARN of the secret in SecretsManager. |
SecretCompleteArn | The complete ARN of the secret in SecretsManager. |
SecretPartialArn | The partial ARN of the secret in SecretsManager. |
Properties
EncryptionKey
The encryption key that is used to encrypt the secret, unless the default SecretsManager key is used.
virtual IKey EncryptionKey { get; }
Property Value
SecretArn
(deprecated) The ARN of the secret in SecretsManager.
virtual string SecretArn { get; }
Property Value
System.String
Remarks
Cannot be used with secretCompleteArn
or secretPartialArn
.
Stability: Deprecated
SecretCompleteArn
The complete ARN of the secret in SecretsManager.
virtual string SecretCompleteArn { get; }
Property Value
System.String
Remarks
This is the ARN including the Secrets Manager 6-character suffix.
Cannot be used with secretArn
or secretPartialArn
.
SecretPartialArn
The partial ARN of the secret in SecretsManager.
virtual string SecretPartialArn { get; }
Property Value
System.String
Remarks
This is the ARN without the Secrets Manager 6-character suffix.
Cannot be used with secretArn
or secretCompleteArn
.