# SecretsManagerSecretOptions

Options for referencing a secret value from Secrets Manager.

- Source: [`core/lib/secret-value.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0/packages/aws-cdk-lib/core/lib/secret-value.ts#L249)

## Example

```ts
new codebuild.BitBucketSourceCredentials(this, 'CodeBuildBitBucketCreds', {
  username: SecretValue.secretsManager('my-bitbucket-creds', { jsonField: 'username' }),
  password: SecretValue.secretsManager('my-bitbucket-creds', { jsonField: 'password' }),
});
```

## Properties

- `jsonField`: string — The key of a JSON field to retrieve.

  **Default:** returns all the content stored in the Secrets Manager secret.

  This can only be used if the secret
  stores a JSON object.

- `versionId`: string = AWSCURRENT — Specifies the unique identifier of the version of the secret you want to use.

  Can specify at most one of `versionId` and `versionStage`.

- `versionStage`: string = AWSCURRENT — Specifies the secret version that you want to retrieve by the staging label attached to the version.

  Can specify at most one of `versionId` and `versionStage`.
