Interface ISecretAttributes
Attributes required to import an existing secret into the Stack.
Namespace: Amazon.CDK.AWS.SecretsManager
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface ISecretAttributes
Syntax (vb)
Public Interface ISecretAttributes
Remarks
One ARN format (secretArn
, secretCompleteArn
, secretPartialArn
) must be provided.
ExampleMetadata: infused
Examples
var userpool = new UserPool(this, "Pool");
var secret = Secret.FromSecretAttributes(this, "CognitoClientSecret", new SecretAttributes {
SecretCompleteArn = "arn:aws:secretsmanager:xxx:xxx:secret:xxx-xxx"
}).SecretValue;
var provider = new UserPoolIdentityProviderGoogle(this, "Google", new UserPoolIdentityProviderGoogleProps {
ClientId = "amzn-client-id",
ClientSecretValue = secret,
UserPool = userpool
});
Synopsis
Properties
EncryptionKey | The encryption key that is used to encrypt the secret, unless the default SecretsManager key is used. |
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
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
.