# SecretAttributes

Attributes required to import an existing secret into the Stack.

One ARN format (`secretArn`, `secretCompleteArn`, `secretPartialArn`) must be provided.

- Source: [`aws-secretsmanager/lib/secret.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-secretsmanager/lib/secret.ts#L324)

## Example

```ts
const userpool = new cognito.UserPool(this, 'Pool');
const secret = secretsmanager.Secret.fromSecretAttributes(this, "CognitoClientSecret", {
    secretCompleteArn: "arn:aws:secretsmanager:xxx:xxx:secret:xxx-xxx"
}).secretValue

const provider = new cognito.UserPoolIdentityProviderGoogle(this, 'Google', {
  clientId: 'amzn-client-id',
  clientSecretValue: secret,
  userPool: userpool,
});
```

## Properties

- `encryptionKey`: [IKey](/cdk/api/v2/docs/aws-cdk-lib.aws_kms.IKey.html) — The encryption key that is used to encrypt the secret, unless the default SecretsManager key is used.

- `secretCompleteArn`: string — The complete ARN of the secret in SecretsManager.

  This is the ARN including the Secrets Manager 6-character suffix.
  Cannot be used with `secretArn` or `secretPartialArn`.

- `secretPartialArn`: string — The partial ARN of the secret in SecretsManager.

  This is the ARN without the Secrets Manager 6-character suffix.
  Cannot be used with `secretArn` or `secretCompleteArn`.
